FYI, if you have an Elk system, you can do this pretty easy. Before I had my Vera, I had garage door control working. I have garage door sensors from Automated Outlet on each door hooked into Elk zones. Then I have a relay board. Each relay went to one garage door switch on the wall. I’ve since changed it by just putting a remote in my security panel and soldering wires into a remote and triggering them with the relay.
I have a task for each garage door which closes the relay for one second. The Close door task will only activate if the door is open, and the open door task will only activate if it’s closed. This way, I don’t really need to know the state of the door, I can just hit F4 on my panel for “Close All Doors” before I go to bed, and not worry about it.
Since I got the Vera, I’ve installed the Elk plugin. But it doesn’t support outputs or tasks on the Elk. But if you want to control outputs and tasks on the Elk, you can just create a “Text” such as “CloseGarageAll^M”. Then you create a rule that says when that text is received on serial port 0, then execute a task you’ve created or control an output. On the vera, you create a scene with the following LUUP code:
local socket = require("socket")
host = "10.1.1.40" -- IP of your Elk
c = assert(socket.connect(host, 2101))
c:send("CloseGarageAll\r")
c:close()
It’s been working flawlessly for me. I took all of the garage door remotes out of the cars since we sometimes park outside and I don’t want to make it easy for someone to open my garage door if they bust out a window. I used the HomeBuddy widget and attached it to a scene for each of Open and Close. Now, I don’t even have to launch HomeBuddy and wait for it to connect. I just hit the widget, lock the phone, and wait for it to do it’s thing. It only takes about 5 seconds when you’re not on wifi, and instantaneous when you are.