Ubidots Community

[SOLVED] Question related to TOPIC in MQTT

Hello, I am working on my diploma thesis and in this, I am using UBIDOTS as MQTT Broker and IoT Platform. So, I have to specify the TOPICs in the thesis that I am publishing and subscribing to. So, I need the exact TOPIC format.
I found this on the UBIDOTS HELP:
For Publish: /v1.6/devices/{LABEL_OF_DEVICE}/{LABEL_OF_VARIABLE}
For Subscribing: /v1.6/devices/{LABEL_DEVICE}/{LABEL_VARIABLE}

But in theories, we usually find that TOPIC like temperature, humidity, etc, means any specific name. So is this the same thing or different?

This might be a silly question, sorry for that, but I need to mention in the thesis, so I need an exact thing. And please correct me if I am wrong somewhere.

Hi @gargashi,

I hope all is well,

As an standard we put {LABEL_OF_DEVICE} and {LABEL_OF_VARIABLE} to indicate that you have replace that for the actual label. Labels are unique identifiers that the user can modify and are use to transfer data. For more information please refer to the following article.

All the best,
-Isabel

Thanks for the response. Yes I know I have to replace {LABEL_OF_DEVICE} and {LABEL_OF_VARIABLE} with my own. But I am asking what will be the TOPIC?
Like my {LABEL_OF_DEVICE} is esp8266 and {LABEL_OF_VARIABLE} is magnetic.
So my TOPIC will be /v1.6/devices/esp8266/magnetic? Means this /v1.6/devices/esp8266/magnetic complete will be my topic.

Thanks

Hi @gargashi,

Topics, refers to the string that the broker uses to filter messages, each topic level is separated by a forward slash (/). So, yes /v1.6/devices/esp8266/magnetic will be the topic.

Best,
-Isabel

OK thanks Mam, appreciate your help.

Thanks