Skip to content

LoRaWAN Driver

dc3-driver-lorawan ingests LoRaWAN uplinks by subscribing to ChirpStack MQTT topics (application/+/device/+/event/up). It decodes the JSON payload, caches the latest FRMPayload (base64) and Cayenne LPP object fields per DevEUI, and publishes downlink commands to the ChirpStack command/down topic.

Protocol background

LoRaWAN devices send uplinks through a gateway to a network server (ChirpStack). ChirpStack exposes uplinks over MQTT; this driver subscribes to those topics, matching points by DevEUI. A point field selects a Cayenne LPP object key; an empty field returns the raw base64 payload.

  • Driver name / code: LoRaWAN Driver / LorawanDriver
  • Type: DRIVER_SERVER (subscribes to ChirpStack MQTT uplinks)
  • Underlying library: Eclipse Paho MQTT v3 + Jackson

Attribute configuration

Driver attributes (device-level driver-attribute)

AttributecodeTypeDefaultDescription
Application IDapplicationIdSTRING(empty)ChirpStack application ID for downlink commands
Broker URIbrokerUriSTRINGtcp://dc3-mqtt:1883MQTT broker URI for ChirpStack events
Subscribe TopictopicSTRINGapplication/+/device/+/event/upMQTT uplink topic filter
UsernameusernameSTRING(empty)MQTT broker username (optional)
PasswordpasswordSTRING(empty)MQTT broker password (optional)

Point attributes (point-attribute)

AttributecodeTypeDefaultDescription
DevEUIdevEuiSTRING(empty)LoRaWAN device EUI (16 hex characters)
FieldfieldSTRING(empty)Cayenne LPP object field; empty returns raw base64

Command attributes (command-attribute)

AttributecodeTypeDefaultDescription
DevEUIdevEuiSTRING(empty)LoRaWAN device EUI for downlink

Collection and health

  • Collection cycle: default cron 0/30 * * * * ?.
  • Health/online: device health defaults to cron 0/15 * * * * ?, lease timeout 45 seconds.

Capability matrix

CapabilitySupportedNotes
Read✓ (latest cached uplink)
Write✓ (downlink publish)
Subscribe

Implementation status: usable ::

The MQTT connection is established lazily on first read/write, so startup tolerates a temporarily unreachable broker; messageArrived parses deviceInfo.devEui, data, and the Cayenne LPP object.

Minimal onboarding example

  1. Create a Device using LoRaWAN Driver, set applicationId=<your-app-id> and brokerUri to your ChirpStack MQTT broker.
  2. Add a Point (READ_ONLY) with devEui=<device-eui> and field=temperature.
  3. Start the driver; the next uplink is cached and served as the point value.

Further reading

Last updated:

Released under the AGPL-3.0 License