Locative for presence sensing

@steve.maddigan , could you pls help me to understand how this can be integrated?

Here’s the thread where Locative was originally discussed…

3 Likes

Hi @MERRICK

Did you get it worked out with the link from @ogiewon Or do you still need a hand?

I know we discuss the driver I modified to allow location. Is that what you are still looking for?

Sorry for the late reply. I haven’t had time to be online much in the last couple of days.

1 Like

Hi @steve.maddigan , from what I'm reading, seems as though Locative is dead(?) but you've still got it operational? All I've done so far is to put the app on my iphone, installed Maker API app, and set Locative's Global HTTP Settings to 'Get' instead of 'Post'.

1 Like

No, it isn't.

Have you gone through the instructions posted above by @ogiewon?

2 Likes

Yes I have it working - maybe a month now - and it is as solid as life360 was for me. And it does not take 1-2% of my battery like life360 did.

2 Likes

I'm now getting appropriate responses for virtual presence sensor, from the url's in Maker API (Histories, Commands, Capabilities), so this is looking good. I'm going to create a BR to test. @steve.maddigan , where does the driver that you modified come into play?

All I did was add a location to the driver.
For automations I only trigger stuff when the location is home. But I added the other locations with the intentions that my wife so can ask “Alexa, where is Steve” and she will respond with something like “Steve left work at 4:35” or something like that.

Got it, thanks. I've tested and Locative is now working for me, and I created a test Rule which triggered when I got home.

  • For rest of family, I'll install Locative iphone app and change from 'Post' to 'Get', create VP for them, and enable their VP's in Maker App. But it feels like I'm missing a step - where/how does their iphone app get associated to their VP device?
  • @steve.maddigan , I'd love if you could help me to incorporate your modification to the driver
1 Like

Ok, this is my first time creating my own repository on github. But I think you should be able to grab the driver from here.

I have not added anything to the README.md yet ... sorry.

The location attribute can take any text string that you give it from the Locative app on your iPhone.

I will post some more on usage in a sec.

2 Likes

once you install the driver, here are examples of the line I use in the Locative app:

https://cloud.hubitat.com/api/########-####-####-####-############/apps/1815/devices/257/departed/home?access_token=########-####-####-####-############
https://cloud.hubitat.com/api/########-####-####-####-############/apps/1815/devices/257/arrived/home?access_token=########-####-####-####-############

https://cloud.hubitat.com/api/########-####-####-####-############/apps/1815/devices/257/departed/work?access_token=########-####-####-####-############
https://cloud.hubitat.com/api/########-####-####-####-############/apps/1815/devices/257/arrived/work?access_token=########-####-####-####-############

You will need to modify your https lines with the syntax from your maker API and your device ID.

arrived and departed must be used, the you can put anything in for the location where I have home and work

I suggest modifying these lines in an editor & then clicking on them from your PC to make sure they work before sending them to your iphone

2 Likes

I've got your driver set, and changed the 'type' in the VP device to it
Screen Shot 2022-10-01 at 3.26.04 PM
For the URL's, I need to put them into Locative app - am I entering them here? Do I enter all of them?


At this moment I don't have any URLs entered into the Locative app, and therefore I'm confused as to how HE and the drivers are identifying my iphone. I don't think I've done anything to associate my Locative app with HE (have I?). Yet my test Rule worked... but I can't understand how.
EDIT: I now understand that the circled area in pic is incorrect.

1 Like

For each Geofence you create in the Locative App, on each phone, you have an option that allows you to enter a URL for arriving and another for departing.

That is how each phone is associated with a particular virtual presence sensor on your Hubitat hub.

1 Like

Yup. As @ogiewon has stated.

A couple screenshots of my setup

I have three locations defined.

Then place the https lines here

Each line will be the same with your specific #s from your makerAPI with device # as well.

Then just enter the arrived/home etc, on each line.

Edit. Just a note - I live on a cul-de-sac and arrive always from one location but don’t want my presence to trigger if I drive by on the main road, so I Center my geofence a few house up the street.

1 Like

Ok, so that makes perfect sense... But so far I haven't entered anything, yet my (test) rule is operating perfectly... How can that be?


1 Like

Have you just been testing the Maker API urls via a web browser, by any chance? That would explain it.

1 Like

Yup

@MERRICK

Sorry forgot to post my current rule. I query first the location, and then work on the presence.

@MERRICK

Did you get it working ok?

1 Like

No- I got in my car and drove to outside the geofence, then came back home. My garage door in the BR above triggered perfectly. That's without ever putting any URLs into their appropriate places in Locative app. I just cannot understand how my phone is associated!

Sorry I was off the grid with some family stuff... Thanks for all your help! I'm testing it out today.

1 Like