From cce19ec3585ec9e8a0cb07e4fe7cb1b05c358d0e Mon Sep 17 00:00:00 2001 From: Florian Date: Mon, 10 Feb 2025 15:25:37 +0100 Subject: [PATCH] Test compiling for multiple platforms --- .github/workflows/build-esphome.yml | 2 +- .github/workflows/bundle-assets.yml | 34 ++++- .github/workflows/deploy.yml | 136 +++++++++++++++--- .pre-commit-config.yaml | 32 ++--- firmware/base.yaml | 58 +------- firmware/components/dashboard-import.yaml | 3 + .../debug-utilities.yaml | 0 .../{addons => components}/homeassistant.yaml | 0 .../interactive-setup.yaml | 0 .../intercom-settings.yaml | 0 firmware/{addons => components}/mqtt.yaml | 0 .../{addons => components}/nuki-bridge.yaml | 4 + .../components/ota-updates-default-dev.yaml | 3 + firmware/components/ota-updates.yaml | 53 +++++++ .../pattern-events.yaml | 0 .../{addons => components}/ring-to-open.yaml | 0 .../esp32-s3-oct.ha.nuki-bridge.dev.yaml | 19 +++ .../esp32-s3-oct.ha.nuki-bridge.yaml | 17 +++ .../esp32-s3-oct.ha.stock.dev.yaml | 18 +++ .../configurations/esp32-s3-oct.ha.stock.yaml | 16 +++ .../esp32-s3-oct.mqtt.nuki-bridge.dev.yaml | 16 +++ .../esp32-s3-oct.mqtt.nuki-bridge.yaml | 15 ++ .../esp32-s3-oct.mqtt.stock.dev.yaml | 15 ++ .../esp32-s3-oct.mqtt.stock.yaml | 14 ++ .../esp32-s3.ha.nuki-bridge.dev.yaml | 19 +++ .../esp32-s3.ha.nuki-bridge.yaml | 17 +++ .../configurations/esp32-s3.ha.stock.dev.yaml | 18 +++ .../configurations/esp32-s3.ha.stock.yaml | 16 +++ .../esp32-s3.mqtt.nuki-bridge.dev.yaml | 16 +++ .../esp32-s3.mqtt.nuki-bridge.yaml | 15 ++ .../esp32-s3.mqtt.stock.dev.yaml | 15 ++ .../configurations/esp32-s3.mqtt.stock.yaml | 14 ++ .../esp32.ha.nuki-bridge.dev.yaml | 19 +++ .../configurations/esp32.ha.nuki-bridge.yaml | 17 +++ .../configurations/esp32.ha.stock.dev.yaml | 18 +++ firmware/configurations/esp32.ha.stock.yaml | 16 +++ .../esp32.mqtt.nuki-bridge.dev.yaml | 16 +++ .../esp32.mqtt.nuki-bridge.yaml | 15 ++ .../configurations/esp32.mqtt.stock.dev.yaml | 15 ++ firmware/configurations/esp32.mqtt.stock.yaml | 14 ++ firmware/doorman-nuki-bridge.dev.yaml | 3 - firmware/doorman-nuki-bridge.yaml | 3 - firmware/doorman-stock.dev.yaml | 3 - firmware/doorman-stock.yaml | 3 - ...p32-s3-oct.ha.nuki-bridge.example.dev.yaml | 20 +++ .../esp32-s3-oct.ha.nuki-bridge.example.yaml | 20 +++ .../esp32-s3-oct.ha.stock.example.dev.yaml | 20 +++ .../esp32-s3-oct.ha.stock.example.yaml | 20 +++ ...2-s3-oct.mqtt.nuki-bridge.example.dev.yaml | 20 +++ ...esp32-s3-oct.mqtt.nuki-bridge.example.yaml | 20 +++ .../esp32-s3-oct.mqtt.stock.example.dev.yaml | 20 +++ .../esp32-s3-oct.mqtt.stock.example.yaml | 20 +++ .../esp32-s3.ha.nuki-bridge.example.dev.yaml | 20 +++ .../esp32-s3.ha.nuki-bridge.example.yaml | 20 +++ .../esp32-s3.ha.stock.example.dev.yaml | 20 +++ .../examples/esp32-s3.ha.stock.example.yaml | 20 +++ ...esp32-s3.mqtt.nuki-bridge.example.dev.yaml | 20 +++ .../esp32-s3.mqtt.nuki-bridge.example.yaml | 20 +++ .../esp32-s3.mqtt.stock.example.dev.yaml | 20 +++ .../examples/esp32-s3.mqtt.stock.example.yaml | 20 +++ ... => esp32.ha.nuki-bridge.example.dev.yaml} | 7 +- ...yaml => esp32.ha.nuki-bridge.example.yaml} | 7 +- ...e.yaml => esp32.ha.stock.example.dev.yaml} | 7 +- ...e.dev.yaml => esp32.ha.stock.example.yaml} | 7 +- ...> esp32.mqtt.nuki-bridge.example.dev.yaml} | 7 +- ...ml => esp32.mqtt.nuki-bridge.example.yaml} | 7 +- ...yaml => esp32.mqtt.stock.example.dev.yaml} | 7 +- ...ple.yaml => esp32.mqtt.stock.example.yaml} | 7 +- .../mqtt-nuki-bridge.example.dev.yaml | 24 ---- .../examples/mqtt-nuki-bridge.example.yaml | 24 ---- firmware/examples/mqtt-stock.example.dev.yaml | 24 ---- firmware/examples/mqtt-stock.example.yaml | 24 ---- firmware/ha-doorman-nuki-bridge.dev.yaml | 16 --- firmware/ha-doorman-nuki-bridge.yaml | 21 --- firmware/ha-doorman-stock.dev.yaml | 16 --- firmware/ha-doorman-stock.yaml | 12 -- firmware/{host => hosts}/esp32-s3-oct.yaml | 0 firmware/{host => hosts}/esp32-s3.yaml | 0 firmware/{host => hosts}/esp8266.yaml | 0 firmware/mqtt-doorman-nuki-bridge.dev.yaml | 13 -- firmware/mqtt-doorman-nuki-bridge.yaml | 13 -- firmware/mqtt-doorman-stock.dev.yaml | 13 -- firmware/mqtt-doorman-stock.yaml | 8 -- generate_firmware_yaml.py | 110 ++++++++++++++ 84 files changed, 1087 insertions(+), 334 deletions(-) create mode 100644 firmware/components/dashboard-import.yaml rename firmware/{addons => components}/debug-utilities.yaml (100%) rename firmware/{addons => components}/homeassistant.yaml (100%) rename firmware/{addons => components}/interactive-setup.yaml (100%) rename firmware/{addons => components}/intercom-settings.yaml (100%) rename firmware/{addons => components}/mqtt.yaml (100%) rename firmware/{addons => components}/nuki-bridge.yaml (99%) create mode 100644 firmware/components/ota-updates-default-dev.yaml create mode 100644 firmware/components/ota-updates.yaml rename firmware/{addons => components}/pattern-events.yaml (100%) rename firmware/{addons => components}/ring-to-open.yaml (100%) create mode 100644 firmware/configurations/esp32-s3-oct.ha.nuki-bridge.dev.yaml create mode 100644 firmware/configurations/esp32-s3-oct.ha.nuki-bridge.yaml create mode 100644 firmware/configurations/esp32-s3-oct.ha.stock.dev.yaml create mode 100644 firmware/configurations/esp32-s3-oct.ha.stock.yaml create mode 100644 firmware/configurations/esp32-s3-oct.mqtt.nuki-bridge.dev.yaml create mode 100644 firmware/configurations/esp32-s3-oct.mqtt.nuki-bridge.yaml create mode 100644 firmware/configurations/esp32-s3-oct.mqtt.stock.dev.yaml create mode 100644 firmware/configurations/esp32-s3-oct.mqtt.stock.yaml create mode 100644 firmware/configurations/esp32-s3.ha.nuki-bridge.dev.yaml create mode 100644 firmware/configurations/esp32-s3.ha.nuki-bridge.yaml create mode 100644 firmware/configurations/esp32-s3.ha.stock.dev.yaml create mode 100644 firmware/configurations/esp32-s3.ha.stock.yaml create mode 100644 firmware/configurations/esp32-s3.mqtt.nuki-bridge.dev.yaml create mode 100644 firmware/configurations/esp32-s3.mqtt.nuki-bridge.yaml create mode 100644 firmware/configurations/esp32-s3.mqtt.stock.dev.yaml create mode 100644 firmware/configurations/esp32-s3.mqtt.stock.yaml create mode 100644 firmware/configurations/esp32.ha.nuki-bridge.dev.yaml create mode 100644 firmware/configurations/esp32.ha.nuki-bridge.yaml create mode 100644 firmware/configurations/esp32.ha.stock.dev.yaml create mode 100644 firmware/configurations/esp32.ha.stock.yaml create mode 100644 firmware/configurations/esp32.mqtt.nuki-bridge.dev.yaml create mode 100644 firmware/configurations/esp32.mqtt.nuki-bridge.yaml create mode 100644 firmware/configurations/esp32.mqtt.stock.dev.yaml create mode 100644 firmware/configurations/esp32.mqtt.stock.yaml delete mode 100644 firmware/doorman-nuki-bridge.dev.yaml delete mode 100644 firmware/doorman-nuki-bridge.yaml delete mode 100644 firmware/doorman-stock.dev.yaml delete mode 100644 firmware/doorman-stock.yaml create mode 100644 firmware/examples/esp32-s3-oct.ha.nuki-bridge.example.dev.yaml create mode 100644 firmware/examples/esp32-s3-oct.ha.nuki-bridge.example.yaml create mode 100644 firmware/examples/esp32-s3-oct.ha.stock.example.dev.yaml create mode 100644 firmware/examples/esp32-s3-oct.ha.stock.example.yaml create mode 100644 firmware/examples/esp32-s3-oct.mqtt.nuki-bridge.example.dev.yaml create mode 100644 firmware/examples/esp32-s3-oct.mqtt.nuki-bridge.example.yaml create mode 100644 firmware/examples/esp32-s3-oct.mqtt.stock.example.dev.yaml create mode 100644 firmware/examples/esp32-s3-oct.mqtt.stock.example.yaml create mode 100644 firmware/examples/esp32-s3.ha.nuki-bridge.example.dev.yaml create mode 100644 firmware/examples/esp32-s3.ha.nuki-bridge.example.yaml create mode 100644 firmware/examples/esp32-s3.ha.stock.example.dev.yaml create mode 100644 firmware/examples/esp32-s3.ha.stock.example.yaml create mode 100644 firmware/examples/esp32-s3.mqtt.nuki-bridge.example.dev.yaml create mode 100644 firmware/examples/esp32-s3.mqtt.nuki-bridge.example.yaml create mode 100644 firmware/examples/esp32-s3.mqtt.stock.example.dev.yaml create mode 100644 firmware/examples/esp32-s3.mqtt.stock.example.yaml rename firmware/examples/{ha-nuki-bridge.example.yaml => esp32.ha.nuki-bridge.example.dev.yaml} (74%) rename firmware/examples/{ha-nuki-bridge.example.dev.yaml => esp32.ha.nuki-bridge.example.yaml} (75%) rename firmware/examples/{ha-stock.example.yaml => esp32.ha.stock.example.dev.yaml} (65%) rename firmware/examples/{ha-stock.example.dev.yaml => esp32.ha.stock.example.yaml} (65%) rename firmware/examples/{nuki-bridge.example.yaml => esp32.mqtt.nuki-bridge.example.dev.yaml} (74%) rename firmware/examples/{nuki-bridge.example.dev.yaml => esp32.mqtt.nuki-bridge.example.yaml} (74%) rename firmware/examples/{stock.example.dev.yaml => esp32.mqtt.stock.example.dev.yaml} (68%) rename firmware/examples/{stock.example.yaml => esp32.mqtt.stock.example.yaml} (68%) delete mode 100644 firmware/examples/mqtt-nuki-bridge.example.dev.yaml delete mode 100644 firmware/examples/mqtt-nuki-bridge.example.yaml delete mode 100644 firmware/examples/mqtt-stock.example.dev.yaml delete mode 100644 firmware/examples/mqtt-stock.example.yaml delete mode 100644 firmware/ha-doorman-nuki-bridge.dev.yaml delete mode 100644 firmware/ha-doorman-nuki-bridge.yaml delete mode 100644 firmware/ha-doorman-stock.dev.yaml delete mode 100644 firmware/ha-doorman-stock.yaml rename firmware/{host => hosts}/esp32-s3-oct.yaml (100%) rename firmware/{host => hosts}/esp32-s3.yaml (100%) rename firmware/{host => hosts}/esp8266.yaml (100%) delete mode 100644 firmware/mqtt-doorman-nuki-bridge.dev.yaml delete mode 100644 firmware/mqtt-doorman-nuki-bridge.yaml delete mode 100644 firmware/mqtt-doorman-stock.dev.yaml delete mode 100644 firmware/mqtt-doorman-stock.yaml create mode 100644 generate_firmware_yaml.py diff --git a/.github/workflows/build-esphome.yml b/.github/workflows/build-esphome.yml index 576afc75..25e84b9b 100644 --- a/.github/workflows/build-esphome.yml +++ b/.github/workflows/build-esphome.yml @@ -85,5 +85,5 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: firmware-${{ inputs.directory_name }} + name: firmware.${{ inputs.directory_name }} path: output \ No newline at end of file diff --git a/.github/workflows/bundle-assets.yml b/.github/workflows/bundle-assets.yml index 031b9352..654499b1 100644 --- a/.github/workflows/bundle-assets.yml +++ b/.github/workflows/bundle-assets.yml @@ -26,18 +26,48 @@ jobs: - name: Copy interactive BOM run: cp pcb/bom/ibom.html output/ + + + - name: Download Doorman Stock for Home Assistant (ESP32) artifact + uses: actions/download-artifact@v4 + with: + name: firmware.esp32.ha.stock + path: output/firmware/release + - name: Download Doorman Stock for Home Assistant (ESP32-S3) artifact uses: actions/download-artifact@v4 with: - name: firmware-doorman-stock + name: firmware.esp32-s3.ha.stock + path: output/firmware/release + + - name: Download Doorman Stock for Home Assistant (ESP32-S3-Oct) artifact + uses: actions/download-artifact@v4 + with: + name: firmware.esp32-s3-oct.ha.stock + path: output/firmware/release + + + + - name: Download Doorman Nuki Bridge for Home Assistant (ESP32) artifact + uses: actions/download-artifact@v4 + with: + name: firmware.esp32.ha.nuki-bridge path: output/firmware/release - name: Download Doorman Nuki Bridge for Home Assistant (ESP32-S3) artifact uses: actions/download-artifact@v4 with: - name: firmware-doorman-nuki-bridge + name: firmware.esp32-s3.ha.nuki-bridge path: output/firmware/release + - name: Download Doorman Nuki Bridge for Home Assistant (ESP32-S3-Oct) artifact + uses: actions/download-artifact@v4 + with: + name: firmware.esp32-s3-oct.ha.nuki-bridge + path: output/firmware/release + + + - name: Upload Pages artifact if: github.ref_name == 'master' uses: actions/upload-pages-artifact@v3 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 189a9433..794369c8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -65,57 +65,161 @@ jobs: echo "summary=$SUMMARY" >> $GITHUB_OUTPUT # Build stable firmware - build-doorman-stock-stable-firmware: + build-esp32-stock-stable-firmware: if: github.ref_name == 'master' - name: Build Stock Firmware (Home Assistant, stable) + name: Build ESP32 Stock Firmware (Home Assistant, stable) uses: ./.github/workflows/build-esphome.yml needs: prepare-release with: - files: firmware/ha-doorman-stock.yaml + files: firmware/configurations/esp32.ha.stock.yaml name: AzonInc.Doorman esphome_version: latest - directory_name: doorman-stock + directory_name: esp32.ha.stock summary: ${{ needs.prepare-release.outputs.release_summary }} url: ${{ needs.prepare-release.outputs.release_url }} - build-doorman-nuki-bridge-stable-firmware: + build-esp32-s3-stock-stable-firmware: if: github.ref_name == 'master' - name: Build Nuki Bridge Firmware (Home Assistant, stable) + name: Build ESP32-S3 Stock Firmware (Home Assistant, stable) uses: ./.github/workflows/build-esphome.yml needs: prepare-release with: - files: firmware/ha-doorman-nuki-bridge.yaml + files: firmware/configurations/esp32-s3.ha.stock.yaml + name: AzonInc.Doorman + esphome_version: latest + directory_name: esp32-s3.ha.stock + summary: ${{ needs.prepare-release.outputs.release_summary }} + url: ${{ needs.prepare-release.outputs.release_url }} + + build-esp32-s3-oct-stock-stable-firmware: + if: github.ref_name == 'master' + name: Build ESP32-S3-OCT Stock Firmware (Home Assistant, stable) + uses: ./.github/workflows/build-esphome.yml + needs: prepare-release + with: + files: firmware/configurations/esp32-s3-oct.ha.stock.yaml + name: AzonInc.Doorman + esphome_version: latest + directory_name: esp32-s3-oct.ha.stock + summary: ${{ needs.prepare-release.outputs.release_summary }} + url: ${{ needs.prepare-release.outputs.release_url }} + + build-esp32-nuki-bridge-stable-firmware: + if: github.ref_name == 'master' + name: Build ESP32 Nuki Bridge Firmware (Home Assistant, stable) + uses: ./.github/workflows/build-esphome.yml + needs: prepare-release + with: + files: firmware/configurations/esp32.ha.nuki-bridge.yaml + name: AzonInc.Doorman-Nuki-Bridge + esphome_version: latest + directory_name: esp32.ha.nuki-bridge + summary: ${{ needs.prepare-release.outputs.release_summary }} + url: ${{ needs.prepare-release.outputs.release_url }} + + build-esp32-s3-nuki-bridge-stable-firmware: + if: github.ref_name == 'master' + name: Build ESP32-S3 Nuki Bridge Firmware (Home Assistant, stable) + uses: ./.github/workflows/build-esphome.yml + needs: prepare-release + with: + files: firmware/configurations/esp32-s3.ha.nuki-bridge.yaml + name: AzonInc.Doorman-Nuki-Bridge + esphome_version: latest + directory_name: esp32-s3.ha.nuki-bridge + summary: ${{ needs.prepare-release.outputs.release_summary }} + url: ${{ needs.prepare-release.outputs.release_url }} + + build-esp32-s3-oct-nuki-bridge-stable-firmware: + if: github.ref_name == 'master' + name: Build ESP32-S3-OCT Nuki Bridge Firmware (Home Assistant, stable) + uses: ./.github/workflows/build-esphome.yml + needs: prepare-release + with: + files: firmware/configurations/esp32-s3-oct.ha.nuki-bridge.yaml name: AzonInc.Doorman-Nuki-Bridge esphome_version: latest - directory_name: doorman-nuki-bridge + directory_name: esp32-s3-oct.ha.nuki-bridge summary: ${{ needs.prepare-release.outputs.release_summary }} url: ${{ needs.prepare-release.outputs.release_url }} # Build dev firmware - build-doorman-stock-dev-firmware: + build-esp32-stock-dev-firmware: if: startsWith(github.ref_name, 'dev') - name: Build Stock Firmware (Home Assistant, dev) + name: Build ESP32 Stock Firmware (Home Assistant, dev) uses: ./.github/workflows/build-esphome.yml needs: prepare-release with: - files: firmware/ha-doorman-stock.dev.yaml + files: firmware/configurations/esp32.ha.stock.dev.yaml name: AzonInc.Doorman esphome_version: dev - directory_name: doorman-stock + directory_name: esp32.ha.stock + summary: ${{ needs.prepare-release.outputs.release_summary }} + url: ${{ needs.prepare-release.outputs.release_url }} + + build-esp32-s3-stock-dev-firmware: + if: startsWith(github.ref_name, 'dev') + name: Build ESP32-S3 Stock Firmware (Home Assistant, dev) + uses: ./.github/workflows/build-esphome.yml + needs: prepare-release + with: + files: firmware/configurations/esp32-s3.ha.stock.dev.yaml + name: AzonInc.Doorman + esphome_version: dev + directory_name: esp32-s3.ha.stock + summary: ${{ needs.prepare-release.outputs.release_summary }} + url: ${{ needs.prepare-release.outputs.release_url }} + + build-esp32-s3-oct-stock-dev-firmware: + if: startsWith(github.ref_name, 'dev') + name: Build ESP32-S3-OCT Stock Firmware (Home Assistant, dev) + uses: ./.github/workflows/build-esphome.yml + needs: prepare-release + with: + files: firmware/configurations/esp32-s3-oct.ha.stock.dev.yaml + name: AzonInc.Doorman + esphome_version: dev + directory_name: esp32-s3-oct.ha.stock + summary: ${{ needs.prepare-release.outputs.release_summary }} + url: ${{ needs.prepare-release.outputs.release_url }} + + build-esp32-nuki-bridge-dev-firmware: + if: startsWith(github.ref_name, 'dev') + name: Build ESP32 Nuki Bridge Firmware (Home Assistant, dev) + uses: ./.github/workflows/build-esphome.yml + needs: prepare-release + with: + files: firmware/configurations/esp32.ha.nuki-bridge.dev.yaml + name: AzonInc.Doorman-Nuki-Bridge + esphome_version: dev + directory_name: esp32.ha.nuki-bridge + summary: ${{ needs.prepare-release.outputs.release_summary }} + url: ${{ needs.prepare-release.outputs.release_url }} + + build-esp32-s3-nuki-bridge-dev-firmware: + if: startsWith(github.ref_name, 'dev') + name: Build ESP32-S3 Nuki Bridge Firmware (Home Assistant, dev) + uses: ./.github/workflows/build-esphome.yml + needs: prepare-release + with: + files: firmware/configurations/esp32-s3.ha.nuki-bridge.dev.yaml + name: AzonInc.Doorman-Nuki-Bridge + esphome_version: dev + directory_name: esp32-s3.ha.nuki-bridge summary: ${{ needs.prepare-release.outputs.release_summary }} url: ${{ needs.prepare-release.outputs.release_url }} - build-doorman-nuki-bridge-dev-firmware: + build-esp32-s3-oct-nuki-bridge-dev-firmware: if: startsWith(github.ref_name, 'dev') - name: Build Nuki Bridge Firmware (Home Assistant, dev) + name: Build ESP32-S3-OCT Nuki Bridge Firmware (Home Assistant, dev) uses: ./.github/workflows/build-esphome.yml needs: prepare-release with: - files: firmware/ha-doorman-nuki-bridge.dev.yaml + files: firmware/configurations/esp32-s3-oct.ha.nuki-bridge.dev.yaml name: AzonInc.Doorman-Nuki-Bridge esphome_version: dev - directory_name: doorman-nuki-bridge + directory_name: esp32-s3-oct.ha.nuki-bridge summary: ${{ needs.prepare-release.outputs.release_summary }} url: ${{ needs.prepare-release.outputs.release_url }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a8f90b95..cf70b190 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,53 +2,53 @@ repos: - repo: local hooks: - - id: ha-doorman-stock.yaml + - id: esp32-s3.ha.stock.yaml name: Validate Config - Stock (ha, master) - entry: esphome config firmware/ha-doorman-stock.yaml + entry: esphome config firmware/configurations/esp32-s3.ha.stock.yaml language: system pass_filenames: false files: ^firmware/ - - id: ha-doorman-stock.dev.yaml + - id: esp32-s3.ha.stock.dev.yaml name: Validate Config - Stock (ha, dev) - entry: esphome config firmware/ha-doorman-stock.dev.yaml + entry: esphome config firmware/configurations/esp32-s3.ha.stock.dev.yaml language: system pass_filenames: false files: ^firmware/ - - id: mqtt-doorman-stock.yaml + - id: esp32-s3.mqtt.stock.yaml name: Validate Config - Stock (mqtt, master) - entry: esphome config firmware/mqtt-doorman-stock.yaml + entry: esphome config firmware/configurations/esp32-s3.mqtt.stock.yaml language: system pass_filenames: false files: ^firmware/ - - id: mqtt-doorman-stock.dev.yaml + - id: esp32-s3.mqtt.stock.dev.yaml name: Validate Config - Stock (mqtt, dev) - entry: esphome config firmware/mqtt-doorman-stock.dev.yaml + entry: esphome config firmware/configurations/esp32-s3.mqtt.stock.dev.yaml language: system pass_filenames: false files: ^firmware/ - - id: ha-doorman-nuki-bridge.yaml + - id: esp32-s3.ha.nuki-bridge.yaml name: Validate Config - Nuki Bridge (ha, master) - entry: esphome config firmware/ha-doorman-nuki-bridge.yaml + entry: esphome config firmware/configurations/esp32-s3.ha.nuki-bridge.yaml language: system pass_filenames: false files: ^firmware/ - - id: ha-doorman-nuki-bridge.dev.yaml + - id: esp32-s3.ha.nuki-bridge.dev.yaml name: Validate Config - Nuki Bridge (ha, dev) - entry: esphome config firmware/ha-doorman-nuki-bridge.dev.yaml + entry: esphome config firmware/configurations/esp32-s3.ha.nuki-bridge.dev.yaml language: system pass_filenames: false files: ^firmware/ - - id: mqtt-doorman-nuki-bridge.yaml + - id: esp32-s3.mqtt.nuki-bridge.yaml name: Validate Config - Nuki Bridge (mqtt, master) - entry: esphome config firmware/mqtt-doorman-nuki-bridge.yaml + entry: esphome config firmware/configurations/esp32-s3.mqtt.nuki-bridge.yaml language: system pass_filenames: false files: ^firmware/ - - id: mqtt-doorman-nuki-bridge.dev.yaml + - id: esp32-s3.mqtt.nuki-bridge.dev.yaml name: Validate Config - Nuki Bridge (mqtt, dev) - entry: esphome config firmware/mqtt-doorman-nuki-bridge.dev.yaml + entry: esphome config firmware/configurations/esp32-s3.mqtt.nuki-bridge.dev.yaml language: system pass_filenames: false files: ^firmware/ \ No newline at end of file diff --git a/firmware/base.yaml b/firmware/base.yaml index 9a186cbd..e5c8cb39 100644 --- a/firmware/base.yaml +++ b/firmware/base.yaml @@ -10,10 +10,6 @@ substitutions: relay_pin: "GPIO42" external_button_pin: "GPIO41" - # Update manifest - update_url_stable: "https://doorman.azon.ai/firmware/release/doorman-stock/manifest.json" - update_url_dev: "https://doorman-dev.surge.sh/firmware/release/doorman-stock/manifest.json" - # Essential ESPHome Configuration Options esphome: name: ${name} @@ -29,7 +25,7 @@ esphome: logger: level: ${log_level} logs: - component: ERROR + component: ERROR # avoids component warning spam sensor: WARN # avoids logging debug sensor updates web_server: @@ -63,28 +59,9 @@ web_server: name: "Diagnostic" sorting_weight: -1 -ota: - - platform: esphome - - platform: http_request - id: ota_http_request - -http_request: - verify_ssl: false - -update: - - platform: http_request - id: update_http_request - icon: "mdi:update" - name: Firmware - source: ${update_url_stable} - disabled_by_default: false - web_server: - sorting_group_id: sorting_group_system - sorting_weight: -4 - wifi: ap: - ssid: "Doorman-S3 Setup" + ssid: "${friendly_name} Setup" password: "open-sesame" captive_portal: @@ -94,7 +71,7 @@ improv_serial: # Import TC:BUS Component external_components: - - source: github://azoninc/doorman + - source: github://azoninc/doorman@${branch} components: [ tc_bus ] refresh: 60s @@ -167,26 +144,6 @@ text_sensor: sorting_weight: -99 switch: - - platform: template - id: dev_firmware - name: Experimental firmware - icon: "mdi:test-tube" - entity_category: CONFIG - optimistic: true - restore_mode: RESTORE_DEFAULT_OFF - on_turn_on: - - logger.log: "OTA update source set to dev" - - lambda: id(update_http_request).set_source_url(to_string("${update_url_dev}")); - - component.update: update_http_request - on_turn_off: - - logger.log: "OTA update source set to master" - - lambda: id(update_http_request).set_source_url(to_string("${update_url_stable}")); - - component.update: update_http_request - disabled_by_default: true - web_server: - sorting_group_id: sorting_group_system - sorting_weight: -3 - # Preconfigured Relay Switch - platform: gpio name: Relay @@ -211,15 +168,6 @@ button: sorting_group_id: sorting_group_system sorting_weight: -2 - - platform: safe_mode - id: doorman_safe_mode - name: Safe mode - entity_category: CONFIG - disabled_by_default: true - web_server: - sorting_group_id: sorting_group_system - sorting_weight: -1 - - platform: factory_reset id: doorman_factory_reset name: Restore Factory Settings diff --git a/firmware/components/dashboard-import.yaml b/firmware/components/dashboard-import.yaml new file mode 100644 index 00000000..8b12aca2 --- /dev/null +++ b/firmware/components/dashboard-import.yaml @@ -0,0 +1,3 @@ +dashboard_import: + package_import_url: github://azoninc/doorman/firmware/examples/${host_platform}.${firmware_type}.doorman-${firmware_type}.example.${branch}.yaml@${branch} + import_full_config: true \ No newline at end of file diff --git a/firmware/addons/debug-utilities.yaml b/firmware/components/debug-utilities.yaml similarity index 100% rename from firmware/addons/debug-utilities.yaml rename to firmware/components/debug-utilities.yaml diff --git a/firmware/addons/homeassistant.yaml b/firmware/components/homeassistant.yaml similarity index 100% rename from firmware/addons/homeassistant.yaml rename to firmware/components/homeassistant.yaml diff --git a/firmware/addons/interactive-setup.yaml b/firmware/components/interactive-setup.yaml similarity index 100% rename from firmware/addons/interactive-setup.yaml rename to firmware/components/interactive-setup.yaml diff --git a/firmware/addons/intercom-settings.yaml b/firmware/components/intercom-settings.yaml similarity index 100% rename from firmware/addons/intercom-settings.yaml rename to firmware/components/intercom-settings.yaml diff --git a/firmware/addons/mqtt.yaml b/firmware/components/mqtt.yaml similarity index 100% rename from firmware/addons/mqtt.yaml rename to firmware/components/mqtt.yaml diff --git a/firmware/addons/nuki-bridge.yaml b/firmware/components/nuki-bridge.yaml similarity index 99% rename from firmware/addons/nuki-bridge.yaml rename to firmware/components/nuki-bridge.yaml index 272d3641..a6e42f9e 100644 --- a/firmware/addons/nuki-bridge.yaml +++ b/firmware/components/nuki-bridge.yaml @@ -1,3 +1,7 @@ +esphome: + project: + name: "AzonInc.Doorman-Nuki-Bridge" + # Remove incompatible components esp32_ble: !remove esp32_improv: !remove diff --git a/firmware/components/ota-updates-default-dev.yaml b/firmware/components/ota-updates-default-dev.yaml new file mode 100644 index 00000000..3a2f722b --- /dev/null +++ b/firmware/components/ota-updates-default-dev.yaml @@ -0,0 +1,3 @@ +switch: + - id: !extend dev_firmware + restore_mode: RESTORE_DEFAULT_ON \ No newline at end of file diff --git a/firmware/components/ota-updates.yaml b/firmware/components/ota-updates.yaml new file mode 100644 index 00000000..1071ad0e --- /dev/null +++ b/firmware/components/ota-updates.yaml @@ -0,0 +1,53 @@ +substitutions: + update_url_stable: "https://doorman.azon.ai/firmware/release/${host_platform}.${api_variant}.doorman-${firmware_type}/manifest.json" + update_url_dev: "https://doorman-dev.surge.sh/firmware/release/${host_platform}.${api_variant}.doorman-${firmware_type}/manifest.json" + +http_request: + verify_ssl: false + +ota: + - platform: esphome + - platform: http_request + id: ota_http_request + +update: + - platform: http_request + id: update_http_request + icon: "mdi:update" + name: Firmware + source: ${update_url_stable} + disabled_by_default: false + web_server: + sorting_group_id: sorting_group_system + sorting_weight: -4 + +switch: + - platform: template + id: dev_firmware + name: Experimental firmware + icon: "mdi:test-tube" + entity_category: CONFIG + optimistic: true + restore_mode: RESTORE_DEFAULT_OFF + on_turn_on: + - logger.log: "OTA update source set to dev" + - lambda: id(update_http_request).set_source_url(to_string("${update_url_dev}")); + - component.update: update_http_request + on_turn_off: + - logger.log: "OTA update source set to master" + - lambda: id(update_http_request).set_source_url(to_string("${update_url_stable}")); + - component.update: update_http_request + disabled_by_default: true + web_server: + sorting_group_id: sorting_group_system + sorting_weight: -3 + +button: + - platform: safe_mode + id: doorman_safe_mode + name: Safe mode + entity_category: CONFIG + disabled_by_default: true + web_server: + sorting_group_id: sorting_group_system + sorting_weight: -1 \ No newline at end of file diff --git a/firmware/addons/pattern-events.yaml b/firmware/components/pattern-events.yaml similarity index 100% rename from firmware/addons/pattern-events.yaml rename to firmware/components/pattern-events.yaml diff --git a/firmware/addons/ring-to-open.yaml b/firmware/components/ring-to-open.yaml similarity index 100% rename from firmware/addons/ring-to-open.yaml rename to firmware/components/ring-to-open.yaml diff --git a/firmware/configurations/esp32-s3-oct.ha.nuki-bridge.dev.yaml b/firmware/configurations/esp32-s3-oct.ha.nuki-bridge.dev.yaml new file mode 100644 index 00000000..3fd28f0b --- /dev/null +++ b/firmware/configurations/esp32-s3-oct.ha.nuki-bridge.dev.yaml @@ -0,0 +1,19 @@ +substitutions: + branch: "dev" + firmware_type: "nuki-bridge" + api_variant: "ha" + host_platform: "esp32-s3-oct" + +packages: + host: !include ../hosts/esp32-s3-oct.yaml + base: !include ../base.yaml + ota_updates: !include ../components/ota-updates.yaml + ota_updates_default_dev: !include ../components/ota-updates-default-dev.yaml + dashboard_import: !include ../components/dashboard-import.yaml + homeassistant: !include ../components/homeassistant.yaml + debug_utilities: !include ../components/debug-utilities.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + addon_nuki_bridge: !include ../components/nuki-bridge.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32-s3-oct.ha.nuki-bridge.yaml b/firmware/configurations/esp32-s3-oct.ha.nuki-bridge.yaml new file mode 100644 index 00000000..a6ff126c --- /dev/null +++ b/firmware/configurations/esp32-s3-oct.ha.nuki-bridge.yaml @@ -0,0 +1,17 @@ +substitutions: + branch: "master" + firmware_type: "nuki-bridge" + api_variant: "ha" + host_platform: "esp32-s3-oct" + +packages: + host: !include ../hosts/esp32-s3-oct.yaml + base: !include ../base.yaml + ota_updates: !include ../components/ota-updates.yaml + dashboard_import: !include ../components/dashboard-import.yaml + homeassistant: !include ../components/homeassistant.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + addon_nuki_bridge: !include ../components/nuki-bridge.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32-s3-oct.ha.stock.dev.yaml b/firmware/configurations/esp32-s3-oct.ha.stock.dev.yaml new file mode 100644 index 00000000..81d1a9b0 --- /dev/null +++ b/firmware/configurations/esp32-s3-oct.ha.stock.dev.yaml @@ -0,0 +1,18 @@ +substitutions: + branch: "dev" + firmware_type: "stock" + api_variant: "ha" + host_platform: "esp32-s3-oct" + +packages: + host: !include ../hosts/esp32-s3-oct.yaml + base: !include ../base.yaml + ota_updates: !include ../components/ota-updates.yaml + ota_updates_default_dev: !include ../components/ota-updates-default-dev.yaml + dashboard_import: !include ../components/dashboard-import.yaml + homeassistant: !include ../components/homeassistant.yaml + debug_utilities: !include ../components/debug-utilities.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32-s3-oct.ha.stock.yaml b/firmware/configurations/esp32-s3-oct.ha.stock.yaml new file mode 100644 index 00000000..3a4c9d38 --- /dev/null +++ b/firmware/configurations/esp32-s3-oct.ha.stock.yaml @@ -0,0 +1,16 @@ +substitutions: + branch: "master" + firmware_type: "stock" + api_variant: "ha" + host_platform: "esp32-s3-oct" + +packages: + host: !include ../hosts/esp32-s3-oct.yaml + base: !include ../base.yaml + ota_updates: !include ../components/ota-updates.yaml + dashboard_import: !include ../components/dashboard-import.yaml + homeassistant: !include ../components/homeassistant.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32-s3-oct.mqtt.nuki-bridge.dev.yaml b/firmware/configurations/esp32-s3-oct.mqtt.nuki-bridge.dev.yaml new file mode 100644 index 00000000..6b0a9d4f --- /dev/null +++ b/firmware/configurations/esp32-s3-oct.mqtt.nuki-bridge.dev.yaml @@ -0,0 +1,16 @@ +substitutions: + branch: "dev" + firmware_type: "nuki-bridge" + api_variant: "mqtt" + host_platform: "esp32-s3-oct" + +packages: + host: !include ../hosts/esp32-s3-oct.yaml + base: !include ../base.yaml + mqtt: !include ../components/mqtt.yaml + debug_utilities: !include ../components/debug-utilities.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + addon_nuki_bridge: !include ../components/nuki-bridge.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32-s3-oct.mqtt.nuki-bridge.yaml b/firmware/configurations/esp32-s3-oct.mqtt.nuki-bridge.yaml new file mode 100644 index 00000000..06b76e54 --- /dev/null +++ b/firmware/configurations/esp32-s3-oct.mqtt.nuki-bridge.yaml @@ -0,0 +1,15 @@ +substitutions: + branch: "master" + firmware_type: "nuki-bridge" + api_variant: "mqtt" + host_platform: "esp32-s3-oct" + +packages: + host: !include ../hosts/esp32-s3-oct.yaml + base: !include ../base.yaml + mqtt: !include ../components/mqtt.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + addon_nuki_bridge: !include ../components/nuki-bridge.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32-s3-oct.mqtt.stock.dev.yaml b/firmware/configurations/esp32-s3-oct.mqtt.stock.dev.yaml new file mode 100644 index 00000000..ba7d96d8 --- /dev/null +++ b/firmware/configurations/esp32-s3-oct.mqtt.stock.dev.yaml @@ -0,0 +1,15 @@ +substitutions: + branch: "dev" + firmware_type: "stock" + api_variant: "mqtt" + host_platform: "esp32-s3-oct" + +packages: + host: !include ../hosts/esp32-s3-oct.yaml + base: !include ../base.yaml + mqtt: !include ../components/mqtt.yaml + debug_utilities: !include ../components/debug-utilities.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32-s3-oct.mqtt.stock.yaml b/firmware/configurations/esp32-s3-oct.mqtt.stock.yaml new file mode 100644 index 00000000..2e155807 --- /dev/null +++ b/firmware/configurations/esp32-s3-oct.mqtt.stock.yaml @@ -0,0 +1,14 @@ +substitutions: + branch: "master" + firmware_type: "stock" + api_variant: "mqtt" + host_platform: "esp32-s3-oct" + +packages: + host: !include ../hosts/esp32-s3-oct.yaml + base: !include ../base.yaml + mqtt: !include ../components/mqtt.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32-s3.ha.nuki-bridge.dev.yaml b/firmware/configurations/esp32-s3.ha.nuki-bridge.dev.yaml new file mode 100644 index 00000000..45df1766 --- /dev/null +++ b/firmware/configurations/esp32-s3.ha.nuki-bridge.dev.yaml @@ -0,0 +1,19 @@ +substitutions: + branch: "dev" + firmware_type: "nuki-bridge" + api_variant: "ha" + host_platform: "esp32-s3" + +packages: + host: !include ../hosts/esp32-s3.yaml + base: !include ../base.yaml + ota_updates: !include ../components/ota-updates.yaml + ota_updates_default_dev: !include ../components/ota-updates-default-dev.yaml + dashboard_import: !include ../components/dashboard-import.yaml + homeassistant: !include ../components/homeassistant.yaml + debug_utilities: !include ../components/debug-utilities.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + addon_nuki_bridge: !include ../components/nuki-bridge.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32-s3.ha.nuki-bridge.yaml b/firmware/configurations/esp32-s3.ha.nuki-bridge.yaml new file mode 100644 index 00000000..ed34af0e --- /dev/null +++ b/firmware/configurations/esp32-s3.ha.nuki-bridge.yaml @@ -0,0 +1,17 @@ +substitutions: + branch: "master" + firmware_type: "nuki-bridge" + api_variant: "ha" + host_platform: "esp32-s3" + +packages: + host: !include ../hosts/esp32-s3.yaml + base: !include ../base.yaml + ota_updates: !include ../components/ota-updates.yaml + dashboard_import: !include ../components/dashboard-import.yaml + homeassistant: !include ../components/homeassistant.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + addon_nuki_bridge: !include ../components/nuki-bridge.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32-s3.ha.stock.dev.yaml b/firmware/configurations/esp32-s3.ha.stock.dev.yaml new file mode 100644 index 00000000..0cd9aa40 --- /dev/null +++ b/firmware/configurations/esp32-s3.ha.stock.dev.yaml @@ -0,0 +1,18 @@ +substitutions: + branch: "dev" + firmware_type: "stock" + api_variant: "ha" + host_platform: "esp32-s3" + +packages: + host: !include ../hosts/esp32-s3.yaml + base: !include ../base.yaml + ota_updates: !include ../components/ota-updates.yaml + ota_updates_default_dev: !include ../components/ota-updates-default-dev.yaml + dashboard_import: !include ../components/dashboard-import.yaml + homeassistant: !include ../components/homeassistant.yaml + debug_utilities: !include ../components/debug-utilities.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32-s3.ha.stock.yaml b/firmware/configurations/esp32-s3.ha.stock.yaml new file mode 100644 index 00000000..1816cfb6 --- /dev/null +++ b/firmware/configurations/esp32-s3.ha.stock.yaml @@ -0,0 +1,16 @@ +substitutions: + branch: "master" + firmware_type: "stock" + api_variant: "ha" + host_platform: "esp32-s3" + +packages: + host: !include ../hosts/esp32-s3.yaml + base: !include ../base.yaml + ota_updates: !include ../components/ota-updates.yaml + dashboard_import: !include ../components/dashboard-import.yaml + homeassistant: !include ../components/homeassistant.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32-s3.mqtt.nuki-bridge.dev.yaml b/firmware/configurations/esp32-s3.mqtt.nuki-bridge.dev.yaml new file mode 100644 index 00000000..0ce86c5c --- /dev/null +++ b/firmware/configurations/esp32-s3.mqtt.nuki-bridge.dev.yaml @@ -0,0 +1,16 @@ +substitutions: + branch: "dev" + firmware_type: "nuki-bridge" + api_variant: "mqtt" + host_platform: "esp32-s3" + +packages: + host: !include ../hosts/esp32-s3.yaml + base: !include ../base.yaml + mqtt: !include ../components/mqtt.yaml + debug_utilities: !include ../components/debug-utilities.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + addon_nuki_bridge: !include ../components/nuki-bridge.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32-s3.mqtt.nuki-bridge.yaml b/firmware/configurations/esp32-s3.mqtt.nuki-bridge.yaml new file mode 100644 index 00000000..14bfd68a --- /dev/null +++ b/firmware/configurations/esp32-s3.mqtt.nuki-bridge.yaml @@ -0,0 +1,15 @@ +substitutions: + branch: "master" + firmware_type: "nuki-bridge" + api_variant: "mqtt" + host_platform: "esp32-s3" + +packages: + host: !include ../hosts/esp32-s3.yaml + base: !include ../base.yaml + mqtt: !include ../components/mqtt.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + addon_nuki_bridge: !include ../components/nuki-bridge.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32-s3.mqtt.stock.dev.yaml b/firmware/configurations/esp32-s3.mqtt.stock.dev.yaml new file mode 100644 index 00000000..f5ec270d --- /dev/null +++ b/firmware/configurations/esp32-s3.mqtt.stock.dev.yaml @@ -0,0 +1,15 @@ +substitutions: + branch: "dev" + firmware_type: "stock" + api_variant: "mqtt" + host_platform: "esp32-s3" + +packages: + host: !include ../hosts/esp32-s3.yaml + base: !include ../base.yaml + mqtt: !include ../components/mqtt.yaml + debug_utilities: !include ../components/debug-utilities.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32-s3.mqtt.stock.yaml b/firmware/configurations/esp32-s3.mqtt.stock.yaml new file mode 100644 index 00000000..096caad8 --- /dev/null +++ b/firmware/configurations/esp32-s3.mqtt.stock.yaml @@ -0,0 +1,14 @@ +substitutions: + branch: "master" + firmware_type: "stock" + api_variant: "mqtt" + host_platform: "esp32-s3" + +packages: + host: !include ../hosts/esp32-s3.yaml + base: !include ../base.yaml + mqtt: !include ../components/mqtt.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32.ha.nuki-bridge.dev.yaml b/firmware/configurations/esp32.ha.nuki-bridge.dev.yaml new file mode 100644 index 00000000..e6ab212e --- /dev/null +++ b/firmware/configurations/esp32.ha.nuki-bridge.dev.yaml @@ -0,0 +1,19 @@ +substitutions: + branch: "dev" + firmware_type: "nuki-bridge" + api_variant: "ha" + host_platform: "esp32" + +packages: + host: !include ../hosts/esp32.yaml + base: !include ../base.yaml + ota_updates: !include ../components/ota-updates.yaml + ota_updates_default_dev: !include ../components/ota-updates-default-dev.yaml + dashboard_import: !include ../components/dashboard-import.yaml + homeassistant: !include ../components/homeassistant.yaml + debug_utilities: !include ../components/debug-utilities.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + addon_nuki_bridge: !include ../components/nuki-bridge.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32.ha.nuki-bridge.yaml b/firmware/configurations/esp32.ha.nuki-bridge.yaml new file mode 100644 index 00000000..ea62e2ce --- /dev/null +++ b/firmware/configurations/esp32.ha.nuki-bridge.yaml @@ -0,0 +1,17 @@ +substitutions: + branch: "master" + firmware_type: "nuki-bridge" + api_variant: "ha" + host_platform: "esp32" + +packages: + host: !include ../hosts/esp32.yaml + base: !include ../base.yaml + ota_updates: !include ../components/ota-updates.yaml + dashboard_import: !include ../components/dashboard-import.yaml + homeassistant: !include ../components/homeassistant.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + addon_nuki_bridge: !include ../components/nuki-bridge.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32.ha.stock.dev.yaml b/firmware/configurations/esp32.ha.stock.dev.yaml new file mode 100644 index 00000000..3feadb0a --- /dev/null +++ b/firmware/configurations/esp32.ha.stock.dev.yaml @@ -0,0 +1,18 @@ +substitutions: + branch: "dev" + firmware_type: "stock" + api_variant: "ha" + host_platform: "esp32" + +packages: + host: !include ../hosts/esp32.yaml + base: !include ../base.yaml + ota_updates: !include ../components/ota-updates.yaml + ota_updates_default_dev: !include ../components/ota-updates-default-dev.yaml + dashboard_import: !include ../components/dashboard-import.yaml + homeassistant: !include ../components/homeassistant.yaml + debug_utilities: !include ../components/debug-utilities.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32.ha.stock.yaml b/firmware/configurations/esp32.ha.stock.yaml new file mode 100644 index 00000000..7c0b86c0 --- /dev/null +++ b/firmware/configurations/esp32.ha.stock.yaml @@ -0,0 +1,16 @@ +substitutions: + branch: "master" + firmware_type: "stock" + api_variant: "ha" + host_platform: "esp32" + +packages: + host: !include ../hosts/esp32.yaml + base: !include ../base.yaml + ota_updates: !include ../components/ota-updates.yaml + dashboard_import: !include ../components/dashboard-import.yaml + homeassistant: !include ../components/homeassistant.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32.mqtt.nuki-bridge.dev.yaml b/firmware/configurations/esp32.mqtt.nuki-bridge.dev.yaml new file mode 100644 index 00000000..c11a5d14 --- /dev/null +++ b/firmware/configurations/esp32.mqtt.nuki-bridge.dev.yaml @@ -0,0 +1,16 @@ +substitutions: + branch: "dev" + firmware_type: "nuki-bridge" + api_variant: "mqtt" + host_platform: "esp32" + +packages: + host: !include ../hosts/esp32.yaml + base: !include ../base.yaml + mqtt: !include ../components/mqtt.yaml + debug_utilities: !include ../components/debug-utilities.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + addon_nuki_bridge: !include ../components/nuki-bridge.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32.mqtt.nuki-bridge.yaml b/firmware/configurations/esp32.mqtt.nuki-bridge.yaml new file mode 100644 index 00000000..264daa8b --- /dev/null +++ b/firmware/configurations/esp32.mqtt.nuki-bridge.yaml @@ -0,0 +1,15 @@ +substitutions: + branch: "master" + firmware_type: "nuki-bridge" + api_variant: "mqtt" + host_platform: "esp32" + +packages: + host: !include ../hosts/esp32.yaml + base: !include ../base.yaml + mqtt: !include ../components/mqtt.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + addon_nuki_bridge: !include ../components/nuki-bridge.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32.mqtt.stock.dev.yaml b/firmware/configurations/esp32.mqtt.stock.dev.yaml new file mode 100644 index 00000000..58526931 --- /dev/null +++ b/firmware/configurations/esp32.mqtt.stock.dev.yaml @@ -0,0 +1,15 @@ +substitutions: + branch: "dev" + firmware_type: "stock" + api_variant: "mqtt" + host_platform: "esp32" + +packages: + host: !include ../hosts/esp32.yaml + base: !include ../base.yaml + mqtt: !include ../components/mqtt.yaml + debug_utilities: !include ../components/debug-utilities.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/configurations/esp32.mqtt.stock.yaml b/firmware/configurations/esp32.mqtt.stock.yaml new file mode 100644 index 00000000..ff045dc5 --- /dev/null +++ b/firmware/configurations/esp32.mqtt.stock.yaml @@ -0,0 +1,14 @@ +substitutions: + branch: "master" + firmware_type: "stock" + api_variant: "mqtt" + host_platform: "esp32" + +packages: + host: !include ../hosts/esp32.yaml + base: !include ../base.yaml + mqtt: !include ../components/mqtt.yaml + pattern_events: !include ../components/pattern-events.yaml + ring_to_open: !include ../components/ring-to-open.yaml + intercom_settings: !include ../components/intercom-settings.yaml + interactive_setup: !include ../components/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/doorman-nuki-bridge.dev.yaml b/firmware/doorman-nuki-bridge.dev.yaml deleted file mode 100644 index 18ea0ef9..00000000 --- a/firmware/doorman-nuki-bridge.dev.yaml +++ /dev/null @@ -1,3 +0,0 @@ -# This file provides backwards compatibility (< 2025.1.0) -packages: - base: !include ha-doorman-nuki-bridge.dev.yaml \ No newline at end of file diff --git a/firmware/doorman-nuki-bridge.yaml b/firmware/doorman-nuki-bridge.yaml deleted file mode 100644 index 19311a9a..00000000 --- a/firmware/doorman-nuki-bridge.yaml +++ /dev/null @@ -1,3 +0,0 @@ -# This file provides backwards compatibility (< 2025.1.0) -packages: - base: !include ha-doorman-nuki-bridge.yaml \ No newline at end of file diff --git a/firmware/doorman-stock.dev.yaml b/firmware/doorman-stock.dev.yaml deleted file mode 100644 index 25c89362..00000000 --- a/firmware/doorman-stock.dev.yaml +++ /dev/null @@ -1,3 +0,0 @@ -# This file provides backwards compatibility (< 2025.1.0) -packages: - base: !include ha-doorman-stock.dev.yaml \ No newline at end of file diff --git a/firmware/doorman-stock.yaml b/firmware/doorman-stock.yaml deleted file mode 100644 index d223c90e..00000000 --- a/firmware/doorman-stock.yaml +++ /dev/null @@ -1,3 +0,0 @@ -# This file provides backwards compatibility (< 2025.1.0) -packages: - base: !include ha-doorman-stock.yaml \ No newline at end of file diff --git a/firmware/examples/esp32-s3-oct.ha.nuki-bridge.example.dev.yaml b/firmware/examples/esp32-s3-oct.ha.nuki-bridge.example.dev.yaml new file mode 100644 index 00000000..1648fe39 --- /dev/null +++ b/firmware/examples/esp32-s3-oct.ha.nuki-bridge.example.dev.yaml @@ -0,0 +1,20 @@ +# Doorman Nuki Bridge Firmware (MQTT) +# Base Board ESP32-S3-OCT + +# You can change a few options here. +substitutions: + name: "doorman-s3" + friendly_name: "Doorman S3" + # log_level: "ERROR" + # led_pin: "GPIO1" + # rgb_led_pin: "GPIO2" + # relay_pin: "GPIO42" + # external_button_pin: "GPIO41" + +# Import Doorman Firmware Config +packages: + AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/esp32-s3-oct.ha.nuki-bridge.dev.yaml@dev + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password \ No newline at end of file diff --git a/firmware/examples/esp32-s3-oct.ha.nuki-bridge.example.yaml b/firmware/examples/esp32-s3-oct.ha.nuki-bridge.example.yaml new file mode 100644 index 00000000..20bf767e --- /dev/null +++ b/firmware/examples/esp32-s3-oct.ha.nuki-bridge.example.yaml @@ -0,0 +1,20 @@ +# Doorman Nuki Bridge Firmware (MQTT) +# Base Board ESP32-S3-OCT + +# You can change a few options here. +substitutions: + name: "doorman-s3" + friendly_name: "Doorman S3" + # log_level: "ERROR" + # led_pin: "GPIO1" + # rgb_led_pin: "GPIO2" + # relay_pin: "GPIO42" + # external_button_pin: "GPIO41" + +# Import Doorman Firmware Config +packages: + AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/esp32-s3-oct.ha.nuki-bridge.yaml@master + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password \ No newline at end of file diff --git a/firmware/examples/esp32-s3-oct.ha.stock.example.dev.yaml b/firmware/examples/esp32-s3-oct.ha.stock.example.dev.yaml new file mode 100644 index 00000000..546730d4 --- /dev/null +++ b/firmware/examples/esp32-s3-oct.ha.stock.example.dev.yaml @@ -0,0 +1,20 @@ +# Doorman Stock Firmware (MQTT) +# Base Board ESP32-S3-OCT + +# You can change a few options here. +substitutions: + name: "doorman-s3" + friendly_name: "Doorman S3" + # log_level: "ERROR" + # led_pin: "GPIO1" + # rgb_led_pin: "GPIO2" + # relay_pin: "GPIO42" + # external_button_pin: "GPIO41" + +# Import Doorman Firmware Config +packages: + AzonInc.Doorman: github://azoninc/doorman/firmware/esp32-s3-oct.ha.stock.dev.yaml@dev + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password \ No newline at end of file diff --git a/firmware/examples/esp32-s3-oct.ha.stock.example.yaml b/firmware/examples/esp32-s3-oct.ha.stock.example.yaml new file mode 100644 index 00000000..2c2adebf --- /dev/null +++ b/firmware/examples/esp32-s3-oct.ha.stock.example.yaml @@ -0,0 +1,20 @@ +# Doorman Stock Firmware (MQTT) +# Base Board ESP32-S3-OCT + +# You can change a few options here. +substitutions: + name: "doorman-s3" + friendly_name: "Doorman S3" + # log_level: "ERROR" + # led_pin: "GPIO1" + # rgb_led_pin: "GPIO2" + # relay_pin: "GPIO42" + # external_button_pin: "GPIO41" + +# Import Doorman Firmware Config +packages: + AzonInc.Doorman: github://azoninc/doorman/firmware/esp32-s3-oct.ha.stock.yaml@master + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password \ No newline at end of file diff --git a/firmware/examples/esp32-s3-oct.mqtt.nuki-bridge.example.dev.yaml b/firmware/examples/esp32-s3-oct.mqtt.nuki-bridge.example.dev.yaml new file mode 100644 index 00000000..7a0c68cc --- /dev/null +++ b/firmware/examples/esp32-s3-oct.mqtt.nuki-bridge.example.dev.yaml @@ -0,0 +1,20 @@ +# Doorman Nuki Bridge Firmware (MQTT) +# Base Board ESP32-S3-OCT + +# You can change a few options here. +substitutions: + name: "doorman-s3" + friendly_name: "Doorman S3" + # log_level: "ERROR" + # led_pin: "GPIO1" + # rgb_led_pin: "GPIO2" + # relay_pin: "GPIO42" + # external_button_pin: "GPIO41" + +# Import Doorman Firmware Config +packages: + AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/esp32-s3-oct.mqtt.nuki-bridge.dev.yaml@dev + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password \ No newline at end of file diff --git a/firmware/examples/esp32-s3-oct.mqtt.nuki-bridge.example.yaml b/firmware/examples/esp32-s3-oct.mqtt.nuki-bridge.example.yaml new file mode 100644 index 00000000..fc3d4530 --- /dev/null +++ b/firmware/examples/esp32-s3-oct.mqtt.nuki-bridge.example.yaml @@ -0,0 +1,20 @@ +# Doorman Nuki Bridge Firmware (MQTT) +# Base Board ESP32-S3-OCT + +# You can change a few options here. +substitutions: + name: "doorman-s3" + friendly_name: "Doorman S3" + # log_level: "ERROR" + # led_pin: "GPIO1" + # rgb_led_pin: "GPIO2" + # relay_pin: "GPIO42" + # external_button_pin: "GPIO41" + +# Import Doorman Firmware Config +packages: + AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/esp32-s3-oct.mqtt.nuki-bridge.yaml@master + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password \ No newline at end of file diff --git a/firmware/examples/esp32-s3-oct.mqtt.stock.example.dev.yaml b/firmware/examples/esp32-s3-oct.mqtt.stock.example.dev.yaml new file mode 100644 index 00000000..6c1fe861 --- /dev/null +++ b/firmware/examples/esp32-s3-oct.mqtt.stock.example.dev.yaml @@ -0,0 +1,20 @@ +# Doorman Stock Firmware (MQTT) +# Base Board ESP32-S3-OCT + +# You can change a few options here. +substitutions: + name: "doorman-s3" + friendly_name: "Doorman S3" + # log_level: "ERROR" + # led_pin: "GPIO1" + # rgb_led_pin: "GPIO2" + # relay_pin: "GPIO42" + # external_button_pin: "GPIO41" + +# Import Doorman Firmware Config +packages: + AzonInc.Doorman: github://azoninc/doorman/firmware/esp32-s3-oct.mqtt.stock.dev.yaml@dev + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password \ No newline at end of file diff --git a/firmware/examples/esp32-s3-oct.mqtt.stock.example.yaml b/firmware/examples/esp32-s3-oct.mqtt.stock.example.yaml new file mode 100644 index 00000000..1d239960 --- /dev/null +++ b/firmware/examples/esp32-s3-oct.mqtt.stock.example.yaml @@ -0,0 +1,20 @@ +# Doorman Stock Firmware (MQTT) +# Base Board ESP32-S3-OCT + +# You can change a few options here. +substitutions: + name: "doorman-s3" + friendly_name: "Doorman S3" + # log_level: "ERROR" + # led_pin: "GPIO1" + # rgb_led_pin: "GPIO2" + # relay_pin: "GPIO42" + # external_button_pin: "GPIO41" + +# Import Doorman Firmware Config +packages: + AzonInc.Doorman: github://azoninc/doorman/firmware/esp32-s3-oct.mqtt.stock.yaml@master + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password \ No newline at end of file diff --git a/firmware/examples/esp32-s3.ha.nuki-bridge.example.dev.yaml b/firmware/examples/esp32-s3.ha.nuki-bridge.example.dev.yaml new file mode 100644 index 00000000..0f09692a --- /dev/null +++ b/firmware/examples/esp32-s3.ha.nuki-bridge.example.dev.yaml @@ -0,0 +1,20 @@ +# Doorman Nuki Bridge Firmware (MQTT) +# Base Board ESP32-S3 + +# You can change a few options here. +substitutions: + name: "doorman-s3" + friendly_name: "Doorman S3" + # log_level: "ERROR" + # led_pin: "GPIO1" + # rgb_led_pin: "GPIO2" + # relay_pin: "GPIO42" + # external_button_pin: "GPIO41" + +# Import Doorman Firmware Config +packages: + AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/esp32-s3.ha.nuki-bridge.dev.yaml@dev + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password \ No newline at end of file diff --git a/firmware/examples/esp32-s3.ha.nuki-bridge.example.yaml b/firmware/examples/esp32-s3.ha.nuki-bridge.example.yaml new file mode 100644 index 00000000..f2918c86 --- /dev/null +++ b/firmware/examples/esp32-s3.ha.nuki-bridge.example.yaml @@ -0,0 +1,20 @@ +# Doorman Nuki Bridge Firmware (MQTT) +# Base Board ESP32-S3 + +# You can change a few options here. +substitutions: + name: "doorman-s3" + friendly_name: "Doorman S3" + # log_level: "ERROR" + # led_pin: "GPIO1" + # rgb_led_pin: "GPIO2" + # relay_pin: "GPIO42" + # external_button_pin: "GPIO41" + +# Import Doorman Firmware Config +packages: + AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/esp32-s3.ha.nuki-bridge.yaml@master + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password \ No newline at end of file diff --git a/firmware/examples/esp32-s3.ha.stock.example.dev.yaml b/firmware/examples/esp32-s3.ha.stock.example.dev.yaml new file mode 100644 index 00000000..729d6908 --- /dev/null +++ b/firmware/examples/esp32-s3.ha.stock.example.dev.yaml @@ -0,0 +1,20 @@ +# Doorman Stock Firmware (MQTT) +# Base Board ESP32-S3 + +# You can change a few options here. +substitutions: + name: "doorman-s3" + friendly_name: "Doorman S3" + # log_level: "ERROR" + # led_pin: "GPIO1" + # rgb_led_pin: "GPIO2" + # relay_pin: "GPIO42" + # external_button_pin: "GPIO41" + +# Import Doorman Firmware Config +packages: + AzonInc.Doorman: github://azoninc/doorman/firmware/esp32-s3.ha.stock.dev.yaml@dev + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password \ No newline at end of file diff --git a/firmware/examples/esp32-s3.ha.stock.example.yaml b/firmware/examples/esp32-s3.ha.stock.example.yaml new file mode 100644 index 00000000..7d26a120 --- /dev/null +++ b/firmware/examples/esp32-s3.ha.stock.example.yaml @@ -0,0 +1,20 @@ +# Doorman Stock Firmware (MQTT) +# Base Board ESP32-S3 + +# You can change a few options here. +substitutions: + name: "doorman-s3" + friendly_name: "Doorman S3" + # log_level: "ERROR" + # led_pin: "GPIO1" + # rgb_led_pin: "GPIO2" + # relay_pin: "GPIO42" + # external_button_pin: "GPIO41" + +# Import Doorman Firmware Config +packages: + AzonInc.Doorman: github://azoninc/doorman/firmware/esp32-s3.ha.stock.yaml@master + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password \ No newline at end of file diff --git a/firmware/examples/esp32-s3.mqtt.nuki-bridge.example.dev.yaml b/firmware/examples/esp32-s3.mqtt.nuki-bridge.example.dev.yaml new file mode 100644 index 00000000..a92f3ac4 --- /dev/null +++ b/firmware/examples/esp32-s3.mqtt.nuki-bridge.example.dev.yaml @@ -0,0 +1,20 @@ +# Doorman Nuki Bridge Firmware (MQTT) +# Base Board ESP32-S3 + +# You can change a few options here. +substitutions: + name: "doorman-s3" + friendly_name: "Doorman S3" + # log_level: "ERROR" + # led_pin: "GPIO1" + # rgb_led_pin: "GPIO2" + # relay_pin: "GPIO42" + # external_button_pin: "GPIO41" + +# Import Doorman Firmware Config +packages: + AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/esp32-s3.mqtt.nuki-bridge.dev.yaml@dev + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password \ No newline at end of file diff --git a/firmware/examples/esp32-s3.mqtt.nuki-bridge.example.yaml b/firmware/examples/esp32-s3.mqtt.nuki-bridge.example.yaml new file mode 100644 index 00000000..ca8430a4 --- /dev/null +++ b/firmware/examples/esp32-s3.mqtt.nuki-bridge.example.yaml @@ -0,0 +1,20 @@ +# Doorman Nuki Bridge Firmware (MQTT) +# Base Board ESP32-S3 + +# You can change a few options here. +substitutions: + name: "doorman-s3" + friendly_name: "Doorman S3" + # log_level: "ERROR" + # led_pin: "GPIO1" + # rgb_led_pin: "GPIO2" + # relay_pin: "GPIO42" + # external_button_pin: "GPIO41" + +# Import Doorman Firmware Config +packages: + AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/esp32-s3.mqtt.nuki-bridge.yaml@master + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password \ No newline at end of file diff --git a/firmware/examples/esp32-s3.mqtt.stock.example.dev.yaml b/firmware/examples/esp32-s3.mqtt.stock.example.dev.yaml new file mode 100644 index 00000000..ab311a77 --- /dev/null +++ b/firmware/examples/esp32-s3.mqtt.stock.example.dev.yaml @@ -0,0 +1,20 @@ +# Doorman Stock Firmware (MQTT) +# Base Board ESP32-S3 + +# You can change a few options here. +substitutions: + name: "doorman-s3" + friendly_name: "Doorman S3" + # log_level: "ERROR" + # led_pin: "GPIO1" + # rgb_led_pin: "GPIO2" + # relay_pin: "GPIO42" + # external_button_pin: "GPIO41" + +# Import Doorman Firmware Config +packages: + AzonInc.Doorman: github://azoninc/doorman/firmware/esp32-s3.mqtt.stock.dev.yaml@dev + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password \ No newline at end of file diff --git a/firmware/examples/esp32-s3.mqtt.stock.example.yaml b/firmware/examples/esp32-s3.mqtt.stock.example.yaml new file mode 100644 index 00000000..d838f891 --- /dev/null +++ b/firmware/examples/esp32-s3.mqtt.stock.example.yaml @@ -0,0 +1,20 @@ +# Doorman Stock Firmware (MQTT) +# Base Board ESP32-S3 + +# You can change a few options here. +substitutions: + name: "doorman-s3" + friendly_name: "Doorman S3" + # log_level: "ERROR" + # led_pin: "GPIO1" + # rgb_led_pin: "GPIO2" + # relay_pin: "GPIO42" + # external_button_pin: "GPIO41" + +# Import Doorman Firmware Config +packages: + AzonInc.Doorman: github://azoninc/doorman/firmware/esp32-s3.mqtt.stock.yaml@master + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password \ No newline at end of file diff --git a/firmware/examples/ha-nuki-bridge.example.yaml b/firmware/examples/esp32.ha.nuki-bridge.example.dev.yaml similarity index 74% rename from firmware/examples/ha-nuki-bridge.example.yaml rename to firmware/examples/esp32.ha.nuki-bridge.example.dev.yaml index 332825b5..0b643082 100644 --- a/firmware/examples/ha-nuki-bridge.example.yaml +++ b/firmware/examples/esp32.ha.nuki-bridge.example.dev.yaml @@ -1,4 +1,5 @@ -# Doorman S3 Nuki Bridge Firmware +# Doorman Nuki Bridge Firmware (MQTT) +# Base Board ESP32 # You can change a few options here. substitutions: @@ -10,9 +11,9 @@ substitutions: # relay_pin: "GPIO42" # external_button_pin: "GPIO41" -# Import Doorman Nuki Bridge Firmware Config +# Import Doorman Firmware Config packages: - AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/ha-doorman-nuki-bridge.yaml@master + AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/esp32.ha.nuki-bridge.dev.yaml@dev wifi: ssid: !secret wifi_ssid diff --git a/firmware/examples/ha-nuki-bridge.example.dev.yaml b/firmware/examples/esp32.ha.nuki-bridge.example.yaml similarity index 75% rename from firmware/examples/ha-nuki-bridge.example.dev.yaml rename to firmware/examples/esp32.ha.nuki-bridge.example.yaml index 48f86913..37e51cb9 100644 --- a/firmware/examples/ha-nuki-bridge.example.dev.yaml +++ b/firmware/examples/esp32.ha.nuki-bridge.example.yaml @@ -1,4 +1,5 @@ -# Doorman S3 Nuki Bridge Firmware +# Doorman Nuki Bridge Firmware (MQTT) +# Base Board ESP32 # You can change a few options here. substitutions: @@ -10,9 +11,9 @@ substitutions: # relay_pin: "GPIO42" # external_button_pin: "GPIO41" -# Import Doorman Nuki Bridge Firmware Config +# Import Doorman Firmware Config packages: - AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/ha-doorman-nuki-bridge.dev.yaml@dev + AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/esp32.ha.nuki-bridge.yaml@master wifi: ssid: !secret wifi_ssid diff --git a/firmware/examples/ha-stock.example.yaml b/firmware/examples/esp32.ha.stock.example.dev.yaml similarity index 65% rename from firmware/examples/ha-stock.example.yaml rename to firmware/examples/esp32.ha.stock.example.dev.yaml index cbd25956..6bb40c58 100644 --- a/firmware/examples/ha-stock.example.yaml +++ b/firmware/examples/esp32.ha.stock.example.dev.yaml @@ -1,4 +1,5 @@ -# Doorman S3 Stock Firmware +# Doorman Stock Firmware (MQTT) +# Base Board ESP32 # You can change a few options here. substitutions: @@ -10,9 +11,9 @@ substitutions: # relay_pin: "GPIO42" # external_button_pin: "GPIO41" -# Import Doorman Stock Firmware Config +# Import Doorman Firmware Config packages: - AzonInc.Doorman: github://azoninc/doorman/firmware/ha-doorman-stock.yaml@master + AzonInc.Doorman: github://azoninc/doorman/firmware/esp32.ha.stock.dev.yaml@dev wifi: ssid: !secret wifi_ssid diff --git a/firmware/examples/ha-stock.example.dev.yaml b/firmware/examples/esp32.ha.stock.example.yaml similarity index 65% rename from firmware/examples/ha-stock.example.dev.yaml rename to firmware/examples/esp32.ha.stock.example.yaml index 574f190a..17f4ac5c 100644 --- a/firmware/examples/ha-stock.example.dev.yaml +++ b/firmware/examples/esp32.ha.stock.example.yaml @@ -1,4 +1,5 @@ -# Doorman S3 Stock Firmware +# Doorman Stock Firmware (MQTT) +# Base Board ESP32 # You can change a few options here. substitutions: @@ -10,9 +11,9 @@ substitutions: # relay_pin: "GPIO42" # external_button_pin: "GPIO41" -# Import Doorman Stock Firmware Config +# Import Doorman Firmware Config packages: - AzonInc.Doorman: github://azoninc/doorman/firmware/ha-doorman-stock.dev.yaml@dev + AzonInc.Doorman: github://azoninc/doorman/firmware/esp32.ha.stock.yaml@master wifi: ssid: !secret wifi_ssid diff --git a/firmware/examples/nuki-bridge.example.yaml b/firmware/examples/esp32.mqtt.nuki-bridge.example.dev.yaml similarity index 74% rename from firmware/examples/nuki-bridge.example.yaml rename to firmware/examples/esp32.mqtt.nuki-bridge.example.dev.yaml index 332825b5..08c6e622 100644 --- a/firmware/examples/nuki-bridge.example.yaml +++ b/firmware/examples/esp32.mqtt.nuki-bridge.example.dev.yaml @@ -1,4 +1,5 @@ -# Doorman S3 Nuki Bridge Firmware +# Doorman Nuki Bridge Firmware (MQTT) +# Base Board ESP32 # You can change a few options here. substitutions: @@ -10,9 +11,9 @@ substitutions: # relay_pin: "GPIO42" # external_button_pin: "GPIO41" -# Import Doorman Nuki Bridge Firmware Config +# Import Doorman Firmware Config packages: - AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/ha-doorman-nuki-bridge.yaml@master + AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/esp32.mqtt.nuki-bridge.dev.yaml@dev wifi: ssid: !secret wifi_ssid diff --git a/firmware/examples/nuki-bridge.example.dev.yaml b/firmware/examples/esp32.mqtt.nuki-bridge.example.yaml similarity index 74% rename from firmware/examples/nuki-bridge.example.dev.yaml rename to firmware/examples/esp32.mqtt.nuki-bridge.example.yaml index 48f86913..6602ac47 100644 --- a/firmware/examples/nuki-bridge.example.dev.yaml +++ b/firmware/examples/esp32.mqtt.nuki-bridge.example.yaml @@ -1,4 +1,5 @@ -# Doorman S3 Nuki Bridge Firmware +# Doorman Nuki Bridge Firmware (MQTT) +# Base Board ESP32 # You can change a few options here. substitutions: @@ -10,9 +11,9 @@ substitutions: # relay_pin: "GPIO42" # external_button_pin: "GPIO41" -# Import Doorman Nuki Bridge Firmware Config +# Import Doorman Firmware Config packages: - AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/ha-doorman-nuki-bridge.dev.yaml@dev + AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/esp32.mqtt.nuki-bridge.yaml@master wifi: ssid: !secret wifi_ssid diff --git a/firmware/examples/stock.example.dev.yaml b/firmware/examples/esp32.mqtt.stock.example.dev.yaml similarity index 68% rename from firmware/examples/stock.example.dev.yaml rename to firmware/examples/esp32.mqtt.stock.example.dev.yaml index 574f190a..5d376048 100644 --- a/firmware/examples/stock.example.dev.yaml +++ b/firmware/examples/esp32.mqtt.stock.example.dev.yaml @@ -1,4 +1,5 @@ -# Doorman S3 Stock Firmware +# Doorman Stock Firmware (MQTT) +# Base Board ESP32 # You can change a few options here. substitutions: @@ -10,9 +11,9 @@ substitutions: # relay_pin: "GPIO42" # external_button_pin: "GPIO41" -# Import Doorman Stock Firmware Config +# Import Doorman Firmware Config packages: - AzonInc.Doorman: github://azoninc/doorman/firmware/ha-doorman-stock.dev.yaml@dev + AzonInc.Doorman: github://azoninc/doorman/firmware/esp32.mqtt.stock.dev.yaml@dev wifi: ssid: !secret wifi_ssid diff --git a/firmware/examples/stock.example.yaml b/firmware/examples/esp32.mqtt.stock.example.yaml similarity index 68% rename from firmware/examples/stock.example.yaml rename to firmware/examples/esp32.mqtt.stock.example.yaml index cbd25956..f45e9d64 100644 --- a/firmware/examples/stock.example.yaml +++ b/firmware/examples/esp32.mqtt.stock.example.yaml @@ -1,4 +1,5 @@ -# Doorman S3 Stock Firmware +# Doorman Stock Firmware (MQTT) +# Base Board ESP32 # You can change a few options here. substitutions: @@ -10,9 +11,9 @@ substitutions: # relay_pin: "GPIO42" # external_button_pin: "GPIO41" -# Import Doorman Stock Firmware Config +# Import Doorman Firmware Config packages: - AzonInc.Doorman: github://azoninc/doorman/firmware/ha-doorman-stock.yaml@master + AzonInc.Doorman: github://azoninc/doorman/firmware/esp32.mqtt.stock.yaml@master wifi: ssid: !secret wifi_ssid diff --git a/firmware/examples/mqtt-nuki-bridge.example.dev.yaml b/firmware/examples/mqtt-nuki-bridge.example.dev.yaml deleted file mode 100644 index 29d9d898..00000000 --- a/firmware/examples/mqtt-nuki-bridge.example.dev.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Doorman S3 Nuki Bridge Firmware (MQTT) - -# You can change a few options here. -substitutions: - name: "doorman-s3" - friendly_name: "Doorman S3" - # log_level: "ERROR" - # led_pin: "GPIO1" - # rgb_led_pin: "GPIO2" - # relay_pin: "GPIO42" - # external_button_pin: "GPIO41" - -# Import Doorman Nuki Bridge Firmware Config -packages: - AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/mqtt-doorman-nuki-bridge.dev.yaml@dev - -wifi: - ssid: !secret wifi_ssid - password: !secret wifi_password - -mqtt: - broker: 10.0.0.2 - username: "mqtt" - password: "password" \ No newline at end of file diff --git a/firmware/examples/mqtt-nuki-bridge.example.yaml b/firmware/examples/mqtt-nuki-bridge.example.yaml deleted file mode 100644 index e1a12619..00000000 --- a/firmware/examples/mqtt-nuki-bridge.example.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Doorman S3 Nuki Bridge Firmware (MQTT) - -# You can change a few options here. -substitutions: - name: "doorman-s3" - friendly_name: "Doorman S3" - # log_level: "ERROR" - # led_pin: "GPIO1" - # rgb_led_pin: "GPIO2" - # relay_pin: "GPIO42" - # external_button_pin: "GPIO41" - -# Import Doorman Nuki Bridge Firmware Config -packages: - AzonInc.Doorman-Nuki-Bridge: github://azoninc/doorman/firmware/mqtt-doorman-nuki-bridge.yaml@master - -wifi: - ssid: !secret wifi_ssid - password: !secret wifi_password - -mqtt: - broker: 10.0.0.2 - username: "mqtt" - password: "password" \ No newline at end of file diff --git a/firmware/examples/mqtt-stock.example.dev.yaml b/firmware/examples/mqtt-stock.example.dev.yaml deleted file mode 100644 index 007692bf..00000000 --- a/firmware/examples/mqtt-stock.example.dev.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Doorman S3 Stock Firmware (MQTT) - -# You can change a few options here. -substitutions: - name: "doorman-s3" - friendly_name: "Doorman S3" - # log_level: "ERROR" - # led_pin: "GPIO1" - # rgb_led_pin: "GPIO2" - # relay_pin: "GPIO42" - # external_button_pin: "GPIO41" - -# Import Doorman Stock Firmware Config -packages: - AzonInc.Doorman: github://azoninc/doorman/firmware/mqtt-doorman-stock.dev.yaml@dev - -wifi: - ssid: !secret wifi_ssid - password: !secret wifi_password - -mqtt: - broker: 10.0.0.2 - username: "mqtt" - password: "password" \ No newline at end of file diff --git a/firmware/examples/mqtt-stock.example.yaml b/firmware/examples/mqtt-stock.example.yaml deleted file mode 100644 index 96f1bf0b..00000000 --- a/firmware/examples/mqtt-stock.example.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Doorman S3 Stock Firmware (MQTT) - -# You can change a few options here. -substitutions: - name: "doorman-s3" - friendly_name: "Doorman S3" - # log_level: "ERROR" - # led_pin: "GPIO1" - # rgb_led_pin: "GPIO2" - # relay_pin: "GPIO42" - # external_button_pin: "GPIO41" - -# Import Doorman Stock Firmware Config -packages: - AzonInc.Doorman: github://azoninc/doorman/firmware/mqtt-doorman-stock.yaml@master - -wifi: - ssid: !secret wifi_ssid - password: !secret wifi_password - -mqtt: - broker: 10.0.0.2 - username: "mqtt" - password: "password" \ No newline at end of file diff --git a/firmware/ha-doorman-nuki-bridge.dev.yaml b/firmware/ha-doorman-nuki-bridge.dev.yaml deleted file mode 100644 index 64b12905..00000000 --- a/firmware/ha-doorman-nuki-bridge.dev.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# Helper File: Compile dev firmware -dashboard_import: - package_import_url: github://azoninc/doorman/firmware/examples/ha-nuki-bridge.example.dev.yaml@dev - -packages: - base: !include ha-doorman-nuki-bridge.yaml - debug_utilities: !include addons/debug-utilities.yaml - -external_components: - - source: github://azoninc/Doorman@dev - components: [ tc_bus ] - refresh: 60s - -switch: - - id: !extend dev_firmware - restore_mode: RESTORE_DEFAULT_ON \ No newline at end of file diff --git a/firmware/ha-doorman-nuki-bridge.yaml b/firmware/ha-doorman-nuki-bridge.yaml deleted file mode 100644 index eb912c97..00000000 --- a/firmware/ha-doorman-nuki-bridge.yaml +++ /dev/null @@ -1,21 +0,0 @@ -substitutions: - update_url_stable: "https://doorman.azon.ai/firmware/release/doorman-nuki-bridge/manifest.json" - update_url_dev: "https://doorman-dev.surge.sh/firmware/release/doorman-nuki-bridge/manifest.json" - -dashboard_import: - package_import_url: github://azoninc/doorman/firmware/examples/ha-nuki-bridge.example.yaml@master - import_full_config: true - -packages: - host: !include host/esp32-s3-oct.yaml - base: !include base.yaml - homeassistant: !include addons/homeassistant.yaml - pattern_events: !include addons/pattern-events.yaml - ring_to_open: !include addons/ring-to-open.yaml - intercom_settings: !include addons/intercom-settings.yaml - addon_nuki_bridge: !include addons/nuki-bridge.yaml - interactive_setup: !include addons/interactive-setup.yaml - -esphome: - project: - name: "AzonInc.Doorman-Nuki-Bridge" \ No newline at end of file diff --git a/firmware/ha-doorman-stock.dev.yaml b/firmware/ha-doorman-stock.dev.yaml deleted file mode 100644 index 875060e8..00000000 --- a/firmware/ha-doorman-stock.dev.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# Helper File: Compile dev firmware -dashboard_import: - package_import_url: github://azoninc/doorman/firmware/examples/ha-stock.example.dev.yaml@dev - -packages: - base: !include ha-doorman-stock.yaml - debug_utilities: !include addons/debug-utilities.yaml - -external_components: - - source: github://azoninc/Doorman@dev - components: [ tc_bus ] - refresh: 60s - -switch: - - id: !extend dev_firmware - restore_mode: RESTORE_DEFAULT_ON \ No newline at end of file diff --git a/firmware/ha-doorman-stock.yaml b/firmware/ha-doorman-stock.yaml deleted file mode 100644 index c76c1496..00000000 --- a/firmware/ha-doorman-stock.yaml +++ /dev/null @@ -1,12 +0,0 @@ -dashboard_import: - package_import_url: github://azoninc/doorman/firmware/examples/ha-stock.example.yaml@master - import_full_config: true - -packages: - host: !include host/esp32-s3-oct.yaml - base: !include base.yaml - homeassistant: !include addons/homeassistant.yaml - pattern_events: !include addons/pattern-events.yaml - ring_to_open: !include addons/ring-to-open.yaml - intercom_settings: !include addons/intercom-settings.yaml - interactive_setup: !include addons/interactive-setup.yaml \ No newline at end of file diff --git a/firmware/host/esp32-s3-oct.yaml b/firmware/hosts/esp32-s3-oct.yaml similarity index 100% rename from firmware/host/esp32-s3-oct.yaml rename to firmware/hosts/esp32-s3-oct.yaml diff --git a/firmware/host/esp32-s3.yaml b/firmware/hosts/esp32-s3.yaml similarity index 100% rename from firmware/host/esp32-s3.yaml rename to firmware/hosts/esp32-s3.yaml diff --git a/firmware/host/esp8266.yaml b/firmware/hosts/esp8266.yaml similarity index 100% rename from firmware/host/esp8266.yaml rename to firmware/hosts/esp8266.yaml diff --git a/firmware/mqtt-doorman-nuki-bridge.dev.yaml b/firmware/mqtt-doorman-nuki-bridge.dev.yaml deleted file mode 100644 index a320fef1..00000000 --- a/firmware/mqtt-doorman-nuki-bridge.dev.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# Helper File: Compile dev firmware -packages: - base: !include mqtt-doorman-nuki-bridge.yaml - debug_utilities: !include addons/debug-utilities.yaml - -external_components: - - source: github://azoninc/Doorman@dev - components: [ tc_bus ] - refresh: 60s - -switch: - - id: !extend dev_firmware - restore_mode: RESTORE_DEFAULT_ON \ No newline at end of file diff --git a/firmware/mqtt-doorman-nuki-bridge.yaml b/firmware/mqtt-doorman-nuki-bridge.yaml deleted file mode 100644 index 4a7c7848..00000000 --- a/firmware/mqtt-doorman-nuki-bridge.yaml +++ /dev/null @@ -1,13 +0,0 @@ -packages: - host: !include host/esp32-s3-oct.yaml - base: !include base.yaml - mqtt: !include addons/mqtt.yaml - pattern_events: !include addons/pattern-events.yaml - ring_to_open: !include addons/ring-to-open.yaml - intercom_settings: !include addons/intercom-settings.yaml - addon_nuki_bridge: !include addons/nuki-bridge.yaml - interactive_setup: !include addons/interactive-setup.yaml - -esphome: - project: - name: "AzonInc.Doorman-Nuki-Bridge" \ No newline at end of file diff --git a/firmware/mqtt-doorman-stock.dev.yaml b/firmware/mqtt-doorman-stock.dev.yaml deleted file mode 100644 index 6b2154ab..00000000 --- a/firmware/mqtt-doorman-stock.dev.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# Helper File: Compile dev firmware -packages: - base: !include mqtt-doorman-stock.yaml - debug_utilities: !include addons/debug-utilities.yaml - -external_components: - - source: github://azoninc/Doorman@dev - components: [ tc_bus ] - refresh: 60s - -switch: - - id: !extend dev_firmware - restore_mode: RESTORE_DEFAULT_ON \ No newline at end of file diff --git a/firmware/mqtt-doorman-stock.yaml b/firmware/mqtt-doorman-stock.yaml deleted file mode 100644 index e3c410b1..00000000 --- a/firmware/mqtt-doorman-stock.yaml +++ /dev/null @@ -1,8 +0,0 @@ -packages: - host: !include host/esp32-s3-oct.yaml - base: !include base.yaml - mqtt: !include addons/mqtt.yaml - pattern_events: !include addons/pattern-events.yaml - ring_to_open: !include addons/ring-to-open.yaml - intercom_settings: !include addons/intercom-settings.yaml - interactive_setup: !include addons/interactive-setup.yaml \ No newline at end of file diff --git a/generate_firmware_yaml.py b/generate_firmware_yaml.py new file mode 100644 index 00000000..9f0aa4e8 --- /dev/null +++ b/generate_firmware_yaml.py @@ -0,0 +1,110 @@ +import os +from itertools import product + +# Configuration options +HOST_ARCHITECTURES = ['esp32-s3', 'esp32-s3-oct', 'esp32'] + +API_VARIANTS = ['ha', 'mqtt'] +FIRMWARES = ['stock', 'nuki-bridge'] +BRANCHES = ['master', 'dev'] + +def get_packages(host, api_variant, firmware, branch): + # Define packages in exact order with their conditions + packages_config = [ + ('host', f'!include ../hosts/{host}.yaml', True), + ('base', '!include ../base.yaml', True), + ('ota_updates', '!include ../components/ota-updates.yaml', api_variant == 'ha'), + ('ota_updates_default_dev', '!include ../components/ota-updates-default-dev.yaml', api_variant == 'ha' and branch == 'dev'), + ('dashboard_import', '!include ../components/dashboard-import.yaml', api_variant == 'ha'), + ('homeassistant', '!include ../components/homeassistant.yaml', api_variant == 'ha'), + ('mqtt', '!include ../components/mqtt.yaml', api_variant == 'mqtt'), + ('debug_utilities', '!include ../components/debug-utilities.yaml', branch == 'dev'), + ('pattern_events', '!include ../components/pattern-events.yaml', True), + ('ring_to_open', '!include ../components/ring-to-open.yaml', True), + ('intercom_settings', '!include ../components/intercom-settings.yaml', True), + ('addon_nuki_bridge', '!include ../components/nuki-bridge.yaml', firmware == 'nuki-bridge'), + ('interactive_setup', '!include ../components/interactive-setup.yaml', True), + ] + + return [(name, path) for name, path, condition in packages_config if condition] + +def generate_yaml_content(host, api_variant, firmware, branch): + content = [ + 'substitutions:', + f' branch: "{branch}"', + f' firmware_type: "{firmware}"', + f' api_variant: "{api_variant}"', + f' host_platform: "{host}"', + '', + 'packages:' + ] + + packages = get_packages(host, api_variant, firmware, branch) + for name, path in packages: + content.append(f' {name}: {path}') + + return '\n'.join(content) + +def generate_example_yaml(host, api_variant, firmware, branch): + + filename = (f'{host}.{api_variant}.{firmware}.{branch}.yaml' + if branch == 'dev' + else f'{host}.{api_variant}.{firmware}.yaml') + + content = [ + f'# Doorman {"Nuki Bridge" if firmware == "nuki-bridge" else "Stock"} Firmware ({"Home Assistant" if api_variant == "api" else "MQTT"})', + f'# Base Board {host.upper()}', + '', + '# You can change a few options here.', + 'substitutions:', + ' name: "doorman-s3"', + ' friendly_name: "Doorman S3"', + ' # log_level: "ERROR"', + ' # led_pin: "GPIO1"', + ' # rgb_led_pin: "GPIO2"', + ' # relay_pin: "GPIO42"', + ' # external_button_pin: "GPIO41"', + '', + '# Import Doorman Firmware Config', + 'packages:', + f' AzonInc.Doorman{"-Nuki-Bridge" if firmware == "nuki-bridge" else ""}: ' + + f'github://azoninc/doorman/firmware/{filename}@{branch}', + '', + 'wifi:', + ' ssid: !secret wifi_ssid', + ' password: !secret wifi_password' + ] + + return '\n'.join(content) + +def main(): + os.makedirs('firmware/configurations', exist_ok=True) + os.makedirs('firmware/examples', exist_ok=True) + + combinations = product(HOST_ARCHITECTURES, API_VARIANTS, FIRMWARES, BRANCHES) + for host, api_variant, firmware, branch in combinations: + filename = (f'{host}.{api_variant}.{firmware}.{branch}.yaml' + if branch == 'dev' + else f'{host}.{api_variant}.{firmware}.yaml') + + example_filename = (f'{host}.{api_variant}.{firmware}.example.{branch}.yaml' + if branch == 'dev' + else f'{host}.{api_variant}.{firmware}.example.yaml') + + config_content = generate_yaml_content(host, api_variant, firmware, branch) + example_content = generate_example_yaml(host, api_variant, firmware, branch) + + # Write config YAML + config_filepath = os.path.join('firmware', 'configurations', filename) + with open(config_filepath, 'w', encoding='utf-8') as f: + f.write(config_content) + + # Write example YAML + example_filepath = os.path.join('firmware', 'examples', example_filename) + with open(example_filepath, 'w', encoding='utf-8') as f: + f.write(example_content) + + print(f'Generated: {filename}') + +if __name__ == '__main__': + main() \ No newline at end of file