[RELEASE] OwnTracks for Hubitat Presence Detection

LOL! :rofl: Nailed it.

1 Like

I'm assuming if using Presence instead of transition, it should not be any different though.

I've had a bit of free time, so I revisited this.

Very happy. Wow. What a difference from the early days!!

On the subject of maps, however, I'm still a little confused.

I've managed to use sharptools to show this...

...using the Custom Tiles...

image

...specifically this one...

image

image

...and entering the URL from the Hubitat Owntracks App:

image

But I can't figure out how to update this. I understand I can use the Custom Tile to refresh every x mins, but ideally I need a way to manually update the map image via webcore etc.

Any pointers? I feel I'm maybe attempting to do something in a messy way, but I'm wondering if this may be linked to the individual user device...

For reference:
[Wiki] Good Sites for Custom Tile URL - #5 by josh - Community Projects - SharpTools Community

-=edit=-

the createMemberTile doesn't refresh the sharptools frame. A f5 full refresh is needed...

Ah, I should have read the thread first. This is pretty much what I was stabbing at.

Yes, that is correct.

1 Like

Hmmm... Let me look at this. I can make it poll the Hubitat when the tile is open for change (That's what the google friends map does). When it's a dashboard tile, Hubitat triggers a refresh when a tile update occurs, the browser needs to ask for it.

1 Like

@s1godfrey @djh_wolf I just pushed a version that will fix this. When using the URL's, the presence and member tiles will automatically refresh when a new location arrives.

3 Likes

Hiya, I would have wrote a better reply but I've been travelling so you just got a standard "loveheart" :smiley:

I tried to add this to the other half's phone. Failed.

Basically, I installed the hubitat app on her phone. Initially I tried just logging in with my own details (user name/pass). This seemed to create a new device:

I then installed owntracks app (playstore version) on her phone. Followed the instructions as I did for my own...

...but after hitting the update button in the OT app, I expected then to be able to see both a Liz and a Daz - no joy.

As expected, the additional device has not been created. Just my original one.

Did you enable Liz in the HE app? When you send the first location from the phone, it will show up as disabled in the HE app. As soon as you enable it, and exit the HE app, then her device should get created and properly mounted.

I'm really sorry. But I don't follow...

@lpakula

Quick question in regards to transitionDirection. You recently changed the wording to arrived and departed but I am also seeing enter and leave. Are enter and leave appearing a bug or are they supposed to occur?

I generate my own notifications based on transitionDirection and wasn't expecting to see enter and leave as I don't recall seeing them before you made the most recent change to the wording. If everything is working as intended I will just trap for enter & leave so they don't affect the rules I have written.

Thanks for all the work. Owntracks is working great!

Whoops, bug. I just pushed a version to fix that. Thanks for catching it!

2 Likes

Oh, when you first install the app on the phone, and then push a location from the phone, the HE app won't automatically mount a device and enable the member.

You need to open the HE app, and select Liz from the selection box:


Once you select her, and click done in the bottom right of this window, then she will get a device created. Otherwise you should see a warning in the logs about her phone reporting but not being enabled.

It was meant to be a safety if someone got a hold of your URL that they couldn't spam the hub with a million fake devices.

3 Likes

Very smart of you @lpakula!!

2 Likes

Ah. Yes, I understood that part already. Unfortunately, I cannot select Liz from the selection box. I can't get Liz to appear therein the first place.

Complain is such a strong word :smiling_face_with_tear:

Your work on this is outrageously good - and has fixed the presence part of my Home that has been an issue for a while. Very much appreciated.

2 Likes

All good! In the spirit of getting it more refined, it was a worthy change!

2 Likes

Got ya! Can you check the log on her phone? Sounds like it didn't send anything to the hub, hence it not showing. Maybe re-paste that URL from the HE app to make sure.

1 Like

Hi. Could you please let me know how to check the logs? I've double checked the settings, all looks fine. Nothing appears to be being sent.

I attempted to re-add my own, and it's fine. I'm stuck adding my partners.

edit

2024-04-02 19:23:17.599 I GeocoderProvider: Setting geocoding provider to Device
2024-04-02 19:23:17.645 I ServiceStarter$Impl: starting service
2024-04-02 19:23:17.660 E MapViewModel: no location available
2024-04-02 19:23:17.972 E BackgroundService: missing location permission
2024-04-02 19:23:17.973 E BackgroundService: missing location permission
2024-04-02 19:23:17.986 E MapViewModel: no location available
2024-04-02 19:23:18.044 E LocationProcessor: no location available
2024-04-02 19:25:58.526 E MapViewModel: no location available
2024-04-02 19:25:58.774 E MapViewModel: no location available
2024-04-02 19:27:30.912 E MapViewModel: no location available
2024-04-02 19:27:31.083 E MapViewModel: no location available
2024-04-02 19:27:46.025 I ServiceStarter$Impl: starting service
2024-04-02 19:27:46.036 E MapViewModel: no location available
2024-04-02 19:27:46.180 E MapViewModel: no location available

edit2 - I'm an idiot. Location wasn't allowed, my bad!

2 Likes

Welcome to the club. There are many lifetime members here... :rofl:

4 Likes