Nodo raíz de painlessMesh como único enlace a Hermetry: ¿cómo deberían aparecer los otros nodos?
Traducido del English por IA ·
Suelo solo leer, pero me he atascado con una pregunta de arquitectura.Patio de subestación, 12 nodos ESP8266 con DS18B20 en superficies de transformador y armarios, demasiado dispersos y con demasiado acero para Wi-Fi normal hasta cada nodo. He montado una red painlessMesh que es estable por sí sola. El nodo 0 está cableado cerca del edificio de control y debería ser la raíz que envía todo a Hermetry.Dos problemas. Primero, cuando la raíz también se une al Wi-Fi de la planta con stationManual(), la malla se cae cada pocos minutos: los nodos se desconectan y vuelven a unirse. Segundo, no quiero un solo dispositivo Hermetry con 24 claves llamadas n7_temp; quiero 12 dispositivos para poder aplicar reglas de alarma en un perfil. Me estoy quedando sin RAM en la raíz con TLS más malla; el heap ronda los 9 KB cuando se bloquea.
mesh.init(MESH_PREFIX, MESH_PASSWORD, &sched, MESH_PORT, WIFI_AP_STA, 6);
mesh.stationManual(STATION_SSID, STATION_PASSWORD);
mesh.setRoot(true);
mesh.setContainsRoot(true);
I mostly lurk, but I’m stuck on an architecture question.
Substation yard, 12 ESP8266 nodes with DS18B20s on transformer and cabinet surfaces, too spread out and too much steel for plain Wi-Fi to every node. I built a painlessMesh network and it is stable on its own. Node 0 is wired near the control building and should be the root that gets everything to Hermetry.
Two problems. First, when the root also joins the plant Wi-Fi with stationManual() the mesh falls apart every few minutes, nodes drop and rejoin. Second, I don’t want one Hermetry device with 24 keys called n7_temp, I want 12 devices so I can put alarm rules on a profile. I’m running out of RAM on the root with TLS plus mesh, heap is around 9 KB when it crashes.
mesh.init(MESH_PREFIX, MESH_PASSWORD, &sched, MESH_PORT, WIFI_AP_STA, 6);
mesh.stationManual(STATION_SSID, STATION_PASSWORD);
mesh.setRoot(true);
mesh.setContainsRoot(true);
Traducido del English por IA ·
¿El AP de la planta está realmente en el canal 6? La malla tiene que estar en el canal del router cuando la raíz es una estación; si no, la radio sigue saltando de canal y se produce exactamente esa caída y reconexión.
Is the plant AP actually on channel 6? The mesh has to sit on the router’s channel when the root is a station, otherwise the radio keeps hopping and you get exactly that drop and rejoin.
Traducido del English por IA ·
Comprobado, el AP está en 11 y en auto. Cambié la malla al 11 y mejora, pero el AP a veces cambia de canal por la noche.
Checked, the AP is on 11 and auto. Moved the mesh to 11 and it’s better, but the AP changes channel at night sometimes.
Traducido del English por IA ·
Tuvimos un patio similar en un sitio logístico y acabamos quitando por completo la función de internet de la malla. La raíz sigue siendo un nodo de malla sencillo (sin modo station, así que el canal no importa) y se comunica por UART a 115200 con un ESP32 junto a ella. El ESP32 está conectado por Ethernet o al Wi-Fi de la planta, tiene la RAM necesaria para TLS y es lo único que Hermetry conoce.Haga del ESP32 un dispositivo gateway en Hermetry (marque This device is a gateway al crearlo) e informe de cada nodo de la malla como hijo en los topics del gateway. Use el id del nodo de la malla o una etiqueta como nombre del hijo y envíe un tipo para que todos caigan en el mismo perfil:
v1/gw/connect {"device": "yard-n07", "type": "yard-temp"}
v1/gw/telemetry {"yard-n07": {"values": {"temp_c": 41.2, "rssi": -71}},
"yard-n03": {"values": {"temp_c": 38.9, "rssi": -64}}}
Cree primero un perfil llamado exactamente yard-temp; los hijos lo obtendrán automáticamente y sus reglas de alarma se aplicarán a ese perfil. Omita ts a menos que el ESP32 tenga NTP; la plataforma registrará entonces la hora de llegada.Si más adelante quiere enviar algo a un nodo, un comando para un hijo llega al ESP32 por v1/gw/rpc y el ESP32 lo pasa por UART a la raíz y de ahí a la malla. Referencia: Devices behind a gateway.
We had a similar yard on a logistics site and ended up taking the internet job away from the mesh entirely. The root stays a plain mesh node (no station mode, so channel doesn’t matter) and talks over UART at 115200 to an ESP32 next to it. The ESP32 is on Ethernet or the plant Wi-Fi, has the RAM for TLS, and is the only thing Hermetry knows about.
Make the ESP32 a gateway device in Hermetry (tick This device is a gateway when you create it) and report each mesh node as a child on the gateway topics. Use the mesh node id or a label as the child name and send a type so they all land on one profile:
v1/gw/connect {"device": "yard-n07", "type": "yard-temp"}
v1/gw/telemetry {"yard-n07": {"values": {"temp_c": 41.2, "rssi": -71}},
"yard-n03": {"values": {"temp_c": 38.9, "rssi": -64}}}
Create a profile named exactly yard-temp first, then children get it automatically and your alarm rules go on that profile. Leave out ts unless the ESP32 has NTP, the platform will stamp arrival time.
If you later want to send something to a node, a command to a child comes down to the ESP32 on v1/gw/rpc, and the ESP32 passes it over UART to the root and into the mesh. Reference: Devices behind a gateway.
Traducido del English por IA ·
Por curiosidad, ¿cuántos saltos consigues atravesando todo ese acero?
Out of curiosity, how many hops do you get through all that steel?
Traducido del English por IA ·
3 como máximo, los armarios lejanos pasan por dos relés. Se hizo la separación del UART esta semana: el root vuelve a ser un nodo mesh simple, el ESP32 hace TLS con bastante heap, y bajo el gateway aparecieron 12 hijos en el perfil yard-temp. Envío el connect una vez por nodo tras el arranque, así que un nodo que acaba de unirse a la malla cae directamente en yard-temp.
3 at most, the far cabinets go through two relays. Did the UART split this week: root is a dumb mesh node again, ESP32 does TLS with plenty of heap, 12 children appeared under the gateway on the yard-temp profile. I send the connect once per node after boot, so a node that just joined the mesh lands on yard-temp straight away.
- Debes estar registrado para responder a este debate.
Únete a la conversación
Inicia sesión para preguntar y responder, dar me gusta a las publicaciones útiles y marcar la respuesta que resolvió tu problema. Cada aportación suma puntos y niveles.

