Many companies investigating LwM2M eventually ask the question: “Is LwM2M or MQTT better?” Although much can be said on this subject, a very brief summary is that device management needs a language to install, update, and maintain IoT devices. LwM2M is one of these languages. Conversely, MQTT is simply a phone that lets you call someone. LwM2M can use a CoAP phone, an MQTT phone or an HTTP phone.
To speak more technically, choosing an IoT protocol for device management means choosing a protocol that offers a comprehensive set of features. MQTT has some of these: it is a reliable transportation method for messages, and may be a great choice for organisations who are looking to publish a large amount of data from the device to the cloud. However, it is not possible to define the semantic of these messages with MQTT, making device management and interoperability impossible.
Since we work with a number of companies who use IoT integrations on very large-scale wireless cloud LANs, like utilities companies or smart city management companies, we typically recommend LwM2M because it requires a low amount of power and bandwidth. LwM2M also works when a network is unreliable, and doesn’t require too many handshakes for messages sent over the network. These features are deeply appreciated by our clients, since devices are often numerous and physically challenging to access and update.
LwM2M & MQTT: Not always an either/or scenario
Although LwM2M is more comprehensive, some organisations have already adopted MQTT for data reporting a number of years ago. They would like to take advantage of LwM2M, but changing their entire system is difficult and costly. The good news is that LwM2M can be used on top of MQTT. Organisations in these scenarios often combine LwM2M to meet their device management needs, and continue to use MQTT for their data reporting.
Much more can be said on this subject, and we’d be happy to discuss the subject in length. You can contact us at the bottom of the page.