syssi / esphome-atorch-dl24

ESPHome component to monitor and control some Atorch meters via bluetooth
Apache License 2.0
56 stars 13 forks source link

Improve frame composition #33

Open syssi opened 2 years ago

syssi commented 2 years ago
[I][atorch_dl24:053]: Write command: FF.55.11.02.03.00.00.00.00.52 (10)
[I][atorch_dl24:247]: Status report received
[W][atorch_dl24:202]: Frame skipped because of invalid length (4)
[D][atorch_dl24:203]: Payload: FF.55.02.01
[W][atorch_dl24:202]: Frame skipped because of invalid length (4)
[D][atorch_dl24:203]: Payload: 01.00.00.40
[W][atorch_dl24:202]: Frame skipped because of invalid length (30)
[D][atorch_dl24:203]: Payload: FF.55.01.02.00.00.21.00.3A.83.00.0A.9B.00.00.00.09.00.00.00.00.00.00.00.00.22.00.00.00.00 (30)
[W][atorch_dl24:202]: Frame skipped because of invalid length (6)
[D][atorch_dl24:203]: Payload: 3C.00.00.00.00.A9 (6)

Interpretation: The command reply (FF.55.02.01.01.00.00.40) was skipped because of two 4 byte frames. The next report frame was skipped because of a 30 bytes + 6 bytes frame.

At the moment just 8 byte, 36 byte and 20+16 byte frames are handled correctly.