@sealad886/homebridge-blink-cameras-new-api 0.4.2
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/LICENSE +21 -0
- package/README.md +335 -0
- package/config.schema.json +370 -0
- package/dist/accessories/camera-source.d.ts +107 -0
- package/dist/accessories/camera-source.d.ts.map +1 -0
- package/dist/accessories/camera-source.js +946 -0
- package/dist/accessories/camera-source.js.map +1 -0
- package/dist/accessories/camera.d.ts +53 -0
- package/dist/accessories/camera.d.ts.map +1 -0
- package/dist/accessories/camera.js +148 -0
- package/dist/accessories/camera.js.map +1 -0
- package/dist/accessories/doorbell.d.ts +61 -0
- package/dist/accessories/doorbell.d.ts.map +1 -0
- package/dist/accessories/doorbell.js +164 -0
- package/dist/accessories/doorbell.js.map +1 -0
- package/dist/accessories/index.d.ts +5 -0
- package/dist/accessories/index.d.ts.map +1 -0
- package/dist/accessories/index.js +12 -0
- package/dist/accessories/index.js.map +1 -0
- package/dist/accessories/network.d.ts +48 -0
- package/dist/accessories/network.d.ts.map +1 -0
- package/dist/accessories/network.js +138 -0
- package/dist/accessories/network.js.map +1 -0
- package/dist/accessories/owl.d.ts +55 -0
- package/dist/accessories/owl.d.ts.map +1 -0
- package/dist/accessories/owl.js +144 -0
- package/dist/accessories/owl.js.map +1 -0
- package/dist/blink-api/auth.d.ts +206 -0
- package/dist/blink-api/auth.d.ts.map +1 -0
- package/dist/blink-api/auth.js +975 -0
- package/dist/blink-api/auth.js.map +1 -0
- package/dist/blink-api/client.d.ts +217 -0
- package/dist/blink-api/client.d.ts.map +1 -0
- package/dist/blink-api/client.js +560 -0
- package/dist/blink-api/client.js.map +1 -0
- package/dist/blink-api/headers.d.ts +31 -0
- package/dist/blink-api/headers.d.ts.map +1 -0
- package/dist/blink-api/headers.js +58 -0
- package/dist/blink-api/headers.js.map +1 -0
- package/dist/blink-api/http.d.ts +56 -0
- package/dist/blink-api/http.d.ts.map +1 -0
- package/dist/blink-api/http.js +221 -0
- package/dist/blink-api/http.js.map +1 -0
- package/dist/blink-api/immis-proxy.d.ts +184 -0
- package/dist/blink-api/immis-proxy.d.ts.map +1 -0
- package/dist/blink-api/immis-proxy.js +675 -0
- package/dist/blink-api/immis-proxy.js.map +1 -0
- package/dist/blink-api/index.d.ts +4 -0
- package/dist/blink-api/index.d.ts.map +1 -0
- package/dist/blink-api/index.js +20 -0
- package/dist/blink-api/index.js.map +1 -0
- package/dist/blink-api/oauth-pkce.d.ts +47 -0
- package/dist/blink-api/oauth-pkce.d.ts.map +1 -0
- package/dist/blink-api/oauth-pkce.js +98 -0
- package/dist/blink-api/oauth-pkce.js.map +1 -0
- package/dist/blink-api/urls.d.ts +51 -0
- package/dist/blink-api/urls.d.ts.map +1 -0
- package/dist/blink-api/urls.js +108 -0
- package/dist/blink-api/urls.js.map +1 -0
- package/dist/homebridge-ui/public/index.html +730 -0
- package/dist/homebridge-ui/server.d.ts +13 -0
- package/dist/homebridge-ui/server.d.ts.map +1 -0
- package/dist/homebridge-ui/server.js +337 -0
- package/dist/homebridge-ui/server.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/platform.d.ts +100 -0
- package/dist/platform.d.ts.map +1 -0
- package/dist/platform.js +462 -0
- package/dist/platform.js.map +1 -0
- package/dist/settings.d.ts +3 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +6 -0
- package/dist/settings.js.map +1 -0
- package/dist/types/blink-api.d.ts +459 -0
- package/dist/types/blink-api.d.ts.map +1 -0
- package/dist/types/blink-api.js +9 -0
- package/dist/types/blink-api.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.js.map +1 -0
- package/homebridge-ui/public/index.html +730 -0
- package/homebridge-ui/server.js +337 -0
- package/homebridge-ui/server.js.map +1 -0
- package/package.json +92 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Dr Andrew Cox
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
# @sealad886/homebridge-blink-cameras-new-api
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@sealad886/homebridge-blink-cameras-new-api)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](https://github.com/sealad886/homebridge-blink-cameras-new-api/actions/workflows/test.yml)
|
|
6
|
+
[](https://codecov.io/gh/sealad886/homebridge-blink-cameras-new-api)
|
|
7
|
+
|
|
8
|
+
> Important: This plugin uses Blink's new (OAuth-based) API and has been validated to work in at least one European locale. It has not yet been tested in the United States. Feedback from multiple locales is welcome—the new API requires region-aware resolution.
|
|
9
|
+
|
|
10
|
+
Modern Blink platform plugin for Homebridge using the official OAuth endpoints. Exposes Blink devices as proper HomeKit accessories:
|
|
11
|
+
|
|
12
|
+
- **SecuritySystem** for arm/disarm control of networks
|
|
13
|
+
- **MotionSensor** for motion detection events
|
|
14
|
+
- **Doorbell** service for ring notifications
|
|
15
|
+
- **Switch** for enabling/disabling motion detection per device
|
|
16
|
+
|
|
17
|
+
All API interactions are based on reverse-engineered endpoints from the official Blink Android app (v50.1).
|
|
18
|
+
|
|
19
|
+
## Two-Way Talk Status
|
|
20
|
+
|
|
21
|
+
Two-way talk is temporarily disabled. The HomeKit microphone/talk UI is hidden and the plugin forces `twoWayAudio` off until IMMIS uplink framing is validated. Even if you previously enabled talkback, the setting is ignored for now. We will re-enable the UI once payload sequencing and ACK handling are confirmed stable.
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
|
+
- ✅ **Proper HomeKit SecuritySystem** - Arm/disarm networks using the Security System tile in Home app
|
|
26
|
+
- ✅ **Motion Detection** - Receive motion alerts in HomeKit when your cameras detect motion
|
|
27
|
+
- ✅ **Doorbell Support** - Ring notifications appear as HomeKit doorbell events
|
|
28
|
+
- ✅ **Status Polling** - Automatically syncs device states with Blink cloud
|
|
29
|
+
- ✅ **OAuth Authentication** - Modern OAuth 2.0 with automatic token refresh
|
|
30
|
+
- ✅ **2FA Support** - Works with Blink accounts that have two-factor authentication enabled
|
|
31
|
+
- ✅ **Retry Logic** - Automatic retry with exponential backoff for rate limits and server errors
|
|
32
|
+
|
|
33
|
+
## Requirements
|
|
34
|
+
|
|
35
|
+
- **Homebridge** 1.11.1 or later
|
|
36
|
+
- **Node.js** 18.0.0 or later (native `fetch` API required)
|
|
37
|
+
- A Blink account with credentials
|
|
38
|
+
|
|
39
|
+
## Installation
|
|
40
|
+
|
|
41
|
+
### Via Homebridge UI (Recommended)
|
|
42
|
+
|
|
43
|
+
1. Open the Homebridge UI
|
|
44
|
+
2. Navigate to Plugins
|
|
45
|
+
3. Search for "@sealad886/homebridge-blink-cameras-new-api"
|
|
46
|
+
4. Click Install
|
|
47
|
+
|
|
48
|
+
### Via npm
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm install -g @sealad886/homebridge-blink-cameras-new-api
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Restart Homebridge after installing.
|
|
55
|
+
|
|
56
|
+
## Configuration
|
|
57
|
+
|
|
58
|
+
### Via Homebridge UI
|
|
59
|
+
|
|
60
|
+
The plugin provides a full configuration UI. Navigate to Plugins → Settings for @sealad886/homebridge-blink-cameras-new-api.
|
|
61
|
+
|
|
62
|
+
### Manual Configuration
|
|
63
|
+
|
|
64
|
+
Add a platform entry to your Homebridge `config.json`:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"platforms": [
|
|
69
|
+
{
|
|
70
|
+
"platform": "BlinkCameras",
|
|
71
|
+
"name": "Blink",
|
|
72
|
+
"username": "you@example.com",
|
|
73
|
+
"password": "your-blink-password",
|
|
74
|
+
"deviceId": "homebridge-blink-01",
|
|
75
|
+
"persistAuth": true,
|
|
76
|
+
"trustDevice": true,
|
|
77
|
+
"pollInterval": 60,
|
|
78
|
+
"motionTimeout": 30,
|
|
79
|
+
"enableMotionPolling": true,
|
|
80
|
+
"enableStreaming": true,
|
|
81
|
+
"ffmpegPath": "ffmpeg",
|
|
82
|
+
"enableAudio": true
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Configuration Options
|
|
89
|
+
|
|
90
|
+
| Option | Required | Default | Description |
|
|
91
|
+
| ------ | -------- | ------- | ----------- |
|
|
92
|
+
| `platform` | Yes | - | Must be `BlinkCameras` |
|
|
93
|
+
| `name` | Yes | `Blink` | Platform name shown in logs |
|
|
94
|
+
| `username` | Yes | - | Your Blink account email |
|
|
95
|
+
| `password` | Yes | - | Your Blink account password |
|
|
96
|
+
| `deviceId` | No | `homebridge-blink` | Unique identifier sent to Blink (hardware_id) |
|
|
97
|
+
| `deviceName` | No | - | Fallback for deviceId |
|
|
98
|
+
| `twoFactorCode` | No | - | 2FA code (only needed during initial setup) |
|
|
99
|
+
| `clientVerificationCode` | No | - | New-device verification PIN (only when prompted) |
|
|
100
|
+
| `accountVerificationCode` | No | - | Account/phone verification PIN (only when prompted) |
|
|
101
|
+
| `persistAuth` | No | `true` | Persist auth tokens across restarts |
|
|
102
|
+
| `trustDevice` | No | `true` | Trust this device during client verification |
|
|
103
|
+
| `tier` | No | `prod` | Blink API tier: `prod`, `sqa1`, `cemp`, `prde`, `prsg`, `a001`, or `srf1` (auto-detected tiers from Blink are honored for routing) |
|
|
104
|
+
| `sharedTier` | No | - | Override shared REST tier (defaults to `tier`) |
|
|
105
|
+
| `debugAuth` | No | `false` | Enable verbose authentication logging |
|
|
106
|
+
| `pollInterval` | No | `60` | Seconds between state polls (min 15) |
|
|
107
|
+
| `motionTimeout` | No | `30` | Seconds motion stays active |
|
|
108
|
+
| `enableMotionPolling` | No | `true` | Poll for motion events |
|
|
109
|
+
| `enableStreaming` | No | `true` | Enable HomeKit live streaming (FFmpeg required) |
|
|
110
|
+
| `ffmpegPath` | No | `ffmpeg` | Path to FFmpeg binary |
|
|
111
|
+
| `ffmpegDebug` | No | `false` | Log FFmpeg debug output |
|
|
112
|
+
| `rtspTransport` | No | `tcp` | RTSP transport for Blink live view |
|
|
113
|
+
| `maxStreams` | No | `1` | Max concurrent HomeKit streams |
|
|
114
|
+
| `enableAudio` | No | `true` | Enable audio streaming from camera |
|
|
115
|
+
| `twoWayAudio` | No | `false` (forced off) | Talkback is disabled; HomeKit microphone UI is hidden until IMMIS uplink is validated |
|
|
116
|
+
| `audioCodec` | No | `opus` | Preferred audio codec (`opus`, `aac-eld`, `pcma`, `pcmu`) |
|
|
117
|
+
| `audioBitrate` | No | `32` | Audio bitrate (kbps) |
|
|
118
|
+
| `videoBitrate` | No | - | Cap video bitrate (kbps) |
|
|
119
|
+
| `debugStreamPath` | No | - | Save raw MPEG-TS stream recordings for debugging |
|
|
120
|
+
| `snapshotCacheTTL` | No | `60` | Snapshot cache duration (seconds); 0 always fetches new snapshots |
|
|
121
|
+
| `excludeDevices` | No | - | List of device IDs/serials/names to exclude |
|
|
122
|
+
| `deviceNames` | No | - | Map of device IDs/serials to custom display names |
|
|
123
|
+
| `deviceSettings` | No | - | Per-device overrides (e.g., motion timeout/enable) |
|
|
124
|
+
|
|
125
|
+
When `persistAuth` is enabled, auth tokens are stored in a sibling folder to Homebridge's HAP
|
|
126
|
+
storage (for example, `/var/lib/homebridge/blink-auth/`) to avoid corrupting the HAP
|
|
127
|
+
persist directory.
|
|
128
|
+
|
|
129
|
+
## Quick Start: Login & Authorization
|
|
130
|
+
|
|
131
|
+
On first setup, Blink may prompt for up to three codes. Provide only the one being requested at the time, then remove it after successful login/verification. Keep `persistAuth: true` so you won’t be prompted again.
|
|
132
|
+
|
|
133
|
+
1. Start with your `username`, `password`, unique `deviceId`, and `persistAuth: true`.
|
|
134
|
+
2. If prompted for a two-factor code, set `twoFactorCode` temporarily and restart Homebridge.
|
|
135
|
+
3. If prompted for client verification (new device approval), set `clientVerificationCode` temporarily and restart.
|
|
136
|
+
4. If prompted for account/phone verification, set `accountVerificationCode` temporarily and restart.
|
|
137
|
+
5. After successful login/verification, remove any `*Code` values from your config and restart Homebridge.
|
|
138
|
+
|
|
139
|
+
Tips:
|
|
140
|
+
|
|
141
|
+
- Ensure `deviceId` is unique per Homebridge instance.
|
|
142
|
+
- Leave `trustDevice: true` so future sessions are approved automatically.
|
|
143
|
+
- If you keep seeing verification prompts, confirm that `persistAuth` is enabled and the Homebridge process can write to the auth directory.
|
|
144
|
+
|
|
145
|
+
## Live Streaming (FFmpeg)
|
|
146
|
+
|
|
147
|
+
Live streaming uses FFmpeg to transcode Blink's RTSPS stream to HomeKit SRTP. Make sure FFmpeg is installed
|
|
148
|
+
and accessible in your PATH, or set `ffmpegPath` to the full binary location.
|
|
149
|
+
|
|
150
|
+
If you use [`brew`](http://brew.sh) (MacOS or Linux), install `ffmpeg` using:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
brew install 'ffmpeg@8'
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Supported Devices
|
|
157
|
+
|
|
158
|
+
| Blink Device | HomeKit Service | Features |
|
|
159
|
+
| ------------ | --------------- | -------- |
|
|
160
|
+
| **Network** | SecuritySystem | Arm/disarm all cameras in network |
|
|
161
|
+
| **Camera** | Switch + MotionSensor | Enable/disable motion, motion events |
|
|
162
|
+
| **Doorbell** | Doorbell + Switch + MotionSensor | Ring events, enable/disable motion |
|
|
163
|
+
| **Owl (Mini)** | Switch + MotionSensor | Enable/disable motion, motion events |
|
|
164
|
+
|
|
165
|
+
### SecuritySystem Modes
|
|
166
|
+
|
|
167
|
+
The HomeKit SecuritySystem exposes standard modes:
|
|
168
|
+
|
|
169
|
+
- **Away Arm** → Network is armed
|
|
170
|
+
- **Stay Arm** → Network is armed (same as Away)
|
|
171
|
+
- **Night Arm** → Network is armed (same as Away)
|
|
172
|
+
- **Disarm** → Network is disarmed
|
|
173
|
+
|
|
174
|
+
Note: Blink only has armed/disarmed states, so all "armed" modes map to Blink's armed state.
|
|
175
|
+
|
|
176
|
+
## Two-Factor Authentication
|
|
177
|
+
|
|
178
|
+
When you first connect a new device to your Blink account:
|
|
179
|
+
|
|
180
|
+
1. Blink sends an email with a verification code
|
|
181
|
+
2. Add the code to `twoFactorCode` in your config
|
|
182
|
+
3. Restart Homebridge
|
|
183
|
+
4. After successful login, **remove the 2FA code** from your config
|
|
184
|
+
5. Restart Homebridge again
|
|
185
|
+
|
|
186
|
+
Future logins will use refresh tokens and won't require 2FA.
|
|
187
|
+
|
|
188
|
+
## Client Verification (New Device Approval)
|
|
189
|
+
|
|
190
|
+
Blink may require a one-time **client verification** for new devices, which is separate from 2FA:
|
|
191
|
+
|
|
192
|
+
1. The plugin will request a verification code on first login.
|
|
193
|
+
2. Check your email/SMS for the code.
|
|
194
|
+
3. Add the code to `clientVerificationCode` in your config.
|
|
195
|
+
4. Restart Homebridge.
|
|
196
|
+
5. After successful verification, **remove the code** from your config.
|
|
197
|
+
|
|
198
|
+
If you keep seeing verification prompts, ensure `persistAuth` is enabled and your `deviceId` is unique.
|
|
199
|
+
|
|
200
|
+
## Account/Phone Verification
|
|
201
|
+
|
|
202
|
+
Some accounts require an additional **account or phone verification** step:
|
|
203
|
+
|
|
204
|
+
1. The plugin will request a verification code when required.
|
|
205
|
+
2. Check your email/SMS for the code.
|
|
206
|
+
3. Add the code to `accountVerificationCode` in your config.
|
|
207
|
+
4. Restart Homebridge.
|
|
208
|
+
5. After successful verification, **remove the code** from your config.
|
|
209
|
+
|
|
210
|
+
### Example: Temporary Codes in Config
|
|
211
|
+
|
|
212
|
+
Add only one code at a time when requested by Blink:
|
|
213
|
+
|
|
214
|
+
```json
|
|
215
|
+
{
|
|
216
|
+
"platform": "BlinkCameras",
|
|
217
|
+
"username": "you@example.com",
|
|
218
|
+
"password": "your-blink-password",
|
|
219
|
+
"deviceId": "homebridge-blink-01",
|
|
220
|
+
"persistAuth": true,
|
|
221
|
+
"twoFactorCode": "123456" // remove after success, then restart
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Troubleshooting
|
|
226
|
+
|
|
227
|
+
### 401 Unauthorized / 403 Forbidden
|
|
228
|
+
|
|
229
|
+
- Regenerate a unique `deviceId`
|
|
230
|
+
- Check your email for the Blink device approval prompt
|
|
231
|
+
- Provide a fresh `twoFactorCode` if prompted
|
|
232
|
+
- If logs show `tier_info` with a different tier, restart after the plugin auto-updates routing
|
|
233
|
+
|
|
234
|
+
### Rate Limits (429)
|
|
235
|
+
|
|
236
|
+
The plugin automatically backs off and retries. If you're hitting rate limits frequently:
|
|
237
|
+
|
|
238
|
+
- Increase `pollInterval` to reduce API calls
|
|
239
|
+
- Set `enableMotionPolling` to `false` to reduce calls
|
|
240
|
+
|
|
241
|
+
### Node.js Version
|
|
242
|
+
|
|
243
|
+
This plugin requires Node.js 18+ for the native `fetch` API. Check your version:
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
node --version
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Motion Not Detected
|
|
250
|
+
|
|
251
|
+
- Ensure `enableMotionPolling` is `true`
|
|
252
|
+
- Check that the network is armed (motion events only trigger when armed)
|
|
253
|
+
- Reduce `pollInterval` for faster detection (but more API calls)
|
|
254
|
+
|
|
255
|
+
## API Documentation
|
|
256
|
+
|
|
257
|
+
This plugin's API implementation is based on reverse engineering the official Blink Home Monitor Android app (v50.1). Key technical details:
|
|
258
|
+
|
|
259
|
+
### Authentication
|
|
260
|
+
|
|
261
|
+
- OAuth 2.0 password grant flow via `api.oauth.blink.com` (production)
|
|
262
|
+
- Automatic token refresh when tokens expire
|
|
263
|
+
- Hardware ID required for device identification
|
|
264
|
+
- Client verification PIN flow for new device approval
|
|
265
|
+
- Region-aware routing based on tier and locale; behavior may differ by country
|
|
266
|
+
|
|
267
|
+
### Endpoints
|
|
268
|
+
|
|
269
|
+
- Homescreen: `GET v4/accounts/{account_id}/homescreen`
|
|
270
|
+
- Arm/Disarm: `POST v1/accounts/{account_id}/networks/{network_id}/state/arm|disarm`
|
|
271
|
+
- Motion Enable/Disable: `POST accounts/{account_id}/networks/{network_id}/cameras/{camera_id}/enable|disable`
|
|
272
|
+
- Media: `GET v4/accounts/{account_id}/media`
|
|
273
|
+
|
|
274
|
+
For full endpoint documentation, see the API dossier in the source repository.
|
|
275
|
+
|
|
276
|
+
## Development
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
# Clone the repository
|
|
280
|
+
git clone https://github.com/sealad886/homebridge-blink-cameras-new-api.git
|
|
281
|
+
cd homebridge-blink-cameras-new-api
|
|
282
|
+
|
|
283
|
+
# Install dependencies
|
|
284
|
+
npm install
|
|
285
|
+
|
|
286
|
+
# Build
|
|
287
|
+
npm run build
|
|
288
|
+
|
|
289
|
+
# Watch + Homebridge (uses test/hbConfig)
|
|
290
|
+
npm run watch
|
|
291
|
+
|
|
292
|
+
# TypeScript-only rebuilds
|
|
293
|
+
npm run watch:ts
|
|
294
|
+
|
|
295
|
+
# Run tests
|
|
296
|
+
npm test
|
|
297
|
+
|
|
298
|
+
# Lint
|
|
299
|
+
npm run lint
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### How to verify (local)
|
|
303
|
+
|
|
304
|
+
1. `npm run build`
|
|
305
|
+
2. `npm test`
|
|
306
|
+
3. `npm run lint`
|
|
307
|
+
4. `npm pack` and confirm the tarball includes `dist/`, `config.schema.json`, and `homebridge-ui/`
|
|
308
|
+
5. `npm run watch` and confirm the plugin boots with `test/hbConfig/config.json`
|
|
309
|
+
|
|
310
|
+
## Changelog
|
|
311
|
+
|
|
312
|
+
### v2.0.0
|
|
313
|
+
|
|
314
|
+
- Complete TypeScript rewrite with full API dossier evidence
|
|
315
|
+
- SecuritySystem service for proper HomeKit arm/disarm
|
|
316
|
+
- MotionSensor service for motion detection events
|
|
317
|
+
- Doorbell service for ring notifications
|
|
318
|
+
- Status polling with configurable interval
|
|
319
|
+
- Media API polling for motion event detection
|
|
320
|
+
- OAuth 2.0 authentication with automatic token refresh
|
|
321
|
+
- Comprehensive configuration UI
|
|
322
|
+
|
|
323
|
+
### v1.x
|
|
324
|
+
|
|
325
|
+
- Legacy implementation using `node-blink-security`
|
|
326
|
+
|
|
327
|
+
## License
|
|
328
|
+
|
|
329
|
+
MIT - see [LICENSE](LICENSE) for details.
|
|
330
|
+
|
|
331
|
+
## Credits
|
|
332
|
+
|
|
333
|
+
- API documentation derived from reverse engineering the Blink Android app
|
|
334
|
+
- Homebridge platform plugin architecture
|
|
335
|
+
- Community feedback on locale-specific behavior (EU validated; US pending)
|