mqtt_udp

0

Описание

Simpified version of MQTT over UDP

Языки

  • Java24,2%
  • C20,8%
  • Python20,7%
  • Lua10,5%
  • Go7%
  • PHP6,2%
  • Остальные10,6%
7 лет назад
3 года назад
7 лет назад
3 года назад
7 лет назад
3 года назад
6 лет назад
3 года назад
7 лет назад
3 года назад
7 лет назад
7 лет назад
3 года назад
7 лет назад
7 лет назад
3 года назад
7 лет назад
3 года назад
7 лет назад
README.md

MQTT/UDP

Simpified version of MQTT over UDP: Network is broker!

Codacy Badge Build Status Documentation Status PyPI version

See Russian version / Русская версия здесь

MQTT is a cute simple protocol well suited for IoT and similar things.

But it can be even simpler and still be very usable: MQTT/UDP is merely an MQTT Publish packets broadcast over an UDP.

MQTT/UDP is

  • Extremely simple
  • Extremely fast, minimal possible latency
  • Excludes broker (which is single point of failure)
  • Lowers network traffic (each masurement is sent exactly once to all)
  • Reasonably reliable (if we use it for sensors, which usually resend data every few seconds or so)
  • Can be supported even on a hardware which can not support TCP - in fact, only UDP send is required
  • Zero configuration - a sensor node needs no setup, it just broadcasts its data. (And, if you still need it, MQTT/UDP supports remote configuration over network.)
  • Supports digital signature

For further reading

This repository contains

  • A simple MQTT/UDP implementation in some popular programming languages.
  • A simplest MQTT to MQTT/UDP bridge implementation in Pyton.
  • A tool to send data from MQTT/UDP to OpenHAB
  • A debug application to dump MQTT/UDP traffic (tools/viewer).
  • Other tools and utilities

If you want to help a project

Feel free to:

  • Add implementation in your favorite programming language
  • Write a bridge to classic MQTT protocol (we have very simple one here written in Python)
  • Extend your favorite MQTT broker or IoT system (OpenHAB?) with MQTT/UDP support
  • Check MQTT/UDP specification/implementation against MQTT spec. We must be compatible where possible.

It is really easy.

Reasons to avoid MQTT/UDP

  • You need to transfer long payloads. On some systems size of UDP datagram is limited.
  • You need to know if datagram was delivered for sure. It is impossible with UDP. Though, reliable delivery subsystem is being in development now and will be available soon.

Ways to extend MQTT/UDP

  • It seems to be reasonable to add some kind of signature to packets to prevent data spoofing. Actually, it is already done for Java implementation, C and Pythin will come soon.
  • Broadcast is not the best way to transmit data. Multicast is much better. Though multicast is not so well supported in IoT OS's or monitors.

Fast start instructions

  • Clone repository to local disk
  • Read HOWTO file

Support tools

This repository contains tools to support MQTT/UDP integration and test:

Code examples

Python

Send data:

Listen for data:

Download pypi package

Java

Send data:

Listen for data:

Download JAR

C

Send data:

Listen for data:

Lua

Send data:

Listen for data:

Download LuaRock

Go

There is a Go language implementation, see lang/go for details