Hörmann garage door via MQTT

And what does it mean? Is it possible to use the BT of hörmann or not ….

Would anyone be able to port this code to ESPhome?

1 Like

You mean the one with Bluetooth and the Hörmann app? That would be great.

Ah, no sorry. I meant the PCB for the E3. Its currently using MQTT but I would love to have it working with ESPHome

Hi,
I started to adapt it to ESPhome but I’m not able finalize because I have an E2 motor (not an E3) and I’m failing to get the motor status but all actions are working open, stop, close, venting, toggle light.

Here is the “work in progress” code: hoermann_door/esphome at main · lg2dc/hoermann_door · GitHub

I wrote the code almost one year ago and it’s working for me. In HomeAssistant I coupled the esphome cover with a zigbee door sensor to have a closed/open state. I’m missing closing/opening/stopped states but it’s usable.
I was planing to expose the cover as “custom” cover in place of the “template” one.
The venting and toggle light should be turned into buttons since the feature was recently introduced.

I hope it may help owners of E3 who are able to write some C code.

If someone can confirm that the esp_garage_door_state text sensor is returning the right state, I could try to fix my code “blindly”, if I find time :sweat_smile:.

2 Likes

Is there anything similar for E4?

Hi, for E4 i’m trying to use the HMIP HAP1-HCP adapter from Hormann (40€), in order to let the motor accept E3 accessories. In fact it seems a viable solution, but doesn’t work well for me. I can read the door and light status, which update correctly when I use the original remote command, but I can’t send open/close commands and turn on/off the light via MQTT. So at the moment, on E4 you can only have status report… or I did something wrong.


Have you checked the pinout?

Supramatic E4

  1. GND
  2. GND
  3. B / RS485 inverting input/output
  4. A / RS485 non-inverting input/output
  5. 24VDC
  6. 24VDC

Supramatic E3

  1. Unused???
  2. 24V DC
  3. GND
  4. Unused???
  5. B / RS485 inverting input/output
  6. A / RS485 non-inverting input/output

Source:

Cool…. The HAP I have already …. ( using homeatic IP via raspberrymatic) But the board for mqtt … Can you tell me where I can get this?

Hello, everyone,

very interesting.

Actually I was looking for information regarding the Bisecure Gateway integration in HA but I didn’t find anything. It’s probably too complex.

Does anyone know if this also works with Hörmann Promatic 3. At the moment I’m using the control inputs and have to laboriously measure the gate status with sensors. Does anyone still have circuit boards? Then I would like to test it.

After so much effort, for Promatic 4 I decided to abandon the PCB way. I switched to this project:

Or better, this (for MQTT integration):

[update] or better again, my fork here:

10€ in materials, 2h of work and it’s working… instead of over 100€ from SMD parts, PCB
, PIC programmer, HAP adapter, and 2weeks of tinkering :slight_smile:

It isn’t complete, I had to do some modifications (MQTT authentication, Serial2 instead of Serial1, dutch language…), but after these mods, it’s working. In fact, it’s a bit buggy via MQTT, you have to send commands 2-3 times, but on webpage it works perfectly.


Does anyone know if something similar can be achieved with the Garamatic 9 door controller? The documentation manual for this model mentions about the use of the optional UAP 1-HCP for ‘additional functions’ so I’m hopeful…

Seems very similar to a Promatic 4… by chance it will work.

I fixed some bugs on my HCPBridge branch (see previous posts for url).

Now position is working using Shutter custom card from HACS:

I’ve also fixed various issues on MQTT. Still a quick and dirt implementation, but both web and MQTT are working.

@Dr.Pat Can you please confirm the repository/branch with the updated code?

I am interested in one that will allow integration through MQTT.

Thanks,
Vlad

hi, this is the one that is working for me:

Hey! Thanks for the code. I will try and see what I can do. I also think a cover would be a great way tom implement it. Ill use your code as base.

The Issue I had with the implementation in MQTT is, that it did not react after a few days. I got the Status just fine (open/close, Pressure, Temperature) but I could not open the Garage. I hope its not an issue with the PIC…

EDIT:
I uploaded it and it works! I try to add the “endstop cover” and change the toggle function of the Light. Otherwise I am quite happy. Lets see how long it works or it stops after a few days as well.

I already added the BME Sensor and attached my log where I opened, stopped, closed, fully opened, fully closed, vented, toggled the light…

INFO Reading configuration /config/esphome/garage-door.yaml...
INFO Starting log output from garage-door.local using esphome API
INFO Successfully connected to garage-door.local
[23:19:57][I][app:102]: ESPHome version 2022.12.8 compiled on Feb  2 2023, 23:16:34
[23:19:57][C][wifi:504]: WiFi:
[23:19:57][C][wifi:362]:   Local MAC: EC:FA:BC:76:E3:6B
[23:19:57][C][wifi:363]:   SSID: 'Internetz'[redacted]
[23:19:57][C][wifi:364]:   IP Address: 192.168.1.35
[23:19:57][C][wifi:365]:   BSSID: 28:87:BA:14:0D:A2[redacted]
[23:19:57][C][wifi:367]:   Hostname: 'garage-door'
[23:19:57][C][wifi:369]:   Signal strength: -82 dB ▂▄▆█
[23:19:57][C][wifi:373]:   Channel: 11
[23:19:57][C][wifi:374]:   Subnet: 255.255.255.0
[23:19:57][C][wifi:375]:   Gateway: 192.168.1.1
[23:19:57][C][wifi:376]:   DNS1: 192.168.1.1
[23:19:57][C][wifi:377]:   DNS2: 0.0.0.0
[23:19:57][C][logger:293]: Logger:
[23:19:57][C][logger:294]:   Level: DEBUG
[23:19:57][C][logger:295]:   Log Baud Rate: 0
[23:19:57][C][logger:296]:   Hardware UART: UART0
[23:19:57][C][i2c.arduino:052]: I2C Bus:
[23:19:57][C][i2c.arduino:053]:   SDA Pin: GPIO4
[23:19:57][C][i2c.arduino:054]:   SCL Pin: GPIO5
[23:19:57][C][i2c.arduino:055]:   Frequency: 50000 Hz
[23:19:57][C][i2c.arduino:058]:   Recovery: bus successfully recovered
[23:19:57][I][i2c.arduino:068]: Results from i2c bus scan:
[23:19:57][I][i2c.arduino:074]: Found i2c device at address 0x76
[23:19:57][C][uart.arduino_esp8266:102]: UART Bus:
[23:19:57][C][uart.arduino_esp8266:103]:   TX Pin: GPIO15
[23:19:57][C][uart.arduino_esp8266:104]:   RX Pin: GPIO13
[23:19:57][C][uart.arduino_esp8266:106]:   RX Buffer Size: 256
[23:19:57][C][uart.arduino_esp8266:108]:   Baud Rate: 19200 baud
[23:19:57][C][uart.arduino_esp8266:109]:   Data Bits: 8
[23:19:57][C][uart.arduino_esp8266:110]:   Parity: NONE
[23:19:57][C][uart.arduino_esp8266:111]:   Stop bits: 1
[23:19:57][C][uart.arduino_esp8266:113]:   Using hardware serial interface.
[23:19:57][C][template.cover:071]: Template Cover 'esp_garage_door'
[23:19:57][C][template.cover:071]:   Assumed State: YES
[23:19:57][C][template.cover:071]:   Device Class: 'garage'
[23:19:57][C][bme280.sensor:177]: BME280:
[23:19:57][C][bme280.sensor:178]:   Address: 0x76
[23:19:57][C][bme280.sensor:190]:   IIR Filter: OFF
[23:19:57][C][bme280.sensor:191]:   Update Interval: 60.0s
[23:19:57][C][bme280.sensor:193]:   Temperature 'Temperature'
[23:19:57][C][bme280.sensor:193]:     Device Class: 'temperature'
[23:19:57][C][bme280.sensor:193]:     State Class: 'measurement'
[23:19:57][C][bme280.sensor:193]:     Unit of Measurement: '°C'
[23:19:57][C][bme280.sensor:193]:     Accuracy Decimals: 1
[23:19:57][C][bme280.sensor:194]:     Oversampling: 16x
[23:19:57][C][bme280.sensor:195]:   Pressure 'Pressure'
[23:19:57][C][bme280.sensor:195]:     Device Class: 'pressure'
[23:19:57][C][bme280.sensor:195]:     State Class: 'measurement'
[23:19:57][C][bme280.sensor:195]:     Unit of Measurement: 'hPa'
[23:19:57][C][bme280.sensor:195]:     Accuracy Decimals: 1
[23:19:57][C][bme280.sensor:196]:     Oversampling: 16x
[23:19:57][C][bme280.sensor:197]:   Humidity 'Humidity'
[23:19:57][C][bme280.sensor:197]:     Device Class: 'humidity'
[23:19:57][C][bme280.sensor:197]:     State Class: 'measurement'
[23:19:57][C][bme280.sensor:197]:     Unit of Measurement: '%'
[23:19:57][C][bme280.sensor:197]:     Accuracy Decimals: 1
[23:19:57][C][bme280.sensor:198]:     Oversampling: 16x
[23:19:57][C][mdns:103]: mDNS:
[23:19:57][C][mdns:104]:   Hostname: garage-door
[23:19:57][C][ota:093]: Over-The-Air Updates:
[23:19:57][C][ota:094]:   Address: garage-door.local:8266
[23:19:57][C][ota:097]:   Using Password.
[23:19:57][C][api:138]: API Server:
[23:19:57][C][api:139]:   Address: garage-door.local:6053
[23:19:57][C][api:141]:   Using noise encryption: YES
[23:20:11][D][sensor:126]: 'Temperature': Sending state 18.06000 °C with 1 decimals of accuracy
[23:20:11][D][sensor:126]: 'Pressure': Sending state 1019.49670 hPa with 1 decimals of accuracy
[23:20:11][D][sensor:126]: 'Humidity': Sending state 37.35449 % with 1 decimals of accuracy
[23:20:21][D][cover:076]: 'esp_garage_door' - Setting
[23:20:21][D][cover:086]:   Command: OPEN
[23:20:21][D][garage:126]: action_open called
[23:20:21][D][main:070]: Template Garage open
[23:20:21][D][cover:170]: 'esp_garage_door' - Publishing:
[23:20:21][D][cover:176]:   State: OPEN
[23:20:21][D][cover:186]:   Current Operation: IDLE
[23:20:25][D][cover:076]: 'esp_garage_door' - Setting
[23:20:25][D][cover:080]:   Command: STOP
[23:20:25][D][garage:138]: action_stop called
[23:20:25][D][main:078]: Template Garage stop
[23:20:25][D][cover:170]: 'esp_garage_door' - Publishing:
[23:20:25][D][cover:176]:   State: OPEN
[23:20:25][D][cover:186]:   Current Operation: IDLE
[23:20:25][D][cover:170]: 'esp_garage_door' - Publishing:
[23:20:25][D][cover:176]:   State: OPEN
[23:20:25][D][cover:186]:   Current Operation: IDLE
[23:20:26][W][garage:106]: garage State changed!
[23:20:26][D][text_sensor:067]: 'esp_garage_door_state': Sending state 'error'
[23:20:40][D][cover:076]: 'esp_garage_door' - Setting
[23:20:40][D][cover:086]:   Command: CLOSE
[23:20:40][D][garage:132]: action_close called
[23:20:40][D][main:074]: Template Garage close
[23:20:40][D][cover:170]: 'esp_garage_door' - Publishing:
[23:20:40][D][cover:178]:   State: CLOSED
[23:20:40][D][cover:186]:   Current Operation: IDLE
[23:20:41][W][garage:106]: garage State changed!
[23:20:41][D][text_sensor:067]: 'esp_garage_door_state': Sending state 'closing'
[23:20:46][W][garage:106]: garage State changed!
[23:20:46][D][text_sensor:067]: 'esp_garage_door_state': Sending state 'closed'
[23:21:01][D][cover:076]: 'esp_garage_door' - Setting
[23:21:01][D][cover:086]:   Command: OPEN
[23:21:01][D][garage:126]: action_open called
[23:21:01][D][main:070]: Template Garage open
[23:21:01][D][cover:170]: 'esp_garage_door' - Publishing:
[23:21:01][D][cover:176]:   State: OPEN
[23:21:01][D][cover:186]:   Current Operation: IDLE
[23:21:06][W][garage:106]: garage State changed!
[23:21:06][D][text_sensor:067]: 'esp_garage_door_state': Sending state 'opening'
[23:21:11][D][sensor:126]: 'Temperature': Sending state 15.95000 °C with 1 decimals of accuracy
[23:21:11][D][sensor:126]: 'Pressure': Sending state 1019.51776 hPa with 1 decimals of accuracy
[23:21:11][D][sensor:126]: 'Humidity': Sending state 43.19824 % with 1 decimals of accuracy
[23:21:16][W][garage:106]: garage State changed!
[23:21:16][D][text_sensor:067]: 'esp_garage_door_state': Sending state 'open'
[23:21:18][D][cover:076]: 'esp_garage_door' - Setting
[23:21:18][D][cover:086]:   Command: CLOSE
[23:21:18][D][garage:132]: action_close called
[23:21:18][D][main:074]: Template Garage close
[23:21:18][D][cover:170]: 'esp_garage_door' - Publishing:
[23:21:18][D][cover:178]:   State: CLOSED
[23:21:18][D][cover:186]:   Current Operation: IDLE
[23:21:21][W][garage:106]: garage State changed!
[23:21:21][D][text_sensor:067]: 'esp_garage_door_state': Sending state 'closing'
[23:21:41][W][garage:106]: garage State changed!
[23:21:41][D][text_sensor:067]: 'esp_garage_door_state': Sending state 'closed'
[23:21:45][D][switch:013]: 'esp_garage_door_venting_position' Turning ON.
[23:21:45][D][garage:144]: action_venting called
[23:21:45][D][switch:056]: 'esp_garage_door_venting_position': Sending state ON
[23:21:46][W][garage:106]: garage State changed!
[23:21:46][D][text_sensor:067]: 'esp_garage_door_state': Sending state 'opening'
[23:21:51][W][garage:106]: garage State changed!
[23:21:51][D][text_sensor:067]: 'esp_garage_door_state': Sending state 'venting'
[23:22:06][D][switch:017]: 'esp_garage_door_venting_position' Turning OFF.
[23:22:06][D][garage:132]: action_close called
[23:22:06][D][switch:056]: 'esp_garage_door_venting_position': Sending state OFF
[23:22:10][W][garage:106]: garage State changed!
[23:22:10][D][text_sensor:067]: 'esp_garage_door_state': Sending state 'closed'
[23:22:11][D][sensor:126]: 'Temperature': Sending state 14.64000 °C with 1 decimals of accuracy
[23:22:11][D][sensor:126]: 'Pressure': Sending state 1019.54077 hPa with 1 decimals of accuracy
[23:22:11][D][sensor:126]: 'Humidity': Sending state 48.10449 % with 1 decimals of accuracy
[23:22:15][D][switch:013]: 'esp_garage_door_light_toggle' Turning ON.
[23:22:15][D][garage:150]: action_toggle_light called
[23:22:15][D][switch:056]: 'esp_garage_door_light_toggle': Sending state ON
[23:22:17][D][switch:017]: 'esp_garage_door_light_toggle' Turning OFF.
[23:22:18][D][switch:056]: 'esp_garage_door_light_toggle': Sending state OFF
[23:22:19][D][switch:013]: 'esp_garage_door_light_toggle' Turning ON.
[23:22:19][D][garage:150]: action_toggle_light called
[23:22:19][D][switch:056]: 'esp_garage_door_light_toggle': Sending state ON
[23:22:21][D][switch:017]: 'esp_garage_door_light_toggle' Turning OFF.
[23:22:21][D][switch:056]: 'esp_garage_door_light_toggle': Sending state OFF
[23:22:23][D][switch:013]: 'esp_garage_door_light_toggle' Turning ON.
[23:22:24][D][garage:150]: action_toggle_light called
[23:22:24][D][switch:056]: 'esp_garage_door_light_toggle': Sending state ON
[23:22:24][D][switch:017]: 'esp_garage_door_light_toggle' Turning OFF.
[23:22:24][D][switch:056]: 'esp_garage_door_light_toggle': Sending state OFF
[23:22:26][D][switch:013]: 'esp_garage_door_light_toggle' Turning ON.
[23:22:26][D][garage:150]: action_toggle_light called
[23:22:26][D][switch:056]: 'esp_garage_door_light_toggle': Sending state ON
[23:22:27][D][switch:017]: 'esp_garage_door_light_toggle' Turning OFF.
[23:22:27][D][switch:056]: 'esp_garage_door_light_toggle': Sending state OFF
[23:22:28][D][switch:013]: 'esp_garage_door_light_toggle' Turning ON.
[23:22:28][D][garage:150]: action_toggle_light called
[23:22:28][D][switch:056]: 'esp_garage_door_light_toggle': Sending state ON
[23:22:29][D][switch:017]: 'esp_garage_door_light_toggle' Turning OFF.
[23:22:29][D][switch:056]: 'esp_garage_door_light_toggle': Sending state OFF
[23:22:31][W][api.connection:083]: ESPHome Logs 2022.12.8 (192.168.1.3): Connection closed
[23:22:38][D][switch:013]: 'esp_garage_door_light_toggle' Turning ON.
[23:22:38][D][garage:150]: action_toggle_light called
[23:22:38][D][switch:056]: 'esp_garage_door_light_toggle': Sending state ON
[23:22:39][D][switch:017]: 'esp_garage_door_light_toggle' Turning OFF.
[23:22:39][D][switch:056]: 'esp_garage_door_light_toggle': Sending state OFF
[23:22:43][D][switch:013]: 'esp_garage_door_light_toggle' Turning ON.
[23:22:43][D][garage:150]: action_toggle_light called
[23:22:43][D][switch:056]: 'esp_garage_door_light_toggle': Sending state ON
[23:22:44][D][switch:017]: 'esp_garage_door_light_toggle' Turning OFF.
[23:22:44][D][switch:056]: 'esp_garage_door_light_toggle': Sending state OFF

1 Like

I’ve just been reading this thread with interest as I’m due to be getting 3 Hormann garage doors - and it’s great to see where we’ve got to. My first thought when I started reading this was that surely a ESP32 would make a better job and avoid the PIC so it’s amazing to see the evolution of this.

I’m not in a position to move forward yet (it’ll be months before my doors are installed) but I just wanted to thank you all in advance for the great work here!

When the time comes, I hope to take this forward a little more and add support for wired ethernet which will hopefully improve reliability (especially the MQTT side). It’s also just occurred to me that I’ll have 3 door motors and that that the ESP32 has 3 hardware UART controllers - you know what I’m thinking, though the cost of this hardware is now so low it’s probably just easier to build 3 (and benefit from some redundancy).

Thanks again for all your work, and I look forward to checking in down the line!

Hey!

An Update from my side. I now have the board integegrated for about two months now and it works great!

I used the MQTT implementation first, however after a week or two it stopped working. I could see the the status updating just fine (if manipulated by my manual open/close switch in the garage) but could not command anything. I feared it would be the weak wifi reception in my garage (I have to install another AP here). However, after I migrated to ESPHome everything works flawless! I even now have the confidence to leave my keys at home when leaving :smiley: (okay, I have a spare set at the friends house).

I will upload the ESPhome Code to my github. It is modified from @lg2dc and now gives Feedback about the actual state, so you can confirm its closed/open via HA.

I still have some tidying up to do (for example to change the behavior of the light from toggle to ON/OFF), so let me know if anyone wants to have it beforehand.

2 Likes

Hi, I am looking for solution on my supramatic HT motor… which one will work (which protokol to use)?