Schneider IEM3155 energy meter with usb to RS485

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! :open_mouth:

Kind regards

Kenneth

2 Likes

Well, two danes with the same Energy Meter. What are the odds on that exactly ? :slight_smile:

I went with an ESPHome config for my Home Assistant integration.
In my usecase much easier with the wireless ESPHome node next to the circuit breaker panel.
Cross link ref. to my ESPHome config here: Schneider IEM3155 Energy Meter - Sending Modbus custom_command

Regards
Henning

Hej Henning
Nice to hear from you. - I had a few looks on your integration for inspiration :slight_smile:

1 Like

hey many thanks for the yaml config, so I dont have manually type all of those :smiley: however I use RS485 to wifi gateway (my HA machine is so far away from the electrical panel).

However, did you manage to get the power factor working? somehow I cannot get it to work. When getting the value manually using modbus client on PC I can see the value.

      - name: IEM3155 Total Power Factor
        unique_id: IEM3155_Total_Power_Factor
        unit_of_measurement: cosф
        slave: 10
        address: 3083
        input_type: input
        scan_interval: 5
        device_class: power_factor
        scale: 1
        offset: 0
        precision: 1
        data_type: float32

Hi Tesna

I havent imported that value, so no :slightly_smiling_face:

I see you set precision to 1, maybe try setting it to 0,01, the value should be 0,XX.

Have you been checkin up against Schneider parameter list?, they might be scaling this value?

I thats no help to the solution, ill be happy to give it a go some time during the upcoming weekend!

Kind regards

Kenneth

Nevermind, I managed to get it to work. I remove the input_type then the value shows up, set the precision to 4 then it gives more detailed number. There are few address showing the power factor tho, and I use this one. Again, many thanks of your work on the config!

      - name: IEM3155 Total Power Factor
        unique_id: IEM3155_Total_Power_Factor
        unit_of_measurement: cosф
        slave: 10
        address: 3191
        scan_interval: 5
        device_class: power_factor
        offset: 0
        precision: 4
        data_type: float32

Btw, do you know why we need to offset -1 on the addresses? for example in the manual the address of Current phase A is 3000 however in home assistant we need to put 2999.