Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Can't publish device-to-cloud events via MQTT

$
0
0

Hi -

Also posted here https://azure.microsoft.com/en-gb/documentation/articles/iot-hub-mqtt-support/#comment-2573025841

a week or so ago I had my Hub working with mosquitto_pub as the client and DeviceExplorer (Data->Monitor) showing events I published. When I tried again today (because my new node.js mqtt client code was not receiving but not publishing) I could not get DeviceExplorer or the iothub-explorer to display any device-to-cloud messages.

for reference the mosquitto cmd line is : mosquitto_pub -d -h <myhub>.azure-devices.net -p 8883 -u "<myhub>.azure-devices.net/test/DeviceClient..." -P "<my sas="">" -i test -m "{\"deviceName\":\"myFirstDevice\",\"windSpeed\":10.980438438244164}" -t devices/test/messages/events --tls-version tlsv1 -V mqttv311 --capath /etc/ssl/certs

EDIT:  THE ISSUE IS A MISSING "/" ON THE END OF THE TOPIC ... DOH!!  MUST HAVE DELETED IT SOME POINT AND NOT NOTICED, OR IoT Hub WAS ACCEPTING IT WITHOUT THE "/" UNTIL A RECENT UPDATE.

mosquitto_pub verbose output is as follows (device id is test):

Client test sending CONNECT
Client test received CONNACK
Client test sending PUBLISH (d0, q0, r0, m1, 'devices/test/messages/events', ...
(61 bytes))
Client test sending DISCONNECT

This _was_ all working fine... Did something change? I've tried updating DeviceExplorer, creating new devices but same results .. I no longer see events in the DeviceExplorer monitor output.




Viewing all articles
Browse latest Browse all 1916

Trending Articles