jeffschubert / homebridge-daikin-oneplus

Homebridge plugin to control a Daikin One+ thermostat
Apache License 2.0
18 stars 7 forks source link

Data polling: fix bugs, refactor #17

Closed FabianFrank closed 2 years ago

FabianFrank commented 2 years ago
  1. Accessories no longer poll every 2 seconds but subscribe to updates with a callback (more predictable/simpler)
  2. Updates are only announced to subscribers and subscribers only push updates into HomeKit after a full fetch from the accessory (prevents stale data from local cache from being pushed back into Homekit)
  3. Data fetching from the accessory is delayed by 15s after making changes to prevent reading stale data from the accessory/Daikin.
  4. Data is refreshed every 180s in the background and updated on demand when a user interacts with a HomeKit controler.

Fixes #2.

jeffschubert commented 2 years ago

I merged this into master, but I think other changes I made broke the link with this PR in some way. (I'm not completely familiar with all the ins and outs of git either.) With these changes and your other improvements, I'm thinking of bumping the version up to 2.0. These are all significant enough to warrant that in my mind.

FabianFrank commented 2 years ago

@jeffschubert I think it's because I also pushed some more fixes while you were working on it. Either way I've merged master back into this branch so it can be merged again (much less changes now), which I think is what we have to do to make sure we get the last few fixes as well.

jeffschubert commented 2 years ago

Thanks, I think I've got it all squared away now. With the holidays, I'm not sure when I'll push a release, but I'd like to before the new year. If you find anything else, let me know.

FabianFrank commented 2 years ago

Awesome, thanks! Also once you push the release if you are interested I think the plugin now fulfills the requirements for being a verified plugin and we could apply to get verified. I'm a bit curious if they have further feedback on the plugin and would be happy to improve it a bit more if needed.

jeffschubert commented 2 years ago

Getting it verified has been a goal of mine as well. I'll look into after the new year.