Tasker to open Garage Door

659 views
Skip to first unread message

Scott Keen

unread,
Dec 19, 2014, 4:41:44 PM12/19/14
to tas...@googlegroups.com
I have Tasker and AutoHomation HD on my Android 5.0.1 phone to control my MCV VeraLite. I'm using a Mimolite module to open/close my garage door. I'd like for my Garage Door to open automatically when my phone comes within range of my house.

I have the following Tasker profiles and tasks set up:

Profile: Detect Near Home
State: Wifi Near MySSID, *, *, 0, 0,
--> Garage Door Open (task)

Task: Garage Door Open
1. AutHomationHD Device
Configuration Garage Door
Device: Garage Door
Control: Door Lock
Action: Unlock
Name: Garage Door

It works, but the problem (as I found out around 2am last night), is that if the phone or WiFi goes down briefly or is interrupted for whatever reason, then it triggers the garage door to open.

I've added extra conditions to the profile:
State: Wifi Near MySSID, *, *, 0, 0,
+
Time: From 08:30 Till 23:00
+
Location: Near Home

So now, if my phone is near my Wifi access point *AND* the time is between 8:30am-11:00pm *AND* within 100m of my home coordinates, then that will trigger the Garage Door Open task to open the garage door. Why test both the Wifi State and the Near Home Location? Just in case one goes down or isn't responsive.

But I don't think this is foolproof, especially if my phone reboots -- it will trigger the garage door to open.


Is there a better way???

Scott

unread,
Dec 19, 2014, 5:27:12 PM12/19/14
to tas...@googlegroups.com
There are various ways to debounce location and WiFi connected profiles, mostly using wait commands and a variable (the variable has to be set for the door to open and you have to be disconnected from WiFi for a certain time to set the variable), but I doubt that will cover all scenarios.  Stuff like power outages or oddly long times when your phone isn't connected even though you're home will always happen.  Another possibility is your internet goes down and you have to switch to your data plan and turn off your WiFi.

With what you have now if the location part of your profile stops working for a bit and then starts again it will open the door.  It will also open your door at 8:30 AM if you're at home.

Get a Bluetooth device for your car and then add a Bluetooth connected context to your profile.  Make sure you're only connected to it when you're in your car.

Even cheaper would be to get an NFC tag and use it rather than the WiFi trigger.  Another option would be to get AutoVoice and have it intercept Google Now commands.  Then plug your phone in while you're in the car and you can open your garage door using "OK Google" (assuming a new enough OS) and you don't even have to touch your phone and it won't do it accidentally.  You also won't have to sit in your driveway every time your phone decides not to connect to your WiFi soon enough.

Abdullah Alahdal

unread,
Dec 19, 2014, 5:27:19 PM12/19/14
to tas...@googlegroups.com
In addition to the WiFi near state, I would suggest to Set a global variable like %LeftHome which can be set to 1 for example if you left home by 500m.

Link your current profile with the above variable.

Don't forget to Set the variable to 0 within the garage door open task.

I wish I'm clear.

Scott Miller

unread,
Dec 19, 2014, 6:04:44 PM12/19/14
to tas...@googlegroups.com

You might also want to build in some sort of fail safe procedure....what if someone steals your phone.....they suddenly have the keys to your house.

Scott

Scott Keen

unread,
Dec 19, 2014, 6:15:54 PM12/19/14
to tas...@googlegroups.com
Very good point, although if my phone was stolen I'd disable the Garage Door device (Mimolite) in Vera. I'll have to think of another failsafe, probably something with a NFC sticker. I have phone mounts in my truck and motorcycle, and could just put a NFC sticker on the phone mount and make that a condition of when to fire the task. Of course, if someone stole my truck or motorcycle...

Scott Keen

unread,
Dec 19, 2014, 6:23:30 PM12/19/14
to tas...@googlegroups.com
So those "+" symbols between each Profile condition are "OR" conditions, not "AND"? I want all conditions to be met in order for the Task to fire.

See screenshot:

Profile: Detect Near Home


Task: Near Home


I realize I have some redundancy, such as making the "%NEAR_HOME=false" variable testing a condition in the Profile, as well as an If condition in the Task. This is a work in progress.

Scott Keen

unread,
Dec 19, 2014, 6:31:09 PM12/19/14
to tas...@googlegroups.com
Thanks, I've implemented a variable to set and test.

Profile: Leave Home

Task: Not Near Home

I suppose I could just fire off the Not Near Home task as the Exit Task for the Detect Near Home profile rather than create a separate profile, is that correct? Although wouldn't that mean that the Not Near Home task would fire if *any* condition of the Detect Near Home profile fails (such as the WiFi becomes disconnected briefly). I don't think that's what I want.

Scott Miller

unread,
Dec 19, 2014, 6:36:26 PM12/19/14
to tas...@googlegroups.com


On Dec 19, 2014 6:23 PM, "Scott Keen" <scot...@gmail.com> wrote:
>
> So those "+" symbols between each Profile condition are "OR" conditions, not "AND"? I want all conditions to be met in order for the Task to fire.
>

Contexts in a single profile are always ANDed together. To get an OR condition, you need to be a little creative and use multiple profiles.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages