OpenGarage - open-source Wifi garage opener

For me thank you won’t be enough, if there is a word more powerful than “thank you” to say to those guys; that would have been it. But since “thank you” is the most common, i’d a bunch of them to those guys. With this project i was able to come up with this myself:

2 Likes

Nice, being the noob that I am, yours looks different to mine and the others, what did you do to create yours?

Check this post out.

1 Like

Is there anyway to get this to work with voice commands with Google home or alexa?

Been using this for a while and it works great, but I have been experiencing some issues. If I trigger open or close in Home Assistant, and for some reason the door never does it, the door status will freeze on “Opening” or “Closing” until the door has changed its status. The problem is that when the door status is “Opening” or “Closing”, its not possible to trigger the relay. So the door will be stuck for days until you restart HA or open/close the garage door manually.

Has anyone found a fix for this? Is it possible to trigger the relay with MQTT, so I could have a “Trigger relay” button in HA that I can use to trigger the relay manually when this happens? Or make the “Opening” / “Closing” status have a timeout?

@mLaupet I’m trying to get to be able to open mine with MQTT but the topic (device name) does not seem to work. I’m running 1.0.8. For now, it is possible to use the opengarage api and toggle the door with http://devip/cc?dkey=xxx&click=1 where ‘dkey’ is the device key. The default dkey is ‘opendoor’. I’m going to set up a hidden Restful switch to be able to open it with Google and Alexa.

Full API doc here.

1 Like

Thanks for mentioning the API. I’m using the 1.0.8, but I’ve not been able to use MQTT either…

I found a working solution to my problem tho. I created a rest_command that I call from a script that I can use when the garagedoor is “stuck”.

rest_command:
  example_request:
    url: 'http://192.0.0.100cc?dkey=XXXXXXX&click=1'
script:
  trigger_garagedoor:
    alias: Trigger Garagedoor relay
    sequence:
      service: rest_command.example_request

This is odd. The rest API is exactly what the component is doing. So when you say the door gets stuck, how is this rest_command any different than what is being done now? :slight_smile:

I created a script to call the component to get it working with Alexa. I can share if there is interest.

I’m not sure… When the status is “Opening” or “Closing” and you try to click the up or down arrow, nothing happens. It will say “Called xxx service”, but the relay is never triggered. So there has to be some difference I guess. Maybe there is a check in the compoent that prevents you from triggering the relay when the door has one of these statuses?

Read my post from 4days ago, that explains the problem I was facing in more detail :slight_smile:

You can recreate this problem by triggering open in HA, then manually with the garagedoor opener stop the garagedoor. This way the distans sensor will never report “Open” to HA, and HA will be stuck on “Opening”. In this state its not possible to trigger Open or Close from HA with the arrows.

When HA calls the open function, the OpenGarage component puts it in an internal “opening” state. The component will trigger the door as long as its not already in an this internal opening state. This prevents you from pressing the button again accidently in the UI, and having it call the OG API. So what’s happening in your case is the door is in an opening state, but since the door never opens (or even seems to trigger), it gets stuck in this opening state, and never goes out of it. I suspect if you were to manually open the door with your regular remote, it would get unstuck from this state.

I actually had this happen to me for the first time yesterday, but didn’t realize it until later. If this happens to someone I would love to know if there is anything logged as error in your logs.

The internal opening/closing state I think is generally a good thing - but not if its going to get hung up, so I’m open to ideas on how to remedy this while keeping that functionality. The component polls OG’s state every 15 secs, so perhaps after 2 polls if the state hasn’t change, then it should abandon the internal opening/closing state.

@mLaupet Can you reproduce this pretty easily, or does it only happen every once in awhile?

Yes, triggering it with your remote will fix it. I created a script that call the API directly to use when the door gets stuck. Code is some posts above.

This has not happened to me for a good while. My guess is that it was because of bad wifi coverage in the garage and that it has been very cold there in the winter. The door will sometimes get stuck because of ice, so you need to trigger the relay multiple times to get it to open, but the component stopped me from doing this.

The 30 sec polling sounds like a good idea as we should keep the existing logic to prevent double clicks and stuff like that.

You’re welcome. Question though. Why a rest_command instead of just a resful_switch? Just trying to understand the benefits of your approach.

This is really cool. Could you please briefly explain how the distance sensor works to detect the car?
I thought the distance sensor had to be put horizontally to detect the door once opened. How can it detect the car then?

Thanks

A very short distance (door between sensor and floor) is interpreted as an open door. A longer distance (door not in way but the floor is not reached) is the car parked below the sensor. The longest distance (all the way to the floor) is the door closed and no car present.

The sensor points down from the ceiling to the floor, not out towards the opening.

1 Like

nevermind, saw other people’s photos and just figured out the sensor needs to sense vertically, “above” the door. Cheers

You can mount it at the bottom too, you just won’t be able to tell if a vehicle is there.

See video https://youtu.be/HpwEa_48-Cw around 2:30 mark.

1 Like

anyone know why the garage door opener on the wall doesnt work when its connected to the relay? if i disconnect the wires going to the relay from the garage door opener, the wall switch begins to work again. i now have to use my remote control opener to open the garage manually.

I had this issue. My old craftsman opener has a light button on the wall switch as well. I ended up tracing the buttons on the wall switch and soldering the wires to the relay to the switch board, this also let me use a second relay for the light. Running the relay directly to the opener would not work reliably and also kept the wall and remote openers from properly working.

You would probably get this behavior if you have it wired to Normally Closed instead of Normally Open on the relay. Thus - the OpenGarage is essentially holding down the button preventing other buttons from working.

I use ifttt to call the Alexa command and webhooks to call the web request.