Author Topic: Garage Door Plugin  (Read 142217 times)

Offline woodsby

  • Beta Testers
  • Sr. Member
  • *****
  • Posts: 466
  • Karma: +1/-0
Garage Door Plugin
« on: December 22, 2010, 06:11:39 pm »
First, let me begin with a disclaimer - this code is to be used for recreational purposes and not to be used for life safety or non-UL/CE listed applications.  Use at your own risk, and test thoroughly before leaving unattended.
Attached is the garage door Imp file designed to work with the standard DoorLock dev file.  This is designed to work with a HRDS1 or similar battery powered sensor and a ZRF113 or similar relay device.  Once you have installed both these devices, note the device numbers.  Plug these device numbers into lines 4 and 5 of the attached file (SensorDevNum and ContactsDevNum).  Then upload the file to Vera through Mios Developers > Luup Files.  Check the box to restart luup after upload.  Then, add a new device through Mios Developers > Create Device.  Under Description, name your new device.  Under UpnpDevFilename, enter D_DoorLock1.xml  Under UpnpImplFilename, enter I_GarageDoor.xml, then click Create device.  Save, then power cycle vera, and your garage door device should now work like any other door lock.
Not very pretty, but works great.  If there is interest, I will clean it up, but it should be a good start for anyone else to clean up... just add a couple lines to the init to populate the status variable - I think that's what will eliminate the need to power cycle; and maybe add a couple state variable to represent Sensor and ContactClosure device numbers.
« Last Edit: December 22, 2010, 07:06:54 pm by woodsby »
Vera1 (1.1142), Vera2 (1.1182), VRI06 (12), VRS15 (3), VRS05 (2), VRF01 (2), VRCS4 (2), ZRW113, ZRF113 (2), 45602, 45603, TZMT400 (2), FE599 (2), 99100, Thinkstick, Harmony 890Pro (2), Harmony RF Extender, Nevo S70, Nevo NC-50, Minimote, SQ Remote, SQ Blaster, EtherRain-8, Cliste ActiveRFID, TED5002

Offline woodsby

  • Beta Testers
  • Sr. Member
  • *****
  • Posts: 466
  • Karma: +1/-0
Re: Garage Door Plugin
« Reply #1 on: December 22, 2010, 07:03:57 pm »
Sorry... posted the wrong version... updating now.
Vera1 (1.1142), Vera2 (1.1182), VRI06 (12), VRS15 (3), VRS05 (2), VRF01 (2), VRCS4 (2), ZRW113, ZRF113 (2), 45602, 45603, TZMT400 (2), FE599 (2), 99100, Thinkstick, Harmony 890Pro (2), Harmony RF Extender, Nevo S70, Nevo NC-50, Minimote, SQ Remote, SQ Blaster, EtherRain-8, Cliste ActiveRFID, TED5002

Offline mcardenas

  • Jr. Member
  • **
  • Posts: 72
  • Karma: +0/-0
Re: Garage Door Plugin
« Reply #2 on: December 23, 2010, 08:54:18 am »
Hi Woodsby,

Sounds pretty interesting, but I don't fully understand what it does?

Offline woodsby

  • Beta Testers
  • Sr. Member
  • *****
  • Posts: 466
  • Karma: +1/-0
Re: Garage Door Plugin
« Reply #3 on: December 23, 2010, 04:31:19 pm »
This basically takes the combination of the door sensor device and the contact closure device on a garage door setup and consolidates them into a single device that behaves as a door lock - in the ui and iphone apps.  Locked means garage door is closed; unlocked means garage door is open.
Vera1 (1.1142), Vera2 (1.1182), VRI06 (12), VRS15 (3), VRS05 (2), VRF01 (2), VRCS4 (2), ZRW113, ZRF113 (2), 45602, 45603, TZMT400 (2), FE599 (2), 99100, Thinkstick, Harmony 890Pro (2), Harmony RF Extender, Nevo S70, Nevo NC-50, Minimote, SQ Remote, SQ Blaster, EtherRain-8, Cliste ActiveRFID, TED5002

Offline rlmalisz

  • Sr. Member
  • ****
  • Posts: 394
  • Karma: +1/-0
Re: Garage Door Plugin
« Reply #4 on: December 23, 2010, 04:34:48 pm »
Hi Woodsby,

Sounds pretty interesting, but I don't fully understand what it does?

If I would have to guess:

The code uses the door sensor to tell whether it's open or closed, and then has logic based on that to know whether activating the ZRF113 is going to toggle the door open or closed.  And that's all wrapped up in code that can sit under Vera's (and therefore, SQ Connect and others') existing GUI.

How'd I do?  My question (wiring up the ZRF113s for all three garage doors is a project for this weekend) is whether this is straight-up code that will run on older Vera OSs (and specifically, Vera 1), or does it depend on new libraries or whizbang stuff that has shown up in later versions?

Regardless, I think it's cool and will avail myself of it as soon as it will run on our active Vera.  We have a V2, but have been waiting for the stable update to materialize.

--Richard

Offline woodsby

  • Beta Testers
  • Sr. Member
  • *****
  • Posts: 466
  • Karma: +1/-0
Re: Garage Door Plugin
« Reply #5 on: December 23, 2010, 04:40:43 pm »
I don't know why it wouldn't work on a previous UI or Vera 1, but I am running UI4 on both veras, but am not in a position to test on my vera 1 right now.  If it doesn't work on UI2 or 3, I'm sure a slight modification to the luup is all that would be needed.  And yes, that's a correct assessment.
Vera1 (1.1142), Vera2 (1.1182), VRI06 (12), VRS15 (3), VRS05 (2), VRF01 (2), VRCS4 (2), ZRW113, ZRF113 (2), 45602, 45603, TZMT400 (2), FE599 (2), 99100, Thinkstick, Harmony 890Pro (2), Harmony RF Extender, Nevo S70, Nevo NC-50, Minimote, SQ Remote, SQ Blaster, EtherRain-8, Cliste ActiveRFID, TED5002

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: Garage Door Plugin
« Reply #6 on: December 24, 2010, 04:33:04 am »
Nice one woodsby!

I'll install it tomorrow and see how it goes! Should clean up SQ remote a bit as it'll save having a scene and a status label!

*edit*

All installed and working great thanks!!
« Last Edit: December 24, 2010, 04:02:40 pm by strangely »
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline woodsby

  • Beta Testers
  • Sr. Member
  • *****
  • Posts: 466
  • Karma: +1/-0
Re: Garage Door Plugin
« Reply #7 on: December 24, 2010, 04:32:37 pm »
@Strangely, just out of curiosity, did you have to power-cycle vera?
Vera1 (1.1142), Vera2 (1.1182), VRI06 (12), VRS15 (3), VRS05 (2), VRF01 (2), VRCS4 (2), ZRW113, ZRF113 (2), 45602, 45603, TZMT400 (2), FE599 (2), 99100, Thinkstick, Harmony 890Pro (2), Harmony RF Extender, Nevo S70, Nevo NC-50, Minimote, SQ Remote, SQ Blaster, EtherRain-8, Cliste ActiveRFID, TED5002

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: Garage Door Plugin
« Reply #8 on: December 24, 2010, 07:18:44 pm »
I had to do many things to get it to work as not only did I manage to include a space in the filename of the xml (somehow did this when saving) and it took me ages to work out why it kept on giving me an error when I toggled the lock! But I'd also gotten myself in a knot with the device ID versus node ID, after initially getting it correct, and then changing while troubleshooting the first problem (not known at the time) I'd brought on myself!

Needless to say there was much power cycling and cursing going on. I also wasn't sure it was going to work as I'm using my alarm systems sensors interfaced through Vera (just integrated it) and even though I could see the sensors tripping, I didn't have the confidence something wasn't coded correctly with MCV's DSC plugin :)
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline Boyo

  • Full Member
  • ***
  • Posts: 180
  • Karma: +0/-0
Re: Garage Door Plugin
« Reply #9 on: December 27, 2010, 12:58:10 am »
Ok, So I have a Genie garage door opener that uses Intellicode.
For my push button in the garage, there are two wires, black and white. Two buttons, door and light we shall call them, and a switch, lock/unlock.
According to the manual, it says if the wall control panel is not connected, the door will not function which leads me to believe that when it is set to 'lock' it is just breaking the circuit.
As for the two buttons, i'm not exactly sure how those are working.

In a caution block in the manual, it says "Use of any wall consoles other than the type included
will prevent the light from working properly and could
cause the door to operate on its own"

And for the relevant part, would I be able to use the ZRF113 to operate my door? As long as the light works when the door operates, it's not a big deal as there is other lighting in the garage.
Vera UI4 1.1.1183; Schalge Link Door Handle; HA18WD 3-Way/Single-Pole Switch x2; WDHA-12R - Wireless Gateway Module; Trane Thermostat; Retired: WDTC-20 - Z-Wave Enabled Thermostat

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: Garage Door Plugin
« Reply #10 on: December 27, 2010, 01:02:51 am »
Mine is a Genie with intelicode; everything works fine including the light. You wont be disconnecting the wall controller... just wiring the local load of the relay in parallel. YMMV though as I have an old model!
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline Boyo

  • Full Member
  • ***
  • Posts: 180
  • Karma: +0/-0
Re: Garage Door Plugin
« Reply #11 on: December 27, 2010, 01:06:16 am »
So the wall controllers you have still work then? how about the lock? and one last question, with the ZRF113, I would just splice a blue wire into each white & black?

Vera UI4 1.1.1183; Schalge Link Door Handle; HA18WD 3-Way/Single-Pole Switch x2; WDHA-12R - Wireless Gateway Module; Trane Thermostat; Retired: WDTC-20 - Z-Wave Enabled Thermostat

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: Garage Door Plugin
« Reply #12 on: December 27, 2010, 01:51:38 am »
Yep wall controller is still functional also, although I never tried the lock button... cant see why it wouldn't though, but I can confirm tomorrow!

Not sure about the ZRF113 as I couldn't get hold of one a while back and opted for hacking an appliance module instead. Looking at it's PDF I think you are correct and you can either splice it to the existing bell wire (in parallel) anywhere from the motor to the switch... the best place is just attach the wires at the screw terminals at the motor end!

You can wire up the 120V side , then include it, and then check with a multimeter that the blue wires give you continuity when the relay is switched and that it's isolated from the 120V! If it is then connected the blue wires and hope for the best :)

If you are going to use this, then make sure you have a door sensor also and maybe also a camera for double safety :)

Just remember that if you cant get @woodsbys plugin to work (or don't have a door sensor), that you need to create a scene that turns it on briefly then back to off!  
« Last Edit: December 27, 2010, 01:53:14 am by strangely »
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline Boyo

  • Full Member
  • ***
  • Posts: 180
  • Karma: +0/-0
Re: Garage Door Plugin
« Reply #13 on: December 27, 2010, 11:28:54 am »
Yeah, I was concerned of if it got left "closed" and what that would do, and I was looking at the code for the plugin and see that it continuously checks the status until it is closed and then opens it back up so the circuit isn't kept closed all the time. I already have plans of putting a camera on the outside so I can see both garage doors as well as the cars when parked in the driveway if I can get it positioned right. 
Vera UI4 1.1.1183; Schalge Link Door Handle; HA18WD 3-Way/Single-Pole Switch x2; WDHA-12R - Wireless Gateway Module; Trane Thermostat; Retired: WDTC-20 - Z-Wave Enabled Thermostat

Offline akashk

  • Full Member
  • ***
  • Posts: 123
  • Karma: +0/-0
Re: Garage Door Plugin
« Reply #14 on: December 30, 2010, 01:18:48 pm »
Nice plugin woodsby. Works perfectly for me with my HRDS1 sensor and an outdoor module + power relay combo. BTW, I did not have to power-cycle my Vera2 UI4.