[RELEASE] OwnTracks for Hubitat Presence Detection

Can you give me some clarity on what your issue is, and what you need this for? Need to better understand what you are looking to test here! Thanks!

A button to test that it connects to each API correctly, trying to help a friend and not sure if the API is connecting correctly or not.

You mean to confirm that your geocode or maps API keys are working/connecting? You can just use the direct links for the google friends map, and paste that into a browser. If the key is wrong/not activated, you won't get a map, you will get error text saying that you need an authorized API key.

I can get something added right to those API entry pages though to allow a quick "verify API". That would be handy for setup!

1 Like

FWIW, I installed the 2.5.0 Beta 2 yesterday and tested it on a walk and it reported perfectly - matched reporting from @lpakula's modded app also running on the same phone.

I run the two instances of the Owntracks mobile app on my phone at the same time - allows me to test the existing version (I use Lyle's modded apk) next to the offcial 2.5.x beta versions. As of beta 2 they both work equally well at tracking/reporting from what I've seen in limited testing.

@lpakula
OT having a meltdown this morning; tonnes of log errors.
Looks like it started at 10:00 which is when my HPM does automatic updates.

app:16332024-04-26 12:17:20.395errorjava.lang.NullPointerException: Cannot invoke method toDouble() on null object on line 2010 (method webhookEventHandler)

app:16332024-04-26 12:17:20.339errorOwnTracks: updateDevicePresence: Exception for member: DaveOT java.lang.NullPointerException: Cannot invoke method toDouble() on null object

app:16332024-04-26 12:14:32.360errorjava.lang.NullPointerException: Cannot invoke method toDouble() on null object on line 2010 (method webhookEventHandler)

app:16332024-04-26 12:14:32.316errorOwnTracks: updateDevicePresence: Exception for member: DaveOT java.lang.NullPointerException: Cannot invoke method toDouble() on null object

app:16332024-04-26 12:12:31.264errorjava.lang.NullPointerException: Cannot invoke method toDouble() on null object on line 2010 (method webhookEventHandler)

app:16332024-04-26 12:12:31.223errorOwnTracks: updateDevicePresence: Exception for member: DaveOT java.lang.NullPointerException: Cannot invoke method toDouble() on null object

app:16332024-04-26 12:10:17.759errorjava.lang.NullPointerException: Cannot invoke method toDouble() on null object on line 2010 (method webhookEventHandler)

app:16332024-04-26 12:10:17.710errorOwnTracks: updateDevicePresence: Exception for member: RozOT java.lang.NullPointerException: Cannot invoke method toDouble() on null object

FWIW, not seeing any Owntracks errors in my log, on 1.7.50.

I am finding Owntracks notifications aren't working again, though. Devices reporting location properly, but Owntracks app isn't sending depart/arrive notifications.

NVM...took another drive and notifcations worked as expected. At one point I went into Owntracks and found that my notification settings appeared to have been cleared - maybe something in the recent update? Don't think it was me as I hadn't looked at notification settings in a while. Anyway, re-configured them and that may have sorted my previous issue w/notifications not working.

Where / How do I do this? Your app or on googles side?

Can you check if you are running the latest version, and then open the app, and then click "done" at the bottom right of the HE screen?

If that doesn't fix it, go back in the HE app and reassign 'Home'. You are caught in an issue that I broke trying to fix the iOS problem.

Running 1.7.50
I rebooted with a DB compact and haven't had the error in the last hour. It was every few minutes for both our phones.

I already reported this exact same error and the fix for it was to force location update from Hubitat Owntracks app.

If I remember right this wasn't the first time when app gets stuck after update. For some reason app locks somehow and it cannot be fixed automatically. It needs a little push.

Thanks. So many posts I don't remember them all. :slight_smile:
I "pity the fool" who joins this thread late. :rofl:
For those Mr. T fans.

3 Likes

I'm wondering if anyone else is seeing this.
OT is up to date. It's running 1.7.50.
I noticed today that when I left home and went to a defined region, no notification was sent of me entering/leaving that region.
I checked OT -> Configure Region Arrived/Departed Notifications -> select 'me' -> and under ' Trigger notifications when this member enters/leaves' none of my regions were selected.
I toggled them all on.
Save settings -> next -> done.

I then went out later today, entered another defined region, again no notifications.
Checked the above and again no regions were selected for notifications.

I've selected them again and we will see what happens tomorrow.
Is anyone else getting this issue. It has only just started for me. :thinking:

EDIT: I should add that the actual OT presence is working and is showing me 'present/not present'.

You you check that they are still selected? 1.7.50 fixed an issue where the regions would get unselected in 1.7.48/1.7.49.

Pushed 1.7.51 with a couple of those feature asks added:

  • @s1godfrey there is a "Member Command API Links" expansion box on the main screen. This exposes direct links to trigger a member's virtual switch on/off as well as arrived/departed. This is used for more advanced integrations where a user would like to use other logic inputs to trigger the presence.
  • @albertjmulder On the Maps/Geocode API screen, the geocode will automatically check if it is valid and show the address of Google Headquarters, or a red FAILED if the key doesn't work. Under the Maps API section is a clickable link for "Test map API key". If you see a Google Map, it's working. Otherwise you will get text on the web page indicating a failure.
4 Likes

I was at 1.7.50 today.
As said above, today nothing was selected. This could be because of the issue and they were unselected when I upgraded to 1.7.50.
I selected them this morning when I noticed the issue.
Went out again and no regions reported.
Looked at regions again, and again, nothing was selected. Re-selected the regions again.
Just looked again and the regions are selected. Might just be one of those things, we shall see.

I had an instance on 1.7.50 when it appeared regions had been unselected. I reselected them, selecting two regions separately rather than using the toggle all on/off option.

The next time I checked it appeared regions had been unselected again. I then used the toggle all on/off option to select all regions for notifications and things have been solid since then.

1 Like

Silly question, but after you selected them, did you click the "save" button? I've forgot to click in and then did a bunch of muttering on why it wasn't working before! :joy:

Awesome work!!

Just changed all my garage/arrival/presence/parking automations to use the new OT Member Command API links and did a test run around the neighborhood. Everything worked as normal.

With this I was able to eliminate the use (for my case) of Combined Presence as well as control the OT Member switch directly from Tasker in my Android when my BT connected to the car. So, now I only have one (the ultimate) device which works all my automations, action, monitoring, reporting.. you name it!

Thank you so much for the extended effort to make these additions.

2 Likes

Not a problem!

1 Like

When I noticed nothing was selected I selected 'all' and clicked next.
Went back, had a look and nothing was selected.
Realised I was an idiot by not seeing the save button, clicked on it after selecting all, and then clicked next.
Went back and the selected regions were there.
So to answer your question, I'm sure I clicked the save button before clicking next.
Anyway, no big deal. Let's see what happens tomorrow. (That's if it stops raining and we go out). :wink:

2 Likes