watson-iot

MQTT client disconnects from Watson IoT platform: "The topic is not valid: temp The topic does not match an authorized rule"


I'm using the Node-RED MQTT client to send an event to the Watson IoT platform. The client connects successfully. However, when I inject the payload and send it to the platform the clients gets disconnected immediately and re-connects after some time.

Connection log: enter image description here


Solution

  • Disconnects usually happens when the topic is invalid (you should use the format iot-2/evt/[event id]/fmt/json) or the payload is invalid (standard json format such as { "myvariable": 0 }, remember of using double quotes in variable names).

    Does this helps ?