Modbus energy meter in configuration.yaml

hello

how can i get values such as “L1-N Voltage” from register 30001 into homeassitant ?
via modbus scanners i can connect and poll the modbus …
it shows 2 registers , and in modbusppoll i can format it as Float inverted to get a decimal value ( eg : 220 V ) ( while the registers values were 17252 and 41950)

i tried some entities in the configuration.yaml , but nothing works.

i know there is a modbus tutorial , but i’m a mere mortal about modbus terminolgy , coil , holding ,

the way i see modbus, , is a big table to get date from but complicated
i want to avoid node red as first approach .

lovelace values that are wrong , and only show 1register instead of 2 combined

datasheet energymeter modbus

# Example yaml: typical serial connection
modbus:
  - name: modbus_hub
    type: serial
    port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0  #/dev/ttyUSB1  #
    baudrate: 9600
    bytesize: 8
    method: rtu
    parity: N
    stopbits: 1
    
 

#voltage FC4 read input regisiters adr 0  aantal2

    sensors:
      - name: modbusRoom_1
        scan_interval : 5
        slave: 2
        address: 0
        input_type: holding
        unit_of_measurement: Volt
        state_class: measurement
        scale: 1
        offset: 0
        precision: 0

  
      - name: modbusRoom_2
        scan_interval : 5
        slave: 2 # adres modbus module
        address: 0
        input_type: input
        unit_of_measurement: Volt
        state_class: measurement
        scale: 1
        offset: 0
        precision: 0 # aantalkommagetallen

      - name: modbusRoom_3
        scan_interval : 5
        slave: 2 # adres modbus module
        address: 1
        input_type: input
        unit_of_measurement: Volt
        state_class: measurement
        scale: 1
        offset: 0
        precision: 0 # aantalkommagetallen

      - name: modbusRoom_4
        scan_interval : 5
        slave: 2 # adres modbus module
        address: 11
        input_type: input
        unit_of_measurement: Volt
        state_class: measurement
        scale: 1
        offset: 0
        precision: 0 # aantalkommagetallen
        
      - name: "modbusmodbus"
        device_address: 2
        address: 1
        unit_of_measurement: W
        data_type: float16 # int32
        input_type: input
        unique_id: "modbusmodbus"
        state_class: measurement
                
 
        
      - name: "modbusmodbus0"
        device_address: 2
        address: 0
        unit_of_measurement: W
        data_type: float16 # int32
        input_type: input
        unique_id: "modbusmodbus0"
        state_class: measurement
                
  

and i found this also but the energymeter is not mentioned :
no energy meters in the tutorial

Hi thermiek,

This showed up on the forum recently. It might be helpful, I don’t know.

New Addon for easy integration of Modbus Devices into Home Assistant (modbus2mqtt).

swap: word

solved

      - name: "mb2_L1-N_voltage"
        unique_id: "mb2_L1-N_voltage"
        device_address: 2
        address: 0
        unit_of_measurement: "V"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L2-N_voltage"
        unique_id: "mb2_L2-N_voltage"
        device_address: 2
        address: 2
        unit_of_measurement: "V"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L3-N_voltage"
        unique_id: "mb2_L3-N_voltage"
        device_address: 2
        address: 4
        unit_of_measurement: "V"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_1_current"
        unique_id: "mb2_Phase_1_current"
        device_address: 2
        address: 6
        unit_of_measurement: "A"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_2_current"
        unique_id: "mb2_Phase_2_current"
        device_address: 2
        address: 8
        unit_of_measurement: "A"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_3_current"
        unique_id: "mb2_Phase_3_current"
        device_address: 2
        address: 10
        unit_of_measurement: "A"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_1_active_power"
        unique_id: "mb2_Phase_1_active_power"
        device_address: 2
        address: 12
        unit_of_measurement: "W"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_2_active_power"
        unique_id: "mb2_Phase_2_active_power"
        device_address: 2
        address: 14
        unit_of_measurement: "W"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_3_active_power"
        unique_id: "mb2_Phase_3_active_power"
        device_address: 2
        address: 16
        unit_of_measurement: "W"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_1_apparent_power"
        unique_id: "mb2_Phase_1_apparent_power"
        device_address: 2
        address: 18
        unit_of_measurement: "VA"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_2_apparent_power"
        unique_id: "mb2_Phase_2_apparent_power"
        device_address: 2
        address: 20
        unit_of_measurement: "VA"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_3_apparent_power"
        unique_id: "mb2_Phase_3_apparent_power"
        device_address: 2
        address: 22
        unit_of_measurement: "VA"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_1_reactive_power"
        unique_id: "mb2_Phase_1_reactive_power"
        device_address: 2
        address: 24
        unit_of_measurement: "VAr"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_2_reactive_power"
        unique_id: "mb2_Phase_2_reactive_power"
        device_address: 2
        address: 26
        unit_of_measurement: "VAr"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_3_reactive_power"
        unique_id: "mb2_Phase_3_reactive_power"
        device_address: 2
        address: 28
        unit_of_measurement: "VAr"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_1_power_factor*1"
        unique_id: "mb2_Phase_1_power_factor*1"
        device_address: 2
        address: 30
        unit_of_measurement: "None"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_2_power_factor*1"
        unique_id: "mb2_Phase_2_power_factor*1"
        device_address: 2
        address: 32
        unit_of_measurement: "None"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_3_power_factor*1"
        unique_id: "mb2_Phase_3_power_factor*1"
        device_address: 2
        address: 34
        unit_of_measurement: "None"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_1_phase_angle"
        unique_id: "mb2_Phase_1_phase_angle"
        device_address: 2
        address: 36
        unit_of_measurement: "Degrees"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_2_phase_angle"
        unique_id: "mb2_Phase_2_phase_angle"
        device_address: 2
        address: 38
        unit_of_measurement: "Degrees"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_3_phase_angle"
        unique_id: "mb2_Phase_3_phase_angle"
        device_address: 2
        address: 40
        unit_of_measurement: "Degrees"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Avg._L-N_voltage"
        unique_id: "mb2_Avg._L-N_voltage"
        device_address: 2
        address: 42
        unit_of_measurement: "V"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Avg._current"
        unique_id: "mb2_Avg._current"
        device_address: 2
        address: 46
        unit_of_measurement: "A"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Sum_of_currents"
        unique_id: "mb2_Sum_of_currents"
        device_address: 2
        address: 48
        unit_of_measurement: "A"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Total_system_active_power"
        unique_id: "mb2_Total_system_active_power"
        device_address: 2
        address: 52
        unit_of_measurement: "W"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Total_system_apparent_power"
        unique_id: "mb2_Total_system_apparent_power"
        device_address: 2
        address: 56
        unit_of_measurement: "VA"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Total_system_reactive_power"
        unique_id: "mb2_Total_system_reactive_power"
        device_address: 2
        address: 60
        unit_of_measurement: "VAr"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Total_system_power_factor*1"
        unique_id: "mb2_Total_system_power_factor*1"
        device_address: 2
        address: 62
        unit_of_measurement: "None"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Total_system_phase_angle"
        unique_id: "mb2_Total_system_phase_angle"
        device_address: 2
        address: 66
        unit_of_measurement: "Degrees"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Frequency_of_supply"
        unique_id: "mb2_Frequency_of_supply"
        device_address: 2
        address: 70
        unit_of_measurement: "Hz"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Total_import_active_energy"
        unique_id: "mb2_Total_import_active_energy"
        device_address: 2
        address: 72
        unit_of_measurement: "kWh"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Total_export_active_energy"
        unique_id: "mb2_Total_export_active_energy"
        device_address: 2
        address: 74
        unit_of_measurement: "kWh"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Total_import_reactive_energy"
        unique_id: "mb2_Total_import_reactive_energy"
        device_address: 2
        address: 76
        unit_of_measurement: "kVArh"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Total_export_reactive_energy"
        unique_id: "mb2_Total_export_reactive_energy"
        device_address: 2
        address: 78
        unit_of_measurement: "kVArh"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Total_apparent_energy"
        unique_id: "mb2_Total_apparent_energy"
        device_address: 2
        address: 80
        unit_of_measurement: "kVAh"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Ah"
        unique_id: "mb2_Ah"
        device_address: 2
        address: 82
        unit_of_measurement: "A"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Total_system_active_power"
        unique_id: "mb2_Total_system_active_power"
        device_address: 2
        address: 84
        unit_of_measurement: "de-"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Neutral_current_demand"
        unique_id: "mb2_Neutral_current_demand"
        device_address: 2
        address: 104
        unit_of_measurement: "A"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Max._neutral_current_demand"
        unique_id: "mb2_Max._neutral_current_demand"
        device_address: 2
        address: 106
        unit_of_measurement: "A"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L1-2_voltage"
        unique_id: "mb2_L1-2_voltage"
        device_address: 2
        address: 200
        unit_of_measurement: "V"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L2-3_voltage"
        unique_id: "mb2_L2-3_voltage"
        device_address: 2
        address: 202
        unit_of_measurement: "V"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L3-1_voltage"
        unique_id: "mb2_L3-1_voltage"
        device_address: 2
        address: 204
        unit_of_measurement: "V"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Avg._L-L_voltage"
        unique_id: "mb2_Avg._L-L_voltage"
        device_address: 2
        address: 206
        unit_of_measurement: "V"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Neutral_current"
        unique_id: "mb2_Neutral_current"
        device_address: 2
        address: 224
        unit_of_measurement: "A"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L1/N_voltage_THD"
        unique_id: "mb2_L1/N_voltage_THD"
        device_address: 2
        address: 234
        unit_of_measurement: "%"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L2/N_voltage_THD"
        unique_id: "mb2_L2/N_voltage_THD"
        device_address: 2
        address: 236
        unit_of_measurement: "%"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L3/N_voltage_THD"
        unique_id: "mb2_L3/N_voltage_THD"
        device_address: 2
        address: 238
        unit_of_measurement: "%"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_1_current_THD"
        unique_id: "mb2_Phase_1_current_THD"
        device_address: 2
        address: 240
        unit_of_measurement: "%"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_2_current_THD"
        unique_id: "mb2_Phase_2_current_THD"
        device_address: 2
        address: 242
        unit_of_measurement: "%"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_3_current_THD"
        unique_id: "mb2_Phase_3_current_THD"
        device_address: 2
        address: 244
        unit_of_measurement: "%"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Avg._L-L_voltage_THD"
        unique_id: "mb2_Avg._L-L_voltage_THD"
        device_address: 2
        address: 248
        unit_of_measurement: "%"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Avg._current_THD"
        unique_id: "mb2_Avg._current_THD"
        device_address: 2
        address: 250
        unit_of_measurement: "%"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_1_current_demand"
        unique_id: "mb2_Phase_1_current_demand"
        device_address: 2
        address: 258
        unit_of_measurement: "A"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_2_current_demand"
        unique_id: "mb2_Phase_2_current_demand"
        device_address: 2
        address: 260
        unit_of_measurement: "A"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Phase_3_current_demand"
        unique_id: "mb2_Phase_3_current_demand"
        device_address: 2
        address: 262
        unit_of_measurement: "A"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Max._phase_1_current_demand"
        unique_id: "mb2_Max._phase_1_current_demand"
        device_address: 2
        address: 264
        unit_of_measurement: "A"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Max._phase_2_current_demand"
        unique_id: "mb2_Max._phase_2_current_demand"
        device_address: 2
        address: 266
        unit_of_measurement: "A"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Max._phase_3_current_demand"
        unique_id: "mb2_Max._phase_3_current_demand"
        device_address: 2
        address: 268
        unit_of_measurement: "A"
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Max._phase_3_current_demand"
        unique_id: "mb2_Max._phase_3_current_demand"
        device_address: 2
        address: 268
        unit_of_measurement: A
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L1-2_voltage_THD"
        unique_id: "mb2_L1-2_voltage_THD"
        device_address: 2
        address: 334
        unit_of_measurement: %
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L2-3_voltage_THD"
        unique_id: "mb2_L2-3_voltage_THD"
        device_address: 2
        address: 336
        unit_of_measurement: %
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L3-1_voltage_THD"
        unique_id: "mb2_L3-1_voltage_THD"
        device_address: 2
        address: 338
        unit_of_measurement: %
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Avg._L-L_voltage_THD"
        unique_id: "mb2_Avg._L-L_voltage_THD"
        device_address: 2
        address: 340
        unit_of_measurement: %
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Total_kWh*3"
        unique_id: "mb2_Total_kWh*3"
        device_address: 2
        address: 342
        unit_of_measurement: kWh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_Total_kVArh*3"
        unique_id: "mb2_Total_kVArh*3"
        device_address: 2
        address: 344
        unit_of_measurement: kVArh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L1_import"
        unique_id: "mb2_L1_import"
        device_address: 2
        address: 346
        unit_of_measurement: kWh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L2_import"
        unique_id: "mb2_L2_import"
        device_address: 2
        address: 348
        unit_of_measurement: kWh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L3_import"
        unique_id: "mb2_L3_import"
        device_address: 2
        address: 350
        unit_of_measurement: kWh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L1_export"
        unique_id: "mb2_L1_export"
        device_address: 2
        address: 352
        unit_of_measurement: kWh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L2_export"
        unique_id: "mb2_L2_export"
        device_address: 2
        address: 354
        unit_of_measurement: kWh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L3_export"
        unique_id: "mb2_L3_export"
        device_address: 2
        address: 356
        unit_of_measurement: kWh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L1_total"
        unique_id: "mb2_L1_total"
        device_address: 2
        address: 358
        unit_of_measurement: kWh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L2_total"
        unique_id: "mb2_L2_total"
        device_address: 2
        address: 360
        unit_of_measurement: kWh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L3_total"
        unique_id: "mb2_L3_total"
        device_address: 2
        address: 362
        unit_of_measurement: kWh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L1_import_kVArh"
        unique_id: "mb2_L1_import_kVArh"
        device_address: 2
        address: 364
        unit_of_measurement: kVArh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L2_import_kVArh"
        unique_id: "mb2_L2_import_kVArh"
        device_address: 2
        address: 366
        unit_of_measurement: kVArh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L3_import_kVArh"
        unique_id: "mb2_L3_import_kVArh"
        device_address: 2
        address: 368
        unit_of_measurement: kVArh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L1_export_kVArh"
        unique_id: "mb2_L1_export_kVArh"
        device_address: 2
        address: 370
        unit_of_measurement: kVArh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L2_export_kVArh"
        unique_id: "mb2_L2_export_kVArh"
        device_address: 2
        address: 372
        unit_of_measurement: kVArh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L3_export_kVArh"
        unique_id: "mb2_L3_export_kVArh"
        device_address: 2
        address: 374
        unit_of_measurement: kVArh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L1_total_kVArh"
        unique_id: "mb2_L1_total_kVArh"
        device_address: 2
        address: 376
        unit_of_measurement: kVArh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L2_total_kVArh"
        unique_id: "mb2_L2_total_kVArh"
        device_address: 2
        address: 378
        unit_of_measurement: kVArh
        data_type: float32
        input_type: input
        state_class: measurement

      - name: "mb2_L3_total_kVArh"
        unique_id: "mb2_L3_total_kVArh"
        device_address: 2
        address: 380
        unit_of_measurement: kVArh
        data_type: float32
        input_type: input
        state_class: measurement

1 Like