TapHome

Eastron SDM120

Modbus RTU
Submitted by
Last updated: 03. 2026
Eastron SDM120

The Eastron SDM120 is a DIN-rail mounted single-phase energy meter that communicates via Modbus RTU over RS-485. The TapHome template provides 4 devices covering total energy with configurable measurement modes, bidirectional import/export metering, and a standalone current sensor. All register values are IEEE 754 Float32 in Big Endian byte order, read via Modbus function code FC04 (input registers).

The template also exposes module-level service attributes and service actions for reading and changing the Slave ID, baud rate, and stop bit/parity configuration directly from TapHome — no external tools required.

Hardware connection

RS-485 wiring

The SDM120 has a 2-wire RS-485 interface on the bottom terminal block. Connect using a daisy-chain topology:

  • A+ (terminal 4) to A+/D+ on TapHome RS-485
  • B- (terminal 5) to B-/D- on TapHome RS-485

Use a daisy-chain wiring topology only. Star and stub/tee topologies cause signal reflections and data corruption. Terminate each end of the bus with a 120 ohm resistor (0.25 W minimum).

Cable specification:

  • Type: Twisted pair, shielded (Belden 8761 or equivalent)
  • Impedance: 120 ohm
  • Max cable length: 1200 m
  • Max nodes on bus: 32

Configuration

Communication parameters

Baud rate mismatch: The TapHome template defaults to 9600 bps, but the SDM120 factory default is 2400 bps. Communication will fail unless either the meter baud rate is changed to 9600 or the TapHome template baud rate is adjusted to 2400. The recommended approach is to change the meter baud rate to 9600 using the front panel buttons (see the meter’s user manual for the button sequence to access parameter P05).

ParameterMeter DefaultTemplate DefaultOptions
Baud rate240096001200, 2400, 4800, 9600
Data bits88Fixed
ParityNoneNoneNone, Even, Odd
Stop bits111 (with or without parity), 2 (without parity)
Slave ID111-247

Communication parameters can be changed either through the meter’s front panel buttons or remotely via Modbus holding registers. The TapHome template provides service actions for changing the baud rate (H:28), stop bit/parity (H:18), and Slave ID (H:20) directly from the TapHome app.

Slave ID

When connecting multiple SDM120 meters on the same RS-485 bus, each meter must have a unique Slave ID (range 1-247). After importing the TapHome template, adjust the Slave ID in the module connection settings to match the meter. The current Slave ID is readable via the module service attribute.

Enabling Modbus communication

The SDM120 has Modbus RTU enabled by default — no activation steps are required. The meter responds to Modbus requests on its configured baud rate and Slave ID immediately after power-up. To match the TapHome template settings, change the meter’s baud rate from the factory default of 2400 to 9600 bps using one of these methods:

  1. Front panel buttons — navigate to parameter P05 (baud rate) using the meter’s button sequence and set it to 9600
  2. TapHome service action — if initial communication at 2400 bps is established first, use the “Baud Rate” service action on the module to write the new value. After changing, update the TapHome template baud rate setting to match.

Device capabilities

The template creates 4 devices: one total energy meter with configurable measurement modes, bidirectional import/export energy meters, and a standalone current sensor.

Total energy metering
  • Total Energy — single-phase total active energy (A:342, kWh) and active power (A:12, W converted to kW). This is the only read/write device in the template — it supports a measurement mode action that controls how total energy is accumulated. Seven service attributes provide real-time monitoring: voltage (V), current (A), supply frequency (Hz), power factor, apparent power (VA), reactive power (VAr), and total reactive energy (kVArh). A mode service attribute shows the currently active measurement mode.

The measurement mode action writes to holding register H:4111 and accepts four values:

ModeDescription
To GridExport energy only
From GridImport energy only
To Grid + From GridSum of import and export
To Grid - From GridNet energy (import minus export)
Bidirectional energy metering

Two devices track energy flow direction, useful for solar PV installations or bidirectional load monitoring:

  • Export Energy — energy exported to the grid (A:74, kWh) and instantaneous export power derived from negative active power readings (A:12). Includes an export reactive energy service attribute (A:78, kVArh).
  • Import Energy — energy imported from the grid (A:72, kWh) and instantaneous import power derived from positive active power readings (A:12). Includes an import reactive energy service attribute (A:76, kVArh).

The import/export split is achieved by reading the signed active power register (A:12). Positive values indicate grid consumption (import), negative values indicate grid feed-in (export). This is particularly useful for monitoring solar PV self-consumption and grid interaction.

Current monitoring
  • Electric Current — standalone current sensor (A:6, A) for real-time current monitoring. Includes a voltage service attribute read from holding register H:305 with 0.01 scaling — this register is not documented in the official protocol but provides a quick voltage reference.
Additional capabilities

The SDM120 also exposes registers for demand-averaged power (total, import, and export with recorded maximums), current demand with maximum tracking, and phase angle measurement. These can be added in a future template update.

Troubleshooting

No communication
  1. Verify the RS-485 wiring is daisy-chained (not star topology)
  2. Check A/B terminal connections (terminals 4 and 5) — swap A and B if communication fails
  3. Confirm the bus termination: 120 ohm resistor at each end of the bus
  4. Check the baud rate — the most common issue is the mismatch between the meter’s factory default of 2400 bps and the TapHome template default of 9600 bps. Either change the meter to 9600 or adjust the TapHome template to 2400.
  5. Verify the Slave ID in TapHome matches the meter (default 1)
Incorrect readings
  1. If total energy values seem wrong, check the measurement mode (service attribute on the Total Energy device) — the mode affects how energy is accumulated
  2. Verify the correct stop bit/parity setting — the module service attribute shows the current configuration
Register byte order

The SDM120 uses Big Endian byte order (most significant register first) by default. If readings appear as extremely large or small numbers, check the byte order configuration. The TapHome template uses Float32 Big Endian, which matches the meter’s default setting.

Available devices

Eastron SDM120 Module
Service Attributes
Slave ID
Baud Rate
Stop Bit / Parity
Service Actions
Slave ID
Time of Scroll Display
Baud Rate
Stop Bit / Parity

Eastron SDM120

Service Attributes
${device_SlaveId}
modbusr(H, 20, Float)
${baud_rate} [bps]
switch(modbusr(H, 28, Float),0,2400,1,4800,2,9600,5,1200,"Invalid")
${xml_stop_bit} / ${xml_parity}
switch(modbusr(H, 18, Float),0,"1/none",1,"1/even",2,"1/odd",3,"2/none","unknown")
Service Actions
Slave ID
Parameters: Slave ID (1–247 ID)
modbusw(H, 20, Float, ID)
Time of scroll display
Parameters: Time [s] (0–30 t)
modbusw(H, 63744, Uint16, t)
${baud_rate}
Parameters: Baud rate
modbusw(H, 28, Float, Br)
${xml_stop_bit} / ${xml_parity}
Parameters: ${xml_stop_bit} / ${xml_parity}
modbusw(H, 18, Float, sp)
Total Energy Electricity Meter

Single-phase energy and power — total active energy (kWh) and instantaneous power (kW), with configurable measurement mode and 7 service attributes for voltage, current, frequency, power factor, apparent/reactive power, and reactive energy

Register: A:342 (readtotalconsumption), A:12 (readdemand) Float Unit: kWh / kW
Service Attributes
Measurement ModeCurrent energy accumulation mode — To Grid (export only), From Grid (import only), To Grid + From Grid (combined), or To Grid - From Grid (net)
Voltage
Current
Supply Frequency
Power Factor
Apparent Power
Reactive Power
Total Reactive Energy
Service Actions
Measurement ModeSet how total energy is accumulated — controls whether the meter counts import only, export only, combined, or net energy

Total Energy

Read total consumption
MODBUSR(A, 342, Float)
Read demand
MODBUSR(A, 12, Float)/1000
Service Attributes
${xml_mode}
switch(modbusr(H, 63776, uint16), 1, "From Grid", 2, "To Grid + From Grid", 3, "From Grid - To Grid", "Unknown")
${electric_voltage} [V]
tostring(modbusr(A, 0, Float), "F2")
${electric_current} [A]
tostring(modbusr(A, 6, Float), "F2")
${grid_frequency} [Hz]
tostring(modbusr(A, 70, Float), "F2")
${power_factor}
tostring(modbusr(A, 30, Float), "F2")
${apparent_power} [VA]
tostring(modbusr(A, 18, Float), "F2")
${reactive_power} [VAr]
tostring(modbusr(A, 24, Float), "F2")
${total_reactive_energy} [kVArh]
tostring(modbusr(A, 344, Float), "F2")
Service Actions
${xml_mode}
Parameters: ${xml_mode}
modbusw(H, 0x100f, uint16, mode)
Export Energy Electricity Meter Read-only

Energy exported to the grid (feed-in) — export energy (kWh) and instantaneous export power derived from negative active power readings

Register: A:74 (readtotalconsumption), A:12 (readdemand) BigEndianFloat Unit: kWh / kW
Service Attributes
Export Reactive Energy

Export Energy

Read total consumption
MODBUSR(A, 74, Float)
Read demand
var demand := MODBUSR(A, 12, BigEndianFloat) / 1000;
if (demand < 0, return(demand * -1), return(0));
Service Attributes
${total_reactive_energy} [kVArh]
tostring(modbusr(A, 78, Float), "F2")
Electric Current Variable Read-only

Standalone current sensor — real-time current (A) with voltage diagnostic via service attribute

Register: A:6 Float Unit: A
Service Attributes
Voltage

Electric Current

Read
MODBUSR(A, 6, Float)
Service Attributes
Voltage [V]
round(modbusr(H, 0x131, uint16)*0.01)
Import Energy Electricity Meter Read-only

Energy imported from the grid (consumption) — import energy (kWh) and instantaneous import power derived from positive active power readings

Register: A:72 (readtotalconsumption), A:12 (readdemand) BigEndianFloat Unit: kWh / kW
Service Attributes
Import Reactive Energy

Import Energy

Read total consumption
MODBUSR(A, 72, Float)
Read demand
var demand := MODBUSR(A, 12, BigEndianFloat) / 1000;
if (demand < 0, return(0), return(demand));
Service Attributes
${total_reactive_energy} [kVArh]
tostring(modbusr(A, 76, Float), "F2")
Connection: Modbus RTU • 9600 baud• 8N1 • Slave ID: $[SlaveId]
Possible improvements (9)
  • A:36 Phase Angle — Present in sdm_modbus library but NOT in official PDF register map — may be undocumented or firmware-version dependent
  • A:84 Total System Power Demand — Demand-averaged system power (W) — template uses A:12 (instantaneous active power) instead
  • A:86 Maximum Total System Power Demand — Maximum recorded system power demand (W)
  • A:88 Import System Power Demand — Demand-averaged import power (W)
  • A:90 Maximum Import System Power Demand — Maximum recorded import power demand (W)
  • A:92 Export System Power Demand — Demand-averaged export power (W)
  • A:94 Maximum Export System Power Demand — Maximum recorded export power demand (W)
  • A:258 Current Demand — Demand-averaged current (A)
  • A:264 Maximum Current Demand — Maximum recorded current demand (A)

Sources