Giter Club home page Giter Club logo

hcpbridge's Introduction

HCPBridge

Emuliert ein Hörmann HAP 1 HCP auf dem ESP8622 bzw. ESP32 und Arduino.

Kompatible Torantriebe (HCP2-Bus - Modbus):

  • SupraMatic E/P Serie 4
  • ProMatic Serie 4

Bitte beachten, das Projekt emuliert UAP 1 HCP und ist auch nur mit der Serie 4 kompatibel! Ältere Antriebe als Serie 4 haben eine andere Pinbelegung und ein komplett anderes Protokoll.

Eigentlich war das Ziel, die Steuerung komplett nur mit einem ESP8266 zu realisieren, allerdings gibt es durch die WLAN und TCP/IP-Stackumsetzung Timeoutprobleme, die zum Verbindungsabbruch zwischen dem Antrieb und der Steuerung führen können. Durch die ISR-Version konnte das Problem zwar reduziert aber nicht komplett ausgeschlossen werden. Daher gibt es zwei weitere Versionen, die bisher stabil laufen. Eine Variante nutzt den ESP32 statt ESP8266, welcher über 2 Kerne verfügt und so scheinbar besser mit WLAN-Verbindungsproblemen zurecht kommt. Die andere Option ist ein zweiter MCU, der die MODBUS Simulation übernimmt, sodass sich der ESP8266 nur noch um die Netzwerkkommunikation und das WebInterface kümmern muss.

Funktionen:

  • Abrufen des aktuellen Status (Tor, Licht)
  • Auslösen der Aktionen (Licht an/aus, Tor öffen, schließen, stoppen sowie Lüftungsstellung
  • WebInterface
  • WebService
  • Schalten eines Relais mit der Beleuchtung

WebInterface:

alt text

WebService:

Aktion ausführen

http://[deviceip]/command?action=[id]

Action Beschreibung
0 schließe Tor
1 öffne Tor
2 stoppe Tor
3 Lüftungsstellung
4 1/2 öffnen
5 Lampe an/an

Status abfragen:

http://[deviceip]/status

Response (JSON):

{
 "valid" : true,
 "doorstate" : 1,
 "doorposition" : 0,
 "doortarget" : 0,
 "lamp" : true,
 "debug" : 0,
 "lastresponse" : 0
}

Pinout RS485 (Plug):

alt text

  1. GND (Blue)
  2. GND (Yellow)
  3. B- (Green)
  4. A+ (Red)
  5. +25V (Black)
  6. +25V (White)

RS485 Adapter:

alt text
Zwischen A+ (Red) und B- (Green) ist ein 120 Ohm Widerstand zum terminieren des BUS!

Schaltung

alt text
ESP8266 + Arduino Combo (Bisher stabil, benötigt allerdings zwei MCU)

alt text
ESP32 (Bisher stabil durch Nutzung beider Kerne, 25V auf 5V durch LM2596S DC-DC Step Down Module)

alt text
ESP8266 ISR (instabil!, WLAN-Probleme können die ModBus-Verbindung beenden, dann ist ein Neuanlernen erforderlich)

Installation

alt text

  • Adapter am Bus anschließen (grüner Pfeil)
  • Busscan ausführen (blauer Pfeil auf off und wieder zurück auf off). Der Adapter bekommt erst dann Strom über die 25V Leitung und muss während des Busscans antworten, sonst wird der Strom wieder abgeschaltet. Im Falle eines Fehlers oder wenn der Adapter abgezogen werden soll, einfach die Busscan Prozedur (On/Off) wiederholen.

Changelog

06.03.2021: Neue Version mit Arduino Pro Mini als Co MCU 24.02.2021: Neue Version via Interrupt und für ESP32 zur Vermeidung von Timing-Problemen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.