Is it good practice to use MQTT to setdata for an IoT device?

Hey guys @IoT Cloud I know MQTT uses publish/subscribe, meaning all clients can pub/sub to any topic and all clients have to be connected to an MQTT broker. Is it also good practice to use MQTT to setdata for an IoT device? Let's imagine the IoT device is a smart light which can be controlled via a web app. The web app will subscribe for the r/g/b values and the intensity and then visualize the values in the app. But is it also good practice to set data via MQTT? Meaning the web app will then publish to the topic /deviceID/set/r/255(or something like this) and only the IoT device subscribes to the topic /deviceID/set/#. If this is not common practice what are the options? Do we have to implement multiple protocols for one IoT device?
Solution:
MQTT is a very good option for that purpose. As long as the data isn't very large it will handle it
Jump to solution
3 Replies
Ghosty
Ghosty6mo ago
well, i worked on an iot project(i handled the web part) where we changed the state of device using MQTT, worked pretty well.
Solution
Joseph Ogbonna
Joseph Ogbonna6mo ago
MQTT is a very good option for that purpose. As long as the data isn't very large it will handle it
Joseph Ogbonna
Joseph Ogbonna6mo ago
Read this for more insight https://www.nabto.com/mqtt-protocol-iot/
Ida Hübschmann
Nabto
The Pros and Cons of Using MQTT Protocol in IoT
Are you considering using MQTT as a data connection IoT protocol? Before you do, check out our pros and cons and decide if it’s right for your project.
Want results from more Discord servers?
Add your server