How is Data routing through MQTT possible in Notehub?

Hi Everyone,

I was playing around with Notecard and notehub, when I tried to route data from to other cloud using MQTT I found that there is not option to insert client ID in notehub I think no MQTT is possible without broker address and Client ID.

If I’m missing something please let me know.

Hi @Eldho!
Thanks very much for posting your question.

The MQTT client ID on the MQTT route defaults to the Notecard device UID (dev:xxxxxxxxxxxxxx)
You can change the MQTT client ID by setting the Notecard user serial number.

If you have access to the Notecard, you can issue this request:


If you don’t have physical access to the Notecard, and it is connecting to Notehub, you can set the _sn environment variable in Notehub for the specific Notecard. That will propagate to the Notecard and update the user serial number.

Then when the MQTT route is executed, it will set the client ID to the Notecard serial number.

Please let us know if that meets your needs.


Hi @gwolff,

Yes this worked, thank you for the reply.