Ich versuche einen Carlo Gavazzi Zähler EM24-E1-AV2 X in HA einzubinden.
Dazu habe ich die config. yaml um diese Einträge erweitert.
Zum Test nur mit einem Sensor:
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
Im homeassistance.log bekomme ich folgenden Fehler:
2025-07-06 16:22:31.047 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
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]
Was mache ich falsch?
Bin dankbar für jeden Tip.
Möchte im nächsten Schritt mehrere Zähler einbinden.
In der Konfigurationssoftware von Carlo Gavazzi UCS7 funktioniert die Verbindung:
Auch wenn der Beitrag schon gelöst ist bzw auch etwas älter, aber eventuell für den Ein oder Anderen interessant.
Ich bekam mit den Werten keine plausiblen Daten, daher habe ich nochmal genauer nachgeschaut und bin nach dem PDF gegangen, welches für ein EM24_E1_CP gilt: https://www.gavazziautomation.com/fileadmin/images/PIM/OTHERSTUFF/COMPRO/EM24_E1_CP.pdf
Hier dazu eine passende YAML:
modbus:
- name: zaehler
type: tcp
host: 192.168.33.246
port: 502
sensors:
################
# Spannungen
################
- name: EM24_V_L1_N
slave: 1
address: 2 # V L1-N
input_type: input
data_type: int32
swap: word
unit_of_measurement: V
scale: 0.1
precision: 1
device_class: voltage
state_class: measurement
- name: EM24_V_L2_N
slave: 1
address: 4 # V L2-N
input_type: input
data_type: int32
swap: word
unit_of_measurement: V
scale: 0.1
precision: 1
device_class: voltage
state_class: measurement
- name: EM24_V_L3_N
slave: 1
address: 6 # V L3-N
input_type: input
data_type: int32
swap: word
unit_of_measurement: V
scale: 0.1
precision: 1
device_class: voltage
state_class: measurement
- name: EM24_V_L1_L2
slave: 1
address: 8 # V L1-L2
input_type: input
data_type: int32
swap: word
unit_of_measurement: V
scale: 0.1
precision: 1
device_class: voltage
state_class: measurement
- name: EM24_V_L2_L3
slave: 1
address: 10 # V L2-L3
input_type: input
data_type: int32
swap: word
unit_of_measurement: V
scale: 0.1
precision: 1
device_class: voltage
state_class: measurement
- name: EM24_V_L3_L1
slave: 1
address: 12 # V L3-L1
input_type: input
data_type: int32
swap: word
unit_of_measurement: V
scale: 0.1
precision: 1
device_class: voltage
state_class: measurement
################
# Ströme
################
- name: EM24_A_L1
slave: 1
address: 14 # A L1
input_type: input
data_type: int32
swap: word
unit_of_measurement: A
scale: 0.001 # laut Protokoll mA*1
precision: 3
device_class: current
state_class: measurement
- name: EM24_A_L2
slave: 1
address: 16 # A L2
input_type: input
data_type: int32
swap: word
unit_of_measurement: A
scale: 0.001
precision: 3
device_class: current
state_class: measurement
- name: EM24_A_L3
slave: 1
address: 18 # A L3 (wenn laut Protokoll so belegt)
input_type: input
data_type: int32
swap: word
unit_of_measurement: A
scale: 0.001
precision: 3
device_class: current
state_class: measurement
################
# Wirkleistung
################
- name: EM24_W_L1
slave: 1
address: 18 # W L1
input_type: input
data_type: int32
swap: word
unit_of_measurement: W
scale: 0.1
precision: 1
device_class: power
state_class: measurement
- name: EM24_W_L2
slave: 1
address: 20 # W L2
input_type: input
data_type: int32
swap: word
unit_of_measurement: W
scale: 0.1
precision: 1
device_class: power
state_class: measurement
- name: EM24_W_L3
slave: 1
address: 22 # W L3
input_type: input
data_type: int32
swap: word
unit_of_measurement: W
scale: 0.1
precision: 1
device_class: power
state_class: measurement
- name: EM24_W_Total
slave: 1
address: 24 # W Σ
input_type: input
data_type: int32
swap: word
unit_of_measurement: W
scale: 0.1
precision: 1
device_class: power
state_class: measurement
################
# Schein‑ & Blindleistung
################
- name: EM24_VA_Total
slave: 1
address: 42 # VA Σ
input_type: input
data_type: int32
swap: word
unit_of_measurement: VA
scale: 0.1
precision: 1
device_class: apparent_power
state_class: measurement
- name: EM24_var_Total
slave: 1
address: 44 # var Σ
input_type: input
data_type: int32
swap: word
unit_of_measurement: var
scale: 0.1
precision: 1
device_class: reactive_power
state_class: measurement
- name: EM24_PF_Total
slave: 1
address: 46 # PF Σ
input_type: input
data_type: int16
unit_of_measurement: ""
scale: 0.001 # laut Protokoll
precision: 3
device_class: power_factor
state_class: measurement
################
# Frequenz
################
- name: EM24_Frequency
slave: 1
address: 51 # Frequency
input_type: input
data_type: int16
unit_of_measurement: Hz
scale: 0.1
precision: 2
device_class: frequency
state_class: measurement
################
# Energie – Gesamt
################
- name: EM24_kWh_Import_Total
slave: 1
address: 52 # kWh (+) total
input_type: input
data_type: int32
swap: word
unit_of_measurement: kWh
scale: 0.1
precision: 2
device_class: energy
state_class: total_increasing
- name: EM24_kWh_Export_Total
slave: 1
address: 78 # kWh (-) total
input_type: input
data_type: int32
swap: word
unit_of_measurement: kWh
scale: 0.1
precision: 2
device_class: energy
state_class: total_increasing
################
# Energie – je Phase
################
- name: EM24_kWh_Import_L1
slave: 1
address: 70 # kWh (+) L1
input_type: input
data_type: int32
swap: word
unit_of_measurement: kWh
scale: 0.1
precision: 2
device_class: energy
state_class: total_increasing
- name: EM24_kWh_Import_L2
slave: 1
address: 72 # kWh (+) L2
input_type: input
data_type: int32
swap: word
unit_of_measurement: kWh
scale: 0.1
precision: 2
device_class: energy
state_class: total_increasing
- name: EM24_kWh_Import_L3
slave: 1
address: 74 # kWh (+) L3
input_type: input
data_type: int32
swap: word
unit_of_measurement: kWh
scale: 0.1
precision: 2
device_class: energy
state_class: total_increasing
- name: EM24_kWh_Export_L1
slave: 1
address: 86 # kWh (-) L1
input_type: input
data_type: int32
swap: word
unit_of_measurement: kWh
scale: 0.1
precision: 2
device_class: energy
state_class: total_increasing
- name: EM24_kWh_Export_L2
slave: 1
address: 88 # kWh (-) L2
input_type: input
data_type: int32
swap: word
unit_of_measurement: kWh
scale: 0.1
precision: 2
device_class: energy
state_class: total_increasing
- name: EM24_kWh_Export_L3
slave: 1
address: 90 # kWh (-) L3
input_type: input
data_type: int32
swap: word
unit_of_measurement: kWh
scale: 0.1
precision: 2
device_class: energy
state_class: total_increasing