I bought this current meter, to measure the used energy to charge my car.
It took me a couple of hours to get everything configured. I’m hoping I can help someone by sharing my configuration. I did not have any experience with modbus.
I have a rs485 to usb converter, wiring is very simple, connect A to A and B to B. G(round) does not need to be connected. I my case, the cable is only 0.5m and does not need a terminal resistor.
First you need to add the modbus configuration. Most parameters are in the documentation of the meter, make sure the port is right.
modbus:
name: hub1
type: serial
method: rtu
port: /dev/ttyUSB1
baudrate: 9600
stopbits: 1
bytesize: 8
parity: E
Hardest part was to find the register adresses for different sensors.
I found this script very usefull https://github.com/psy0rz/YTLmodbus/blob/66130c8ea8fa6e1aefb331709c896bc8fd463ee4/ytl.py
sensor:
- platform: modbus
registers:
- name: car_voltage
hub: hub1
slave: 1
register: 305
scale: 0.01
unit_of_measurement: v
precision: 1
- name: car_frequency
hub: hub1
slave: 1
register: 304
scale: 0.01
unit_of_measurement: hz
- name: car_current1
hub: hub1
slave: 1
register: 313
count: 2
scale: 0.001
unit_of_measurement: a
precision: 1
- name: car_kwh1
hub: hub1
slave: 1
register: 40960
count: 2
scale: 0.01
unit_of_measurement: Kwh
- name: car_power
hub: hub1
slave: 1
register: 320
count: 2
scale: 0.01
unit_of_measurement: w
device_class: power