> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.cthings.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Decoding data from the Eastron SDM320-LoRa

## Identifying your meter

The Eastron SDM320-LoRa is a single phase DIN rail mounted electricity meter that communicates over LoRaWAN. As illustrated by the image (left) below it will say **SDM320C** directly to the right of the Eastron logo. The Serial Number (SN) is located on top, above the display as displayed in the image (right).

![Eastron SDM320-LoRa](https://storage.crisp.chat/users/helpdesk/website/-/6/6/a/7/66a70a6ed8fbb400/screenshot-2025-09-25-at-16294_165zy5g.png =805xauto)

## Connecting your meter to a LoRaWAN Network Server

The SDM320-LoRa can be connected to any LoRaWAN Network Server (LNS) including TTN, TTI, Chirpstack and Loriot amongst others. cThings Cloud provide an end-to-end in-built LNS with pre-configured decoders to facilitate connecting the SDM320-LoRa to your existing system. [Contact us](mailto:sales@cthings.io) to find out more.

|| The SDM320-LoRa must be setup as a Class-C device

## Decoding the default data received from the SDM530-LoRa

All SDM320-LoRa meters come with a default configuration pre-installed. If a custom configuration has been requested, see the section below on custom configurations. 

By default, data will be sent from the SDM320-LoRa every 30 minutes. Below is an example hex encoded payload that could be sent from a default configured meter (it has been conveniently separated into chunks to match the decode in the table below).

| 0EEC3B41 01 14 4343774C 000000FF 00000000 44C4A732 40D2E214 77C4

The meter will send the data in a single payload with the 5 default parameters. The below table shows how to decode the payload and parameters.

| Byte Range | Description | Data Type | Example Hex | Decoded |
| ---- |
| 0-3 | Serial Number | UINT32 | 0EEC3B41 | 250362689 |
| 4 | Message Fragment Number (always 1 for default configuration) | UINT8 | 01 | 1 |
| 5 | Number of Parameter Bytes in this Payload (always 20 for default configuration) | UINT8 | 14 | 20 |
| 6-9 | Total kWh | FLOAT | 4343774C | 745.036 |
| 10-13 | Relay state | FLOAT | 000000FF | Relay active |
| 14-17 | Digital input state | FLOAT | 00000000 | False |
| 18-21 | Active Power | FLOAT | 44C4A732 | 1573.225 |
| 22-25 | Current | FLOAT | 42C5DA1D | 6.59009743 |
| 26-27 | Modbus Checksum |  | 77C4 |  |

## Custom Configurations

Your SDM320-LoRa may have been configured to send different parameters in a different order. If this is the case, you should have received more information about your custom configuration when you ordered your meter.

## Advanced Decoding
### Decoding the Relay State 

The command `01 03 fc b0 00 01 b5 bd` returns the Relay State at position 0 (XX YY) and the DI State at position 1 (XX YY) where the following value mappings exist.

| Value | DI State | Relay State |
| ---- |
| 00 00 | FALSE | Supply Inactive |
| 00 FF | FALSE | Supply Active |
| FF 00 | TRUE | Supply Inactive |
| FF FF | TRUE | Supply Active |

### Fragmentation

By default, the SDM320-LoRa will send 5 parameters in a single payload (one message fragment). For non-standard configurations more parameters may be sent in which case the payload may be fragmented across multiple LoRaWAN payloads. Each parameter will always be 4 bytes in length, starting from byte 6 (0-based) and the final 2 bytes of the message will always be a 2 byte *Modbus Checksum*.

| 001435FC 01 18 4343774C 000000FF 00000000 185B
| 001435FC 02 18 44C4A732 40D2E214 000000FF D821