homebridge-ecobee-security 0.7.1 → 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 +66 -0
- package/README.md +267 -21
- package/config.schema.json +43 -6
- package/homebridge-ui/public/index.html +227 -34
- package/homebridge-ui/server.js +51 -0
- package/lib/airquality.js +56 -2
- package/lib/camera/bridged.js +171 -0
- package/lib/camera/buffer.js +222 -0
- package/lib/camera/camera.js +663 -0
- package/lib/camera/h264.js +245 -0
- package/lib/camera/hap-link.js +292 -0
- package/lib/camera/hap-pairing.js +116 -0
- package/lib/camera/jitter.js +152 -0
- package/lib/camera/mkv.js +126 -0
- package/lib/camera/mp4info.js +182 -0
- package/lib/camera/recorder.js +397 -0
- package/lib/camera/session.js +537 -0
- package/lib/ecobee.js +226 -5
- package/lib/platform.js +349 -3
- package/lib/security.js +194 -20
- package/lib/vacation.js +244 -0
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
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
|
+
|
|
53
|
+
## 0.8.0
|
|
54
|
+
|
|
55
|
+
- While the plugin can't reach ecobee (three failed reads in a row, or signed out), the security
|
|
56
|
+
tile, the Smoke Alarm and the air quality sensors show **No Response** in the Home app instead of
|
|
57
|
+
their last state. They come back with the next successful read.
|
|
58
|
+
- The security tile and Smoke Alarm also show **No Response** when ecobee's cloud can't reach the
|
|
59
|
+
thermostats Smart Security runs on: every thermostat unreachable for a minute. One dropping out
|
|
60
|
+
briefly doesn't count, and it comes back as soon as one is connected. A thermostat's air quality
|
|
61
|
+
sensors show No Response while ecobee can't reach it. Security holds are refused meanwhile.
|
|
62
|
+
- New setting **Home Occupied switch** (`occupancySwitch`, off by default; `occupancyName`): a switch
|
|
63
|
+
for your Home app people-arrive and people-leave automations. Off arms Away like the Home app tile
|
|
64
|
+
does (waiting for robots that are out), on turns Away off (never Home, Night or Off). Switches
|
|
65
|
+
don't need the confirmation that automations controlling a security system do.
|
|
66
|
+
- Settings page: the Home ID field is now a list of the homes on your ecobee account, shown only
|
|
67
|
+
when there's more than one (the list fills in once the plugin has started).
|
|
68
|
+
|
|
3
69
|
## 0.7.1
|
|
4
70
|
|
|
5
71
|
- Keypad unlock: the plugin now reads ecobee's current state first and only disarms when the system
|
package/README.md
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
<p align="center"><img src="
|
|
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
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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.
|
|
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
|
-
##
|
|
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
|
{
|
|
@@ -69,23 +114,55 @@ node <plugin folder>/bin/ecobee-login.js --browser # website sign-in
|
|
|
69
114
|
}
|
|
70
115
|
```
|
|
71
116
|
|
|
72
|
-
`homeId` is only needed if the account has several homes (the
|
|
117
|
+
`homeId` is only needed if the account has several homes (the settings page lists them).
|
|
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
|
|
73
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). |
|
|
83
|
-
|
|
84
|
-
|
|
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
|
+
|---|---|---|
|
|
159
|
+
| `occupancySwitch` | `false` | Adds a **Home Occupied** switch for your presence automations (see [Home Occupied switch](#home-occupied-switch)). |
|
|
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. |
|
|
85
162
|
| `airQuality` | `true` | For each thermostat with an air quality sensor: an accessory "<thermostat> 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. |
|
|
86
163
|
| `co2Alert` | `1000` | CO2 (ppm) at or above which the Carbon Dioxide Sensor reports abnormal levels. |
|
|
87
164
|
|
|
88
|
-
##
|
|
165
|
+
## Security system
|
|
89
166
|
|
|
90
167
|
- **Arm Away** uses ecobee's Away exit delay (60 s by default), just like the app. During the
|
|
91
168
|
delay the Home app shows "Arming…" (current Off, target Away). Home and Night use ecobee's Stay
|
|
@@ -97,9 +174,14 @@ node <plugin folder>/bin/ecobee-login.js --browser # website sign-in
|
|
|
97
174
|
isn't shown as an alarm). See `alarmTrigger` above for when it starts showing. Disarming clears it. Every change in the incident list is logged.
|
|
98
175
|
- **Siri:** asking for Home or for Stay mode both set Home (ecobee's Stay).
|
|
99
176
|
- **Night** is only offered with `offerNight`; ecobee has no Night mode of its own.
|
|
100
|
-
- After three failed reads in a row the accessory shows a fault
|
|
101
|
-
|
|
102
|
-
|
|
177
|
+
- After three failed reads in a row the accessory shows a fault, and the security tile, Smoke Alarm and air
|
|
178
|
+
quality sensors show **No Response** instead of their last state until ecobee answers again; reads back off up to 5 minutes.
|
|
179
|
+
The security tile and Smoke Alarm also show No Response when ecobee can't reach your thermostats, which run
|
|
180
|
+
Smart Security, for a minute (all of them; one dropping out briefly doesn't count), and an air quality sensor
|
|
181
|
+
does when ecobee can't reach its thermostat.
|
|
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).
|
|
103
185
|
|
|
104
186
|
## Keypad unlock
|
|
105
187
|
|
|
@@ -152,7 +234,7 @@ Using a robot vacuum as the example:
|
|
|
152
234
|
| The robot starts cleaning while the system is armed **Away** | Switches to Home, and goes back to Away when the robot is done. |
|
|
153
235
|
| The robot starts while the system is set to **Home**, **Night** or **Off** | Nothing changes. |
|
|
154
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. |
|
|
155
|
-
| You want Away **now** | Turn on the **Arm Away Now** switch (see
|
|
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. |
|
|
156
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. |
|
|
157
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. |
|
|
158
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. |
|
|
@@ -161,7 +243,7 @@ Using a robot vacuum as the example:
|
|
|
161
243
|
Other plugins work the same way; what "stop" means is up to each one (a robot pauses or goes home,
|
|
162
244
|
an AC turns off). Several at once are fine: Away comes back once all of them are done.
|
|
163
245
|
|
|
164
|
-
###
|
|
246
|
+
### Hold options
|
|
165
247
|
|
|
166
248
|
In the **Security holds** section of the settings:
|
|
167
249
|
|
|
@@ -198,6 +280,170 @@ can declare `"homebridge-security-hold": { "client": true }` to appear in the se
|
|
|
198
280
|
(hold, release, and being asked to stop or finish before Away arms) is documented in
|
|
199
281
|
[Security hold](https://github.com/seanfletchr/homebridge-narwal-freo/blob/main/docs/security-hold.md).
|
|
200
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
|
+
"<name> 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
|
+
|
|
201
447
|
## API notes
|
|
202
448
|
|
|
203
449
|
[docs/api.md](docs/api.md) describes the sign-in flow and GraphQL calls the plugin uses, for anyone
|
package/config.schema.json
CHANGED
|
@@ -24,33 +24,33 @@
|
|
|
24
24
|
"homeId": {
|
|
25
25
|
"title": "Home ID",
|
|
26
26
|
"type": "string",
|
|
27
|
-
"description": "Only needed if your account has more than one home. The
|
|
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": "
|
|
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": "
|
|
36
|
+
"title": "Home app alarm",
|
|
37
37
|
"type": "string",
|
|
38
38
|
"default": "incident",
|
|
39
39
|
"oneOf": [
|
|
40
40
|
{
|
|
41
|
-
"title": "
|
|
41
|
+
"title": "When a sensor is tripped (entry delay starts)",
|
|
42
42
|
"enum": [
|
|
43
43
|
"incident"
|
|
44
44
|
]
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
|
-
"title": "
|
|
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": "
|
|
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",
|
|
@@ -100,6 +100,43 @@
|
|
|
100
100
|
},
|
|
101
101
|
"description": "Serial numbers of the locks that disarm (the settings page lists the ones found). With no list, every lock does."
|
|
102
102
|
},
|
|
103
|
+
"occupancySwitch": {
|
|
104
|
+
"title": "Home Occupied switch",
|
|
105
|
+
"type": "boolean",
|
|
106
|
+
"default": false,
|
|
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
|
+
},
|
|
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",
|
|
134
|
+
"type": "string",
|
|
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.",
|
|
136
|
+
"condition": {
|
|
137
|
+
"functionBody": "return model.doorbellCamera === true;"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
103
140
|
"airQuality": {
|
|
104
141
|
"title": "Air quality sensors",
|
|
105
142
|
"type": "boolean",
|