painlessMesh kök düğümü Hermetry'ye tek bağlantı: diğer düğümler nasıl görünmeli?
Yapay zekâ tarafından English dilinden çevrildi ·
Genelde sadece okuyucuyum, ama bir mimari soruda takıldım.Trafo merkezi sahası, trafo ve pano yüzeylerinde DS18B20 sensörlü 12 ESP8266 düğümü; çok dağınık ve her düğüme düz Wi-Fi ile ulaşmak için fazla çelik var. painlessMesh ağı kurdum ve kendi başına kararlı çalışıyor. Düğüm 0 kontrol binasının yakınına kablolu bağlı ve Hermetry’ye her şeyi ulaştıran kök olmalı.İki sorun var. Birincisi, kök ayrıca stationManual() ile tesis Wi-Fi’sine bağlandığında mesh birkaç dakikada bir dağılıyor; düğümler düşüp yeniden katılıyor. İkincisi, n7_temp adlı 24 anahtarlı tek bir Hermetry cihazı istemiyorum; alarm kurallarını bir profil üzerinde uygulayabilmek için 12 cihaz istiyorum. Kökte TLS ve mesh birlikte RAM’im bitiyor; çöktüğünde heap yaklaşık 9 KB.
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);
Yapay zekâ tarafından English dilinden çevrildi ·
Tesisin AP’si gerçekten 6. kanalda mı? Kök bir istemci (station) olduğunda mesh’in yönlendiricinin kanalında kalması gerekir; aksi halde radyo sürekli atlar ve tam olarak bu kopma ve yeniden bağlanma sorunu yaşanır.
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.
Yapay zekâ tarafından English dilinden çevrildi ·
Kontrol ettim, AP 11 kanalında ve otomatik. Mesh’i 11’e taşıdım, durum daha iyi ama AP bazen geceleri kanal değiştiriyor.
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.
Yapay zekâ tarafından English dilinden çevrildi ·
Bir lojistik sahasında benzer bir alanımız vardı ve internet işini tamamen mesh’ten aldık. Kök, düz bir mesh düğümü olarak kalır (station modu yok, bu yüzden kanal önemli değil) ve yanındaki bir ESP32 ile 115200 hızında UART üzerinden haberleşir. ESP32 Ethernet veya tesisin Wi-Fi’sinde çalışır, TLS için yeterli RAM’e sahiptir ve Hermetry’nin bildiği tek şeydir.ESP32’yi Hermetry’de bir gateway cihazı yapın (oluştururken This device is a gateway kutusunu işaretleyin) ve her mesh düğümünü gateway topic’lerinde bir child olarak bildirin. Child adı olarak mesh düğüm kimliğini veya bir etiketi kullanın ve hepsinin tek bir profile düşmesi için bir tip gönderin:
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}}}
Önce tam olarak yard-temp adında bir profil oluşturun; böylece child’lar otomatik olarak bu profile dahil olur ve alarm kurallarınızı bu profile eklersiniz. ESP32’nin NTP’si yoksa ts alanını dahil etmeyin; platform geliş zamanını kendisi işaretler.Daha sonra bir düğüme bir şey göndermek isterseniz, child’a yönelik bir komut v1/gw/rpc üzerinden ESP32’ye iner ve ESP32 bunu UART üzerinden köke, oradan da mesh’e iletir. Referans: 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.
Yapay zekâ tarafından English dilinden çevrildi ·
Merak ettiğim için soruyorum, o kadar çelikten geçerken kaç hop alıyorsunuz?
Out of curiosity, how many hops do you get through all that steel?
Yapay zekâ tarafından English dilinden çevrildi ·
En fazla 3, uzaktaki dolaplar iki röleden geçiyor. Bu hafta UART ayrımı yapıldı: root yeniden basit bir mesh düğümü, ESP32 bol heap ile TLS’yi yapıyor, gateway altında yard-temp profilinde 12 child düğüm göründü. Her düğüme boot’tan sonra connect komutunu bir kez gönderiyorum, bu yüzden mesh’e yeni katılan bir düğüm hemen yard-temp’e düşüyor.
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.
- Bu konuyu yanıtlamak için giriş yapmış olmalısınız.
Sohbete katılın
Soru sormak ve yanıtlamak, yararlı gönderileri beğenmek ve sorununuzu çözen yanıtı işaretlemek için oturum açın. Her katkı puan ve seviye kazandırır.

