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
Ghosty2w 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
MQTT is a very good option for that purpose. As long as the data isn't very large it will handle it
Joseph Ogbonna
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
More Posts
I need help on secure communication.Hello all, I need help on secure communication. If any of you happen to know which library for mqtt-What are the benefits of using 64 priority levels in ThreadX with CMSIS-RTOS?Good day everyone, I am trying to use ThreadX with CMSIS RTOS in a project. The `cmsis_os2.c` file sHas anyone here encountered UML being used in your firmware development experience?@Middleware & OS I have found this UML diagrams, sequence diagrams and class diagrams in particular,Simple IP based intercom device voice communication protocolI like to know , which voice communication protocol helps me to setup and make voice communication bSingaporian Researchers developed a flexible battery for smart contact lensesSmart contact lenses could be powered by a flexible battery as thin as a human cornea that stores elFacing a problem in setting up esp-idf in vs codehello everyone i am following the book: INTERNET OF THINGS PROJECT WITH ESP32 BY: AGUS KURNIAWAN I what are different ways to maximize the range of esp32 c3 chip on a custom board ?what are different ways to maximize the range of esp32 c3 chip on a custom board ?how to fix gdb server error in stm32 cube idehow to fix gdb server error in stm32 cube ideuse MAX485 TTL to RS485 Converter Module with esp32 to get convert value of rs485 output to serialneed help related to using - use MAX485 TTL to RS485 Converter Module with esp32 to get convert valuunable to retrieve data from a rs485 based flowmeterThe flowmeter contains a atmega 16 chip and i am trying to get flowrate and flow totalizer from it v