@switchbot/homebridge-switchbot 5.2.1-beta.0 → 5.2.1-beta.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/.github/copilot-instructions.md +72 -169
- package/.github/workflows/ci.yml +4 -1
- package/CLAUDE.md +13 -0
- package/dist/SwitchBotHAPPlatform.js +1 -1
- package/dist/SwitchBotHAPPlatform.js.map +1 -1
- package/dist/devices/genericDevice.d.ts.map +1 -1
- package/dist/devices/genericDevice.js +28 -2
- package/dist/devices/genericDevice.js.map +1 -1
- package/docs/variables/default.html +1 -1
- package/package.json +1 -1
- package/src/SwitchBotHAPPlatform.ts +1 -1
- package/src/devices/genericDevice.ts +29 -2
- package/test/device/bot-hap.spec.ts +34 -0
- package/test/device/meter-battery.spec.ts +84 -0
- package/test/device/meter-co2.spec.ts +2 -2
- package/src/device-types.js.map +0 -1
- package/src/deviceCommandMapper.js +0 -319
- package/src/deviceCommandMapper.js.map +0 -1
- package/src/errors.js +0 -32
- package/src/errors.js.map +0 -1
- package/src/settings.js +0 -8
- package/src/settings.js.map +0 -1
- package/src/switchbotClient.js +0 -247
- package/src/switchbotClient.js.map +0 -1
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
// deviceCommandMapper.ts
|
|
2
|
-
// Maps HAP/Matter commands to node-switchbot device methods for all supported device types
|
|
3
|
-
export const deviceTypeCommandMap = {
|
|
4
|
-
// SwitchBot AI Hub (read-only/generic)
|
|
5
|
-
'ai hub': {},
|
|
6
|
-
// SwitchBot Cameras (read-only/generic)
|
|
7
|
-
'indoor cam': {},
|
|
8
|
-
'pan/tilt cam': {},
|
|
9
|
-
'pan/tilt cam 2k': {},
|
|
10
|
-
'pan/tilt cam plus 2k': {},
|
|
11
|
-
'pan/tilt cam plus 3k': {},
|
|
12
|
-
// SwitchBot Air Purifiers (read-only/generic)
|
|
13
|
-
'air purifier pm2.5': {},
|
|
14
|
-
'air purifier table pm2.5': {},
|
|
15
|
-
'air purifier voc': {},
|
|
16
|
-
'air purifier table voc': {},
|
|
17
|
-
// SwitchBot Home Climate Panel (read-only/generic)
|
|
18
|
-
'home climate panel': {},
|
|
19
|
-
// SwitchBot WoIOSensor (read-only/generic)
|
|
20
|
-
'woiosensor': {},
|
|
21
|
-
// SwitchBot Candle Warmer Lamp
|
|
22
|
-
'candle warmer lamp': {
|
|
23
|
-
turnOn: async (device) => device.turnOn(),
|
|
24
|
-
turnOff: async (device) => device.turnOff(),
|
|
25
|
-
},
|
|
26
|
-
// SwitchBot Hubs (read-only/generic)
|
|
27
|
-
'hub': {},
|
|
28
|
-
'hub 2': {},
|
|
29
|
-
'hub 3': {},
|
|
30
|
-
'hub mini': {},
|
|
31
|
-
'hub plus': {},
|
|
32
|
-
// SwitchBot Robot Vacuum Cleaner K20 Plus Pro
|
|
33
|
-
'robot vacuum cleaner k20 plus pro': {
|
|
34
|
-
start: async (device) => device.start(),
|
|
35
|
-
stop: async (device) => device.stop(),
|
|
36
|
-
pause: async (device) => device.pause(),
|
|
37
|
-
dock: async (device) => device.dock(),
|
|
38
|
-
resume: async (device) => device.resume(),
|
|
39
|
-
locate: async (device) => device.locate(),
|
|
40
|
-
},
|
|
41
|
-
// SwitchBot Robot Vacuum Cleaner S1
|
|
42
|
-
'robot vacuum cleaner s1': {
|
|
43
|
-
start: async (device) => device.start(),
|
|
44
|
-
stop: async (device) => device.stop(),
|
|
45
|
-
pause: async (device) => device.pause(),
|
|
46
|
-
dock: async (device) => device.dock(),
|
|
47
|
-
resume: async (device) => device.resume(),
|
|
48
|
-
locate: async (device) => device.locate(),
|
|
49
|
-
},
|
|
50
|
-
// SwitchBot Robot Vacuum Cleaner S1 Plus
|
|
51
|
-
'robot vacuum cleaner s1 plus': {
|
|
52
|
-
start: async (device) => device.start(),
|
|
53
|
-
stop: async (device) => device.stop(),
|
|
54
|
-
pause: async (device) => device.pause(),
|
|
55
|
-
dock: async (device) => device.dock(),
|
|
56
|
-
resume: async (device) => device.resume(),
|
|
57
|
-
locate: async (device) => device.locate(),
|
|
58
|
-
},
|
|
59
|
-
// SwitchBot Robot Vacuum Cleaner S10
|
|
60
|
-
'robot vacuum cleaner s10': {
|
|
61
|
-
start: async (device) => device.start(),
|
|
62
|
-
stop: async (device) => device.stop(),
|
|
63
|
-
pause: async (device) => device.pause(),
|
|
64
|
-
dock: async (device) => device.dock(),
|
|
65
|
-
resume: async (device) => device.resume(),
|
|
66
|
-
locate: async (device) => device.locate(),
|
|
67
|
-
},
|
|
68
|
-
// SwitchBot Robot Vacuum Cleaner S20
|
|
69
|
-
'robot vacuum cleaner s20': {
|
|
70
|
-
start: async (device) => device.start(),
|
|
71
|
-
stop: async (device) => device.stop(),
|
|
72
|
-
pause: async (device) => device.pause(),
|
|
73
|
-
dock: async (device) => device.dock(),
|
|
74
|
-
resume: async (device) => device.resume(),
|
|
75
|
-
locate: async (device) => device.locate(),
|
|
76
|
-
},
|
|
77
|
-
// SwitchBot Relay Switch 2PM
|
|
78
|
-
'relay switch 2pm': {
|
|
79
|
-
turnOn: async (device) => device.turnOn(),
|
|
80
|
-
turnOff: async (device) => device.turnOff(),
|
|
81
|
-
},
|
|
82
|
-
// SwitchBot K10+
|
|
83
|
-
'k10+': {
|
|
84
|
-
start: async (device) => device.start(),
|
|
85
|
-
stop: async (device) => device.stop(),
|
|
86
|
-
pause: async (device) => device.pause(),
|
|
87
|
-
dock: async (device) => device.dock(),
|
|
88
|
-
resume: async (device) => device.resume(),
|
|
89
|
-
locate: async (device) => device.locate(),
|
|
90
|
-
},
|
|
91
|
-
// SwitchBot K10+ Pro
|
|
92
|
-
'k10+ pro': {
|
|
93
|
-
start: async (device) => device.start(),
|
|
94
|
-
stop: async (device) => device.stop(),
|
|
95
|
-
pause: async (device) => device.pause(),
|
|
96
|
-
dock: async (device) => device.dock(),
|
|
97
|
-
resume: async (device) => device.resume(),
|
|
98
|
-
locate: async (device) => device.locate(),
|
|
99
|
-
},
|
|
100
|
-
// SwitchBot Robot Vacuum Cleaner K10+ Pro Combo
|
|
101
|
-
'robot vacuum cleaner k10+ pro combo': {
|
|
102
|
-
start: async (device) => device.start(),
|
|
103
|
-
stop: async (device) => device.stop(),
|
|
104
|
-
pause: async (device) => device.pause(),
|
|
105
|
-
dock: async (device) => device.dock(),
|
|
106
|
-
resume: async (device) => device.resume(),
|
|
107
|
-
locate: async (device) => device.locate(),
|
|
108
|
-
},
|
|
109
|
-
// SwitchBot Robot Vacuum Cleaner K11+
|
|
110
|
-
'robot vacuum cleaner k11+': {
|
|
111
|
-
start: async (device) => device.start(),
|
|
112
|
-
stop: async (device) => device.stop(),
|
|
113
|
-
pause: async (device) => device.pause(),
|
|
114
|
-
dock: async (device) => device.dock(),
|
|
115
|
-
resume: async (device) => device.resume(),
|
|
116
|
-
locate: async (device) => device.locate(),
|
|
117
|
-
},
|
|
118
|
-
// SwitchBot MeterPro(CO2) (read-only)
|
|
119
|
-
'meterpro(co2)': {},
|
|
120
|
-
// SwitchBot Water Detector (read-only)
|
|
121
|
-
'water detector': {},
|
|
122
|
-
// SwitchBot Garage Door Opener
|
|
123
|
-
'garage door opener': {
|
|
124
|
-
open: async (device) => device.open(),
|
|
125
|
-
close: async (device) => device.close(),
|
|
126
|
-
stop: async (device) => device.stop(),
|
|
127
|
-
},
|
|
128
|
-
// SwitchBot Relay Switch 1
|
|
129
|
-
'relay switch 1': {
|
|
130
|
-
turnOn: async (device) => device.turnOn(),
|
|
131
|
-
turnOff: async (device) => device.turnOff(),
|
|
132
|
-
},
|
|
133
|
-
// SwitchBot Relay Switch 1PM
|
|
134
|
-
'relay switch 1pm': {
|
|
135
|
-
turnOn: async (device) => device.turnOn(),
|
|
136
|
-
turnOff: async (device) => device.turnOff(),
|
|
137
|
-
},
|
|
138
|
-
// SwitchBot Smart Radiator Thermostat (read-only or not directly controllable)
|
|
139
|
-
'smart radiator thermostat': {},
|
|
140
|
-
// SwitchBot Humidifier2
|
|
141
|
-
'humidifier2': {
|
|
142
|
-
turnOn: async (device) => device.turnOn(),
|
|
143
|
-
turnOff: async (device) => device.turnOff(),
|
|
144
|
-
setMode: async (device, body) => device.setMode(body?.parameter),
|
|
145
|
-
setHumidity: async (device, body) => device.setHumidity(body?.parameter),
|
|
146
|
-
},
|
|
147
|
-
// SwitchBot MeterPlus (read-only)
|
|
148
|
-
'meterplus': {},
|
|
149
|
-
// SwitchBot Meter Pro (read-only)
|
|
150
|
-
'meter pro': {},
|
|
151
|
-
// SwitchBot MeterPro (read-only)
|
|
152
|
-
'meterpro': {},
|
|
153
|
-
// SwitchBot RGBICWW Floor Lamp
|
|
154
|
-
'rgbicww floor lamp': {
|
|
155
|
-
turnOn: async (device) => device.turnOn(),
|
|
156
|
-
turnOff: async (device) => device.turnOff(),
|
|
157
|
-
setBrightness: async (device, body) => device.setBrightness(body?.parameter),
|
|
158
|
-
setColor: async (device, body) => device.setColor(body?.parameter),
|
|
159
|
-
},
|
|
160
|
-
// SwitchBot RGBICWW Strip Light
|
|
161
|
-
'rgbicww strip light': {
|
|
162
|
-
turnOn: async (device) => device.turnOn(),
|
|
163
|
-
turnOff: async (device) => device.turnOff(),
|
|
164
|
-
setBrightness: async (device, body) => device.setBrightness(body?.parameter),
|
|
165
|
-
setColor: async (device, body) => device.setColor(body?.parameter),
|
|
166
|
-
},
|
|
167
|
-
// SwitchBot Circulator Fan
|
|
168
|
-
'circulator fan': {
|
|
169
|
-
turnOn: async (device) => device.turnOn(),
|
|
170
|
-
turnOff: async (device) => device.turnOff(),
|
|
171
|
-
setSpeed: async (device, body) => device.setSpeed(body?.parameter),
|
|
172
|
-
swing: async (device) => device.swing(),
|
|
173
|
-
},
|
|
174
|
-
// SwitchBot Battery Circulator Fan
|
|
175
|
-
'battery circulator fan': {
|
|
176
|
-
turnOn: async (device) => device.turnOn(),
|
|
177
|
-
turnOff: async (device) => device.turnOff(),
|
|
178
|
-
setSpeed: async (device, body) => device.setSpeed(body?.parameter),
|
|
179
|
-
swing: async (device) => device.swing(),
|
|
180
|
-
},
|
|
181
|
-
// SwitchBot Standing Circulator Fan
|
|
182
|
-
'standing circulator fan': {
|
|
183
|
-
turnOn: async (device) => device.turnOn(),
|
|
184
|
-
turnOff: async (device) => device.turnOff(),
|
|
185
|
-
setSpeed: async (device, body) => device.setSpeed(body?.parameter),
|
|
186
|
-
swing: async (device) => device.swing(),
|
|
187
|
-
},
|
|
188
|
-
// SwitchBot Bot
|
|
189
|
-
'bot': {
|
|
190
|
-
turnOn: async (device) => device.turnOn(),
|
|
191
|
-
turnOff: async (device) => device.turnOff(),
|
|
192
|
-
press: async (device) => device.press(),
|
|
193
|
-
},
|
|
194
|
-
// SwitchBot Curtain
|
|
195
|
-
'curtain': {
|
|
196
|
-
open: async (device) => device.open(),
|
|
197
|
-
close: async (device) => device.close(),
|
|
198
|
-
pause: async (device) => device.pause(),
|
|
199
|
-
setPosition: async (device, body) => device.setPosition(body?.parameter),
|
|
200
|
-
},
|
|
201
|
-
// SwitchBot Blind Tilt
|
|
202
|
-
'blind tilt': {
|
|
203
|
-
open: async (device) => device.open(),
|
|
204
|
-
close: async (device) => device.close(),
|
|
205
|
-
pause: async (device) => device.pause(),
|
|
206
|
-
setPosition: async (device, body) => device.setPosition(body?.parameter),
|
|
207
|
-
},
|
|
208
|
-
// SwitchBot Roller Shade
|
|
209
|
-
'roller shade': {
|
|
210
|
-
open: async (device) => device.open(),
|
|
211
|
-
close: async (device) => device.close(),
|
|
212
|
-
pause: async (device) => device.pause(),
|
|
213
|
-
setPosition: async (device, body) => device.setPosition(body?.parameter),
|
|
214
|
-
},
|
|
215
|
-
// SwitchBot Plug
|
|
216
|
-
'plug': {
|
|
217
|
-
turnOn: async (device) => device.turnOn(),
|
|
218
|
-
turnOff: async (device) => device.turnOff(),
|
|
219
|
-
},
|
|
220
|
-
// SwitchBot Strip Light 3
|
|
221
|
-
'strip light 3': {
|
|
222
|
-
turnOn: async (device) => device.turnOn(),
|
|
223
|
-
turnOff: async (device) => device.turnOff(),
|
|
224
|
-
setBrightness: async (device, body) => device.setBrightness(body?.parameter),
|
|
225
|
-
setColor: async (device, body) => device.setColor(body?.parameter),
|
|
226
|
-
},
|
|
227
|
-
// SwitchBot Floor Lamp
|
|
228
|
-
'floor lamp': {
|
|
229
|
-
turnOn: async (device) => device.turnOn(),
|
|
230
|
-
turnOff: async (device) => device.turnOff(),
|
|
231
|
-
setBrightness: async (device, body) => device.setBrightness(body?.parameter),
|
|
232
|
-
setColor: async (device, body) => device.setColor(body?.parameter),
|
|
233
|
-
},
|
|
234
|
-
// SwitchBot RGBIC Neon Rope Light
|
|
235
|
-
'rgbic neon rope light': {
|
|
236
|
-
turnOn: async (device) => device.turnOn(),
|
|
237
|
-
turnOff: async (device) => device.turnOff(),
|
|
238
|
-
setBrightness: async (device, body) => device.setBrightness(body?.parameter),
|
|
239
|
-
setColor: async (device, body) => device.setColor(body?.parameter),
|
|
240
|
-
},
|
|
241
|
-
// SwitchBot RGBIC Neon Wire Rope Light
|
|
242
|
-
'rgbic neon wire rope light': {
|
|
243
|
-
turnOn: async (device) => device.turnOn(),
|
|
244
|
-
turnOff: async (device) => device.turnOff(),
|
|
245
|
-
setBrightness: async (device, body) => device.setBrightness(body?.parameter),
|
|
246
|
-
setColor: async (device, body) => device.setColor(body?.parameter),
|
|
247
|
-
},
|
|
248
|
-
// SwitchBot Plug Mini
|
|
249
|
-
'plug mini': {
|
|
250
|
-
turnOn: async (device) => device.turnOn(),
|
|
251
|
-
turnOff: async (device) => device.turnOff(),
|
|
252
|
-
},
|
|
253
|
-
// SwitchBot Color Bulb
|
|
254
|
-
'color bulb': {
|
|
255
|
-
turnOn: async (device) => device.turnOn(),
|
|
256
|
-
turnOff: async (device) => device.turnOff(),
|
|
257
|
-
setBrightness: async (device, body) => device.setBrightness(body?.parameter),
|
|
258
|
-
setColor: async (device, body) => device.setColor(body?.parameter),
|
|
259
|
-
},
|
|
260
|
-
// SwitchBot Light Strip
|
|
261
|
-
'light strip': {
|
|
262
|
-
turnOn: async (device) => device.turnOn(),
|
|
263
|
-
turnOff: async (device) => device.turnOff(),
|
|
264
|
-
setBrightness: async (device, body) => device.setBrightness(body?.parameter),
|
|
265
|
-
setColor: async (device, body) => device.setColor(body?.parameter),
|
|
266
|
-
},
|
|
267
|
-
// SwitchBot Fan
|
|
268
|
-
'fan': {
|
|
269
|
-
turnOn: async (device) => device.turnOn(),
|
|
270
|
-
turnOff: async (device) => device.turnOff(),
|
|
271
|
-
setSpeed: async (device, body) => device.setSpeed(body?.parameter),
|
|
272
|
-
swing: async (device) => device.swing(),
|
|
273
|
-
},
|
|
274
|
-
// SwitchBot Lock
|
|
275
|
-
'lock': {
|
|
276
|
-
lock: async (device) => device.lock(),
|
|
277
|
-
unlock: async (device) => device.unlock(),
|
|
278
|
-
},
|
|
279
|
-
// SwitchBot Curtain 3
|
|
280
|
-
'curtain3': {
|
|
281
|
-
open: async (device) => device.open(),
|
|
282
|
-
close: async (device) => device.close(),
|
|
283
|
-
pause: async (device) => device.pause(),
|
|
284
|
-
setPosition: async (device, body) => device.setPosition(body?.parameter),
|
|
285
|
-
},
|
|
286
|
-
// SwitchBot Meter
|
|
287
|
-
'meter': {}, // Read-only
|
|
288
|
-
// SwitchBot Motion Sensor
|
|
289
|
-
'motion sensor': {}, // Read-only
|
|
290
|
-
// SwitchBot Contact Sensor
|
|
291
|
-
'contact sensor': {}, // Read-only
|
|
292
|
-
// SwitchBot Humidifier
|
|
293
|
-
'humidifier': {
|
|
294
|
-
turnOn: async (device) => device.turnOn(),
|
|
295
|
-
turnOff: async (device) => device.turnOff(),
|
|
296
|
-
setMode: async (device, body) => device.setMode(body?.parameter),
|
|
297
|
-
setHumidity: async (device, body) => device.setHumidity(body?.parameter),
|
|
298
|
-
},
|
|
299
|
-
// SwitchBot Vacuum
|
|
300
|
-
'vacuum': {
|
|
301
|
-
start: async (device) => device.start(),
|
|
302
|
-
stop: async (device) => device.stop(),
|
|
303
|
-
pause: async (device) => device.pause(),
|
|
304
|
-
dock: async (device) => device.dock(),
|
|
305
|
-
resume: async (device) => device.resume(),
|
|
306
|
-
locate: async (device) => device.locate(),
|
|
307
|
-
},
|
|
308
|
-
// Add more device types and commands as needed
|
|
309
|
-
};
|
|
310
|
-
// Helper to get the handler for a device type and command
|
|
311
|
-
export function getDeviceCommandHandler(deviceType, command) {
|
|
312
|
-
const typeKey = deviceType.toLowerCase();
|
|
313
|
-
const typeMap = deviceTypeCommandMap[typeKey];
|
|
314
|
-
if (!typeMap) {
|
|
315
|
-
return undefined;
|
|
316
|
-
}
|
|
317
|
-
return typeMap[command];
|
|
318
|
-
}
|
|
319
|
-
//# sourceMappingURL=deviceCommandMapper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deviceCommandMapper.js","sourceRoot":"","sources":["deviceCommandMapper.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,2FAA2F;AAe3F,MAAM,CAAC,MAAM,oBAAoB,GAAyB;IACxD,uCAAuC;IACvC,QAAQ,EAAE,EAAE;IACZ,wCAAwC;IACxC,YAAY,EAAE,EAAE;IAChB,cAAc,EAAE,EAAE;IAClB,iBAAiB,EAAE,EAAE;IACrB,sBAAsB,EAAE,EAAE;IAC1B,sBAAsB,EAAE,EAAE;IAC1B,8CAA8C;IAC9C,oBAAoB,EAAE,EAAE;IACxB,0BAA0B,EAAE,EAAE;IAC9B,kBAAkB,EAAE,EAAE;IACtB,wBAAwB,EAAE,EAAE;IAC5B,mDAAmD;IACnD,oBAAoB,EAAE,EAAE;IACxB,2CAA2C;IAC3C,YAAY,EAAE,EAAE;IAChB,+BAA+B;IAC/B,oBAAoB,EAAE;QACpB,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE;QACvC,OAAO,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE;KAC1C;IACD,qCAAqC;IACrC,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,EAAE;IACX,OAAO,EAAE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,oBAAoB,CAAC,OAAO,CAAC,CAAA;IAC7C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,SAAS,CAAA;IAClB,CAAC;IACD,OAAO,OAAO,CAAC,OAAO,CAAC,CAAA;AACzB,CAAC"}
|
package/src/errors.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// Error classes for node-switchbot v4 compatibility
|
|
2
|
-
// Always use local fallback classes for compatibility; upstream error classes are not guaranteed to exist
|
|
3
|
-
const SwitchbotOperationError = class extends Error {
|
|
4
|
-
code;
|
|
5
|
-
cause;
|
|
6
|
-
constructor(message, code, cause) {
|
|
7
|
-
super(message);
|
|
8
|
-
this.name = 'SwitchbotOperationError';
|
|
9
|
-
this.code = code;
|
|
10
|
-
this.cause = cause;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
const SwitchbotAuthenticationError = class extends Error {
|
|
14
|
-
code;
|
|
15
|
-
cause;
|
|
16
|
-
constructor(message, code, cause) {
|
|
17
|
-
super(message);
|
|
18
|
-
this.name = 'SwitchbotAuthenticationError';
|
|
19
|
-
this.code = code;
|
|
20
|
-
this.cause = cause;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
const CharacteristicMissingError = class extends Error {
|
|
24
|
-
characteristic;
|
|
25
|
-
constructor(message, characteristic) {
|
|
26
|
-
super(message);
|
|
27
|
-
this.name = 'CharacteristicMissingError';
|
|
28
|
-
this.characteristic = characteristic;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
export { CharacteristicMissingError, SwitchbotAuthenticationError, SwitchbotOperationError };
|
|
32
|
-
//# sourceMappingURL=errors.js.map
|
package/src/errors.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["errors.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,0GAA0G;AAE1G,MAAM,uBAAuB,GAAG,KAAM,SAAQ,KAAK;IACjD,IAAI,CAAS;IACb,KAAK,CAAQ;IACb,YAAY,OAAe,EAAE,IAAa,EAAE,KAAa;QACvD,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAA;QACrC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;CACF,CAAA;AAED,MAAM,4BAA4B,GAAG,KAAM,SAAQ,KAAK;IACtD,IAAI,CAAS;IACb,KAAK,CAAQ;IACb,YAAY,OAAe,EAAE,IAAa,EAAE,KAAa;QACvD,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,8BAA8B,CAAA;QAC1C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;CACF,CAAA;AAED,MAAM,0BAA0B,GAAG,KAAM,SAAQ,KAAK;IACpD,cAAc,CAAQ;IACtB,YAAY,OAAe,EAAE,cAAsB;QACjD,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAA;QACxC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;IACtC,CAAC;CACF,CAAA;AAED,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,CAAA"}
|
package/src/settings.js
DELETED
package/src/settings.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["settings.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,iCAAiC,CAAA;AAC5D,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAA;AAYxC,MAAM,CAAC,MAAM,cAAc,GAAmC;IAC5D,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,IAAI;IAClB,SAAS,EAAE,IAAI;CAChB,CAAA"}
|
package/src/switchbotClient.js
DELETED
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
import { getDeviceCommandHandler } from './deviceCommandMapper.js';
|
|
2
|
-
import { CharacteristicMissingError, SwitchbotAuthenticationError, SwitchbotOperationError } from './errors.js';
|
|
3
|
-
/**
|
|
4
|
-
* Thin wrapper around node-switchbot v4.0.0+
|
|
5
|
-
* Leverages upstream resilience features (retry, circuit breaker, connection intelligence)
|
|
6
|
-
* while maintaining plugin-specific features like write debouncing and OpenAPI fallback.
|
|
7
|
-
*/
|
|
8
|
-
export class SwitchBotClient {
|
|
9
|
-
cfg;
|
|
10
|
-
client = null;
|
|
11
|
-
writeDebounceMs = 100;
|
|
12
|
-
discoveryCacheTtlMs = 30_000;
|
|
13
|
-
lastDiscoveryAt = 0;
|
|
14
|
-
logger;
|
|
15
|
-
pendingWrites = new Map();
|
|
16
|
-
constructor(cfg) {
|
|
17
|
-
this.cfg = cfg;
|
|
18
|
-
this.logger = cfg?.logger;
|
|
19
|
-
if (!this.logger) {
|
|
20
|
-
throw new Error('SwitchBotClient requires a logger (Homebridge logger) in config');
|
|
21
|
-
}
|
|
22
|
-
if (typeof cfg?.writeDebounceMs === 'number') {
|
|
23
|
-
this.writeDebounceMs = cfg.writeDebounceMs;
|
|
24
|
-
}
|
|
25
|
-
if (typeof cfg?.discoveryCacheTtlMs === 'number') {
|
|
26
|
-
this.discoveryCacheTtlMs = Math.max(0, cfg.discoveryCacheTtlMs);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
async init() {
|
|
30
|
-
if (this.client) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
try {
|
|
34
|
-
// Dynamic import of node-switchbot v4 with native resilience features
|
|
35
|
-
const { SwitchBot } = await import('node-switchbot');
|
|
36
|
-
const rawNodeClientConfig = typeof this.cfg?.nodeClientConfig === 'object' ? this.cfg.nodeClientConfig : {};
|
|
37
|
-
const scanTimeout = this.resolveScanTimeoutMs(rawNodeClientConfig);
|
|
38
|
-
this.client = new SwitchBot({
|
|
39
|
-
token: this.cfg.openApiToken,
|
|
40
|
-
secret: this.cfg.openApiSecret,
|
|
41
|
-
// Enable built-in resilience features from node-switchbot v4.
|
|
42
|
-
enableFallback: true, // Auto-fallback from BLE to API
|
|
43
|
-
enableRetry: true, // Retry with exponential backoff
|
|
44
|
-
enableCircuitBreaker: true, // Circuit breaker per connection type
|
|
45
|
-
enableConnectionIntelligence: true, // Connection tracking and route preference
|
|
46
|
-
enableBLE: this.cfg.enableBLE !== false, // Use config value, default true
|
|
47
|
-
scanTimeout,
|
|
48
|
-
...rawNodeClientConfig,
|
|
49
|
-
});
|
|
50
|
-
this.lastDiscoveryAt = 0;
|
|
51
|
-
this.logger?.info?.('SwitchBot client initialized with native resilience features');
|
|
52
|
-
}
|
|
53
|
-
catch (e) {
|
|
54
|
-
this.logger?.warn?.('Failed to load node-switchbot; will use OpenAPI fallback:', e);
|
|
55
|
-
this.client = null;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
async getDevice(id) {
|
|
59
|
-
if (this.client) {
|
|
60
|
-
try {
|
|
61
|
-
const fromManager = this.getManagedDevice(id);
|
|
62
|
-
if (fromManager) {
|
|
63
|
-
return fromManager;
|
|
64
|
-
}
|
|
65
|
-
const devices = await this.ensureDiscovered(false);
|
|
66
|
-
const fromDiscovery = devices.find((d) => d.id === id);
|
|
67
|
-
if (fromDiscovery) {
|
|
68
|
-
return fromDiscovery;
|
|
69
|
-
}
|
|
70
|
-
const refreshDevices = await this.ensureDiscovered(true);
|
|
71
|
-
return refreshDevices.find((d) => d.id === id);
|
|
72
|
-
}
|
|
73
|
-
catch (e) {
|
|
74
|
-
if (e instanceof SwitchbotAuthenticationError) {
|
|
75
|
-
this.logger?.error?.(`Authentication error for getDevice(${id}):`, e.message);
|
|
76
|
-
throw e;
|
|
77
|
-
}
|
|
78
|
-
else if (e instanceof SwitchbotOperationError) {
|
|
79
|
-
this.logger?.warn?.(`Operation error for getDevice(${id}):`, e.message, e.code);
|
|
80
|
-
throw e;
|
|
81
|
-
}
|
|
82
|
-
else if (e instanceof CharacteristicMissingError) {
|
|
83
|
-
this.logger?.warn?.(`Characteristic missing for getDevice(${id}):`, e.characteristic);
|
|
84
|
-
throw e;
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
this.logger?.warn?.(`Client getDevice failed for ${id}:`, e);
|
|
88
|
-
throw e;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
throw new SwitchbotOperationError('No SwitchBot client available', 'no_client');
|
|
93
|
-
}
|
|
94
|
-
async getDevices() {
|
|
95
|
-
if (this.client) {
|
|
96
|
-
try {
|
|
97
|
-
const fromManager = this.getManagedDevices();
|
|
98
|
-
if (fromManager.length > 0) {
|
|
99
|
-
return fromManager;
|
|
100
|
-
}
|
|
101
|
-
return await this.ensureDiscovered(false);
|
|
102
|
-
}
|
|
103
|
-
catch (e) {
|
|
104
|
-
this.logger?.warn?.('Client getDevices failed:', e);
|
|
105
|
-
throw e;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
throw new SwitchbotOperationError('No SwitchBot client available', 'no_client');
|
|
109
|
-
}
|
|
110
|
-
async setDeviceState(id, body) {
|
|
111
|
-
// Plugin-level debounce: coalesce rapid writes per device
|
|
112
|
-
if (!this.writeDebounceMs || this.writeDebounceMs <= 0) {
|
|
113
|
-
return this._doSetDeviceState(id, body);
|
|
114
|
-
}
|
|
115
|
-
return new Promise((resolve, reject) => {
|
|
116
|
-
const existing = this.pendingWrites.get(id);
|
|
117
|
-
if (existing) {
|
|
118
|
-
existing.body = body;
|
|
119
|
-
existing.resolvers.push({ resolve, reject });
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
const resolvers = [{ resolve, reject }];
|
|
123
|
-
const timer = setTimeout(async () => {
|
|
124
|
-
const entry = this.pendingWrites.get(id);
|
|
125
|
-
if (!entry) {
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
this.pendingWrites.delete(id);
|
|
129
|
-
try {
|
|
130
|
-
const out = await this._doSetDeviceState(id, entry.body);
|
|
131
|
-
for (const r of entry.resolvers)
|
|
132
|
-
r.resolve(out);
|
|
133
|
-
}
|
|
134
|
-
catch (e) {
|
|
135
|
-
if (e instanceof SwitchbotAuthenticationError) {
|
|
136
|
-
this.logger?.error?.(`Authentication error for setDeviceState(${id}):`, e.message);
|
|
137
|
-
}
|
|
138
|
-
else if (e instanceof SwitchbotOperationError) {
|
|
139
|
-
this.logger?.warn?.(`Operation error for setDeviceState(${id}):`, e.message, e.code);
|
|
140
|
-
}
|
|
141
|
-
else if (e instanceof CharacteristicMissingError) {
|
|
142
|
-
this.logger?.warn?.(`Characteristic missing for setDeviceState(${id}):`, e.characteristic);
|
|
143
|
-
}
|
|
144
|
-
for (const r of entry.resolvers)
|
|
145
|
-
r.reject(e);
|
|
146
|
-
}
|
|
147
|
-
}, this.writeDebounceMs);
|
|
148
|
-
this.pendingWrites.set(id, { timer, body, resolvers });
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
async _doSetDeviceState(id, body) {
|
|
152
|
-
if (!this.client) {
|
|
153
|
-
throw new SwitchbotOperationError('No SwitchBot client available for setDeviceState', 'no_client');
|
|
154
|
-
}
|
|
155
|
-
try {
|
|
156
|
-
const device = await this.getDevice(id);
|
|
157
|
-
if (!device) {
|
|
158
|
-
throw new SwitchbotOperationError(`Device ${id} not found`, 'device_not_found');
|
|
159
|
-
}
|
|
160
|
-
const deviceType = (device.deviceType ?? '').toLowerCase();
|
|
161
|
-
const command = body?.command;
|
|
162
|
-
if (!command) {
|
|
163
|
-
throw new SwitchbotOperationError('No command specified in body', 'no_command');
|
|
164
|
-
}
|
|
165
|
-
const handler = getDeviceCommandHandler(deviceType, command);
|
|
166
|
-
if (!handler) {
|
|
167
|
-
throw new SwitchbotOperationError(`Unsupported command '${command}' for device type '${deviceType}'`, 'unsupported_command');
|
|
168
|
-
}
|
|
169
|
-
this.logger?.debug?.(`[${id}] Calling mapped command '${command}' for device type '${deviceType}'`);
|
|
170
|
-
return await handler(device, body);
|
|
171
|
-
}
|
|
172
|
-
catch (e) {
|
|
173
|
-
if (e instanceof SwitchbotAuthenticationError) {
|
|
174
|
-
this.logger?.error?.(`Authentication error for setDeviceState(${id}):`, e.message);
|
|
175
|
-
throw e;
|
|
176
|
-
}
|
|
177
|
-
else if (e instanceof SwitchbotOperationError) {
|
|
178
|
-
this.logger?.warn?.(`Operation error for setDeviceState(${id}):`, e.message, e.code);
|
|
179
|
-
throw e;
|
|
180
|
-
}
|
|
181
|
-
else if (e instanceof CharacteristicMissingError) {
|
|
182
|
-
this.logger?.warn?.(`Characteristic missing for setDeviceState(${id}):`, e.characteristic);
|
|
183
|
-
throw e;
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
this.logger?.warn?.(`Device command failed for ${id}:`, e);
|
|
187
|
-
throw e;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
async destroy() {
|
|
192
|
-
for (const [, pending] of this.pendingWrites) {
|
|
193
|
-
clearTimeout(pending.timer);
|
|
194
|
-
const err = new SwitchbotOperationError('Client destroyed before pending write was sent', 'client_destroyed');
|
|
195
|
-
for (const r of pending.resolvers) {
|
|
196
|
-
r.reject(err);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
this.pendingWrites.clear();
|
|
200
|
-
if (this.client?.cleanup) {
|
|
201
|
-
await this.client.cleanup();
|
|
202
|
-
}
|
|
203
|
-
this.client = null;
|
|
204
|
-
this.lastDiscoveryAt = 0;
|
|
205
|
-
}
|
|
206
|
-
resolveScanTimeoutMs(rawNodeClientConfig) {
|
|
207
|
-
if (typeof rawNodeClientConfig.scanTimeout === 'number' && Number.isFinite(rawNodeClientConfig.scanTimeout)) {
|
|
208
|
-
return Math.max(500, rawNodeClientConfig.scanTimeout);
|
|
209
|
-
}
|
|
210
|
-
if (typeof rawNodeClientConfig.scanDuration === 'number' && Number.isFinite(rawNodeClientConfig.scanDuration)) {
|
|
211
|
-
return Math.max(500, rawNodeClientConfig.scanDuration);
|
|
212
|
-
}
|
|
213
|
-
if (typeof this.cfg?.bleScanDurationSeconds === 'number') {
|
|
214
|
-
return Math.max(500, this.cfg.bleScanDurationSeconds * 1000);
|
|
215
|
-
}
|
|
216
|
-
return 5000;
|
|
217
|
-
}
|
|
218
|
-
getManagedDevice(id) {
|
|
219
|
-
const manager = this.client?.devices;
|
|
220
|
-
if (manager?.get) {
|
|
221
|
-
return manager.get(id);
|
|
222
|
-
}
|
|
223
|
-
return undefined;
|
|
224
|
-
}
|
|
225
|
-
getManagedDevices() {
|
|
226
|
-
const manager = this.client?.devices;
|
|
227
|
-
if (manager?.list) {
|
|
228
|
-
const list = manager.list();
|
|
229
|
-
return Array.isArray(list) ? list : [];
|
|
230
|
-
}
|
|
231
|
-
return [];
|
|
232
|
-
}
|
|
233
|
-
async ensureDiscovered(force) {
|
|
234
|
-
if (!this.client) {
|
|
235
|
-
throw new SwitchbotOperationError('No SwitchBot client available', 'no_client');
|
|
236
|
-
}
|
|
237
|
-
const fromManager = this.getManagedDevices();
|
|
238
|
-
const cacheValid = this.discoveryCacheTtlMs > 0 && (Date.now() - this.lastDiscoveryAt) < this.discoveryCacheTtlMs;
|
|
239
|
-
if (!force && cacheValid && fromManager.length > 0) {
|
|
240
|
-
return fromManager;
|
|
241
|
-
}
|
|
242
|
-
const discovered = await this.client.discover();
|
|
243
|
-
this.lastDiscoveryAt = Date.now();
|
|
244
|
-
return discovered;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
//# sourceMappingURL=switchbotClient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"switchbotClient.js","sourceRoot":"","sources":["switchbotClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;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