Smart Home Automation Forum

Full Version: Add KinCony modbus energy meter to home assistant using raspberry pi's RS485 port
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
how to integrate KinCony modbus energy meter to home assistant using raspberry pi's RS485 port

A. use "inCony_Meter_config_tool" change RS485 " Parity: EVEN "  to " Parity: NONE ", because we found home assistant can't work with "EVEN", KinCony energy meter default setting is "EVEN".
A-1: connect energy meter to PC by USB-RS485 adatper:
[attachment=4053]
A-2: first time, use RS485 setting,  Parity: EVEN (Chinese word on left is : 偶校验)  click "打开" (open serial port) button.
[attachment=4058]
[attachment=4052]
A-3: click "无校验" (None) button, set  Parity: NONE
until now,  "Parity" is set completed.

if you want change meter ID from 1, you can "set the meter ID", such as input 1,2,3,.... then click "改表号+读" (write button), it will set the ID for meter.
if you have changed  Parity: NONE, you want connect to serial port again, you need change serial setting,  Parity=None, Chinese word is "无校验",then click "读" (Read) button, you will read all data from meter.
[attachment=4054]

now the meter hardware setting is complete, then you can connect meter to KC868-Server or Server-Mini's RS485 port directly. see photo:
[attachment=4055]
config HA yaml as here:
[attachment=4056]
[attachment=4059]
modbus:
  - name: hub1
    type: serial
    baudrate: 9600
    bytesize: 8
    method: rtu
    parity: N
    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
add meter to HA dashboard:
[attachment=4057]
You rock sir. Perfectly works.

One comment: I don't use Windows as native OS so I used config tool in windows Virtual Machine. Had to install this driver to get COM recognized: https://www.wch-ic.com/downloads/CH341SER_ZIP.html

Cheers!
ok, good.
meter-consumption is stuck at 0.04 kWh since several weeks and I had a lot of consumption since then.

How to verify if it works correctly?
what's the value on meter's display about it?
if use new home assistant, Please remove count=## lines from the modbus config part of configuration.yaml because now count is only valid for data_type: custom and data_type: string and is invalid for all other data types like int16, uint16 etc.
Hi Kincony, I'm having issues with this modbus meter since I set it up as you indicated me.

For months, the meter-consumption is showing 0.04kWh and not changing value. The only parameters that are showing correctly are the meter-voltage and meter-frequency..
How to fix it?

Attached is a screenshot and this is my config:
  - name: hub1
    type: serial
    baudrate: 9600
    bytesize: 8
    method: rtu
    parity: N
    port: /dev/ttyS0
    stopbits: 1
    sensors:
    - name: meter-voltage
      slave: 1
      address: 100
      input_type: holding
      data_type: float32
      precision: 2
      unit_of_measurement: V
      device_class: voltage
    - name: meter-current
      slave: 1
      address: 106
      input_type: holding
      data_type: float32
      precision: 2
      unit_of_measurement: A
      device_class: current
    - name: meter-power
      slave: 1
      address: 118
      input_type: holding
      data_type: float32
      precision: 2
      unit_of_measurement: kW
      device_class: power
   
    - name: meter-factor
      slave: 1
      address: 142
      input_type: holding
      data_type: float32
      precision: 2
      device_class: power_factor
    - name: meter-frequency
      slave: 1
      address: 144
      input_type: holding
      data_type: float32
      precision: 2
      unit_of_measurement: Hz
      device_class: frequency
    - name: meter-consumption
      slave: 1
      address: 0
      input_type: holding
      data_type: float32
      precision: 2
      unit_of_measurement: kWh
      device_class: energy_storage
what's the meter-consumption showed on meter's LCD displayer? whether also is 0.04kWh?
(05-09-2024, 10:37 PM)admin Wrote: [ -> ]what's the meter-consumption showed on meter's LCD displayer?  whether also is 0.04kWh?

I think it's 000000. 

Voltage is ~230v
Frequency is ~50
PF is 100
C is 1600

Now I have fours bulbs ON and I see no consumption. How to fix ?
let your bulbs ON for one day, then check the value.
Pages: 1 2 3