MySensors GW MQTT messages do not access the MQTT broker



  • Hello,

    I'm Alberto and I'm new to this forum, so first of all I would like thank all of you for your excellent contributions I found in this forum which helped mit to start with MySensers. THANK YOU!

    I'm using a Rasberry Pi for my IOT. I already implemented the Mosquito MQTT, Node red, Infulx and Graphana and was able to work with my ESP32 based sensors and all is working fine. Then I thought about using sensors with much lower power consumption than the EPS32 and besides ZigBee I came to rf24.

    I implemented MySensors GW in MQTT mode on a second PI (as long as I'm in this experimental stage, I'm trying to avoid problems with my first Pi šŸ˜Š ).
    As test sensors, I implemented the DOOR script from the MySensors API description on two Arduinos Nano, just to have something providing some data.

    I was albe to confirm that the communication between the GW and the Sensors is working fine, by means of MYScontroller from tekka as well as by MyController.org from jkandasa (many thanks to these guys).

    Now, Iā€™m trying to forward the data received by the GW, to my first PI, where the Mosquito MQTT broker an Node Red is running. I did this in the same way as for my other ESP32 sensors using the MQTT node and just the debug node to see when something was received, but nothing is coming.

    The connection from the MySensors GW to MQTT is working fine. I see the confirmation that the GW is connected

    Nov 08 11:15:19 DEBUG GWT:RMQ:CONNECTING...
    Nov 08 11:15:19 DEBUG connected to 192.168.XX.YY
    Nov 08 11:15:19 DEBUG GWT:RMQ:OK
    Nov 08 11:15:19 DEBUG GWT:TPS:TOPIC=mysensors-out/0/255/0/0/18,MSG SENT
    Nov 08 11:15:19 DEBUG TSM:READY:NWD REQ

    and I see that the data was send out:

    Nov 08 11:23:04 DEBUG TSF:MSG:READ,1-1-0,s=5,c=1,t=16,pt=1,l=1,sg=0:0
    Nov 08 11:23:04 DEBUG GWT:TPS:TOPIC=mysensors-out/1/5/1/0/16,MSG SENT
    Nov 08 11:23:16 DEBUG TSF:MSG:READ,1-1-0,s=5,c=1,t=16,pt=1,l=1,sg=0:1
    Nov 08 11:23:16 DEBUG GWT:TPS:TOPIC=mysensors-out/1/5/1/0/16,MSG SENT
    Nov 08 11:23:27 DEBUG TSF:MSG:READ,1-1-0,s=5,c=1,t=16,pt=1,l=1,sg=0:0
    Nov 08 11:23:27 DEBUG GWT:TPS:TOPIC=mysensors-out/1/5/1/0/16,MSG SENT

    but nothing seems to arrive on the MQTT node. I verified the node red flow using MQTT.fx-1.7.1 and send the same commands (using mysensors-out as topic) by hand to my MQTT broker and this is working fine.

    Maybe my understanding of how the MySensors GW is working is completely wrong and hence what I am trying to do will not work.
    So I would be glad if someone from you could help me to solve this riddle an point me to my error. Many thanks in advance.

    With best regards
    Alberto



  • Solved.

    I found the rootcause of my problem by reading one of the posts on MQTT GW issues with sending MQTT msg.
    By adding the "#" in the topic definition of my MQTT node in Node red, I can see all messages now
    and have just to sort them out based on the sub topics.

    WBR
    Alberto



  • Hi, in MQTT.fx, can you subscribe to # and check if you are getting MySensor messages?



  • Thanks for your feedback frits.
    This is what I found searching this forum and already replied to my own post, but it takes some time the post to become visible.

    With best regards
    Alberto


Log in to reply
 

Suggested Topics

  • 3
  • 2
  • 3
  • 1
  • 2
  • 2

1
Online

11.2k
Users

11.1k
Topics

112.5k
Posts