I'm using ThingsBoard demo, with a throw-away test device:

  • Name: Test
  • Device ID: 779e65d0-366f-11e9-b411-fdd6fdf5c064
  • Access Token: DdqzgX0Q4QLBbveiuY8e

I set up a subscriber:

mosquitto_sub -h demo.thingsboard.io -u DdqzgX0Q4QLBbveiuY8e -t hello

Then I publish:

mosquitto_pub -h demo.thingsboard.io -u DdqzgX0Q4QLBbveiuY8e -t hello -m hi

mosquitto_pub returns 0 (success), but I see nothing shown by either mosquitto_sub or in the Test device's "Latest Telemetry".

How do I get both ThingsBoard and the subscriber to see my hi message?

  • Every platform has it's own rules as to what it handles. We followed their thingsboard.io/docs/getting-started-guides/helloworld and got it to work. Commented Feb 26, 2019 at 15:38
  • I have the same beahavior by using the correct form: mosquitto_pub -h thinksboard_host -t v1/devices/me/telemetry -m '{"answer": 42}' -u device_access_token what could it be? Commented Nov 12, 2019 at 15:51

1 Answer 1



ThingsBoard expects a fixed topic of v1/devices/me/telemetry and a JSON message, eg:

mosquitto_pub -h demo.thingsboard.io -t v1/devices/me/telemetry -m '{"answer": 42}' -u DdqzgX0Q4QLBbveiuY8e

The ThingsBoard MQTT Device API Reference says:

In order to publish telemetry data to ThingsBoard server node, send PUBLISH message to the following topic:


The simplest supported data formats are:

{"key1":"value1", "key2":"value2"}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.