Communication

LoRaWAN uplink layout, payload decoding, downlinks, and source references.

LoRaWAN uplink

The device transmits application payloads on LoRaWAN. Payloads include a compact header (command echo, serial, temperatures, voltages, status) followed by measurement data for each active port. Port configuration codes determine how bytes are interpreted; see Harvestree LoRaWAN Payload Decoding and Harvestree Measurements Technical Reference.

Uplink frame layout (summary)

The layout below is kept aligned with the latest Harvestree payload decoding documentation and the reference decoder published by MOIZ (updated as new decoding versions are released).

BytesContentNotes
0last_commandEcho of the last downlink command
1–4port1..port4Configuration code per external port
5–7serial_number24-bit little-endian
8–9boardTemperature, baseTemperature°C = byte − 40 (clamped in firmware)
10–12Packed voltages + statusStorage and thermogenerator voltages; status nibble (frame type and alarm flags)
≥ 13Measurement dataConcatenation of active port payloads

Status nibble (upper part of byte 12): bits 0–1 give the frame type0 keepalive (no port data), 1 normal measurement, 2 alarm. On alarm frames, higher bits can indicate which alarm sources are active. Full bit layout, voltages unpacking, and per-port key names are in Harvestree LoRaWAN Payload Decoding.

Payload decode examples

Example 1 — Keepalive

Payload (hex, illustrative): FF 00 00 00 00 40 5A 00 38 55 2C 00 00

{
  "serial_number": 23104,
  "boardTemperature": 16,
  "baseTemperature": 45,
  "storageVoltage": 3600,
  "thermogenVoltage": 52,
  "status": 0
}

Example 2 — Measurement frame (PT1000 on port 1)

Payload (hex, illustrative): FF 01 00 00 00 5E 5A 00 3F 46 2C C1 10 FA 00

{
  "serial_number": 23118,
  "boardTemperature": 23,
  "baseTemperature": 30,
  "storageVoltage": 3600,
  "thermogenVoltage": 49,
  "status": 1,
  "pt_1": 25.0
}

Manufacturer decoding example (JavaScript)

The manufacturer provides a JavaScript decoding example compatible with ChirpStack v3/v4 and The Things Network:

Downlink

Remote commands use LoRaWAN downlinks on FPort 4 (ACK on FPort 2). See LoRaWAN remote configuration for commands, parameter IDs, encodings, limits, and workflow.

Wired integration (Modbus RTU)

For PLC or gateway polling in Modbus slave mode, see the Modbus register table and Operation (Modbus slave behaviour).