MQTT message to named mesh node

391 views
Skip to first unread message

Ellard Postma

unread,
Dec 19, 2020, 9:06:52 AM12/19/20
to painlessmesh-user
I installed the MQTT bridge.
I took the named mesh example and used that one to receive a message send to it from outside the mesh. (took out the transmission task).

When I put the long node number in the topic the message is received.
When I put the name in the topic the message is NOT received.

How do I manage to receive a message from outside the mesh where the addressee has a name .


Ellard Postma

unread,
Dec 20, 2020, 2:04:00 AM12/20/20
to painlessmesh-user
I managed to solve my issue by using the broadcast possibility.
I adapted the gateway software slightly. When the substring has a specific content, the message is sent to the mesh as broadcast. This meets my requirement.

Topic closed.

Gilberto Guedes

unread,
Oct 17, 2022, 11:03:31 AM10/17/22
to painlessmesh-user
Please, could you help me, I need to comunicate my mesh network with some external net using mqtt broker, I have been working around with this example https://gitlab.com/painlessMesh/painlessMesh/-/blob/c4e4ea4ddf62a2fbc846fc172749e0fc04184efd/examples/mqttBridge/mqttBridge.ino with no success.
No comunicating with mqtt from a root node. 
Thanks in advance

Peter Buelow

unread,
Apr 15, 2023, 3:05:52 PM4/15/23
to painlessmesh-user
I actually did this by connecting to the MQTT port using ethernet, not wifi. I have not found a good solution for wifi like that, and my attempts at using the root node in bridge mode didn't work right. Instead, I used an ethernet board for ESP32 which seems to work exactly like I want. I can send/receive from the root to the MQTT server. However, nodes cannot talk to the MQTT server. I use the root to forward MQTT messages in onReceive() from the mesh to the external network.

Hope that helps, I can share the code if you are interested.

Phong Phạm Thanh

unread,
Jul 6, 2023, 1:35:28 AM7/6/23
to painlessmesh-user
Hi Gilberto, I also the same problem. If you find the answer for your question, you could help me, please.


Vào lúc 22:03:31 UTC+7 ngày Thứ Hai, 17 tháng 10, 2022, Gilberto Guedes đã viết:

Peter Buelow

unread,
Jul 7, 2023, 7:33:25 AM7/7/23
to painlessmesh-user
This might help. This is some code using an Ethernet chip attached to do MQTT out the Ethernet side, and JSON on the mesh side. I also have a small display attached, so you can ignore that. The point of this device is to relay the JSON from the mesh to my public network so I can keep track of devices.

Reply all
Reply to author
Forward
0 new messages