We’ve covered the basics of automating your garage doors via Insteon, but as you can probably imagine, there’s always room for enhancement. Today we’ll cover some additional functionality you can tease out of the hardware you’ve already got installed.
As discussed in the original post, to enable a button on a KeypadLinc, you create a scene attached to the button so that a) pushing the button controls the door, and b) the light on the button illustrates whether the door is open or closed.
Turn off the IOLinc state once the door has been activated
The IOLinc has a “sensor” (input) and “control” (output). The setup described above means that the IOLinc momentarily “latches” (or activates) the garage door when the state of the IOLinc control is turned on, but does nothing when it’s turned off. This means that when controlling the garage doors via an application like MobiLinc, the act of turning the IOLinc control “on” doesn’t actually open the door – it “toggles the state”. Turning the IOLinc “off” doesn’t actually do anything. I find this a bit confusing, so I use a simple program to automatically flip the state of of the IOLinc control back to “off” after it’s been turned on. That way, the door is toggled every time I turn the IOLinc “on”, and it automatically returns to the “off” state when the action occurs.
If Status 'Garage Door 1 Control' is On Then Wait 20 seconds Set 'Garage Door 1 Control' Off Else - No Actions
Determine if door is opening or closing
Another thing that’s a bit tricky is detecting whether the door is in the process of opening or closing. The problem is that the controller starts the garage door moving, but doesn’t indicate which direction it’s going – and you can’t rely on the sensor to determine this either. That’s because if the door is opening, the sensor will be open right away as the door starts moving up. If the door is closing, there will be a period of time before the door closes and the sensor detects the closure.
So, we use an integer variable to save the state of garage door position (more on this in a minute):
If Status 'Garage Door 1 Sensor' is On Then $garage1.status = 1 $garage1.status Init to 1 Else $garage1.status = 0 $garage1.status Init to 0
Get notified if the garage door failed to close
Having garage door control throughout the house means you won’t always be able to see the door and confirm whether it’s closed or not (aside from staring at the light on the KeypadLinc). Modern doors have a sensor that will prevent the door from closing if something is in the way, so just clicking the button doesn’t always mean that the door will close. So, let’s write two programs that notify us if the door hasn’t closed in 20 seconds; for this we’ll use Pushover:
Garage Door 1 Closing
If Status 'Garage Door 1 Control' is On And $garage1.status is 1 Then Wait 20 seconds Resource 'Pushover - Garage Door Failure' Else - No Actions
Garage Door 1 Closed
If Status 'Garage Door 1 Sensor' is Off Then Stop Program 'Garage Door 1 Closing' Else - No Actions
Now, if we’ve a) toggled the state of the door, b) it’s currently open, and c) 20 seconds have elapsed without the status showing closed, we’ll get a notification that the door failed to close.
… but why so complicated?
At this point, you may ask why we need a variable at all, and why our Garage Door 1 Closing program can’t just look like this:
If Status 'Garage Door 1 Control' is On And Status 'Garage Door 1 Status' is On Then Wait 20 seconds Resource 'Pushover - Garage Door Failure' Else - No Actions
The answer lies in what triggers these programs to run – the change of the status of these devices. That is, we don’t want the Garage Door 1 Closing program to run whenever the status of the door changes – we just want it to run when the control changes. By using an integer value for $garage1.status, the program only triggers when the control changes, not the status. So why not change the first line to “Control ‘Garage Door 1 Control’ Is Switched On”? Because, for some reason, the IOLinc I’ve got powering the garage door doesn’t fire a “Control” event like most other switches – but perhaps newer models do, so you could give that a try if you’re feeling lucky; just hit the garage door button and check the ISY log to see if a DON signal comes from your IOLinc.
Always interesting & informative!
Thanks for sharing your ideas & experiences!
What options do you choose ISY994i for the IO-Linc? Latching, Monenary A/B, Trigger reverse etc???
Aaron,
Check out http://homeautomationguru.com/insteon-enabled-your-garage-doors/ for more details on specific settings for the IOLinc. It should cover everything you need.