chrisjshull / homebridge-nest

Nest plugin for HomeBridge
699 stars 112 forks source link

Cannot use geolocation to disable HomeAway #564

Closed tomeranaray closed 1 year ago

tomeranaray commented 1 year ago

Describe the bug I have added a HomeKit Automation so that when the last person leaves home, the Home Occupancy Switch is turned off. And when the first person arrives home, it's switched on. I assume this is the most obvious use case for this switch.

Manually, the switch works as expected. But when I leave home, the Switch does not turn off. It does automatically turn on when I arrive home.

To Reproduce Steps to reproduce the behavior:

  1. Create a HomeKit Automation to switch off the Home Occupancy Switch when leaving home
  2. Leave home

Expected behavior when leaving home, it should switch off the switch but it doesn't. As the switch does work fine manually, I'm not sure it's a bug related to this plugin or if the type of switch prohibits this automation functionality. Possibly, it's iOS 16 related? Maybe it should be another type of switch? Other devices do respond correctly to the automation, so it does fire.

Include with your bug report this version info: Node version: 16.17 HomeBridge version: 1.5

adriancable commented 1 year ago

Have you turned off Nest’s Home/Away Assist function in the Nest app? Otherwise, both the Nest system and HomeKit will be trying to control the home/away state at the same time, which will lead to undesirable things happening.

tomeranaray commented 1 year ago

Hi, It is turned off as the Thermostat and mobile phone do not determine my home away status in the Nest app. Enabling eco mode when away is turned on in the Nest app but I assume that’s fine?

adriancable commented 1 year ago

Yes, that's fine.

Unfortunately, Homebridge or plug-ins (or anything on the HomeKit device side) doesn't have any concept of geolocation, automations, notifications, etc. We just pass events onto the HomeKit subsystem. So, if you have problems with any of the 'HomeKit UI' the issue is on the Apple side. I would suggest things like rebooting your HomeKit hubs, checking your iCloud settings that your iPhone is sharing location, that other devices that remain in your home (e.g. iPads) are not sharing location (otherwise Apple will think you are always at home, for example), and that kind of thing. Sorry I can't be more helpful, but hopefully these are good pointers.

tomeranaray commented 1 year ago

Thanks for the feedback. I was thinking maybe the type of switch might be the problem as I’ve never seen an occupancy switch before and Apple is very strict in what can be triggered automatically. But great it’s not related to the plug-in and probably specific to my setup.