I have 2 energy meters, 1st Carlo Gavazzi EM340 and 1st Carlo Gavazzi EM111 connected to HA via Modbus.
The values I receive in HA do not match the values on the meters at all. What am I doing wrong and how do I fix it?
Here is my .yaml for the energy meters:
- name: modbus-rtu
type: serial
method: rtu
port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
baudrate: 19200
stopbits: 1
bytesize: 8
parity: N
sensors:
# Energymeter 1 (Lägenhet)
# SYS
- name: energymeter-1_v-l-n-sys
unit_of_measurement: V (L-N)
device_class: voltage
slave: 1
address: 259
input_type: holding
precision: 1
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_v-l-l-sys
unit_of_measurement: V (L-L)
device_class: voltage
slave: 1
address: 261
input_type: holding
precision: 1
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_kw-sys
unit_of_measurement: kW
device_class: energy
slave: 1
address: 263
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_kva-sys
unit_of_measurement: kVA
device_class: energy
slave: 1
address: 265
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_kVAR-sys
unit_of_measurement: kVAR
device_class: energy
slave: 1
address: 267
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_pf-sys
unit_of_measurement: Pf
device_class: energy
slave: 1
address: 269
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_hz
unit_of_measurement: Hz
device_class: voltage
slave: 1
address: 273
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_kwh
unit_of_measurement: kWh
device_class: energy
slave: 1
address: 275
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
# L1
- name: energymeter-1_v-l1-l2
unit_of_measurement: V (L1-L2)
device_class: voltage
slave: 1
address: 287
input_type: holding
precision: 1
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_v-l1-n
unit_of_measurement: V (L1-N)
device_class: voltage
slave: 1
address: 289
input_type: holding
precision: 1
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_a-l1
unit_of_measurement: A
device_class: current
slave: 1
address: 291
input_type: holding
precision: 1
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_kw-l1
unit_of_measurement: kW
device_class: energy
slave: 1
address: 293
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_kva-l1
unit_of_measurement: kVA
device_class: energy
slave: 1
address: 295
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_kVAR-l1
unit_of_measurement: kVAR
device_class: energy
slave: 1
address: 297
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_pf-l1
unit_of_measurement: Pf
device_class: energy
slave: 1
address: 299
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
#L2
- name: energymeter-1_v-l2-l3
unit_of_measurement: V (L2-L3)
device_class: voltage
slave: 1
address: 301
input_type: holding
precision: 1
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_v-l2-n
unit_of_measurement: V (L2-N)
device_class: voltage
slave: 1
address: 303
input_type: holding
precision: 1
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_a-l2
unit_of_measurement: A
device_class: current
slave: 1
address: 305
input_type: holding
precision: 1
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_kw-l2
unit_of_measurement: kW
device_class: energy
slave: 1
address: 307
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_kva-l2
unit_of_measurement: kVA
device_class: energy
slave: 1
address: 309
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_kVAR-l2
unit_of_measurement: kVAR
device_class: energy
slave: 1
address: 311
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_pf-l2
unit_of_measurement: Pf
device_class: energy
slave: 1
address: 313
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
# L3
- name: energymeter-1_v-l3-l1
unit_of_measurement: V (L3-L1)
device_class: voltage
slave: 1
address: 315
input_type: holding
precision: 1
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_v-l3-n
unit_of_measurement: V (L3-N)
device_class: voltage
slave: 1
address: 317
input_type: holding
precision: 1
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_a-l3
unit_of_measurement: A
device_class: current
slave: 1
address: 319
input_type: holding
precision: 1
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_kw-l3
unit_of_measurement: kW
device_class: energy
slave: 1
address: 321
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_kva-l3
unit_of_measurement: kVA
device_class: energy
slave: 1
address: 323
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_kVAR-l3
unit_of_measurement: kVAR
device_class: energy
slave: 1
address: 325
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-1_pf-l3
unit_of_measurement: Pf
device_class: energy
slave: 1
address: 327
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
# Energymeter 2 (Förråd)
- name: energymeter-2_a
unit_of_measurement: A
device_class: current
slave: 2
address: 257
input_type: holding
precision: 1
count: 2
scale: 0.1
data_type: int32
- name: energymeter-2_v-l-n
unit_of_measurement: V (L-N)
device_class: voltage
slave: 2
address: 259
input_type: holding
precision: 1
count: 2
scale: 0.1
data_type: int32
- name: energymeter-2_kva
unit_of_measurement: kVA
device_class: energy
slave: 2
address: 265
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-2_kVAR
unit_of_measurement: kVAR
device_class: energy
slave: 2
address: 267
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-2_pf
unit_of_measurement: Pf
device_class: energy
slave: 2
address: 269
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-2_hz
unit_of_measurement: Hz
device_class: voltage
slave: 2
address: 273
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-2_kwh
unit_of_measurement: kWh
device_class: energy
slave: 2
address: 275
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
- name: energymeter-2_kw
unit_of_measurement: kW
device_class: energy
slave: 2
address: 293
input_type: holding
precision: 2
count: 2
scale: 0.1
data_type: int32
The RS485 converter I use is this one.
Documentation on the Modbus protocol for the EM340
Documentation on the Modbus protocol for the EM111