manekinekko / cafy

An experimental node package to interact with the Delonghi Primadonna Elite (and probably other ECAM models)
MIT License
53 stars 8 forks source link

CRC code calculation #4

Closed sfrieske closed 1 year ago

sfrieske commented 3 years ago

Nice work, I was waiting for it :)

This is not a bug, but a (hopefully helpful) contribution. Looking at crccalc it turns out that the CRC algorithm used might be CRC-16/AUG-CCITT. For parameters see there. The byte sequence for turn_on, without the last 2 CRC bytes (0d07840f0201) yields 5512 ! In case you need a clean CRC lib, here is one: https://github.com/latysheff/node-polycrc .

Maybe this helps with some of your ongoing work :) :)

Regards, Steffen

manekinekko commented 3 years ago

Thank you so much @sfrieske this looks great! I will try this out asap 🙏