mc-Things

mc-Platform => MQTT => Topic started by: michaelblight on June 17, 2018, 02:31:01 am

Title: Not seeing any MQTT messages
Post by: michaelblight on June 17, 2018, 02:31:01 am
I'm trying this for the first time and not having much luck. I have Mosquitto installed in a Docker container running under Ubuntu. On my laptop I can run MQTT.fx and successfully publish and subscribe. I also have Home Assistant connected, and it can respond to the messages published from MQTT.fx too.

I have the following code running on a mcModule110:

Code: [Select]
Class TestHeartbeat
    Shared Event SendMessage() RaiseEvent Every 15 Seconds
        Dim payload As ListOfByte = New ListOfByte()
        payload.Add("testing")
        Lplan.Publish("heartbeat", payload)
        LedGreen = Not LedGreen
    End Event
End Class

And I have the mcGate110 config set to my Mosquitto server (192.168.0.39:1883). The green LED goes on and off every 15 seconds, but no messages arrive at either MQTT.fx or Home Assistant. And MQTT.fx can scan for topics, but nothing shows up. Any help would be much appreciated.
Title: Re: Not seeing any MQTT messages
Post by: michaelblight on June 17, 2018, 08:02:02 am
Solved it!

I'm guessing the USB stick I used to update the Application Processor (mcGw110.bin) was reporting over 100mA required and so the update was not working. I noticed mcOTA was reporting version 6.* rather than 9.*. I had updated the Host Processor, so perhaps the two versions were not compatible. Anyway, when I redid everything with a different USB stick, lo and behold, MQTT messages being sent and received.