This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Publishing MQTT data to multiple topics in Thingy91

Hi Dev Team,

I am running a program that is publishing data over MQTT using a particular topic and broker on the Thingy91.

I wanted to know a way in which I could send different data to different topics and how it could be configured in the mqtt example.

For instance, I need to send different sensor values to different topics : (home/living/temp for temperature), (home/living/humid for humidity value).

I don't see an option of configuring more than 1 topic in the mqtt example. 

For now, I have defined it as : CONFIG_MQTT_PUB_TOPIC "home/living" in the autoconf.h file.

Could you let me know how to configure multiple topics in the program ?

Regards,

Adeel.

Related