fjs21 / homebridge-blueair

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

Instability with 211/311+ #268

Closed blaqkatom closed 1 year ago

blaqkatom commented 1 year ago

Awoke this morning to find both purifiers unresponsive with "Updating..." after previous night succesful setup on 1.2.1.

Living Room Purifier (211) Office Purifier (311+)

Raspberry Pi OS 10 Node.js v18.16.0 mDNS Advertiser: Ciao

Attached debug logs from a fresh restart. Removed all other plugins from logging. Replaced Device ID and UUIDs with placeholders as I was unsure whether somebody else could authenticate with the service and control these devices.

homebridge.log.txt

jonato1 commented 1 year ago

@blaqkatom Thanks for opening up this issue. Can you confirm if all of the services (air purifier, light, night mode, etc.) are showing "Updating..."? If so, is that both in Homebridge and the Home.app, or just one of those?

blaqkatom commented 1 year ago

@jonato1 All 4 accessories show “Updating…” in Home app for both air purifiers. In Homebridge, they appear to be functioning properly.

jonato1 commented 1 year ago

@blaqkatom Interesting...this one may take me a little longer to reproduce. I'm not seeing anything inherently wrong in the logs, and based on what your seeing, it seems like the logic between Homebridge and Blueair's servers is as expected, but between Homebridge and the Home.app is where there is something going wrong.

Can you try changing the mDNS advertiser to "Avahi"? I'm not positive that there is a conflict, but Raspberry Pi OS is based on Linux, and Linux natively broadcasts out Avahi. This can lead to multiple DNS advertisers, which can cause issues. If this doesn't help, I would also recommend testing with the Bonjour HAP advertiser just to rule out a possible issue with the mDNS advertiser configuration for Homebridge and how it's interacting with the Home.app.

jonato1 commented 1 year ago

Also, are you running Homebridge in a docker container on your Raspberry Pi? If not, that could definitely help with stability from what I'm reading here.

blaqkatom commented 1 year ago

I’m running Homebridge directly on the RPi. I’ve had great success and stability with this setup. I have 6 other plugins setup at the moment. Ciao works best for me as mDNS advertiser. I recently tried Avahi and would see issue with my Ring cameras and found everything a little bit slower to respond. I just tried Avahi again and no dice. I removed cached accessories and when they popped back into the Default Room, same issue. I enabled the child bridge for this plugin and when attempting to add to Home app, I get the attached error. Also found these in normal (non-debug) logs. IMG_1959 IMG_1960

blaqkatom commented 1 year ago

Ok made some movement with this. As I mentioned previously, the AWS API call to get devices results in 3 devices… the Office Purifier appearing twice. The same happens behind the scenes with the plug-in as I can see in the logs. I was able to manually remove the duplicate cached Office Purifier, add the child bridge and have been error free for some time. I created the appropriate automations via the Eve app to turn off/on depending on sensor status for a window and sliding door. It’s all working properly although occasionally when turning off, the status will show something akin to “Turning off…” in Home app and stick there for some period of time. I’ll need to figure that one out. But good news.

blaqkatom commented 1 year ago

Considering this closed as the small issue of showing “Turning off…” for a period of time after automation isn’t a big deal.