Skip to content

Commit

Permalink
Add automatic intercom memory reading during boot and model identific…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
AzonInc committed Jan 26, 2025
1 parent 06ae3bf commit 3fe813e
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 4 deletions.
6 changes: 6 additions & 0 deletions docs/en/changelog/firmware.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ Welcome to the latest updates! Here's a breakdown of all the **new features**, *
- **Fixed Memory Reading for Some Intercom Models**
The memory will now be correctly read from your indoor station.

- **Automatic Intercom Memory Reading**
The intercom memory is now automatically read during boot and after model identification. Manual memory readings are still possible but no longer necessary.

- **Experimental Update Switch**
Instead of having two separate update entities, there's now a single one that checks for updates based on a new switch. This switch lets you easily toggle experimental updates from the dev branch on or off.

Expand All @@ -36,6 +39,9 @@ Welcome to the latest updates! Here's a breakdown of all the **new features**, *
Migrated the `nuki_lock` component to the `improve-memory-footprint` branch. This update leverages Doorman-S3's PSRAM, potentially enhancing the overall performance of the `nuki_lock` component.

### 🚨 Breaking Changes
- **Hexadecimal Command-String Length changed**
With the command parser now fixed, the hexadecimal string representation has been updated to correctly display the `Last Bus Command` sensor.

- **Separate Event entities**
[Skaronator](https://github.com/AzonInc/Doorman/pull/37) introduced separate event entities for each physical doorbell button.
This enhancement enables event tracking on a per-button basis, providing more granular and precise support for doorbell interactions.
Expand Down
6 changes: 6 additions & 0 deletions firmware/addons/interactive-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ tc_bus:
- logger.log:
format: "Setup: Identified Hardware: %s (version %i), Firmware: %i.%i.%i"
args: [ 'model_to_string(x.model)', 'x.hardware_version', 'x.firmware_major', 'x.firmware_minor', 'x.firmware_patch' ]
# Read memory after identifying model
- if:
condition:
- lambda: return x.model != MODEL_NONE;
then:
- tc_bus.read_memory:
- script.execute: complete_setup

on_identify_timeout:
Expand Down
9 changes: 9 additions & 0 deletions firmware/addons/intercom-settings.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Intercom Settings Addon

esphome:
on_boot:
then:
- if:
condition:
- lambda: return id(serial_number).state != 0 && id(intercom_model).state != "None";
then:
- tc_bus.read_memory:

# Extend TC:BUS Component
tc_bus:
on_read_memory_complete:
Expand Down
2 changes: 1 addition & 1 deletion firmware/ha-doorman-nuki-bridge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
homeassistant: !include addons/homeassistant.yaml
pattern_events: !include addons/pattern-events.yaml
ring_to_open: !include addons/ring-to-open.yaml
memory_utils: !include addons/intercom-settings.yaml
intercom_settings: !include addons/intercom-settings.yaml
addon_nuki_bridge: !include addons/nuki-bridge.yaml
interactive_setup: !include addons/interactive-setup.yaml

Expand Down
2 changes: 1 addition & 1 deletion firmware/ha-doorman-stock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
homeassistant: !include addons/homeassistant.yaml
pattern_events: !include addons/pattern-events.yaml
ring_to_open: !include addons/ring-to-open.yaml
memory_utils: !include addons/intercom-settings.yaml
intercom_settings: !include addons/intercom-settings.yaml
interactive_setup: !include addons/interactive-setup.yaml

esp32:
Expand Down
2 changes: 1 addition & 1 deletion firmware/mqtt-doorman-nuki-bridge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
mqtt: !include addons/mqtt.yaml
pattern_events: !include addons/pattern-events.yaml
ring_to_open: !include addons/ring-to-open.yaml
memory_utils: !include addons/intercom-settings.yaml
intercom_settings: !include addons/intercom-settings.yaml
addon_nuki_bridge: !include addons/nuki-bridge.yaml
interactive_setup: !include addons/interactive-setup.yaml

Expand Down
2 changes: 1 addition & 1 deletion firmware/mqtt-doorman-stock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
mqtt: !include addons/mqtt.yaml
pattern_events: !include addons/pattern-events.yaml
ring_to_open: !include addons/ring-to-open.yaml
memory_utils: !include addons/intercom-settings.yaml
intercom_settings: !include addons/intercom-settings.yaml
interactive_setup: !include addons/interactive-setup.yaml

esp32:
Expand Down

0 comments on commit 3fe813e

Please sign in to comment.