I actually find the multiple geofences to be one of the most compelling features of locative, even if you’re using them at one location.
I tend to set a smaller radius for one, which sends the “arrival” http call to Hubitat. And a slightly larger one for the “departure” webhook.
That way any automations I use for arrival don’t happen when I’m too far away, and departure automations won’t occur just because I take a few steps outside the house (or due to a momentary drift of my phone’s location).
I am using a modified presence driver that also has location. I have three locations defined. If Alexa is asked “where is Steve” she will identify I arrived or departed home/work at whatever time.
I plan to also add an arrival timer to the driver so each presence has its own countdown independent of the global timer I have in RM.
This doesn't seem to provide the instructions I'm looking for.
Does anyone have instructions to enable a switch on the Dashboard that would allow me to manually change the "Arrived" or "Departed" state as shown in Part 1 step 4 above?
Add a new EZ dashboard, add the virtual contact/switch device to the dashboard in the configuration menu that comes up when creating the dashboard, then confirm and you should see the device tile on the new dashboard.
Change the Device Type for your Locative Virtual Presence device to Virtual Presence with Switch, instead. Then make sure you can change presence status of the virtual device with the On and Off commands.
You can then add a tile to the Dashboard that uses the Switch Attribute, and corresponding commands, to change the Presence Attribute.
I use iBeacons in combination with Geofency and/or Locative which will give a more accurate and reliable presence detection. It does require a few apps to consider what if in order to prevent false presence/ no presence detections. As an example, I have a timer that starts every time the front door sensor opens. If the sensor hasn't sensed an opening for a while, there is no way that anyone could have left the house. I don't use Wi-Fi since it's too unstable to use for presence detection.
Many thanks for the detailed instructions on setting up Locative. I use it with two iPhones (mine and my wife's) and it works great - most of the time. Here's what just happened (and has happened once or twice previously).
My wife left to go to a meeting. I get a notice from Pushover on my phone telling me that the mode in Mode Manager has just been set to 'AWAY'. What!? I'm still at home! The logic I have set up in Rule Machine says to enable AWAY mode only if both phones are no longer present. What's going on? So, I start digging...
Aha! It turns out that when I returned home yesterday Locative sent the 'Entered/Arrived' message (as it should have) but it failed with a 'No Response' from the Habitat (C7). OK, I'm not sure why it failed but stuff happens. I have 'Notification on Failure' set in Locative thinking that would cover such an eventuality - but I don't believe I ever got a failure notification from the app.
Am I not understanding what Notification on Failure is for? I (perhaps naively) thought having that setting enabled in Locative would have generated a notification on my iPhone that the Entered/Arrived message had failed.
The fix of course was to manually change the state for my iPhone to 'Entered/Arrived' on my Habitat. But what I'd really like is to be able to know that an Entered/Arrived (or Left/Departed) message had failed in some way so I know the state machine is out of synch.
I just shutdown my hub and gave it a try. Like you I have “Notification on Failure” enabled and I expected just that, a notification that there was no response, but it did not happen.
I enabled Debug and well that gives notifications, they are not nice notifications.
Possibly @ogiewon can comment on this bc he is way smarter than me.
But I am also curious why the webhook failed. It shouldn’t. Are you in a rural area where cell coverage may be spotty?
From the Hubitat server to your hub should be rock solid. If this is just a single occurrence I would worry about it but if this becomes repeatable, it may be a worth investigating further.
Sorry I am not much help. My first check would be to ensure locative has access permissions to your location on your phone, but your webhook got sent so that must be working.
I hadn't thought about how reliable the cell signal is. The cell coverage at this location is in fact somewhat 'Meh'. It is usually reliable, but only around two bars. So, that might be the cause.
Because the cell service is weak - particularly inside the house - I have WiFi Calling enabled. I wonder if the handoff going from cell -> WiFi when my phone was arriving might be involved somehow? [ FWIW, looking back through the Locative log, I see that there have been delivery failures on both arrival and departure events. ]
So, we're left with two mysteries:
Why is the delivery failure happening in the first place? Meh cell coverage might be the explanation for that. As an experiment I'm going to widen the geofence radius (it's at the minimum 50m now) so that the transition from cell <-> WiFi is less likely to be happening when the webhook message is sent. Maybe that will help. The challenge is in proving it as the problem is not reliably repeatable. The other thing I could try is turning off WiFi Calling. I'm less inclined to run that experiment...
Why am I not getting a notification from Locative when the delivery failure occurs? That one is still open. I'll see if I can find a Locative forum for help on that one.
Thanks for the help!
P.S. I realize that every occurrence of 'Hubitat' in my original post had been corrected to read as Habitat. Grrr...
I also have wifi calling enabled but I have my radius set at 230m. So could add merit to your line of thought. I have mine set this large bc I like the outside light to come up to full brightness by the time I hit the driveway
The reason I had the geofence radius so small is that the 'AWAY' lights were turning off in the Vacation Lighting Director before we'd even get to the driveway. As a result, my wife was concerned that the lights had never come on in the first place. With a 50m radius it was still a little dicey, but they were still on at least some of the time by the time I drove into the garage.
What would be ideal is a way to tell the VLD app to leave the lights on for N minutes (if it had in fact turned some lights on) when switching away from AWAY. I don't see any obvious way to do that short of writing my own logic. But that's a discussion for the VLD forum...