Skip to main content

lorawan2mqtt

Decode LoRaWAN sensor payloads into clean MQTT / Home Assistant data.

Like Zigbee2MQTT, but for LoRaWAN sensors — without running a full network server stack. This project is being built in the open, starting with its foundation: a community codec database that turns raw LoRaWAN payloads into named, typed values (temperature = 24.1 °C), one JSON file per sensor model.

Status

Component Status
Codec database 🟢 open for contributions
Codec validator + CI 🟢 working (tools/validate.py)
USB bridge (gateway on USB → MQTT + HA Discovery) 🟡 early preview
Home Assistant add-on 🟡 early preview
MQTT bridge (UDP packet forwarder → decoded MQTT + HA Discovery) 🔜 planned

USB bridge — "the Zigbee dongle of LoRaWAN"

Plug an Awaro gateway (firmware 3.4.0+) into any machine over USB: it streams every decoded sensor frame as JSON lines on the serial port, and the bridge republishes them as MQTT + Home Assistant discovery entities — zero cloud, zero WiFi, zero codec configuration on the host:

pip install pyserial paho-mqtt
python -m lorawan2mqtt.usb_bridge --port /dev/ttyUSB0 --mqtt-host 127.0.0.1

Early preview: developed and bench-tested against firmware 3.4.0; the Home Assistant add-on packaging is untested in container yet.

The codec format

A codec is a small JSON file describing how to read a sensor's payload:

{
  "vendor": "acme",
  "model": "TH-1",
  "name": "acme-th1",
  "description": "Temperature & humidity sensor",
  "spec": "temp:i16@0/10#°C hum:u8@2#% bat:u16@3/1000#V",
  "tests": [
    { "fport": 2, "payload": "00F1480BB8",
      "expect": { "temp": 24.1, "hum": 72, "bat": 3.0 } }
  ]
}

The spec grammar is documented in codecs/README.md. Every codec ships with test vectors; CI replays them on every pull request.

These files are directly importable into the Awaro gateway (Decoders tab → Import a file), and will be the decoding engine of the upcoming bridge. Contributing a codec makes your sensor work everywhere at once.

Contributing

  1. Copy codecs/example/example-sensor.json to codecs/<vendor>/<model>.json.
  2. Fill in the fields and at least one real test vector (a payload captured from the sensor).
  3. Check it locally: python tools/validate.py
  4. Open a pull request.

No build environment needed — a codec is just a JSON file.

Maintained by Awaro

This project is maintained by the team behind Awaro — a plug-and-play LoRaWAN gateway (ESP32-S3 + SX1302, 8 channels) with this decoding engine, a local network server, MQTT / Home Assistant / Domoticz integrations built in, and no server to run. If you want lorawan2mqtt without maintaining anything: that's the box.

License

MIT — codecs included. Sensor payload layouts are published by their vendors; each codec file credits its source.

Release files for lorawan2mqtt 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lorawan2mqtt 0.0.2
File Size Uploaded
lorawan2mqtt-0.0.2.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lorawan2mqtt 0.0.2
File Interpreter ABI Platform
lorawan2mqtt-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 13.6 kB

Release files / lorawan2mqtt-0.0.2.tar.gz

Download URL lorawan2mqtt-0.0.2.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
51812a749114e501fceb3f8d4c0d0f5e281c16a926fc5e61501f9a25b031d231
BLAKE2b-256 checksum
How to use checksums
b3d54925c21786c50951f2468401e1768dd2a237e8e1ce07b1a93a39a511ef25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release files / lorawan2mqtt-0.0.2-py3-none-any.whl

Download URL lorawan2mqtt-0.0.2-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8a0ad30b4376d072fd80df3d4e86a840c2d0450bfdb8931a256fc641eea1b3b
BLAKE2b-256 checksum
How to use checksums
123ce2cd0c668c9d59d4e4a77b112a08219eb2bfcfe76b6a7387ef3ca5810846
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page