diff --git a/README.md b/README.md index 00bdaa3..60eb294 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ I offer fully assembled and tested Doorman-S3 units with the [Stock Firmware](fi ## ✔️ Compatibility -If your TCS or Koch intercom has screw terminals labeled `a`, `b`, and `P` and operates on 24V DC, it’s likely compatible with Doorman.\ +If your TCS or Koch intercom has screw terminals labeled `a`, `b`, and `P` and operates on 24V DC, it's likely compatible with Doorman.\ For detailed compatibility information, check out the [Compatibility Docs](https://doorman.azon.ai/guide/hardware-compatibility). ## 🚩 Repository Structure diff --git a/docs/de/guide/getting-started.md b/docs/de/guide/getting-started.md index c82a103..2050703 100644 --- a/docs/de/guide/getting-started.md +++ b/docs/de/guide/getting-started.md @@ -1,8 +1,51 @@ # Erste Schritte -Hier ist eine ausführliche Anleitung, wie du deinen Doorman zum ersten Mal einrichtest. Bitte beachte, dass diese Anweisungen auf dem bereits geflashten Doorman-PCB basieren welches ich verkaufe. +Ist das dein erster Besuch hier? Keine Sorge, wir haben alles für dich vorbereitet! +Unten findest du eine ausführliche Anleitung zur Ersteinrichtung deines Doormans. + +Bitte beachte, dass diese Anweisungen auf dem bereits geflashten Doorman-PCB basieren welches ich verkaufe. +Sofern du selbst ein PCB produzieren lassen hast, musst du zuerst die Firmware flashen. Solltest du dem nicht nachgehen, kannst du lange warten, dass irgendwas von dem unten beschriebenen passiert. 😄 + +**Vielen Dank, dass du Doorman verwendest! ❤️** + +## Verkabelung +Öffne als Erstes das Gehäuse deiner Gegensprechanlage. In den meisten Fällen findest du dort eine Schraubklemme mit den Bezeichnungen `a`, `b`, `E` und `P`. + +Schließe die `b`-Leitung (Ground) an einen der TCS:BUS-Anschlüsse deines Doorman an und die `a`-Leitung (24V Bus) an den anderen TCS:BUS-Anschluss deines Doorman. + +### Stromversorgungsoptionen: +::: details 3-Draht-Modus über die Gegensprechanlage +Verbinde die `P`-Leitung (+24V) mit dem `P`-Terminal an deinem Doorman. + +> [!WARNING] +> Die Stromversorgung der Gegensprechanlage muss mindestens 60mA liefern. + +Beispiel: +![3-wire](./images/3wire.png){width=300px} +::: + +::: details 2-Draht-Modus über externe Stromversorgung +Schließe die externe Stromversorgung an deinen Doorman an. Nutze dazu die `P` (+5V bis +30V) und `G` (Ground) Schraubklemmen an deinem Doorman. + +Beispiel: +![2-wire external via screw terminal](./images/2wire_power_screwterminal.png){width=300px} +::: + +::: details 2-Draht-Modus über externe USB-C-Stromversorgung +Schließe die externe Stromversorgung über den USB-C-Anschluss an. + +Beispiel: +![2-wire external via usb](./images/2wire_power_usb_c.png){width=300px} +::: + +::: details 2-Draht-Modus über die Gegensprechanlage +> [!DANGER] Das ist leider nicht möglich! +> Die Nutzung der `a`-Bus-Leitung als Stromquelle führt zu einem lauten Piepton. Dieses Problem tritt wahrscheinlich aufgrund der Hochfrequenz-Schaltstromversorgung auf und könnte in zukünftigen Hardware-Versionen behoben werden. + +Beispiel: +![2-wire external via usb](./images/2wire_power_a_terminal.png){width=300px} +::: -Danke, dass du Doorman verwendest! ❤️ ## Einrichtung @@ -22,27 +65,34 @@ Dank mDNS-Unterstützung wird Home Assistant deinen Doorman automatisch entdecke ![Home Assistant Discovery](./images/discovery.png) ### Schritt 2: Mit Home Assistant verbinden -Nachdem du den Doorman mit deinem Netzwerk verbunden hast, wird er langsam (blau) blinken und sollte automatisch von Home Assistant entdeckt werden. Klicke einfach auf `Konfigurieren`, um das neu entdeckte ESPHome-Gerät hinzuzufügen. +Nachdem du deinen Doorman mit deinem Netzwerk verbunden hast, wird die RGB Status LED langsam (blau) blinken. Er sollte automatisch von Home Assistant entdeckt werden. Klicke einfach auf `Konfigurieren`, um das neu entdeckte ESPHome-Gerät hinzuzufügen. + +Falls nicht, kannst du ihn manuell per IP Addresse hinzufügen. + +Nach erfolgreicher Verbindung leuchtet er für 3 sekunden lang durchgehend blau. -### Schritt 3: Bus-Befehle -::: warning Bevor du weiter machst -Du musst deinen Doorman zuerst mit der Gegensprechanlage verbinden. Sieh dir hierfür den Bereich [Verkabelung](#verkabelung) für detaillierte Anweisungen an. +### Schritt 3: Bus-Befehle konfigurieren +::: tip +Nachdem du deinen Doorman mit Home Assistant verbunden hast,\ +startet automatisch der `Interactive Setup`-Prozess, der weiter unten beschrieben ist. + +Du musst ihn nicht manuell starten; er wird bei jedem Neustart automatisch gestartet, solange der Prozess nicht abgeschlossen oder abgebrochen wurde. ::: -#### Easy Setup -Um die Konfiguration der wichtigsten Befehle zu erleichtern, kannst du den Easy Setup-Prozess nutzen. +#### Interactive Setup +Um die Konfiguration der wichtigsten Befehle zu erleichtern, kannst du den Interactive Setup-Prozess nutzen. Greif entweder auf den internen Webserver deines Doormans zu oder besuche die [ESPHome Integrationsseite](https://my.home-assistant.io/redirect/integration/?domain=esphome) und wähle das neu aufgeführte Doorman S3-Gerät aus. -In `Konfiguration`-Bereich findest du den Button `Easy Setup: Start`. Klicke darauf, um den Einrichtungsprozess zu starten. +In `Konfiguration`-Bereich findest du den Button `Interactive Setup: Start`. Klicke darauf, um den Einrichtungsprozess zu starten. -Sobald der Prozess begonnen hat, wird der `Easy Setup: Status` Text Sensor dich durch die erforderlichen Schritte führen (z.B. Knopf X drücken, warten oder das Telefon abheben).\ -Während der Einrichtung pulsiert die RGB-Status-LED rot, solange du die Aufgabe noch nicht abgeschlossen hast, und bleibt 3 Sekunden lang rot, nachdem der Befehl gespeichert wurde. +Sobald der Prozess begonnen hat, wird der `Interactive Setup: Status` Text Sensor dich durch die erforderlichen Schritte führen (z.B. Knopf X drücken, warten oder das Telefon abheben).\ +Während der Einrichtung pulsiert die RGB-Status-LED grün-türkis, solange du die Aufgabe noch nicht abgeschlossen hast, und bleibt 3 Sekunden lang grün-türkis, nachdem der Befehl gespeichert wurde. Nach Abschluss der Einrichtung endet der Prozess automatisch und zeigt den entsprechenden Status an. #### Manuell: No pain, no gain! -Du findest auch einen `Last Bus Command` Text Sensor, der den letzten Bus-Befehl im Hexadezimalformat anzeigt. +Du findest auch den guten alten `Last Bus Command` Text Sensor, der den letzten Bus-Befehl im Hexadezimalformat anzeigt. Außerdem wird jeder empfangene Befehl in der ESPHome-Konsole (Debug-Log-Ebene) protokolliert und als Home Assistant-Ereignis veröffentlicht. Um die Codes zu erfassen, drücke die Tasten an deinem Etagen-Telefon und kopiere die Codes anschließend in die entsprechenden Konfigurationstextfelder. @@ -78,43 +128,4 @@ wifi: ssid: !secret wifi_ssid password: !secret wifi_password ``` -::: - - -## Verkabelung -Öffne als Erstes das Gehäuse deiner Gegensprechanlage. In den meisten Fällen findest du dort eine Schraubklemme mit den Bezeichnungen `a`, `b`, `E` und `P`. - -Schließe die `b`-Leitung (Ground) an einen der TCS:BUS-Anschlüsse deines Doorman an und die `a`-Leitung (24V Bus) an den anderen TCS:BUS-Anschluss deines Doorman. - -### Stromversorgungsoptionen: -::: details 3-Draht-Modus über die Gegensprechanlage -Verbinde die `P`-Leitung (+24V) mit dem `P`-Terminal an deinem Doorman. - -> [!WARNING] -> Die Stromversorgung der Gegensprechanlage muss mindestens 60mA liefern. - -Beispiel: -![3-wire](./images/3wire.png){width=300px} -::: - -::: details 2-Draht-Modus über externe Stromversorgung -Schließe die externe Stromversorgung an deinen Doorman an. Nutze dazu die `P` (+5V bis +30V) und `G` (Ground) Schraubklemmen an deinem Doorman. - -Beispiel: -![2-wire external via screw terminal](./images/2wire_power_screwterminal.png){width=300px} -::: - -::: details 2-Draht-Modus über externe USB-C-Stromversorgung -Schließe die externe Stromversorgung über den USB-C-Anschluss an. - -Beispiel: -![2-wire external via usb](./images/2wire_power_usb_c.png){width=300px} -::: - -::: details 2-Draht-Modus über die Gegensprechanlage -> [!DANGER] Das ist leider nicht möglich! -> Die Nutzung der `a`-Bus-Leitung als Stromquelle führt zu einem lauten Piepton. Dieses Problem tritt wahrscheinlich aufgrund der Hochfrequenz-Schaltstromversorgung auf und könnte in zukünftigen Hardware-Versionen behoben werden. - -Beispiel: -![2-wire external via usb](./images/2wire_power_a_terminal.png){width=300px} ::: \ No newline at end of file diff --git a/docs/de/guide/hardware-compatibility.md b/docs/de/guide/hardware-compatibility.md index eca0edb..1e4f60a 100644 --- a/docs/de/guide/hardware-compatibility.md +++ b/docs/de/guide/hardware-compatibility.md @@ -1,4 +1,4 @@ -### Kann ich Doorman benutzen? +# Kann ich Doorman benutzen? Wenn deine [TCS](https://www.tcsag.de/) oder [Koch](https://www.kochag.ch/) Gegensprechanlage die Anschlussklemmen `a`, `b` und `P` hat und mit 24V DC betrieben wird, ist sie wahrscheinlich kompatibel. @@ -22,15 +22,17 @@ Wenn deine Gegensprechanlage im 2-Draht-Modus angeschlossen ist und du keine sep Wenn sie im 3-Draht-Modus angeschlossen ist, solltest du in den meisten Fällen die `P`-Leitung zur Stromversorgung vom Doorman nutzen können. ::: tip -In einigen Installationen sind die `a`- und `b`-Drähte verdreht, aber das wird von Doormans integriertem Brückengleichrichter berücksichtigt. Berücksichtige dies beim Überprüfen der Spannung auf den Leitungen `a`, `b` und `P`. +Bei einigen Installationen sind die `a`- und `b`-Drähte verdreht, das wird aber von dem integriertem Brückengleichrichter korrigiert. + +Berücksichtige dies beim Überprüfen der Spannung auf den Leitungen `a`, `b` und `P`. ::: #### Erklärung der Gegensprechanlagen-Anschlussklemmen -- **a:** Typischerweise die Bus-Leitung (+24V) -- **b:** Typischerweise Ground -- **P:** Die +24V-Leitung im 3-Draht-Modus oder der Klingelknopf der Wohnung im 2-Draht-Modus +- **a:** In der Regel die Bus-Leitung (+24V) +- **b:** Normalerweise Ground +- **P:** Entweder die +24V-Leitung im 3-Draht-Modus oder der Klingelknopf der Wohnung im 2-Draht-Modus. Oftmals gibt es trotzdem eine 24V Leitung irgendwo versteckt. -::: danger +::: danger VORSICHT **NICHT GLEICHZEITIG DIE +24V `P`-LEITUNG UND USB-C VERWENDEN** ::: diff --git a/docs/de/guide/support/support.md b/docs/de/guide/support/support.md index b59a089..06e1150 100644 --- a/docs/de/guide/support/support.md +++ b/docs/de/guide/support/support.md @@ -17,6 +17,10 @@ If you've received a Doorman-S3 PCB that hasn't been pre-flashed with the [Stock To resolve this, hold down the button labeled `FLASH` while connecting the USB cable to your computer. This will put the ESP into bootloader mode, preventing it from constantly restarting. ::: +::: details A loud beeping noise occurs on the phone +Please take a look [here](../hardware-compatibility#bekannte-probleme). +::: + ::: details Home Assistant can't connect / BAD_INDICATOR errno=11 If Home Assistant can't connect to your Doorman, or you are receiving the error Reading failed: BAD_INDICATOR errno=11 in the logs, this indicates Home Assistant may be trying to connect with an incorrect encryption key. @@ -37,7 +41,7 @@ If your Doorman is unable to receive commands there could be several reasons. #### Check the wiring Please make sure you wired everything correctly.\ -You can find the guide [here](../getting-started#wiring). +You can find the guide [here](../getting-started#verkabelung). #### Check the Bus voltage There are cases where the bus voltage is inusfficient and causing the reading to fail.\ diff --git a/docs/de/reference/entities.md b/docs/de/reference/entities.md index 83b2f79..9101872 100644 --- a/docs/de/reference/entities.md +++ b/docs/de/reference/entities.md @@ -54,8 +54,8 @@ Meldet den Türsensorstatus des gekoppelten Nuki Smart Locks. ## Text Sensors -### Easy Setup: Status -Zeigt den aktuellen Status vom [Easy Setup](../guide/getting-started#easy-setup) Prozess an. +### Interactive Setup: Status +Zeigt den aktuellen Status vom [Interactive Setup](../guide/getting-started#interactive-setup) Prozess an. ## Schalter @@ -84,11 +84,11 @@ Steuert den Nuki Kopplungsmodus. ### Turn on the light Schaltet das Licht ein, indem der Befehl `turn_on_light_command` auf dem Bus gesendet wird. -### Easy Setup: Start -Startet den [Easy Setup](../guide/getting-started#easy-setup) Prozess um Bus Commands einzurichten. +### Interactive Setup: Start +Startet den [Interactive Setup](../guide/getting-started#interactive-setup) Prozess um Bus Commands einzurichten. -### Easy Setup: Cancel -Beendet den [Easy Setup](../guide/getting-started#easy-setup) Prozess. +### Interactive Setup: Cancel +Beendet den [Interactive Setup](../guide/getting-started#interactive-setup) Prozess. ### Nuki Unpair Device Entkoppelt dein Nuki Smart Lock. diff --git a/docs/en/guide/getting-started.md b/docs/en/guide/getting-started.md index b7afa14..6298de3 100644 --- a/docs/en/guide/getting-started.md +++ b/docs/en/guide/getting-started.md @@ -1,8 +1,50 @@ -# Getting started +# Getting Started -Here is a detailed guide on setting up your Doorman for the first time. Please note that these instructions are based on the pre-flashed Doorman PCB that I sell. +Is this your first time here? Don't worry, we've got you covered! +Below, you'll find a detailed guide for setting up your Doorman for the first time. + +Please note that these instructions are based on the pre-flashed Doorman PCB that I sell. If you've had a PCB manufactured yourself, make sure to flash the firmware first; otherwise, you might be waiting a long time for anything described below to happen. 😄 + +**Thank you so much for using Doorman! ❤️** + +## Wiring +First, open your intercom enclosure. On most models, you will find a screw terminal labeled with `a`, `b`, `E`, and `P`. + +Connect the `b` line (Ground) to one of the TCS:BUS terminals on your Doorman, and connect the `a` line (24V Bus) to the other TCS:BUS terminal on your Doorman. + +### Power supply options: +::: details 3-Wire Mode via intercom +Connect the `P` line (+24V) to the `P` terminal on your Doorman. + +> [!WARNING] +> The intercom power supply must provide at least 60mA. + +Example: +![3-wire](./images/3wire.png){width=300px} +::: + +::: details 2-Wire Mode via external wired Power Supply +Connect the external power supply to your Doorman using the `P` (+5V to +30V) and `G` (Ground) screw terminals. + +Example: +![2-wire external via screw terminal](./images/2wire_power_screwterminal.png){width=300px} +::: + +::: details 2-Wire Mode via external USB-C Power Supply +Connect the external power supply via the USB-C port. + +Example: +![2-wire external via usb](./images/2wire_power_usb_c.png){width=300px} +::: + +::: details 2-Wire Mode via intercom +> [!DANGER] Unfortunately this scenario is not possible! +> Using the `a`-bus line as a power source results in a loud beeping noise. This issue is likely due to the high-frequency switching power supply and may be addressed in future hardware revisions. + +Example: +![2-wire external via usb](./images/2wire_power_a_terminal.png){width=300px} +::: -Thank you for using Doorman! <3 ## Setup @@ -12,7 +54,7 @@ When you power on your Doorman-S3 for the first time, it will blink rapidly (ora The Access Point password is `open-sesame`. Once connected to the Access Point, the web interface should open automatically (see also login to network notifications).\ -If it doesn’t, you can manually navigate to http://192.168.4.1/ in your browser. +If it doesn't, you can manually navigate to http://192.168.4.1/ in your browser. ::: tip You can take advantage of automatic setup in Home Assistant if your Home Assistant has Bluetooth enabled. @@ -25,24 +67,26 @@ Additionally, with mDNS support, Home Assistant will automatically discover your After connecting Doorman to your network, it will blink slowly (blue) and should be automatically discovered by Home Assistant. Simply click on `Configure` to add the newly discovered ESPHome node. ### Step 3: Bus Commands -::: warning Before proceeding -You need to connect your Doorman to the intercom. Please refer to the [Wiring](#wiring) section for detailed instructions. +::: tip +After connecting your Doorman to Home Assistant, the `Interactive Setup` Process will automatically begin as described below. + +There's no need to start it manually; it will initiate automatically on every restart, provided the process hasn't been completed or canceled. ::: -#### Easy Setup -To simplify the configuration of the key commands, you can use the Easy Setup Process. +#### Interactive Setup +To simplify the configuration of the key commands, you can use the Interactive Setup Process. To get started, either access the internal web server of your Doorman or visit the [ESPHome Integration page](https://my.home-assistant.io/redirect/integration/?domain=esphome) and select the newly listed Doorman S3 device entry. -In the `Configuration` section, you will find the `Easy Setup: Start` button. Click this button to initiate the setup process. +In the `Configuration` section, you will find the `Interactive Setup: Start` button. Click this button to initiate the setup process. -Once started, the `Easy Setup: Status` Text Sensor will guide you through the required steps (e.g., press button X, wait, or pick up the phone).\ -During the setup, the RGB Status LED will pulse red while waiting for you to complete each task and will remain solid red for 3 seconds after saving the command. +Once started, the `Interactive Setup: Status` Text Sensor will guide you through the required steps (e.g., press button X, wait, or pick up the phone).\ +During the setup, the RGB Status LED will pulse green-turquoise while waiting for you to complete each task and will remain solid green-turquoise for 3 seconds after saving the command. After the setup is complete, the process will automatically end and display the corresponding status. #### Manual: No pain, no gain! -You will also find a `Last Bus Command` Text Sensor that tracks the most recent bus command in hexadecimal format. +You will also find the good old `Last Bus Command` Text Sensor that tracks the most recent bus command in hexadecimal format. Additionally, each received command is logged in the ESPHome Console (at the Debug log level) and published as a Home Assistant event. To capture the codes, press the buttons on your intercom phone and then copy the codes into the corresponding configuration text inputs. @@ -79,43 +123,4 @@ wifi: ssid: !secret wifi_ssid password: !secret wifi_password ``` -::: - - -## Wiring -First, open your intercom enclosure. On most models, you will find a screw terminal labeled with `a`, `b`, `E`, and `P`. - -Connect the `b` line (Ground) to one of the TCS:BUS terminals on your Doorman, and connect the `a` line (24V Bus) to the other TCS:BUS terminal on your Doorman. - -### Power supply options: -::: details 3-Wire Mode via intercom -Connect the `P` line (+24V) to the `P` terminal on your Doorman. - -> [!WARNING] -> The intercom power supply must provide at least 60mA. - -Example: -![3-wire](./images/3wire.png){width=300px} -::: - -::: details 2-Wire Mode via external wired Power Supply -Connect the external power supply to your Doorman using the `P` (+5V to +30V) and `G` (Ground) screw terminals. - -Example: -![2-wire external via screw terminal](./images/2wire_power_screwterminal.png){width=300px} -::: - -::: details 2-Wire Mode via external USB-C Power Supply -Connect the external power supply via the USB-C port. - -Example: -![2-wire external via usb](./images/2wire_power_usb_c.png){width=300px} -::: - -::: details 2-Wire Mode via intercom -> [!DANGER] Unfortunately this scenario is not possible! -> Using the `a`-bus line as a power source results in a loud beeping noise. This issue is likely due to the high-frequency switching power supply and may be addressed in future hardware revisions. - -Example: -![2-wire external via usb](./images/2wire_power_a_terminal.png){width=300px} ::: \ No newline at end of file diff --git a/docs/en/guide/hardware-compatibility.md b/docs/en/guide/hardware-compatibility.md index 5d8438f..c0acb75 100644 --- a/docs/en/guide/hardware-compatibility.md +++ b/docs/en/guide/hardware-compatibility.md @@ -23,7 +23,7 @@ If your intercom is connected in 2-wire mode and you don't have a separate 24V ` If connected in 3-wire mode, you should be able to use the `P`-line to power your Doorman in most cases. ::: tip -In some installations, the `a` and `b` wires are twisted, but this is handled by Doorman’s integrated bridge rectifier. Consider this when checking the voltage levels on the `a`, `b`, and `P` lines. +In some installations, the `a` and `b` wires are twisted, but this is handled by Doorman's integrated bridge rectifier. Consider this when checking the voltage levels on the `a`, `b`, and `P` lines. ::: #### Intercom Screw Terminal Explanation @@ -49,7 +49,7 @@ The intercom power supply **must have a minimum output current of 60mA** for sta If other devices using the `P`-line draw too much current, it may not be sufficient to power Doorman. -**Use an external power supply (USB-C or screw terminal) if your intercom’s power supply provides less than 60mA or if you notice unstable operation.** +**Use an external power supply (USB-C or screw terminal) if your intercom's power supply provides less than 60mA or if you notice unstable operation.** ::: ## Known Issues @@ -67,7 +67,7 @@ A loud beeping noise occurs whenever someone is talking. ## Verified Hardware ::: info Note -If your intercom phone isn't listed here, it doesn’t necessarily mean it’s incompatible; it simply means it hasn’t been tested yet. +If your intercom phone isn't listed here, it doesn't necessarily mean it's incompatible; it simply means it hasn't been tested yet. ::: - TCS BVS20-SG / Koch BVS20 diff --git a/docs/en/guide/support/support.md b/docs/en/guide/support/support.md index b59a089..c74fd7a 100644 --- a/docs/en/guide/support/support.md +++ b/docs/en/guide/support/support.md @@ -17,6 +17,10 @@ If you've received a Doorman-S3 PCB that hasn't been pre-flashed with the [Stock To resolve this, hold down the button labeled `FLASH` while connecting the USB cable to your computer. This will put the ESP into bootloader mode, preventing it from constantly restarting. ::: +::: details A loud beeping noise occurs on the phone +Please take a look [here](../hardware-compatibility#known-issues). +::: + ::: details Home Assistant can't connect / BAD_INDICATOR errno=11 If Home Assistant can't connect to your Doorman, or you are receiving the error Reading failed: BAD_INDICATOR errno=11 in the logs, this indicates Home Assistant may be trying to connect with an incorrect encryption key. diff --git a/docs/en/guide/what-is-doorman.md b/docs/en/guide/what-is-doorman.md index 83b4bfa..a8ea44d 100644 --- a/docs/en/guide/what-is-doorman.md +++ b/docs/en/guide/what-is-doorman.md @@ -5,7 +5,7 @@ Doorman allows you to connect your [TCS](https://www.tcsag.de/) or [Koch](https://www.kochag.ch/) intercom to any home automation system. Additionally, some rebranded [Niko](https://www.niko.eu/) and [Scantron](https://scantron.dk/) intercoms are counterparts to the TCS and Koch models. ### What about other intercoms? -Doorman isn’t limited to TCS or Koch intercoms.\ +Doorman isn't limited to TCS or Koch intercoms.\ You can use it to simulate a button press to trigger a door opener or light with the integrated solid-state relay (up to 40V, max 2.5A). If your intercom operates on a 2-wire bus within the 14-24V DC range, it might be possible to implement other protocols as well. diff --git a/docs/en/reference/entities.md b/docs/en/reference/entities.md index 4c7869d..3532a9f 100644 --- a/docs/en/reference/entities.md +++ b/docs/en/reference/entities.md @@ -54,8 +54,8 @@ Reports the door sensor state of the paired Nuki smart lock. ## Text Sensors -### Easy Setup: Status -Shows the current state of [Easy Setup](../guide/getting-started#easy-setup) for Commands. +### Interactive Setup: Status +Shows the current state of [Interactive Setup](../guide/getting-started#interactive-setup) for Commands. ## Switches @@ -84,11 +84,11 @@ Opens the second door by sending the `open_second_door_command` command on the B ### Turn on the light Turns on the light by sending the `turn_on_light_command` command on the Bus. -### Easy Setup: Start -Starts the [Easy Setup](../guide/getting-started#easy-setup) Process to interactively setup bus commands. +### Interactive Setup: Start +Starts the [Interactive Setup](../guide/getting-started#interactive-setup) Process to interactively setup bus commands. -### Easy Setup: Cancel -Cancels the [Easy Setup](../guide/getting-started#easy-setup) Process. +### Interactive Setup: Cancel +Cancels the [Interactive Setup](../guide/getting-started#interactive-setup) Process. ### Nuki Unpair Device Unpairs your Nuki smart lock. diff --git a/docs/lunaria.config.json b/docs/lunaria.config.json index e0558b3..1df4a7e 100644 --- a/docs/lunaria.config.json +++ b/docs/lunaria.config.json @@ -2,7 +2,9 @@ "$schema": "./node_modules/@lunariajs/core/config.schema.json", "repository": { "name": "AzonInc/doorman", - "rootDir": "docs" + "rootDir": "docs", + "branch": "master", + "hosting": "github" }, "files": [ { diff --git a/firmware/base.yaml b/firmware/base.yaml index 33660e3..c819a1a 100644 --- a/firmware/base.yaml +++ b/firmware/base.yaml @@ -2,7 +2,7 @@ substitutions: name: "doorman-s3" friendly_name: "Doorman S3" - log_level: "ERROR" + log_level: "INFO" # Hardware Configuration led_pin: "GPIO1" @@ -51,7 +51,12 @@ globals: restore_value: true initial_value: '0x1200' - - id: easy_setup_step + - id: initial_setup_done + type: bool + restore_value: yes + initial_value: "false" + + - id: interactive_setup_step type: std::string restore_value: no initial_value: '""' @@ -94,21 +99,35 @@ esphome: - light.turn_on: id: doorman_rgb_status_led effect: slow_pulse - red: 9% - green: 74% - blue: 95% + red: 0% + green: 22% + blue: 100% - wait_until: condition: api.connected: - light.turn_on: id: doorman_rgb_status_led effect: none - red: 9% - green: 74% - blue: 95% + red: 0% + green: 22% + blue: 100% color_brightness: 60% - delay: 3s - script.execute: update_led + - delay: 2s + - if: + condition: + # Ignore initial setup if something is already set + - lambda: |- + return + id(initial_setup_done) == false && + apartment_doorbell_command == 0 && + entrance_doorbell_command == 0 && + pick_up_phone_command == 0 && + ring_to_open_toggle_command == 0; + then: + - button.press: doorman_interactive_setup_start + # Enable logging logger: @@ -162,19 +181,19 @@ tcs_intercom: id: last_bus_command name: "Last Bus Command" on_value: - # Easy Setup running + # Interactive Setup running - if: condition: - - lambda: return id(easy_setup_step) != ""; + - lambda: return id(interactive_setup_step) != ""; then: - lambda: |- - ESP_LOGI("MAIN", "Setup: Current Step: %s", id(easy_setup_step).c_str()); + ESP_LOGI("MAIN", "Setup: Current Step: %s", id(interactive_setup_step).c_str()); # Step: first_door_opener_command - if: condition: - lambda: |- - return id(easy_setup_step) == "first_door_opener_command"; + return id(interactive_setup_step) == "first_door_opener_command"; then: # Save Command - lambda: |- @@ -183,10 +202,10 @@ tcs_intercom: number = std::stoul(x.c_str(), nullptr, 16); } id(first_door_opener_command) = number; - ESP_LOGI("MAIN", "Setup: Saved Step: %s", id(easy_setup_step).c_str()); + ESP_LOGI("MAIN", "Setup: Saved Step: %s", id(interactive_setup_step).c_str()); # LED State - script.execute: - id: easy_setup_next + id: interactive_setup_next next_step: "ring_to_open_toggle_command" text: "Press the 'Function (Circle)' Button" first_step: false @@ -200,7 +219,7 @@ tcs_intercom: { str.erase(4); // Ingore system commands } - return id(easy_setup_step) == "ring_to_open_toggle_command" && str != "0000"; + return id(interactive_setup_step) == "ring_to_open_toggle_command" && str != "0000"; then: # Save Command - lambda: |- @@ -209,10 +228,10 @@ tcs_intercom: number = std::stoul(x.c_str(), nullptr, 16); } id(ring_to_open_toggle_command) = number; - ESP_LOGI("MAIN", "Setup: Saved Step: %s", id(easy_setup_step).c_str()); + ESP_LOGI("MAIN", "Setup: Saved Step: %s", id(interactive_setup_step).c_str()); # LED State - script.execute: - id: easy_setup_next + id: interactive_setup_next next_step: "pick_up_phone_command" text: "Pick up the phone" first_step: false @@ -226,7 +245,7 @@ tcs_intercom: { str.erase(4); // Ingore system commands } - return id(easy_setup_step) == "pick_up_phone_command" && str != "0000"; + return id(interactive_setup_step) == "pick_up_phone_command" && str != "0000"; then: # Save Command - lambda: |- @@ -235,10 +254,10 @@ tcs_intercom: number = std::stoul(x.c_str(), nullptr, 16); } id(pick_up_phone_command) = number; - ESP_LOGI("MAIN", "Setup: Saved Step: %s", id(easy_setup_step).c_str()); + ESP_LOGI("MAIN", "Setup: Saved Step: %s", id(interactive_setup_step).c_str()); # LED State - script.execute: - id: easy_setup_next + id: interactive_setup_next next_step: "apartment_doorbell_command" text: "Press the 'Apartment Doorbell' Button" first_step: false @@ -252,7 +271,7 @@ tcs_intercom: { str.erase(4); // Ingore system commands } - return id(easy_setup_step) == "apartment_doorbell_command" && str != "0000"; + return id(interactive_setup_step) == "apartment_doorbell_command" && str != "0000"; then: # Save Command - lambda: |- @@ -261,10 +280,10 @@ tcs_intercom: number = std::stoul(x.c_str(), nullptr, 16); } id(apartment_doorbell_command) = number; - ESP_LOGI("MAIN", "Setup: Saved Step: %s", id(easy_setup_step).c_str()); + ESP_LOGI("MAIN", "Setup: Saved Step: %s", id(interactive_setup_step).c_str()); # LED State - script.execute: - id: easy_setup_next + id: interactive_setup_next next_step: "entrance_doorbell_command" text: "Press the 'Entrance Doorbell' Button" first_step: false @@ -278,7 +297,7 @@ tcs_intercom: { str.erase(4); // Ingore system commands } - return id(easy_setup_step) == "entrance_doorbell_command" && str != "0000"; + return id(interactive_setup_step) == "entrance_doorbell_command" && str != "0000"; then: # Save Command - lambda: |- @@ -287,10 +306,10 @@ tcs_intercom: number = std::stoul(x.c_str(), nullptr, 16); } id(entrance_doorbell_command) = number; - ESP_LOGI("MAIN", "Setup: Saved Step: %s", id(easy_setup_step).c_str()); + ESP_LOGI("MAIN", "Setup: Saved Step: %s", id(interactive_setup_step).c_str()); # LED State - script.execute: - id: easy_setup_next + id: interactive_setup_next next_step: "complete" text: "Setup complete" first_step: false @@ -377,24 +396,24 @@ button: entity_category: CONFIG disabled_by_default: true - # Easy Setup + # Interactive Setup - platform: template - id: doorman_easy_setup_start - name: "Easy Setup: Start" + id: doorman_interactive_setup_start + name: "Interactive Setup: Start" on_press: - script.execute: - id: easy_setup_next + id: interactive_setup_next next_step: "first_door_opener_command" text: "Press the 'Door Opener (Key)' Button" first_step: true entity_category: CONFIG - platform: template - id: doorman_easy_setup_cancel - name: "Easy Setup: Cancel" + id: doorman_interactive_setup_cancel + name: "Interactive Setup: Cancel" on_press: - script.execute: - id: easy_setup_next + id: interactive_setup_next next_step: "complete" text: "Setup complete" first_step: false @@ -421,7 +440,7 @@ button: - platform: template id: turn_on_light name: "Turn on the light" - icon: mdi:light + icon: mdi:lightbulb-on on_press: - tcs_intercom.send: command: !lambda "return id(turn_on_light_command);" @@ -885,8 +904,8 @@ text: text_sensor: - platform: template - id: doorman_easy_setup_step - name: "Easy Setup: Status" + id: doorman_interactive_setup_step + name: "Interactive Setup: Status" entity_category: CONFIG event: @@ -956,7 +975,7 @@ script: - switch.turn_off: doorman_ring_to_open - - id: easy_setup_next + - id: interactive_setup_next parameters: next_step: string text: string @@ -968,22 +987,22 @@ script: then: # Temporary break - globals.set: - id: easy_setup_step + id: interactive_setup_step value: '""' - text_sensor.template.publish: - id: doorman_easy_setup_step + id: doorman_interactive_setup_step state: "Saving command..." # LED State: Saved - light.turn_on: id: doorman_rgb_status_led - red: 100% - green: 0% - blue: 0% + red: 0% + green: 100% + blue: 10% effect: none - delay: 3s - text_sensor.template.publish: - id: doorman_easy_setup_step + id: doorman_interactive_setup_step state: !lambda "return text.c_str();" - if: @@ -992,19 +1011,23 @@ script: then: # Next step - globals.set: - id: easy_setup_step + id: interactive_setup_step value: !lambda "return next_step;" # LED State: Waiting - light.turn_on: id: doorman_rgb_status_led - red: 100% - green: 0% - blue: 0% + red: 0% + green: 100% + blue: 10% effect: pulse else: + # Initial setup done + - globals.set: + id: initial_setup_done + value: 'true' # Reset step - globals.set: - id: easy_setup_step + id: interactive_setup_step value: '""' - script.execute: update_led - - logger.log: "Easy Setup complete!" \ No newline at end of file + - logger.log: "Interactive Setup complete!" \ No newline at end of file diff --git a/pcb/fabrication-toolkit-options.json b/pcb/fabrication-toolkit-options.json index c429b8c..d7035ff 100644 --- a/pcb/fabrication-toolkit-options.json +++ b/pcb/fabrication-toolkit-options.json @@ -1 +1 @@ -{"AUTO TRANSLATE": true, "EXCLUDE DNP": false, "EXTRA_LAYERS": ""} \ No newline at end of file +{"AUTO TRANSLATE": false, "EXCLUDE DNP": false, "EXTRA_LAYERS": ""} \ No newline at end of file