Home / Support / Integration Hub / Eastron Guide
Protocol Deep Dive

Eastron SDM120 / SDM630 Modbus to MQTT Integration Guide

Struggling with weird scientific notation and garbage float values? Here is the complete Modbus RTU wiring and IEEE 754 decoding guide to polling Eastron smart meters accurately.

1. The Challenge with Eastron Meters

Eastron SDM120 (Single-Phase) and SDM630 (Three-Phase) meters are the global gold standard for EV charger sub-metering, solar export limiting, and tenant billing. They are highly accurate and very affordable.

However, integrating them into a custom SCADA, Node-RED, or enterprise MQTT broker is notoriously difficult. Why? Because Eastron does not use standard 16-bit integers. Every single electrical metric is output as an IEEE 754 32-bit Floating-Point Number. If your software or hardware isn’t configured to decode this specific binary format, you will receive nothing but chaotic garbage values.

2. RS485 Terminal Wiring

Eastron meters have clearly labeled RS485 ports, but the pin numbers vary drastically between the single-phase and three-phase models. Connect them to your RS485 Master gateway using a shielded twisted-pair cable.

Meter ModelEastron RS485 TerminalRS485 Master Gateway
SDM120 (1-Phase)Pin 10 (A)A+ (Data+)
Pin 9 (B)B- (Data-)
SDM630 (3-Phase)Pin 23 (A)A+ (Data+)
Pin 24 (B)B- (Data-)

* Note: Eastron meters are highly sensitive to bus reflection. If you are daisy-chaining multiple meters (e.g., in a tenant building), install a 120Ω termination resistor across A and B on the very last meter.

🔌 Quick Wiring Reference (Eastron -> Valtoris)

SDM120 (Single-Phase)
Pin 10
Pin 9
— Data+ –>

— Data- –>
T+ (A)
T- (B)
SDM630 (Three-Phase)
Pin 23
Pin 24
— Data+ –>

— Data- –>
T+ (A)
T- (B)

3. Eastron Modbus Register Map

🔓 Open-Source Reference

By default, Eastron meters ship with a Baud Rate of 2400 or 9600, with 8 Data Bits, 1 Stop Bit, and NONE or EVEN Parity (Check your meter’s LCD to confirm). The default Slave ID is 1.

Eastron strictly uses Input Registers (Function Code 0x04) for real-time measurements. Each metric spans 2 registers (4 bytes). Feel free to bookmark or share this parameter matrix on technical forums.

Register (Dec)Data TypeDescriptionUnit
30001 (0x00)Float32Phase 1 Line VoltageVolts
30007 (0x06)Float32Phase 1 Line CurrentAmps
30013 (0x0C)Float32Total Active Power (System)Watts
30073 (0x48)Float32Total Import EnergykWh
30343 (0x156)Float32Total Active Energy (Import + Export)kWh

The IEEE 754 Endianness Trap

Because standard Modbus RTU is a 16-bit protocol, it has no native concept of “Floats”. Eastron breaks the 32-bit float into two 16-bit words. If your software reads the voltage as 1.43e-42 instead of 230.5, your Byte Order is inverted. You must apply a word-swap (commonly changing from ABCD to CDAB or BADC format) to reconstruct the float correctly.

Live Modbus Float32 Endianness Decoder

Seeing garbage data in your console? Enter your two consecutive Eastron registers raw 16-bit integer values below to instantly verify which byte-order format gives you the correct real-world measurement.

Big-Endian (ABCD)
Word Swap (CDAB) – Eastron
Byte Swap (BADC)
Little-Endian (DCBA)

4. Integration Architecture: DIY Scripts vs. Edge Gateways

Decoding Float32 data gives you two options: writing your own parsing scripts (acceptable for single-site hobbyists) or deploying a hardware edge bridge (mandatory for commercial scalability).

⚙️ Option A: Software Parsing (Home Assistant & Node-RED)

If you are using a Raspberry Pi with a USB-RS485 adapter, you must handle the byte-swapping programmatically. Here are the ready-to-use snippets for popular platforms.

1. Home Assistant (configuration.yaml)

If you are using a Valtoris gateway to push JSON to your MQTT broker, copy this directly into your HA config to map the Eastron entities instantly:

# Copy to your configuration.yaml mqtt: sensor: – name: “Eastron SDM Phase 1 Voltage” state_topic: “valtoris/eastron/meter1” value_template: “{{ value_json.phase_1_voltage }}” unit_of_measurement: “V” device_class: voltage – name: “Eastron SDM Total Power” state_topic: “valtoris/eastron/meter1” value_template: “{{ value_json.total_active_power }}” unit_of_measurement: “W” device_class: power
2. Node-RED (CDAB Float Decoder Function)

If you are polling Modbus directly via Node-RED, you will receive an array of two 16-bit integers (e.g., msg.payload = [17254, 13107]). Drop this code into a Function Node to reconstruct the Eastron float:

// Eastron Word Swap (CDAB) to Float32 Decoder let buf = Buffer.alloc(4); // Write Low Word (Register 2) first buf.writeUInt16BE(msg.payload[1], 0); // Write High Word (Register 1) second buf.writeUInt16BE(msg.payload[0], 2); // Read back as Float msg.payload = parseFloat(buf.readFloatBE(0).toFixed(2)); return msg;
⚠️ The Commercial Scaling Trap

Python scripts and Node-RED flows running on a Pi are fine for a single home EV charger. But when you daisy-chain 15 Eastron meters in a commercial tenant building, the synchronous polling loops will crash, SD cards will corrupt under constant read/writes, and your script will throw endless timeout exceptions due to RS485 bus collision.

🏢 Option B: Edge-Processing Gateway

Enterprise Recommended

In commercial deployments, handling byte-swapping at the OS/Software level creates severe point-of-failure risks. You should handle Endianness at the hardware edge.

Zero-Code GUI: Valtoris Float32 Mapping

Endianness programming can be totally skipped using the Valtoris Vircom configuration tool. Simply select the CDAB format, and the gateway’s CPU handles the math natively.

Resulting MQTT JSON Payload Sent to ThingsBoard / AWS:

{
  “meter_id”: “SDM630_Main”,
  “phase_1_voltage”: 230.5,
  “total_active_power”: 14500.2,
  “total_import_energy”: 456.8
}
  • Native Float32 Translation: The industrial firmware of the gateway decodes IEEE 754 natively. No Node-RED buffer parsers needed.
  • ThingsBoard Ready: The clean JSON output shown above maps automatically to ThingsBoard telemetry without any Rule Engine scripting.
  • Prevents Bus Lockups: Built-in hardware watchdogs and RS485 optical isolation guarantee 24/7 uptime for daisy-chained meters.

Bridge Modbus to MQTT Instantly

Explore VT-DTU Edge Gateways →

Deploying to the Field? Take the Cheat Sheet.

Save the official Application Note (PDF) to your tablet for offline access to the wiring diagrams and Modbus Hex payload analysis.

Download Free PDF

Frequently Asked Questions

Why are my Eastron power values (Watts) showing as negative?
If your active power readings are negative, the Current Transformers (CT clamps) are installed backwards. The arrow on the CT clamp must always point in the direction of the load (from the grid to the consumer). Simply unclip the CT and reverse its orientation on the live wire.
Can I poll the Eastron meter using Function Code 03 (Holding Registers)?
No. Real-time metrics (Voltage, Current, Power) on Eastron meters are strictly stored as Input Registers and must be queried using Modbus Function Code 04. 03 is the Function Code to read configuration information ( network settings , etc . ) that is not often needed in normal use .
I get an “Illegal Data Address” (Error 02) when polling. How to fix it?
This happens if you try polling a starting register address that does not exist or if you request an odd number of registers for a Float32 value. Each Eastron metric is 2 registers (4 byte) in size so you always need to ask for a length of2 when polling for a specific measurement such as Voltage (30001).

Scaling Your Energy Monitoring Project?

Don’t waste engineering hours debugging Python scripts and fighting bus collisions. Tell our OT networking experts about your meter topology and we’ll spec the exact Edge Gateway to push clean JSON payloads directly to your cloud.

SKU/Part No.