Modbus integration for EMU Smart Meter

Hi guys, hope you had a relaxed Christmas period.
I am using HA as a docker installation on a Synology NAS, mainly configuring my integrations and dashboards using the graphic lovelace features. So I am not an expert regarding YAML files.
Having said that, I need some help for a modbus integration in oder to read the electric energy consumption from 11 EMU preofessional II smart meters using Modbus.
What I have done so far in oder to receive readings from one of the 11 is the following:

  1. add the followeing line to my configuration.yaml:
    energy: !include modbus.yaml
  2. create a file called modbus.yaml with the following content:

example configuration.yaml entry for multiple TCP connection

modbus:

  • name: gebc_1
    type: tcp
    host: 192.168.2.53
    port: 502
    sensors:
    • name: gebc_1
      slave: 1
      address: 7999
      input_type: holding
      unit_of_measurement: kWh
      device_class: energy
      state_class: total_increasing
      scale: 0.01
      offset: 0
      precision: 2
      data_type: uint32

I expected to see an entity called geb_c1 and get some readings, depending on the address chosen from the list provided by EMU

So far no success, unfortunately. Can anybody give me some hints, as to what I am dooing wrong here? Or what might be missing?
Thanks in advance
Rainer

Hi,

Give InDriver a try at https://inanalytics.io. It’s free software that allows you to connect Modbus Devices to SQL Databases and process code data in JavaScript.

For dashboards, I recommend using Grafana. Here’s a link to a demo of home energy consumption visualization: Grafana.

Grafana is also free!

Hi Andrzej,
thanks or the tip. I’ve got them all visualized in Grafana already. There is a particular reason, why I want to see them im Home Assistant. The main meter, owned by the power supplier does not allow permanent reading from an IR head. Therefor I need to to switch the IR head on and off using a script in HA. In order not having to switch back and forth between HA and Grafana, I want to integrate the EMU meters in HA meters using Modbus.
Thanks for the idea but It does not work for me
Rainer

Just stumbling across this thread, having the same problem (and an HA newbie :wink: ) - did you manage to get the EMU Modbus running?

Hi Theo, I used the help from some Software specialists working in the same premises as I do.
What we did is: My HA is running on a Synology NAS as a container installation
We installed an influx DB , Node Red, Mosquitto and Grafana, all as container installations as well.
The influx DB collects the data from the meters. Some process creates MQTT data from the data collected. Node Red routes the data to Grafana. I can see the data there. In oder to see them in HA, I need to adapt the configuration.yaml for each meter individually. But to be honest without the help from the nerds, who helped me, I would not have had a chance.
I hope you will manage to integrate the meter. The trick seems to be to get the data in MQTT format.
Cheers Rainer

Thanks Rainer, thanks for your quick response! I am “starting” to see it work - partial problem was the new EMU Professional II having a different modbus register mapping. My Meter is a little older - an EMU Professional 3/75. I can access the values with this yaml (also needs subtraction of 1 from the register address, apparently 0 based indexing…):

modbus:
  name: emu_375
  type: tcp
  host: 192.168.2.6
  port: 502
  sensors:
    - name: emu_Power_Import
      address: 4201
      input_type: holding
      data_type: uint64
      scan_interval: 1
      slave: 1
      unit_of_measurement: kWh
      device_class: energy
      state_class: total_increasing
      scale: 0.001
      offset: 0
      precision: 3
    - name: emu_Power_Export
      address: 4281
      input_type: holding
      data_type: uint64
      scan_interval: 5
      slave: 1
      unit_of_measurement: kWh
      device_class: energy
      state_class: total_increasing
      scale: 0.001
      offset: 0
      precision: 3
    - name: emu_Power
      address: 4527
      input_type: holding
      data_type: uint32
      scan_interval: 1
      slave: 1
      unit_of_measurement: kW
      device_class: energy
      state_class: measurement
      scale: 0.001
      offset: 0
      precision: 3

I found a free command line utility “modpoll 3.16” that was helpful in accelerating the debugging.

C:\util\modpoll-3.16>modpoll.exe -1 -m tcp -t 4:i64 -i -f -r 4202 -c 1 192.168.2.6
modpoll 3.16 - FieldTalk™ Modbus(R) Master Simulator
Copyright (c) 2002-2025 proconX Pty Ltd
Visit https://www.modbusdriver.com for Modbus libraries and tools.

Protocol configuration: MODBUS/TCP, FC3
Slave configuration…: address = 1, start reference = 4202, count = 1
Communication…: 192.168.2.6, port 502, t/o 1.00 s, poll rate 1000 ms
Data type…: 64-bit integer, holding register table
Word swapping…: Slave configured as big-endian word and float machine

– Polling slave…
[4202]: 103085734

Now the next step - which value do I map to the energy dashboard, the accumulating total power or the current active power - and is this the right path overall or do I better go via MQTT or RedNode; darn learning curve :wink:

Thanks again for your help!!
Theo

Hi Theo,

my configuration.yaml looks like this:
mqtt:
sensor:

  • name: “Solarfeld”
    unique_id: “Solarfeld”
    value_template: “{{ value_json.zaehlerstand }}”
    state_topic: “Solarfeld”
    unit_of_measurement: “kWh”
    state_class: total
    device_class: energy
  • name: “Geb_A”
    unique_id: “Geb_A”
    value_template: “{{ value_json.zaehlerstand }}”
    state_topic: “GebA”
    unit_of_measurement: “kWh”

I am not really interested in the power, I need to the energy over time in order to know how much energy my customers have used.

Cheers

Rainer