@homebridge-plugins/homebridge-august 2.2.8-beta.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/.eslintrc.json +86 -0
- package/.github/FUNDING.yml +4 -0
- package/.github/ISSUE_TEMPLATE/bug-report.yml +97 -0
- package/.github/ISSUE_TEMPLATE/config.yml +8 -0
- package/.github/ISSUE_TEMPLATE/feature-request.yml +38 -0
- package/.github/ISSUE_TEMPLATE/support-request.yml +85 -0
- package/.github/ISSUE_TEMPLATE.md +48 -0
- package/.github/PULL_REQUEST_TEMPLATE/pull_request.md +27 -0
- package/.github/dependabot.yml +17 -0
- package/.github/labeler.yml +38 -0
- package/.github/npm-version-script-esm.js +85 -0
- package/.github/workflows/beta-release.yml +55 -0
- package/.github/workflows/build.yml +18 -0
- package/.github/workflows/changerelease.yml +11 -0
- package/.github/workflows/labeler.yml +9 -0
- package/.github/workflows/release-drafter.yml +14 -0
- package/.github/workflows/release.yml +35 -0
- package/.github/workflows/stale.yml +12 -0
- package/CHANGELOG.md +197 -0
- package/LICENSE +14 -0
- package/README.md +45 -0
- package/SECURITY.md +19 -0
- package/branding/Homebridge_x_August.svg +32 -0
- package/branding/icon.png +0 -0
- package/config.schema.json +489 -0
- package/dist/devices/device.d.ts +55 -0
- package/dist/devices/device.d.ts.map +1 -0
- package/dist/devices/device.js +219 -0
- package/dist/devices/device.js.map +1 -0
- package/dist/devices/lock.d.ts +44 -0
- package/dist/devices/lock.d.ts.map +1 -0
- package/dist/devices/lock.js +353 -0
- package/dist/devices/lock.js.map +1 -0
- package/dist/homebridge-ui/public/index.html +203 -0
- package/dist/homebridge-ui/server.d.ts +2 -0
- package/dist/homebridge-ui/server.d.ts.map +1 -0
- package/dist/homebridge-ui/server.js +47 -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 +11 -0
- package/dist/index.js.map +1 -0
- package/dist/platform.d.ts +91 -0
- package/dist/platform.d.ts.map +1 -0
- package/dist/platform.js +481 -0
- package/dist/platform.js.map +1 -0
- package/dist/settings.d.ts +177 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +9 -0
- package/dist/settings.js.map +1 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +22 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1493 -0
- package/docs/functions/default.html +1 -0
- package/docs/index.html +39 -0
- package/docs/modules.html +2 -0
- package/eslint.config.js +50 -0
- package/package.json +92 -0
- package/typedoc.json +17 -0
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pluginAlias": "August",
|
|
3
|
+
"pluginType": "platform",
|
|
4
|
+
"singular": true,
|
|
5
|
+
"customUi": true,
|
|
6
|
+
"customUiPath": "./dist/homebridge-ui",
|
|
7
|
+
"headerDisplay": "<p align='center'><img width='100px' src='https://user-images.githubusercontent.com/9875439/102681754-ac2eb800-4189-11eb-8e17-7c47c804484b.png'></p>\n\nThe **August** plugin allows you to control August Devices. \n\nTo get started link your August Account.\n\n1. Input your August E-mail/Phone Number into the August Account Info.\n\n2.Restart Homebridge to receive an August Validate Code.\n\n3. Input your Validate Code into the August Account Info.\n\n4. Finally Restart Homebridge.",
|
|
8
|
+
"footerDisplay": "Please raise any issues on our [project page](https://github.com/homebridge-plugins/homebridge-august/issues).\n\nIf you would like to have other August Devices added to this plugin fill out [Feature Request Form](https://github.com/homebridge-plugins/homebridge-august/issues/new?assignees=&labels=&template=feature_request.md).",
|
|
9
|
+
"schema": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"name": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"title": "Name",
|
|
15
|
+
"default": "August"
|
|
16
|
+
},
|
|
17
|
+
"credentials": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"augustId": {
|
|
21
|
+
"title": "August ID",
|
|
22
|
+
"type": "string",
|
|
23
|
+
"placeholder": "E-mail or Phone Number",
|
|
24
|
+
"x-schema-form": {
|
|
25
|
+
"type": "username"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"password": {
|
|
29
|
+
"title": "August Password",
|
|
30
|
+
"type": "string",
|
|
31
|
+
"placeholder": "Password",
|
|
32
|
+
"x-schema-form": {
|
|
33
|
+
"type": "password"
|
|
34
|
+
},
|
|
35
|
+
"condition": {
|
|
36
|
+
"functionBody": "return (model.credentials && model.credentials.augustId);"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"countryCode": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"title": "Country Code",
|
|
42
|
+
"placeholder": "US",
|
|
43
|
+
"condition": {
|
|
44
|
+
"functionBody": "return (model.credentials && model.credentials.augustId && model.credentials.password);"
|
|
45
|
+
},
|
|
46
|
+
"pattern": "^[A-Z]{2}$",
|
|
47
|
+
"patternErrorMessage": "Must be a valid country code",
|
|
48
|
+
"minLength": 2,
|
|
49
|
+
"maxLength": 2,
|
|
50
|
+
"validation": "countryCode",
|
|
51
|
+
"enum": [
|
|
52
|
+
"US",
|
|
53
|
+
"CA",
|
|
54
|
+
"GB",
|
|
55
|
+
"DE",
|
|
56
|
+
"AT",
|
|
57
|
+
"IE",
|
|
58
|
+
"ES",
|
|
59
|
+
"FR",
|
|
60
|
+
"BE",
|
|
61
|
+
"NL",
|
|
62
|
+
"LU",
|
|
63
|
+
"CH",
|
|
64
|
+
"IT",
|
|
65
|
+
"JP",
|
|
66
|
+
"CN",
|
|
67
|
+
"SG",
|
|
68
|
+
"AU",
|
|
69
|
+
"NZ",
|
|
70
|
+
"HK",
|
|
71
|
+
"KR",
|
|
72
|
+
"TW",
|
|
73
|
+
"MX",
|
|
74
|
+
"BR",
|
|
75
|
+
"AR",
|
|
76
|
+
"CL",
|
|
77
|
+
"CO",
|
|
78
|
+
"PE",
|
|
79
|
+
"UY",
|
|
80
|
+
"CR",
|
|
81
|
+
"EC",
|
|
82
|
+
"SV",
|
|
83
|
+
"GT",
|
|
84
|
+
"HN",
|
|
85
|
+
"NI",
|
|
86
|
+
"PA",
|
|
87
|
+
"PY",
|
|
88
|
+
"PR",
|
|
89
|
+
"VE",
|
|
90
|
+
"IN",
|
|
91
|
+
"AE",
|
|
92
|
+
"QA",
|
|
93
|
+
"SA",
|
|
94
|
+
"KW",
|
|
95
|
+
"BH",
|
|
96
|
+
"OM",
|
|
97
|
+
"EG",
|
|
98
|
+
"ZA",
|
|
99
|
+
"RU",
|
|
100
|
+
"TR",
|
|
101
|
+
"IL",
|
|
102
|
+
"DK",
|
|
103
|
+
"SE",
|
|
104
|
+
"NO",
|
|
105
|
+
"FI",
|
|
106
|
+
"PL",
|
|
107
|
+
"CZ",
|
|
108
|
+
"SK",
|
|
109
|
+
"PT",
|
|
110
|
+
"GR",
|
|
111
|
+
"HU",
|
|
112
|
+
"RO",
|
|
113
|
+
"BG",
|
|
114
|
+
"HR",
|
|
115
|
+
"SI",
|
|
116
|
+
"RS",
|
|
117
|
+
"LV",
|
|
118
|
+
"LT",
|
|
119
|
+
"EE",
|
|
120
|
+
"IS",
|
|
121
|
+
"MT",
|
|
122
|
+
"CY"
|
|
123
|
+
],
|
|
124
|
+
"x-schema-form": {
|
|
125
|
+
"type": "select"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"apiKey": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"title": "apiKey",
|
|
131
|
+
"placeholder": "7f0dd80d-8531-4f8d-ba9b-3b0c9e6f8e4b",
|
|
132
|
+
"x-schema-form": {
|
|
133
|
+
"type": "apiKey"
|
|
134
|
+
},
|
|
135
|
+
"condition": {
|
|
136
|
+
"functionBody": "return (model.credentials && model.credentials.augustId && model.credentials.password && model.credentials.countryCode);"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"pnSubKey": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"title": "pnSubKey",
|
|
142
|
+
"placeholder": "sub-c-91d9b2e2-8b48-11e9-8b87-0619f8945a4f",
|
|
143
|
+
"x-schema-form": {
|
|
144
|
+
"type": "pnSubKey"
|
|
145
|
+
},
|
|
146
|
+
"condition": {
|
|
147
|
+
"functionBody": "return (model.credentials && model.credentials.augustId && model.credentials.password && model.credentials.countryCode);"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"installId": {
|
|
151
|
+
"title": "Install ID",
|
|
152
|
+
"type": "string",
|
|
153
|
+
"placeholder": "00000000-0000-0000-0000-000000000000",
|
|
154
|
+
"x-schema-form": {
|
|
155
|
+
"type": "installId"
|
|
156
|
+
},
|
|
157
|
+
"condition": {
|
|
158
|
+
"functionBody": "return (model.credentials && model.credentials.augustId && model.credentials.password && model.credentials.countryCode && !model.credentials.isValidated);"
|
|
159
|
+
},
|
|
160
|
+
"pattern": "^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$",
|
|
161
|
+
"patternErrorMessage": "Must be a valid UUID",
|
|
162
|
+
"minLength": 36,
|
|
163
|
+
"maxLength": 36,
|
|
164
|
+
"validation": "uuid",
|
|
165
|
+
"notitle": true,
|
|
166
|
+
"description": "This is a unique identifier for your device. It is generated by the plugin and is not configurable."
|
|
167
|
+
},
|
|
168
|
+
"validateCode": {
|
|
169
|
+
"title": "August Verification Code",
|
|
170
|
+
"type": "string",
|
|
171
|
+
"x-schema-form": {
|
|
172
|
+
"type": "one-time-code"
|
|
173
|
+
},
|
|
174
|
+
"condition": {
|
|
175
|
+
"functionBody": "return (model.credentials && model.credentials.augustId && model.credentials.password && model.credentials.countryCode && !model.credentials.isValidated);"
|
|
176
|
+
},
|
|
177
|
+
"pattern": "^[0-9]{6}$",
|
|
178
|
+
"patternErrorMessage": "Must be a valid verification code",
|
|
179
|
+
"minLength": 6,
|
|
180
|
+
"maxLength": 6,
|
|
181
|
+
"validation": "verificationCode",
|
|
182
|
+
"description": "This is a unique verification code that is sent to your Email or Phone on your August account. It is generated by the plugin."
|
|
183
|
+
},
|
|
184
|
+
"isValidated": {
|
|
185
|
+
"title": "Validated",
|
|
186
|
+
"type": "boolean",
|
|
187
|
+
"default": false,
|
|
188
|
+
"condition": {
|
|
189
|
+
"functionBody": "return (model.credentials && model.credentials.augustId && model.credentials.password && model.credentials.countryCode);"
|
|
190
|
+
},
|
|
191
|
+
"description": "This indicates if the verification code has been validated. It is generated by the plugin and is not configurable.",
|
|
192
|
+
"x-schema-form": {
|
|
193
|
+
"type": "checkbox"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"notice": {
|
|
197
|
+
"title": "Notice",
|
|
198
|
+
"type": "string",
|
|
199
|
+
"default": "Keep your tokens a secret!"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"required": [
|
|
203
|
+
"augustId",
|
|
204
|
+
"password",
|
|
205
|
+
"countryCode",
|
|
206
|
+
"validateCode",
|
|
207
|
+
"notice"
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
"options": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"properties": {
|
|
213
|
+
"devices": {
|
|
214
|
+
"type": "array",
|
|
215
|
+
"items": {
|
|
216
|
+
"title": "Devices",
|
|
217
|
+
"type": "object",
|
|
218
|
+
"properties": {
|
|
219
|
+
"lockId": {
|
|
220
|
+
"title": "Lock ID",
|
|
221
|
+
"type": "string",
|
|
222
|
+
"placeholder": "TSSQ97FRDMX7TPGU3Z2HWNRDPQXJ9YSM"
|
|
223
|
+
},
|
|
224
|
+
"configLockName": {
|
|
225
|
+
"title": "Device Name",
|
|
226
|
+
"type": "string",
|
|
227
|
+
"placeholder": "August",
|
|
228
|
+
"condition": {
|
|
229
|
+
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId);"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"hide_device": {
|
|
233
|
+
"title": "Hide Device",
|
|
234
|
+
"type": "boolean",
|
|
235
|
+
"description": "If true then devices that are reported as offline will be shown as off in HomeKit.",
|
|
236
|
+
"condition": {
|
|
237
|
+
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId);"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"lock": {
|
|
241
|
+
"type": "object",
|
|
242
|
+
"properties": {
|
|
243
|
+
"hide_lock": {
|
|
244
|
+
"title": "Hide Lock",
|
|
245
|
+
"description": "Allows you to hide the lock and only show the Contact Sensor. Useful for locks that already support HomeKit.",
|
|
246
|
+
"type": "boolean",
|
|
247
|
+
"condition": {
|
|
248
|
+
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId && !model.options.devices[arrayIndices].hide_device);"
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"hide_contactsensor": {
|
|
252
|
+
"title": "Hide Lock's Contact Sensor",
|
|
253
|
+
"type": "boolean",
|
|
254
|
+
"condition": {
|
|
255
|
+
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId && !model.options.devices[arrayIndices].hide_device);"
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"overrideHomeKitEnabled": {
|
|
261
|
+
"title": "Override HomeKit Enabled",
|
|
262
|
+
"type": "boolean",
|
|
263
|
+
"description": "By default, devices tht are HomeKit enabled will be shown in HomeKit. If you want to override this, set this to true and the device will display in the Home app.",
|
|
264
|
+
"condition": {
|
|
265
|
+
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId && !model.options.devices[arrayIndices].hide_device);"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"firmware": {
|
|
269
|
+
"title": "Firmware Override",
|
|
270
|
+
"type": "string",
|
|
271
|
+
"placeholder": "1.2.8",
|
|
272
|
+
"condition": {
|
|
273
|
+
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId && !model.options.devices[arrayIndices].hide_device);"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"refreshRate": {
|
|
277
|
+
"title": "Device Refresh Rate",
|
|
278
|
+
"type": "number",
|
|
279
|
+
"placeholder": 300,
|
|
280
|
+
"description": "Indicates the number of seconds between polls of August API.",
|
|
281
|
+
"condition": {
|
|
282
|
+
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId && !model.options.devices[arrayIndices].hide_device);"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"updateRate": {
|
|
286
|
+
"title": "Device Update Rate",
|
|
287
|
+
"type": "number",
|
|
288
|
+
"placeholder": 1,
|
|
289
|
+
"description": "Indicates the number of seconds between pushes to August API.",
|
|
290
|
+
"condition": {
|
|
291
|
+
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId && !model.options.devices[arrayIndices].hide_device);"
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"pushRate": {
|
|
295
|
+
"title": "Device Push Rate",
|
|
296
|
+
"type": "number",
|
|
297
|
+
"placeholder": 1,
|
|
298
|
+
"description": "Indicates the number of seconds between pushes to August API.",
|
|
299
|
+
"condition": {
|
|
300
|
+
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId && !model.options.devices[arrayIndices].hide_device);"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"external": {
|
|
304
|
+
"title": "External Accessory",
|
|
305
|
+
"type": "boolean",
|
|
306
|
+
"condition": {
|
|
307
|
+
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId && !model.options.devices[arrayIndices].hide_device);"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"logging": {
|
|
311
|
+
"title": "Device Logging Override Setting",
|
|
312
|
+
"type": "string",
|
|
313
|
+
"required": true,
|
|
314
|
+
"default": "",
|
|
315
|
+
"oneOf": [
|
|
316
|
+
{
|
|
317
|
+
"title": "Default Logging",
|
|
318
|
+
"enum": [
|
|
319
|
+
""
|
|
320
|
+
]
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"title": "Standard Logging",
|
|
324
|
+
"enum": [
|
|
325
|
+
"standard"
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"title": "No Logging",
|
|
330
|
+
"enum": [
|
|
331
|
+
"none"
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"title": "Debug Logging",
|
|
336
|
+
"enum": [
|
|
337
|
+
"debug"
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
],
|
|
341
|
+
"condition": {
|
|
342
|
+
"functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].lockId && !model.options.devices[arrayIndices].hide_device);"
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"required": [
|
|
347
|
+
"lockId",
|
|
348
|
+
"configLockName",
|
|
349
|
+
"logging"
|
|
350
|
+
]
|
|
351
|
+
},
|
|
352
|
+
"uniqueItems": true
|
|
353
|
+
},
|
|
354
|
+
"refreshRate": {
|
|
355
|
+
"title": "Refresh Rate",
|
|
356
|
+
"type": "number",
|
|
357
|
+
"placeholder": 360,
|
|
358
|
+
"description": "Indicates the number of seconds between polls of August API."
|
|
359
|
+
},
|
|
360
|
+
"pushRate": {
|
|
361
|
+
"title": "Push Rate",
|
|
362
|
+
"type": "number",
|
|
363
|
+
"placeholder": 1,
|
|
364
|
+
"description": "Indicates the number of seconds between pushes to August API."
|
|
365
|
+
},
|
|
366
|
+
"logging": {
|
|
367
|
+
"title": "Logging Setting",
|
|
368
|
+
"type": "string",
|
|
369
|
+
"required": true,
|
|
370
|
+
"default": "",
|
|
371
|
+
"oneOf": [
|
|
372
|
+
{
|
|
373
|
+
"title": "Default Logging",
|
|
374
|
+
"enum": [
|
|
375
|
+
""
|
|
376
|
+
]
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"title": "Standard Logging",
|
|
380
|
+
"enum": [
|
|
381
|
+
"standard"
|
|
382
|
+
]
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"title": "No Logging",
|
|
386
|
+
"enum": [
|
|
387
|
+
"none"
|
|
388
|
+
]
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"title": "Debug Logging",
|
|
392
|
+
"enum": [
|
|
393
|
+
"debug"
|
|
394
|
+
]
|
|
395
|
+
}
|
|
396
|
+
]
|
|
397
|
+
},
|
|
398
|
+
"allowInvalidCharacters": {
|
|
399
|
+
"title": "Allow Invalid Characters",
|
|
400
|
+
"type": "boolean",
|
|
401
|
+
"description": "If true, invalid characters will be allowed in the device name."
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"required": [
|
|
407
|
+
"name",
|
|
408
|
+
"credentials"
|
|
409
|
+
]
|
|
410
|
+
},
|
|
411
|
+
"layout": [
|
|
412
|
+
{
|
|
413
|
+
"type": "fieldset",
|
|
414
|
+
"title": "August Account Info",
|
|
415
|
+
"expandable": true,
|
|
416
|
+
"expanded": false,
|
|
417
|
+
"items": [
|
|
418
|
+
"credentials.augustId",
|
|
419
|
+
"credentials.password",
|
|
420
|
+
"credentials.validateCode",
|
|
421
|
+
{
|
|
422
|
+
"type": "fieldset",
|
|
423
|
+
"title": "Advanced August Account Settings",
|
|
424
|
+
"expandable": true,
|
|
425
|
+
"expanded": false,
|
|
426
|
+
"items": [
|
|
427
|
+
"credentials.countryCode",
|
|
428
|
+
"credentials.isValidated",
|
|
429
|
+
"credentials.installId"
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
]
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"type": "fieldset",
|
|
436
|
+
"title": "August Device Settings",
|
|
437
|
+
"expandable": true,
|
|
438
|
+
"expanded": false,
|
|
439
|
+
"items": [
|
|
440
|
+
{
|
|
441
|
+
"key": "options.devices",
|
|
442
|
+
"notitle": false,
|
|
443
|
+
"type": "tabarray",
|
|
444
|
+
"title": "{{ value.configLockName || value.lockId || 'New Lock Device' }}",
|
|
445
|
+
"expandable": true,
|
|
446
|
+
"expanded": false,
|
|
447
|
+
"orderable": false,
|
|
448
|
+
"items": [
|
|
449
|
+
"options.devices[].configLockName",
|
|
450
|
+
"options.devices[].lockId",
|
|
451
|
+
"options.devices[].hide_device",
|
|
452
|
+
"options.devices[].overrideHomeKitEnabled",
|
|
453
|
+
"options.devices[].lock.hide_lock",
|
|
454
|
+
"options.devices[].lock.hide_contactsensor",
|
|
455
|
+
"options.devices[].firmware",
|
|
456
|
+
{
|
|
457
|
+
"key": "options.devices[].refreshRate",
|
|
458
|
+
"description": "<em class='primary-text'>Specifies the interval, in seconds, for retrieving the latest device status from the August API. This interval applies only to this specific device. Set to </em>0<em class='primary-text'> if you would like to just receive updates from the August API</em>"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"key": "options.devices[].pushRate",
|
|
462
|
+
"description": "<em class='primary-text'>Specifies the interval, in seconds, between pushes to the August API for this specific device.</em>"
|
|
463
|
+
},
|
|
464
|
+
"options.devices[].external",
|
|
465
|
+
"options.devices[].logging"
|
|
466
|
+
]
|
|
467
|
+
}
|
|
468
|
+
]
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"type": "fieldset",
|
|
472
|
+
"title": "Advanced Settings",
|
|
473
|
+
"expandable": true,
|
|
474
|
+
"expanded": false,
|
|
475
|
+
"items": [
|
|
476
|
+
{
|
|
477
|
+
"key": "options.refreshRate",
|
|
478
|
+
"description": "<em class='primary-text'>Specifies the interval, in seconds, for retrieving the latest device status from the August API.</em>"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"key": "options.pushRate",
|
|
482
|
+
"description": "<em class='primary-text'>Specifies the interval, in seconds, between pushes to the August API.</em>"
|
|
483
|
+
},
|
|
484
|
+
"options.logging",
|
|
485
|
+
"options.allowInvalidCharacters"
|
|
486
|
+
]
|
|
487
|
+
}
|
|
488
|
+
]
|
|
489
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { API, CharacteristicValue, HAP, Logging, PlatformAccessory, Service } from 'homebridge';
|
|
2
|
+
import type { AugustPlatform } from '../platform.js';
|
|
3
|
+
import type { AugustPlatformConfig, device, devicesConfig } from '../settings.js';
|
|
4
|
+
export declare abstract class deviceBase {
|
|
5
|
+
protected readonly platform: AugustPlatform;
|
|
6
|
+
protected accessory: PlatformAccessory;
|
|
7
|
+
protected device: device & devicesConfig;
|
|
8
|
+
readonly api: API;
|
|
9
|
+
readonly log: Logging;
|
|
10
|
+
readonly config: AugustPlatformConfig;
|
|
11
|
+
protected readonly hap: HAP;
|
|
12
|
+
protected deviceLogging: string;
|
|
13
|
+
protected deviceRefreshRate: number;
|
|
14
|
+
protected deviceUpdateRate: number;
|
|
15
|
+
protected devicePushRate: number;
|
|
16
|
+
constructor(platform: AugustPlatform, accessory: PlatformAccessory, device: device & devicesConfig);
|
|
17
|
+
getDeviceLogSettings(accessory: PlatformAccessory, device: device & devicesConfig): Promise<void>;
|
|
18
|
+
getDeviceRateSettings(accessory: PlatformAccessory, device: device & devicesConfig): Promise<void>;
|
|
19
|
+
getDeviceConfigSettings(accessory: PlatformAccessory, device: device & devicesConfig): Promise<void>;
|
|
20
|
+
getDeviceContext(accessory: PlatformAccessory, device: device & devicesConfig): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Updates the value of a HomeKit characteristic and logs the change.
|
|
23
|
+
*
|
|
24
|
+
* This function updates the specified characteristic of a given service with a new value.
|
|
25
|
+
* It also logs the updated value and the context before and after the update for debugging purposes.
|
|
26
|
+
*
|
|
27
|
+
* @param Service - The HomeKit service that contains the characteristic to be updated.
|
|
28
|
+
* @param ServiceName - The name of the service being updated.
|
|
29
|
+
* @param Characteristic - The specific characteristic to be updated.
|
|
30
|
+
* @param CharacteristicValue - The new value to set for the characteristic. If undefined, the function logs the value and returns without updating.
|
|
31
|
+
* @param CharacteristicName - The name of the characteristic being updated, used for logging purposes.
|
|
32
|
+
* @param Value - The value to compare against to determine the status.
|
|
33
|
+
* @param StatusMatch - The status message to log if the characteristic value matches the provided value.
|
|
34
|
+
* @param StatusDoesNotMatch - The status message to log if the chxaracteristic value does not match the provided value.
|
|
35
|
+
* @return void
|
|
36
|
+
*/
|
|
37
|
+
updateCharacteristic(Service: Service, ServiceName: string, Characteristic: any, CharacteristicValue: CharacteristicValue, CharacteristicName: string, Value?: CharacteristicValue, StatusMatch?: string, StatusDoesNotMatch?: string): Promise<void>;
|
|
38
|
+
statusCode(action: string, error: {
|
|
39
|
+
message: string;
|
|
40
|
+
}): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Logging for Device
|
|
43
|
+
*/
|
|
44
|
+
infoLog(...log: any[]): Promise<void>;
|
|
45
|
+
successLog(...log: any[]): Promise<void>;
|
|
46
|
+
debugSuccessLog(...log: any[]): Promise<void>;
|
|
47
|
+
warnLog(...log: any[]): Promise<void>;
|
|
48
|
+
debugWarnLog(...log: any[]): Promise<void>;
|
|
49
|
+
errorLog(...log: any[]): Promise<void>;
|
|
50
|
+
debugErrorLog(...log: any[]): Promise<void>;
|
|
51
|
+
debugLog(...log: any[]): Promise<void>;
|
|
52
|
+
loggingIsDebug(): Promise<boolean>;
|
|
53
|
+
enablingDeviceLogging(): Promise<boolean>;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=device.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../src/devices/device.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,mBAAmB,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAMpG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,EA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