Hey everyone, I’m trying to integrate my Carlo Gavazzi EM24 meter into Home Assistant using Modbus TCP. I’ve set up the configuration in my configuration.yaml file, but I’m running into some issues. Here’s what I’ve done so far:
I added the following Modbus configuration:
yaml
modbus:
- name: EM24
type: tcp
host: 192.168.1.10
port: 502
sensors:- name: EM1 Phase 1 voltage
address: 0
slave: 1
unique_id: em1_phase_1_voltage
data_type: int32
device_class: voltage
input_type: input
precision: 2
scale: 0.1
state_class: measurement
swap: word
unit_of_measurement: V
- name: EM1 Phase 1 voltage
When I check the logs, I see this error:
text
2025-07-06 16:22:33.481 WARNING (MainThread) [pymodbus.logging] Failed to connect [Errno 111] Connect call failed (‘192.168.1.10’, 502)
2025-07-06 16:22:34.137 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: EM24: Error: device: 1 address: 0 → Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.1.10:502]
I know the meter is working because I can connect to it using the Carlo Gavazzi UCS7 software and Open Mod Scan. Both tools show the registers correctly. I’m wondering if there’s something I’m missing in the Home Assistant configuration or if there’s a known issue with the Modbus component.
Has anyone else successfully integrated a Carlo Gavazzi meter using Modbus TCP? Any tips or suggestions would be greatly appreciated! I’m looking forward to expanding my setup with multiple meters once this is sorted out.
Thanks in advance for your help!