naofireblade / homebridge-weather-plus

A comprehensive weather plugin for homebridge.
MIT License
311 stars 61 forks source link

Homekit dropping occupancy sensors when Home Hub changes #295

Open CGCode1000 opened 1 month ago

CGCode1000 commented 1 month ago

I am not sure if my issue is a Weather-Plus issue or not but since it is the only plugin experiencing this issue I figured it was a good place to start. I am running Homebridge on Raspberry Pi5. Weather-plus version is 3.3.3.

Everything works perfect except when my active Home Hub changes all of the Weather-Plus Occupancy Sensors disappear in the Home app.

Restarting Homebridge brings back the Occupancy Sensors in the Home app however I need to re-code the Occupancy Sensor portion of all Home+ automations that referenced one of the Weather-Plus Occupancy Sensors.

For me, this issue is easily replicated simply by shutting down one of my Home Hubs to force another device to become the active Home Hub. It doesn't matter which Home hub becomes the active one or even if it changes to a Home Hub that just minutes prior had the Occupancy Sensors. The triggering factor is merely a change to a different Home Hub.

If anyone has any ideas as to the cause or advice on further troubleshooting I am all ears. And of course if anyone is so inclined to see if you can replicate the issue it would be very much appreciated.

dacarson commented 1 month ago

I strongly suspect this is a duplicate of #247 Please re-test with the newly release version 3.3.5.

CGCode1000 commented 1 month ago

David,

Thanks for always responding. I was able to resolve the issue by changing the Compatibility setting in Weather Plus plugin from "Apple Home" to "Eve and other 3rd party apps". Automations created in Home+ now survive hub changes \o/ \o/ \o/

Which brings me to my next question, when compatibility is set to "Apple Home", Homebridge accessories page displays individual tiles for each of the Weather data points (rain ,snow, cloud cover etc..) however when set to anything but "Apple Home" (as is the case now) all of the individual tiles disappear and I am left with a single current temperature tile with no ability to view any other Weather data points. This is definitely not a big deal since Homebridge is not really designed to be used as a weather dashboard but I wanted to make sure this is expected behavior, can you confirm (or deny)?

By the way I had played around with the different compatibility settings when I first installed the Weather Pus plugin but ended up staying with "Apple Home" when I saw the other compatibility settings were not displaying all of the Weather data point tiles as "Apple Home" setting did. Also, I had no idea until yesterday that when compatibility is set to something other than "Apple Home" you must drill into the single Accessory tile in Home+ and select the desired Weather data point.

CGCode1000 commented 1 month ago

By the way when I discovered that changing Compatibility setting resolved the issue on 3.3.3. I updated to 3.3.5, wen't back to "Apple Home" compatibility which caused the issue to reappear. Changing 3.3.5 compatibility setting back to "Eve and other 3rd party apps" once again resolved the issue.

dacarson commented 1 month ago

David,

Thanks for always responding. I was able to resolve the issue by changing the Compatibility setting in Weather Plus plugin from "Apple Home" to "Eve and other 3rd party apps". Automations created in Home+ now survive hub changes \o/ \o/ \o/

This is really odd because the Occupancy Sensors are only created if you pick 'Apple Home' or 'Apple Home (plus Eve)', this is because the Eve app natively supports all the different weather sensors. (Note I broke the Occupancy Sensors in 3.3.4, but they are fixed in 3.3.5). Eve natively supports weather data by using Custom Characteristics - which is an Apple HomeKit supported way a HomeKit device can have custom features. If an HomeKit app doesn't support the custom features, then they just don't ignore them. When you select 'Apple Home' this weather plugin does not create the Custom Characteristic rather it creates Occupancy Sensors and provides the information that way. When you select 'Apple Home (plus Eve)` it creates both the Occupancy Sensors as well as the Custom Characteristics.

I am puzzled to why you are loosing the sensors when the Home Hub changes.

I am not surprised that you have to re-do the automations when the sensors appear again. AFAIK, Automations are 'cleaned up' if all the triggers/sensors for an automation disappears.

Which brings me to my next question, when compatibility is set to "Apple Home", Homebridge accessories page displays individual tiles for each of the Weather data points (rain ,snow, cloud cover etc..) however when set to anything but "Apple Home" (as is the case now) all of the individual tiles disappear and I am left with a single current temperature tile with no ability to view any other Weather data points. This is definitely not a big deal since Homebridge is not really designed to be used as a weather dashboard but I wanted to make sure this is expected behavior, can you confirm (or deny)?

This is correct behaviour see above. It is also described here.

By the way I had played around with the different compatibility settings when I first installed the Weather Pus plugin but ended up staying with "Apple Home" when I saw the other compatibility settings were not displaying all of the Weather data point tiles as "Apple Home" setting did. Also, I had no idea until yesterday that when compatibility is set to something other than "Apple Home" you must drill into the single Accessory tile in Home+ and select the desired Weather data point.

"Apple Home" and "Apple Home (plus Eve)" should be displaying all the weather data tiles. If the "Apple Home (plus Eve)" is not showing the tiles the same as "Apple Home" then can you file a new issue.