fjs21 / homebridge-blueair

BlueAir air purifier plugin for homebridge
https://www.npmjs.com/package/@fjs21/homebridge-blueair
Apache License 2.0
51 stars 6 forks source link

Can homebridge/homekit get instant feedback when operating unit physically? #10

Closed ndlaham closed 2 years ago

ndlaham commented 2 years ago

Nitpicking here, but I noticed if you turn it on or off, or change the speed of the purifier on the unit itself, the Homekit app will not update the state of the machine unless you force close the Home app and then reopen it, forcing a state refresh from the app I presume. It's usually not a big deal for me because if I'm walking up and physically pressing the Blueair switch on the unit, then I would not actively be using the app at that time.

But's just something I noticed and maybe there is a concern it might get hung up in the wrong state if the Home app was already running and active on your iOS device. I suppose this could be more of a nuisance for users that might use an iPad for a always-awake control panel or something.

Thanks for the work on this! Nick

fjs21 commented 2 years ago

I don't think we can get instant updates as we have to poll the BlueAir API to get the status of the device. If we send too many requests to their servers, the connection will get blocked. Currently the time out is set to 5 seconds to avoid too many time out errors.