Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RS485 modbus energy meter integrate to ESPHome yaml file for home assistant
#10
(02-02-2024, 11:45 AM)admin Wrote: here is my KC868-Server config yaml for KinCony's modbus energy meter:


modbus:
  - name: hub1
    type: serial
    baudrate: 9600
    bytesize: 8
    method: rtu
    parity: E
    port: /dev/ttyS0
    stopbits: 1

    sensors:
    - name: meter-voltage
      slave: 1
      address: 100
      input_type: holding
      data_type: float32
      count: 2
      precision: 2
      unit_of_measurement: V
      device_class: voltage

    - name: meter-current
      slave: 1
      address: 106
      input_type: holding
      data_type: float32
      count: 2
      precision: 2
      unit_of_measurement: A
      device_class: current

    - name: meter-power
      slave: 1
      address: 118
      input_type: holding
      data_type: float32
      count: 2
      precision: 2
      unit_of_measurement: kW
      device_class: power
     
    - name: meter-factor
      slave: 1
      address: 142
      input_type: holding
      data_type: float32
      count: 2
      precision: 2
    #  unit_of_measurement:
      device_class: power_factor

    - name: meter-frequency
      slave: 1
      address: 144
      input_type: holding
      data_type: float32
      count: 2
      precision: 2
      unit_of_measurement: Hz
      device_class: frequency

    - name: meter-consumption
      slave: 1
      address: 0
      input_type: holding
      data_type: float32
      count: 2
      precision: 2
      unit_of_measurement: kWh
      device_class: energy_storage

I had to remove lines including count: 2 for config to work.

Once valid config I don't see values displayed, see attachment please.

After enabling DEBUG for modbus I see:
2024-02-02 14:06:39.383 ERROR (SyncWorker_10) [homeassistant.components.modbus.modbus] Pymodbus: hub1: Error: device: 1 address: 100 -> Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 4 bytes (0 received)
2024-02-02 14:07:14.617 DEBUG (SyncWorker_1) [homeassistant.components.modbus.modbus] Pymodbus: hub1: Error: device: 1 address: 106 -> Modbus Error: [Input/Output] No Response received from the remote slave/Unable to decode response
2024-02-02 14:07:49.853 DEBUG (SyncWorker_12) [homeassistant.components.modbus.modbus] Pymodbus: hub1: Error: device: 1 address: 118 -> Modbus Error: [Input/Output] No Response received from the remote slave/Unable to decode response
2024-02-02 14:08:25.093 DEBUG (SyncWorker_11) [homeassistant.components.modbus.modbus] Pymodbus: hub1: Error: device: 1 address: 142 -> Modbus Error: [Input/Output] No Response received from the remote slave/Unable to decode response
2024-02-02 14:09:00.336 DEBUG (SyncWorker_6) [homeassistant.components.modbus.modbus] Pymodbus: hub1: Error: device: 1 address: 144 -> Modbus Error: [Input/Output] No Response received from the remote slave/Unable to decode response
2024-02-02 14:09:35.573 DEBUG (SyncWorker_10) [homeassistant.components.modbus.modbus] Pymodbus: hub1: Error: device: 1 address: 0 -> Modbus Error: [Input/Output] No Response received from the remote slave/Unable to decode response
2024-02-02 14:10:10.813 DEBUG (SyncWorker_12) [homeassistant.components.modbus.modbus] Pymodbus: hub1: Error: device: 1 address: 100 -> Modbus Error: [Input/Output] No Response received from the remote slave/Unable to decode response


Attached Files Image(s)
   
Reply


Messages In This Thread
RE: RS485 modbus energy meter integrate to ESPHome yaml file for home assistant - by sebagarayco - 02-02-2024, 04:33 PM

Forum Jump:


Users browsing this thread:
2 Guest(s)