Skip to content
Dmitry Zavalishin edited this page Jan 30, 2019 · 7 revisions

MQTT/UDP

MQTT/UDP is a UDP broadcast/multicast based protocol derived from MQTT.

MQTT/UDP is extremely simple both in implementation and use.

MQTT/UDP protocol specification

If you want to help MQTT/UDP project

Why MQTT/UDP

Reliability

You don't rely on broker, there is no central point configuration. if your smart home server is dead, your smart home is dead. And you had no backup, and it takes too long to restore. The only thing MQTT/UDP needs to work is Ethernet switch, and if it's dead, you visit local store and take another one from the shelf.

Simplicity

It takes half an evening to implement MQTT/UDP in a new programming language or for a new OS/device. And we already did it in a lot of most populat languages.

Low requirements

No TCP, low memory footprint, less energy to send a measurement update. Battery or energy gathering device? MQTT/UDP!

Lowest possible latency

Just one Ethernet packet directly from source to all destinations. Nothing can be faster.

Zero configuration

In most cases MQTT/UDP device needs no configuration at all. Broadcast address is well known, topic name can be predefined or selected with jumpers. For example - /udp/temperature0

We're working on discovery/configuration extension to support more difficult cases too. The device itself will need no UI or another kind of configuration options.

Use with RS485, simplex mode

With some extension (namely, checksum) MQTT/UDP can be used on simplex channels and/or channels with native broadcast ability (radio,RS485)

Reasonable reliability

UDP is usually assumed to be not reliable, but consider this. With network packet loss rate of 10% TCP is not reliable either - it is nearly just does not work at all. And if we send temperature sensor data with UDP with 10% packet loss it is usually not a problem at all. And in any case is better than TCP connection stall.

Why not

Long payloads

On some systems size of UDP datagram is limited. On others UDP packets will be broken in a few IP packets and reliability will be lower.

More than one listener per computer

First version did not support this, but currently it is OK.

See also