Hager Hager Hager XEM with EMC flow R2 (grid) Modbus TCP template

Hager Hager XEM with EMC flow R2 (grid)

The Hager XEM470 is a DIN-rail energy management controller (EMC) at the heart of the Hager flow R2 home energy system, measuring three-phase grid power and per-phase currents at the grid connection point. This Modbus TCP template reads phase currents on L1, L2, and L3 (registers 4099 to 4101) and total active grid power (register 4102), giving your ModbusCloud portal a live view of grid import and export. Installers use these readings to enforce load limits, detect phase imbalance, and feed grid data into energy dashboards without additional external meters.

Protocol
Modbus TCP
Connection
Ethernet, Modbus TCP
Registers
4, read only
Brand
Hager
Last updated

Registers (4)

4 read, 0 write

NameUnitAccessAddress (Hidden until you enter your email)Function (hidden)Type (hidden)
currents_aARead
currents_bARead
currents_cARead
powerWRead

Loading registers…

Send your device list

If a device is not in the library yet, we build the template for free as soon as we have the register data.

Number of installations (optional)

Use cases

  • Monitor total active grid power in real time to detect unexpected import or export events.
  • Track per-phase currents on L1, L2, and L3 to identify phase imbalance across connected loads.
  • Alert on grid power exceeding a defined threshold to trigger demand-response or load-shedding actions.
  • Compare grid power readings over time to verify that self-consumption targets are being met.
  • Report daily grid import and export trends to building owners for energy cost analysis.

Installation

  1. Confirm the Hager XEM470 is connected to the local LAN via its Ethernet port and has a valid IP address assigned, either by DHCP or static configuration via the embedded web interface.

  2. Connect the ModbusCloud Gateway to the same LAN segment as the XEM470 and verify network reachability between the two devices on TCP port 502.

  3. In the ModbusCloud portal, add a new device, import the Hager XEM470 EMC flow R2 (grid) template, and enter the XEM470's IP address and Modbus unit ID (default is 1 unless changed in the device configuration).

  4. Trigger a manual poll in the portal and verify that registers 4099 to 4102 return plausible values: phase currents should reflect the actual load, and active power should show a signed watt reading matching grid flow direction.

Things to watch for

All four registers return zero or no response. What is wrong?

Verify the XEM470 has an active LAN connection and that TCP port 502 is reachable from the ModbusCloud Gateway. Check that the unit ID configured in the portal matches the device's Modbus slave address. Also confirm the XEM470 firmware is up to date, as earlier versions had limited Modbus TCP support.

Phase current values look wrong or wildly high. Why?

The currents registers (4099 to 4101) are uint16 and the XEM470 applies a scaling factor internally. If your portal displays raw counts without applying the correct divisor documented in the Hager Modbus table, readings will appear inflated. Cross-check the scaling for your firmware revision against the official Hager Modbus register document.

The active power register shows a constant value and does not update. What should I check?

Register 4102 is an int32 spanning two consecutive 16-bit holding registers. Confirm the ModbusCloud Gateway is reading two registers starting at address 4102 with FC3, and that big-endian word order is used. A single-register read or swapped word order will produce a stuck or garbage value.

The gateway connects but values jump between correct readings and large negative numbers.

The power register is a signed int32. Negative values indicate grid export (energy flowing back to the grid) and are normal during PV surplus. If the sign oscillates unexpectedly, check that no other Modbus master is polling the device simultaneously, as concurrent masters on TCP can cause incomplete reads and data corruption.

Want to see how it works?

Electrician working in an open distribution board