Skip to content

Commit d2053e4

Browse files
committed
Add Docs
1 parent d813c26 commit d2053e4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2812
-369
lines changed

.github/workflows/build.yaml

Lines changed: 25 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,29 @@
11
name: Build Stock Firmware
22
on:
3-
release:
4-
types: [created]
3+
pull_request:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- docs-test
58

69
jobs:
7-
build:
8-
name: Build Firmware
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@v2
12-
13-
- uses: actions/setup-python@v2
14-
with:
15-
python-version: "3.9"
16-
17-
- name: Install ESPHome
18-
run: pip install --user esphome
19-
20-
- name: Compile Release Firmware
21-
working-directory: firmware
22-
run: |
23-
esphome compile doorman-stock.yaml
24-
mkdir -p bin
25-
cp .esphome/build/doorman-s3/.pioenvs/doorman-s3/firmware.factory.bin bin/firmware-factory.bin
26-
cp .esphome/build/doorman-s3/.pioenvs/doorman-s3/firmware.bin bin/stock-firmware.bin
27-
28-
- name: Compile Nuki Bridge Firmware
29-
working-directory: firmware
30-
run: |
31-
rm -rf .esphome/build/doorman-s3
32-
esphome compile doorman-nuki-bridge.yaml
33-
mkdir -p bin
34-
cp .esphome/build/doorman-s3/.pioenvs/doorman-s3/firmware.factory.bin bin/nuki-bridge-firmware-factory.bin
35-
cp .esphome/build/doorman-s3/.pioenvs/doorman-s3/firmware.bin bin/nuki-bridge-firmware.bin
36-
37-
- name: Upload Firmware
38-
uses: skx/github-action-publish-binaries@release-1.3
39-
env:
40-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
with:
42-
args: "firmware/bin/*.bin"
10+
publish-doorman-stock:
11+
name: Publish Doorman Stock Firmware
12+
uses: ./esphome-build.yml
13+
with:
14+
files: doorman-stock.yaml
15+
name: Doorman Stock
16+
manifest_filename: doorman-stock-manifest.json
17+
clean: false
18+
esphome_version: latest
19+
directory_name: doorman-stock
20+
publish-doorman-nuki-bridge:
21+
name: Publish Doorman Nuki Bridge Firmware
22+
uses: ./esphome-build.yml
23+
with:
24+
files: doorman-nuki-bridge.yaml
25+
name: Doorman Nuki Bridge
26+
manifest_filename: doorman-nuki-bridge-manifest.json
27+
clean: false
28+
esphome_version: latest
29+
directory_name: doorman-nuki-bridge

.github/workflows/deploy.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Sample workflow for building and deploying a VitePress site to GitHub Pages
2+
#
3+
name: Deploy VitePress site to Pages
4+
5+
on:
6+
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
7+
# using the `master` branch as the default branch.
8+
push:
9+
branches: [master, docs-test]
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
22+
concurrency:
23+
group: pages
24+
cancel-in-progress: false
25+
26+
jobs:
27+
# Build job
28+
build:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0 # Not needed if lastUpdated is not enabled
35+
# - uses: pnpm/action-setup@v3 # Uncomment this if you're using pnpm
36+
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
37+
- name: Setup Node
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: 20
41+
cache: npm # or pnpm / yarn
42+
- name: Setup Pages
43+
uses: actions/configure-pages@v4
44+
- name: Install dependencies
45+
run: npm ci # or pnpm install / yarn install / bun install
46+
- name: Build with VitePress
47+
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: docs/.vitepress/dist
52+
53+
# Deployment job
54+
deploy:
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
needs: build
59+
runs-on: ubuntu-latest
60+
name: Deploy
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

.github/workflows/esphome-build.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Build and Publish ESPHome firmware
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
files:
7+
description: Comma-separated list of files to build.
8+
required: true
9+
type: string
10+
name:
11+
description: Name of the firmware to publish.
12+
required: false
13+
type: string
14+
default: ESPHome
15+
clean:
16+
description: Remove deleted files from the build
17+
required: false
18+
type: boolean
19+
default: true
20+
manifest_filename:
21+
description: Filename of the manifest to write.
22+
required: false
23+
type: string
24+
default: manifest.json
25+
esphome_version:
26+
description: Version of ESPHome to build for.
27+
required: false
28+
type: string
29+
default: latest
30+
directory_name:
31+
description: Name of the output folder
32+
required: true
33+
type: string
34+
default: esp32
35+
36+
jobs:
37+
prepare:
38+
runs-on: ubuntu-latest
39+
outputs:
40+
files: ${{ steps.files-array.outputs.files }}
41+
steps:
42+
- id: files-array
43+
run: |
44+
files=$(echo "${{ inputs.files }}" | jq -Rcn 'inputs | . / ","')
45+
echo ::set-output name=files::$files
46+
47+
build:
48+
name: Build ESPHome binary for ${{ matrix.file }}
49+
needs: [prepare]
50+
runs-on: ubuntu-latest
51+
strategy:
52+
matrix:
53+
file: ${{ fromJson(needs.prepare.outputs.files) }}
54+
outputs:
55+
esphome-version: ${{ steps.esphome-build.outputs.esphome-version }}
56+
esphome-build-name: ${{ steps.esphome-build.outputs.name}}
57+
project-version: ${{ steps.esphome-build.outputs.project-version }}
58+
steps:
59+
- uses: actions/checkout@v3.5.3
60+
- uses: esphome/build-action@v3.2.0
61+
id: esphome-build
62+
with:
63+
yaml_file: ${{ matrix.file }}
64+
version: ${{ inputs.esphome_version }}
65+
- run: |
66+
mkdir output
67+
mv "${{ steps.esphome-build.outputs.name}}" temp
68+
mv temp "${{ inputs.directory_name }}"
69+
mv "${{ inputs.directory_name }}" output/
70+
- uses: actions/upload-artifact@v3.1.2
71+
with:
72+
name: ${{ inputs.name }}
73+
path: output
74+
75+
publish:
76+
if: (github.event_name == 'workflow_dispatch' || github.event_name == 'push') && github.ref == 'refs/heads/main'
77+
name: Publish new firmware and website to GitHub Pages
78+
runs-on: ubuntu-latest
79+
needs: [build]
80+
steps:
81+
- uses: actions/checkout@v3.5.3
82+
- uses: actions/download-artifact@v3.0.2
83+
with:
84+
path: output
85+
name: ${{ inputs.name }}
86+
87+
- name: Create single manifest.json
88+
run: |
89+
jq -s '{"name": "${{ inputs.name }}", "version": "${{ needs.build.outputs.project-version }}", "home_assistant_domain": "esphome", "new_install_skip_erase": false, "builds":.}' output/*/manifest.json > output/${{ inputs.manifest_filename }}
90+
sed -i 's/${{ needs.build.outputs.esphome-build-name }}\//${{ inputs.directory_name }}\//g' output/${{ inputs.manifest_filename }}
91+
92+
93+
- run: cp -R static/* output
94+
95+
- name: Deploy 🚀
96+
uses: JamesIves/github-pages-deploy-action@v4.6.3
97+
with:
98+
branch: gh-pages
99+
folder: output
100+
clean: ${{ inputs.clean }}
101+
force: false

.gitignore

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,21 @@ production
44
*.lck
55
*autosave*
66
*auto_save*
7-
.vscode
7+
/coverage
8+
/src/client/shared.ts
9+
/src/node/shared.ts
10+
*.log
11+
*.tgz
12+
.DS_Store
13+
.idea
14+
.temp
15+
.vite_opt_cache
16+
.vscode
17+
dist
18+
cache
19+
temp
20+
examples-temp
21+
node_modules
22+
pnpm-global
23+
TODOs.md
24+
*.timestamp-*.mjs

docs/.vitepress/config.mts

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
// https://vitepress.dev/reference/site-config
4+
export default defineConfig({
5+
title: "Doorman",
6+
description: "Doorman S3 lets you connect your TCS or Koch intercom to any home automation system.",
7+
8+
/* prettier-ignore */
9+
head: [
10+
['link', { rel: 'icon', type: 'image/svg+xml', href: '/vitepress-logo-mini.svg' }],
11+
['link', { rel: 'icon', type: 'image/png', href: '/vitepress-logo-mini.png' }],
12+
['meta', { name: 'theme-color', content: '#5f67ee' }],
13+
['meta', { property: 'og:type', content: 'website' }],
14+
['meta', { property: 'og:locale', content: 'en' }],
15+
['meta', { property: 'og:title', content: 'Doorman | TCS and Koch Intercom Gateway' }],
16+
['meta', { property: 'og:site_name', content: 'Doorman' }],
17+
['meta', { property: 'og:image', content: 'https://doorman.azon.ai/vitepress-og.jpg' }],
18+
['meta', { property: 'og:url', content: 'https://doorman.azon.ai/' }],
19+
[
20+
'script',
21+
{
22+
async: '',
23+
type: 'module',
24+
src: 'https://unpkg.com/esp-web-tools@10/dist/web/install-button.js?module'
25+
}
26+
]
27+
],
28+
29+
themeConfig: {
30+
31+
logo: {
32+
src: '/logo.png', width: 24, height: 24
33+
},
34+
35+
// https://vitepress.dev/reference/default-theme-config
36+
nav: [
37+
{ text: 'Guide', link: '/guide/what-is-doorman' }
38+
],
39+
40+
sidebar: [
41+
{
42+
text: 'Introduction',
43+
items: [
44+
{ text: 'What is Doorman?', link: '/guide/what-is-doorman' },
45+
{ text: 'Getting Started', link: '/guide/getting-started' },
46+
{ text: 'Hardware Compatibility', link: '/guide/hardware-compatibility' },
47+
{ text: 'GPIO Pin assignment', link: '/guide/gpio-pin-assignment' }
48+
]
49+
},
50+
{
51+
text: 'Firmware',
52+
items: [
53+
{ text: 'Flashing', link: '/firmware/flashing' },
54+
{ text: 'Stock Firmware', link: '/firmware/stock-firmware' },
55+
{ text: 'Nuki Bridge Firmware', link: '/firmware/nuki-bridge-firmware' },
56+
{ text: 'Custom Firmware', link: '/firmware/custom-firmware' }
57+
]
58+
},
59+
{
60+
text: 'Automations',
61+
items: [
62+
{ text: 'Doorbell Events', link: '/automation/doorbell-events' },
63+
{ text: 'Ring to open', link: '/automation/ring-to-open' }
64+
]
65+
},
66+
{
67+
text: 'Enclosure',
68+
items: [
69+
{ text: '3D printing', link: '/enclosure/3d-printing' }
70+
]
71+
}
72+
],
73+
74+
socialLinks: [
75+
{ icon: 'github', link: 'https://github.com/AzonInc/Doorman' },
76+
{ icon: 'discord', link: 'https://discord.gg/t2d34dvmBf' }
77+
]
78+
}
79+
})

docs/automation/doorbell-events.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Doorbell Events
2+
3+
The [Stock Doorman Firmware](../firmware/stock-firmware.md) includes a `Doorbell Pattern` event entity which offers 6 event types.
4+
5+
You can create automations to trigger specific actions based on each Button Push Pattern.
6+
7+
## Doorbell Pattern Event Types
8+
- apartment_single
9+
- apartment_double
10+
- apartment_triple
11+
- entrance_single
12+
- entrance_double
13+
- entrance_triple
14+
15+
## Example Automation
16+
::: details Automatically open the door when the Entrance Doorbell is pressed 2 times in a certain way.
17+
You have to change the `entity_id` to your Doorman entities.
18+
```yaml
19+
alias: Automatically open the entrance door
20+
description: "Open the entrance door after pressing the entrance doorbell two times."
21+
trigger:
22+
- platform: state
23+
entity_id:
24+
- event.doorman_s3_doorbell_pattern
25+
attribute: event_type
26+
to: entrance_double
27+
condition: []
28+
action:
29+
- service: button.press
30+
metadata: {}
31+
data: {}
32+
target:
33+
entity_id: button.doorman_s3_open_entrance_door
34+
mode: single
35+
```
36+
:::

docs/automation/ring-to-open.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Ring to open
2+
3+
The [Stock Doorman Firmware](../firmware/stock-firmware.md) includes a `Ring to open` automation also known as `Party Mode`.
4+
5+
### What does it do?
6+
As the name already says, the entrance door will be opened as soon as someone rings the entrance doorbell.
7+
It could be useful when you have a party. That way your guests can just enter the building by ringing.
8+
9+
### How do I use it?
10+
You can enable and disable the `Ring to open` automation with a switch in Home Assistant.
11+
::: tip
12+
It is also possible to configure a delay for the opener command with the `Ring to open Delay` Number Input in the Configuration section.
13+
:::

0 commit comments

Comments
 (0)