turbokongen / hass-AMS

Custom component reading AMS through MBus adapter into HomeAssistant
44 stars 10 forks source link

Fix for frame sync issues. #73

Closed frankiboy1 closed 2 years ago

frankiboy1 commented 2 years ago

When missing the start of the frame, the logic gets out of sync and will never recover. This fix utilizes the fact that packets are sent two seconds apart. If we timeout, the next byte will most likely be the start of a new packet.

turbokongen commented 2 years ago

This seems to work fine with my system. I'll merge and add some sensible debug messages, and make a release.