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 Model | Eastron RS485 Terminal | RS485 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)
Pin 9
— Data- –>
T- (B)
Pin 24
— Data- –>
T- (B)
3. Eastron Modbus Register Map
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 Type | Description | Unit |
|---|---|---|---|
| 30001 (0x00) | Float32 | Phase 1 Line Voltage | Volts |
| 30007 (0x06) | Float32 | Phase 1 Line Current | Amps |
| 30013 (0x0C) | Float32 | Total Active Power (System) | Watts |
| 30073 (0x48) | Float32 | Total Import Energy | kWh |
| 30343 (0x156) | Float32 | Total 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.
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:
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:
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 RecommendedIn 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 MappingEndianness 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.
Frequently Asked Questions
Why are my Eastron power values (Watts) showing as negative?
Can I poll the Eastron meter using Function Code 03 (Holding Registers)?
I get an “Illegal Data Address” (Error 02) when polling. How to fix it?
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.
