430 ESPnow and LoRa Network (incl. Repeaters and Gateways). A TTN replacement?

  Переглядів 60,155

Andreas Spiess

Andreas Spiess

Рік тому

Today, I can present you a diamond: The Farm Data Relay System. A network using LoRa and ESPnow that does not rely on infrastructure like TTN. And it is not only for farms. It is universal.
My second channel: / @hb9bla
Links:
Farm Data Relay System: github.com/timmbogner/Farm-Da...
LoRa32 Board (SMA connector) : s.click.aliexpress.com/e/_Ac8EZT or amzn.to/39WLmYb
T-Beam: s.click.aliexpress.com/e/_AF8uqV or amzn.to/39YmyPd
ESP8266 Development Board: s.click.aliexpress.com/e/_ArLZRN or amzn.to/3MQiak9
ESP-01: amzn.to/39T7hzk or s.click.aliexpress.com/e/_ABwiZd
The links above usually are affiliate links that support the channel (no additional cost for you).
Supporting Material and Blog Page: www.sensorsiot.org
Github: www.github.com/sensorsiot
My Patreon Page: / andreasspiess
Discord: / discord
If you want to support the channel, please use the links below to start your shopping. No additional charges for you, but I get a commission on your purchases to buy new stuff for the channel
My Amazon.com shop: www.amazon.com/shop/andreassp...
For Banggood bit.ly/2jAQEf4
For AliExpress: bit.ly/2B0yTLL
For Amazon.de: amzn.to/2r0ZCYI
For Amazon UK: amzn.to/2mxBaJf
For ebay.com: ebay.to/2DuYXBp
profile.php?...
/ spiessa
www.instructables.com/member/...
Please do not try to email me. This communication channel is reserved for my primary job
As an Amazon Associate, I earn from qualifying purchases
#no#midroll#ads

КОМЕНТАРІ: 327
@timmb2512
@timmb2512 Рік тому
Hello everyone, and thank you for the kind feedback on my project! I'll be doing my best to address any questions that are asked here over the next couple days. Cheers!
@jasonpluis3493
@jasonpluis3493 Рік тому
Great work Tim. I have a small farm in Australia and have implemented a similar LORA solution to get water tank readings displayed in the house. Your solution seems very robust and adaptable. I will definitely be learning from your example. Very well done.
@kokoscom
@kokoscom Рік тому
Hi Timm! We need to join forces ! We have been working in similar approach for quite a while + ability to mix sensors from multiple vendors - use own platform. (locally)
@SteveWrightNZ
@SteveWrightNZ Рік тому
Hi Tim, consider how MODBUS could be used as well.
@MoritzvonSchweinitz
@MoritzvonSchweinitz Рік тому
Cool project. I never really liked automatic meshes. Too many tings that can go wrong. May I recommend implementing one single simple config file for the whole network (probably in JSON) and each node simple picks the important things using it's id? You could also define the routes that traffic should take that way (e.g. "node 2 via ESP-NOW to node 4", "node 4 via LORA to node 6", etc.)
@timmb2512
@timmb2512 Рік тому
@@MoritzvonSchweinitz I've been thinking somewhat similarly for a while. I think an outside application that allows you to configure the whole system would be just the beginning, my dream is a drag-and-drop interface built on top of satellite imagery like google maps. It could even crunch topographical data between the points you drop to estimate signal strengths and ranges. Then on the other end, the application guides you through flashing them and helps you keep track of which is which. One day...
@HeadakusMaximus
@HeadakusMaximus Рік тому
I love when people much smarter than me do all the heavy lifting and then share it. ♥
@SchoolforHackers
@SchoolforHackers Рік тому
Agreed. Then I can hack it for my own situation.
@AndreasSpiess
@AndreasSpiess Рік тому
I agree!
@berndmanitzky1476
@berndmanitzky1476 3 місяці тому
We stand on the shoulders of giants. And I am thankful for it ever day!
@francoismorkel
@francoismorkel Рік тому
Well done Andreas, very usefull. I am busy developing a greenhouse control system for home / agriculture use. I was initially tinkering with lorawan, but a bit put off by gateway cost for each site. This looks much better.
@AndreasSpiess
@AndreasSpiess Рік тому
Maybe you can join forces with Timm?
@kokoscom
@kokoscom Рік тому
Dear Andreas ! Thank you for the interesting video. In fact we have been working with similar approach for quite a while (LOCAL MQTT + cloud MQTT talking to each other) - Francois - We need to meet/zoom discuss all together and join forces with Timm! (maybe through EU project as well!)
@kisssys5414
@kisssys5414 Рік тому
Now I have to learn how to parse all the data I'm going to generate, I'm not to hot with JSON but you and Timm have given me reason to study up a bit. Thank God for Steve Cope's tutorials. Thank you both.
@AndreasSpiess
@AndreasSpiess Рік тому
JSON knowledge is very valuable and well worth to learn...
@stephang5671
@stephang5671 Рік тому
Another great video, needs some further studies. Thanks for that! And my wife shouts HI from the background.. Have a gr8 Sunday and keep cool...
@AndreasSpiess
@AndreasSpiess Рік тому
Thank you. And greetings to your wife!
@koeiekop1973
@koeiekop1973 Рік тому
And another interesting project, I did learn a lot of new things again, Thanks! And so cool to see the ESP01 used again, these little wonders never get the attention the deserve;)
@AndreasSpiess
@AndreasSpiess Рік тому
I agree. They do not have a lot of pins, though…
@trentbrown3714
@trentbrown3714 Рік тому
This was a great one! Thank you very much. Looks like another project I need to investigate!
@AndreasSpiess
@AndreasSpiess Рік тому
I will also try to replace TTN for my mailbox notifier…
@jayjay6804
@jayjay6804 Рік тому
Thank You! This is the same type of project I am currently designing for my renewable energy system.
@AndreasSpiess
@AndreasSpiess Рік тому
Cool. Maybe you can contribute to Timms project.
@zyghom
@zyghom Рік тому
unbelievable - I just finalized my project: "move out from WiFi to ESPnow". Similar approach (without LoRa) and observations: 1 - gateway: 1x ESP32 can do both: ESPnow and WiFi but not at the same time (no need for Serial), but: - ESPnow message sending takes < 15ms (from start modem till receive confirmation) and if 2 messages come at the same time you either do queue on gateway or discard second one - sending WiFi message from gateway to Home Assistant MQTT broker takes < 20ms - ESPnow sensor wakes up, collects data, sends message to GW: - ESP32 < 0.6s - ESP32-S2 < 0.2s much faster so less battery consumption - GW is always on, both way communication with HA - since ESPnow sensors only talk 1 way: to GW, no commands to them, so OTA on routine basis: once a day it connects to web server where new Firmware might be and if found, it will perform OTA 2- ESPnow sensors: - ESP32 - 180s hibernate (not deep sleep!), average current 4.5uA, work time: 0.6s with average 50mA, overall average consumption: 200uA - ESP32-s2- 180s hibernate (not deep sleep!), average current 22uA, work time: 0.2s with average 38mA, overall average consumption: 80uA so ESP32-S2 gives 16 months for 1000mAh battery - ESP32 "only" 5.5 months CONCLUSION: better to work fast (0.2s vs 0.6s) than sleep current (22uA vs 4.5uA) to save battery and for battery: no voltage - use MAX17048 to get real performance of the battery, i.e. from here: www.ebay.co.uk/sch/i.html?_from=R40&_trksid=p2512315.m570.l1313&_nkw=max17048&_sacat=0 EDIT: ESPnow in UNICAST re-sends data to receiver if failed and returns the real outcome (success if received and confirmed by receiver), in BROADCAST mode it only confirms "message sent" - irrespective if received (for obvious reasons: broadcast)
@emmoemminghaus6455
@emmoemminghaus6455 Рік тому
If you use HA.... wait a while.... i do a more modular verstion of my WIFINow Module... INCLUDING OTA (and othe IP stuff for convinience)
@zyghom
@zyghom Рік тому
@@emmoemminghaus6455 the "problem" is: if the ESPnow devices work for too long, the battery goes depleted fast, so I opted for "interval" OTA (once per 24h) rather than to force the device to wait for the command. But I will test also command from gateway to the sender in case OTA has been requested by HA for the specific device (command sent to gateway for specific device, and if the device sent data to gateway the order from gateway to the sender: "hey, do OTA ASAP please") - let me check how much more time it will be for the sender to stay ON. BTW HA makes it much easier than standalone MQTT broker and Node Red (I think)
@drstefankrank
@drstefankrank Рік тому
ESP Now and Wifi at the same time is theoretically possible, but I had problems with channel selection. ESP Now always did channel 1 on the sender, no matter what I tried to set. If the home wifi wasn't on 1 the receiver was on a different channel than the sender which I couldn't change. You can easily check ESP NOW with Wireshark if it sends on Channel 1 or any other. Just make sure your connected Wifi is on the channel you want to monitor.
@zyghom
@zyghom Рік тому
@@drstefankrank try this one then (on sender): #define WIFI_CHANNEL 8 WiFi.mode(WIFI_MODE_STA); esp_wifi_set_channel(WIFI_CHANNEL, WIFI_SECOND_CHAN_NONE); and you don't need wireshark to confirm - receiver (if set up on that channel as well) will tell you the same
@emmoemminghaus6455
@emmoemminghaus6455 Рік тому
@@drstefankrank If Wifi now where locked to channel 1 then it would be forbidden to use it in asia.... Only because there are a few dumb devices this does not mean that you cant use other channels. As i sad in another post here the problem is the channel the AP connection selects.
@RuiSilva-rw6vl
@RuiSilva-rw6vl Рік тому
I made a similar project a few years ago, however I just used LoRa with two different configurations, long range but slow communication and short range but fast communication (LoRa can be configured for that too). The system was later integrated into the Home Assistant. It worked very well, only the Gateway (Raspberry pi with the Home Assistant) had access to the internet and the remaining devices (sensors and actuators) communicated to gateway through LoRa communication.
@RuiSilva-rw6vl
@RuiSilva-rw6vl Рік тому
@Deon du Plooy Well the documentation is available online, but the document is in portuguese. If that's not a problem for you I can give you the link. There are more than 100 pages about the project. Beyond that, there is a library that I modified for the project, I added encryption to the communication for example. Search for "pyLora". I hope it's useful to you, but note that I don't provide support for that.
@AndreasSpiess
@AndreasSpiess Рік тому
The integration into HA can be a benefit for certain applications. I think with this project it can be done using MQTT. Or somebody writes a gateway which is integrated into HA…
@RuiSilva-rw6vl
@RuiSilva-rw6vl Рік тому
@@AndreasSpiess Right, that's what I did. I created a custom module for HA. So the Raspberry Pi served as a HA server and also as the Lora gateway. A totally independent network but the HA could be connected to the internet of course. The gateway could receive 1 message per second on fast communication and 1 message every 5 seconds on slow communication (includes ACK). The messages received directly by the HA. All communication was encrypted and confirmed with ACK messages. And it worked not only with sensors but also actuators. So it was pretty cool. The MQTT configuration would certainly be simple than this...
@Ivian1000
@Ivian1000 Рік тому
Very interesting video, I was about to try to do something similar myself for an apiary but didn't even know where to start. Thank you so much!
@AndreasSpiess
@AndreasSpiess Рік тому
You are welcome!
@gunter1626
@gunter1626 Рік тому
Very interesting project Andreas! Thank you. 2 years ago when I played with my Ebyte LoRa modules I tried to build a mesh network (those devices are cheap but can't use LoRaWAN). You set them on individual addresses and let them decide the communication paths by the dB level they measure. It worked well for a few but I assumed at that time the messages to keep the network alive might spam the airtime and didn't pursue it. This is a star network as you explained so a different idea. 👍
@AndreasSpiess
@AndreasSpiess Рік тому
You are right. Mesh network algorithms are not easy…
@hippie-io7225
@hippie-io7225 Рік тому
@@AndreasSpiess With "star" networks you can develop your own security and hierarchy. Otherwise it can become a big mesh. (sorry, couldn't resist)
@Richardincancale
@Richardincancale Рік тому
@@hippie-io7225 Yesh!
@electronics.unmessed
@electronics.unmessed Рік тому
Interesting project! Andreas, thanks for sharing your insights. This will definitely remain on my watchlist. 😀
@AndreasSpiess
@AndreasSpiess Рік тому
Glad it was helpful!
@PhG1961
@PhG1961 Рік тому
Excellent and very promising for the future !
@AndreasSpiess
@AndreasSpiess Рік тому
I agree!
@opsahle2
@opsahle2 Рік тому
Again a very interesting and as usual well-made video!
@AndreasSpiess
@AndreasSpiess Рік тому
Thank you!
@wjn777
@wjn777 Рік тому
Great find, and informative video, thanks for sharing
@AndreasSpiess
@AndreasSpiess Рік тому
You are welcome!
@sergiopagano599
@sergiopagano599 Рік тому
Very good video and interesting project. Another thing to add to the to do list is security. This is becoming a great concern for all IOT.
@sophiesmith5922
@sophiesmith5922 Рік тому
its not so bad in remote areas (its a farm) and no connection to the internet. Not a very attractive target. What info to steal? Temperature and humidity? Not much to secure here. Its good for use case scenarios
@MaxDiscere
@MaxDiscere Рік тому
what would you add in that scenario? A SSL connection at most.
@timmb2512
@timmb2512 Рік тому
As mentioned, incoming sensor data only needs to be secured in a few scenarios. When bi-directional communication is better implemented, I'll be looking into how security can be improved. Suggestions are encouraged!
@avejst
@avejst Рік тому
Great video as always 👍 Thanks for sharing your expirence with all of us:-)
@AndreasSpiess
@AndreasSpiess Рік тому
You are welcome!
@yekutielbenheshel354
@yekutielbenheshel354 Рік тому
Excellent. You really do a great job!
@AndreasSpiess
@AndreasSpiess Рік тому
It was mainly Timms work.
@yekutielbenheshel354
@yekutielbenheshel354 Рік тому
@@AndreasSpiess I think you might be a little confused about "work" versus "value" which is analogous to "features" versus "benefits." If you'd like me to explain in more detail, please let me know.
@toastrecon
@toastrecon Рік тому
Instant like! I hope you had fun on your motorcycle tour.
@AndreasSpiess
@AndreasSpiess Рік тому
Yes. It was wonderful!
@Ownedyou
@Ownedyou Рік тому
Clever! I really like ESPnow, has not occured to me to couple it with LoRa.
@AndreasSpiess
@AndreasSpiess Рік тому
I thought it is a good idea because they are complimentary.
@Atticka1
@Atticka1 Рік тому
Beautiful! Something like this integrated with the Meshtastic project would be great, they're working on MQTT integration and would also provide that command and control capability 🙂
@AndreasSpiess
@AndreasSpiess Рік тому
Meshtastic expands in the right direction. It is more an adhoc network while this one is more for standard sensor applications, I think.
@franciscotassone1027
@franciscotassone1027 Рік тому
Dear Andreas, you are a Genius !!! Thanks very much !
@AndreasSpiess
@AndreasSpiess Рік тому
You are welcome!
@alexbrown1050
@alexbrown1050 Рік тому
Nice. I wrote this for my home network but it's nowhere near as nicely engineered as yours. I went complex with platformio and esp-idf freertos though... Maybe I should swap to yours! Very well made video as always :)
@AndreasSpiess
@AndreasSpiess Рік тому
Or maybe you can contribute some of your ideas to Timms project?
@sharg0
@sharg0 Рік тому
I live in a rural area and several of my neighbours passed retirement several years ago. With at least 15 minutes for fire department or ambulance to get here I've pondered some kind of "neighbour aid" system for a while, I'll be looking into this project. (Need to cover an area of about 1x2 km and 20 houses if all are interested)
@AndreasSpiess
@AndreasSpiess Рік тому
Should be possible if you find a point for the LoRa gateway where all houses have line of sight. Or you need a combination of nodes and repeaters.
@sharg0
@sharg0 Рік тому
@@AndreasSpiess Line of sight definitely not possible, from some houses one sees nothing but forest. Up to about 300m between houses. My spontaneous thought is to use a message-ID created by the event, broadcast that for a while and also have receiving stations repeat the same. Perhaps a bit "talky" but this is after all a very important message that rarely (ideally never) gets used.
@AndreasSpiess
@AndreasSpiess Рік тому
Line of sight can include woods. But no hills. You have to test.
@timmb2512
@timmb2512 Рік тому
I think I generally agree with your "talky" idea. Send out to everyone in range. You can technically have a repeater send every packet it receives back out over broadcast, though I think this could cause feedback loops 🤔 I haven't tried... Still it would tell you if a loved one is in trouble though. Very interesting application, btw. Keep in touch!
@sharg0
@sharg0 Рік тому
@@timmb2512 My thinking is to use a message-ID to avoid feedback loops. Probably something like "house number + event type + counter/time stamp". That way a receiving unit would only re-broadcast even if it gets the same message from several units. Likely a good idea to include an "all good" message once a day or so - that way a faulty device can be noticed. Currently I'm thinking three "triggers" * Fire alarm (linked to commercial alarm, that sensing and responsibility I prefer to leave to pro's). * Urgent help needed (First aid needed until ambulance arrives) * Need aid (only triggers selected neighbours)
@temyraverdana6421
@temyraverdana6421 Рік тому
Thanks, a wonderful lesson!
@AndreasSpiess
@AndreasSpiess Рік тому
Glad you liked it!
@rickharold7884
@rickharold7884 Рік тому
Super fun! Love it. Thanks!
@AndreasSpiess
@AndreasSpiess Рік тому
You are welcome!
@ERICHOEHNINGER
@ERICHOEHNINGER Рік тому
Damn! I'm doing it (started 2 months ago). I thought how aren't people doing it.
@AndreasSpiess
@AndreasSpiess Рік тому
Now you know that you are not alone ;-)
@ranjithsss2004
@ranjithsss2004 Рік тому
Good one..clear explanation
@AndreasSpiess
@AndreasSpiess Рік тому
Thank you!
@cdevidal
@cdevidal Рік тому
I am soon building an ESPnow product for farms, so this video caught my eye :)
@AndreasSpiess
@AndreasSpiess Рік тому
Perfect! Maybe you join forces with Timm?
@cdevidal
@cdevidal Рік тому
@@AndreasSpiess He and I are going slightly different directions, and my code is mostly finished, but I might browse his code for ideas. For one, I'm using MicroPy. But I might pick through his code looking at the repeater bit.
@timmb2512
@timmb2512 Рік тому
​@@cdevidalDid they ever get ESP-NOW to work with MicroPy? I've often considered that you could make FDRS (my project) useful as an ESP-NOW modem attached to MicroPython devices via serial.
@cdevidal
@cdevidal Рік тому
@@timmb2512 Glenn20 has a patch and it’s almost ready to be merged into the mainline. Another difference between yours and mine, I’m doing bidirectional comms. That may prevent me from using repeaters, I don’t know. Can the AT mode issue ESPnow commands? I know the new ESP32 AT firmwares are quite advanced. Then you could use them as a modem.
@timmb2512
@timmb2512 Рік тому
@@cdevidal I don't think it's supported in AT mode, unless it happened recently.
@alexrossouw7702
@alexrossouw7702 Рік тому
I'm building the exact same thing (for single grow room), but using just ESP between sensor modules, relay modules, and good old wifi routers for connecting to the internet. Though mine is on a small scale, so MQTT seems like it just adds indirection. I'm using a just sensor and controller modules, no repeater gateways. It's super simple and highly configurable using a regular computer web browser for the UI
@AndreasSpiess
@AndreasSpiess Рік тому
Seems to be a good project for you needs!
@ThisRandomUsername
@ThisRandomUsername Рік тому
I think localised LoRa would work fantastic for a high-head micro-hydro projects. Typically you have some long pipe going up a hill to a tank collecting water from a small stream. That could be a few hundred metres away. To maximise the energy produced, you'd have different sized nozzles at your turbine controlled by solenoid valves letting more or less water through while maintaining the full head pressure. A liquid level sensor on a LoRa board could be used to transmit the level in the tank at the top of the hill, opening more or less valves. Joe Malovich and Land to House have the right setups to integrate this sort of sensor.
@timmb2512
@timmb2512 Рік тому
I was randomly popping in on these comments and I wanna say this is one of the coolest use-cases anyone's brought up for FDRS. If you or the folks you mentioned do something like this, please please send some info to the address in the FDRS readme. Thanks!👍
@cedricpod
@cedricpod Рік тому
you and your videos are the best
@AndreasSpiess
@AndreasSpiess Рік тому
Thank you!
@vks002
@vks002 Рік тому
Hi @Andreas , Very nice video and very nice concept. I will be watching this space as I also switched from wifi to to espnow for all my sensors. Also, to let you know , it is possible to run both espnow and WiFi Station on the same ESP at the same time. I run my setup where an ESP01 (yes, you read it right !!) acts as a gateway to receive espnow messages and relays them to a MQTT server. It has been running without issues since the last 4-5 months. Forgot to mention that the only limitation on it is that the gateway ESP (and hence the other nodes) has to be on the same channel as the WiFi SSID which is just one extra piece of code to determine the same.
@AndreasSpiess
@AndreasSpiess Рік тому
Interesting to only use an ESP-01 as a gateway. Maybe Timm has a look at your comment!
@timmb2512
@timmb2512 Рік тому
WiFi and ESP-NOW work if they are both on the same channel. If the user were to set all sensors and gateways to run on the channel that their WiFi router is on then that would work. From my perspective, this would have been too much to ask of a new user who is less knowledgeable about networking. I could imagine a lot of beginners contacting me asking why their system stopped working when their WiFi router switched channels on them. However: I'm planning to make the WiFi channel modifiable as a global soon.
@vks002
@vks002 Рік тому
@@timmb2512 I solved this issue on the sensor node by taking the SSID of the WiFi router , and scanning the same to obtain the channel. also a retry mechanism where if message delivery fails, it again scans to see if the channel has changed from last time. I also store the channel in EEPROM to avoid wasting ~2 sec in scanning every time. You can view my code in the repo here : github.com/vks007/public-projects/blob/master/include/espnowUtil.h
@timmb2512
@timmb2512 Рік тому
@@vks002 This is one of my favorite workarounds, the other way being to cycle through all of the channels and see what gets a response. However, what would happen if a sensor is separated from the gateway by a repeater? You could have every single gateway/repeater broadcast an AP, but keeping them all updated will lead to overhead that I'm just not ready for right now. I definitely won't rule it out forever, I just want to focus on other aspects of development for now. You are more than welcome to try adding your method to FDRS and reporting back/submitting a pull request.
@monastirmed
@monastirmed 11 місяців тому
Can you make a follow up video with the latest update of the project, like the controller , and maybe some node red flows to that
@AndreasSpiess
@AndreasSpiess 11 місяців тому
So far I have no such plans.
@berenlea486
@berenlea486 Рік тому
this looks like it could have a lot of potential for (other than farms) managing large plots of land or woodland like for instance having thermal and smoke sensors using small solar panels and a battery scattered around woodland to make catching fires early easier. also could be cool building one of these networks out over a town or city that tracks roughly how busy areas are and also trafic using things like millimeter wave and radar sensors all going to a central node that publishes a heat map of an area that is independent of company like google or even independent of weather people are carrying phones
@timmb2512
@timmb2512 Рік тому
Exactly! These are the kinds of applications I dreamt of while designing the system. I used to have a radar motion detector sketch included, I just need to update it and re-upload.
@Tom-ku8bu
@Tom-ku8bu Рік тому
What cool would be if you could have different recievers. So that you could communicate similar how internet works over different range extenders to the board that needs the information. But that's probably difficult to put into practice. Would probably need to know the localization of the recievers to connect over the most efficient way to them. Maybe could test always when a new sensor adds to the network testing the shortest connection to it like counting how many range extenders it has taken to reach the destination. The strength of the signal could also be clue but probably is not needed. But when the sensor is a moving target it's different locations all the time
@ronm6585
@ronm6585 Рік тому
Thank you.
@AndreasSpiess
@AndreasSpiess Рік тому
You are welcome!
@lb-sb3jl
@lb-sb3jl Рік тому
Wow, what a great tool :) The test setup runs smoothly so far. For a productive environment, it would be important that MQTT-credentials can be defined. Is this in the backlog?
@timmb2512
@timmb2512 Рік тому
Thanks! Glad to hear! This was recently implemented. In fdrs_config.h: #define MQTT_USER #define MQTT_PASS You can also edit them in the globals file.
@lb-sb3jl
@lb-sb3jl Рік тому
@@timmb2512 Perfect 👍Thank you very much! FDRS + Mosquitto (MQTT broker) + Home Assistant (Dashboard & Logic) is a real dream team 😊 Looking forward to an update regarding commands / controllers & to have another accompanying video would be great 😉
@Science1144
@Science1144 Рік тому
What a great invention! I was wondering, can mqtt data from the gateway be sent with auto discovery format for home assistant?
@AndreasSpiess
@AndreasSpiess Рік тому
You have to ask the creator. However, auto discovery is only a nice feature. You easily can add any MQTT signal to HA.
@KrzysztofStrug
@KrzysztofStrug Рік тому
Great video! 73! 🙂
@AndreasSpiess
@AndreasSpiess Рік тому
Thank you!
@dennyfox3139
@dennyfox3139 Рік тому
Very cool!
@AndreasSpiess
@AndreasSpiess Рік тому
I agree!
@dtuando
@dtuando Рік тому
Very nice I wish I would have seen this before I designed this system in micropython.
@AndreasSpiess
@AndreasSpiess Рік тому
I am sure you learned a lot!
@HamzaHajeir
@HamzaHajeir Рік тому
It's nice and solves problems, but limited to highly static building of the library by defines (No dynamic configuration of any). However if that's not a real case, it's not needed.
@AndreasSpiess
@AndreasSpiess Рік тому
Maybe you add your knowledge to improve it?
@peterwooldridge7285
@peterwooldridge7285 Рік тому
Good one
@AndreasSpiess
@AndreasSpiess Рік тому
Thank you!
@vks002
@vks002 Рік тому
Hi @Andeas one more comment about the range of espnow Vs WiFi. I think practically it is not right to say that they both are the same. I know they operate on the same freq but then the connection process for both of them is vastly different due to which the range gets affected. To give an example, I have one ESP gateway for my espnow sensors placed on the first floor and all sensors from my roof (at G+2 level) to ground floor can easily reach it. The total time it takes for a sensor to wake up, do its thing and transmit is barely 80ms. Comparing this to a WiFi connection - even if there is weak signal present , it can never make a connection and hence considered out of range. So in my experience espnow has an excellent range as compared to WiFi.
@AndreasSpiess
@AndreasSpiess Рік тому
Thank you for sharing your experience. I will have to do some tests.
@alnaumi
@alnaumi Рік тому
Hi Andreas. Excellent video... Do you think it would be possible unify sensor values on gateway and send it to TTN gateway?
@AndreasSpiess
@AndreasSpiess Рік тому
Why not? Maybe you can add a new Transport like Serial.
@timmb2512
@timmb2512 Рік тому
I've thought about this, but I don't have a TTN gateway nearby to test things with. If I did, this project may not exist 😁
@davidmcclintock1955
@davidmcclintock1955 Рік тому
Great video! Indeed a diamond of a topic! Question: The esp-now protocol provides a callback function -- esp_now_register_send_cb() -- which returns an ACK. Can you opine on what that ACK can possibly tell the sending device and what it does NOT tell the sending device? Best.
@AndreasSpiess
@AndreasSpiess Рік тому
Maybe Timm can answer this question. I would create an issue in his project.
@wei48221
@wei48221 Рік тому
Awesome!!
@AndreasSpiess
@AndreasSpiess Рік тому
Thank you!
@kzstmla
@kzstmla Рік тому
Very very usefull, but as you mentioned adding support to send commands to eg. run actuator, and msg recieved confirmation would complete this wounder full idea. We all should contribute in completing this project.
@zyghom
@zyghom Рік тому
as I explained in the above comment, ESPnow in unicast configuration gets the "message received" confirmation and you can check it on callback_on_sent function. Problem is with broadcast only. Btw the question is what to do with the "sent failed": repeat instead of going to sleep or go to sleep and try the next time - the answer probably depends what is more important: regular temperature/humidity update (then repeat) or "let me see the values next time" so go to sleep
@kzstmla
@kzstmla Рік тому
@@zyghom sure, It woul be more important in sending commands, where you want to know if some engine or light or something is switched or not. But there comes question of waking up from sleep.
@zyghom
@zyghom Рік тому
@@kzstmla for critical situations like this, forget sleeping then. The "only" ways to wake up ESP32 are: timer or gpio, right? So when it sleeps you cannot do much unless you can "touch it" this way or another or wait for the timer to expire. But then how to touch it if it is remote? Another receiver? That is too much I think. Light sleep? Hmm, still in mA so not much of battery saving. Just thinking loudly but if you find a way let us know ;-)
@kzstmla
@kzstmla Рік тому
@@zyghom I am not sure how good solution is timing, as i doubt its precision, unless you have some wide time slot when you expect something and then to sync times every time something happens
@zyghom
@zyghom Рік тому
@@kzstmla I got lost: which timing you are talking about?
@AndyPayne42
@AndyPayne42 Рік тому
You can have wifi and espnow running at the same time. I do this in a esp32 motion detector talking to a esp32 light switch which is connected to the router as well.
@AndreasSpiess
@AndreasSpiess Рік тому
Thank you. Maybe Timm has a look if he can live with the restriction of using the same channel.
@AndreasSpiess
@AndreasSpiess Рік тому
Thank you. Maybe Timm has a look if he can live with the restriction of using the same channel.
@Glider7303
@Glider7303 Рік тому
Very interesting approach would like to find out if the data buffers would work for the the following. If you were to connect a GPS to a UART is there enough space to program it with the ability to parse the data and transmit only selected data i.e. position data? Would be nice for my hobby of flying model airplanes where sometimes things don't always work out as planned and you can spend days looking for them in the woods. Thanks
@timmb2512
@timmb2512 Рік тому
There's a GPS sketch that was recently added to the Sensors folder of the repo. I'd like to get into model aircraft one day. The UKposts channel "rctestflight" has always been one of my faves and he sort of inspired me to take this project public.
@timmb2512
@timmb2512 Рік тому
Using FDRS for an itsy bitsy black box would be pretty cool. The trick would be to conserve battery once a crash has occurred. Find the location once and save it, then transmit it at intervals without reconnecting to the satellite. Perhaps even better to have the GPS run all the time off of the motor battery, but feed location into the "black box" which has its own transmitter battery as a failsafe. Model rocketeers may be into this general idea too!
@Glider7303
@Glider7303 Рік тому
@@timmb2512 I've been flying them for many years. I need to begin with testing since most of my planes use Lipo batteries would need to see if power from a 5V UBEC/SBEC connected to the on-board battery is clean enough to operate the ESP32. Next would be RF testing since both the RC receiver and the Lora device operate in the 2.4 ghz range. Hope to get started testing soon still putting stuff away from field day (last weekend) I'm into Ham radio too.
@peterkuemmerli7695
@peterkuemmerli7695 Рік тому
Hello Mr Spiess many thanks for info and advises. Actually i am in direct contact with Timm Bogner, he has quite a lot of experience with different hardware. Also his software repository is now capable to do bi-directional communication between nodes. I ordered new hardware and will do some additional tests soon. Best regards and a good time wishes Peter
@AndreasSpiess
@AndreasSpiess Рік тому
Cool. So I can start the remodeling of my mailbox sensor. I waited for the bi-directional feature...
@peterkuemmerli7695
@peterkuemmerli7695 Рік тому
@@AndreasSpiess Yes, according Timm, the job is done, the new code uploaded to the github repository and he was already testing the latest solution. I am looking forward to do the tests with my new hardware, perhaps next week. Please let us know about the success of your postbox application for (walking) lazy developers ;-)
@alexdrinkwater28
@alexdrinkwater28 Рік тому
I have a use case I am working on where I need to report sensor values along a river 5 miles. One sensor each mile. I think I needed to use a mesh network for the farthest node to connect to the gateway. Do you know if the repeater can also send its own sensor data with this approach?
@timmb2512
@timmb2512 Рік тому
At the moment, there isn't a way to have gateways report their own sensor readings. I would recommend linking the gateways via LoRa and using ESP-NOW to communicate between the gateway and a nearby sensor. You just gave me a great idea though: I'm going to add serial as an output option for the sensor sketch, then it could be hard-wired to a gateway, thus eliminating the ESP-NOW jump between sensor and gateway.
@quallyratchetman
@quallyratchetman Рік тому
In the examples at 9:40 & 9:50 where ESPnow is not being used, am I correct in assuming that just a LoRa32 board alone could be used as the gateway that bridges between LoRa and MQTT?
@timmb2512
@timmb2512 Рік тому
Yep! If you aren't planning to use ESP-NOW, you can use LoRa and MQTT together. I haven't done this yet, tbh, so I'd love to hear how it goes.
@quallyratchetman
@quallyratchetman Рік тому
​@@timmb2512 I can confirm that it works perfectly with just the single LoRa32 board if ESPnow is not being used. The only little problem I ran into was that my MQTT broker needed a username and password. I added them into both the global and local definitions. I read you are considering using something like WiFiManager to manage WiFi credentials instead of hard coding them. MQTT Username and password might be another couple variables that could be managed in the same way.
@peterkuemmerli7695
@peterkuemmerli7695 Рік тому
Dear Mr Spiess, great video again. Nice tutorial, i was testing it with my LoRa GPS Modules, time keeping works great so far ! For sensor gate detection, i do some tests with radar sensors, many thanks for those tutorials too! As you mentioned it, there are two restrictions in this kind of sensor-network: no bi-directional communication with commands and no acknowledgement of the correct delivery of a data package. The time gates have also the task to communicate with the competitors , when the can start the run. Do You have any hints or ideas, about to solve this ? Many thanks and best regards, Peter
@AndreasSpiess
@AndreasSpiess Рік тому
I hope that Timm will introduce the backchannel and the acknowledgements. AFAIK he already works on it. Maybe you check the project from time-to-time. Concerning your question: I do not understand what communication and which competitors you mean.
@TheovanderKrogt
@TheovanderKrogt Рік тому
Impressive! I wonder if it is possible to use esp-now directly on a sonoff basic.
@AndreasSpiess
@AndreasSpiess Рік тому
Why not?
@inlywang8157
@inlywang8157 Рік тому
Good video
@AndreasSpiess
@AndreasSpiess Рік тому
Thanks!
@gsge
@gsge Рік тому
Nice video again with nice framework for low power network. Can you please provide some power profile data for sensor node device? I do not have Nordic power profiler which you have. Thank you.
@AndreasSpiess
@AndreasSpiess Рік тому
I made some videos about LoRa and ESP nodes.
@marcobuzzanca
@marcobuzzanca Рік тому
Nice, I developed a very similar comunication protocol for a Wide area sensor network base don LoRa only. I’m using an apikey to discard all the messages not generated from my network’s node. How do you manage this problem? Do you encript your data? Your videos are always inspiring. Thanks
@AndreasSpiess
@AndreasSpiess Рік тому
Maybe Timm can give you an answer?
@timmb2512
@timmb2512 Рік тому
No encryption is used. I created a 5-byte header for LoRa packets in which the first 3 bytes of the LoRa packet contain the recipient's address, and the next two are the sender's address. The device only responds to packets that start with its own address.
@crew8469
@crew8469 Рік тому
Andreas, I am interested in capturing LoRa packets. Specifically, I am interested in trying to merge the existing LoraTap code in Wireshark into the radiotap code which already has mechanisms to handle pretty much all the info that can be captured from LoRa phys and chips. That will involve a capture tool that can generate the correct radiotap header etc. Do you have any recommendations on which LoRa environments I should purchase to get started on this?
@AndreasSpiess
@AndreasSpiess Рік тому
I do not know these products. So I have no idea :-(
@keeper1855
@keeper1855 Рік тому
Grate project and great idea.How to send analog data from place where is no wifi by Lora ebyte UART E22 or E32 series to esp 8266 or esp32 to manual switch relays on and off?
@AndreasSpiess
@AndreasSpiess Рік тому
You have to figure this out yourself. I do not know :-(
@keeper1855
@keeper1855 Рік тому
@@AndreasSpiess Thanks for help;(
@SarahKchannel
@SarahKchannel Рік тому
I am doing the same, but with nRf24 in mesh config... with MQTT gateway from nRF to Wifi. nRF mesh is pretty cool, since it 'configures' it self when nodes come and go or move around.
@AndreasSpiess
@AndreasSpiess Рік тому
Cool project! I found that the NRFs were pretty limited compared to todays possibilities. Meshes are very easy for the application. However not easy to make them stable and keep the overhead under control. Good you were able to get these things solved.
@SarahKchannel
@SarahKchannel Рік тому
@@AndreasSpiess Not sure, I found the capability not less than what an MQTT end client / server would require. You need to plan a bit more structured when it comes to the protocol, or data exchange over nRF. I am packing my data into a struct{x,y,z} and have the nRF handle the transmission. A bit of timeout/retry handling vs. node reboots and it becomes a nearly self healing system. ESPnow I never tried, but rather stick to a MQTT layer on a ESP.
@AndreasSpiess
@AndreasSpiess Рік тому
@@SarahKchannel If you are sure you stay below the 32 bytes or so, you are right. I also used structs for this purpose.
@err2006
@err2006 Рік тому
Thank you very much for your video. Just have a couple questions, Gateway(4) can be either ESP8266, ESP32 or LoRa? and also in your example Gateway(4) communicates to Gateway(5)/ESP01 via a serial connection and from the ESP01 to the router via WIFI? thank you!
@AndreasSpiess
@AndreasSpiess Рік тому
You first decide on the communication protocol. If it is LoRa you need a board with such a module on both sides. They only come with the ESP32. If you use Serial, ESP-Now, or MQTT you can use any ESP32 or ESP8266 with the limitation that the ESP8266 only has one Serial port.
@err2006
@err2006 Рік тому
@@AndreasSpiess Sir, Thank you VERY much for your explanation!
@3rd_Millennium_Engineering
@3rd_Millennium_Engineering Рік тому
I hope my question does not sound too stupid: I'm finally back from sea (working as a merchant mariner) and trying to better understand this whole concept. Everytime I leave, I miss so much and forget a lot. I am trying to come up with a way to transmit sensor data in real time from an amateur (hobby) rocket to a ground station. I'd like to be able to receive sensor data from altimeter(s), GPS, temperature, camera video (possibly), etc. So, I am wondering if this application could fill the bill. ANd, I suppose this is at the 2.4 gHz area. Am I right?
@AndreasSpiess
@AndreasSpiess Рік тому
I do not know the distance and if ESPnow would work. You have to test. ESPnow of course is faster and easier than LoRa. If the distance is too big, LoRa is the way to go. Start with SF7 which is the fastest mode. That should work in any case. You only need a sensor (which you have to program) and a gateway (either one or two modules) as described in the video
@pedrobravo6972
@pedrobravo6972 Рік тому
Hi Andreas, I don't understand how you can configure the same gateway to interpret LoRa messages and also ESP_NOW. Please, could you give me a hint with that?
@AndreasSpiess
@AndreasSpiess Рік тому
Maybe you ask on the project Github page. There you should get help. I do not know all details :-(
@eddybash1342
@eddybash1342 Рік тому
Hi Andreas, Did you ever use the W-MBUS in your projects ?
@AndreasSpiess
@AndreasSpiess Рік тому
No.
@remy44444
@remy44444 Рік тому
I think the better solution will be a ZigBee network sensors are production level and not DIY, Routers can be powered externally with solar panels. And all sensors would use the same protocol. It will be more costly but with less caviets.
@AndreasSpiess
@AndreasSpiess Рік тому
Zigbee is a very good protocol. However I do not know how to build my own sensors for the moment. And Zigbee has a very limited range similar to BLE. LoRa has a very big range.
@remy44444
@remy44444 Рік тому
@@AndreasSpiess You don't have to build your own sensors that's the whole idea :) 💡 However for ranging issue ZigBee routers costs about 6$ each + another 13$ for solar and 5v converters and since they work as mesh you can put as many as needed, and message guarantee to arrive ( or at least you can watch network health ).
@drstefankrank
@drstefankrank Рік тому
I like to see more of ESP NOW and its limitations. It says max peers is 20, but is that only for the sender to send to max 20 devices or does it also affect a receiver which wants to get data from more than 20 devices? I only have to add a peer to the sender. Documentation is sparse on this. Also encryption limits that even further and example code is even less available.
@timmb2512
@timmb2512 Рік тому
Documentation is definitely a little hazy regarding ESP-NOW peers. The 20 device limit isn't relevant in the way that FDRS uses ESP-NOW.
@LucianoKoenigkan
@LucianoKoenigkan Рік тому
Valeu!
@AndreasSpiess
@AndreasSpiess Рік тому
Thank you for your support!
@ozairakhtarcom
@ozairakhtarcom Рік тому
Hi Andreas, how can we make use use of old WIFI antennas to detect radio signals and track them on our 💻?
@tarakivu8861
@tarakivu8861 Рік тому
I mean.. you kinda can only detect Wifi very well with an Wifi Antenna. And what kind of tracking? There are different kinds. Location, direction, just if its there, what its sending..
@AndreasSpiess
@AndreasSpiess Рік тому
You connect the antenna to a receiver as always.
@kmkessler
@kmkessler Рік тому
You can use both ESPNOW and WiFi at the same time. I use it in my ESPNOW weather station. The trick is both the WiFi and ESPNOW must use the same channel, and when my AP restarts, it just picks a random channel, so when my ESPNOW to WiFi gateway reconnects to WiFi, it is no longer listening on the same channel as the weather station is transmitting on. My solution is to have the gateway broadcast an SSID (which contains the channel info), and every 1/2 the weather station looks for that SSID, and sets the channel to what the gateway is currently using. I could have just hard coded my channel in the AP, gateway and weather station, but I like to avoid hard coding configurations like that.
@AndreasSpiess
@AndreasSpiess Рік тому
Thank you for the info! I new that there are some restrictions. So it is probably easier to spend an ESP-01 to avoid any hassle….
@slimhazard
@slimhazard Рік тому
Do the ESPs use less power than for WiFi while they‘re running LoRa and/or ESPnow? I had the impression that the high power consumption for WiFi comes not only from the use of the radio (which is presumably no different for the other protocols), but also from what‘s required for WiFi communication - some messages that have to be exchanged with the AP, and a bit of waiting. If LoRa or ESPnow are simpler protocols (I have no idea if they are), then there could be less power consumption and longer battery life.
@zyghom
@zyghom Рік тому
the maximum current I measured for WiFi vs ESPnow is not that different, but the overall consumption comes from the time when radio is ON. For ESPnow you can get into the range of 15ms - there is no way to get even connected to the AP (WiFi) in such short time - my best time for AP connection was around 100ms (and not always of course as it depends what happens on AP at the time you try to connect) - with WiFi sensors I was never below 1s total time (measure, connect, send, go to sleep) while on ESPnow, including measuring temp/hum/light I can get into 200ms (with ESP32-S2)
@slimhazard
@slimhazard Рік тому
@@zyghom that‘s impressive. Reduce the time spent using high power to 20%, and you can run devices like these from a coin cell battery that only needs to be replaced a few times in a year.
@zyghom
@zyghom Рік тому
@@slimhazard "the only" problem is: I am not sure how to make ESP32 even start on the coin cell ;-) I am using 1000mAh LiPo for indoor if the device is not connected to the power (with ESPnow it should last for 1y - still 11.5 months to make sure it is true) and less capacity for the outdoor sensors that have solar panels. Nowadays in southern England the charging start at around 4:30am (and sun finishes after 9pm) so battery is full again within 1h but during the winter it wasn't so easy ;-) (but last winter my sensors were "old versions = WiFi" so they did not consume so little like today - we will see next winter)
@AndreasSpiess
@AndreasSpiess Рік тому
If you need low power sensors I would use LoRa and a simple Atmega processor also shown on the channel. Gateways have to be connected to the grid or solar because they are always on.
@dermews
@dermews Рік тому
Do I understand correctly that it is not possible to send a switching command to a remote microcontroller over LoRa. Why is that?
@AndreasSpiess
@AndreasSpiess Рік тому
AFAIK it is now implemented.
@GuilhermeGomes2
@GuilhermeGomes2 5 місяців тому
Can I use ESP-NOW to listen "non-stop"? I want to control it via alexa. So I am looking to have it working as a receiver.
@AndreasSpiess
@AndreasSpiess 5 місяців тому
The ESPnow connection should be on as long as both devices are powered.
@grahamheath3799
@grahamheath3799 Рік тому
interesting great potential
@AndreasSpiess
@AndreasSpiess Рік тому
I agree!
@Realcryptotalk
@Realcryptotalk Рік тому
Sir can we create a similar network and send not just sensor data but low size images with espnow or some other method without wifi ? Maybe I am getting too ambitious ?
@AndreasSpiess
@AndreasSpiess Рік тому
With ESP-Now you should have some capacity. You just have to chop the picture and re-assemble it at the receiver.
@jesusmedina5593
@jesusmedina5593 Рік тому
Hi Andreas, i love your videos, i have learned a lot watching them. I need your help. I have tried to use an EPS32 to control the start and stop of an AC motor, with a MOC3041 and a TRIAC BT13, but the ESP32 is resets itself just when the motor is started or stopped. In the circuit I'm also using a load cell and an oled 0.91" display. Could you please give me an idea of why the ESP32 is resets itelf. Could I sent you the circuit via e-mail?
@AndreasSpiess
@AndreasSpiess Рік тому
It usually has to do with an unstable power supply.
@chuchinmc
@chuchinmc Рік тому
@@AndreasSpiess thank hoy forma your time. I"ll check it. I've been powering the esp32 with my laptop's usb 3.0 port.
@AndreasSpiess
@AndreasSpiess Рік тому
@@chuchinmc Motors can create a lot of noise on power lines…
@jesusmedina5593
@jesusmedina5593 Рік тому
@@AndreasSpiess Hi Andreas. I have found the solution. I've made the the same circuit, but working with a PIC18F26k22. The Oled display didn't work on the PIC without pull-up resistors on SCL and SDA pins, so i had to use them to make it work. On the ESP32, the oled display worked fine without these resistors and even people on the tutorials I've had seen, doesn't use them. So, i put the pull-up resistors on the ESP32 oled display circuit and ¡magic happened!, now ESP32 works excellent, it doesn't reset anymore when starting or stopping the AC motor. Thank you for your time and thanks for your videos.
@toddmarshall7573
@toddmarshall7573 Рік тому
You're on the right track. Now rediscover UWB and ATM and bingo...you're there...and even way beyond there.
@AndreasSpiess
@AndreasSpiess Рік тому
What is ATM (other than a money machine)?
@monastirmed
@monastirmed Рік тому
Great job , I succeed to build a couple of Sensor but i can't use the data because I can't split the json format with node red , any one help me to do it ? Thanks
@AndreasSpiess
@AndreasSpiess Рік тому
Just google. You only have to set a tick mark...
@jjjajajayo
@jjjajajayo Рік тому
I tried to use Espnow but the signal was very poor. Only for couple meters. Does anybody know how to fix this?
@AndreasSpiess
@AndreasSpiess Рік тому
Strange. It should be similar to WiFi.
@LevyCarneiro
@LevyCarneiro Рік тому
Why use ESPNow for this farmer scenario given that LoRa can do short range too? Thanks!
@AndreasSpiess
@AndreasSpiess Рік тому
Because it is cheaper (already built-in in the ESPs)
@LevyCarneiro
@LevyCarneiro Рік тому
@@AndreasSpiess ah that makes sense. Thanks Andreas!
@cristobalmoya3877
@cristobalmoya3877 Рік тому
With your examples I cannot connect esp8266 as mqtt_gateway with another esp8266 as UART_gateway. Is there anything to change in the code? Very good work, I give you my D's
@AndreasSpiess
@AndreasSpiess Рік тому
Maybe you create an issue on the project page? I am sure you will get help there.
@NicksStuff
@NicksStuff 3 місяці тому
2:10 I don't remember if you've tested the range in a video. But I've seen others reach 500m easily with ESP-Now in LR mode. I don't get why he is using two solutions, did he need the higher bandwidth of ESP-Now? Or could he use LoRa for all sensors, simplifying things?
@AndreasSpiess
@AndreasSpiess 3 місяці тому
LoRa has many km of range. ESP-Now is WiFi with a very limited range.
@NicksStuff
@NicksStuff 3 місяці тому
@@AndreasSpiess I know but why doesn't he use LoRa exclusively? That would seem simpler and easier to maintain
@AndreasSpiess
@AndreasSpiess 3 місяці тому
@@NicksStuff because ESP-now can be used with cheaper boards
@RahulSiyanwal
@RahulSiyanwal Рік тому
8:44 ESP-Now and WiFi can work on the same board. They have to be on the same channel. It's easy to configure a channel on an ESP device but configuring a WiFi channel depends upon Admin access. I have used ESP Soft-AP as a WiFi and set the ESP-Now and WiFi channel. It works flawlessly. If you are going to use a WiFi connected to the internet, even being on the same channel it is possible that packets get lost. I will try to fix this issue, if it works I'll tell you.
@AndreasSpiess
@AndreasSpiess Рік тому
Thank you for your info. So I will keep it simple with my ESP-01 to avoid this limitation…
@mortenmoulder
@mortenmoulder Рік тому
I use one node as gateway, that also does WiFi. I have a D1 Mini Pro in my mailbox, which sends the ESP-NOW message to my gateway. When my gateway has received a message, it will restart the ESP, connect to WiFi, send MQTT message, reboot the ESP, and go back into ESP-NOW gateway state. Whole process takes ~3 seconds.
@AndreasSpiess
@AndreasSpiess Рік тому
Good project! You just have to be sure than no other message arrives during the downtime…
@mortenmoulder
@mortenmoulder Рік тому
@@AndreasSpiess Only got 1 slave and 1 master, so no worries. Not the best for reusability, but it's ok
@maxdido6226
@maxdido6226 Рік тому
Great video, as usual. I am a heavy user of ESP-NOW, as compared to standard WiFi+MQTT it saves a lot of battery time, 0.5s vs 5s wake-up to sleep time, in my case. The ESP-receiver and MQTT gateway are on a power supply, of course. It does not seem popular, who knows why… I can confirm that a single ESP mcu cannot work on both ESP-NOW and WiFi networks, or at least I could not manage to do so. 😅
@AndreasSpiess
@AndreasSpiess Рік тому
It seems it is possible, but only on one channel (see other comments). This is why I will not do it.
@Ecusfug
@Ecusfug 9 місяців тому
hey how about Swarm technologies?sounds cool to me..
@AndreasSpiess
@AndreasSpiess 9 місяців тому
Maybe too big for a maker like me...
@bluedeath996
@bluedeath996 Рік тому
What is the failover method? If an ESP or lora goes down what takes over?
@zyghom
@zyghom Рік тому
I have built in my project the logic: "if X number of consecutive messages are not sent, switch to WiFi, send the message to HA: "EMERGENCY, PLEASE ACT FAST"" ;-) But Andreas was showing similar methods on his channel: "redundancy for the redundancy" if I am not mistaken
@AndreasSpiess
@AndreasSpiess Рік тому
There is no failover for the moment. LoRa and ESP-NOW cannot be used for that. Too different
@p1366
@p1366 Рік тому
Thanks for another interesting video Andreas. I used the MySensors project to do this job. It was based on the NRF24 for short range (2.4GHz) and also can do LoRa with the RF95 type boards at both 433 MHz and 868/915MHz. One advantage of MySensors is that is is a tree network (relays) and it can do actuator commands etc. I like ESP-Now but I reckon BLE is actually better as most smartphones are equipped for BLE these days so they can be included in the sensor network as well as a sensor and/or a controller if you feel like creating an android app for it! Patrick
@AndreasSpiess
@AndreasSpiess Рік тому
I like BLE too. But for me it is still quite complex and I do not understand most of it. ESP-Now is easier for me...
@LucianoPicchioni
@LucianoPicchioni Рік тому
Congratulations on your videos always well made and very well explained. A few years ago I made a lorawan network with a gateway on raspberry, it always worked well, but with the upgrade to v3 I had several problems. I was thinking of switching to a local Lora network, reusing the old sensors based on Arduino Micro AT328 and Wemos D1 (ESP8266) boards with RFM95 Your video may have helped me migrate from Lorawan to Lora / ESPnow, recreating a local network and sending data to raspberry + node.red
@AndreasSpiess
@AndreasSpiess Рік тому
That is also my plan for my mailbox sensor. Particularly if Timm adds a confirmation.
@yorks_atheist3069
@yorks_atheist3069 Рік тому
hanks I'm working on some espnow blind motors as needs to be battery powered WIFI is to power hungry
@AndreasSpiess
@AndreasSpiess Рік тому
I am not sure if ESPnow solves your problem because the ESP32 consumes quite some power if it is always on...
@emmoemminghaus6455
@emmoemminghaus6455 Рік тому
@Andreas: ESPNow and Wifi run togeather... To be exact ESPNow simple usese Wifi "manufacturer message" packets. The only problem i discovered so far is the Wifi Channel must be the same for Wifi and ESP Now receive (Channel of Wifi AP rules here).
@zyghom
@zyghom Рік тому
you are right: channels must be the same (which should not be a problem - you control your AP). But I am not sure if you can do 2 things at the same EXACT time: talk/listen to ESPnow and talk/listen to WiFi - probably not. So when WiFi is on AND in use (send/receive message) then ESPnow incoming message probably is lost (I did not check it thoroughly yet but my observation shows this)
@AndreasSpiess
@AndreasSpiess Рік тому
Maybe somebody takes care of that part of the project and writes an integrated gateway. For the moment the addition of an ESP-01 is cheap and it worked…
@emmoemminghaus6455
@emmoemminghaus6455 Рік тому
@@zyghom There is no Problem listening or sending both (except the Channels i mention). ESP now _IS_ Wifi, but w/o the need for a managing AP
@zyghom
@zyghom Рік тому
@@emmoemminghaus6455 that is what I just said ;-) But can 1 radio talk to 2 devices at the SAME time? (sensor sends data over ESPnow and Gateway sends data to MQTT server at the same millisecond)
@timmb2512
@timmb2512 Рік тому
This is the precise issue. All devices need to be on the same channel, but the MQTT gateway changes channels to match the WiFi router it is paired with. Trying to match every device in the system to the channel that the first one is using would add too much complexity and overhead. Eventually I may add an option to choose what channel everything runs on as you are flashing the devices, but I haven't had a chance to test that.
@sebakiller9736
@sebakiller9736 Рік тому
Cool and very usefull, and i will this idea Test for my bee hive Project. Du you have an idee to use modbus ?
@AndreasSpiess
@AndreasSpiess Рік тому
I think you can extend the architecture to modbus (similar to Serial)
@laidbackobs
@laidbackobs Рік тому
Great video and an exciting project. I was wondering if Andreas or others could provide a hand. I've recently made a weather station project consisting of an IR, light sensor, and ESP32 MCU to monitor sky conditions, especially skies impacted by light pollution, a type of Sky Quality Meter. The plan is to place this several of these SQM sensors to monitor the sky quality in our local, national park and measure the developing light pollution, which you may already know impacts flora and fauna. That way, factual data can be recorded and presented to the local authorities to take action. As you can imagine, the sensors are needed to be placed in remote areas in different places where Wifi is not available, and Lora seems to provide that solution. Any help or ideas is highly appreciated. 😊
@timmb2512
@timmb2512 Рік тому
LoRa sounds perfect!
@AndreasSpiess
@AndreasSpiess Рік тому
Just select the sensor you need an create the sketch to read it. The rest is using the LoRa example of this library.
@gg-gn3re
@gg-gn3re Рік тому
So basically EnigmaIOT but no encryption?
@AndreasSpiess
@AndreasSpiess Рік тому
I am not sure. EnigmaIOT only uses ESP-NOW and its focus is encryption.
@minhajsixbyte
@minhajsixbyte Рік тому
why is this video unlisted :(
@killymxi
@killymxi Рік тому
Now, how long will it take for 1 byte addressing to become a bottleneck?
@zyghom
@zyghom Рік тому
ESPnow is limited, so 255 devices is more it can handle ;-)
@killymxi
@killymxi Рік тому
@@zyghom limited by the number of devices immediately connected to a single gateway? End-to-end numbering will still put a hard limit on the size of the network regardless of the number of gateways.
@zyghom
@zyghom Рік тому
@@killymxi From Espressif pdf: "10 encrypted peers at the most are supported in Station mode; 6 at the most in SoftAP or SoftAP + Station mode. Multiple unencrypted peers are supported, however, their total number should be less than 20, including encrypted peers" - I think they talk about "paired" devices. Btw I went through the code Andreas linked - the "addressing" part is kinda strange - you actually don't have to address the peers - simply add 1 more field in the sent data: "sender's name" or so. And you (the receiver) always know the MAC of the sender - this info is part of the ESPnow message exchange so even the MAC of the sender is not needed to know. Btw receiver does not have to know anything about the sender - it is only a sender who must know whom to send to (unicast) or in case of broadcast... 0xFF all bytes. In my project I simply set up the MAC of the receiver to be fixed address and then all senders (sensors) send the messages to the same MAC - receiver is not aware in advance how many will talk to it: "message comes - thank you - let me send it to HA and using discovery messages on MQTT create the entities"
@AndreasSpiess
@AndreasSpiess Рік тому
Maybe Timm know the answer? I assume it is big enough for typical maker projects.
@timmb2512
@timmb2512 Рік тому
Yep, that's an acknowledged point-of-limitation. There really isn't much stopping that from being extended, however. When someone sends me their project with >128 gateways, I'll look into using a second byte :D
@peterdeacon4628
@peterdeacon4628 Рік тому
Hi Andreas and fans, I need help, my wife is hard of hearing mainly in the low frequencies l am having problems with my damaged vocal chords and my voice is husky. She is unable to use a hearing aid because of a nasal problem. My idea is to raise the frequency of my voice frequency and volume level, while talking or change the acoustics somehow. I am 83 and my wife is 91.
@AndreasSpiess
@AndreasSpiess Рік тому
Maybe you can use the audio toolbox presented a few videos back? I did not check if it provides such a function.
@JamesMyatt1
@JamesMyatt1 Рік тому
They should talk to the MySensors people. There's at least 75% overlap.
@AndreasSpiess
@AndreasSpiess Рік тому
Others mentioned also MySensors. I never used it.
@a-klashinkov-4755
@a-klashinkov-4755 Рік тому
hi andreas is there an email where i can contact you? its a project im working on and i need assistance, im currently in high school and its a bit difficult to understand some of the videos explaining radio frequencies and electromagnetic fields etc. i was wondering if you have an email because your videos are the easiest to understand , ty
@AndreasSpiess
@AndreasSpiess Рік тому
I share my knowledge in my videos and unfortunately, do not have time for consulting :-(
@a-klashinkov-4755
@a-klashinkov-4755 Рік тому
@@AndreasSpiess its ok i didnt want to bother you if you are busy , thank you very much for responding
@brad3378
@brad3378 Рік тому
Look up amateur radio videos on the W4EEY channel. He has classes for beginners thru advanced in an environment that encourages students to ask questions.
Which LoRaWAN Gateway Is Best For Me (Comparison)? Part 1
16:31
Andreas Spiess
Переглядів 37 тис.
Rutgers University Confirmed: Meshtastic and LoRa are dangerous
13:27
Andreas Spiess
Переглядів 718 тис.
Повістки у Києві: «Яке право вони мають забирати всіх мужиків?» #війна #мобілізація #військові
00:41
Слідство.Інфо | Розслідування, репортажі, викриття
Переглядів 1,4 млн
02 - Introduction to Python
22:00
Suchi IT Solutions
Переглядів 12
What is RS232 and What is it Used for?
5:42
RealPars
Переглядів 597 тис.
ESP-Now Range Test: Real-World Results for ESP32 Devices!
8:01
atomic14
Переглядів 101 тис.
021 New and Cheap APRS using LoRa Technology
13:31
HB9BLA Wireless
Переглядів 51 тис.
How does NB-IOT and CAT-M1 / LTE-M compare to LoRaWAN (Tutorial)?
21:58
Andreas Spiess
Переглядів 56 тис.
#354 Tasmota vs ESPhome: Who wins? (DIY Sensors, ESP32, Deep-Sleep, etc.)
24:03
It’s Been a Good Run, Phone Providers.
26:31
Data Slayer
Переглядів 3,6 млн
ESPNOW for beginners! #ESP32 #ESP8266
35:09
Programming Electronics Academy
Переглядів 117 тис.
Не Бери INFINIX NOTE 40 и NOTE 40 Pro, Не Посмотрев Это Видео!
28:34
РасПаковка ДваПаковка
Переглядів 68 тис.
Клавиатура vs геймпад vs руль
0:47
Balance
Переглядів 471 тис.
Компьютер подписчику
0:40
Miracle
Переглядів 193 тис.
Phone sees the future ! 📲🫣👽
0:38
BOGDANCHIKI
Переглядів 11 млн
I wish I knew this When Istarted Programming #school #software  #codingtips
0:34
Claude Ams - Programming Guru 💻
Переглядів 7 млн
Why spend $10.000 on a flashlight when these are $200🗿
0:12
NIGHTOPERATOR
Переглядів 16 млн