I was looking for a way to do presence detection / geofencing with my iPhone and Indigo. HomeKit does a little of this itself, but its automation rules are pretty primitive compared to the power of Indigo. Here's one way you can do it - and so long as you're already using homebridge-indigo, you don't have to add any plugins, apps or additional software at all!
You'll need the following setup for this to work:
Indigo 6/7 (Pro)
Homebridge: https://github.com/nfarina/homebridge
Homebridge-indigo: https://github.com/webdeck/homebridge-indigo
We'll use Bob for this example.
- Create a variable "isBobHome".
- Create an action group "Bob Arrives Home". Configure it to set the isBobHome variable to true.
- Create an action group "Bob Departs Home". Configure it to set the isBobHome variable to false.
- Create a virtual device in Indigo (of type "Virtual On/Off Device") indicating Bob whether at home and call it "Bob at Home".
- Configure the virtual device to fire the "Bob Arrives Home" action group when turned on, and "Bob Departs Home" when turned off. Check the "Supports Status" checkbox and select the isBobHome variable.
- Expose the virtual device to homebridge-indigo in your homebridge config.json and restart homebridge.
- In the iOS home app, set up a trigger (under "Automation") to activate the virtual device when Bob arrives home, and deactivate when you Bob departs home.
That's it! You now have both a variable and device status in Indigo that indicates whether Bob is home or not. Since it's a variable, you can use it in all sorts of combinations to create more advanced rules (in my case, I'm using it to activate/deactivate my IP cameras depending on whether both my wife and I are home.)
JP
(For another way you could approach this without using the Home app, check out the Locative iOS app in the app store. It supports webhooks and could be used with homebridge-people-geofence.)