How to Automate Physical Button Press EDIT: Using Shelly to open Garage Door

Hey guys,

I have been using the MyQ Binding but it looks like they are now blocking 3rd party devices from sending commands. I hope they find a solution to that but in the mean time, I am looking into sacrificing a cheap garage door remote to send the commands. Whats the best way to do this?

I was thinking of buying a physical actuator to press the button. Do y’all have any hardware recommendations for one that will do that?

There may be a smarter way to do it electronically. I have a garage door controller thats wired in. I’m assuming when you press a button on that, it shorts 2 wires together. Could I use an external, openHAB controlled device to do this?

Thanks in advance for the help!
JM

This was my first project I did for any automation.

Indeed pressing the button does short two wires. So all you really need is a solid state relay and something to flip the relay when it receives a command and back again.

You can wire the relay to the button on the wall or follow the wire and connect the relay directly to the opener. I have two openers so I got a dual relay board. How it’s wires will vary so be sure to read up on the relay you get. In general on one side you’ll have power to the relay (3.5v or 5v), ground, and control pins and on the other side you’ll have the wires that are connected to the garage door opener/button.

The something to control it can be a microcontroller (e.g. ESP8266, Arduino, etc.) or an SBC (e.g. RPi 0W). With an ESP8266 you could use Tasmota, ESPHome or ESPEasy as the firmware and then it’s just a simple matter of configuration.

You could use openHAB for this but that’s going to require a beefier RPi in the garage. I use an RPi and wrote GitHub - rkoshak/sensorReporter: A python based service that receives sensor inputs and publishes them over REST (should work with any API but mainly tested with openHAB) or MQTT. It can also receive commands and perform an action (e.g. set a GPIO pin to HIGH). It currently supports Bluetooth, GPIO on Raspberry Pi, Amazon Dash buttons, command line scripts, and Roku IP address discovery. to do this instead, though plan on moving to an ESP eventually. I also wired up some reed sensors to the doors and for awhile I had a RaspiCam served up from it (hence the RPi).

My config is:

Logging:
    File: /tmp/sensorReporter.log
    MaxSize: 67108864
    NumFiles: 10
    Syslog: NO
    Level: DEBUG

Connection1:
    Class: mqtt.mqtt_conn.MqttConnection
    Name: MQTT
    Client: cerberos
    User: rich
    Password: hes10d27
    Host: argus.koshak.lan
    Port: 1883
    TLS: NO
    Keepalive: 60
    RootTopic: sensor_reporter/cerberos
    Level: DEBUG

SensorHeartbeat:
    Class: heartbeat.heartbeat.Heartbeat
    Connections:
        MQTT:
            FormatNumber:
                StateDest: heartbeat/number
            FormatString:
                StateDest: heartbeat/string
    Poll: 60
    Level: DEBUG

SensorLargeGarageDoor:
    Class: gpio.rpi_gpio.RpiGpioSensor
    Connections:
        MQTT:
            Switch:
                StateDest: garagedoor1/state
    Pin: 7
    PUD: DOWN
    Btn_Pressed_State: HIGH
    EventDetection: BOTH
    Level: DEBUG

SensorSmallGarageDoor:
    Class: gpio.rpi_gpio.RpiGpioSensor
    Connections:
        MQTT:
            Switch:
                StateDest: garagedoor2/state
    Pin: 8
    PUD: DOWN
    Btn_Pressed_State: HIGH
    EventDetection: BOTH
    Level: DEBUG

ActuatorLarageGarageDoor:
    Class: gpio.rpi_gpio.RpiGpioActuator
    Connections:
        MQTT:
            CommandSrc: garagedoor1/cmd
    Pin: 17
    InitialState: ON
    SimulateButton: True
    Level: DEBUG

ActuatorSmallGarageDoor:
    Class: gpio.rpi_gpio.RpiGpioActuator
    Connections:
        MQTT:
            CommandSrc: garagedoor2/cmd
    Pin: 22
    InitialState: ON
    SimulateButton: True
    Level: DEBUG

I use MQTT above but the script does support talking to OH directly. It even supports Homie so it can be automatically be discovered.

On the OH side I have:

Thing

UID: mqtt:topic:mosquitto:cerberos_sensor_reporter
label: cerberos sensor_reporter
thingTypeUID: mqtt:topic
configuration:
  payloadNotAvailable: OFFLINE
  availabilityTopic: sensor_reporter/cerberos/status
  payloadAvailable: ONLINE
bridgeUID: mqtt:broker:broker
location: Garage
channels:
  - id: garagedoor1
    channelTypeUID: mqtt:contact
    label: Large garage door
    description: Large garage door open status
    configuration:
      stateTopic: sensor_reporter/cerberos/garagedoor1/state
      off: CLOSED
      on: OPEN
  - id: garagedoor2
    channelTypeUID: mqtt:contact
    label: Small garage door
    description: Small garage door open status
    configuration:
      stateTopic: sensor_reporter/cerberos/garagedoor2/state
      off: CLOSED
      on: OPEN
  - id: garagedoor1_opener
    channelTypeUID: mqtt:switch
    label: Large garage door opener
    description: ""
    configuration:
      commandTopic: sensor_reporter/cerberos/garagedoor1/cmd
      off: OFF
      on: ON
  - id: garagedoor2_opener
    channelTypeUID: mqtt:switch
    label: Small garage door opener
    description: Small garage door opener controller
    configuration:
      commandTopic: sensor_reporter/cerberos/garagedoor2/cmd
      off: OFF
      on: ON
  - id: online
    channelTypeUID: mqtt:switch
    label: Online status
    description: Indicates online status of this sensor_reporter
    configuration:
      stateTopic: sensor_reporter/cerberos/status
      off: OFFLINE
      on: ONLINE

The Items are pretty straight forward.

The widget I use is:

uid: garage_widget
tags:
  - card
  - garage
props:
  parameters: []
  parameterGroups: []
timestamp: Sep 20, 2023, 10:58:06 AM
component: f7-card
config:
  title: '=(items.GarageCamera_Status.state === "ON") ? "Garage Doors" : "Garage Doors: Camera Offline!"'
slots:
  default:
    - component: f7-row
      config:
        class:
          - justify-content-center
      slots:
        default:
          - component: f7-col
            config:
              width: auto
            slots:
              default:
                - component: oh-image-card
                  config:
                    refreshInterval: 3000
                    style:
                      height: auto
                      width: 100%
                    url: '=(items.GarageCamera_Status.state === "ON") ? items.GarageWyzeCamera_ImageURL.state : "/static/garage.jpg"'
    - component: f7-row
      config:
        class:
          - justify-content-left
      slots:
        default:
          - component: f7-col
            slots:
              default:
                - component: oh-label-card
                  config:
                    action: command
                    actionCommand: ON
                    actionItem: Small_Garagedoor_Opener
                    footer: Small Garage Door Opener
                    icon: '=(items.Small_Garagedoor_Sensor.state == "CLOSED") ? "f7:house" : "f7:house_fill"'
                    iconColor: '=(items.Small_Garagedoor_Sensor.state == "CLOSED") ? "green" : "orange"'
                    item: Small_Garagedoor_Sensor
                    label: '=(items.Small_Garagedoor_Sensor.state == "OPEN") ? "close" : "open"'
          - component: f7-col
            slots:
              default:
                - component: oh-label-card
                  config:
                    action: command
                    actionCommand: ON
                    actionItem: Large_Garagedoor_Opener
                    footer: Large Garage Door Opener
                    icon: '=(items.Large_Garagedoor_Sensor.state == "CLOSED") ? "f7:house" : "f7:house_fill"'
                    iconColor: '=(items.Large_Garagedoor_Sensor.state == "CLOSED") ? "green" : "orange"'
                    label: '=(items.Large_Garagedoor_Sensor.state == "OPEN") ? "close" : "open"'

The camera comes from the IP Camera binding.

@rlkoshak is correct in the fact that a “switch” is just closing a connection shorting 2 pieces of wire.
And many of the older grarage door openers did just that for the wall button "some even had a light wired in parell across the switch that would be lite when button was not pressed but did not draw enough current to trigger the open close switch function that the opener was looking for via TTL logic .
However many of the new "modern latest greatest ones that have fancy temp and time and multiple features do not just short the wires together . They actually use the voltage supplied on the wire as a power supply and they have a built in wireless transmitter in them “wall button” that is paired with the opener and sends the various different commands such as open close light on off and lock . You need to check carefully what type of opener you have before just shorting the wires together or equipment damage may occur.

Thanks for all of that info! I have been looking into the Shelly products. Specifically, the Shelly Plus 1.

I was inspired by @Nodiaque and this video.

My plan is to buy a simple wireless garage door opener remote like this and solder wires to it as shown in this post. In the video, he wires a contact sensor into the Shelly Plus 1 as well so he can track whether the garage door is open or closed.

I took a look at the Shelly Binding documentation and I don’t see the ability to ‘uncouple’ the SW terminal of the Shelly from the output terminal. Or, said another way, I dont see the ability to JUST report the state of the SW terminal as opposed to acting on it.

Is what I am trying to do possible with the Shelly binding or will I have to use MQTT. I’m not familiar with MQTT but I can learn if needed I guess.

Any dry contact (potential free) (isolated) contact relay board will work either Shelly or Zigbee or Z-wave they all have dry contact relay board type solutions.so if you already have either Zigbee or Z-wave in your environment you could add one of those type relay boards to do same thing the shelly relay board is doing which is same as what ESP series relay boards mentioned above also do.
The approach you are going down will work and you will just have to keep the battery in the remote good. alternates would be subbing the remotes battery with a permanent power source preferably the one that also powers your relay board solution. most remotes uses 3.3 volt lithium battery so you just need to be aware when it dies the automation will not work without the permanent power source.
As far as I recall on Shelly devices they either get polled ever so often to show status or report the status just like a Zigbee or Z-wave non-battery powered device so it will always show if the relay is on(closed) or off(open)

The optimal solution would be to wire the Shelley, or similar unit directly into the opener itself.

The only reason I was thinking of using a battery powered garage door opener remote is because I have a Liftmaster 8500W and I don’t think that it has a place on the opener where you can simply short 2 wires to activate the garage. I think all communication out (including that to the wired remote by the door) is digital.

To get around this, I was planning on using the little remote. Maybe I am wrong about this though?

The remote, I’m looking at is powered by a Watch battery. I need to look up the voltage because that’s a great idea to somehow hardwire that in As opposed to relying on batteries.

I need openHAB to report whether the switch terminal is open or closed Not the input and output terminals. The input and output terminals will be used to transmit the signal to the garage door so they will only be open for a very short time.

your model garage door opener does support 2 control panels according to the manual.
So you could order the second one like you listed in first post open it up and solder the wires to the switch contacts in it as well or (ideally find 2 points that are electrically the same as those contacts) use small gauge wire small wires are perfectly fine for that as no real current handling is required neatly do it and reassemble and it could work normal and using your “shelly” solution.
As for open and close easy part on that is door/window sensors to show open/closed state. shelly has them as well as other protocols like ZigBee and Z-wave. Disassembling and soldering the wires on the 880LMw PCB is likely not going to be any harder than taking the battery operated remote apart and soldering on its PCB.

I would go the control panel way. Any batterie / rf solution can fail easier then wired one. Also, the remote doesn’t know the status of the door, it only does a trigger. Since these device are click, it means in the shelly, it’s a push button. Thus the status will always be off unless you press the button, it won’t tell you the status of the door. For that, you need contact sensor or other stuff like that (showed in one of the video). Also, this remote doesn’t receive status, it only send. Which mean if someone open it from another way, you won’t get status update.

Contact Sensor is the way to go for that. I would put 2, one on full open and full close. So this way, When one is closed it means door is closed or open. When both are open it means door is moving.

I ordered the Shelly Plus 1, contact sensor, and a new Smart Control Panel and get it working. ill type up an overview of how I did it as I get time in the next few days.

What type of contact sensor did you take?

See my full walkthrough linked below.