> ## 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 SDM230-LoRa

## Identifying your meter

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

![Eastron SDM230-LoRa](https://storage.crisp.chat/users/helpdesk/website/66a70a6ed8fbb400/eastron-sdm230-lora-medium_hpt7fr.png)

## Connecting your meter to a LoRaWAN Network Server

The SDM230-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 SDM230-LoRa to your existing system. [Contact us](mailto:sales@cthings.io) to find out more.

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

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

All SDM230-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 SDM230-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).

| 01354BEC 01 14 3C83126F 436D3798 00000000 3F800000 4248320D F792

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 | 01354BEC | 20270060  |
| 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 | 3C83126F | 0.016 |
| 10-13 | Voltage | FLOAT | 436D3798 | 237.217163 |
| 14-17 | Current | FLOAT | 00000000 | 0 |
| 18-21 | Power Factor | FLOAT | 3F800000 | 1 |
| 22-25 | Frequency | FLOAT | 4248320D | 50.0488777 |
| 26-27 | Modbus Checksum | - | F792 | - |

## Custom Configurations

Your SDM230-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
### Fragmentation

By default, the SDM230-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_.

| 01354BEC 01 0c 00000000 4376b005 3f800010 8D 09
| 01354BEC 02 0c 3f800000 42480000 00000000 61 dc