openv / vcontrold

:fire: vcontrold Daemon for control and logging of Viessmann® type heating devices
https://github.com/openv/openv/wiki
GNU General Public License v3.0
101 stars 54 forks source link

issue #23, issue #22 fix framer for expected length #25

Closed speters closed 6 years ago

speters commented 6 years ago

This fixes #23 and its duplicate #22

Expected lengths in read requests are different from those in write requests. A write request is answered with 1 byte payload containing number of written bytes (payload length = 1), whereas a read should contain the number of requested bytes (payload length == requested length).

TODO: a better implementation would incorporate additional checks if number of priorly requested bytes match the number of written bytes supplied in the answer.

@hmueller01 @l3u