Use Locative for Presence

I am not sure whether or not Hubitat's IFTTT support includes the ability to change a virtual presence device's status or not. If not, you may still be able to achieve the same result by creating a Virtual Presence Device that also includes the "Switch" capability. This can easily be changed by IFTTT. When the on() function is called, it would simply update the presence attritbute to 'present'. When the off() function is called, it would update the presence attribute to 'not present'.

Are you familiar with developing Drivers for Hubitat and/or SmartThings? If so, then what I typed above would make sense. If not, I am sure we (the community) can assist you as needed. It should only take a few minutes to create such a driver.

I’m using the webCoRE Presense app. It’s been working great for me and RM.

@bgav Brian,

I just wanted to let you know that I have Locative on iOS running and keeping a Virtual Presence Sensor up to date on my Hubitat Elevation Hub. I am using the Hubitat Maker API App to expose the Virtual Presence Sensor via the Hubitat Cloud Endpoint. It works really well so far.

Just thought that you might be intrested still. I wish the developers were still maintaining Locative. At least the source code is available. Unfortunately, it is no longer available from the Google Play Store.

Thanks for the info! I'll see if I can get it working.

1 Like

Anyway you can help with the setup. I can’t seem to get it working. I created a virtual presence sensor and and used the maker api send device command cloud link to the assigned device ID and populated arrived and departed in separate links. Added them to locative. But isn’t working.

https://cloud.hubitat.com/api/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/apps/294/devices/[Xxxx]/[arrived]?access_token=xxxxx-xxxxx

In the Locative App, under SETTINGS, make sure you have Global Http Settings configured for "GET", not "POST"

You can easily test by pasting in the following two URL's on that same page and clicking "Send Test-Request"

Your URL format posted above is a little bit off...

Go back to your MAKER API App on your hub, and scroll to the bottom where you should find the following section:

Send Device Command (replace [Device ID] with actual subscribed device id and [Command] with a supported command. Supports optional [Secondary value]

https://cloud.hubitat.com/api/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/apps/294/devices/[Device ID]/[Command]/[Secondary value]?access_token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
https://cloud.hubitat.com/api/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/apps/294/devices/[Device ID]/arrived?access_token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

https://cloud.hubitat.com/api/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/apps/294/devices/[Device ID]/departed?access_token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

In the above two URL's, you will need to replace the entire "[Device ID]" with the 3 digit numeric device ID of your virtual presence device. (Be sure to remove the brackets!)

The easiest way to figure out that numeric ID is to simply click the "Get All Devices" link on the Maker API App page. This will return the list of devices that you have exposed via the Maker API and will show you their 3 digit numeric device IDs.

Hopefully this gets things working for you. I am pretty impressed with how little battery Locative uses. It has triggered the presence sensor changes 4 out of 4 times so far. Not a huge data set, but definitely looking good so far.

5 Likes

Thanks Ogiewan. So far working great.

:disappointed_relieved:
I wish I could use this app as well but I use android.
I've been trying tasker with GPS location as @ogiewon recommended but it seems to a just a bit too delayed. I'm considering adding wifi connectivity to my tasker profile but have a feeling the battery hit would be too much.

I wish there was someone out there who knew how to compile the android code in the github into a useable apk. :pray:

1 Like

I am currently testing an app on my Windows Phone that lets me set up a geofence and then enter webhooks on entrance and exit of the geofence. I used the cloud Maker URL to set my virtual presence sensor to arrived or departed. I set all this up last night so need to check the logs when I get home to make sure it worked, though it did set the virtual presence sensor to arrived when I first set up the geofence.

Perhaps a similar set-up would work on Android...this looks very similar to the Windows Phone app I installed:

Edit: Happy to report that the geofence on my Windows Phone worked perfectly, and it reports me arrived before I am out of the car! I set the geofence up to be 200 meters from my house.

1 Like

@denise.grider

Windows phone? Wow didn't know people were still using them let alone apps being made for them.

3 Likes

You might be surprised...only Microsoft has given up on them! :smiley:

I've used an Android phone and seen other people's iPhones, and IMHO the Windows Phone is superior, plus seamless integration with my Windows desktop.

2 Likes

@homeauto2112 Did you have to change anything in the Webcore Presense app to use in HE?

I did not. I just loaded WebCoRE and then setup the Presence app.

I ended up moving my WebCoRE back to my Smartthings Hub as there were reports earlier that it might slow the hub down. I then used the HE Hublink to create a Virtual Presence Sensor.

I don't think I'm answering the question though.

Did you have to load the WebCore Presence Sensor DH?

Yes I did. Otherwise WebCoRE wouldn't know how to create the device.

Gotcha! I have set this up for my phone. I am watching the logs to see if any errors come up. Nothing yet.

You can setup a test RM that either flips a switch or sends an alert when the phone is present or not. Then go into the virtual device and select "Arrived" or "Departed" to see if that part is working.

I'm so happy I got Locative working with help from @stephack

Maker API was a snap !!

2 Likes

Glad to hear Locative is working for you as well! It really does seem to be a decent, reliable, light-weight mobile phone app (at least for me on iOS).

1 Like

Likewise. I also love how the geofence can be super small.

1 Like