Garage trigger based upon driving

I want my garage doors to open up when I pull up to the garage based upon my phone location. However I don’t want the garage to open if I’m merely walking around my neighborhood.

Is there a way to tell if if my phone was moving at a certain speed when a zone gets triggered? Or, is there a way of telling if two zones were entrance triggered within a time period? For example, if Home is entered AND either zone A,B,C were entered in the last 3 minutes? I could have ABC zones be sufficiently far away from home that it would be unlikely I arrived at home on foot.

What if you set up the outer zones as triggers for a script, which then monitored the inner (driveway) zone for 3 minutes, opening the door if you arrived in that time?

Is it possible to store time in a variable and then perform an operation on that? So I could have an outer zone entrance store the time the zone was entered, then the home trigger could subtract the current time from that and if the difference is less than 3 minutes it would open the garage.

Here’s one approach that I think should work:

  • Entering the outer zone triggers an automation (outer_zone_entry) that turns on a second automation (open_garage) that will open the garage door when triggered, and starts a 3-minute timer (garage_arrival_timer).
  • The expiry of garage_arrival_timer triggers an automation (garage_timer_expiry) that turns off the open_garage automation.
  • Entering the inner zone triggers the open_garage automation, which will have no effect if the automation is off.

Why create garage_timer_expiry? Couldn’t you have the arrival timer just turn off open_garage instead?

As far as I can tell a timer can’t take any action on its own, it just fires a timer.finished event when it runs out, and you can use that event to trigger an automation with the actions you’d like to happen.

Do the ESP8266 in the car method… https://www.youtube.com/watch?v=1DyblwsjfU8