homebridge-ecobee-security 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,55 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.0
4
+
5
+ ### Doorbell camera (beta)
6
+
7
+ - New setting **Doorbell camera** (`doorbellCamera`, off by default; `ffmpegPath`): the ecobee Smart
8
+ Doorbell Camera as its own HomeKit camera, with live view and snapshots. The plugin keeps a session to
9
+ the camera open on your network, reconnects by itself, and the camera shows **No Response** while it is
10
+ down or ecobee can't be reached. Needs an ffmpeg with libfdk_aac and libx264 (the Homebridge Raspberry
11
+ Pi image has one). Live view and recordings carry an ecobee watermark.
12
+ - **Doorbell link** (settings > Doorbell camera): pair the plugin with the doorbell's own HomeKit server
13
+ from the settings page. The camera then becomes a **video doorbell** with an instant ring (single,
14
+ double and long press) and a motion sensor, the ecobee sensors the doorbell bridges to HomeKit are
15
+ published by the plugin, and the doorbell's **Chime Doorbell**, **Camera Status Light** and **Night
16
+ Vision Light** switches are kept in sync. Remove ecobee's own doorbell from the Home app first.
17
+ - **HomeKit Secure Video**: recordings start about 4 seconds before the motion. Video is encoded in
18
+ software (libx264), which takes about 2 of a Raspberry Pi 4's cores while recording. Motion comes from
19
+ the doorbell link, or from ecobee's cloud every 5 seconds without it. New setting **Motion grace
20
+ period** (`motionGrace`, 15 seconds): the motion sensor stays on this long after motion ends, so clips
21
+ are at least about 10 seconds. `debugRecordings` keeps the last clips for troubleshooting.
22
+
23
+ ### Switches and sensors
24
+
25
+ - **Home Occupied** now also has an occupancy sensor that follows the switch (Occupied while it is on).
26
+ - New setting **Vacation Mode switch** (`vacationSwitch`, off by default): a switch that is on while an
27
+ ecobee vacation is running, for other accessories to follow. Turn it on to start a vacation now, until
28
+ you turn it off (30 days at the latest); set dated vacations in the ecobee app. Turning it off ends the
29
+ vacation. Shows No Response while ecobee can't be reached.
30
+ - The two switches have fixed names, **Home Occupied** and **Vacation Mode**; rename them in the Home app.
31
+ The `occupancyName` setting (0.8.0) and the `vacationSwitchName` of earlier test builds still work if
32
+ they are already in your config, but are no longer in the settings page.
33
+ - Settings page: **Home Occupied** and **Vacation Mode** are now together in a **Switches and
34
+ sensors** card.
35
+
36
+ ### Settings
37
+
38
+ - **Offer Night** is now **Enable Night**.
39
+ - **Enter Triggered State** is now **Home app alarm**, with the options *When a sensor is tripped (entry
40
+ delay starts)* (default, as before) and *When the siren goes off (entry delay ran out)*, and a clearer
41
+ description: it only changes the Home app's tile and automations, not ecobee's alerts or professional
42
+ monitoring.
43
+ - Settings page: cards are now ecobee account, Security system, Door keypads, Security holds, Doorbell
44
+ camera, Switches and sensors. In Doorbell camera the status of the doorbell link comes first, then the
45
+ link, then Recording, with the ffmpeg path under Advanced.
46
+ - The doorbell camera needs an ffmpeg with libx264 as well as libfdk_aac; without it the camera isn't
47
+ published and the log says why. The setting's description no longer says ecobee's tile keeps the ring.
48
+
49
+ ### Dependencies
50
+
51
+ - Added `werift` (MIT) and `hap-controller` (MPL-2.0).
52
+
3
53
  ## 0.8.0
4
54
 
5
55
  - While the plugin can't reach ecobee (three failed reads in a row, or signed out), the security
package/README.md CHANGED
@@ -1,18 +1,26 @@
1
- <p align="center"><img src="icon.png" alt="" width="100" height="100"></p>
1
+ <p align="center"><img src="ecobee-header.png" alt="Homebridge and ecobee" width="100%"></p>
2
2
 
3
3
  # homebridge-ecobee-security
4
4
 
5
+ <p align="center"><b>ecobee Smart Security</b> for Apple Home</p>
6
+
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/homebridge-ecobee-security"><img src="https://img.shields.io/npm/v/homebridge-ecobee-security?label=npm%40latest" alt="npm version"></a>
9
+ <a href="https://www.npmjs.com/package/homebridge-ecobee-security"><img src="https://img.shields.io/npm/dm/homebridge-ecobee-security" alt="npm monthly downloads"></a>
10
+ <a href="LICENSE"><img src="https://img.shields.io/npm/l/homebridge-ecobee-security" alt="license"></a>
11
+ </p>
12
+
5
13
  Shows **ecobee Smart Security** in Apple Home as a security system: set it to **Home**, **Away** or
6
14
  **Off** (ecobee's Stay, Away and disarmed), and see **Alarm triggered** when ecobee has an open
7
- intrusion or smoke incident. It also adds
8
- **air quality** sensors for ecobee thermostats that have one (ecobee Premium), which ecobee's own
9
- HomeKit integration leaves out. Works with
10
- Siri ("set the security system to away") and Home automations. ecobee removed Smart Security from
11
- its HomeKit integration; this brings it back.
15
+ intrusion or smoke incident. It works with Siri ("set the security system to away") and Home
16
+ automations. ecobee removed Smart Security from its HomeKit integration; this brings it back, and adds
17
+ air quality sensors, a keypad disarm, presence and vacation switches, security holds for other plugins
18
+ and the ecobee doorbell camera with HomeKit Secure Video.
19
+
20
+ <p align="center"><img src="ecobee-devices.png" alt="An ecobee thermostat with security keypad, SmartSensor, doorbell camera and contact sensors" width="100%"></p>
12
21
 
13
22
  Unofficial. It uses the same cloud API as the ecobee iOS app (Auth0 sign-in at `auth.ecobee.com`,
14
23
  GraphQL at `federated-api.prod.federated-graph.generacapis.com`), which ecobee can change at any time.
15
- No dependencies.
16
24
 
17
25
  > [!WARNING]
18
26
  > Not affiliated with or endorsed by ecobee. The plugin signs in as the ecobee iOS app, which
@@ -20,6 +28,40 @@ No dependencies.
20
28
  > If you have **professional monitoring**, testing an alarm (opening a door while armed) can
21
29
  > lead to a call from the monitoring centre or a dispatch, just as it would with the ecobee app.
22
30
 
31
+ ## Features
32
+
33
+ - **Security system** with Home, Away, Night (optional) and Off, exit delay, and Alarm triggered.
34
+ - **Smoke Alarm** sensor for automations and Home app smoke notifications.
35
+ - **Air quality** and **CO2** sensors for ecobee thermostats that have one (ecobee Premium).
36
+ - **Keypad unlock** turns the system off when a door is unlocked with a code on its keypad.
37
+ - **Home Occupied** switch (with occupancy sensor) for arrive and leave automations without confirmation prompts.
38
+ - **Vacation Mode** switch that follows, and starts, an ecobee vacation.
39
+ - **Security holds** let other plugins, like a robot vacuum, keep the system from arming Away while they work.
40
+ - **Doorbell camera** with HomeKit Secure Video, live view and snapshots; with the **doorbell link**, instant ring and motion, the sensors the doorbell bridges to HomeKit, and its Chime, Status Light and Night Vision switches.
41
+
42
+ ## Contents
43
+
44
+ - [Requirements](#requirements)
45
+ - [Install](#install)
46
+ - [Sign-in](#sign-in)
47
+ - [Settings](#settings)
48
+ - [Security system](#security-system)
49
+ - [Keypad unlock](#keypad-unlock)
50
+ - [Security holds](#security-holds)
51
+ - [Doorbell camera](#doorbell-camera)
52
+ - [Home Occupied switch](#home-occupied-switch)
53
+ - [Vacation Mode switch](#vacation-mode-switch)
54
+ - [Smoke alarm and air quality](#smoke-alarm-and-air-quality)
55
+ - [Troubleshooting](#troubleshooting)
56
+ - [API notes](#api-notes)
57
+ - [License](#license)
58
+
59
+ ## Requirements
60
+
61
+ - Homebridge 1.8 or 2.x and Node 22 or 24.
62
+ - An ecobee account with **Smart Security** (the ecobee Smart Doorbell Camera is only needed for the doorbell features).
63
+ - For the doorbell camera: an ffmpeg with `libfdk_aac` and `libx264` (the Homebridge Raspberry Pi image has one), and, for HomeKit Secure Video, a home hub and an iCloud+ plan.
64
+
23
65
  ## Install
24
66
 
25
67
  In the Homebridge UI, search the Plugins tab for **ecobee Smart Security**, or:
@@ -28,7 +70,7 @@ In the Homebridge UI, search the Plugins tab for **ecobee Smart Security**, or:
28
70
  npm install -g homebridge-ecobee-security
29
71
  ```
30
72
 
31
- Running it as a child bridge is recommended. Requires Node 22 or 24 and Homebridge 1.8 or 2.x.
73
+ Running it as a child bridge is recommended.
32
74
 
33
75
  ## Sign-in
34
76
 
@@ -52,7 +94,10 @@ node <plugin folder>/bin/ecobee-login.js # email, password, MFA code
52
94
  node <plugin folder>/bin/ecobee-login.js --browser # website sign-in
53
95
  ```
54
96
 
55
- ## Config
97
+ ## Settings
98
+
99
+ Everything is set on the plugin's settings page in the Homebridge UI, in these cards (the config
100
+ keys are for editing `config.json` by hand):
56
101
 
57
102
  ```json
58
103
  {
@@ -71,23 +116,53 @@ node <plugin folder>/bin/ecobee-login.js --browser # website sign-in
71
116
 
72
117
  `homeId` is only needed if the account has several homes (the settings page lists them).
73
118
 
119
+ ### ecobee account
120
+
121
+ Sign-in: see [Sign-in](#sign-in).
122
+
123
+ ### Security system settings
124
+
125
+ | Setting | Default | |
126
+ |---|---|---|
127
+ | `offerNight` | `false` | **Enable Night** in the settings. Adds Night to the Home app. ecobee has no Night mode, so Night arms ecobee's Stay, and the tile keeps showing Night until the state changes (Stay armed in the ecobee app or at the keypad shows as Home). HomeKit only picks up a changed list of modes on a new control, so changing this setting recreates the security system in the Home app: set up scenes and automations that use it again. |
128
+ | `alarmTrigger` | `"incident"` | **Home app alarm** in the settings: when the Home app's security tile shows **Triggered**, and so when its critical alert and "security system triggered" automations fire. `"incident"` ("When a sensor is tripped (entry delay starts)"): as soon as ecobee opens an incident because a door or sensor tripped while armed, like the ecobee app, so it alerts every time someone comes in, even if they disarm in time. `"entryDelay"` ("When the siren goes off (entry delay ran out)"): only after the entry delay runs out without a disarm. ecobee's own alerts and professional monitoring don't change either way. Smoke alarms always trigger immediately. |
129
+
130
+ ### Door keypads settings
131
+
132
+ | Setting | Default | |
133
+ |---|---|---|
134
+ | `keypadDisarm` | `false` | Turns the security system off when a door is unlocked with a code on its keypad (see [Keypad unlock](#keypad-unlock)). |
135
+ | `keypadLocks` | all | The locks that do that, by serial number; the settings page lists the ones found. |
136
+
137
+ ### Security holds settings
138
+
74
139
  | Setting | Default | |
75
140
  |---|---|---|
76
- | `offerNight` | `false` | Adds Night to the Home app. ecobee has no Night mode, so Night arms ecobee's Stay, and the tile keeps showing Night until the state changes (Stay armed in the ecobee app or at the keypad shows as Home). HomeKit only picks up a changed list of modes on a new control, so changing this setting recreates the security system in the Home app: set up scenes and automations that use it again. |
77
- | `alarmTrigger` | `"incident"` | When the tile enters **Triggered**: `"incident"` immediately, when ecobee opens an incident as a door or sensor trips while armed (mirrors the ecobee app); `"entryDelay"` only after the entry (disarm) delay runs out without a disarm. Smoke alarms always trigger immediately. |
78
- | `smokeSensor` | `true` | Adds a separate **Smoke Alarm** accessory (a Smoke Sensor) that detects smoke while ecobee has a smoke-alarm incident open, for automations and Home app smoke notifications. Set to `false` to remove it. |
79
141
  | `allowHolds` | `false` | Lets other plugins, like a robot vacuum, keep the system from arming Away while their task runs (see [Security holds](#security-holds)). |
80
142
  | `holdPlugins` | all | The plugins allowed to do that; the settings page lists them. |
81
143
  | `armAwayNowSwitch` | `false` | Adds an **Arm Away Now** switch: arms Away immediately and asks any task in progress to stop (a robot goes home). |
82
144
  | `taskWaitSeconds` | `120` | How much longer the Away countdown may wait for a task to finish, e.g. a robot getting home (0: don't wait). |
145
+
146
+ ### Doorbell camera settings
147
+
148
+ | Setting | Default | |
149
+ |---|---|---|
150
+ | `doorbellCamera` | `false` | Adds the doorbell camera (beta). Restart the bridge after changing it. |
151
+ | `motionGrace` | `15` | Seconds the motion sensor stays on after the doorbell's motion ends (6 to 120). |
152
+ | `ffmpegPath` | `/usr/local/bin/ffmpeg` if it exists, else `ffmpeg` | The ffmpeg to use. |
153
+ | `debugRecordings` | `false` | Keeps the last five recordings for troubleshooting (config file only; see [Troubleshooting](#troubleshooting)). |
154
+
155
+ ### Switches and sensors settings
156
+
157
+ | Setting | Default | |
158
+ |---|---|---|
83
159
  | `occupancySwitch` | `false` | Adds a **Home Occupied** switch for your presence automations (see [Home Occupied switch](#home-occupied-switch)). |
84
- | `occupancyName` | `"Home Occupied"` | The switch's name in the Home app. |
85
- | `keypadDisarm` | `false` | Turns the security system off when a door is unlocked with a code on its keypad (see [Keypad unlock](#keypad-unlock)). |
86
- | `keypadLocks` | all | The locks that do that, by serial number; the settings page lists the ones found. |
160
+ | `vacationSwitch` | `false` | Adds a **Vacation Mode** switch that is on while an ecobee vacation is running (see [Vacation Mode switch](#vacation-mode-switch)). |
161
+ | `smokeSensor` | `true` | Adds a separate **Smoke Alarm** accessory (a Smoke Sensor) that detects smoke while ecobee has a smoke-alarm incident open, for automations and Home app smoke notifications. Set to `false` to remove it. |
87
162
  | `airQuality` | `true` | For each thermostat with an air quality sensor: an accessory "&lt;thermostat&gt; Air Quality" with an **Air Quality Sensor** (overall level; VOC as ecobee reports it, in ppb, which the Home app labels µg/m³) and a **Carbon Dioxide Sensor** (ppm). Read every 5 minutes. The level follows the ecobee app's Clean–Poor bar: its first two segments are Excellent, then Good, Fair, Inferior, Poor; Unknown while the sensor calibrates. |
88
163
  | `co2Alert` | `1000` | CO2 (ppm) at or above which the Carbon Dioxide Sensor reports abnormal levels. |
89
164
 
90
- ## How it behaves
165
+ ## Security system
91
166
 
92
167
  - **Arm Away** uses ecobee's Away exit delay (60 s by default), just like the app. During the
93
168
  delay the Home app shows "Arming…" (current Off, target Away). Home and Night use ecobee's Stay
@@ -104,9 +179,9 @@ node <plugin folder>/bin/ecobee-login.js --browser # website sign-in
104
179
  The security tile and Smoke Alarm also show No Response when ecobee can't reach your thermostats, which run
105
180
  Smart Security, for a minute (all of them; one dropping out briefly doesn't count), and an air quality sensor
106
181
  does when ecobee can't reach its thermostat.
107
- - **Keypad unlock:** unlocking a door with its keypad can turn the system off: see below.
108
- - **Home Occupied switch:** your arrive and leave automations can arm and disarm Away without a confirmation prompt: see below.
109
- - **Security holds** let other plugins, like a robot vacuum, keep the system from arming Away while they work: see below.
182
+ - **Keypad unlock:** unlocking a door with its keypad can turn the system off: see [Keypad unlock](#keypad-unlock).
183
+ - **Home Occupied switch:** your arrive and leave automations can arm and disarm Away without a confirmation prompt: see [Home Occupied switch](#home-occupied-switch).
184
+ - **Security holds** let other plugins, like a robot vacuum, keep the system from arming Away while they work: see [Security holds](#security-holds).
110
185
 
111
186
  ## Keypad unlock
112
187
 
@@ -133,39 +208,6 @@ schedules, expiry), so the plugin needs no codes of its own.
133
208
  127.0.0.1 with the bridge PIN, since each child bridge runs in its own process. The log says if
134
209
  it isn't on.
135
210
 
136
- ## Home Occupied switch
137
-
138
- Apple Home asks you to confirm (a notification you have to tap) whenever a people-arrive or
139
- people-leave automation changes a security system. Automations that flip an ordinary switch don't
140
- ask. Turn on **Home Occupied switch** (`occupancySwitch`) and the plugin adds a **Home Occupied**
141
- switch (named by `occupancyName`) that those automations set instead; the plugin then changes the
142
- security system itself.
143
-
144
- In the Home app, create two automations:
145
-
146
- 1. **When the last person leaves** (People > Leave, "Everyone leaves") > turn **Home Occupied** off.
147
- 2. **When the first person arrives** (People > Arrive, "Anyone arrives") > turn **Home Occupied** on.
148
-
149
- What each direction does:
150
-
151
- - **Off (nobody home)** arms **Away** exactly as Away from the Home app does: the normal exit delay,
152
- and if a robot or other task is out it [waits for it](#security-holds). Home, Night and Off are all
153
- switched to Away; if it is already Away, or waiting to be, nothing happens.
154
- - **On (someone home)** turns the system **off, but only if it is Away** (armed, arming, or waiting for
155
- a task to finish). Home and Night, and a system that is already off, are left as they are, so
156
- arriving never cancels the Home you set before bed.
157
- - Only a real change counts: setting the switch to the value it already has does nothing. It starts as
158
- on and is remembered across restarts; restarting the plugin never arms or disarms anything.
159
- - The switch is your presence signal, not a mirror of the security system: arming or disarming
160
- elsewhere doesn't move it.
161
- - If ecobee can't be reached, the switch still keeps its new value; the log says the security system
162
- was left as it was (disarming is retried once).
163
-
164
- > [!CAUTION]
165
- > HomeKit doesn't ask for authorisation to use a switch. Turning Home Occupied on, by hand, with Siri
166
- > or from a shared home member's phone, turns off an Away system, so treat it as as sensitive as the
167
- > security tile itself.
168
-
169
211
  ## Security holds
170
212
 
171
213
  Things that move while you're out set off ecobee's motion sensors: a robot vacuum cleaning, or an AC
@@ -192,7 +234,7 @@ Using a robot vacuum as the example:
192
234
  | The robot starts cleaning while the system is armed **Away** | Switches to Home, and goes back to Away when the robot is done. |
193
235
  | The robot starts while the system is set to **Home**, **Night** or **Off** | Nothing changes. |
194
236
  | You arm **Away in the Home app** while the robot is cleaning (the tile, a scene, an automation or Siri) | Stays in Home until the robot is done, then arms Away. The tile shows "Arming…" meanwhile. |
195
- | You want Away **now** | Turn on the **Arm Away Now** switch (see below). It arms Away right away and sends the robot home. |
237
+ | You want Away **now** | Turn on the **Arm Away Now** switch (see [Hold options](#hold-options)). It arms Away right away and sends the robot home. |
196
238
  | You arm **Away in the ecobee app** while the robot is cleaning | Sends the robot home, and gives it up to 2 extra minutes on the countdown. It arms as soon as the robot is docked, but never earlier than your normal countdown. If the robot won't make it in time, it stops where it is before the sensors arm. |
197
239
  | You arm **Away at the keypad** while the robot is cleaning | Stops the robot where it is. ecobee doesn't report keypad countdowns, so this happens once Away is already armed: there's a window of up to 10 seconds in which a motion sensor could still catch the robot. |
198
240
  | You change the mode yourself while the robot is cleaning (in any app or at the keypad) | Your choice wins: when the robot is done, the system is left as you set it. |
@@ -201,7 +243,7 @@ Using a robot vacuum as the example:
201
243
  Other plugins work the same way; what "stop" means is up to each one (a robot pauses or goes home,
202
244
  an AC turns off). Several at once are fine: Away comes back once all of them are done.
203
245
 
204
- ### Settings
246
+ ### Hold options
205
247
 
206
248
  In the **Security holds** section of the settings:
207
249
 
@@ -238,6 +280,170 @@ can declare `"homebridge-security-hold": { "client": true }` to appear in the se
238
280
  (hold, release, and being asked to stop or finish before Away arms) is documented in
239
281
  [Security hold](https://github.com/seanfletchr/homebridge-narwal-freo/blob/main/docs/security-hold.md).
240
282
 
283
+ ## Doorbell camera
284
+
285
+ Turn on **Doorbell camera** (`doorbellCamera`, off by default, beta) to bring the ecobee Smart Doorbell
286
+ Camera into HomeKit Secure Video: recordings, activity zones and Apple's person and package detection in the
287
+ Home app, plus live view and snapshots. With the
288
+ [doorbell link](#doorbell-link) it is a full video doorbell: instant ring and motion, the sensors the
289
+ doorbell bridges to HomeKit, and its Chime, Status Light and Night Vision switches.
290
+
291
+ The settings card (**Doorbell camera with HomeKit Secure Video**) only appears when your ecobee account has a
292
+ doorbell; the plugin checks once when the bridge starts. Below the switch, **Doorbell link** shows whether the
293
+ link is set up (**Pair…** / **Unlink**), and **Advanced** holds the motion grace period and the ffmpeg path.
294
+
295
+ **Needs an ffmpeg with libfdk_aac and libx264.** The Homebridge Raspberry Pi image has one at
296
+ `/usr/local/bin/ffmpeg`, which is used automatically; otherwise set `ffmpegPath`. Without libfdk_aac or libx264 the
297
+ camera isn't published and the log says why.
298
+
299
+ ### Setup
300
+
301
+ 1. In the plugin settings, turn on **Doorbell camera with HomeKit Secure Video**.
302
+ 2. *Optional but recommended:* in the Home app, **remove ecobee's own doorbell**. Its automations go
303
+ with it, and so do the sensors it bridges to HomeKit (an ecobee SmartSensor on a door, say); the
304
+ plugin publishes those again once linked. A doorbell pairs with only one HomeKit home at a time, so
305
+ this is needed for the link.
306
+ 3. In the settings, next to Doorbell link, choose **Pair…**, then **Find doorbells**, enter the doorbell's
307
+ HomeKit setup code (the 8 digits on the doorbell or its box; the plugin never stores it) and **Pair**.
308
+ 4. **Restart the bridge.**
309
+ 5. The camera is published as its **own accessory**, not behind the Homebridge bridge, with its own setup
310
+ code, which the log prints at start. In the Home app, **Add Accessory** > **More options**, and enter it.
311
+ 6. In the Home app, open the camera's settings > **Recording Options** and choose **Stream** or
312
+ **Stream & Allow Recording** for when you're home and away. Set up your automations again.
313
+
314
+ Skip steps 2 to 4 to run the camera without the link: it is then a second tile, a plain camera named
315
+ "&lt;name&gt; Camera", next to ecobee's own doorbell tile, which keeps the ring, motion and recordings. With the
316
+ link the camera replaces ecobee's doorbell. Two-way talk isn't supported yet (see the notes above).
317
+
318
+ Notes:
319
+
320
+ - The plugin keeps one live view session to the camera open all the time, over your home network, so the
321
+ picture appears quickly. It reconnects by itself, and the camera shows **No Response** while the
322
+ session has been down for a minute or the plugin can't reach ecobee.
323
+ - Live view and recordings carry an **"ecobee" watermark** in the corner, which ecobee's own HomeKit
324
+ stream doesn't have.
325
+ - The doorbell streams about 1 Mb/s continuously while the camera is on. **A weak Wi-Fi link at the
326
+ doorbell shows up as frozen or choppy video**; move the access point closer or use a mesh node nearby.
327
+ - The live view video is the camera's own, passed on as it is (portrait, not re-encoded). The audio is
328
+ converted to the AAC-ELD HomeKit needs.
329
+ - Turning the camera off in the Home app (**Camera Off**) refuses live views and recordings.
330
+
331
+ ### Doorbell link
332
+
333
+ The doorbell is also a HomeKit accessory itself, on your network. Pair the plugin with it (step 3
334
+ above) and the camera becomes a **video doorbell** with the doorbell's own name, a **new accessory** in
335
+ the Home app. You get:
336
+
337
+ - the **ring** (single, double and long press) and a **motion sensor**, within about a second;
338
+ - the **sensors the doorbell connects to HomeKit**, published by the plugin with their contact, motion,
339
+ occupancy and battery state;
340
+ - the doorbell's own switches: **Chime Doorbell**, **Camera Status Light** and **Night Vision Light**.
341
+ Changes in the Home app are sent to the doorbell, and changes made at the doorbell show up in the Home
342
+ app. While the link is down, setting one fails.
343
+
344
+ The pairing is kept in `ecobee-security/doorbell-pairing.json` in the Homebridge folder. **Unlink** in the
345
+ settings removes it from the doorbell as well (restart the bridge afterwards). If the link drops, the
346
+ plugin looks for the doorbell again and reconnects by itself; the ring, motion, switches and bridged
347
+ sensors show **No Response** while it has been down for a minute. The video still comes from the
348
+ cloud session (the doorbell's own stream isn't used).
349
+
350
+ ### HomeKit Secure Video
351
+
352
+ The camera records for HomeKit Secure Video (a home hub and an iCloud+ plan are needed, as for any
353
+ HomeKit camera). Turn recording on in the camera's **Recording Options** (setup step 6); the clips, with
354
+ person, animal and package detection, are then made by HomeKit.
355
+
356
+ - **Motion** comes from the doorbell itself through the [doorbell link](#doorbell-link), within a second,
357
+ and a doorbell press counts as motion too. Without the link the plugin asks ecobee's cloud for the
358
+ camera's events every 5 seconds, so motion arrives a few seconds late (the clip still starts about 4
359
+ seconds before it).
360
+ - The plugin keeps the last 30 seconds of the camera in memory (a couple of MB) and starts each clip about
361
+ 4 seconds before the motion. **The video of a clip is re-encoded** with libx264 (software), as HomeKit's
362
+ recording settings ask (the camera's own stream has keyframes too far apart for HomeKit). That uses about
363
+ 2 of a Raspberry Pi 4's cores while a clip is being recorded; live view is not re-encoded and is light.
364
+ The audio is converted to AAC. **Record Audio** in the Home app decides whether a clip has sound.
365
+ - **Motion grace period** (`motionGrace`, 15 seconds by default, 6 to 120): the motion sensor stays on this long
366
+ after the doorbell's motion ends (and after a press), so one visit is one motion, and HomeKit decides when a
367
+ clip ends. Clips are therefore at least about 10 seconds long (the pre-roll, the grace period and HomeKit's own
368
+ tail). The plugin itself stops a clip only after 5 minutes.
369
+
370
+ To inspect recordings, see [Troubleshooting](#troubleshooting).
371
+
372
+ ## Home Occupied switch
373
+
374
+ Apple Home asks you to confirm (a notification you have to tap) whenever a people-arrive or
375
+ people-leave automation changes a security system. Automations that flip an ordinary switch don't
376
+ ask. Turn on **Home Occupied switch** (`occupancySwitch`) and the plugin adds a **Home Occupied**
377
+ switch (named **Home Occupied**; rename it in the Home app) that those automations set instead; the plugin then changes the
378
+ security system itself. The accessory also has an occupancy sensor that shows Occupied while the
379
+ switch is on, so automations can use "occupancy detected / not detected" and the room shows it. The tile shows the
380
+ occupancy sensor; tapping it opens the switch.
381
+
382
+ In the Home app, create two automations:
383
+
384
+ 1. **When the last person leaves** (People > Leave, "Everyone leaves") > turn **Home Occupied** off.
385
+ 2. **When the first person arrives** (People > Arrive, "Anyone arrives") > turn **Home Occupied** on.
386
+
387
+ What each direction does:
388
+
389
+ - **Off (nobody home)** arms **Away** exactly as Away from the Home app does: the normal exit delay,
390
+ and if a robot or other task is out it [waits for it](#security-holds). Home, Night and Off are all
391
+ switched to Away; if it is already Away, or waiting to be, nothing happens.
392
+ - **On (someone home)** turns the system **off, but only if it is Away** (armed, arming, or waiting for
393
+ a task to finish). Home and Night, and a system that is already off, are left as they are, so
394
+ arriving never cancels the Home you set before bed.
395
+ - Only a real change counts: setting the switch to the value it already has does nothing. It starts as
396
+ on and is remembered across restarts; restarting the plugin never arms or disarms anything.
397
+ - The switch is your presence signal, not a mirror of the security system: arming or disarming
398
+ elsewhere doesn't move it.
399
+ - If ecobee can't be reached, the switch still keeps its new value; the log says the security system
400
+ was left as it was (disarming is retried once).
401
+
402
+ > [!CAUTION]
403
+ > HomeKit doesn't ask for authorisation to use a switch. Turning Home Occupied on, by hand, with Siri
404
+ > or from a shared home member's phone, turns off an Away system, so treat it as as sensitive as the
405
+ > security tile itself.
406
+
407
+ ## Vacation Mode switch
408
+
409
+ Turn on **Vacation Mode switch** (`vacationSwitch`) and the plugin adds a switch named **Vacation Mode**
410
+ (rename it in the Home app) that is **on while an ecobee vacation is running** on any of your thermostats,
411
+ so other accessories or plugins can follow it (for example a robot vacuum's vacation mode that
412
+ follows a switch by name). The plugin reads ecobee every minute and logs when a vacation starts or
413
+ ends.
414
+
415
+ - Turn the switch **on** to start a vacation now, on every thermostat, until you turn it off. It
416
+ uses the temperatures of ecobee's default vacation settings, fan on auto, and ends by itself after
417
+ 30 days at the latest. Set dated vacations in the ecobee app. If ecobee doesn't show the vacation
418
+ afterwards, the switch goes back to off and the log warns.
419
+ - Turning the switch **off** ends the running vacation on the thermostats. If ecobee still reports
420
+ it afterwards, the switch shows on again and the log warns.
421
+ - Like the other sensors, the switch shows No Response while ecobee can't be reached or you're
422
+ signed out. Restart the bridge after changing the setting.
423
+
424
+ ## Smoke alarm and air quality
425
+
426
+ - **Smoke Alarm** (`smokeSensor`, on by default) is its own accessory, a Smoke Sensor that detects smoke while ecobee has a smoke-alarm incident open. It is separate from the security tile (the Home app would otherwise merge it into the tile with a cloud icon).
427
+ - **Air quality** (`airQuality`, on by default) adds, for each thermostat with an air quality sensor (ecobee Premium), an Air Quality Sensor and a Carbon Dioxide Sensor, read every 5 minutes; `co2Alert` sets the CO2 level (ppm) that reports abnormal levels. Details are in the settings table above. Temperature and humidity come from ecobee's own HomeKit integration.
428
+
429
+ ## Troubleshooting
430
+
431
+ - **No Response** in the Home app: the security tile, Smoke Alarm and air quality sensors show it
432
+ instead of their last state when ecobee can't be reached (see [Security system](#security-system)),
433
+ you're signed out (sign in again, [Sign-in](#sign-in)), or, for the doorbell link and camera, the
434
+ session has been down for a minute.
435
+ - **Frozen or choppy doorbell video:** a weak Wi-Fi link at the doorbell; move the access point closer
436
+ or use a mesh node nearby.
437
+ - **Live view doesn't work or ends after about 30 seconds** from a Mac or iPhone on a different
438
+ network than Homebridge (for example plugged into the ISP router behind a mesh router): keep the
439
+ device on the same network as Homebridge.
440
+ - **Recordings look wrong or are missing:** set `"debugRecordings": true` in the plugin's config (there is no settings-page switch) to keep the last five clips exactly as
441
+ sent to HomeKit, in `ecobee-security/recordings` in the Homebridge folder: an `.mp4` and a `.json` with each fragment's size,
442
+ send time and timing (decode time, sample count and duration per track). Turn it off again afterwards; the clips are
443
+ video of your home.
444
+ - **Camera not published:** the ffmpeg lacks `libfdk_aac` or `libx264`; the log says so. Set `ffmpegPath`.
445
+ - **Keypad disarm does nothing:** Homebridge's insecure mode must be on; the log says if it isn't.
446
+
241
447
  ## API notes
242
448
 
243
449
  [docs/api.md](docs/api.md) describes the sign-in flow and GraphQL calls the plugin uses, for anyone
@@ -27,30 +27,30 @@
27
27
  "description": "Only needed if your ecobee account has more than one home. The settings page lists them."
28
28
  },
29
29
  "offerNight": {
30
- "title": "Offer Night",
30
+ "title": "Enable Night",
31
31
  "type": "boolean",
32
32
  "default": false,
33
33
  "description": "Adds a Night mode to use in automations. ecobee has no Night mode, so Night arms ecobee's Stay. Changing this recreates the security system in the Home app, so you need to set up its scenes and automations again."
34
34
  },
35
35
  "alarmTrigger": {
36
- "title": "Enter Triggered State",
36
+ "title": "Home app alarm",
37
37
  "type": "string",
38
38
  "default": "incident",
39
39
  "oneOf": [
40
40
  {
41
- "title": "Immediately (mirror ecobee app)",
41
+ "title": "When a sensor is tripped (entry delay starts)",
42
42
  "enum": [
43
43
  "incident"
44
44
  ]
45
45
  },
46
46
  {
47
- "title": "After the entry delay",
47
+ "title": "When the siren goes off (entry delay ran out)",
48
48
  "enum": [
49
49
  "entryDelay"
50
50
  ]
51
51
  }
52
52
  ],
53
- "description": "Immediately: as soon as a door or sensor trips while armed, like the ecobee app. After the entry delay: only if no one disarms in time, so automations don't run while you walk in. Smoke alarms always trigger immediately."
53
+ "description": "Sets when the Home app's security tile shows Triggered. Its critical alert and \"security system triggered\" automations follow it. ecobee's own alerts and professional monitoring don't change. \"When a sensor is tripped\" alerts every time someone comes in while it's armed, even if they disarm in time. Smoke alarms always trigger immediately."
54
54
  },
55
55
  "smokeSensor": {
56
56
  "title": "Smoke sensor",
@@ -104,15 +104,37 @@
104
104
  "title": "Home Occupied switch",
105
105
  "type": "boolean",
106
106
  "default": false,
107
- "description": "Adds a Home Occupied switch to the Home app. Your own people-arrive and people-leave automations set it, and it does the rest: off (nobody home) arms Away, on (someone home) turns Away off. Switches don't ask for confirmation the way automations that change the security system do. See \"Home Occupied switch\" in the README."
107
+ "description": "Adds a Home Occupied switch to the Home app, with an occupancy sensor. By default your own people-arrive and people-leave automations set it, and it does the rest: off (nobody home) arms Away, on (someone home) turns Away off. Switches don't ask for confirmation the way automations that change the security system do. See \"Home Occupied switch\" in the README."
108
108
  },
109
- "occupancyName": {
110
- "title": "Home Occupied switch name",
109
+ "vacationSwitch": {
110
+ "title": "Vacation Mode switch",
111
+ "type": "boolean",
112
+ "default": false,
113
+ "description": "Shows when an ecobee vacation is on, for other accessories to follow. Turn it on to start a vacation now, until you turn it off; set dated vacations in the ecobee app."
114
+ },
115
+ "doorbellCamera": {
116
+ "title": "Doorbell camera",
117
+ "type": "boolean",
118
+ "default": false,
119
+ "description": "Brings the ecobee doorbell into HomeKit Secure Video: recordings, activity zones and Apple's person and package detection in the Home app, plus live view. With the doorbell link it replaces ecobee's doorbell (instant ring and motion). Two-way talk isn't supported yet. Restart the bridge after changing this. Add it in the Home app with the setup code shown in the Homebridge log. Needs an ffmpeg with libfdk_aac and libx264. See \"Doorbell camera\" in the README."
120
+ },
121
+ "motionGrace": {
122
+ "title": "Motion grace period (seconds)",
123
+ "type": "integer",
124
+ "default": 15,
125
+ "minimum": 6,
126
+ "maximum": 120,
127
+ "description": "How long a clip keeps recording after motion stops. Someone back in view within this time stays in the same clip.",
128
+ "condition": {
129
+ "functionBody": "return model.doorbellCamera === true;"
130
+ }
131
+ },
132
+ "ffmpegPath": {
133
+ "title": "ffmpeg path",
111
134
  "type": "string",
112
- "default": "Home Occupied",
113
- "description": "Name shown in the Home app.",
135
+ "description": "Only if the camera can't find ffmpeg. It needs libfdk_aac and libx264. Default: /usr/local/bin/ffmpeg if it exists, else ffmpeg from the PATH.",
114
136
  "condition": {
115
- "functionBody": "return model.occupancySwitch === true;"
137
+ "functionBody": "return model.doorbellCamera === true;"
116
138
  }
117
139
  },
118
140
  "airQuality": {