homebridge-ttlock-accesscode 2.4.0-beta.0 → 3.0.0-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/README.md +15 -37
- package/config.schema.json +13 -113
- package/dist/api/ttlockApi.d.ts +66 -12
- package/dist/api/ttlockApi.js +581 -121
- package/dist/api/ttlockApi.js.map +1 -1
- package/dist/api/usageTracker.d.ts +23 -9
- package/dist/api/usageTracker.js +340 -134
- package/dist/api/usageTracker.js.map +1 -1
- package/dist/config.d.ts +1 -33
- package/dist/config.js +28 -132
- package/dist/config.js.map +1 -1
- package/dist/devices/baseDevice.d.ts +26 -12
- package/dist/devices/baseDevice.js +326 -107
- package/dist/devices/baseDevice.js.map +1 -1
- package/dist/devices/descriptorHelpers.js +9 -4
- package/dist/devices/descriptorHelpers.js.map +1 -1
- package/dist/devices/deviceManager.d.ts +8 -14
- package/dist/devices/deviceManager.js +49 -149
- package/dist/devices/deviceManager.js.map +1 -1
- package/dist/devices/deviceTypes.d.ts +12 -1
- package/dist/devices/homekitLock.d.ts +9 -1
- package/dist/devices/homekitLock.js +327 -66
- package/dist/devices/homekitLock.js.map +1 -1
- package/dist/platform.d.ts +39 -14
- package/dist/platform.js +436 -69
- package/dist/platform.js.map +1 -1
- package/dist/taskQueue.d.ts +1 -1
- package/dist/taskQueue.js +7 -5
- package/dist/taskQueue.js.map +1 -1
- package/dist/utils.d.ts +5 -2
- package/dist/utils.js +44 -16
- package/dist/utils.js.map +1 -1
- package/homebridge-ui/public/app.js +54 -966
- package/homebridge-ui/public/styles.css +4 -148
- package/homebridge-ui/server.js +26 -45
- package/package.json +11 -15
- package/dist/api/dirigeraApi.d.ts +0 -34
- package/dist/api/dirigeraApi.js +0 -127
- package/dist/api/dirigeraApi.js.map +0 -1
- package/dist/devices/homekitDoor.d.ts +0 -50
- package/dist/devices/homekitDoor.js +0 -268
- package/dist/devices/homekitDoor.js.map +0 -1
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ This plug-in lets you control TTLock locks in the Apple Home app with lock/unloc
|
|
|
25
25
|
|
|
26
26
|
## Requirements
|
|
27
27
|
- Homebridge Supported Versions: 1.11.2 or later, including Homebridge 2.x.
|
|
28
|
-
- Node.js Supported Versions: 22 and
|
|
28
|
+
- Node.js Supported Versions: 22, 24, and 26.
|
|
29
29
|
- TTLock Smart Lock.
|
|
30
30
|
- TTLock Gateway for non-Wi-Fi locks.
|
|
31
31
|
- Remote Unlock enabled in the TTLock mobile app.
|
|
@@ -38,8 +38,6 @@ This plug-in lets you control TTLock locks in the Apple Home app with lock/unloc
|
|
|
38
38
|
- Get the status of your TTLock devices.
|
|
39
39
|
- Lock and unlock your TTLock devices.
|
|
40
40
|
- Manage passcodes for your TTLock devices in Apple Home.
|
|
41
|
-
- Expose optional manual doors from IKEA DIRIGERA open/close sensors.
|
|
42
|
-
- Block linked TTLock lock/unlock commands when a manual door is open or unavailable.
|
|
43
41
|
- Automatic API usage protection with adaptive polling.
|
|
44
42
|
- Periodic discovery and offline recovery handling.
|
|
45
43
|
|
|
@@ -58,27 +56,15 @@ npm install -g homebridge-ttlock-accesscode
|
|
|
58
56
|
- For non-Wi-Fi locks, make sure your gateway is online and near the lock.
|
|
59
57
|
- The default settings are tuned for TTLock's monthly API limits.
|
|
60
58
|
- Polling is automatically slowed when monthly allowance gets lower.
|
|
61
|
-
-
|
|
62
|
-
- The Homebridge UI can test TTLock credentials
|
|
59
|
+
- The last 1% of the monthly allowance (at least 50 calls) is kept for locking, unlocking and access codes. When only that is left, polling and discovery pause until the month ends.
|
|
60
|
+
- The Homebridge UI can test your TTLock credentials and shows how many locks the account can see.
|
|
63
61
|
|
|
64
62
|
## Access Code Notes
|
|
65
63
|
- Access code support is exposed through the Apple Home App.
|
|
66
|
-
-
|
|
64
|
+
- Permanent access codes, and period access codes while their period runs, are loaded from TTLock and shown in the Apple Home App. One-time, erase and cyclic codes, and period codes outside their period, are not shown.
|
|
65
|
+
- Access codes added from the Apple Home App are permanent codes.
|
|
67
66
|
- Add/Delete/List/Read flows are handled through the Apple Home App.
|
|
68
67
|
|
|
69
|
-
## Manual Door Notes
|
|
70
|
-
- Manual doors are optional and are configured under `externalDoors`.
|
|
71
|
-
- Only IKEA DIRIGERA open/close sensors are supported at this time.
|
|
72
|
-
- Add paired DIRIGERA hubs under `externalDoors.hubs`.
|
|
73
|
-
- Add HomeKit doors under `externalDoors.doors`.
|
|
74
|
-
- Remove a hub or door when you no longer want those manual door accessories exposed.
|
|
75
|
-
- Door accessory IDs are generated from `externalDoors.doors[].name`. Renaming a door creates a new HomeKit door accessory and removes the old cached one.
|
|
76
|
-
- The DIRIGERA open/close sensor is not exposed as a separate HomeKit contact sensor. The plugin exposes a HomeKit Door service only.
|
|
77
|
-
- Manual doors cannot be opened or closed from HomeKit. HomeKit door position follows the DIRIGERA sensor state.
|
|
78
|
-
- Each manual door requires `sensor`, set to the DIRIGERA open/close sensor ID, and `lock`, set to the TTLock `device_id`/lock ID protected by that door.
|
|
79
|
-
- In the Homebridge UI, use the discovered TTLock lock list when linking a manual door.
|
|
80
|
-
- When a linked manual door is open, unknown, or unavailable, lock and unlock commands for that TTLock lock are ignored.
|
|
81
|
-
|
|
82
68
|
## Example Configuration
|
|
83
69
|
```json
|
|
84
70
|
{
|
|
@@ -101,30 +87,22 @@ npm install -g homebridge-ttlock-accesscode
|
|
|
101
87
|
"pollingInterval": 300,
|
|
102
88
|
"discoveryPollingInterval": 12,
|
|
103
89
|
"offlineInterval": 7,
|
|
104
|
-
"waitTimeUpdate": 100
|
|
105
|
-
"externalDoors": {
|
|
106
|
-
"doorPollingInterval": 60,
|
|
107
|
-
"hubs": [
|
|
108
|
-
{
|
|
109
|
-
"ip": "192.168.1.50",
|
|
110
|
-
"accessToken": "DIRIGERA_ACCESS_TOKEN"
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
"doors": [
|
|
114
|
-
{
|
|
115
|
-
"name": "Front Door",
|
|
116
|
-
"sensor": "IKEA_CONTACT_SENSOR_ID",
|
|
117
|
-
"lock": "TTLOCK_LOCK_ID"
|
|
118
|
-
}
|
|
119
|
-
]
|
|
120
|
-
}
|
|
90
|
+
"waitTimeUpdate": 100
|
|
121
91
|
}
|
|
122
92
|
],
|
|
123
93
|
"accessories": []
|
|
124
94
|
}
|
|
125
95
|
```
|
|
126
96
|
|
|
97
|
+
## Upgrading From 2.x
|
|
98
|
+
- Version 3 removes the optional IKEA DIRIGERA doors (`externalDoors`) and the lock and unlock block that went with them.
|
|
99
|
+
- Door accessories created by earlier versions are removed from HomeKit when Homebridge starts, together with any automations that used them.
|
|
100
|
+
- An `externalDoors` setting left in the config is ignored and logs a warning at startup. Remove it to stop the warning; saving a change in the plugin settings also removes it.
|
|
101
|
+
|
|
127
102
|
## Known Limitations
|
|
128
103
|
- Apple HomeKey is not supported by TTLock readers.
|
|
129
|
-
-
|
|
104
|
+
- A lock that does not answer three polls in a row, for example because its gateway is offline, shows No Response in Apple Home. Polling continues, and the lock shows its state again as soon as a poll reaches it.
|
|
105
|
+
- After Homebridge starts, a lock answers No Response to lock, unlock and access code requests until the plugin has found it in TTLock.
|
|
106
|
+
- Lock and unlock are answered at once and sent to TTLock in the background. If a command fails, or cannot be sent in time to finish within 60 seconds of the request, Apple Home goes back to the lock's last known state. A command that could not be sent in time is not sent later.
|
|
107
|
+
- Adding or deleting an access code goes through the gateway and can take longer than the roughly 9 seconds Apple Home waits. Apple Home may then report a failure even though the change was made; open the lock's access codes again to see the current list. A change that cannot be sent within those 9 seconds is not sent.
|
|
130
108
|
- TTLock Cloud API limits and behavior can change without notice.
|
package/config.schema.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"customUi": true,
|
|
6
6
|
"customUiPath": "./homebridge-ui",
|
|
7
7
|
"strictValidation": true,
|
|
8
|
-
"headerDisplay": "Configure TTLock account settings
|
|
8
|
+
"headerDisplay": "Configure TTLock account settings and polling from the custom setup UI. See [README](https://github.com/ZeliardM/homebridge-ttlock-accesscode/blob/latest/README.md) for more information.",
|
|
9
9
|
"footerDisplay": "",
|
|
10
10
|
"schema": {
|
|
11
11
|
"type": "object",
|
|
@@ -61,14 +61,16 @@
|
|
|
61
61
|
"type": "integer",
|
|
62
62
|
"description": "How often to check TTLock device status in the background.",
|
|
63
63
|
"default": 300,
|
|
64
|
-
"minimum": 30
|
|
64
|
+
"minimum": 30,
|
|
65
|
+
"maximum": 2147483
|
|
65
66
|
},
|
|
66
67
|
"discoveryPollingInterval": {
|
|
67
68
|
"title": "Discovery Polling Interval (Hours)",
|
|
68
69
|
"type": "integer",
|
|
69
70
|
"description": "How often to discover new TTLock devices in the background.",
|
|
70
71
|
"default": 12,
|
|
71
|
-
"minimum": 1
|
|
72
|
+
"minimum": 1,
|
|
73
|
+
"maximum": 596
|
|
72
74
|
},
|
|
73
75
|
"offlineInterval": {
|
|
74
76
|
"title": "Offline Device Removal Interval (Days)",
|
|
@@ -80,82 +82,10 @@
|
|
|
80
82
|
"waitTimeUpdate": {
|
|
81
83
|
"title": "Wait Time Update (Milliseconds)",
|
|
82
84
|
"type": "integer",
|
|
83
|
-
"description": "
|
|
85
|
+
"description": "How long periodic device discovery waits before it starts, so discoveries requested together run once. Lock polls and commands do not wait for it. Default: 100.",
|
|
84
86
|
"default": 100,
|
|
85
|
-
"minimum": 0
|
|
86
|
-
|
|
87
|
-
"externalDoors": {
|
|
88
|
-
"title": "External Doors",
|
|
89
|
-
"type": "object",
|
|
90
|
-
"description": "Optional IKEA DIRIGERA integration for manual doors exposed in HomeKit.",
|
|
91
|
-
"properties": {
|
|
92
|
-
"doorPollingInterval": {
|
|
93
|
-
"title": "Door Polling Interval (Seconds)",
|
|
94
|
-
"type": "integer",
|
|
95
|
-
"description": "How often to locally poll configured DIRIGERA door sensors as a fallback to events.",
|
|
96
|
-
"default": 60,
|
|
97
|
-
"minimum": 10
|
|
98
|
-
},
|
|
99
|
-
"hubs": {
|
|
100
|
-
"title": "DIRIGERA Hubs",
|
|
101
|
-
"type": "array",
|
|
102
|
-
"orderable": false,
|
|
103
|
-
"buttonText": "Add Hub",
|
|
104
|
-
"items": {
|
|
105
|
-
"title": "DIRIGERA Hub",
|
|
106
|
-
"type": "object",
|
|
107
|
-
"properties": {
|
|
108
|
-
"ip": {
|
|
109
|
-
"title": "DIRIGERA Hub IP",
|
|
110
|
-
"type": "string",
|
|
111
|
-
"required": true,
|
|
112
|
-
"description": "IP address of the DIRIGERA hub.",
|
|
113
|
-
"placeholder": "192.168.1.50",
|
|
114
|
-
"minLength": 1
|
|
115
|
-
},
|
|
116
|
-
"accessToken": {
|
|
117
|
-
"title": "DIRIGERA Access Token",
|
|
118
|
-
"type": "string",
|
|
119
|
-
"description": "Access token for the DIRIGERA hub. This is generated by pairing the hub from the custom setup UI."
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
"doors": {
|
|
125
|
-
"title": "Manual Doors",
|
|
126
|
-
"type": "array",
|
|
127
|
-
"orderable": false,
|
|
128
|
-
"buttonText": "Add Door",
|
|
129
|
-
"items": {
|
|
130
|
-
"title": "Door",
|
|
131
|
-
"type": "object",
|
|
132
|
-
"properties": {
|
|
133
|
-
"name": {
|
|
134
|
-
"title": "Door Name",
|
|
135
|
-
"type": "string",
|
|
136
|
-
"required": true,
|
|
137
|
-
"description": "Name shown for the manual door in HomeKit. This name is also used to generate the accessory ID.",
|
|
138
|
-
"placeholder": "Front Door",
|
|
139
|
-
"minLength": 1
|
|
140
|
-
},
|
|
141
|
-
"sensor": {
|
|
142
|
-
"title": "Linked DIRIGERA Sensor",
|
|
143
|
-
"type": "string",
|
|
144
|
-
"required": true,
|
|
145
|
-
"description": "DIRIGERA open/close sensor ID that reports this door state.",
|
|
146
|
-
"minLength": 1
|
|
147
|
-
},
|
|
148
|
-
"lock": {
|
|
149
|
-
"title": "Linked TTLock Lock ID",
|
|
150
|
-
"type": "string",
|
|
151
|
-
"required": true,
|
|
152
|
-
"description": "Required TTLock device_id/lockId protected by this door.",
|
|
153
|
-
"minLength": 1
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
87
|
+
"minimum": 0,
|
|
88
|
+
"maximum": 60000
|
|
159
89
|
}
|
|
160
90
|
}
|
|
161
91
|
},
|
|
@@ -165,12 +95,13 @@
|
|
|
165
95
|
"clientSecret",
|
|
166
96
|
"username",
|
|
167
97
|
"password",
|
|
168
|
-
"totalApiCallsPerMonth",
|
|
169
98
|
{
|
|
170
99
|
"type": "fieldset",
|
|
171
|
-
"title": "Polling and API Usage",
|
|
100
|
+
"title": "Polling and API Usage (Optional)",
|
|
101
|
+
"description": "Customize how often locks are polled and devices are discovered. Polling slows down automatically to stay within the monthly API budget.",
|
|
172
102
|
"expandable": true,
|
|
173
103
|
"items": [
|
|
104
|
+
"totalApiCallsPerMonth",
|
|
174
105
|
"pollingInterval",
|
|
175
106
|
"discoveryPollingInterval",
|
|
176
107
|
"offlineInterval"
|
|
@@ -178,39 +109,8 @@
|
|
|
178
109
|
},
|
|
179
110
|
{
|
|
180
111
|
"type": "fieldset",
|
|
181
|
-
"title": "
|
|
182
|
-
"description": "
|
|
183
|
-
"expandable": true,
|
|
184
|
-
"items": [
|
|
185
|
-
"externalDoors.doorPollingInterval",
|
|
186
|
-
{
|
|
187
|
-
"key": "externalDoors.hubs",
|
|
188
|
-
"type": "tabarray",
|
|
189
|
-
"title": "{{ value.ip || 'DIRIGERA Hub' }}",
|
|
190
|
-
"orderable": false,
|
|
191
|
-
"buttonText": "Add Hub",
|
|
192
|
-
"items": [
|
|
193
|
-
"externalDoors.hubs[].ip",
|
|
194
|
-
"externalDoors.hubs[].accessToken"
|
|
195
|
-
]
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
"key": "externalDoors.doors",
|
|
199
|
-
"type": "tabarray",
|
|
200
|
-
"title": "{{ value.name || 'Door' }}",
|
|
201
|
-
"orderable": false,
|
|
202
|
-
"buttonText": "Add Door",
|
|
203
|
-
"items": [
|
|
204
|
-
"externalDoors.doors[].name",
|
|
205
|
-
"externalDoors.doors[].sensor",
|
|
206
|
-
"externalDoors.doors[].lock"
|
|
207
|
-
]
|
|
208
|
-
}
|
|
209
|
-
]
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
"type": "fieldset",
|
|
213
|
-
"title": "Advanced",
|
|
112
|
+
"title": "Advanced Settings (Optional)",
|
|
113
|
+
"description": "Don't change these, unless you understand what you're doing.",
|
|
214
114
|
"expandable": true,
|
|
215
115
|
"items": [
|
|
216
116
|
"waitTimeUpdate"
|
package/dist/api/ttlockApi.d.ts
CHANGED
|
@@ -1,28 +1,49 @@
|
|
|
1
1
|
import type { Logging } from 'homebridge';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { inspect } from 'node:util';
|
|
3
|
+
import { ApiCallPriority, UsageTracker } from './usageTracker.js';
|
|
4
|
+
import { FeatureInfo, PasscodeList, SysInfo, TTLockDevice } from '../devices/deviceTypes.js';
|
|
4
5
|
export declare enum TTLockApiErrorCategory {
|
|
5
6
|
AuthExpired = "AuthExpired",
|
|
6
7
|
AuthInvalid = "AuthInvalid",
|
|
7
8
|
BudgetExhausted = "BudgetExhausted",
|
|
8
9
|
ClientInvalidRequest = "ClientInvalidRequest",
|
|
10
|
+
DeadlineExpired = "DeadlineExpired",
|
|
11
|
+
GatewayOffline = "GatewayOffline",
|
|
9
12
|
InvalidResponse = "InvalidResponse",
|
|
10
13
|
NetworkTransient = "NetworkTransient",
|
|
11
14
|
RateLimited = "RateLimited",
|
|
12
15
|
ServerTransient = "ServerTransient",
|
|
13
16
|
Unknown = "Unknown"
|
|
14
17
|
}
|
|
18
|
+
export type NetworkFailure = 'notSent' | 'noAnswer' | 'tls';
|
|
15
19
|
export declare class TTLockApiError extends Error {
|
|
16
20
|
readonly category: TTLockApiErrorCategory;
|
|
17
21
|
readonly retryable: boolean;
|
|
18
22
|
readonly endpoint?: string | undefined;
|
|
19
23
|
readonly statusCode?: number | undefined;
|
|
20
24
|
readonly errcode?: number | undefined;
|
|
21
|
-
readonly cause?: unknown | undefined;
|
|
22
25
|
wasLogged: boolean;
|
|
23
|
-
|
|
26
|
+
gatewayTransient: boolean;
|
|
27
|
+
networkFailure?: NetworkFailure;
|
|
28
|
+
retryAfterMs?: number;
|
|
29
|
+
skipped: boolean;
|
|
30
|
+
readonly causeCode: string | undefined;
|
|
31
|
+
constructor(message: string, category: TTLockApiErrorCategory, retryable: boolean, endpoint?: string | undefined, statusCode?: number | undefined, errcode?: number | undefined, cause?: unknown);
|
|
24
32
|
get authRelated(): boolean;
|
|
33
|
+
[inspect.custom](): string;
|
|
25
34
|
}
|
|
35
|
+
export type RequestOptions = {
|
|
36
|
+
retry?: 'transient' | 'notSent' | 'none';
|
|
37
|
+
retryGatewayErrors?: boolean;
|
|
38
|
+
sendBy?: number | undefined;
|
|
39
|
+
finishBy?: number | undefined;
|
|
40
|
+
skipIfGatewayBusy?: boolean;
|
|
41
|
+
callerLogsFailure?: boolean;
|
|
42
|
+
priority?: ApiCallPriority;
|
|
43
|
+
};
|
|
44
|
+
export type LockCommandOptions = {
|
|
45
|
+
finishBy: number;
|
|
46
|
+
};
|
|
26
47
|
export type TTLockSetupLock = {
|
|
27
48
|
battery?: number | undefined;
|
|
28
49
|
id: string;
|
|
@@ -42,33 +63,66 @@ export declare class TTLockApi {
|
|
|
42
63
|
private authUsername;
|
|
43
64
|
private authPassword;
|
|
44
65
|
private readonly requestTimeoutMs;
|
|
66
|
+
private readonly gatewayRequestTimeoutMs;
|
|
45
67
|
private readonly maxRetries;
|
|
68
|
+
private readonly maxRetryDelayMs;
|
|
69
|
+
private readonly gatewayQueue;
|
|
70
|
+
private readonly gatewayGapMs;
|
|
71
|
+
private lastGatewayRequestEndAt;
|
|
72
|
+
private readonly recentPollsWithBattery;
|
|
73
|
+
private static readonly resendSafeGatewayEndpoints;
|
|
74
|
+
private static readonly viaGatewayEndpoints;
|
|
75
|
+
private static readonly authErrcodes;
|
|
76
|
+
private static readonly rateLimitErrcodes;
|
|
77
|
+
private stopped;
|
|
78
|
+
private readonly sleepWakers;
|
|
46
79
|
constructor(log: Logging, clientId: string, clientSecret: string, usageTracker?: UsageTracker);
|
|
80
|
+
stop(): void;
|
|
47
81
|
private encryptPassword;
|
|
48
82
|
authenticate(username: string, password: string): Promise<void>;
|
|
49
83
|
private authenticateWithPassword;
|
|
50
84
|
private refreshTokenIfNeededLocked;
|
|
51
85
|
private recoverAuthentication;
|
|
52
86
|
private makeAuthenticatedRequest;
|
|
87
|
+
private sendRequest;
|
|
88
|
+
private ensureTimeLeft;
|
|
89
|
+
private ensureNotStopped;
|
|
90
|
+
private acquireGatewayQueue;
|
|
91
|
+
private reserveApiCall;
|
|
92
|
+
private budgetExhaustedError;
|
|
93
|
+
private logRequestFailure;
|
|
53
94
|
private logApiError;
|
|
54
95
|
private isGatewayOfflineError;
|
|
55
96
|
private normalizeApiResponseError;
|
|
97
|
+
private gatewayOfflineError;
|
|
56
98
|
private normalizeError;
|
|
57
99
|
private looksAuthError;
|
|
58
100
|
private looksRateLimitError;
|
|
101
|
+
private parseRetryAfterMs;
|
|
102
|
+
private shouldRetry;
|
|
59
103
|
private getRetryDelayMs;
|
|
60
104
|
private sleep;
|
|
61
105
|
private isObject;
|
|
62
106
|
listLocksForSetup(): Promise<TTLockSetupLock[]>;
|
|
63
|
-
getDevices(): Promise<TTLockDevice[]>;
|
|
64
|
-
|
|
65
|
-
|
|
107
|
+
getDevices(skipStateFor?: ReadonlySet<string>, priority?: ApiCallPriority): Promise<TTLockDevice[]>;
|
|
108
|
+
private incompleteDevice;
|
|
109
|
+
private getPasscodesForDiscovery;
|
|
110
|
+
getDeviceDetails(lockId: string, readState?: boolean, priority?: ApiCallPriority): Promise<Partial<SysInfo>>;
|
|
111
|
+
private toHomeKitLockState;
|
|
112
|
+
private queryStateForDiscovery;
|
|
113
|
+
getSysInfo(lockId: string, shouldYield?: () => boolean): Promise<Partial<SysInfo>>;
|
|
114
|
+
private recordPollCalls;
|
|
115
|
+
private recordDiscoveryStateRead;
|
|
116
|
+
estimatePollCalls(lockIds: readonly string[]): number;
|
|
117
|
+
private toBatteryLevel;
|
|
66
118
|
getFeatureInfo(featureValue: string): Promise<FeatureInfo>;
|
|
67
|
-
lock(lockId: string): Promise<void>;
|
|
68
|
-
unlock(lockId: string): Promise<void>;
|
|
69
|
-
|
|
70
|
-
|
|
119
|
+
lock(lockId: string, options: LockCommandOptions): Promise<void>;
|
|
120
|
+
unlock(lockId: string, options: LockCommandOptions): Promise<void>;
|
|
121
|
+
private lockCommandOptions;
|
|
122
|
+
getPasscodes(lockId: string, options?: RequestOptions): Promise<PasscodeList>;
|
|
123
|
+
private toOptionalNumber;
|
|
124
|
+
addPasscode(lockId: string, passcode: string, sendBy?: number): Promise<{
|
|
71
125
|
keyboardPwdId: string;
|
|
72
126
|
}>;
|
|
73
|
-
deletePasscode(lockId: string, passcodeId: string): Promise<void>;
|
|
127
|
+
deletePasscode(lockId: string, passcodeId: string, sendBy?: number): Promise<void>;
|
|
74
128
|
}
|