Zum Hauptinhalt springen

OpenGarage Smart-Home-Integration, kostenlos und Open Source

OpenGarage-Integration für Gladys Assistant

OpenGarage controllers, locally: garage door, distance, vehicle, Wi-Fi signal.

Info

Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfügbar.

This integration shows your OpenGarage controllers in Gladys and drives your garage door through their local HTTP API, on your network, without the OpenGarage cloud.

Never tested with a real device: the integration follows the firmware API and the open-garage library (the one of Home Assistant), but nobody has tried it on a real controller yet. Your feedback is welcome.

Unofficial integration, not affiliated with OpenGarage.

In Gladys​

FeatureDetail
Garage dooropen / closed (opening sensor, read only)
Open / Closetwo buttons, never a switch
Distance sensorin cm
Vehicle in the garagepresent / absent (unknown while the door is open)
Wi-Fi signalfrom 0 to 5
Temperature, humidityonly when a sensor is fitted to the controller

Setup​

  1. Give each controller a fixed IP address in your router.
  2. In the settings of the controller, change the device key ("opendoor" by default).
  3. In Gladys, install the OpenGarage integration from the store.
  4. Type the IP addresses of the controllers (separated by commas) and the device key (the same for every controller).
  5. Add the devices from the Discovery tab.

Reading the state needs no key; opening and closing do. The key is kept by Gladys in its database, never shown again, sent only to your controllers (in clear on your local network: they have no https). It never appears in the logs, the statuses, the errors nor in /data.

"Check the controllers" shows what each address answered; it never reads a controller sooner than the refresh interval.

Command safety​

The relay of an OpenGarage is a toggle: the same pulse opens a closed door, closes an open one, and stops or reverses a moving one. Gladys takes it into account:

  • The door is never a switch: a "turn everything off" of a voice assistant or a scene cannot reach it. It has two buttons, Open and Close.
  • Open and Close are off by default: turn on "Allow the garage door pulses (open and close)". Closing is the same pulse as opening: on a door that moved since it was read (closed meanwhile with the remote), "Close" would open it. While the permission is off, the doors are only read, and a scene or a voice assistant "close the garage" is refused (nothing is sent). The permission is checked when the command arrives, after the read and right before the request leaves.
  • Before every pulse, Gladys reads the door again and checks the MAC address of the controller (a router giving the IP address to another controller never moves the wrong door). "Open" is only sent to a door read closed, "Close" only to a door read open. Already there: nothing is sent. Moving, stopped half way or unknown: refused.
  • Without Security+, the door comes from the distance sensor: a distance of 0 (no echo) or above 500 cm, or none, freezes the door state in the controller. Gladys then takes the door as unknown and refuses both buttons.
  • Firmware 1.0.7 or later: Gladys sends close=1 or open=1, and the controller checks the door again on its own sensor when the request arrives (it only closes a door it reads open, only opens a door it reads closed). Older: the toggle pulse (click=1), with the same rules; up to 3.5 seconds may pass between the read and the pulse, and if the door moves meanwhile the pulse may stop or reverse it.
  • One command at a time per controller; "Close" cancels, on arrival, an opening that has not left yet. While the controller asks to wait, or after a refused key, both buttons are refused.
  • After a pulse, the next one is refused until a read made after the pulse shows the door where it was sent, and at least 15 seconds after it (45 seconds at most), even after a restart: a second pulse would stop or reverse it. The distance sensor sees the expected state a little before the end of travel (closing, the panel leaves the sensor half way down; opening, it reaches it before the top stop): a pulse right after the guard is lifted may still stop a door finishing its travel. Use the wall button or the remote control to stop it.
  • A command that cannot leave within 3.5 seconds is refused unsent; a command that left without an answer is reported "sent, without confirmation", and the door is read again in the following seconds. A successful command means the controller received it (it answers before acting): the door then takes 10 to 30 seconds to move, up to 40 seconds when the alarm of the controller (5 or 10 seconds of beeps before the relay) is on.
  • The automatic close of the controller (after a delay or at a set time) gives the same pulse: a close from Gladys right after it may stop or reverse the door. Do not double the automatic close of the controller with a Gladys scene at the same time.

Failures​

  • Device key refused by a controller: the pulses of that controller are refused unsent for 15 min, then 1 h, 6 h and 24 h; saving another key tries again at once. The reads go on.
  • A controller that asks to wait (HTTP 429 or 5xx) is paused for one minute to six hours, even after a restart.
  • A controller that does not answer is read again after 30 s, 1, 2 then 5 min, never sooner than the refresh interval. An answer without a readable MAC address counts as a failure, never as another controller.
  • After a restart, Gladys waits a whole interval before reading again; meanwhile the status shows the outcome of the last read.

Limits​

  • No automatic search: type the addresses.
  • One key for every controller.
  • The "sensor 2 only" mode cannot be read from /jc: without a valid distance sensor nor Security+, the door is unknown and the buttons refused.
  • No Security+ light or lock (firmware 1.2.x), no openings counter, no OpenGarage cloud nor MQTT.

Konfigurationseinstellungen​

Diese Einstellungen fragt OpenGarage in seinem Konfigurationsbildschirm in Gladys ab.

EinstellungTypPflichtfeldBeschreibung
Your OpenGarage controllers, on your local networksectionNeinThe door state, the distance sensor, the vehicle detection, the Wi-Fi signal (and the temperature and humidity when a sensor is fitted) of each OpenGarage controller, through its local HTTP API, without the OpenGarage cloud. Give each controller a fixed IP address in your router, type the addresses below, then add them from the Discovery tab. Never tested with a real device. Unofficial integration, not affiliated with OpenGarage.
IP addresses of the controllersstringNeinSeparated by commas, for example 192.168.1.50, 192.168.1.51 (add :port if it is not 80).
Device keysecretNeinThe device key set in the controller ("opendoor" until you change it: change it). The same for every controller. Only needed to open and close. Kept by Gladys in its database, never shown again, sent only to your OpenGarage controllers (in clear on your local network: they have no https).
Refresh interval (s)numberNeinHow often each controller is read, in seconds. Never sooner, even after a restart.
Opening and closingsectionNeinThe door has two buttons, never a switch. The relay of an OpenGarage is a toggle: the same pulse opens a closed door, closes an open one, and stops or reverses a moving one, so closing can open a door that moved since it was read. Both buttons are therefore refused until you allow the pulses below. Gladys reads the door just before each pulse: "Open" only to a door read closed, "Close" only to a door read open; moving, stopped or unknown: refused. From firmware 1.0.7 the controller checks again on its own sensor (open=1 / close=1). After a pulse, the next one waits until the door is read where it was sent, at least 15 s and at most 45 s later. Without the permission, a scene or a voice assistant "close the garage" is refused too.
Allow the garage door pulses (open and close)booleanNeinOff by default: the doors are only read. On: the dashboard, the scenes and the voice assistants can open AND close the garage door (the same pulse).
Language of the feature namesselectNeinUsed for the names of the features added from now on, and for the command errors.

So installierst du OpenGarage in Gladys​

  1. Öffne in Gladys Integrationen: OpenGarage erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
  2. Klicke auf Installieren. Gladys lädt das Docker-Image (ghcr.io/lm1lc3n7/gladys-opengarage:0.1.2) herunter, startet es in einer vom Kern isolierten Sandbox und erzeugt die Oberfläche der Integration (Geräte, Erkennung und Konfiguration).
  3. Öffne den Bildschirm Konfiguration der Integration, fülle die Einstellungen aus und speichere.
  4. Du kannst sie auch direkt über die URL ihres Repositorys installieren: https://github.com/LM1LC3N7/gladys-opengarage.

OpenGarage benötigt Gladys >=5.1.0. Der Katalog in Gladys wird stündlich aktualisiert, eine neue Version ist also spätestens eine Stunde nach ihrer Veröffentlichung verfügbar.

Du nutzt Gladys noch nicht? Es ist kostenlos und Open Source: folge der Installationsanleitung, um loszulegen.

Über externe Integrationen​

OpenGarage ist eine externe Integration: eine Community-Integration, die als Docker-Container verpackt und auf GitHub veröffentlicht wird. Gladys installiert sie mit einem Klick und führt sie in einer vom Kern isolierten Sandbox aus. Sie wird von LM1LC3N7 veröffentlicht und gepflegt, nicht vom Gladys-Kernteam.

Abonniere den Newsletter von Gladys Assistant

Ein paar E-Mails im Monat zu neuen Releases und Neuigkeiten aus dem Projekt. Verschickt von Pierre-Gilles Leymarie, dem Gründer des Projekts. Jederzeit abbestellbar 🙂