[RELEASE] OwnTracks for Hubitat Presence Detection

Ahh.. ok. I'm able to break this on iOS. Let me take a look and get this fixed.

2 Likes

Ok, issue is you haven't define a 'Home' region yet. (and no, app shouldn't have thrown up and died, that will be fixed).

For now:

  • Open the OwnTracks app on Hubitat
  • Select 'Regions'
  • Select 'Add Region'
  • Fill in the fields. The default lat/lon is what your Hub thinks it's location is. You can confirm that later.
  • Select 'Configure Hub'
  • Select this region as the home region.

That will fix this. Next version will have a 'advanced mode' slider that will hide all the default things that you don't need to worry about, with clearer directions for new users.

2 Likes

That makes more sense to what I was seeing. Added device fine, quit working, then started working again. I did start adding regions so it must have been happy once I added a home region and then it started communicating properly again.

I was able to get recorder working again as well. JSON export (from logs) is still messed up for IOS devices. Just wanted to mention it, no rush on the fix though, it is still recording fine the profile picture is just missing. Definitely has been some impressive development in the last few days, again thanks very much!

1 Like

Confirmed. Error free

2 Likes

To confirm, you are seeing errors around the iOS profile pics?

In the recorder table, my (Android) profile picture shows up fine, but my wifes (IOS) does not show a profile picture. Same with the live view in the recorder as well. It does seem to update and record properly though, for both Android and IOS users. Though, on my phone, I am seeing my wife's profile picture as intended, its just in the recorder the profile picture doesn't show up

1 Like

Ok, will check that out to see what's up on that.

Can you confirm the thumbnail you put in recorder:

  1. Is in lowercase
  2. If it's in a 'user/device' folder that the device matches what Recorder is showing in the main page

So I was following the format in the logs, and am using capital first letter for names (which matches my users names setup in each device). I matched this file path exactly in terms of formatting.

I am seeing this error after toggling the slider shown below. It outputs the json text, and then I notice the error screen showing on my other tab (with the OwnTracks Hubitat App opened).

The Android user seems to output properly, its just the IOS user gets cutoff at some point, and doesn't have the ending piece of the json, I was adding the ", "tid": "User" } portion to the end of it, but I believe the "face:" value is cutoff too short. Weird, because the IOS user exports first time wise in the log, and then the Android one is posted.

I wasn't actually uploading an image into the OwnTracks Recorder setup, I thought it would pull from Hubitat? At least, that is how my account was working, just not my wife's. Sorry I don't have more devices to test with, just 1 of each for Android & IOS at the moment. Will have another IOS device to add, but that will have to wait until tomorrow at least.

Should I go ahead and add the profile images to the cards/ folder for each user as well? Anything you want me to try just let me know, I'll try to avoid making changes until then lol

When this happens, what is the log error that is being displayed. iOS or Android shouldn't matter for the images. It's just taking the jpg from the filesystem and adding on your name.

For the iOS user, can you:

  • Click the "gear" icon on the top right of the Hubitat app
  • Scroll down to the 'Application State' section and find 'members'
  • Can you check what the 'name' and 'trackerID' fields are showing?

I feel like such a novice, but could someone explain how to remove regions from the iPhone app? I have the app installed from the apple store.

I have managed to create extra ones there, but cannot figure out how to delete them...

Thanks.

If my memory is correct, I think you swipe them away on the iPhone.

Decided to play around a little and am trying to set up Recorder.

Already using docker on the RPI.

Started from here...didn't see any issues or errors getting through
image

Added the contents to the recorder.conf file in docker/volumes/config/_data as directed.

Ran the docker command below as-is to start and enable restart of the container, no issues/errors.

Captured the JSON from the logs for me (I'm the only user) and on the step to get my JSON file onto the Pi, but looked like my folders on my Pi aren't looking like they should...this is what I have.

In recorder_store/_data

In config/_data

Should there already be a "cards" and other sub-directories there? Or is it normal to have to create those sub-directories?

And just to confirm...

When STORAGEDIR is used in a path:
image

Do I have it right that it is an abbreviation for this?
2024-01-15 09_16_04-OwnTracks

I manually created the cards/dana directory and placed the dana.json file in there w/the data from logs.

I think I have recorder.conf set up correctly:

Right after setup I selected myself to get updated settings from the HE app and did both manual location update from the mobile app, as well as restarting it.

As part of troubleshooting I also restarted the docker container just in case, but I still can't access the url (http://192.168.138:8083/pub, or http://192.168.138:8083) from my browser. Other stuff running on the Pi (Home Assistant) are accessible, as well as connecting via putty, so the Pi is on the network/accessible.

Not sure if this is related to my not-working recorder setup, but left the house to run an errand and then came back. Departure was logged normally, my return took a little over 30m to register. Map in Owntracks correctly showed me home, but in Regions it said I was outside home.

Confused in recorder-land. :wink:

Debug logging is off, but I am not seeing any errors or extra log information from OwnTracks. I can try again at soon with debug logging on to see if that throws anything useful up.

I'll take a look later today when my wife doesn't need her phone (uses it for work), so I can't play with it now.

Also, I have noticed I have been getting 500 error messages again this morning from my phone (Android). Checking in the recorder it looks like it hasn't updated today, 9:30pm was the last update. Home region is setup, and all other regions are showing as well. In the regions tab it shows I am currently inside the home region. It does seem like some information is getting through, as looking in the app page I can see a last location report which was just manually refreshed. Not sure if its sending, but not receiving data or what. I haven't left my house since yesterday, so no real change to my location

The card folders need to be manually created. I'll clarify that in the instructions. If you do a "docker ps" does it show your OwnTracks container running?

Can you trigger an update and then check the Hubitat logs? If you are getting a 500 error, then there should be an error in the HE logs on something that wasn't handled properly. The app aborts and never responds back to the phone, hence the 500 error.

Here's what I am seeing: Looks like something is sending, but the battery level reported for me is incorrect. I believe 45% is what the phone had last night before charging. Matches the recorder last check in yesterday at 9:30pm

The line below the warn looks to be Hubitat sending my phone data. The information there was for my wife's account, which also hasn't seemed to update since yesterday (though she hasn't left the house either today).

Yes mine too, worked fine for my phone and could see my travels in real time bot the wife's phone worked all night until 6 in the morning then no more updates . I did a manual update on her phone when I got home after work and it updated once again and showed ok in Hubitat and In the recorder. But didn't show her leaving or returning today. See what happens tomorrow.

Thanks for the note on the card folders.

docker ps results look like it's OK.

fccd2f020926   owntracks/recorder                                            "/usr/sbin/entrypoin…"   7 hours ago    Restarting (2) 6 seconds ago                                                                                                                                  owntracks

Confirmed address I'm hitting from browser is correct IP for Pi via my Putty configuration:

image

This is odd that it won't work...I have several other Pi's running, I can try setting up Recorder on one of the other ones if you think that's worth it.

Did you setup the recorder.conf file in the config folder?

I think the first time I set this up I forgot to create the file, and I remember it boot looping before I got it stable. I copied the exact config shown here, and the docker gods accepted it :joy:

1 Like