ESP-Now mesh network demo 1

  Переглядів 46,881

Nick Reynolds

Nick Reynolds

5 років тому

Here are six nodes of my ESP-Now mesh syncing up from a cold start.
This is an interpretation of the BATMAN IV mesh routing algorithm implemented on ESP8266 using ESP-Now as the transport.
I started working on this when I wasn't satisfied with how PainlessMesh worked and somebody suggested I look at ESP-Now based connections instead.
I'm just at the stage where the mesh builds, syncs a common clock and shares 'health' information eg. uptime and battery status. As yet you can't send any meaningful user data over it, but I'm actually seeing that as a relatively minor step, it's already reliably routing messages across multiple hops in a fairly efficient manner.
My next milestone is creating 'traceroute' and 'ping' equivalents to show the routing easily and measure latency.

КОМЕНТАРІ: 64
@JasonWho
@JasonWho 5 років тому
I was just coming across ESP-Now yesterday and couldn't believe it hadn't been integrated into the big name firmwares like Tasmota/ESPHome/Espurna/etc. The Smart Home use cases are a plenty from relationships between chips (switches, bulbs, outlets, sensors), range extending where devices can be several hops away from the slave but still receive the message and let the rest know it's been received, mesh networking as you have here, etc etc. Looking forward to your progress on this!
@keepitdialed
@keepitdialed 11 місяців тому
Dude. This just reeks of intelligent design. Well done mate.
@HX2003
@HX2003 5 років тому
Great work!
@mudpi1698
@mudpi1698 2 роки тому
This is very interesting. Nick, I am working on a project based the garden and would like to talk more on collaborating using this sort of system. What is a good way to connect?
@Bianchi77
@Bianchi77 2 роки тому
Nice video, keep it up, thank you :)
@guatagel2454
@guatagel2454 5 років тому
Thank you!
@joeybab3
@joeybab3 4 роки тому
Awesome idea! You said the range test went really nicely, what types of ranges were you seeing?
@dimitrijevasiljevic
@dimitrijevasiljevic 3 роки тому
This type of mesh would be ideal for a project I am working on. I have 5 sensor nodes that need to send a millisecond time-stamp to the main node every time they are tripped. I'm most interested in them syncing to a common counter/clock you mentioned since that would allow me to calculate accurate round trip time, and speed of moving objects without worrying about latency. How did you manage to implement that? Does painless mess have that feature?
@NickReynolds
@NickReynolds 3 роки тому
I stopped using PainlessMesh and started writing this mesh based on ESP-Now quite some time back. I've never quite finished it, but ESP-Now broadcast frames allow you to get things in pretty close sync probably in the 10s of ms range.
@dimitrijevasiljevic
@dimitrijevasiljevic 3 роки тому
@@NickReynolds Is there any way I can get some insight in how you wrote it? Could i parallelise the message sending with the sync elements so I won't get a problem if I have a transmission at the same time of a sync?
@keepitdialed
@keepitdialed 11 місяців тому
Super rookie question - can those esps pull double duty. Can they each run a motion sensor, and use the mesh to relay signals back to home assistant. Thanks in advance all.
@gr0nis
@gr0nis 3 роки тому
Hi! Are you going to release this as a library or at least make the repository publicly available? I need this for a project but implementing it from scratch seems unnecessary since you have implemented a solid base.
@NickReynolds
@NickReynolds 3 роки тому
I'm afraid I've never quite finished it. I've started looking at it again recently.
@juozasgecevicius6660
@juozasgecevicius6660 3 роки тому
@@NickReynolds im more than happy to help you with this in a few months!
@keepitdialed
@keepitdialed 11 місяців тому
@nick - rookie here again, what would you recommend now that two years have gone by if I guy wants to replicate this kind of ninja for his portable esp32 cam pit motion detector network for securing up air bnbs.
@keepitdialed
@keepitdialed 11 місяців тому
Damn. So rad
@shaunreynolds100able
@shaunreynolds100able 5 років тому
WELL DONE.. are you going to publish what you did. really interested in collaborating with you.
@NickReynolds
@NickReynolds 5 років тому
Yes, my intention is to release this once it is in a fit state. I am making slow progress towards this.
@TomRobinsonChannel
@TomRobinsonChannel 4 роки тому
Nick Reynolds any update on releasing it? I’ve been using painlessMesh but would be interested in trying a ESP Now version.
@akshathsinghal4674
@akshathsinghal4674 5 років тому
Awesome work! When will you release the code or update on this work?
@NickReynolds
@NickReynolds 5 років тому
I am still slowly working on this, but it's a hobby project and quite time-consuming.
@mikemurphy1896
@mikemurphy1896 2 роки тому
great !
@sunitraut
@sunitraut 5 років тому
How did you implement broadcasting in Esp now ?
@NickReynolds
@NickReynolds 5 років тому
I'm not actually using broadcasts, for things that need to go to all peers it's unicast to them all.
@dunk_law
@dunk_law 2 роки тому
I am interested to know if you used proximity measurement - filter_weak_signal ?
@NickReynolds
@NickReynolds 2 роки тому
Each node uses the concept of 'echo quality', ie. does it see its own packets repeated back to it. Poor echo quality roughly implies weak signal between two nodes.
@danielbazzi4325
@danielbazzi4325 5 років тому
in a little confused. did you use esp-now or esp-mesh?
@NickReynolds
@NickReynolds 5 років тому
I have implemented my own mesh network using ESP-Now as the transport and a variant of the routing algorithm from BATMAN. It is a variant of it as BATMAN doesn't map directly onto the features available in ESP-Now, relying on broadcasts. www.open-mesh.org/projects/batman-adv/wiki/BATMAN_IV
@danielbazzi4325
@danielbazzi4325 5 років тому
@@NickReynolds woow. thks so much for the info. I'm working with espmesh but you are far away from my knowledge.
@NickReynolds
@NickReynolds 5 років тому
@@danielbazzi4325 I'm just at the first stages of getting this working. Once it reaches a stage where it might be usable by others I plan to release it as a library. The reason I am doing this is that I found the mesh solutions that use conventional AP+STA mode worked but responded badly to packet loss or changes in topology if things moved and my project will involve wearable devices. It also MIGHT mean longer range between nodes but that's hard to quantify.
@bomber321
@bomber321 2 роки тому
Hi Nick, this is really interesting and could be a base for a project im working on, do you have any news on if we can have a play with the code? thanks in advance
@NickReynolds
@NickReynolds 2 роки тому
A much later version of this is now on GitHub. It needs further work, I could really do with constructive feedback on it. github.com/ncmreynolds/m2mMesh
@bomber321
@bomber321 2 роки тому
@@NickReynolds I apprectiate that thank you, I'm a novice dodder so I shall do my best and give some feedback.
@Lennypl1
@Lennypl1 5 років тому
Grate project, you use public library?
@NickReynolds
@NickReynolds 5 років тому
No, this is me writing my own Arduino library to do this.
@deshbhakti5467
@deshbhakti5467 5 років тому
@@NickReynolds can u please make tutorial on this if this is okay for you .
@The_Unobtainium
@The_Unobtainium 4 роки тому
So good. How is the progress? Any news?
@NickReynolds
@NickReynolds 4 роки тому
I've been doing a bit of work in the background but I'm not yet happy with the code so haven't released it. The project I need it for is in March so I'll be concentrating on it in February.
@Rayyarhs
@Rayyarhs 3 роки тому
cool.
@loay3660
@loay3660 5 років тому
great! can you send the code
@NickReynolds
@NickReynolds 3 роки тому
I'm afraid I've never quite finished it. I've started looking at it again recently.
@ChuckSommerville
@ChuckSommerville 5 років тому
Whats the limit of how many will mesh?
@NickReynolds
@NickReynolds 5 років тому
It's not specifically limited, but eventually you'll run out of heap and right now I'm using uint8_t as an index that would limit things at 254. There's no reason that uint8_t couldn't be an uint16_t but I bet you'd have run out of heap by then anyway. I've only managed to get it to 16 nodes but that's because I ran out of ways to power the ESPs. As I'm using ESP-Now you can have 20 peers per node, but that's just local peers and the mesh as a whole can be bigger. NB: peer to peer communication is NOT encrypted, this is not a requirement for what I'm doing. I've done some artificial capping of local peers to test managing that but really need to build more of a test rig to get real world answers. I've got a drawer full of ESP-01s kicking around unused, just need to solder up a way to plug lots in at once. At the moment I'm doing routing advertisements more frequently than is really necessary and this will limit performance too. This is me feeling my way with a work in progress, not a delivered project.
@diegomestrecam7674
@diegomestrecam7674 3 роки тому
Hello. this looks promessing. good job!!! I se in the comments that is still a work in progress. how are you doing so far? I hope we get to play with this soon! Thanks for the video :)
@NickReynolds
@NickReynolds 3 роки тому
Since then I've done a massive rewrite during pandemic lockdown, as modern versions of the Arduino ESP8266 core support ESP-Now broadcasts. It handles discovery much better and scales better, but I still haven't got around to a version I'm happy to release.
@hamsterbrigade
@hamsterbrigade 2 роки тому
Are those cases 3d printed?
@NickReynolds
@NickReynolds 2 роки тому
No, they are electrical junction boxes.
@mazmazen
@mazmazen 5 років тому
Is it wemos inside? Can we see the code
@NickReynolds
@NickReynolds 5 років тому
These are Wemos D1 mini pro, because I like the D1 boards for prototyping and they have an external antenna.
@klausjuhantalo8415
@klausjuhantalo8415 2 роки тому
Hi Nick. Nice demo. Can you release this and others can collabrate also..
@NickReynolds
@NickReynolds 2 роки тому
Your comment has made me come back to this and try to knock it into acceptable shape. While I've been using it myself a bit, it's not consistent or documented and lacks examples. Trying to get a few of the essential info fixed up at the moment.
@klausjuhantalo8415
@klausjuhantalo8415 2 роки тому
@@NickReynolds Good. You can email me and we can see if I can help you on that.
@klausjuhantalo8415
@klausjuhantalo8415 2 роки тому
@@NickReynolds Hi Nick. Any progress on this? Please contact me, i will help also on this..
@NickReynolds
@NickReynolds 2 роки тому
​@@klausjuhantalo8415 I've been doing loads of work over the last weeks trying to get the code I removed during a big rewrite integrated back in, a full set of examples and some basic documentation sorted. You don't seem to have any contact details visible.
@klausjuhantalo8415
@klausjuhantalo8415 2 роки тому
@@NickReynolds Now i have, ukposts.info/the/yg2CEGvBOTz2kMykC3t78Q.htmlabout
@doditv6467
@doditv6467 4 роки тому
how to build this ?
@NickReynolds
@NickReynolds 4 роки тому
This is done with a mesh network library I've been working on sporadically but it's not stable enough for release just yet. I'm doing some work on it over the next few weeks so it might get there. I keep saying that though.
@YigalBZ
@YigalBZ Рік тому
Nice design. Can you share the code?
@NickReynolds
@NickReynolds Рік тому
This is a very old version of what is now m2mMesh github.com/ncmreynolds/m2mMesh
@SingenDrake81
@SingenDrake81 4 роки тому
Here's a pat on the back - Now what about a tutorial ?
@NickReynolds
@NickReynolds 4 роки тому
I'm still working very slowly on making the code solid enough to release. It works but doesn't scale as well as I would like. I've had about 30 nodes working but it starts to break down and things drop out of the mesh at that point. I'm doing a minor rewrite where it does much less spamming of the network with updates.
ESP-NOW - Peer to Peer ESP32 Network
43:02
DroneBot Workshop
Переглядів 323 тис.
Why Did I Pick Wi-Fi over ESPNow?
4:53
MrDIY
Переглядів 16 тис.
NO NO NO YES! (40 MLN SUBSCRIBERS CHALLENGE!) #shorts
00:27
PANDA BOI
Переглядів 60 млн
Не покупай эти гиперзаряды 👎
00:36
Bubs
Переглядів 978 тис.
ESP BLE Mesh Demo
5:51
Espressif Systems
Переглядів 53 тис.
6wd hoverboard high speed testing with field weakening.
0:56
geofrancis2001
Переглядів 2,8 тис.
Home Automation W/O Router or Internet | Mesh Networking ♻️
7:48
Калибровка с 4 скоростями. Прошивка BBCAR
3:23
Alexandr Rogozhnikov
Переглядів 44 тис.
Mesh Networking demo on ESP8266 & ESP32 | LCSC
8:28
techiesms
Переглядів 153 тис.
What Is ESP Wi-Fi MESH? (2021) | Learn Technology in 5 Minutes
5:19
ESP-Now Range Test: Real-World Results for ESP32 Devices!
8:01
atomic14
Переглядів 100 тис.