Where Do You Stand On Presence?

I don't suppose there's a guide anywhere on how to setup Locative with Hubitat for presence? I've installed the app and set up the geofence but have no idea what to enter for the 'Webhook on arrival' and 'Webhook on departure'. I've never done anything with http get or post as yet :confused:

1 Like

Would you not make use of Maker API? Using the URL's it sets up to adjust a virtual presence sensor?

Yeah I've created an instance of maker api (not sure whether I need one for arrival and another for departure). I've added a virtual presence sensor. I'm also not sure which of the multiple maker api cloud urls I need to add as the server.

You can get tge device it from the device edit page, just look at the url in the address bar.

You won't need a separate instance for arrival and departure.

You want to use the url for issuing a command. Check back on the device edit page, I think it's arrived and departed are the two commands. You can test this in a browser by pasting the url you construct into the address bar, having replaced things like the device id and command name. You won't need the secondary value.

I can find an example if you need one.

1 Like

Thanks - I found that if you put the devices page in grid instead of list view, the device ID is shown for all devices there.

That makes sense - I'll have a play and come back if I get stuck.

Edit: In maker do I want the url for get device command or send device command? In the Locative app do I select GET or POST. Apologies for the dum****s questions!

1 Like

Here is the original Locative thread, with some instructions for use.

4 Likes

Thanks @ogiewon I've had a look through that thread.

I changed the global http settings to GET and pasted the maker api cloud url's in one at a time and clicked the 'Send Test-Request' link. Both departed and arrived messages popped up on my iPhone and the logs show that my virtual presence sensor updated with each test so that looks good.

I take it that once I've tested it as above I need to delete the url I pasted into the Global http settings (as they are entered in the Locations section)?

3 Likes

You can leave the URL in the global settings section. It will not cause any harm.

1 Like

I didn’t find it by searching in the App Store either. I googled the site and then used the AppStore link from their webpage.

1 Like

I had the same issue searching for Locative - The Developer name brought it up.

2 Likes

Even though I have it working with cloud links I think I am going to use this as a test to try using the makerAPI for the first time.

Thanks for the details and the link to the previous thread.

1 Like

I'm cheering you on. You may recall from my previous question that I couldn't find a way to surface the webhook payload in RM. Maybe that's something that can be done in MakerAPI and you'll share.

1 Like

You could write your own OAuth2 enabled App, which would allow it to use cloud endpoints. This would provide much more control over parsing the data coming from Locative.

1 Like

I'm surprised how accurate the geofence in Locative is and how snappy it actions in Hubitat via maker. I've set my Home radius to 100m and decided to check it via the logs and my CCTV. The virtual presence sensor I created in Hubitat showed 'arrived' in the logs at 13:27:53 and when I checked playback of my camera at that moment (synced via NTP) I could see my car approaching right on the geofence perimeter....I'm impressed :grinning:

2 Likes

I kind of knew it but didn't really check it out much, but if you use iOS and a Mac then Geofency may be of interest. It's got more and/or easier to use features than either Locative or OwnTracks. Besides monitoring your set locations it will optionally track frequent places and will also plot them on a map or Gantt chart (like Home Assistant graphs).

1 Like

I found some time to look at this today.

Instead of a http in POST node I needed to use GET as the script I'm using relies on the requests.get() python command. In any case I "re"discovered that the script only generates an event when the presence state changes so while I got everything working I didn't move it over in the end. However not wasted effort as I spent time learning about the http node which will be useful in the future I'm sure.

Sweet! Sorry it didn't work out for you, but learning is about 75% why I do this, so win!

2 Likes

@ogiewon - thank you again for your links. I now have my first MakerAPI working :smiley:

@HAL9000 - so I am not a SW guy and i am definitely NOT going to pay a monthly subscription to use Request Designer ... but looking at other drivers I have I replaced the Virtual Presence driver with a User Presence/Location driver.

I attempted but failed to pass a secondary value of home or work, so I added additional commands.

Does this address what you were trying to accomplish? Quite possibly i have misunderstood.

Im trying out Owntracks now - so far, so good. Thanks for the pointer :+1:

2 Likes

I don't know what Locative sends, if anything, as data along with the URL by default. If it requires a monthly subscription just to send the name of the geofence and whether it was an enter or exit, then I'd be out too. And I don't know if anything sent to cloud.hubitat.com gets passed along to Cloud Endpoint (or MakerAPI) triggers.

What I hope it would do is include something like geofence_ID=Home and direction=Enter which could then be used in a rule to conditionalize actions based on which of up to 20 different geofences were entered/exited, all in one rule (per person in the household running Locative on their phone).

Sure, this could be done with multiple cloud endpoints, but four family members, 20 locations .. that would become unwieldy.

I had at one point used Life360 and BPTWorld's stuff to do something similar, but just wanted something more lightweight on the client side.

1 Like