-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding LoRa WAN support #124
Comments
In the german computer magazine c't was a project that contains an ATtiny and LoRaWan. Maybe this can be used as an starting point?! There is even a schematic to attach the LoRaWan module to the ATtiny which can maybe reused for the ESP32. My use case: |
Hi there. I have been trying to integrate Lora functionalities to Esphome on ESP32 TTGO OLED V1 boards. I have had some success in sending messages. I am stuck on the receiver part. Please find bellow my code. Please excuse the limitation of my skills in coding, I am no expert at all in this field. Sender Side : lora_sender.yaml file :
The custom sensor code is lora_sender.h
This is obviously a very simple test case, as it pushes a simple string out. But I believe it is simple enough to adapt it to other cases. I have validated that the messages gets properly sent by scanning RF with SDR. Now for the receiving part, I am stuck on the custom text sensor definition. I don't know how to create a sensor that listen continuously (with continuous polling). Any help would be appreciated. |
For that you can override the |
Thank you Otto. Sorry for asking but can you point me to some example code ? As I said I am really coming back to coding, as I find your project worth spending some time upon... But I am absolutely a newbie in this field. |
For example |
Thank you Otto I will have a look at this and let you know. |
thank you for your codes, lefuneste82 and Otto winter's guide. Can you share custom codes for the lora_receive.h If Lora supports in ESPHOME , It will be more useful platform for the IOT things. I wish I can integrate with Lora. thank you for your trial Lefuneste83. : ) |
I'm also looking forward to get lora supported in esphome. I ordered some SX1278 modules (Ra-02 Ai-Thinker with 433mhz) to make some tests. My goal is to connect two different home assistant setup's/networks which are some kilometers apart. Idea is to have a esphome node on each side (in their own network/own home assistant instance) which are listening to some home assistant (binary)sensors and pushing a message via lora to the other esphome node when a (binary)sensor changes. So it should be possible to mirror states from one home assistant instance/network to another. Great! Isn't it? So much the theory... |
I think I found two very interesting libraries which could be useful for this: https://github.com/sandeepmistry/arduino-LoRa
https://github.com/jgromes/RadioLib Supported modules:
The second one is a bigger (not limited to lora) but very active project |
Have you looked at the duty cycle limits for the 433mhz band? You might come close to exceeding that with a somewhat smart smart house. |
Hey All, lora_gateway.yaml file:
The custom reciever code lora_gateway.h:
With this code I'm getting all the sensors publishing the values into HA. |
@Johni81 do you mind sharing your code for the one of the senders? Im looking to do a mailbox sender with lora, and might take a whack at it with your code. Thanks! |
@BrewNinja here is my code for the mailbox sender.
|
Appreciate it! Thank you! |
I wonder if the title should be changed to "Add LoRa support". Because as far as I understand is it all about LoRa here and not about LoRa WAN (yet). Maybe the LoRa support could be added to the already existing remote_receiver and remote_transmitter components of esphome? |
@Johni81 thank you very much for your sketch. I was able to get a wemos d1 mini with a Ai-Thinker RA-02 433 Lora Module with SX1278 up and running as a receiver with your code. Little modifications for my 433Mhz module in lora_gateway.h are:
and my spi pins on the wemos d1 mini are:
My wiring:
Now I wonder what's needed to get another pair of this (esp&ra-02) acting as a sender. My idea is to forward (binary)sensor data the esphome node is knowing (from local or home assistant) anyways. Could this be possible? 🤔 |
unstale this bot 😈 |
Any Chance this will get properly implemented in Esphome ? |
@TessyPowder I guess the best would to support RadioLib but I could imaging that it is a bunch of work to integrate into esphome |
+1 desire for an official LORA integration with ESPHOME! |
+1 desire for an official LORA integration with ESPHOME! |
2 similar comments
+1 desire for an official LORA integration with ESPHOME! |
+1 desire for an official LORA integration with ESPHOME! |
+1 :-) |
Hello y'all. There was a very promising commit here: esphome/esphome#1609 (comment) But the author ran out of time. what a shame. Can we not pick up, where he left of and finalize this? Looks quite nice. Since I am not a c++ guy, I can help with testing. I have two of the boards here and I have home assistant up and running. Who can review this and comment, what is missing for integration into esphome. Oliver |
@AquaMCU I just created a new draft PR based on the original one from SenexCrenshaw. I am planning to put some work into it in the coming days as I am dependent on getting LoRa to work for a project of mine. Maybe the seasoned ESPHome experts here can help provide conceptual input. I had previously worked on my end with a custom I read some comments above about LoRa vs LoRa WAN - and I think the latter is definitively desirable for the community but also a stretch for a single contributor (https://lora-alliance.org/resource_hub/lorawan-104-specification-package/). So a shout out here I am super appreciative for any design/code input on the just opened draft PR esphome/esphome#3970 🙏 |
Hey, Looking to have Lora working on some node too. For some reason I loose wifi on one or 2 devices depending on the weather. Can't do much as they live outside and and i'd rather not pay for a new AP. What I would like is LoRa to be a backup for only the data. Anyhow if you need some help testing I'll be happy to lend a hand. I currently have 2 TTGO lora V1.3 on hand, one is running openmqttgate but stability is an issue as it dissconnects from wifi. Strangly when flashed with esphome it never goes offline. I digress. I'll have a look at what you're doing and see if I can get it working on my end. |
Hello Folks. Here is a new proposal. I am not giving up! LORA to MQTT gateway component: Sending Data:
|
I'd vote for anything that would work. Missing LORA support is IMHO a growing handicap for ESPhome. Wifi or wire is not always available... so it limits the range of applications considerably. |
Having support for LORA, is better than not having it. However, I think it would to be better to have an approach similar to other existing solutions like ble. I know it's a little bit different because ble has a structured way of representing data, but there are workarounds. We could have two base component, one to receive and other to send. These components would receive raw data, and then people would implement on top of these two components what they want. They could develop a custom component or use templates and handle the data themselves. Using this approach, the LORA to MQTT gateway would be straight forward to implement. It's the conjunction of two components, the future lora component and the existing MQTT Client Component. |
I have created and budgeted a project to develop the custom component. You can find it here: |
I'll pay that 100USD straight away. Mmnt. |
It says we already got an account at Upwork. Wait another moment, I need to reset the password. |
I could not pay it because -- likely because you have same role, as me (client). Thought you were THAT developer, not that you're looking for a developer... :) |
Wondering if this offer will work out. |
i can no longer find this on upwork? I would like to realize with it a remote control, read out sensors from far away... and many more ideas |
Hello. I'd sponsor this with additional 100 EUR. |
Hypothetically, if I'd work on mesh networking support for ESPHome, would people be mostly interested in node-to-node communication (i.e. ability to retrieve state/control "entities"/run automations on other nodes), or on node-to-HA communication? |
I would be first and foremost interested in node<->HA communication. Reaching earlier unreachable locations and extending the possible coverage of a network (by means of node hopping) would be a game changer. The possibility of node-to-node communication wouldn't be a game changer in the same magnitude at least. It would enable some autonomous setups which however require much more planning since OTA wouldn't work - and eventually people want connection to HA anyway to monitor the remote nodes and collect data etc. Node-to-node communication would also add resilience by removing dependence on home-assistant/mqtt (and on a wifi access point?). Not by any means a game changer. So extending the reach of the network by meshing would absolutely be the greatest improvement! |
I agree |
I'm using LoRaWan https://www.helium.com/ with HA. |
How did you set up Helium webhooks to HA? |
In HA you create a Automation with a webhook. Then in Helium you create a http integration and just do a post to your webhook address on your HA with the payload from your device. |
The killer integration here is ESPHome LoRaWAN devices that can talk to the Amazon Sidewalk network. Information here: https://www.theverge.com/2023/3/28/23659191/amazon-sidewalk-network-coverage and here: https://docs.aws.amazon.com/iot/latest/developerguide/iot-sidewalk.html This would open up so many cool uses for ESPHome. |
Are you certain that any device that talks Lorawan os able to use Amazon
Sidewalk? From what I understand, Amazon Sidewalk is a proprietary version
of Lora.
Src:
https://www.rcrwireless.com/20201208/internet-of-things/lora-alliance-semtech-in-talks-with-amazon-to-switch-sidewalk-over-to-lorawan
A sábado, 22/04/2023, 16:24, Jeff Hobbs ***@***.***> escreveu:
… The *killer* integration here is ESPHome LoRaWAN devices that can talk to
the Amazon Sidewalk network. Information here:
https://www.theverge.com/2023/3/28/23659191/amazon-sidewalk-network-coverage
and here:
https://docs.aws.amazon.com/iot/latest/developerguide/iot-sidewalk.html
This would open up so many cool uses for ESPHome.
—
Reply to this email directly, view it on GitHub
<#124 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFOL6PUZNP7FY66PDJZTAETXCPZ4DANCNFSM4G77KTDQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
The Sidewalk network white paper refers to "Third-party endpoints" but nothing in the writeup leads me to believe that the device needs to be produced by Amazon. https://m.media-amazon.com/images/G/01/sidewalk/final_privacy_security_whitepaper.pdf What Sidewalk offers is non-trivial; a mesh network that extends well beyond a single user's LoRa WAN setup. If you're interested in seeing what coverage looks like in your local area, Amazon offers a "test kit" (a LoRa WAN dongle hardcoded to an online map) here: |
Sidewalk isn't exactly LORA but it is built on CSS like LoRA. I don't think there is a sidewalk stack for ESP yet, SiLAbs, TI, Nordic, Quectel all have one though, Sidewalk devices require a certificate to be loaded onto the device so it can authenticate to the sidewalk network. Also keep in mind that hubs (echos, ring, etc) have a monthly 500MB data cap, share across all devices that connect to that hub. You can do a federation operation to exclude your own devices from your own cap but these are all things that would need to be developed for it to work with ESPhome. |
A blast from the past... |
Instead of a raw LoRa integration a more user friendly path could be to |
I would not like to see this tied to TTN at all but a generic LMIC library (that can be used for other LNS as well) |
Making progress in esphome/esphome#8187, and first implementation is for UART: esphome/esphome#8214. This is a generalised approach, which will make possible to develop simpler components for exchanging data directly between nodes by any means, like TCP, ESP-Now, LoRa, etc. |
Describe the problem you have/What new integration you would like
Add support for LoRa WAN protocol like RFM95
Please describe your use case for this integration and alternatives you've tried:
it would be nice to integrate ESP between their self for various automation (like a far remote sensor)
Additional context
this is one of the primary library used on Arduino
https://github.com/sandeepmistry/arduino-LoRa
The text was updated successfully, but these errors were encountered: