OpenGarage - open-source Wifi garage opener

Yeah, I hear you. I originally looked at the zwave option you described but saw it wasn’t very straightforward with HA and OZW. After going down the zwave thermostat route, and seeing how quirky that was, I decided to try something else.
I’ll see if I can write up a guide. Once you have the parts, these things just plug into a mini breadboard without any soldering. It takes me about 10 min to assemble one.

Scott

Nice that sounds great!! Here is my current garage layout…

Thanks again!!

Does your relay module trigger with either voltage or ground? I just got some and they trigger either way so I’m having trouble getting it to work.

I’m using these Keyes 5V relays. According to the stock OpenGarage firmware, this is connected to GPIO 15 (NodeMCU pin D8), and is setup to trigger on ground (LOW)

I had to add a transistor. I got it working.

@PtP Although not exactly a guide, here is the wiring diagram that I just created for how I made mine.

This picture below is for the NodeMCU v2 board. If you have the newer v3 board, see @rufusmccoot’s diagram here.

There is no soldering involved to put this together. I used some needle-nose pliers to bend the Relay signal pin outwards, and also bend the the VCC pin upwards on the motion sensor. Other than that, you just plug the items into the breadboard on the correct holes, and you are done. Assembles in about 5 minutes. I mounted my breadboard on a piece of wood that I drilled into a joist on my garage ceiling.

Note: The buzzer is not required (it isn’t shown in my first picture, but I have since added it.) The buzzer gives feedback when the unit is turned on and it will also beep 5 times when the garage is about to open. This can be configured in the Settings, but I found that the beeping is very helpful to give someone warning if they are in the garage.

The build above was built using the following materials:
NodeMcu 1.0 / v2 revision (Amazon, AliExpress)
HC-SR04 distance sensor (Amazon, AliExpress)
5v Relay (Gearbest)
9012 buzzer (ebay)
Mini Breadboard (Amazon)
M-F wires/Jumper wires (Already had them, you get some in the breadboard kit above if you don’t have any).

If you don’t mind waiting 2-3 weeks, you can order the items from China and get most for $1/each.

See post 2 items below for software instructions for NodeMcu.

Scott

4 Likes

This is great! Was there any programming/firmware involved besides network creds?

On the software side, you’ll flash the OpenGarage firmware 1.05 to your NodeMcu. I used the nodemcu-flasher to do mine. After you do that, you can follow their YouTube video for instruction on how to setup your device.

1 Like

Thank you very much for your time and commitment to HA!

When I attempt to flash the OG firmware 1.0.5 I get stuck in a bootloop. Same with 1.0.4. So I try 1.0.1, can connect to 192.168.4.1 and tell it to hop onto my WiFi, aaaaaand…bootloop when it attempts to reboot to join my WiFi.

Any ideas? I even bought another Nodemcu module in case the first one was bad, but no dice. I’m obtaining the firmware from their Github, as you linked.

Do you have everything plugged in? (Distance sensor) I feel like this happened to me when I flashed it with nothing connected.

Thanks for the reply. I have the distance sensor and relay plugged in. Buzzer’s still on its way from China but I don’t think that’s gonna make or break it. Maybe I should throw a small resistor in its place to be sure.

I have also tried it with the NodeMCU all by itself just in case any other component was screwing me up and I get the exact same behavior.

You were able to get it working without the buzzer, right? I thought I read that in the thread.

Yes, the buzzer isn’t required. Are you able to see any error message in the serial output?

Should I use ESPlorer IDE to try to read the from the serial bus? If so I’m just getting stuff like this:

ÀÇîÊ(¹)é¥!!!¯!)!!ªHŠ2)!„¤J¡eÚÌúü¾üÜÍüÜWÔºúõ¼ý¾ÝÜÿ?)�(Èâ@èýÿÊèÏH
̉×F 8¸�·‰:))DM!èä…
¥¤ÜÈ :)!¡ÜdúÜúú|œýÚÌæüÖÌÕl|¯úÿÆåÖÔU9ÿDà¼ÊèH1´Ô)
Ô”îÊ()¸�·Ì!!!‹!)…H))½H
„¤J!ÝÜÔÕl|¿úÜÜÜåÜý½úýôæüýÜÿ?)�
ô@HàþHþÏH
À”

I might be doing this wrong lol.

I’m not familiar with ESPlorer, but make sure you have the baud rate set to 115200. The data you posted would happen if the baud is not correct. That said, I’m not even sure if the firmware from OpenGarage has debug turned on, but I think it does.

Thanks for your help. I’m able to see now “rst cause:2, boot mode:(3,6)”. Some Googling is telling me my power source might be the problem, though I’ve tried various USB cables and USB ports and laptops.

I was planning on powering this thing from an old cell phone charger. What do you use?

Edit: I’ll add that I’ve also tried with a wall adapter (again, old phone charger) and I seem to be getting the same reboot cycle but of course I can’t get diagnostic information since I’m not plugged into my PC and can’t read the bus.

Edit 2: Wait, should i not be powering this thing via USB and applying power via pins instead?

I feel like I saw that same error when I didn’t have the sensor plugged in the correct pins. Can you double check the pins on your distance sensor?
USB power is fine. Im able to power my nodemcu from the USB plugged into my computer.

So this is weird. My connections are good, but I decided to move the distance sensor’s VCC from VIN on the NodeMCU to 3V on the NodeMCU. This seemed to solve the bootloop problem and I can get into the device in AP mode and give it my WiFi info and hit the web UI on my WiFi now.

So that feels like progress. But now it’s only detecting 0 cm and that the door is OPEN (just sitting on the couch next to me with nothing blocking it).

Thanks so much for your help, I feel like I’m getting closer. I’ll keep farting around.

Did you get it working?

My distance sensor gives an error when the max
Distance is reached. I.e nothing blocking it for 5 meters or so. In some arduino sketches this is implemented wrong and it tells you 0 distance.
Does it work when you put something close?