1. modpoll
mkdir -p /opt/rpower/bin
curl -n# http://d01cid.ddns.net/sharel/img/modpoll/modpoll-3.10.tgz | tar xz -C /tmp/
mv -f /tmp/modpoll/x86_64-linux-gnu/modpoll /opt/rpower/bin/
rm -fr /tmp/modpoll/
/opt/rpower/bin/modpoll -a 200 -r 101 -c 16 -t 4:hex -1 10.1.1.81
[101]: 0x4B49 -> x2d: 19273 -> d2c: KI
[102]: 0x4E47 -> x2d: 20039 -> d2c: NG
[103]: 0x5F30 -> x2d: 24368 -> d2c: _0
[104]: 0x3236 -> x2d: 12854 -> d2c: 26
[105]: 0x3000 -> x2d: 12288 -> d2c: 00
[106]: 0x0000
[107]: 0x0000
[108]: 0x0000
[109]: 0x0000
[110]: 0x0000
[111]: 0x0000
[112]: 0x0000
[113]: 0x0000
[114]: 0x0000
[115]: 0x0000
[116]: 0x0000
x2c 4B494E475F3032363000 -> KING_0260
/opt/rpower/bin/modpoll -a 1 -r 374 -c 16 -t 4:hex -1 10.1.1.81
[374]: 0xFFFF
[375]: 0x4155
[376]: 0x58B9
[377]: 0x8000
[378]: 0x0000
x2flt 415558B9 -> 13.3342
4155 58B9 8000 0000 -> 5595878.0
https://gregstoll.com/~gregstoll/floattohex/ NOTE: should be: 5595.88
2. calc
1 phase
6 A = 1,3 kW
7 A = 1,5 kW
8 A = 1,8 kW
9 A = 2,0 kW
10 A = 2,2 kW
11 A = 2,4 kW
12 A = 2,6 kW
13 A = 2,8 kW
14 A = 3,1 kW
3 phases
6 A = 4,1 kW
7 A = 4,8 kW
8 A = 5,5 kW
9 A = 6,2 kW
10 A = 6,9 kW
11 A = 7,6 kW
12 A = 8,5 kW
13 A = 9,2 kW
14 A = 9,9 kW
5: [0x40a0, 0x0000]
6: [0x40c0, 0x0000]
7: [0x40e0, 0x0000]
8: [0x4100, 0x0000]
9: [0x4110, 0x0000]
10: [0x4120, 0x0000]
11: [0x4130, 0x0000]
12: [0x4140, 0x0000]
13: [0x4150, 0x0000]
14: [0x4160, 0x0000]
15: [0x4170, 0x0000]
16: [0x4120, 0x0000] ??
service: modbus.write_register
data:
address: 1210
slave: 1
value: >
[ {{ '0x%04x' %
unpack(pack([[states('input_number.laadpaal_laadstroom_instelling')|float(0),
16] | min, 5] | max, ">f"), ">h") | abs }}, {{ '0x%04x' %
unpack(pack([[states('input_number.laadpaal_laadstroom_instelling')|float(0),
16] | min, 5] | max, ">f"), ">h", offset=2) | abs }}]
hub: laadpaal
3. stop charging
Stopping the charger is done by putting it at 5 ampère. That is too low for the car to charge, so the car stops charging but the charger itself is still powered on and the “session” continues.
stop_charger:
alias: "laadpaal - stop laden door op 5 A te zetten"
sequence:
- service: modbus.write_register
data:
address: 1210
unit: 1
hub: car_charger
value: [0x40a0, 0x0000]