Integration with Waze - can I trigger things when my ETA to Home is 10 minutes?

smartapp

(Dean Thomas) #1

Has anyone done an integration with Google Maps or Waze that can trigger an automation routine based on when I’m on my way home? I keep my geofencing radius quite small for several reasons, and it isn’t enough time for the heat to come on and actually warm up the house.

I would love if Smartthings would know when I’ve selected “Home” as my destination in Waze and then would turn on the heat, say, 15 minutes before my ETA. I did a little searching and couldn’t find anyone who’s done this, but I bet the API’s support it.

Anyone know if this has been done or attempted, or what the barriers would be to doing it?


#2

You may want to look into using webCore and the webCoRE Presence Sensor as this already exists and will get you much closer to acheiving what you want to accomplish.

@RobinWinbourne


(Robin) #3

The webCoRE Presence Sensor won’t achieve what you want in this case (but it’s well worth installing for other uses).

It can tell you when you are arriving or leaving one of 10 locations, direction of travel, speed, altitude, distance from various locations… but it can’t know for sure that you’re on your way home instead of just heading in that general direction.


#4

This would be a great thing to figure out. Whether using Waze or Gmaps or otherwise.

In the meantime, you might set up a “Going Home” routine and manually launch it.


#5

With what Robin stated, you could setup additional locations with geofence perimeters far enough away from your home location so that as you arrive (drive through) at any one of these additional locations, you have a Piston fire off that includes turning your thermostat on.

That could come very close to achieving what you want to do without it being a calculated ETA. You could setup these additional locations based on main roads / highways / freeways / thoroughfares that you know you have to pass through on the way home.


(Dean Thomas) #6

Very creative solution, WB70! There are just a couple main routes that I use, so this could work.

Thanks, everyone, for the quick replies.


#7

Is this something that could be built with the technology that you are using for direction, travel, speed and altitude in a future release. Or is this something much much bigger?


#8

Another use case for example is if you have a location setup for let’s say a significant others workplace, you could have a Piston send you a text that this person has arrived at work. Or if you are already home, and they have left work (two Geofence perimeters for each location - Arrival and Departure zones), you know that they are on their way home and you can get dinner going :grinning:


(Robin) #9

A) Not my tech… @ady624 and a very small number of others is responsible for webCoRE… I’m just a Beta tester and advocate.

B) If all roads lead directly to home, in a straight line, then it would theoretically be possible to know you are heading towards home, but even then maybe not (you might be heading towards the pub around the corner from home)


#10

Thats a pitstop location. Like a Pause Mode :grin:

I know that Nest has an ETA within their API. It’s not been integrated yet within the ST side. I mentioned to @tonesto7 in the past and then also made a comment about getting in touch with the webCoRE team to see about being able to leverage any of this down the road :slightly_smiling_face:


(Anthony S.) #11

I will look into adding it when I get some time


#12

No pressure. I just see the whole mobile presence and being able to figure out a method to calculate ETA within ST or leveraging functionality of Nest externally based on whatever algortithm they have built to be able to accomplish it, as being a huge thing if it could be done. I still think there still might have to be a parent value to be able to extract the distance and then be able to formulate what that ETA is.


#13

Didn’t mean you specifically - Was aimed at the entire team, developers, beta testers and advocates :slightly_smiling_face:


(Robin) #14

Looking at the Waze API’s… they are all related to sending in traffic info, not the other way around.

Your best bet is to run an ‘I’m going home’ routine as @James_Watts recommended, but have webCoRE respnd to that routine by sending you a Waze link… 'https://waze.com/ul?favorite=home".

You can activate the routine from the phone widget and click on the link that pops up in the SMS which will open the waze app and start navigation.


#15

But this requires manual intervention (a button must be pushed) versus complete automation without the need for reminding me to do something.

The additional locations directly en route to the house will work and then like you stated with a pitstop at the bar, maybe another location with additional qualifications that cancels out the “on the way home” Pistons, or if arriving at pitstop location, a qualification that waits 30 minutes before kicking on the heat (enough time to have a couple drinks). :slight_smile:


(Dean Thomas) #16

What got me thinking about this was that both Google Maps and Waze have declared Home and Work locations that I thought might be special enough in some way that you wouldn’t have to “figure out” that I’m headed home, but rather I have specifically said “I’m going Home” in Waze or G-maps.

But now that I think about it, the solution of passing through one of a few waypoints combined with another condition (direction, if possible, from webcore presence) or simply that I didn’t leave the house <15 minutes ago, so it’s likely I’m coming back, is a better solution for those times that I am not using waze because I know where the heck I’m going.


#17

This could work, but you might have to include a breathalyzer for it to function properly. :beer:


#18

One technological challenge at a time :beers:


(Robin) #19

Covered that one here:


( I hate Mondays) #20

You can use the distance attribute to calculate an ETA, though the distance shown is an as-the-crow-flies distance, so if the road is going bendy on you around your home, this may be horribly inaccurate. But you can subscribe to distance and see it dropping towards 0, even use two data points (previousAge and previousValue) to calculate a crude ETA. Distance updates every at least 500m and not more often than every 5 minutes on iOS (no control there)