@thecloudseeker/homebridge-skoda 0.2.0 → 0.3.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 +9 -0
- package/README.md +17 -23
- package/config.schema.json +135 -75
- package/dist/accessory/services/body.d.ts +5 -6
- package/dist/accessory/services/body.js +45 -9
- package/dist/accessory/services/body.js.map +1 -1
- package/dist/accessory/services/common.d.ts +2 -0
- package/dist/accessory/services/common.js +4 -0
- package/dist/accessory/services/common.js.map +1 -1
- package/dist/accessory/vehicleAccessory.d.ts +6 -0
- package/dist/accessory/vehicleAccessory.js +22 -0
- package/dist/accessory/vehicleAccessory.js.map +1 -1
- package/dist/api/client.d.ts +2 -2
- package/dist/api/client.js +2 -2
- package/dist/api/client.js.map +1 -1
- package/dist/api/rateBudget.d.ts +3 -3
- package/dist/api/rateBudget.js +1 -1
- package/dist/config.d.ts +4 -5
- package/dist/config.js +21 -10
- package/dist/config.js.map +1 -1
- package/dist/platform.js +8 -24
- package/dist/platform.js.map +1 -1
- package/dist/vehicle/mapping.d.ts +4 -0
- package/dist/vehicle/mapping.js +19 -0
- package/dist/vehicle/mapping.js.map +1 -1
- package/dist/vehicle/snapshot.js +26 -0
- package/dist/vehicle/snapshot.js.map +1 -1
- package/dist/vehicle/vehicleController.d.ts +3 -9
- package/dist/vehicle/vehicleController.js +18 -25
- package/dist/vehicle/vehicleController.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
- **Window heating** as an optional read-only contact sensor, open while the front or rear window heating is on (`features.windowHeating`). The API has no command for it.
|
|
6
|
+
- **Charging plug lock** as an optional contact sensor, closed while the cable is locked (`features.plugLock`).
|
|
7
|
+
- **Clearer settings in the Homebridge UI.** Settings are grouped by topic, each next to the feature it belongs to, and numbers are entered in text fields instead of sliders.
|
|
8
|
+
- **Removed `commandToken` and `commandRefreshDelaySeconds`.** A second API key brings no extra requests, because the rate limit applies per vehicle, and the expected state after a command makes an extra refresh unnecessary. The plugin uses the API key for everything and warns once if the old options are still in the config.
|
|
9
|
+
- **The log lists what your vehicle supports** after the first update, including features that are supported but turned off, with the setting that turns them on.
|
|
10
|
+
- `airConditioningWithoutExternalPower` is a choice of "Keep the vehicle's setting", "Allow" (`"allow"`) and "Do not allow" (`"deny"`). Existing `true` / `false` values keep working.
|
|
11
|
+
|
|
3
12
|
## 0.2.0
|
|
4
13
|
|
|
5
14
|
- **Commands cost one request.** HomeKit keeps the expected state until a regular update carries the vehicle's new report of that part, at most 15 minutes, instead of an extra refresh after every command. With the default polling interval, that leaves 8 instead of about 4 commands per hour. `commandRefreshDelaySeconds` now defaults to `0` (no refresh); set it to 15–600 to keep the old behaviour. If you set it explicitly, nothing changes for you.
|
package/README.md
CHANGED
|
@@ -37,6 +37,8 @@ update or an unreachable API never removes services.
|
|
|
37
37
|
| Contact sensors "Doors", "Windows", "Trunk", "Bonnet", "Sunroof" | Open / closed | – | on |
|
|
38
38
|
| Contact sensor "Locked" | Closed = locked, open = unlocked | – (the API cannot lock or unlock) | on |
|
|
39
39
|
| Contact sensor "Lights" | Open = lights on | – | off |
|
|
40
|
+
| Contact sensor "Window Heating" | Open = front or rear window heating on | – (the API has no command for it) | off |
|
|
41
|
+
| Contact sensor "Plug Locked" | Closed = charging cable locked | – | off |
|
|
40
42
|
|
|
41
43
|
HomeKit has no services for range or mileage, so the plugin does not show them.
|
|
42
44
|
|
|
@@ -108,10 +110,6 @@ days before a key expires. Once it has expired, the plugin logs an error and ret
|
|
|
108
110
|
(failed authentication does not count against the rate limit). Renew the key in the app and
|
|
109
111
|
update the config.
|
|
110
112
|
|
|
111
|
-
You may configure a second key for commands only (_Command API key_), for example to keep
|
|
112
|
-
permissions apart. **A second key does not give you more requests**: the rate limit applies per
|
|
113
|
-
vehicle, and both keys share it.
|
|
114
|
-
|
|
115
113
|
## Configuration
|
|
116
114
|
|
|
117
115
|
The easiest way is the Homebridge UI. In `config.json` it looks like this:
|
|
@@ -132,22 +130,20 @@ The easiest way is the Homebridge UI. In `config.json` it looks like this:
|
|
|
132
130
|
}
|
|
133
131
|
```
|
|
134
132
|
|
|
135
|
-
| Option | Default | Description
|
|
136
|
-
| ------------------------------------- | ----------------------- |
|
|
137
|
-
| `name` | `Škoda <last 4 of VIN>` | Accessory name in HomeKit
|
|
138
|
-
| `vin` | – | Vehicle identification number (required)
|
|
139
|
-
| `token` | – | API key (required)
|
|
140
|
-
| `
|
|
141
|
-
| `
|
|
142
|
-
| `home.
|
|
143
|
-
| `
|
|
144
|
-
| `
|
|
145
|
-
| `
|
|
146
|
-
| `
|
|
147
|
-
| `
|
|
148
|
-
| `
|
|
149
|
-
| `auxiliaryHeatingDurationMinutes` | – | Auxiliary heating run time; unset keeps the vehicle setting |
|
|
150
|
-
| `features.*` | see table above | `battery`, `stateOfChargeSensor`, `fuelLevel`, `fuelLevelSensor`, `charging`, `chargingLimit`, `climate`, `auxiliaryHeating`, `activeVentilation`, `presence`, `doors`, `windows`, `trunk`, `bonnet`, `sunroof`, `lock`, `lights` |
|
|
133
|
+
| Option | Default | Description |
|
|
134
|
+
| ------------------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
135
|
+
| `name` | `Škoda <last 4 of VIN>` | Accessory name in HomeKit |
|
|
136
|
+
| `vin` | – | Vehicle identification number (required) |
|
|
137
|
+
| `token` | – | API key (required) |
|
|
138
|
+
| `spin` | – | S-PIN, only needed for the auxiliary heating |
|
|
139
|
+
| `home.lat`, `home.lon` | – | Home coordinates for the "Home" sensor |
|
|
140
|
+
| `home.radiusMeters` | `150` | Radius around home, at least 10 m |
|
|
141
|
+
| `pollingIntervalMinutes` | `5` | Polling interval, at least 4 (see below) |
|
|
142
|
+
| `lowBatteryThreshold` | `20` | Low battery below this state of charge or fuel level (%) |
|
|
143
|
+
| `climateTemperature` | `21` | Cabin temperature (°C) until the vehicle reports one |
|
|
144
|
+
| `airConditioningWithoutExternalPower` | – | `"allow"` or `"deny"` air conditioning from the drive battery when not plugged in; unset keeps the vehicle setting |
|
|
145
|
+
| `auxiliaryHeatingDurationMinutes` | – | Auxiliary heating run time; unset keeps the vehicle setting |
|
|
146
|
+
| `features.*` | see table above | `battery`, `stateOfChargeSensor`, `fuelLevel`, `fuelLevelSensor`, `charging`, `chargingLimit`, `climate`, `auxiliaryHeating`, `activeVentilation`, `presence`, `doors`, `windows`, `trunk`, `bonnet`, `sunroof`, `lock`, `lights`, `windowHeating`, `plugLock` |
|
|
151
147
|
|
|
152
148
|
## Rate limit
|
|
153
149
|
|
|
@@ -164,9 +160,7 @@ The plugin is built around that limit:
|
|
|
164
160
|
per hour and leaves 8 for commands. The log shows this split at startup.
|
|
165
161
|
- **A command costs one request.** The vehicle reports new state with a delay, so instead of an
|
|
166
162
|
extra refresh the plugin keeps the expected state until a regular update carries the vehicle's
|
|
167
|
-
new report.
|
|
168
|
-
plugin then refreshes once that long after a command, and several commands in a row share one
|
|
169
|
-
refresh. Each refresh costs one more request.
|
|
163
|
+
new report.
|
|
170
164
|
- **When the budget is used up**, commands are rejected ("No Response" in the Home app) instead of
|
|
171
165
|
being sent, and polling waits until requests are available again.
|
|
172
166
|
- **Errors back off.** On `429` and `503` the plugin waits for `Retry-After`. On other server and
|
package/config.schema.json
CHANGED
|
@@ -33,17 +33,12 @@
|
|
|
33
33
|
"title": "API key",
|
|
34
34
|
"type": "string",
|
|
35
35
|
"required": true,
|
|
36
|
-
"description": "API key from the MyŠkoda app. Used for
|
|
37
|
-
},
|
|
38
|
-
"commandToken": {
|
|
39
|
-
"title": "Command API key (optional)",
|
|
40
|
-
"type": "string",
|
|
41
|
-
"description": "Separate key for commands, e.g. with different permissions. Both keys share the vehicle's rate limit, so a second key does not allow more requests."
|
|
36
|
+
"description": "API key from the MyŠkoda app (Profile › Smart Home). Used for reading the vehicle and for commands."
|
|
42
37
|
},
|
|
43
38
|
"spin": {
|
|
44
39
|
"title": "S-PIN (optional)",
|
|
45
40
|
"type": "string",
|
|
46
|
-
"description": "Security PIN of your MyŠkoda account. Only needed
|
|
41
|
+
"description": "Security PIN of your MyŠkoda account. Only needed to start the auxiliary heating; it is sent with each start and never logged."
|
|
47
42
|
},
|
|
48
43
|
"home": {
|
|
49
44
|
"title": "Home location",
|
|
@@ -70,76 +65,83 @@
|
|
|
70
65
|
}
|
|
71
66
|
},
|
|
72
67
|
"pollingIntervalMinutes": {
|
|
73
|
-
"title": "
|
|
68
|
+
"title": "Update interval (minutes)",
|
|
74
69
|
"type": "integer",
|
|
75
70
|
"minimum": 4,
|
|
76
71
|
"maximum": 1440,
|
|
77
72
|
"placeholder": 5,
|
|
78
|
-
"description": "
|
|
79
|
-
},
|
|
80
|
-
"commandRefreshDelaySeconds": {
|
|
81
|
-
"title": "Refresh after command (seconds)",
|
|
82
|
-
"type": "integer",
|
|
83
|
-
"minimum": 0,
|
|
84
|
-
"maximum": 600,
|
|
85
|
-
"placeholder": 0,
|
|
86
|
-
"description": "0 (default): no extra request, the next regular update confirms a command. Otherwise the delay (15-600) before one extra refresh after a command."
|
|
73
|
+
"description": "How often the plugin fetches the vehicle's state. At least 4, default 5: the API allows 20 requests per hour, and 4 are kept free for commands."
|
|
87
74
|
},
|
|
88
75
|
"lowBatteryThreshold": {
|
|
89
|
-
"title": "Low battery
|
|
76
|
+
"title": "Low battery / fuel warning below (%)",
|
|
90
77
|
"type": "integer",
|
|
91
78
|
"minimum": 0,
|
|
92
79
|
"maximum": 100,
|
|
93
80
|
"placeholder": 20,
|
|
94
|
-
"description": "
|
|
81
|
+
"description": "HomeKit shows low battery when the battery or fuel level drops below this value. Default 20."
|
|
95
82
|
},
|
|
96
83
|
"climateTemperature": {
|
|
97
|
-
"title": "Default
|
|
84
|
+
"title": "Default temperature (°C)",
|
|
98
85
|
"type": "number",
|
|
99
86
|
"minimum": 16,
|
|
100
87
|
"maximum": 29.5,
|
|
101
88
|
"multipleOf": 0.5,
|
|
102
89
|
"placeholder": 21,
|
|
103
|
-
"description": "Used until the vehicle reports its own target temperature."
|
|
90
|
+
"description": "Used for the first start until the vehicle reports its own target temperature. 16-29.5 in steps of 0.5, default 21."
|
|
104
91
|
},
|
|
105
92
|
"airConditioningWithoutExternalPower": {
|
|
106
|
-
"title": "
|
|
107
|
-
"type": "
|
|
108
|
-
"
|
|
93
|
+
"title": "Air conditioning when not plugged in",
|
|
94
|
+
"type": "string",
|
|
95
|
+
"oneOf": [
|
|
96
|
+
{
|
|
97
|
+
"title": "Keep the vehicle's setting",
|
|
98
|
+
"enum": ["vehicle"]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"title": "Allow (uses the drive battery)",
|
|
102
|
+
"enum": ["allow"]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"title": "Do not allow",
|
|
106
|
+
"enum": ["deny"]
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"placeholder": "vehicle",
|
|
110
|
+
"description": "For electric vehicles: whether the air conditioning may run from the drive battery when no charging cable is connected."
|
|
109
111
|
},
|
|
110
112
|
"auxiliaryHeatingDurationMinutes": {
|
|
111
|
-
"title": "Auxiliary heating
|
|
113
|
+
"title": "Auxiliary heating run time (minutes, optional)",
|
|
112
114
|
"type": "integer",
|
|
113
115
|
"minimum": 1,
|
|
114
116
|
"maximum": 60,
|
|
115
|
-
"description": "Leave empty to use the vehicle
|
|
117
|
+
"description": "1-60. Leave empty to use the run time set in the vehicle."
|
|
116
118
|
},
|
|
117
119
|
"features": {
|
|
118
120
|
"title": "Features",
|
|
119
121
|
"type": "object",
|
|
120
122
|
"properties": {
|
|
121
123
|
"battery": {
|
|
122
|
-
"title": "Battery",
|
|
124
|
+
"title": "Battery (electric and plug-in hybrid)",
|
|
123
125
|
"type": "boolean",
|
|
124
126
|
"default": true
|
|
125
127
|
},
|
|
126
128
|
"stateOfChargeSensor": {
|
|
127
|
-
"title": "State of charge as
|
|
129
|
+
"title": "State of charge as extra sensor, for automations",
|
|
128
130
|
"type": "boolean",
|
|
129
131
|
"default": false
|
|
130
132
|
},
|
|
131
133
|
"fuelLevel": {
|
|
132
|
-
"title": "Fuel level as battery (
|
|
134
|
+
"title": "Fuel level as battery (petrol, diesel, CNG, LPG)",
|
|
133
135
|
"type": "boolean",
|
|
134
136
|
"default": true
|
|
135
137
|
},
|
|
136
138
|
"fuelLevelSensor": {
|
|
137
|
-
"title": "Fuel level as
|
|
139
|
+
"title": "Fuel level as extra sensor, for automations",
|
|
138
140
|
"type": "boolean",
|
|
139
141
|
"default": false
|
|
140
142
|
},
|
|
141
143
|
"charging": {
|
|
142
|
-
"title": "
|
|
144
|
+
"title": "Start / stop charging (outlet)",
|
|
143
145
|
"type": "boolean",
|
|
144
146
|
"default": true
|
|
145
147
|
},
|
|
@@ -154,17 +156,17 @@
|
|
|
154
156
|
"default": true
|
|
155
157
|
},
|
|
156
158
|
"auxiliaryHeating": {
|
|
157
|
-
"title": "Auxiliary heating (needs S-PIN)",
|
|
159
|
+
"title": "Auxiliary heating (switch, needs S-PIN)",
|
|
158
160
|
"type": "boolean",
|
|
159
161
|
"default": true
|
|
160
162
|
},
|
|
161
163
|
"activeVentilation": {
|
|
162
|
-
"title": "
|
|
164
|
+
"title": "Ventilation (switch)",
|
|
163
165
|
"type": "boolean",
|
|
164
166
|
"default": false
|
|
165
167
|
},
|
|
166
168
|
"presence": {
|
|
167
|
-
"title": "
|
|
169
|
+
"title": "\"Home\" sensor (needs home location)",
|
|
168
170
|
"type": "boolean",
|
|
169
171
|
"default": true
|
|
170
172
|
},
|
|
@@ -194,12 +196,22 @@
|
|
|
194
196
|
"default": true
|
|
195
197
|
},
|
|
196
198
|
"lock": {
|
|
197
|
-
"title": "Locked (
|
|
199
|
+
"title": "Locked (sensor)",
|
|
198
200
|
"type": "boolean",
|
|
199
201
|
"default": true
|
|
200
202
|
},
|
|
201
203
|
"lights": {
|
|
202
|
-
"title": "Lights (
|
|
204
|
+
"title": "Lights on (sensor)",
|
|
205
|
+
"type": "boolean",
|
|
206
|
+
"default": false
|
|
207
|
+
},
|
|
208
|
+
"windowHeating": {
|
|
209
|
+
"title": "Window heating on (sensor)",
|
|
210
|
+
"type": "boolean",
|
|
211
|
+
"default": false
|
|
212
|
+
},
|
|
213
|
+
"plugLock": {
|
|
214
|
+
"title": "Charging plug locked (sensor)",
|
|
203
215
|
"type": "boolean",
|
|
204
216
|
"default": false
|
|
205
217
|
}
|
|
@@ -226,24 +238,85 @@
|
|
|
226
238
|
"key": "vehicles[].token",
|
|
227
239
|
"type": "password"
|
|
228
240
|
},
|
|
241
|
+
{
|
|
242
|
+
"type": "help",
|
|
243
|
+
"helpvalue": "<p>The plugin detects what your vehicle supports and only creates those services in HomeKit, so you can keep the defaults below. Switches marked <em>sensor</em> or <em>for automations</em> are off by default. After the first update the Homebridge log lists everything your vehicle supports, including what is turned off.</p>"
|
|
244
|
+
},
|
|
229
245
|
{
|
|
230
246
|
"type": "fieldset",
|
|
231
|
-
"title": "
|
|
247
|
+
"title": "Doors, windows and lock",
|
|
232
248
|
"expandable": true,
|
|
233
249
|
"expanded": false,
|
|
234
250
|
"items": [
|
|
251
|
+
"vehicles[].features.doors",
|
|
252
|
+
"vehicles[].features.windows",
|
|
253
|
+
"vehicles[].features.trunk",
|
|
254
|
+
"vehicles[].features.bonnet",
|
|
255
|
+
"vehicles[].features.sunroof",
|
|
256
|
+
"vehicles[].features.lock",
|
|
257
|
+
"vehicles[].features.lights"
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"type": "fieldset",
|
|
262
|
+
"title": "Battery and fuel",
|
|
263
|
+
"expandable": true,
|
|
264
|
+
"expanded": false,
|
|
265
|
+
"items": [
|
|
266
|
+
"vehicles[].features.battery",
|
|
267
|
+
"vehicles[].features.stateOfChargeSensor",
|
|
268
|
+
"vehicles[].features.fuelLevel",
|
|
269
|
+
"vehicles[].features.fuelLevelSensor",
|
|
235
270
|
{
|
|
236
|
-
"key": "vehicles[].
|
|
237
|
-
"type": "
|
|
271
|
+
"key": "vehicles[].lowBatteryThreshold",
|
|
272
|
+
"type": "number"
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"type": "fieldset",
|
|
278
|
+
"title": "Charging",
|
|
279
|
+
"description": "Electric and plug-in hybrid vehicles.",
|
|
280
|
+
"expandable": true,
|
|
281
|
+
"expanded": false,
|
|
282
|
+
"items": [
|
|
283
|
+
"vehicles[].features.charging",
|
|
284
|
+
"vehicles[].features.chargingLimit",
|
|
285
|
+
"vehicles[].features.plugLock"
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"type": "fieldset",
|
|
290
|
+
"title": "Air conditioning and ventilation",
|
|
291
|
+
"expandable": true,
|
|
292
|
+
"expanded": false,
|
|
293
|
+
"items": [
|
|
294
|
+
"vehicles[].features.climate",
|
|
295
|
+
{
|
|
296
|
+
"key": "vehicles[].climateTemperature",
|
|
297
|
+
"type": "number"
|
|
238
298
|
},
|
|
299
|
+
"vehicles[].airConditioningWithoutExternalPower",
|
|
300
|
+
"vehicles[].features.windowHeating",
|
|
301
|
+
"vehicles[].features.activeVentilation"
|
|
302
|
+
]
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"type": "fieldset",
|
|
306
|
+
"title": "Auxiliary heating",
|
|
307
|
+
"description": "Vehicles with a fuel-operated auxiliary heater.",
|
|
308
|
+
"expandable": true,
|
|
309
|
+
"expanded": false,
|
|
310
|
+
"items": [
|
|
311
|
+
"vehicles[].features.auxiliaryHeating",
|
|
239
312
|
{
|
|
240
313
|
"key": "vehicles[].spin",
|
|
241
314
|
"type": "password"
|
|
242
315
|
},
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
316
|
+
{
|
|
317
|
+
"key": "vehicles[].auxiliaryHeatingDurationMinutes",
|
|
318
|
+
"type": "number"
|
|
319
|
+
}
|
|
247
320
|
]
|
|
248
321
|
},
|
|
249
322
|
{
|
|
@@ -253,51 +326,38 @@
|
|
|
253
326
|
"expandable": true,
|
|
254
327
|
"expanded": false,
|
|
255
328
|
"items": [
|
|
329
|
+
"vehicles[].features.presence",
|
|
256
330
|
{
|
|
257
331
|
"type": "flex",
|
|
258
332
|
"flex-flow": "row wrap",
|
|
259
333
|
"items": [
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
334
|
+
{
|
|
335
|
+
"key": "vehicles[].home.lat",
|
|
336
|
+
"type": "number"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"key": "vehicles[].home.lon",
|
|
340
|
+
"type": "number"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"key": "vehicles[].home.radiusMeters",
|
|
344
|
+
"type": "number"
|
|
345
|
+
}
|
|
263
346
|
]
|
|
264
347
|
}
|
|
265
348
|
]
|
|
266
349
|
},
|
|
267
350
|
{
|
|
268
351
|
"type": "fieldset",
|
|
269
|
-
"title": "
|
|
270
|
-
"
|
|
271
|
-
"expanded": false,
|
|
272
|
-
"items": [
|
|
273
|
-
"vehicles[].pollingIntervalMinutes",
|
|
274
|
-
"vehicles[].lowBatteryThreshold"
|
|
275
|
-
]
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
"type": "fieldset",
|
|
279
|
-
"title": "Features",
|
|
280
|
-
"description": "Services are only created if the vehicle supports them.",
|
|
352
|
+
"title": "Updates",
|
|
353
|
+
"description": "The default fits most setups.",
|
|
281
354
|
"expandable": true,
|
|
282
355
|
"expanded": false,
|
|
283
356
|
"items": [
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
"vehicles[].features.charging",
|
|
289
|
-
"vehicles[].features.chargingLimit",
|
|
290
|
-
"vehicles[].features.climate",
|
|
291
|
-
"vehicles[].features.auxiliaryHeating",
|
|
292
|
-
"vehicles[].features.activeVentilation",
|
|
293
|
-
"vehicles[].features.presence",
|
|
294
|
-
"vehicles[].features.doors",
|
|
295
|
-
"vehicles[].features.windows",
|
|
296
|
-
"vehicles[].features.trunk",
|
|
297
|
-
"vehicles[].features.bonnet",
|
|
298
|
-
"vehicles[].features.sunroof",
|
|
299
|
-
"vehicles[].features.lock",
|
|
300
|
-
"vehicles[].features.lights"
|
|
357
|
+
{
|
|
358
|
+
"key": "vehicles[].pollingIntervalMinutes",
|
|
359
|
+
"type": "number"
|
|
360
|
+
}
|
|
301
361
|
]
|
|
302
362
|
}
|
|
303
363
|
]
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import type { Service } from "homebridge";
|
|
2
2
|
import type { Vehicle } from "../../api/types.js";
|
|
3
3
|
import type { FeatureToggles } from "../../config.js";
|
|
4
|
-
import { type BodyValues } from "../../vehicle/mapping.js";
|
|
5
4
|
import { ServiceBinding, type BindingContext, type ServiceType } from "./common.js";
|
|
6
|
-
type
|
|
5
|
+
type ContactFeature = Extract<keyof FeatureToggles, "doors" | "windows" | "trunk" | "bonnet" | "sunroof" | "lock" | "lights" | "windowHeating" | "plugLock">;
|
|
7
6
|
interface ContactDefinition {
|
|
8
|
-
feature:
|
|
7
|
+
feature: ContactFeature;
|
|
9
8
|
displayName: string;
|
|
10
|
-
/** `true` means "contact not detected": open, unlocked for the lock
|
|
11
|
-
isOpen: (
|
|
9
|
+
/** `true` means "contact not detected": open, unlocked for the lock sensors, on otherwise. */
|
|
10
|
+
isOpen: (vehicle: Vehicle) => boolean | undefined;
|
|
12
11
|
}
|
|
13
12
|
export declare class ContactBinding extends ServiceBinding {
|
|
14
13
|
private readonly definition;
|
|
15
|
-
readonly feature:
|
|
14
|
+
readonly feature: ContactFeature;
|
|
16
15
|
protected readonly serviceType: ServiceType;
|
|
17
16
|
protected readonly subtype: string;
|
|
18
17
|
protected readonly displayName: string;
|
|
@@ -1,18 +1,54 @@
|
|
|
1
|
-
import { bodyValues, isAtHome, } from "../../vehicle/mapping.js";
|
|
1
|
+
import { bodyValues, isAtHome, isPlugLocked, isWindowHeatingOn, } from "../../vehicle/mapping.js";
|
|
2
2
|
import { ServiceBinding, } from "./common.js";
|
|
3
|
+
const negate = (value) => value === undefined ? undefined : !value;
|
|
3
4
|
const CONTACTS = [
|
|
4
|
-
{
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
{
|
|
6
|
+
feature: "doors",
|
|
7
|
+
displayName: "Doors",
|
|
8
|
+
isOpen: (v) => bodyValues(v).doorsOpen,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
feature: "windows",
|
|
12
|
+
displayName: "Windows",
|
|
13
|
+
isOpen: (v) => bodyValues(v).windowsOpen,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
feature: "trunk",
|
|
17
|
+
displayName: "Trunk",
|
|
18
|
+
isOpen: (v) => bodyValues(v).trunkOpen,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
feature: "bonnet",
|
|
22
|
+
displayName: "Bonnet",
|
|
23
|
+
isOpen: (v) => bodyValues(v).bonnetOpen,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
feature: "sunroof",
|
|
27
|
+
displayName: "Sunroof",
|
|
28
|
+
isOpen: (v) => bodyValues(v).sunroofOpen,
|
|
29
|
+
},
|
|
9
30
|
// The API cannot lock or unlock, so the lock state is a read-only sensor: closed = locked.
|
|
10
31
|
{
|
|
11
32
|
feature: "lock",
|
|
12
33
|
displayName: "Locked",
|
|
13
|
-
isOpen: (v) => (v.locked
|
|
34
|
+
isOpen: (v) => negate(bodyValues(v).locked),
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
feature: "lights",
|
|
38
|
+
displayName: "Lights",
|
|
39
|
+
isOpen: (v) => bodyValues(v).lightsOn,
|
|
40
|
+
},
|
|
41
|
+
// The API has no command for the window heating, so it is a read-only sensor: open = on.
|
|
42
|
+
{
|
|
43
|
+
feature: "windowHeating",
|
|
44
|
+
displayName: "Window Heating",
|
|
45
|
+
isOpen: isWindowHeatingOn,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
feature: "plugLock",
|
|
49
|
+
displayName: "Plug Locked",
|
|
50
|
+
isOpen: (v) => negate(isPlugLocked(v)),
|
|
14
51
|
},
|
|
15
|
-
{ feature: "lights", displayName: "Lights", isOpen: (v) => v.lightsOn },
|
|
16
52
|
];
|
|
17
53
|
export class ContactBinding extends ServiceBinding {
|
|
18
54
|
definition;
|
|
@@ -32,7 +68,7 @@ export class ContactBinding extends ServiceBinding {
|
|
|
32
68
|
}
|
|
33
69
|
render(_service, vehicle) {
|
|
34
70
|
const { ContactSensorState } = this.ctx.hap.Characteristic;
|
|
35
|
-
const open = this.definition.isOpen(
|
|
71
|
+
const open = this.definition.isOpen(vehicle);
|
|
36
72
|
if (open !== undefined) {
|
|
37
73
|
this.set(ContactSensorState, open
|
|
38
74
|
? ContactSensorState.CONTACT_NOT_DETECTED
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.js","sourceRoot":"","sources":["../../../src/accessory/services/body.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,UAAU,EACV,QAAQ,
|
|
1
|
+
{"version":3,"file":"body.js","sourceRoot":"","sources":["../../../src/accessory/services/body.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,cAAc,GAGf,MAAM,aAAa,CAAC;AAsBrB,MAAM,MAAM,GAAG,CAAC,KAA0B,EAAE,EAAE,CAC5C,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAE3C,MAAM,QAAQ,GAAiC;IAC7C;QACE,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,OAAO;QACpB,MAAM,EAAE,CAAC,C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,eAAe,CAAC;IACpB,OAAO,GAAG,MAAM,CAAC;IACjB,WAAW,GAAG,MAAM,CAAC;IAExC,IAAuB,cAAc;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IAES,MAAM,CAAC,QAAiB,EAAE,OAAgB;QAClD,MAAM,IAAI,GAA6B,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC9D,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO;QACT,CAAC;QACD,MAAM,EAAE,iBAAiB,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC;QAC1D,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACvC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,IAAI,CAAC,GAAG,CACN,iBAAiB,EACjB,MAAM;gBACJ,CAAC,CAAC,iBAAiB,CAAC,kBAAkB;gBACtC,CAAC,CAAC,iBAAiB,CAAC,sBAAsB,CAC7C,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -29,6 +29,8 @@ export declare abstract class ServiceBinding {
|
|
|
29
29
|
protected abstract readonly displayName: string;
|
|
30
30
|
protected service: Service | undefined;
|
|
31
31
|
constructor(ctx: BindingContext);
|
|
32
|
+
/** Name of the service in HomeKit. */
|
|
33
|
+
get name(): string;
|
|
32
34
|
/** Whether the service exists on the (possibly cached) accessory. */
|
|
33
35
|
exists(): boolean;
|
|
34
36
|
/** Creates the service if needed and registers handlers once. Returns whether it was added. */
|
|
@@ -11,6 +11,10 @@ export class ServiceBinding {
|
|
|
11
11
|
constructor(ctx) {
|
|
12
12
|
this.ctx = ctx;
|
|
13
13
|
}
|
|
14
|
+
/** Name of the service in HomeKit. */
|
|
15
|
+
get name() {
|
|
16
|
+
return this.displayName;
|
|
17
|
+
}
|
|
14
18
|
/** Whether the service exists on the (possibly cached) accessory. */
|
|
15
19
|
exists() {
|
|
16
20
|
return (this.ctx.accessory.getServiceById(this.serviceType, this.subtype) !==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/accessory/services/common.ts"],"names":[],"mappings":"AAqBA,uGAAuG;AACvG,mHAAmH;AACnH,MAAM,6BAA6B,GAAG,CAAC,KAAkB,CAAC;AAa1D;;;GAGG;AACH,MAAM,OAAgB,cAAc;IAOH;IAFrB,OAAO,CAAsB;IAEvC,YAA+B,GAAmB;QAAnB,QAAG,GAAH,GAAG,CAAgB;IAAG,CAAC;IAEtD,qEAAqE;IACrE,MAAM;QACJ,OAAO,CACL,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC;YACjE,SAAS,CACV,CAAC;IACJ,CAAC;IAED,+FAA+F;IAC/F,MAAM;QACJ,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC;QACpC,IAAI,OAAO,GAAG,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACvE,MAAM,KAAK,GAAG,CAAC,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,SAAS,CAAC,UAAU,CAC5B,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,OAAO,CACb,CAAC;YACF,OAAO,CAAC,yBAAyB,CAAC,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;YACrE,OAAO,CAAC,iBAAiB,CACvB,GAAG,CAAC,cAAc,CAAC,cAAc,EACjC,IAAI,CAAC,WAAW,CACjB,CAAC;YACF,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,IAAI,CA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CAAC;IACH,CAAC;CACF;AAED,kGAAkG;AAClG,MAAM,UAAU,QAAQ,CACtB,OAAe,EACf,MAA0B;IAE1B,IAAI,KAAiC,CAAC;IACtC,OAAO,CAAC,KAAQ,EAAE,EAAE;QAClB,YAAY,CAAC,KAAK,CAAC,CAAC;QACpB,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;YACtB,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,EAAE,OAAO,CAAC,CAAC;QACZ,KAAK,CAAC,KAAK,EAAE,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,mBAAmB,CACjC,OAAgB,EAChB,KAA8D;IAE9D,OAAO,CAAC,QAAQ,KAAK,EAAE,wBAAwB,EAAE,KAAK,EAAE,CAAC;IACzD,OAAO,CAAC,QAAQ,CAAC,MAAM,GAAG,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;AACrE,CAAC"}
|
|
@@ -11,6 +11,12 @@ export declare class VehicleAccessory {
|
|
|
11
11
|
private readonly unsupportedUpdates;
|
|
12
12
|
/** `fetchedAt` of the last snapshot, so optimistic updates and stale notices are not counted. */
|
|
13
13
|
private lastFetchedAt;
|
|
14
|
+
private lastSupportSummary;
|
|
14
15
|
constructor(ctx: BindingContext);
|
|
15
16
|
private sync;
|
|
17
|
+
/**
|
|
18
|
+
* Logs what the vehicle supports whenever that changes, so users can see which features exist
|
|
19
|
+
* for their vehicle without trying each one, and which of them are turned off in the config.
|
|
20
|
+
*/
|
|
21
|
+
private logSupport;
|
|
16
22
|
}
|