I thought I would take a minute and share the results of my work yesterday. I spent less than 2 hours installing and configuring (the fine folks who support us on these forums really made this possible) my 2 garage doors and my homes front sliding driveway gate.
I embarked on this project for a couple of reasons:
1 – We (as a family) have had issues leaving the front gate and sometimes a garage door open after we have turned in for the evening)
2- We are constantly in and out and have friends over frequently who like to join us for swimming. The traffic in and out of the garages with full hands made a hands free option desirable.
Now, I probably spent a bit more than some might have from this community, but the desire to design and implement quickly drove my purchases. I wanted to limit the amount of additional scripting, and unfamiliar hardware so I could focus on the interaction with OH, and not worry about the equipment not firing or communicating because of my knowledge of the 3rd party code.
I can tell you that upon completion, my entire family is wondering how we got along without it. The WAF on the Alexa controlled gate and garage doors is quite high. I love the fact that now if the gate or garage door is left open, I’m alerted while I’m watching the evening news.
This project may not be rocket science, and definitely could be done for less $$$ but it was a great illustration on how to work with many different components of OH, and learn how they all can communicate to create automation not just remote control. I’ll be adding more complexity as I move along…I just thought by sharing this endeavor others who may be intimidated by the complexity may feel a bit more empowered to move forward and give it a try.
My current OH Setup:
- Dedicated Windows Server 2012 Running OH 2.0
- Aeon Gen 5 Z-Wave USB Stick
- HUE Emulation Binding Installed
-
EXPIRE Binding Installed
- SONOS binding so that alerts can be made (TTS) in the house
- Latest SNAPSHOT of the Z-WAVE binding in my Addons folder
Shopping List:
FS20Z-1 (32.75)
To trip the relays on the front gate and garage doors, I purchased 3 FS20Z-1 Z-Wave Isolated Contact Relays, with just 5 wires (hot, neutral ground, 2 x relay) they were a breeze to set up.
TILT-ZWAVE2-ECO (25.00)
These are the sensors that I used to report back whether the garage doors are open or closed. These sensors are battery driven and mount on the top panel of the garage door. They have a ball baring in a tube that at the first sign of tilt changes the status of the sensor. So far they are very reliable and can tell even when the garage door is open just a bit – this is why you mount them high up on the top door panel.
DWZWave2.5-ECO (30.00)
This is the sensor I used to monitor the status of my front gate. Like the garage door sensors it too is battery driven. This model is also Z-Wave plus which claims to offer better range than traditional Z-Wave devices – I choose this because of the distance between my front gate and the house.
All of these devices were added to OH before I began the installation - I’m making the assumption you know how to add a Z-Wave node (device) to OH. Inclusion needs to take place near the controller so I brought all of the devices to my server and hooked up temporary power and joined them to the system.
Miscellaneous Stuff
No project like this would be complete without a stop at one of the big box hardware stores for a few supplies – for me it was Home Depot.
I purchased the following items:
3 - Blue Single Gang Electrical Boxes (Deep Depth) to house the FS20Z-1 relays
1 - Non-Metallic Clear Cover for the blue box holding the FS20Z-1 on my front gate (it’s exposed)
1 - Extra bag of Butt-Splice Connectors (I was out)
The Install:
This was surprisingly easy and quick.
I tackled the gate first. I have a Chamberlin LiftMaster Slide Gate Operator. This operator is powered by 120v AC current and has a radio receiver connected to it to allow users to trigger the gate with your typical garage door type opener. When reviewing the manual I was easily able to determine where the radio receiver was connected to the operator and to use those same connection points for the 2 blue wires (relay) on the FS20Z-1. It is important to note that you should disconnect power to the gate operator while making these connections. If you happen to short (touch) the wires connected to the relay point while making your connections the gate will begin to open/close. Please be safe and remove power while installing.
I also traced in the electrical service as was able to connect and tie in the black, white, and green wires of the FS20Z-1 for power.
I mounted one of the blue boxes on the bottom of the operator and installed the FS20Z-1 there. The non-metallic cover was installed so that it would provide protection from the elements and so I could see the power indicator from afar. Please only use a non-metallic cover and box so that you do not interfere with the Z-Wave radio reception.
The sensor for the gate was attached to one of the gate posts, with the magnetic portion attached to the gate. I had a decent size gap between the sensor and the magnet and I needed to place a spacer to close up the gap behind the magnet.
To test the connection of your newly installed FS20Z-1, restore power to the gate operator and FS20Z-1, and push the small white button in the middle – the gate should begin to move. One thing you will notice is that the green light will go out – this indicates that the switch is “ON” you will need for the light to be on when you program OH, so press the button again so that the green light turns back on, meaning the switch is off. We will need to use a special binding in OH to account for this…I’ll talk about that in the switch (item) section.
Next it was on to the Garage Doors.
Here, I mounted the sensors first. To begin, I uncoupled the garage doors from the opener and watched how they traveled when opened. What I was looking for was the first position I could notice a tilt at – this was at the top of the first panel of my garage door. I marked the position and then attached the sensor, if I listened closely I could hear the small baring roll as I moved the door up. This allows to get notification if the door is just an inch or so off the ground. Since my garage doors are behind a gate I could live with this inch or so gap – if this doesn’t work for your scenario you might want to look at a magnetic sensor that will alert you the moment the garage door opens.
To install the FS20Z-1 I mounted one of the blue boxes to the support poles of the opener by drilling 2 holes through the blue box. I then inserted a zip tie and was able to latch the box to the support with the tie. For power I utilized the open outlet next to where my garage door motor was plugged into on the ceiling. To power the FS20Z-1 I found an old computer power cable and cut off the end that plugs into the computer. I then cut it to length and inserted the cut end into one of the knock out holes in the back of the blue box. Here it became simple connect the colors – black to black, white to white, and green to green. I used butt-connectors to perform the splices.
To tie in the relay I again went to the manuals, I own Marantec M4500 openers (German made – imagine that ) Here it was easy to determine that the terminals to connect the relays to (the same used for a wall switch) were numbers 3 and 4. I fished two small wires into the motor head and connected them. I then brought those two wired up and into the blue box through the same knock out hole and connected them to the two blue wires on the FS20Z-1. It does not matter which wire connects to which terminal.
It is important to note that you should disconnect power to the garage door opener while making these connections. If you happen to short (touch) the wires connected to the relay point while making your connections the door will begin to open/close. Please be safe and remove power while installing.
To test the connection of your newly installed FS20Z-1, restore power to the garage door opener, plug in the FS20Z-1 to power and push the small white button in the middle – the door should begin to move. One thing you will notice is that the green light will go out – this indicates that the switch is “ON” you will need for the light to be on when you program OH, so press the button again so that the green light turns back on, meaning the switch is off. We will need to use a special binding in OH to account for this…I’ll talk about that in the switch (item) section.
I then repeated this install on the other garage door.
Now it’s on to connecting everything up in OH…
First the ITEMS….
I used CONTACT items for the sensors, I used SWITCH items for the relay
A couple of items to note:
- I need the switch on the relay to act as a momentary switch (turn on then turn back off) to accomplish this I utilized the expire binding which was set to issue an OFF command 1 second (1s) after turning on.
- To accomplish this momentary switch in the sitemap I needed a button – that is why you see the autoupdate=”false” to prevent the switch from updating it’s status.
- I wanted to add Alexa control to the items, which is why you see [ “Switchable” ] in the item. This allows Alexa to discover this device as long as you have activated the HUE Emulation.
For the Gate, I had two – the relay and the sensor:
Contact GateStatus "The Gate Is: [%s]" { channel="zwave:device:xxxxxx:node5:sensor_door" }
Switch FGate "Front Gate" [ "Switchable" ] { channel="zwave:device:xxxxxx:node4:switch_binary",expire="1s,command=OFF",autoupdate="false" }
For the Garage Doors, I had four – two relays and two sensors:
Contact LtGarageDrSensor "Left Garage Door Is: [%s]" { channel="zwave:device: xxxxxx:node9:sensor_door" }
Contact RtGarageDrSensor "Right Garage Door Is: [%s]" { channel="zwave:device: xxxxxx:node8:sensor_door" }
Switch RtGarageDr "Right Garage Door" [ "Switchable" ] { channel="zwave:device: xxxxxx:node6:switch_binary",expire="1s,command=OFF",autoupdate="false" }
Switch LtGarageDr "Left Garage Door" [ "Switchable" ] { channel="zwave:device: xxxxxx:node7:switch_binary",expire="1s,command=OFF",autoupdate="false" }
Now for the SITEMAP.
To give myself the push button control, I added the mappings=[ON=“OPEN/CLOSE”] to the relays – this along with the autoupdate=”false” provides that UI element.
sitemap default label="House Control" {
Frame label="Front Gate Control"{
Text item=GateStatus icon="gate2"
Switch item=FGate icon="gate2" mappings=[ON="OPEN/CLOSE"]
}
Frame label="Garage Control" {
Text item=LtGarageDrSensor icon="garage"
Text item=RtGarageDrSensor icon="garage"
Switch item=LtGarageDr icon="garage" mappings=[ON="OPEN/CLOSE"]
Switch item=RtGarageDr icon="garage" mappings=[ON="OPEN/CLOSE"]
}
RULES
For the rules, I used the following to alert us if the garage doors or gate were left open past a certain time. I also plan on adding additional rules as we see what else we may need to implement. I had a though of closing the doors and gate automatically at a preset time but abandoned that thought due to safety concerns. I just don’t want the possibility of having the gate hit a car or a person…I’m sure there are additional sensors I could deploy to monitor this but I do not feel this is necessary.
Garage.Rules
// Garage Rules
rule "close left reminder"
when
Time cron "0 0 22 1/1 * ? *"
then
if (LtGarageDrSensor.state.toString == "OPEN") {
say ("The left garage door has been left open")
}
end
rule "close right reminder"
when
Time cron "0 1 22 1/1 * ? *"
then
if (RtGarageDrSensor.state.toString == "OPEN") {
say ("The right garage door has been left open")
}
End
Gate.Rules
I have two rules for the gate because leaving the gate open is much more of a concern than the garage doors. There probably is a smarter way to implement this with just a single rule – but I am still working my way through the rule language.
rule "gate left open1"
when
Time cron "0 05 22 1/1 * ? *"
then
if (GateStatus.state.toString == "OPEN") {
say ("The front gate has been left open")
}
End
rule "gate left open2"
when
Time cron "0 35 22 1/1 * ? *"
then
if (GateStatus.state.toString == "OPEN") {
say ("The front gate has been left open")
}
End
With all of this in place in under two hours I feel like I have made great use of a Saturday morning and my path to home automation has moved forward and provided a playground from which I can continue to improve. I’m aware that true automation is having tasks happen without human interaction – I’m getting there, but I also see automation as convenience and this is sure is pretty darn convenient.
I’m sure I have left something out here…and I may not have done everything the correct way (please suggest corrections) and also feel free to ask any questions.
I have received so much from those who participate here in the community, I wanted to try and give a little bit back.
Squid