Skip to content

Commit 9bf9159

Browse files
authored
Merge pull request #18 from AzonInc/dev
Doorman Firmware 2024.8.2
2 parents 9c279d6 + a62159b commit 9bf9159

17 files changed

+454
-65
lines changed

.github/workflows/build-docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ jobs:
3535
if: github.ref != 'refs/heads/master'
3636
run: |
3737
sed -i "s/\"version\": \".*\"/\"version\": \"${VERSION}-dev\"/" package.json
38+
sed -i 's/@master/@dev/g' firmware/examples/stock.example.yaml
39+
sed -i 's/@master/@dev/g' firmware/examples/nuki-bridge.example.yaml
40+
sed -i 's/@master/@dev/g' docs/guide/getting-started.md
3841
3942
- name: Install dependencies
4043
run: npm ci

.github/workflows/bundle-assets.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Bundle build assets
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
bundle-assets:
8+
name: Create asset bundle
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Create Output Directory
15+
run: mkdir -p output
16+
17+
- name: Create Fimrware Directory
18+
run: mkdir -p output/firmware/release/
19+
20+
- name: Download github-pages artifact
21+
uses: actions/download-artifact@v4
22+
with:
23+
name: vitepress-docs
24+
path: output
25+
26+
- name: Download Doorman Stock artifact
27+
uses: actions/download-artifact@v4
28+
with:
29+
name: firmware-doorman-stock
30+
path: output/firmware/release
31+
32+
- name: Download Doorman Nuki Bridge artifact
33+
uses: actions/download-artifact@v4
34+
with:
35+
name: firmware-doorman-nuki-bridge
36+
path: output/firmware/release
37+
38+
- name: Upload Pages artifact
39+
if: github.ref == 'refs/heads/master'
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: output
43+
44+
- name: Upload Assets Bundle
45+
if: github.ref != 'refs/heads/master'
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: asset-bundle
49+
path: output

.github/workflows/deploy.yml

Lines changed: 43 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -19,83 +19,78 @@ concurrency:
1919
cancel-in-progress: false
2020

2121
jobs:
22+
# Build Vitepress Docs
2223
build-docs:
2324
name: Build Docs
2425
uses: ./.github/workflows/build-docs.yml
2526

26-
build-doorman-stock-firmware:
27-
name: Build Doorman Stock Firmware
27+
28+
# Build stable firmware
29+
build-doorman-stock-stable-firmware:
30+
if: github.ref == 'refs/heads/master'
31+
name: Build Doorman Stock Firmware (stable)
2832
uses: ./.github/workflows/build-esphome.yml
2933
with:
3034
files: firmware/doorman-stock.yaml
3135
name: AzonInc.Doorman
3236
esphome_version: beta
3337
directory_name: doorman-stock
3438

35-
build-doorman-nuki-bridge-firmware:
36-
name: Build Doorman Nuki Bridge Firmware
39+
build-doorman-nuki-bridge-stable-firmware:
40+
if: github.ref == 'refs/heads/master'
41+
name: Build Doorman Nuki Bridge Firmware (stable)
3742
uses: ./.github/workflows/build-esphome.yml
3843
with:
3944
files: firmware/doorman-nuki-bridge.yaml
4045
name: AzonInc.Doorman-Nuki-Bridge
4146
esphome_version: beta
4247
directory_name: doorman-nuki-bridge
4348

44-
45-
# Bundle all assets for Pages
46-
bundle-assets:
47-
name: Create asset bundle
48-
runs-on: ubuntu-latest
49-
needs: [build-docs, build-doorman-stock-firmware, build-doorman-nuki-bridge-firmware]
50-
steps:
51-
- name: Checkout
52-
uses: actions/checkout@v4
5349

54-
- name: Create Output Directory
55-
run: mkdir -p output
56-
57-
- name: Create Fimrware Directory
58-
run: mkdir -p output/firmware/release/
50+
# Build dev firmware
51+
build-doorman-stock-dev-firmware:
52+
if: github.ref != 'refs/heads/master'
53+
name: Build Doorman Stock Firmware (dev)
54+
uses: ./.github/workflows/build-esphome.yml
55+
with:
56+
files: firmware/doorman-stock.dev.yaml
57+
name: AzonInc.Doorman
58+
esphome_version: dev
59+
directory_name: doorman-stock
5960

60-
- name: Download github-pages artifact
61-
uses: actions/download-artifact@v4
62-
with:
63-
name: vitepress-docs
64-
path: output
61+
build-doorman-nuki-bridge-dev-firmware:
62+
if: github.ref != 'refs/heads/master'
63+
name: Build Doorman Nuki Bridge Firmware (dev)
64+
uses: ./.github/workflows/build-esphome.yml
65+
with:
66+
files: firmware/doorman-nuki-bridge.dev.yaml
67+
name: AzonInc.Doorman-Nuki-Bridge
68+
esphome_version: dev
69+
directory_name: doorman-nuki-bridge
6570

66-
- name: Download Doorman Stock artifact
67-
uses: actions/download-artifact@v4
68-
with:
69-
name: firmware-doorman-stock
70-
path: output/firmware/release
71+
72+
# Bundle all assets for Pages
73+
bundle-assets-stable:
74+
if: github.ref == 'refs/heads/master'
75+
name: Create asset bundle (stable)
76+
uses: ./.github/workflows/bundle-assets.yml
77+
needs: [build-docs, build-doorman-stock-stable-firmware, build-doorman-nuki-bridge-stable-firmware]
7178

72-
- name: Download Doorman Nuki Bridge artifact
73-
uses: actions/download-artifact@v4
74-
with:
75-
name: firmware-doorman-nuki-bridge
76-
path: output/firmware/release
79+
bundle-assets-dev:
80+
if: github.ref != 'refs/heads/master'
81+
name: Create asset bundle (dev)
82+
uses: ./.github/workflows/bundle-assets.yml
83+
needs: [build-docs, build-doorman-stock-dev-firmware, build-doorman-nuki-bridge-dev-firmware]
7784

78-
- name: Upload Pages artifact
79-
if: github.ref == 'refs/heads/master'
80-
uses: actions/upload-pages-artifact@v3
81-
with:
82-
path: output
83-
84-
- name: Upload Assets Bundle
85-
if: github.ref != 'refs/heads/master'
86-
uses: actions/upload-artifact@v4
87-
with:
88-
name: asset-bundle
89-
path: output
9085

9186
# Deployment job
92-
deploy-master:
87+
deploy-stable:
9388
if: github.ref == 'refs/heads/master'
9489
name: Deploy to Github Pages (stable)
9590
environment:
9691
name: github-pages
9792
url: ${{ steps.deployment.outputs.page_url }}
98-
needs: [bundle-assets]
93+
needs: [bundle-assets-stable]
9994
runs-on: ubuntu-latest
10095
steps:
10196
- name: Deploy to GitHub Pages
@@ -108,7 +103,7 @@ jobs:
108103
environment:
109104
name: surge.sh
110105
url: "https://doorman-dev.surge.sh/"
111-
needs: [bundle-assets]
106+
needs: [bundle-assets-dev]
112107
runs-on: ubuntu-latest
113108
steps:
114109
- name: Download Assets
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
blueprint:
2+
name: Confirmable Doorbell Open Door Notification
3+
description: >-
4+
A script that sends an actionable notification with a confirmation to open the door.
5+
author: "AzonInc"
6+
homeassistant:
7+
min_version: "2024.6.0"
8+
domain: automation
9+
source_url: https://github.com/AzonInc/Doorman/blob/dev/blueprints/confirmable_open_door_notification.yaml
10+
input:
11+
doorbell_section:
12+
name: "Doorbell Details"
13+
icon: "mdi:doorbell"
14+
input:
15+
doorbell_sensor:
16+
name: "Doorbell Sensor"
17+
description: "The Binary Sensor which is triggered by the doorbell"
18+
selector:
19+
entity:
20+
integration: esphome
21+
domain: binary_sensor
22+
open_door_command:
23+
name: "Open Door Command"
24+
description: "This Command will be sent to open the Door"
25+
default: "1100"
26+
selector:
27+
text:
28+
open_door_button_command:
29+
name: "Open Door Button Command"
30+
description: "This command will be used to check if the physical 'Open Door' button of your intercom was pressed."
31+
default: "1c30ba80"
32+
selector:
33+
text:
34+
35+
notification_details_section:
36+
name: "Notification Details"
37+
icon: "mdi:bell"
38+
input:
39+
notify_device:
40+
name: Device to notify
41+
description: Device needs to run the official Home Assistant app to receive notifications.
42+
selector:
43+
device:
44+
integration: mobile_app
45+
title:
46+
name: "Title"
47+
description: "The title of the button shown in the notification."
48+
default: "Entrance Doorbell"
49+
selector:
50+
text:
51+
short_message:
52+
name: "Short Message"
53+
description: "The message body"
54+
default: "Somebody is at the door!"
55+
selector:
56+
text:
57+
message:
58+
name: "Message"
59+
description: "The message body"
60+
default: "Somebody is at the door! Would you like to open it?"
61+
selector:
62+
text:
63+
confirm_text:
64+
name: "Confirmation Text"
65+
description: "Text to show on the confirmation button"
66+
default: "Open Door"
67+
selector:
68+
text:
69+
dismiss_text:
70+
name: "Dismiss Text"
71+
description: "Text to show on the dismiss button"
72+
default: "No"
73+
selector:
74+
text:
75+
76+
notification_actions_section:
77+
name: "Notification Actions"
78+
icon: "mdi:gesture-tap-button"
79+
input:
80+
confirm_action:
81+
name: "Confirmation Action"
82+
description: "Action to run when notification is confirmed"
83+
default:
84+
- service: esphome.doorman_s3_send_tcs_command
85+
data:
86+
command: "{{ open_door_command | int(base=16) }}"
87+
selector:
88+
action:
89+
dismiss_action:
90+
name: "Dismiss Action"
91+
description: "Action to run when notification is dismissed"
92+
default: []
93+
selector:
94+
action:
95+
96+
97+
mode: restart
98+
99+
trigger:
100+
platform: state
101+
entity_id: !input doorbell_sensor
102+
from: "off"
103+
to: "on"
104+
105+
action:
106+
- alias: "Set up variables"
107+
variables:
108+
action_confirm: "{{ 'CONFIRM_' ~ context.id }}"
109+
action_dismiss: "{{ 'DISMISS_' ~ context.id }}"
110+
open_door_command: !input open_door_command
111+
open_door_button_command: !input open_door_button_command
112+
- parallel:
113+
- sequence:
114+
- alias: "Send notification"
115+
domain: mobile_app
116+
type: notify
117+
device_id: !input notify_device
118+
title: !input title
119+
message: !input message
120+
data:
121+
tag: doorbell
122+
timeout: 600
123+
priority: high
124+
ttl: 0
125+
subject: !input short_message
126+
actions:
127+
- action: "{{ action_confirm }}"
128+
title: !input confirm_text
129+
- action: "{{ action_dismiss }}"
130+
title: !input dismiss_text
131+
- alias: "Awaiting response"
132+
wait_for_trigger:
133+
- platform: event
134+
event_type: mobile_app_notification_action
135+
event_data:
136+
action: "{{ action_confirm }}"
137+
- platform: event
138+
event_type: mobile_app_notification_action
139+
event_data:
140+
action: "{{ action_dismiss }}"
141+
continue_on_timeout: false
142+
timeout:
143+
hours: 0
144+
minutes: 10
145+
seconds: 0
146+
milliseconds: 0
147+
- choose:
148+
- conditions: "{{ wait.trigger.event.data.action == action_confirm }}"
149+
sequence: !input confirm_action
150+
- conditions: "{{ wait.trigger.event.data.action == action_confirm }}"
151+
sequence:
152+
- alias: "Clear notification"
153+
domain: mobile_app
154+
type: notify
155+
device_id: !input notify_device
156+
message: clear_notification
157+
data:
158+
tag: doorbell
159+
- conditions: "{{ wait.trigger.event.data.action == action_dismiss }}"
160+
sequence: !input dismiss_action
161+
162+
- alias: "Clear Notification when someone opened the door already"
163+
sequence:
164+
- alias: "Awaiting response"
165+
wait_for_trigger:
166+
- platform: event
167+
event_type: esphome.doorman
168+
event_data:
169+
command: !input open_door_command
170+
- platform: event
171+
event_type: esphome.doorman
172+
event_data:
173+
command: !input open_door_button_command
174+
continue_on_timeout: false
175+
timeout:
176+
hours: 0
177+
minutes: 10
178+
seconds: 0
179+
- alias: "Clear notification"
180+
domain: mobile_app
181+
type: notify
182+
device_id: !input notify_device
183+
message: clear_notification
184+
data:
185+
tag: doorbell

docs/.vitepress/config.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ export default defineConfig({
9191
text: 'Automations',
9292
items: [
9393
{ text: 'Pattern Events', link: '/automation/pattern-events' },
94-
{ text: 'Ring To Open', link: '/automation/ring-to-open' }
94+
{ text: 'Ring To Open', link: '/automation/ring-to-open' },
95+
{ text: 'Blueprints', link: '/automation/blueprints' }
9596
]
9697
},
9798
{

0 commit comments

Comments
 (0)