This is my Shelly2.5 garagedoor opener with four states in a custom button-card attached on a Hörmann Promatic2 sectional door. Single button open-stop-close and monitoring its state.
Hardware needed
Shelly2.5 (prob the newer 2pm will work too)
Some Wiring
1x Reed contact* (in used the ABUS MK2000W - NC)
*the Hörmann has a build-in contact that is needed for the second ‘sensor’
Shelly2.5 setup:
setup is relay mode giving it two channels
timers: auto OFF with 1 second
power on default: OFF
appliance type: relay
button type: detached switch
*settings are for both channels
From the entities that are being created now in home-assistant you are going to need the ‘input’ channels and the ‘switch’ channel form the given Shelly2.5 wich in my case i named:
binary_sensor.garage1_1_input , binary_sensor.garage1_2_input , switch.garage1_1
Promatic2 setup
On the printboard of the promatic2 there is a dipswitch. [additional image1] for the internal contact to work you should set no 2 to ON (read manual if things differ for your print-board as you may have other settings)
Connecting the Shelly2.5 on the Promatic2
the shelly is powered from the onboard 24V DC of the promatic
The external sensor in attached to the door-rails and runner (close to the promatic) [additional image2]
the terminals are being attached as can be seen in the drawing below: [and additional images3+4]
The Home Assistant part
Button Card by @RomRider to be found here: https://github.com/custom-cards/button-card
After adding button-card in home assistant create a card:
type: custom:button-card
color_type: card
action_name: run
tap_action:
action: call-service
service: switch.turn_on
service_data:
entity_id: switch.garage1_1
entity: sensor.garage_status
lock:
enabled: true
name: Garagedoor
show_state: false
show_label: true
state:
- value: open
label: DOOR OPEN
color: red
icon: mdi:garage-open-variant
styles:
card: null
- value: opening
label: DOOR IS OPENING
color: orange
icon: mdi:arrow-up-bold-box
styles:
card:
- animation: blink 2s ease infinite
- value: closing
label: DOOR IS CLOSING
color: orange
icon: mdi:arrow-down-bold-box
styles:
card:
- animation: blink 2s ease infinite
- value: closed
label: DOOR IS CLOSED
color: green
icon: mdi:garage-variant-lock
Next add script below to configuration.yaml:
*cleaned up the yaml code: Jan 19-2023
template:
- trigger:
- platform: state
entity_id:
- binary_sensor.garage1_1_input
- binary_sensor.garage1_2_input
sensor:
- name: Garage_Status
unique_id: Garage_status
state: >
{% if (trigger.to_state.state == 'on' and trigger.entity_id == 'binary_sensor.garage1_1_input') %}
closed
{% elif (trigger.to_state.state == 'off' and trigger.from_state.state == 'on' and trigger.entity_id == 'binary_sensor.garage1_1_input') %}
opening
{% elif (trigger.to_state.state == 'off' and trigger.entity_id == 'binary_sensor.garage1_2_input') %}
open
{% elif (trigger.to_state.state == 'on' and trigger.from_state.state == 'off' and trigger.entity_id == 'binary_sensor.garage1_2_input') %}
closing
{% endif %}
Additional images and disclaimer
This is not the first script for automating and monitoring a garagedoor but on other posts and scripts i ran into the fact that for a noob as myself, things are not always explained in as we call it ‘Jip & Janneke’ language… i.e… in easy language,this goes there …
Anyhow I tried explaining things in a way i would understand it myself
That said most of the scripting came from other posts and people who tried similar (and did not work for me) and then i crafted them together with help of a friend. I have no clue anymore where al the pieces came from so if you find some of your work here, thank you for it and lets hope we can help many others with this compiled version!
image1:
image2:
image3:
image4: