Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KinCony RS485 energy meter RS485 modbus protocol
#1
Modbus-RTU: 9600 E 8 1  read function:03 

Register address        data                                        data type-IEEE-754      function

0000, 0001              power consumption (kWh)                 Float                        read
0100, 0101                  voltage (V)                                   Float                        read
0106, 0107                  current  (A)                                  Float                        read
0118, 0119                  power (kW)                                  Float                        read
0142, 0143                  power factor                                 Float                        read
0144, 0145                  frequency                                     Float                        read

How to change meter ID, for example: change ID:01  to 20 just send command:
01 10 0D B0 00 01 02 00 14 60 AF
first (01) current ID
14 is (20) decimal
60 AF (CRC)

   
Reply
#2
can you share the yaml to use with a a24 or a32 for this model and the 80amp too.?
Maybe adding this to the oficial yaml will work?

uart:
  id: mod_bus
  tx_pin: 33
  rx_pin: 32
  baud_rate: 9600
  stop_bits: 1
  parity: EVEN

modbus:
  id: modbus1
  uart_id: mod_bus

modbus_controller:
  - id: a24
    address: 0x01
    modbus_id: modbus1
    setup_priority: -10
    update_interval: 5s


sensor:
  - platform: modbus_controller
    modbus_controller_id: a24
    name: "Voltage"
    id: modbus_voltage
    register_type: holding
    address: 0x64
    unit_of_measurement: "V"
    value_type: FP32
    accuracy_decimals: 2

  - platform: modbus_controller
    modbus_controller_id: a24
    name: "Current"
    id: modbus_current
    register_type: holding
    address: 0x6A
    unit_of_measurement: "A"
    value_type: FP32
    accuracy_decimals: 2

  - platform: modbus_controller
    modbus_controller_id: a24
    name: "Active Power"
    id: modbus_Active_Power
    register_type: holding
    address: 0x76
    unit_of_measurement: "kW"
    value_type: FP32
    accuracy_decimals: 2

  - platform: modbus_controller
    modbus_controller_id: a24
    name: "Power Factor"
    id: modbus_Power_Factor
    register_type: holding
    address: 0x8E
    unit_of_measurement: ""
    value_type: FP32
    accuracy_decimals: 2

  - platform: modbus_controller
    modbus_controller_id: a24
    name: "Grid Frequency"
    id: modbus_Grid_Frequency
    register_type: holding
    address: 0x90
    unit_of_measurement: "hz"
    value_type: FP32
    accuracy_decimals: 2

  - platform: modbus_controller
    modbus_controller_id: a24
    name: "Total Energy"
    id: modbus_Total_Energy
    register_type: holding
    address: 0x0
    unit_of_measurement: "kWh"
    value_type: FP32
    accuracy_decimals: 2
Reply
#3
just relace A24 RXD, TXD pins:
RS485:
RXD:GPIO32
TXD:GPIO33
here is ESP32 pin define for A24: https://www.kincony.com/forum/showthread.php?tid=3921
Reply
#4
Thanks and sorry for all the post.
As I see in the yaml config I already post the RX And Tx are correct. its ok?

uart:
id: mod_bus
tx_pin: 33
rx_pin: 32
baud_rate: 9600
stop_bits: 1
parity: EVEN


Another question.. in the address number of the sensors.. Area ok?
For example. " address: 0x64"
sensor:
- platform: modbus_controller
modbus_controller_id: a24
name: "Voltage"
id: modbus_voltage
register_type: holding
address: 0x64
unit_of_measurement: "V"
value_type: FP32
accuracy_decimals: 2
Reply
#5
when you received package, connect to your meter, have a test, then will know whether correct.
Reply
#6
Ok, I will test and post the information. Thanks for all the support!
Reply
#7
you are welcome.
Reply
#8
because the meter is NEW, so the consumption is 0, it's first time to use.
Reply
#9
After some test and the infinite patience of mr kincony I managed to get the rs485 to work totally with the a24 via the rs485 port (model 80a). At power up the device says the address in my case 222 which in the hex code is address: 0xDE (I will attach the yaml anyway).
Things to keep in mind, the physical device shows in KW so for testing it is possible that it will show 0 if it has little W. Do the test with a hairdryer or something that consumes a lot of power. Remember that it is for the board so I doubt that you have less than 150w base consumption in a home.

I would like to ask mr kincony a question. Is it possible to change the power from KW to W? This would allow me to show more clearly the values in H.A. This could be done by connecting it to the rs485 via a usb cable? It would be great if we had the option. @admin

Another issue is that if you want to show it in the energy dashboard you have to put state class and device class (it goes in the yaml).
Well I hope you all can use it and thanks again to the forum for the help.


Attached Files Image(s)
           

.txt   a24_yaml.txt (Size: 11.48 KB / Downloads: 45)
Reply
#10
1. read modbus register data from meter unit is "KW". if you want show "W" in home assistant. you can let value*1000 , then change unit to "W".

2. how to add to home assistant energy dashboard, see here guide: https://www.kincony.com/forum/showthread.php?tid=5853
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)