MQTT garage door opener for "SOMMER pro+"

Hi folks,

I created a small Python script running on a Raspberry Pi Zero - yes there is better hardware, but I’m not a skilled programmer :sweat_smile: - to open and close my garage door which is operated by a garage door opener from the company “Sommer”. Here is my code. Feel free to try out and comment :wink:

I’m thinking of doing something similar as I have one of these on the way. How did you power the pi?

I First tried to use an internal power supply (24V) with a step down converter, but the internal power is limited to 0.1A or so. So I use a standard power supply for raspberry.

Ah right. I did wonder/hope the internal power supply was good enough. that being said I’m planning on using a WeMos D1 Mini which draws less power than the Pi. Hopefully I can still use internal.

Thanks for replying :slight_smile:

You are welcome :wink: Have fun setting it up :blush:

Finally done it, after a day of swearing haha. Thought i’d let you know as I found a way to use the internal power supply.

1 Like

Thanks for sharing! I think I will rework my code (Python and Home Assistant integration). Didn’t know that there is a MQTT cover integration …

1 Like

Don’t know if this is still on your radar but thought i’d let you know i’ve been working on this again recently and done some major updates.

Mainly:

  • Moved to a 1 Channel Relay model.
  • Added analog input for Output OC to receive live door status.
  • ArduinoOTA for wireless code updates.
  • Added MQTT config on boot to automatically integrate with Home Assistant.
  • Added availability topic so we can report an offline/unavailable status to Home Assistant.
1 Like

Thanks again for sharing! I also recognized this output module from Sommer but didn’t want to spent the money. So I decided to use a Xiaomi door sensor to keep track of the door status :wink:

1 Like

Did you try and control the door through the wall module terminals on the board (#12)? If so, what was the reason you moved away from this method?

Hi,

No I didn’t try that method. I based my method on the original project by @azrael783 which also did not.

Sounds like a good idea though!

Hi Daniel

This is where I got the conex from:

Thank, found it in Germany as in UK this is not available anymore.

@jampez77 I’m struggling with code compilation

Getting this error ( any tips ?? )

In file included from c:\*****\documents\arduinodata\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.0-newlib4.0.0-gnu23-48f7b08\xtensa-lx106-elf\include\c++\10.2.0\stdlib.h:36,

                 from C:\*****\Documents\ArduinoData\packages\esp8266\hardware\esp8266\3.0.0\cores\esp8266/Arduino.h:27,

                 from sketch\garage_door_sensor.ino.cpp:1:

c:\*****\documents\arduinodata\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.0-newlib4.0.0-gnu23-48f7b08\xtensa-lx106-elf\include\c++\10.2.0\cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory

   41 | #include <bits/c++config.h>

      |          ^~~~~~~~~~~~~~~~~~

compilation terminated.

exit status 1

Error compiling for board LOLIN(WEMOS) D1 mini (clone).

Hmmmm :thinking:

I’m not sure but it’s doesn’t appear to be related to the project itself. It could be something to do with your IDE setup?

The file path being different is a bit odd. Do you have both of these paths? or is one of them incorrect?
from c:\*****\documents\arduinodata\
from C:\*****\Documents\ArduinoData\

I have fixed this by moving from Windows to Mac :slight_smile:

anyway now I have problem with uploading it to WeMos
This is related to known problem on Mac’s with Ardunio not finding USB port

esptool.py v3.0
Serial port /dev/cu.Bluetooth-Incoming-Port
Connecting........_____....._____....._____....._____....._____....._____.....____Traceback (most recent call last):
  File "/Users/Hotest/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.0/tools/upload.py", line 66, in <module>
    esptool.main(cmdline)
  File "/Users/Hotest/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.0/tools/esptool/esptool.py", line 3552, in main
    esp.connect(args.before, args.connect_attempts)
  File "/Users/Hotest/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.0/tools/esptool/esptool.py", line 529, in connect
    raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header

You have the incorrect port selected. If you go to Tools → Port and select your usb port. If you don’t know which one to choose then unplug your device, come off the menu, open it back up again and see which one has disappeared. Then plug it in a select that one.

Do you have a link to the site where you bought it?

Sommer Conex

Thanks! but dang - no shipping to the states - having a real hard time finding one that does.

@jspanitz I know the guy who can probably make that for you for a price and probably ship it to US if you will get desperate.