@lindsayward,
Happy to hear you were able to configure Garadget to your satisfaction.
Please share your final setup so it can serve as all-in-one guide or a starting point for something custom.
I’m only a few hours into this, so I don’t want to be the one to say, “here’s how you do it”… However
- I did all the HA stuff before realising you also had to connect to the garadget settings interface and enable MQTT (since the link here points down the thread, not to the top).
- I also copied the provided code, not realising that “Home” was a variable, dependent on my setup.
- As mentioned, you don’t seem to need the sensor… just the extra attributes for the cover.
- Two more things need to be set in HA customizations (mine through the web interface):
Setdevice_class: garage
Sethomebridge_cover_type: garage_door
(if you’re using homebridge for “Hey Siri, open the garage door”)
These details are all there, just not in one place.
Here’s what I’m using now. Replace “XXX” with the name/topic you set in the garadget settings.
cover:
- platform: mqtt
name: "Garage Door"
command_topic: "garadget/XXX/command"
state_topic: "garadget/XXX/status"
payload_open: "open"
payload_close: "close"
state_open: "open"
state_closed: "closed"
value_template: '{{ value_json.status }}'
Awesome, thanks for sharing your config.
I’ll cross-post it in Garadget’s community if you don’t mind (credit where it’s due).
[EDIT] When I said ‘old garage door opener’ I meant a garage door opener remote control, not the opener itself.
My remote garage door solution is a little different. I connected an ESP8266 to an old garage door opener. The ESP has an MQTT client that subscribes to door open/close commands from HA. HA is configured to see the door-controller as a switch.
Assuming you have an old, unused garage door opener laying around, the cost is essentially the cost of the ESP.
While not necessary for opening/closing the door, I added Z-wave door tilt sensors so that I could monitor the door state.
I took a fairly easy way out, using a FortrezZ MIMO2+ z-wave dual relay to control two garage doors. Right out of the box each relay is set up to actuate as a 500 ms momentary switch, which is perfect to emulate a pushbutton (though you can also configure it to latch if you want to use it for something else). I chose this because I already have z-wave tilt sensors on the doors and I only needed to handle control.
I have one door working already - the traditional style with just an LED-lit button connected via two wires and nothing else. I just put one of the relays in parallel with the pushbutton.
My next task is to tap into a LiftMaster 880LM panel for the other door - this is a digital panel and I’m pretty sure I can’t just use the outward-facing terminals, so I will have to find the microswitch that’s behind the open/close button and put the second relay in parallel with that.
I have Garadget and can’t complain. Works great!
Anyone has a configuration using a zwave outdoor plug, a relay switch and a door sensor? Used to have this configuration with homeseer…
Anyone automated it via nodered?
I finally went back to using my Linear Z-wave garage door opener since it’s now supported, but here is what I was using for over a year with no issues.
For parts, I used an old Z wave on/off module (non-dimmer), a Monoprice Z wave tilt sensor, and THIS relay.
For setup, connect the normally open and common contacts of the relay to the garage door opener. Then connect the AC power to Z wave switch.
For the Home Assistant side, I basically set up a cover template using the tilt sensor for the position and scripts for open/close. Each script would do a few things:
- Call a notify script that checks if the alarm is on. If so, it sends a notification. I used a separate script for this just to simplify the whole if/then/else scenario in the script.
- Use a conditional statement to only proceed if the alarm is off.
- Turn the Z wave switch on, wait 3 seconds, turn the z wave switch off
- Wait 30 seconds
- Conditional check to see if the door is open/closed
- If the door is not in the position it expected, send a notification
Here is my configuration (NOTE: was having issues getting code to paste with proper formatting. You may need to validate indenting)
Covers.yaml
- platform: template
covers:
garage_door_backup:
friendly_name: "Garage Door Backup"
value_template: "{{ is_state('binary_sensor.d32_garage_door_main_sensor', 'on') }}"
open_cover:
service: script.garage_door_open_backup
close_cover:
service: script.garage_door_close_backup
icon_template: >-
{% if is_state('binary_sensor.d32_garage_door_main_sensor', 'on') %}
mdi:garage-open
{% else %}
mdi:garage
{% endif %
Scripts.yaml
garage_door_open_backup:
alias: 'Garage Door Open'
sequence:
- service: script.garage_notify
- condition: state
entity_id: input_boolean.mode_armed
state: 'off'
- service: switch.turn_on
entity_id: switch.d12_garage_door_switch
- delay: 00:00:03
- service: switch.turn_off
entity_id: switch.d12_garage_door_switch
- delay: 00:00:30
- condition: state
entity_id: binary_sensor.d32_garage_door_main_sensor
state: 'off'
- service: notify.gregg_pushover
data:
title: 'Garage Door Failure'
message: 'The Garage Door did not open or there is an issue with a sensor'
garage_door_close_backup:
alias: 'Garage Door Close'
sequence:
- service: switch.turn_on
entity_id: switch.d12_garage_door_switch
- delay: 00:00:03
- service: switch.turn_off
entity_id: switch.d12_garage_door_switch
- delay: 00:00:30
- condition: state
entity_id: binary_sensor.d32_garage_door_main_sensor
state: 'on'
- service: notify.gregg_pushover
data:
title: 'Garage Door Failure'
message: 'The Garage Door did not shut or there is an issue with a sensor'
garage_notify:
alias: 'Garage Notify'
sequence:
- condition: state
entity_id: input_boolean.mode_armed
state: 'on'
- service: notify.gregg_pushover
data:
title: 'The Alarm is On'
message: 'Cannot open the Garage Door while the Alarm is On'
The only issue I ever had was that you cannot call another open/close within 30 seconds since the script is still running to check for the door position. This was an issue maybe once or twice.
As a side note, I used a similar cover template approach for the Linear opener as well to allow for conditional statements.
I’ve finally uploaded the files for a multi use breakout board I put together in Eagle. I currently use two of these; one for my garage door opener and the other for retrofitting my existing alarm PIRs and sensors to HA. It was a bit of a rush job when put together but it works.
The most common brands, at least around here, are Chamberlain and Liftmaster. Chamberlain is the DIY brand, Liftmaster is the pro brand (I think there is another one, maybe Ranor). Both the same company. The Craftsman, if they still make them, are just rebranded Chamberlains.
I think the biggest functional difference between any of them are the rail system–I think the DIY’s (probably yours) have a split rail; the pro units are a solid rail.
In addition, check here, if you want to read more about them.
I used the Linear/Nortek GoControl GD00Z-4 device in the past and had a good experience with it for a long time.
But, it died, so I went looking for a replacement. I bought an OpenGarage, and had a really ugly experience with the folks there. I would not recommend OpenGarage strictly from a customer service perspective.
Hey Gregg, thanks for posting this code. I’m trying to understand how to use this. I’ve been using the same setup on SmartThings for a couple years but that code is not portable over to HA. It looks like there is code missing in your post. Can you confirm all of the code that is used to do this? Also can you tell me once I get the code in those files, do I have to add anything to the configuration.yaml file to get it to use it? Thank you for you time!
-Alli
Its been forever since I used this code, but it appears to be complete. It requires a tilt sensor or some other open/close sensor (my tilt sensor is the binary_sensor input in the code) and also an external relay (switch.d12_garage_door_switch in my case - linked in original post with code). The input boolean is basically alarm on/off.
You could simplify the entire setup to just call the switch for 3 seconds. In my case, my door would open and if I forgot to disarm it, it would go off. So I added the conditionals and notifications to prevent operation unless disarmed. I always still have local control via a keypad at the door just in case (not tied to HA).
Hi Gregg,
I was hoping I could pick your brain if you are still active. I’m looking at the code you exported above and this is something I’ve been trying for weeks now to no avail. I just can’t seem to wrap my brain around some of the terminology so it’s creating extreme confusion for me.
Here is my ask and it’s only an attempt to make sense of the code in my brain, thanks for your time in advance:
a. Covers.yaml - Under covers: garage_door_backup (is this just the name of the covers ? But also, is it used to call out via “voice assistant” - of which the friendly_name would be the voice activated ?
b. I don’t get the alarm reference! I mean, I do I think but I’m not sure how that factor’s in with the garage door (unless the garage door is connected to your alarm panel/system, is that the case ?) and the alarm - if the garage door is connected to the alarm, I think I get it.
c. I don’t see any condition for “garage door is open” - or did I not understand how the scripts are functioning. I see a main_sensor listed, but it says “on or off” - shouldn’t it be open or close ? I’m lost.
I’m also just probably overwhelmed with jumping into this stuff, but I really want to understand how these things work/fumction for automation and do some really cool stuff.
Sorry to break you eye drums! If it’s too much I understand I’m just trying to pick pieces here and there.
Ok, enough of my OCD, have a good day
Here’s a little bit of information that might help. My setup was a little over complicated to meet my needs, but you may not need all of that and can simplify it.
a) Disregard the “backup” in the name. I think at the time I was transitioning from a different setup so this was sort of a backup. You can call it whatever you want. And yes, the friendly name is what is called by Google/Alexa.
b) The alarm check is just to make sure that my alarm (which is all built within Home Assistant - master on/off as defined by input_boolean.mode_armed) is off before trying to open the garage door. Otherwise, the alarm will actually activate once the door opens. Its just a stupid check really. Again, probably overcomplicated. The idea in the script is to first call the garage_notify script which says that if the alarm is armed (via a conditional), then send out a message saying so. The next conditional checks in the main script is if the alarm is on or off. If on, script stops, conditional is not met. Its assumed the notify script did its job. The door will not open. I used this order based on script limitations at the time. It may be easier to implement now.
Again, you could strip out those first two actions and get rid of the notify script altogether and still have functionality.
c) For the tilt sensor I have, on means open, off means closed. In the covers.yaml entry, the value template line is where the binary sensor is checked and the cover state is updated
In the open and close scripts the last three actions are all checks to make sure the door actually opened or closed. First wait 30 seconds to let the door do its thing. Then check the state of the binary sensor. For the open script, I check to see if its still reporting closed. If not, then script stops - everything worked. If so, then move to the next step and notify me. Same for the close script except the check is to see if the door is still open.
Hope this helps. I have moved on to a self-built ESP-based door opener since then that is way more reliable, but that’s a whole seperate learning curve.
Wow - Gregg, thank you so much. There is lots to download from this and it really clears my OCD to give it a try. Since, I’m at beginner HA level, this whole automation is a good entry point for me.
My alarm is not built with HA, I’ve got a konnected.io integrated boards with my traditional alarm panel, so it’s not stand alone. But I’m wondering, if that (since it does create a set of on/off switches and provides status updates) if that can be used in the alarm coding ? I like the idea since I have presence setup I could maybe incorporate the system into the garage opening. (OH GEEZ, my freaking mind is off on that damn hi speed train again) - I’m going for a walk!!!
Thank you so much - you really opened a HUGE door for me!!!
You’re welcome. Welcome to the rabbit hole!
Never used konnected before, but sounds like you could automate and integrate a lot of things with it.
Wondering if anyone is around still using this. I’m new to HA. I’ve been running Vera for years. On that platform, there was a handy plugin where you just gave it your tilt sensor and relay ID and it created a “Garage” device for you.
I’m having issues here. I’ve updated the above to my devices. However, I think something is missing. Do I have to include covers.yaml in my configuration.yaml file? How is the “garage door” device created so that you can interact with it in a dashboard?
Update: As suspected, this was a newb issue.
Yes, I had to have the following added in my configuration.yaml:
cover: !include covers.yaml
I also had formatting / indentation issues in my covers.yaml file. Here’s the corrected file in the event that it helps someone in the future:
- platform: template
covers:
garage_door:
friendly_name: "Garage Door"
value_template: "{{ is_state('binary_sensor.door_tilt_sensor_298', 'on') }}"
open_cover:
service: script.garage_door_open
close_cover:
service: script.garage_door_close
icon_template: >-
{% if is_state('binary_sensor.door_tilt_sensor_298', 'on') %}
mdi:garage-open
{% else %}
mdi:garage
{% endif %}