Control Hörmann doors drives directly via MQTT from Home Assistant

Overview

hoermann_door

Control Hörmann doors drives directly via MQTT from Home Assistant

Inspired by https://blog.bouni.de/2018/reverse-engeneering-the-hormann-uap1-protocoll.html

USE AT YOUR OWN RISK!

Overview

This repo contains the pcb files as well as the software to build an interface device which connects Hörmann door drives like the Supramatic E3 to Home Assistant. The interface device emulates an UAP1 to interact with the door drive. Additionally a BME280 can be connected via I2C to measure temperature, humidity and pressure.

Home Assistant dashboard panel

Folder structure

  • board: The Eagle schematic and board files
  • docs: Documentation
  • esp8266: Arduino project. Communication to Home Assistant via wifi and mqtt
  • homeassistant: configuration snippet for Home Assistant
  • pic16: MPLabX project. Communication with door drive via Hörmann bus

Thing to do first

  1. Get a pcb
    • Optionally, get BME280 sensor pcb
    • Supply pcb with 24V via pins 2 & 3 of J1
    • Check if 5V and 3.3V are fine
  2. Get tools listed below
  3. Rename esp8266/config_template.h to esp8266/config.h and adjust to your environment
  4. Add esp8266 boards to Arduino IDE
    • Open Preferences window
    • Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.
    • Open Boards Manager from Tools > Board menu and find esp8266 platform.
    • Click install button.
    • Select NodeMCU 1.0 (ESP-12E Module) as board
  5. First flashing of esp8266
    • Get a cheap USB-UART converter (like the ones with a CP210x)
    • Connect the converter to SV3 (RX, TX and GND)
    • Short JP1 (Boot mode)
    • Power up board. If board was powered before reset esp8266 by shorting JP2(Reset) for a short time
  6. Flashing pic16
    • Use any Microchip programmer (PICkit3, ICD3, ...)

Used tools

Schematic and board

  • Eagle 7.2.0

ESP8266

  • Arduino IDE 1.8.13
  • USB-UART converter

PIC16

  • MPLabX v5.25
  • XC8 v2.10
  • PICkit3
Comments
  • PCB source

    PCB source

    I've been interrested for a while already in hoermann-hcp protocol, but this seems to be the most closest and finished project to fit my needs. Is there a source where I can get this pcb boards?

    opened by riogrande75 17
  • Boards for sale

    Boards for sale

    I built 2 of these beauties with the boards from stephan192, before I noticed, that they don't work with my SupraMatic E2 doors. Boards are fully assembled, FW is flashed, tested, so you just have to flash ESP32 with your settings again and you are good to go. 20220911_102231

    opened by riogrande75 7
  • Promatic 4 - Bus scan fails

    Promatic 4 - Bus scan fails

    Hi Stephan,

    Sorry for bothering you but i've managed to source the PCB you designed and flashed both the ESP8266 and the PIC16 with your code to get it up and running in combination with my Hormann Promatic 4 door.

    When i connect the PCD to the Hormann BUS:

    • Initially nothing happens
    • After toggling dip switch 8 (bus scan):
    • The PCB is powered
    • ESP8266 connects to the network (can ping the device)
    • Lights on door start flahsing red/green rapidly (is supposed to happen on bus scan)
    • As soon as bus scan finishes PCB loses power

    Seems to my like the PCB is not recognized by the bus scan hence powering down the bus.

    What could go wrong..?

    • is the code not detecting the door?
    • Is my PIC16 not flash succesfully?
    • Something else?

    any suggestions to point me in the right direction would be much appreciated

    Thnx!

    opened by snoekieboe 6
  • Toggle lights

    Toggle lights

    Hi Stephan, First of all thanks for all your nice work. I've managed to get my hand on a PCB made according to your design and it is working like charm.

    I've noticed the presence of a toggle light option in the Pic16 code and was wondering if it is already possible to use this feature through MQTT... could not verify this to be true whilst looking through the esp8266 code.

    Thanks in advance !

    opened by snoekieboe 6
  • Error after upgrading HA

    Error after upgrading HA

    I've updated HA to the latest version, 2021.6.3, now, mqtt can't load due to the following message:

    2021-07-24 11:48:32 ERROR (MainThread) [homeassistant.components.homeassistant] The system cannot restart because the configuration is not valid: Invalid config for [cover.mqtt]: 'position_template' must be set together with 'position_topic'.. Got OrderedDict([('platform', 'mqtt'), ('name', 'garage'), ('command_topic', 'garage/cover/set'), ('state_topic', 'garage/cover/state'), ('qos', 0), ('retain', False), ('payload_open', 'OPEN'), ('payload_close', 'CLOSE'), ('payload_stop', 'STOP'), ('position_open', 100), ('position_closed', 0), ('position_template', '{% if value == "open" %}100{% elif value == "closed" %}0{% else %}10{% endif %}')]). (See ?, line ?).

    Any tips?

    TIA

    opened by i5Js 5
  • Almost working with my SupraMatic E2

    Almost working with my SupraMatic E2

    Hi Stephan,

    Firstly, thanks for your work and your sharing. I discovered that it was possible to draw boards ourself and even ask to build of a small amount of boards from manufacturers or web sites. (Even if I still have to learn a lot before being able to draw a working circuit myself :-D )

    I got a board from a participant to your HA Community Forum thread. My garage door is a SupraMatic E2, as far as I can understand from the Article Number on the motor box.

    The participant was very kind to flash the PIC for me because I don't have any Microchip programmer. And I flashed the ESP myself.

    I can trigger commands: open, close, venting and toggle lights. But the state is not reported, I always get "stopped" in the MQTT topic.

    (The buttons on the motor box, the wall and remotes are still working as before, I do not have the error 6 like in the issue #3, but I don't have any UAP1 currently)

    I'm quite newbie in hardware development and my first tests are with ESP32 dev boards using the esphome.io project. So, to investigate the problem a bit deeper, I moved your code to an esphome project. I had to use a "custom component" as this implementation is not common off course. I succeed to reproduce the same behaviour: sending commands but no state reports.

    I added some logs, especially inside the "parse_input" function, and discovered that the PIC is communicating with the ESP but it always reports 0 in the "state byte".

    Here are the logs:

    [12:32:52][D][garage:223]: parse_input rx_buffer[0] = 85
    [12:32:52][D][garage:224]: parse_input rx_buffer[1] = 0
    [12:32:52][D][garage:225]: parse_input rx_buffer[2] = 2
    [12:32:52][D][garage:226]: parse_input rx_buffer[3] = 0
    [12:32:52][D][garage:227]: parse_input rx_buffer[4] = 0
    [12:32:52][D][garage:228]: parse_input rx_buffer[5] = 87
    [12:32:52][D][garage:229]: parse_input rx_buffer[6] = 0
    [12:32:52][D][garage:236]: parse_input 3 = 0
    [12:32:57][D][garage:223]: parse_input rx_buffer[0] = 85
    [12:32:57][D][garage:224]: parse_input rx_buffer[1] = 0
    [12:32:57][D][garage:225]: parse_input rx_buffer[2] = 2
    [12:32:57][D][garage:226]: parse_input rx_buffer[3] = 0
    [12:32:57][D][garage:227]: parse_input rx_buffer[4] = 0
    [12:32:57][D][garage:228]: parse_input rx_buffer[5] = 87
    [12:32:57][D][garage:229]: parse_input rx_buffer[6] = 0
    [12:32:57][D][garage:236]: parse_input 3 = 0
    

    Do you have an idea of what could be problematic ? Or where I should investigate more ?

    I guess that the problem will be in the PIC code, but I wanted to confirm before going further.

    I can share my esphome project code if it can help. I was planning to share it when it was ready.

    Thanks in advance for your help!

    opened by lg2dc 4
  • AOZ1038PI safe to work with 24V input?

    AOZ1038PI safe to work with 24V input?

    Hello, your project is great and it's exactlhy what I needed for my Hormann doors. I'm trying to reproduce the board, and while browsing for parts, I've noticed that datasheet for AOZ1038PI says "4.5 V to 18 V operating input voltage range". As per the schematic, the input voltage is 24V. Is it safe to operate in that range? Also the 10u C0805 capacitors should be at least 25V I suppose?

    Looking forward for your reply.

    Regards

    opened by mmanchev 2
  • Error

    Error "6." after connecting board to SupraMaticE2

    I recently built this project and I am pretty confident, that everything was soldered together and programmed correctly. Right now, a UAP1 and a button is connected to my SupraMaticE2 - this works so far. As soon as I replace the UAP1 with the board from this project, I get following output on my MQTT server:

    [2021-05-11 16:39:46.695584] garage_links/cover/state stopped
    [2021-05-11 16:39:46.695644] garage_links/sensor/garage/status offline
    

    Unfortunately it does not respony to any of my issued commands:

    [2021-05-11 16:41:12.825838] garage_links/sensor/garage/set CLOSE
    [2021-05-11 16:41:18.133533] garage_links/sensor/garage/set TOGGLE
    [2021-05-11 16:41:59.022011] garage_links/sensor/garage/set OPEN
    [2021-05-11 16:42:01.973374] garage_links/sensor/garage/set OPEN
    
    

    If I want to open close the door manually with the button, I just get fault "6." in the display. This points to a fault on the / open "Schlupftür". But I do not have a "Schlupftür" installed at all and the RJ25 plug with the shorting wire in X30 is placed correctly. As soon as I put UAP1 back in place everything works fine again. Connecting RPi with RS485 and running https://github.com/raintonr/hormann-hcp works too, so I guess the door and control unit are ok.

    Any idea from the specialists on how I could debug here?

    opened by riogrande75 2
  • Board schematic and layout as PDF

    Board schematic and layout as PDF

    Hi,

    would you mind adding the schematic and the layout as PDF files? As Eagle is not open source and I don't want to install it just to look at the schematic it would be handy to have those in PDF.

    opened by Bouni 0
  • Parts substitution & JLCPCB ordering

    Parts substitution & JLCPCB ordering

    I was trying to produce a JLCPCB order list (see attachment), but the following parts are missing and very difficult to find. Are you able to suggest alternatives, or to modify the gerber with some more common ones?

    The following should be ok:

    • MCP1826S-3302E/DB ==> SPX3940AM3-L-3-3/TR
    • ST485BDR ==> ST485EBDR
    • ESP-12eSMD ==> ESP-12F(ESP8266MOD)
    • 100u ==> RVT100UF16V67RV0120

    But I'm having issues with the following:

    • AOZ1283PI Can't be found.

    • SRN6045TA-220M ==> VLS6045EX-221M or VLS6045EX-220M Lower max current, but is it needed? Also, i think this is a mistake; shouldn't the inductor be 22uH, reading on AOZ1283PI datasheet? So maybe VLS6045EX-220M is a better choice.

    • PIC16F15324-I/SL ==> ? Candidates are: PIC16F15325-I/SL but it can't be found PIC16F18326-I/SL but it doesn't have 2 EUSART

    I'm really not an electronic engineer and I don't have the skill to change the PCB, but I think that the buck regolator and PIC really need to be changed with more common ones.

    RS485Interface_top_cpl.csv RS485Interface_top_bom.csv

    opened by pboschi 4
  • Can I Substitute the  PIC16 for a different PIC16?

    Can I Substitute the PIC16 for a different PIC16?

    The chip you use in the design is basically sold out in all normal shops and I was wondering if I could Replace the PIC16F15324-I/SL with the PIC16F15325-I/SL

    Looking at the Datasheet https://ww1.microchip.com/downloads/en/DeviceDoc/PIC16F-LF-1532444-Data-Sheet-DS40001889C.pdf (from https://www.digikey.de/de/products/detail/microchip-technology/PIC16F15324-I-SL/6691276) it seems the only difference is bigger memory. (Not that I really know what I am looking at otherwise)

    I also had to redo the power circuitry for similar reasons and ill upload that in a fork or something once i figure out how to actually use github and that it works.

    opened by Gamogamer 5
Owner
null
Use an esp32 as gateway for the Eqiva Bluetooth smart lock to integrate it in Home Assistant as MQTT lock

esp32-keyble-homeassistant Use an esp32 as gateway for the Eqiva Bluetooth smart lock to integrate it in Home Assistant as MQTT lock Based on the grea

null 8 Nov 22, 2022
Wifi MQTT Data Logging via an esp8266 for the Ikea VINDRIKTNING PM2.5 air quality sensor

MQTT connectivity for the Ikea VINDRIKTNING This repository contains an ESP8266 firmware, which adds MQTT to the Ikea VINDRIKTNING PM2.5 air quality s

Sören Beye 943 Dec 31, 2022
RPI Pico WIFI via ESP-01S, LWESP, FreeRTOS, and MQTT example

RPIPicoRTOSMQTT RPI Pico WIFI via ESP-01S, LWESP, FreeRTOS, and MQTT example Demo code for RPI Pico using ESP-01S for wifi connection over uart. With

Dr Jon Durrant 2 Dec 2, 2021
As a Teaching Assistant, this is a sample project about socket programming for my teaching in a capstone course in NTUST(National Taiwan University of Science and Technology)

socket-programming As a Teaching Assistant, this is a sample project about socket programming for my teaching in a capstone course in NTUST(National T

Chang Wei 2 Oct 26, 2021
An extremely hacky VNC server for WebOS - Works by reading directly from the GPU's framebuffer.

webos-vncserver An extremely hacky VNC server for WebOS - Works by reading directly from the GPU's framebuffer. Requires root privileges.

David Buchanan 21 Nov 25, 2022
A free, offline Pokémon Home alternative for Switch!

Eevee A free, offline Pokémon Home alternative for Switch! Features currently available: Bank Cloning Editing Features planned: Editing LGPE support O

Ben 21 Oct 20, 2022
Freeing the Silvercrest (Lidl/Tuya) Smart Home Gateway from the cloud.

free-your-silvercrest Freeing the Silvercrest (Lidl/Tuya) Smart Home Gateway from the cloud A collection of scripts/programs for freeing your Silvercr

null 140 Jan 2, 2023
Now get your alerts & updates about home, wherever you are, with an SMS on your mobile! All with a simple NodeMCU project!

Now get your alerts & updates about home, wherever you are, with an SMS on your mobile! All with a simple NodeMCU project!

Priyanka Peddinti 2 Oct 20, 2021
Hyelicht is an IoT/embedded project for home decoration/automation.

Hyelicht is an IoT/embedded project for home decoration/automation. Its software allows you to do colorful painting and animations on a LED-b

Eike Hein 107 Dec 23, 2022
Mongoose Embedded Web Server Library - a multi-protocol embedded networking library with TCP/UDP, HTTP, WebSocket, MQTT built-in protocols, async DNS resolver, and non-blocking API.

Mongoose - Embedded Web Server / Embedded Networking Library Mongoose is a networking library for C/C++. It implements event-driven non-blocking APIs

Cesanta Software 9k Jan 1, 2023
A portable MQTT C client for embedded systems and PCs alike.

MQTT-C is an MQTT v3.1.1 client written in C. MQTT is a lightweight publisher-subscriber-based messaging protocol that is commonly used in IoT and net

Liam Bindle 570 Dec 29, 2022
An MQTT-based Virtual Wall for ESP8266 Devices and Gerber files to make the IR hat; this code and board can easily be adapted to be ANY infrared controller/remote!

Roomba-Virtual-Wall-ESP8266-MQTT An MQTT-based Virtual Wall for ESP8266 Devices I made this based off of the IRSend, IRremoteESP8266, and EspMQTTClien

null 8 Sep 20, 2021
WiFi/MQTT Code For the ThingPulse ESPGateway

ESP32-Paxcounter with ThingPulse ESPGateway This project lets you run the ESP32-Paxcounter project on the ThingPulse ESPGateway. The ESPGateway has tw

Daniel Eichhorn 6 Aug 13, 2022
Eclipse Mosquitto - An open source MQTT broker

Mosquitto is an open source implementation of a server for version 5.0, 3.1.1, and 3.1 of the MQTT protocol. It also includes a C and C++ client library, and the mosquitto_pub and mosquitto_sub utilities for publishing and subscribing.

Eclipse Foundation 6.9k Jan 9, 2023
Eclipse Paho C Client Library for the MQTT Protocol

Eclipse Paho C Client Library for the MQTT Protocol This repository contains the source code for the Eclipse Paho MQTT C client library. This code bui

null 2 Apr 27, 2022
Eclipse Paho MQTT C++ Client Library

Eclipse Paho MQTT C++ Client Library This repository contains the source code for the Eclipse Paho MQTT C++ client library on memory-managed operating

Eclipse Foundation 695 Dec 30, 2022
This is a MQTT-enabled, compact weather station powered by a Wemos D1 minicontroller and built with 3D-printed parts

This is a MQTT-enabled, compact weather station powered by a Wemos D1 minicontroller and built with 3D-printed parts. It supports OTA updates.

65397 1 Feb 10, 2022
AWS FreeRTOS MQTT demo project running on the NXP i.MXRT1050-EVKB.

AWS MQTT demo example project Click to import in Keil Studio Cloud: Board: NXP IMXRT1050-EVKB The tables below list the device configuration for this

Arm - Keil tools 1 Oct 18, 2021
Google IOT MQTT Sample

This is an adaptation of Zephyr's Google Cloud IoT Core MQTT sample samples/net/cloud/google_iot_mqtt for the nRF9160-DK, using modem features to offload certificate storage, TLS and JWT calculation.

Jeffrey Urban 5 Jan 27, 2022