Hörmann remote controlled garage port controlled with ESP8266

We moved into our house more than five years ago. One big plus when we decided to buy the house was the big, year-round-warm, garage with its motorized garage door. The luxury of not having to step outside of the car to open the door to the garage was a sweet feeling each time we pressed the remote-control button. After some years had passed that sweet feeling was not as prominent as it once was. The distance of the signal, or lack thereof, was starting to annoy me since I had to wait for the doors to open. I wanted to just roll into the garage without a second of idling outside. I mean, the extra wear and tear of using the brakes and rev-ing the engine has a major impact on the family budget! I had to do something about it.

Hörmann is the brand of the garage door and they have extra remotes but they are, to be fair, a bit pricey for my taste. The fact that I had to get into the car to fetch the remote to be able to open the garage door from INSIDE the garage made me want a wall-mounted remote as well. This would mean even more money being spent, not cool.

Being a noob, as well as an eager learner, of home automation I had come across the open source initiative of ESP Easy. I found the level of pre-knowledge of electronics pretty low and in a couple of hours I found myself with a full shopping cart on AliExpress.

Then there’s the wait. As cheap as it is you need to wait. And wait some more. I know, it’s not that long of a wait but when you’re waiting for something, that potentially could change your life, time moves sloooow.
Fast forward and I have myself the stuff needed to replace the old original remote control with this:

ESP Easy on ESP8266 controlling Hörmann Garage Door

How it works and how I did it? Thanks for asking, here’s the story.

First off, we need to understand how the new – non-original – remote works. The easiest way of programming it is to do so before integrating it into the box (even though I have made a small script inside the micro-controller to execute this after installation). To get the remote into programming mode you need to press the two top buttons (open/closed padlock) simultaneously. Keep them pressed until the red led start to flash, three times. Then release the “closed padlock” button (the right one). Press and release the “closed padlock” button three times. Wait a sec and then release the “open padlock” button. You are now in programming mode. Put the original Hörmann remote back-to-back with the new remote and press and hold the button that you want to copy from the original, now quickly press and hold the button that you want to program on the non-original remote. Hold the two buttons until the red led starts to blink, first slow and then frequent. Release both buttons and you have now successfully reprogrammed the new remote.

ESP Easy on ESP8266 controlling Hörmann Garage Door

To explain this in a script:

1. Press Close, Press Open, Wait 2 seconds
2. Release Open, Wait 1 second
3. Press Open, Wait 0.8 second, Release Open, Wait 1 second
4. Press Open, Wait 0.8 second, Release Open, Wait 1 second
5. Press Open, Wait 0.8 second, Release Open, Wait 1 second
6. Release Close
7. Simultaneously Press the two button on each remote to copy the signal from one to the other, Wait 3-5 seconds, Release

The rest of the build is done using the micro-controller ESP8266 together with a 4 channel relay board, extra GPIO board, some buttons and bits and pieces. The complete list is found in the bottom.

ESP Easy on ESP8266 controlling Hörmann Garage Door

The connections are pretty straight forward and hopefully explained with these pictures.

ESP Easy on ESP8266 controlling Hörmann Garage Door

Removing the cover of the new remote will uncover a great constructed pcb. The buttons are possible to high jack by soldering wires to each side of them. The remote work in such a way that it is given power through the buttons, thus only using the battery in that short period of time. This mean that you could use the onboard battery and not have it powered by your own build system if you don’t want to or don’t have the space for it.

ESP Easy on ESP8266 controlling Hörmann Garage Door

I fixated the relay board using the holes together with the plastic plugs seen here.

ESP Easy on ESP8266 controlling Hörmann Garage Door

To be sure that the soldering board used under the ESP unit doesn’t connect to the relay board by mistake I used none conductive tape (yellowish in the picture below).

ESP Easy on ESP8266 controlling Hörmann Garage Door

It all fitted nicely in the box. The box itself is possible to use outdoors if you use the provided sealing. The whole build feels good enough esthetically for use in a garage. Thanks to the functionality of ESP Easy it is now possible to control the garage door with the wall-mounted buttons or with a smart phone. I use the application MQTT Dash to open and close the door.

MQTT Dash Garage Door Opener

Burst_Cover_GIF_Action_20170928212804

Within the ESP Easy FW I have these rules to make the unit work:

on System#Boot do
Publish %sysname%/status,Booted
Publish %sysname%/IP,%ip%
pcfgpio,69,0
pcfgpio,70,0
pcfgpio,71,0
pcfgpio,72,0
Delay,5000
endon

on sniff#cmdMQTT=1 do
Publish %sysname%/IP,%ip%
endon

on sniff#cmdMQTT=2 do
Publish %sysname%/Time,%systime%
endon

on sniff#cmdMQTT=3 do
Publish %sysname%/status,Rebooting
Reboot
endon

on ProgramRemote do
GPIO,12,0
GPIO,13,0
Delay,2000
GPIO,13,1
Delay,1000
Pulse,13,0,800
Delay,1000
Pulse,13,0,800
Delay,1000
Pulse,13,0,800
Delay,1000
GPIO,12,1
endon

on RemoteSwitch1 do
Pulse,12,0,800
endon


on RemoteSwitch2 do
Pulse,13,0,800
endon


on RemoteSwitch3 do
Pulse,12,0,800
endon


on RemoteSwitch4 do
Pulse,16,0,800
endon

on ExtraGPIO#Switch1=0 do
Event,RemoteSwitch1
endon

on ExtraGPIO#Switch2=0 do
Event,RemoteSwitch2
endon

on ExtraGPIO#Switch3=0 do
Event,RemoteSwitch3
endon

on ExtraGPIO#Switch4=0 do
Event,RemoteSwitch4
endon

The rest of the settings according to this:

Skärmklipp3

Skärmklipp2

The extra GPIO/buttons was set up like this:

ESP Easy

On the todo list I have an idea of being able to know the position of the garage door (and if it is on its way up or down) using a flip switch. I will make a separate blog post for that.

The hardware:

Remote control

WeMos D1 mini (ESP8266)

Relay board

Extra GPIO

Box

Buttons (switches)

WeMos Protoboard

PCB fixation

Glands

PCB tape

The software:

ESP Easy (the firmware)

Mosquitto (to talk to the ESP using MQTT, to be able to control it by using your phone)

Portable Mosquitto (self made with no login needed)

Q&A is found on the ESP Easy forum:

Forum thread