tony-fav / tasmota-blerry

GNU General Public License v3.0
96 stars 29 forks source link

Create blerry_driver_EufyC1 #60

Closed zrhutto closed 2 years ago

zrhutto commented 2 years ago

Hey Tony - your MiScale driver inspired me to get my Eufy C1 Scale working in BLErry too. This will require a separate commit to blerry.be to name the driver if/when accepted to the repo.

tony-fav commented 2 years ago

@zrhutto please check with the changes I've made. I added it to blerry.be and reduced the driver code size a bit. Did you sniff the scale yourself or is there a reference?

zrhutto commented 2 years ago

Nice cleanup of that quick-and-dirty code.

Thanks for flagging the attribution. Values were reverse engineered (couldn’t find any prior art on the advert packets themselves), but inspired by https://gist.github.com/particleflux/2a9b9255b07631989f2e7096b12c8485. That work gave me an indication of where to look for the weight value, with queried responses looking fairly similar to the advert packet. Impedance was found in a different set of bytes v. the model referenced in that gist (the C1 reports impedance in the 2 bytes preceding the weight; the T9140 reports it in the 2 bytes following the weight with swapped endianness - consider it a note to future users looking to add support for different models of Eufy scales).