Shelly 1 Garage Door Controller

Your next step is to use Home Assistant instructions to customize how it will control your garage door. For example the position_topic: is where you set input 0.

I did not modify the script, but I did need to modify the config yaml file to enable python scripts, and add the automations, and reboot HA

THEN, I needed the shellies to “announce” so the script could add them, which for me was to power cycle it since that was easiest at the time

I am missing something simple. I have run bieniu’s shellies discovery script and I do see the topics created in MQTT Explorer. Issue is still that the HA entities are not created. I’ve restarted HA twice per the instructions.

image

I have been attempting this project, I have everything working as expected in home assistant and today went to install the Shelly and Reed switch on the garage door. I have the I port contracted to the Red+ port on the opener, the the O on the white - port. When I trip the relay either in HA or in the Shelly web interface, I hear the click, and the down arrow light will flash a few times on the garage opener.

You all see anything obvious in this setup I may be missing?

Your garage door opener may not work with a simple switch. If the controller at the end of the wiring has a learn button, it probably sends some required code sequence. Test by shorting the wires into the controller ports. If that doesn’t open the door, you need more than closing the circuit.

Thank you for this. Little newer to Home Assistant and your template helped with set up.

One issue that might help others. Shelly1 does not post availability topics natively to mqtt. I had to delete those from the template for it to work.

Would love to know where that availability topic setting is.

cover:
  - platform: mqtt
    name: "Garage Door"
    position_topic: "shellies/shelly-garage/input/0"
    command_topic: "shellies/shelly-garage/relay/0/command"
    retain: false
    payload_open: "on"
    payload_close: "on"
    payload_stop: "on"
    position_open: 0
    position_closed: 1

I double checked the setup. My shelly1 settings do not have the “Will Topic” available.

Newest Non-Beta Firmware: 20210115-102904/v1.9.4@e2732e05

Look at the rest of the post. The Shelly does not post availability on its own. You need to force it to announce with an automation.

automations.yaml
- id: mqtt_shelly_announce
  alias: Shelly Sync at HA Start
  trigger:
  - platform: homeassistant
    event: start
  action:
  - delay: 00:00:20
  - service: mqtt.publish
    data:
      topic: shellies/command
      payload: announce

I was following your topic but I’m not able to have inside my entities the custom entity created by adding the code to configuration.yaml.
My shelly is reachable and properly announced to MQTT installed in Hass.Io (MOSQUITO), as per log.

Any idea ?

thx

Since you can’t add code to configuration.yaml, consider using the native Shelly integration with GUI setup instead of MQTT. https://www.home-assistant.io/integrations/shelly/

Hi Erik,
That’s the same opener I have and I just got it working tonight. I had to hook the Shelly up to a spare fob as this opener needs a code to activate the door. Good thing my fob had 3 buttons on it as the first one got fubar’ed internally. Think I got some flux in it. 2nd button is working great so far. Now it’s off to explore tilt sensors.

HomeTechHacker posted a new article for users with garage door openers that use Security +2.0 technology. Instead of just using a dry contact to open and close the garage, they actually use a circuit to send signals to the garage door. His answer is to wire an extra opener to the Shelly. https://hometechhacker.com/diy-garage-door-opener-w-security-2-0-gdos/

If desired, my addition to read a position switch from the same Shelly 1 would continue to work as previously presented.

Hi all, not an expert on wiring, but I believe I can use my on board 24v+ power supply for my Shelly 1 as my power source for a garage opening solution, excluding the need for a 12v DC adapter? But I am not sure how with just a 24+ terminal and no - terminal on the board. This is the wiring solution required, but with no - terminal I am confused how this now works?

My garage motor board.

It’s likely “COM” for Common a.k.a Ground/-. Test whether it’s a ground with a multimeter. If you get ~24V then you’re probably good to go assuming your contact sensor can handle 24V. If it’s a simple reed switch you’re probably fine, but should check specifications.

Just wanted to say thanks for sharing this. I was tearing my hair out before I found this and everything worked perfectly. The only thing I had to do was invert the position_open and position_closed values. Many many thanks and great job.

late to this party, but LOL

Just to help other visitors coming to this thread in the future - When you say “this”, how exact did you wire the whole thing? Which wire goes where on Shelly 1 and where on garage door opener?

I used this guide for the wiring:

Just follow along up until it gets to the ESPHome part. From there, switch over to this guide and continue. Start by setting up the Shelly 1 via the app to get it on the wifi. From there, log into the web interface on a computer by going to the Shelly’s ip address. Go into the settings and match all the relevant settings to the ones dfrap provided at the top. Then just add the relevant code to each of the files in your HA config. DFRAP made it a little confusing by putting all the code in one block. It’s three different code snippets that need to go into each of the yaml files above them: configuration.yaml, customize.yaml, and automations.yaml

You’ll need to invert the values for position_open and position_closed in the yaml if they’re reporting backwards.

For the notification automation, you’ll need to switch out “notify.mobile_app_moto_x4” for whatever is relevant for your setup. Mine was “notify.mobile_app_bj_s21” which is my Samsung S21.

Good luck!

1 Like

The first post was edited to reflect the new MQTT format. Defining manually configured MQTT entities directly under the respective platform keys (cover in this case) is deprecated, and support will be removed in Home Assistant Core 2022.9.

1 Like

Today I changed my project to use ESPHome. This will allow me to simplify Home Assistant. I removed all the customization from Home Assistant yaml files. I can also retire MQTT. I run ESPHome on several devices and it made sense for this project. The ESPHome connection to Home Assistant is fast and simple. I still like the Shelly 1 hardware for this garage door application.

My project is now based on Make Your Garage Door Opener Smart: Shelly 1, ESPHome and Home Assistant | Savjee.be

I used this guide (Make Your Garage Door Opener Smart: Shelly 1, ESPHome and Home Assistant | Simply Explained) to create s garage door opener in HA. It was working fine for a long time. As of a couple of days ago, the cover (garage) controls on my dashboard are grayed out. The logbook indicates the Shelly1 firmware turned off a couple of days ago. I think this is when I updated the HA core and/or operating system, but I can’t tell exactly when I did that. Any ideas on getting my garage door control working again in HA?