Hi All
I would like to share my meter integration to anyone who might find it helpful! Only the parameters i wanted is set up, it should be straight forward to add more. - For device classes check out: Sensor Entity | Home Assistant Developer Docs
First of all, i had a few start problems, since my USB device did not work with the USB 3.0 ports on my Pi4. - Worked like a charm when i moved it to a 2.0 USB port…! I used a SBC-TTL-RS485 from joy-it.net. Bought from a danish store, elextra.dk. Available in many countrys, and probably from many different vendors. - Its a CH340G chip.
I set the meter up with following configuration, which the configuration.yaml file is according to:
Adress: 1
Baudrate: 9600
Pararity: Even
And here is a copy of the configuration.yaml:
modbus:
- name: hub1
type: serial
baudrate: 9600
bytesize: 8
method: rtu
parity: E
port: /dev/ttyUSB0
stopbits: 1
sensors:
#Current
- name: L1 Phase Current
unique_id: IEM3155_L1_Phase_Current
unit_of_measurement: A
address: 2999
slave: 1
scan_interval: 5
data_type: float32
precision: 2
device_class: current
- name: L2 Phase Current
unique_id: IEM3155_L2_Phase_Current
unit_of_measurement: A
address: 3001
slave: 1
scan_interval: 5
data_type: float32
precision: 2
device_class: current
- name: L3 Phase Current
unique_id: IEM3155_L3_Phase_Current
unit_of_measurement: A
address: 3003
slave: 1
scan_interval: 5
data_type: float32
precision: 2
device_class: current
- name: Current Avg
unique_id: IEM3155_Current_Avg
unit_of_measurement: A
address: 3009
slave: 1
scan_interval: 5
data_type: float32
precision: 2
device_class: current
#Voltage
- name: Voltage L1-L2
unique_id: IEM3155_Voltage_L1-L2
unit_of_measurement: V
address: 3019
slave: 1
scan_interval: 5
data_type: float32
precision: 2
device_class: voltage
- name: Voltage L2-L3
unique_id: IEM3155_Voltage_L2-L3
unit_of_measurement: V
address: 3021
slave: 1
scan_interval: 5
data_type: float32
precision: 2
device_class: voltage
- name: Voltage L3-L1
unique_id: IEM3155_Voltage_L3-1
unit_of_measurement: V
address: 3023
slave: 1
scan_interval: 5
data_type: float32
precision: 2
device_class: voltage
- name: Voltage L-L Avg
unique_id: IEM3155_Voltage_L-L_Avg
unit_of_measurement: V
address: 3025
slave: 1
scan_interval: 5
data_type: float32
precision: 2
device_class: voltage
- name: Voltage L1-N
unique_id: IEM3155_Voltage_L1-N
unit_of_measurement: V
address: 3027
slave: 1
scan_interval: 5
data_type: float32
precision: 2
device_class: voltage
- name: Voltage L2-N
unique_id: IEM3155_Voltage_L2-N
unit_of_measurement: V
address: 3029
slave: 1
scan_interval: 5
data_type: float32
precision: 2
device_class: voltage
- name: Voltage L3-N
unique_id: IEM3155_Voltage_L3-N
unit_of_measurement: V
address: 3031
slave: 1
scan_interval: 5
data_type: float32
precision: 2
device_class: voltage
- name: Voltage L-N Avg
unique_id: IEM3155_Voltage_L-N_Avg
unit_of_measurement: V
address: 3035
slave: 1
scan_interval: 5
data_type: float32
precision: 2
device_class: voltage
#Power
- name: Active Power Phase 1
unique_id: IEM3155_Active_Power_Phase_1
unit_of_measurement: kW
address: 3053
slave: 1
scan_interval: 5
data_type: float32
device_class: power
scale: 1
precision: 3
- name: Active Power Phase 2
unique_id: IEM3155_Active_Power_Phase_2
unit_of_measurement: kW
address: 3055
slave: 1
scan_interval: 5
data_type: float32
device_class: power
scale: 1
precision: 3
- name: Active Power Phase 3
unique_id: IEM3155_Active_Power_Phase_3
unit_of_measurement: kW
address: 3057
slave: 1
scan_interval: 5
data_type: float32
device_class: power
scale: 1
precision: 3
- name: Total Active Power
unique_id: IEM3155_Total_Active_Power
unit_of_measurement: kW
address: 3059
slave: 1
scan_interval: 5
data_type: float32
device_class: power
precision: 3
- name: Total Reactive Power
unique_id: IEM3155_Total_Reactive_Power
unit_of_measurement: kVAR
address: 3067
slave: 1
scan_interval: 5
data_type: float32
device_class: power
precision: 3
- name: Total Apparent Power
unique_id: IEM3155_Total_Apparent_Power
unit_of_measurement: kVA
address: 3075
slave: 1
scan_interval: 5
data_type: float32
device_class: power
precision: 3
#Total Energy
- name: Total Active Energy Import
unique_id: IEM3155_Total_Active_Energy_Import
unit_of_measurement: kWh
address: 3203
slave: 1
scan_interval: 5
data_type: int64
device_class: energy
state_class: total_increasing
scale: .001
precision: 2
- name: Total Reactive Energy Import
unique_id: IEM3155_Total_Reactive_Energy_Import
unit_of_measurement: VARh
address: 3219
slave: 1
scan_interval: 5
data_type: int64
device_class: energy
state_class: total_increasing
scale: .001
precision: 2
#Frequency
- name: Frequency
unique_id: IEM3155_Frequency
unit_of_measurement: Hz
address: 3109
slave: 1
scan_interval: 5
data_type: float32
device_class: Frequency
precision: 3
I hope this will be helpful and useful to someone!
Kind regards
Kenneth