[RELEASE] OwnTracks for Hubitat Presence Detection

Do you have recorder setup and working? I believe to show this map with all the friends you need to have the recorder running as well.

1 Like

That makes sense

Yes sorry to you, and @jsarcone, I was typing while watching the super bowl and a bit distracted and forgot to mention that. :grin:

1 Like

All good. Thanks everyone for the clarification.

1 Like

I'm still trying to figure out an elegant way of getting multiple users on a single map without using the recorder.

5 Likes

@lpakula

So far everything looks great this morning. We have left and entered 3 different regions and the results look to be very accurate. Thank you.

Question as for plotting everyone on a single map without the use of recorder. Is it a matter of where to store the lat/lon readings? I played with storing them on the HE, and had a very rough RM rules working but was side tracked with a different project and never got back to it. I was going to try and store the lat/lon on the HE and then plot them using Google.

I'm not a programmer so my thoughts here may be completely unrealistic.

1 Like

Today.. And with latest update everything is working normally. No hickups and no waiting for location to update.

3 Likes

No, it's the tool to display them. Google maps allows for a couple different ways:

  • Single location pin on a map (that's what the member location tiles use), works great!
  • Multiple waypoints when doing directions (those are just unlabeled circles though)
  • Static map with multiple pins (needs the API key, and you can only have a single letter for the pin)
  • Map layers, but that uses Javascript and a bit more involved than a simple tile and I don't know if those will display in HE.

Inside the HE app, it has all your members + their last location. So it's all there... just waiting to be popped onto a map!

1 Like

Some help needed w/the Google API key restrictions...what's the best approach/settings?

2024-02-12 12_09_42-Edit API key – APIs & Services – Google Maps API Own… – Google Cloud console

Unless you have a static IP (which most ISP's do not use), I don't know if a way to add any restriction. for the HE geocode calls. Unless you're sharing your API key, there really isn't a issue with it being unrestricted.

1 Like

So… back to the sporadic update and spotty tracking issue…

I returned home today and opened the tracker. I noticed that it placed me a few miles from home. I then opened OwnTracks on my phone, and noticed that it was sending data to the database. I also watched my position change with each data transmission, stepping closer and closer towards home. Eventually it put me at home.

The odd thing here is that even though it showed me at various intermediate points when this was going on, these points weren’t added to the database, as far as I can tell.

Again, I have no clue what’s going on here or where the issue lies. I am on iPhone, latest update, and also in an area that has poor cell phone coverage.

You will need to turn on debug logging + address/location logging for that user. I have seen some people show that the phone is reporting the same old location data for multiple reports. (same lat, lon, speed)

[quote="jpcurcio, post:1652, topic:130821"]
also in an area that has poor cell phone coverage.
You only have 1- "+follow" region in your phone regions section?

Yes, I only have the one +follow.

I turned on debug logging and address/location logging. What do I do with this info?

General troubleshooting steps:

Turn on debug logging in the app and set it for enough to cover your next trip. Hit Done at the bottom of the app page to save your settings.

image

Turn on debug logging in your Owntracks device(s) that you want to monitor. Turn off address/location info on debug logging if you want to preserve privacy. Save your changes.

Then take your trip. Keep track of when you leave and when you arrive back home.

When you get back, go to the Logs>Past Logs page and hit the Reload button to update it w/the most recent logs:
image

Then filter your logs on your Owntracks app and Owntracks devices:
image

Take screen caps of your filtered logs for the time-frame of your trip. Get logs from several minutes after you arrived home to when your trip started. Send the logs to @lpakula in a PM, or post them here - if you've turned off showing location/addresses in the logs posting them here should be fine. If you post them here, hide them so that this topic doesn't become full of really long posts w/screen caps of logs:

Like this...highlight your screen caps and then use the "Hide Details" option under the gear image in the post settings:

Summary

That help?

4 Likes

Thanks @danabw . Said that beautifully!

@jpcurcio I'm curious to see in those situations if the logs are showing multiple locations coming in with the exact same lat/lon and speed.

1 Like

Heyo - Fantastic implementation - I'm benefitting from this wonderfully! I see that the dev and changes on this are still constant - I've a feature request or possibly a quirk I'd like to ask to be looked at.
I msg'd on my Dashboard app thread about his Battery Tile not picking up my cell phone (the amazing HD+). I have removed all of what I call 'Personal Presence Devices' (I was using 4 different ones to try and get it to be consistent) - Now I'm just using this!
One of the previous devices would report my cell battery. HD+ picks up all 'Battery' devices and makes a great stoplight with it (does anyone else refer to colorized icons grn/yel/red as stoplight?)
image
Drilling in to it now, the cell is no longer listed. His response was:

Maybe using the 'Battery' event with a numeric value, and using BatteryStatus for the text value would resolve this? His reference to the HE docs seems to give guidance on this...

I had the behavior yesterday, but for some reason could not retrieve the logs (purged already?)...

So today, on my trip to work... everything worked as it should. Dammit!!!

I just updated OT and battery shows up as 0.0 mi from Home - Mon 11:52 AM for some reason.
image

It would be nice if the battery attribute matched other devices that support Battery capability though -- basically what you have for batteryPercent. Not sure if that's something you want to change or not.. just let me know and I can always handle this one separately too


Battery

Device Selector

capability.battery

Driver Definition

capability "Battery"

Attributes

  • battery - NUMBER, unit:%

Battery % shows battery %.

Battery can show whatever you want it to - set in Preferences. A little out of the ordinary... :slight_smile:

image