0

I want to build a mesh network using esp32 in order to create a smart-home. Do you recommend using the official espressif solution (ESP-MDF)? Or should I use the PainlessMesh library that is compatible with Arduino Framework?

Reading the documentation of espressif it states you can connect up to 1000 nodes:

Large network capacity: ESP-MESH takes the form of a tree topology, so one single device can connect to 10 devices at maximum, and an entire network can have over 1,000 nodes.

Videos:

ESP-MDF: https://www.youtube.com/watch?v=MWgp4BbkPcY

PainlessMesh library: https://www.youtube.com/watch?v=gf39MLqPGkQ&t=42s

Limitations:

PainlessMesh library: https://github.com/gmag11/painlessMesh/blob/master/README.md#limitations-and-caveats

ESP-MDF: one single device can connect to 10 devices at maximum. (I am assuming this limitation also exist for PainlessMesh library.

Questions:

  1. From reading the documentation and videos it is a lot simpler to use the PainlessMesh library. Is that library making use of ESP-MDF?

  2. If I connect the root node to my router that has internet will I be able to extend my WiFi signal so that there is internet on parts of the house that currently does not have WiFi coverage? Is this possible using both ESP-MDF and PainlessMesh?

  3. What approach do you recommend? If I go with the harder approach (ESP-MDF) will this open new doors in the future in case I decide to add more smart devices? Currently I have only 7 smart home devices so the PainlessMesh library will probably work great for now. But if I decide to add more devices in the future is it worth learning ESP-MDF?

Tono Nam
  • 34,064
  • 78
  • 298
  • 470
  • 2
    ESP-MESH is not a general purpose WiFi mesh and you cannot use it to extend WiFi coverage in your home to third party WiFi clients. Only devices which implement the ESP-MESH protocol can join it, which practically means only ESP32 devices. And even then there are plenty of gotcha-s for forwarding data. This is a good in-depth guide to what it is and how it works: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/esp-wifi-mesh.html – Tarmo Sep 01 '21 at 07:29

1 Answers1

2
  1. No, painlessMesh implements their mesh network using ESP8266/ESP32 SDK, ArduinoJson and ESPAsyncTCP(ESP8266)/AsyncTCP(ESP32). See more at: https://gitlab.com/painlessMesh/painlessMesh/-/tree/master/
  2. No, both libraries use WiFi for mesh, so it won't be available for AP access, it is possible to implement on application layer using two ESP on the same board, but with only one it's not possible.
  3. painlessMesh it's, well, painless, so it will be faster to develop, but will always depend on Arduino.h. ESP-MDF allows more devices, it's faster, more reliable, can have internet connection and do not depend on Arduino.h, at cost of need way more time to configure and code. In my opinion, if you are 100% sure that painlessMesh it's enough for your application or you are not sure if is even necessary a mesh network then go with painlessMesh (not waste time only to throw the code await); if you're in doubt if painlessMesh will be enough then go for ESP-MDF.