[RELEASE] OwnTracks for Hubitat Presence Detection

I added it back up there a couple months ago when someone else asked that question. But don't blame you for not wanting to scroll up!

1 Like

@lpakula
I got the same notices in my email
Is this necessary to do ?

Thanks for the response!

I really appreciate you pointing this out. When I first set things up, I think I got lost somewhere deep inside Google’s Cloud Console… it honestly felt like wandering through a hedge maze where the hedges keep moving and the “exit” button is always behind another paywall. :sweat_smile:

So it’s very possible I didn’t set the keys up exactly as you described. Your note about splitting the geocode and maps API into separate keys (and locking maps down to cloud.hubitat.com) makes a lot of sense. I’ll go back and double-check my setup with that in mind — hopefully this time I’ll escape the maze without needing a ball of string or a Google Maps pin drop!

Thanks again for the clear explanation — it really helps.

1 Like

Not "necessary" but it someone got your map API key for example, they could rack up a bunch of charges to your account.

1 Like

Neither did I until Google complained a while back. :joy:

2 Likes

I finally waded through the Google Cloud Console, and now have a strong urge to start drinking and smoking again, and was able to restrict all of my keys. Thanks Lyle for the suggested restrictions.

I also kept notes for next time.

  1. Go to Google Cloud Console

** Using the Hamburger menu

  1. Select your project from the menu

  2. Select Credentials under API's & Services

  3. Select your key and apply the restrictions.

When I entered the cloud.hubitat.com website restriction I had to strip the https:// to get it to work. It also wouldn't let me add an IP address restriction in addition to the website. It was one or the other.

Anyway, maybe this will help someone else down the road.

5 Likes

Yeah I couldn't application restrict Maps Javascript API at all. If I add cloud.hubitat.com with https or without..I can't open "Test Maps api key". When I remove restrictions then everything works normally.

Geocoding API is restricted with my public ip but that will be an issue at any time when ip changes.

1 Like

Glad to see it wasn't just me. I am going to start monitoring my IP address with a rule and the Hub Information Driver that way I'll know when it changes. It generally only changes when I need to reboot the cable modem.

@Jani

Are you both selecting "websites" as the application restriction? This is what I did (a while ago though, so unless they changed something):

It would make sense to use fqdn but obviously that is not possible at all.

EDIT: stupid me. Of course there is possibile to add fqdn as a website restriction. Just did and it works. I'm using noip.com dynamic dns and by using that you can forget public ip address changes completely.

2 Likes

I used these recommended settings, but it didn't help. :frowning:

EDIT: ok these are the ones to use. After that it works.

https://*.hubitat.com/*
https://cloud.hubitat.com/*
https://cloud.hubitat.com/api/*

Just an FYI. I added could.hubitat.com to the API filter the other day and everything has been working ok.
We'll see if the emails stop.

1 Like

Yes. I was using websites. I tried http & https. Neither would work.

You COULD add the cloud.hubitat.com too :smiley:

Above is what I've had and all appear to work for me, along w/my dynamic DNS address (which I thought I had already added but forgot, so added that today for good measure). Also, I printed out and taped a "STOP" sign picture to my hub. :wink:

Yup

Just a heads up, the geocode API is only called from the hub out (not from the map), so technically it is blocked by the "cloud.hubitat.com" restriction.

It's best to create a separate key for that usage if it's needed.

2 Likes

I haven't seen any degredation so far.
Both my tiles still seem to work. My family tile, which I assume :slight_smile: uses the Map because that word is on the tile, works fine.
I didn't edit out my location so please don't come and kill me in the night. :crossed_fingers: :hugs:

1 Like

Oh you're fine at night - @lpakula prefers to stalk his victims at dawn. :wink:

Theme song from Halloween playing in the background......

2 Likes