@switchbot/homebridge-switchbot 5.0.0-beta.154 → 5.0.0-beta.155
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/workflows/release.yml +63 -15
- package/.github/workflows/stale.yml +2 -4
- package/CHANGELOG.md +21 -29
- package/MIGRATION.md +6 -6
- package/README.md +5 -3
- package/dist/device-types.js +7 -7
- package/dist/device-types.js.map +1 -1
- package/dist/deviceFactory.d.ts +1 -1
- package/dist/deviceFactory.d.ts.map +1 -1
- package/dist/deviceFactory.js +20 -20
- package/dist/deviceFactory.js.map +1 -1
- package/dist/homebridge-ui/device-types.js +246 -0
- package/dist/homebridge-ui/device-types.js.map +1 -0
- package/dist/homebridge-ui/deviceCommandMapper.js +319 -0
- package/dist/homebridge-ui/deviceCommandMapper.js.map +1 -0
- package/dist/homebridge-ui/endpoints/discovery.d.ts.map +1 -1
- package/dist/homebridge-ui/endpoints/discovery.js +5 -1
- package/dist/homebridge-ui/endpoints/discovery.js.map +1 -1
- package/dist/homebridge-ui/errors.js +32 -0
- package/dist/homebridge-ui/errors.js.map +1 -0
- package/dist/homebridge-ui/homebridge-ui/endpoints/config.js +90 -0
- package/dist/homebridge-ui/homebridge-ui/endpoints/config.js.map +1 -0
- package/dist/homebridge-ui/homebridge-ui/endpoints/devices.js +144 -0
- package/dist/homebridge-ui/homebridge-ui/endpoints/devices.js.map +1 -0
- package/dist/homebridge-ui/homebridge-ui/endpoints/discovery.js +219 -0
- package/dist/homebridge-ui/homebridge-ui/endpoints/discovery.js.map +1 -0
- package/dist/homebridge-ui/homebridge-ui/server.js +11 -0
- package/dist/homebridge-ui/homebridge-ui/server.js.map +1 -0
- package/dist/homebridge-ui/homebridge-ui/utils/config-parser.js +108 -0
- package/dist/homebridge-ui/homebridge-ui/utils/config-parser.js.map +1 -0
- package/dist/homebridge-ui/homebridge-ui/utils/device-migration.js +111 -0
- package/dist/homebridge-ui/homebridge-ui/utils/device-migration.js.map +1 -0
- package/dist/homebridge-ui/homebridge-ui/utils/logger.js +17 -0
- package/dist/homebridge-ui/homebridge-ui/utils/logger.js.map +1 -0
- package/dist/homebridge-ui/public/js/app.js +5 -9
- package/dist/homebridge-ui/public/js/app.js.map +2 -2
- package/dist/homebridge-ui/settings.js +8 -0
- package/dist/homebridge-ui/settings.js.map +1 -0
- package/dist/homebridge-ui/switchbotClient.js +247 -0
- package/dist/homebridge-ui/switchbotClient.js.map +1 -0
- package/dist/switchbotClient.d.ts +7 -1
- package/dist/switchbotClient.d.ts.map +1 -1
- package/dist/switchbotClient.js +82 -10
- package/dist/switchbotClient.js.map +1 -1
- package/docs/assets/main.js +1 -1
- package/docs/index.html +10 -4
- package/docs/variables/default.html +1 -1
- package/eslint.config.js +9 -10
- package/package.json +25 -23
- package/src/device-types.js +246 -0
- package/src/device-types.js.map +1 -0
- package/src/device-types.ts +7 -7
- package/src/deviceCommandMapper.js +319 -0
- package/src/deviceCommandMapper.js.map +1 -0
- package/src/deviceFactory.ts +22 -21
- package/src/errors.js +32 -0
- package/src/errors.js.map +1 -0
- package/src/homebridge-ui/endpoints/discovery.ts +5 -1
- package/src/settings.js +8 -0
- package/src/settings.js.map +1 -0
- package/src/switchbotClient.js +247 -0
- package/src/switchbotClient.js.map +1 -0
- package/src/switchbotClient.ts +95 -10
- package/test/client/switchbotClient.spec.ts +42 -1
- package/test/e2e/run-e2e.spec.ts +1 -0
- package/tsconfig.ui.json +11 -0
- package/.github/workflows/beta-release.yml +0 -52
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
export const DEVICE_TYPES = {
|
|
2
|
+
'Window Coverings': ['Blind Tilt', 'Curtain', 'Curtain3', 'Roller Shade'],
|
|
3
|
+
'Locks & Access': [
|
|
4
|
+
'Keypad',
|
|
5
|
+
'Keypad Touch',
|
|
6
|
+
'Keypad Vision',
|
|
7
|
+
'Keypad Vision Pro',
|
|
8
|
+
'Lock Vision Pro',
|
|
9
|
+
'Lock Lite',
|
|
10
|
+
'Smart Lock',
|
|
11
|
+
'Smart Lock Pro',
|
|
12
|
+
'Smart Lock Ultra',
|
|
13
|
+
'Video Doorbell',
|
|
14
|
+
],
|
|
15
|
+
'Sensors': ['Contact Sensor', 'Motion Sensor', 'Presence Sensor', 'Water Detector'],
|
|
16
|
+
'Lighting': [
|
|
17
|
+
'Candle Warmer Lamp',
|
|
18
|
+
'Ceiling Light',
|
|
19
|
+
'Ceiling Light Pro',
|
|
20
|
+
'Color Bulb',
|
|
21
|
+
'Floor Lamp',
|
|
22
|
+
'RGBIC Neon Rope Light',
|
|
23
|
+
'RGBIC Neon Wire Rope Light',
|
|
24
|
+
'RGBICWW Floor Lamp',
|
|
25
|
+
'RGBICWW Strip Light',
|
|
26
|
+
'Strip Light',
|
|
27
|
+
'Strip Light 3',
|
|
28
|
+
],
|
|
29
|
+
'Climate Control': [
|
|
30
|
+
'Air Purifier PM2.5',
|
|
31
|
+
'Air Purifier Table PM2.5',
|
|
32
|
+
'Air Purifier VOC',
|
|
33
|
+
'Air Purifier Table VOC',
|
|
34
|
+
'Battery Circulator Fan',
|
|
35
|
+
'Circulator Fan',
|
|
36
|
+
'Humidifier',
|
|
37
|
+
'Humidifier2',
|
|
38
|
+
'Meter',
|
|
39
|
+
'MeterPlus',
|
|
40
|
+
'Meter Plus',
|
|
41
|
+
'MeterPro',
|
|
42
|
+
'Meter Pro',
|
|
43
|
+
'MeterPro(CO2)',
|
|
44
|
+
'Meter Pro (CO2)',
|
|
45
|
+
'Smart Radiator Thermostat',
|
|
46
|
+
'Standing Circulator Fan',
|
|
47
|
+
'WoIOSensor',
|
|
48
|
+
],
|
|
49
|
+
'Plugs & Switches': [
|
|
50
|
+
'Garage Door Opener',
|
|
51
|
+
'Plug',
|
|
52
|
+
'Plug Mini (EU)',
|
|
53
|
+
'Plug Mini (JP)',
|
|
54
|
+
'Plug Mini (US)',
|
|
55
|
+
'Relay Switch 1',
|
|
56
|
+
'Relay Switch 1PM',
|
|
57
|
+
'Relay Switch 2PM',
|
|
58
|
+
],
|
|
59
|
+
'Robot Vacuums': [
|
|
60
|
+
'K10+',
|
|
61
|
+
'K10+ Pro',
|
|
62
|
+
'Robot Vacuum Cleaner K10+ Pro Combo',
|
|
63
|
+
'Robot Vacuum Cleaner K11+',
|
|
64
|
+
'Robot Vacuum Cleaner K20 Plus Pro',
|
|
65
|
+
'Robot Vacuum Cleaner S1',
|
|
66
|
+
'Robot Vacuum Cleaner S1 Plus',
|
|
67
|
+
'Robot Vacuum Cleaner S10',
|
|
68
|
+
'Robot Vacuum Cleaner S20',
|
|
69
|
+
],
|
|
70
|
+
'Hubs': ['AI Hub', 'Hub', 'Hub 2', 'Hub 3', 'Hub Mini', 'Hub Plus'],
|
|
71
|
+
'Cameras': [
|
|
72
|
+
'Indoor Cam',
|
|
73
|
+
'Pan/Tilt Cam',
|
|
74
|
+
'Pan/Tilt Cam 2K',
|
|
75
|
+
'Pan/Tilt Cam Plus 2K',
|
|
76
|
+
'Pan/Tilt Cam Plus 3K',
|
|
77
|
+
],
|
|
78
|
+
'IR Devices': [
|
|
79
|
+
'Air Conditioner',
|
|
80
|
+
'Air Purifier',
|
|
81
|
+
'Camera',
|
|
82
|
+
'DVD',
|
|
83
|
+
'Fan',
|
|
84
|
+
'Light',
|
|
85
|
+
'Others',
|
|
86
|
+
'Projector',
|
|
87
|
+
'Set Top Box',
|
|
88
|
+
'Speaker',
|
|
89
|
+
'Streamer',
|
|
90
|
+
'TV',
|
|
91
|
+
'Vacuum Cleaner',
|
|
92
|
+
'Water Heater',
|
|
93
|
+
],
|
|
94
|
+
'Other Devices': ['AI Art Frame', 'Bot', 'Home Climate Panel', 'Remote', 'remote with screen'],
|
|
95
|
+
};
|
|
96
|
+
export const DEVICE_TYPE_NORMALIZATION_MAP = {
|
|
97
|
+
// --- node-switchbot v4 normalization additions ---
|
|
98
|
+
'hub mini': 'Hub Mini',
|
|
99
|
+
'hub 3': 'Hub 3',
|
|
100
|
+
'keypad': 'Keypad',
|
|
101
|
+
'plug mini': 'Plug Mini (US)', // fallback to US if region not specified
|
|
102
|
+
'art frame': 'AI Art Frame',
|
|
103
|
+
'rgbicww': 'RGBICWW Strip Light',
|
|
104
|
+
'lock vision': 'Lock Vision Pro', // alias for new lock vision
|
|
105
|
+
'lock pro': 'Smart Lock Pro',
|
|
106
|
+
'lock lite': 'Lock Lite',
|
|
107
|
+
'circulator fan': 'Circulator Fan',
|
|
108
|
+
'smart thermostat radiator': 'Smart Radiator Thermostat',
|
|
109
|
+
'climate panel': 'Home Climate Panel',
|
|
110
|
+
'evaporative humidifier': 'Humidifier',
|
|
111
|
+
// --- end node-switchbot v4 additions ---
|
|
112
|
+
// Only keep the last occurrence for each key, all values canonical
|
|
113
|
+
'air purifier pm2.5': 'Air Purifier PM2.5',
|
|
114
|
+
'pan/tilt cam plus 3k': 'Pan/Tilt Cam Plus 3K',
|
|
115
|
+
'remote with screen': 'Remote with Screen',
|
|
116
|
+
'ai hub': 'AI Hub',
|
|
117
|
+
'water detector': 'Water Detector',
|
|
118
|
+
'video doorbell': 'Video Doorbell',
|
|
119
|
+
'smart radiator thermostat': 'Smart Radiator Thermostat',
|
|
120
|
+
'woiosensor': 'WoIOSensor',
|
|
121
|
+
'garage door opener': 'Garage Door Opener',
|
|
122
|
+
'air purifier table pm2.5': 'Air Purifier Table PM2.5',
|
|
123
|
+
'air purifier voc': 'Air Purifier VOC',
|
|
124
|
+
'air purifier table voc': 'Air Purifier Table VOC',
|
|
125
|
+
'plug mini (eu)': 'Plug Mini (EU)',
|
|
126
|
+
// Only last occurrence for each key is kept above. Removed duplicates here.
|
|
127
|
+
// Climate control conversions
|
|
128
|
+
'humidifier2': 'Humidifier2',
|
|
129
|
+
'battery circulator fan': 'Battery Circulator Fan',
|
|
130
|
+
'standing circulator fan': 'Standing Circulator Fan',
|
|
131
|
+
// Lock/keypad conversions
|
|
132
|
+
'smart lock': 'Smart Lock',
|
|
133
|
+
'smart lock pro': 'Smart Lock Pro',
|
|
134
|
+
'smart lock ultra': 'Smart Lock Ultra',
|
|
135
|
+
'keypad touch': 'Keypad Touch',
|
|
136
|
+
'keypad vision': 'Keypad Vision',
|
|
137
|
+
'keypad vision pro': 'Keypad Vision Pro',
|
|
138
|
+
// Light conversions
|
|
139
|
+
'color bulb': 'Color Bulb',
|
|
140
|
+
'ceiling light': 'Ceiling Light',
|
|
141
|
+
'ceiling light pro': 'Ceiling Light Pro',
|
|
142
|
+
'candle warmer lamp': 'Candle Warmer Lamp',
|
|
143
|
+
'floor lamp': 'Floor Lamp',
|
|
144
|
+
'rgbic neon rope light': 'RGBIC Neon Rope Light',
|
|
145
|
+
'rgbic neon wire rope light': 'RGBIC Neon Wire Rope Light',
|
|
146
|
+
'rgbicww floor lamp': 'RGBICWW Floor Lamp',
|
|
147
|
+
'rgbicww strip light': 'RGBICWW Strip Light',
|
|
148
|
+
'strip light': 'Strip Light',
|
|
149
|
+
'strip light 3': 'Strip Light 3',
|
|
150
|
+
// Vacuum conversions
|
|
151
|
+
'robot vacuum cleaner s1': 'Robot Vacuum Cleaner S1',
|
|
152
|
+
'robot vacuum cleaner s1 plus': 'Robot Vacuum Cleaner S1 Plus',
|
|
153
|
+
'robot vacuum cleaner s10': 'Robot Vacuum Cleaner S10',
|
|
154
|
+
'robot vacuum cleaner s20': 'Robot Vacuum Cleaner S20',
|
|
155
|
+
'robot vacuum cleaner k10+ pro combo': 'Robot Vacuum Cleaner K10+ Pro Combo',
|
|
156
|
+
'robot vacuum cleaner k11+': 'Robot Vacuum Cleaner K11+',
|
|
157
|
+
'robot vacuum cleaner k20 plus pro': 'Robot Vacuum Cleaner K20 Plus Pro',
|
|
158
|
+
// Exact device type mappings (API format → canonical format)
|
|
159
|
+
'relay switch 1': 'Relay Switch 1',
|
|
160
|
+
'blind tilt': 'Blind Tilt',
|
|
161
|
+
'roller shade': 'Roller Shade',
|
|
162
|
+
'curtain3': 'Curtain3',
|
|
163
|
+
'hub 2': 'Hub 2',
|
|
164
|
+
'meterplus': 'MeterPlus',
|
|
165
|
+
'meterpro': 'MeterPro',
|
|
166
|
+
'meterpro(co2)': 'MeterPro(CO2)',
|
|
167
|
+
'walletfinder': 'WalletFinder',
|
|
168
|
+
'k10+': 'K10+',
|
|
169
|
+
'k10+ pro (wosweeperminipro)': 'K10+ Pro (wosweeperminipro)',
|
|
170
|
+
// Handle spaced variants from config files (normalize back to canonical type)
|
|
171
|
+
'meter pro': 'Meter Pro',
|
|
172
|
+
'meter pro (co2)': 'Meter Pro (CO2)',
|
|
173
|
+
'meter plus': 'Meter Plus',
|
|
174
|
+
'relay switch 1 pm': 'Relay Switch 1PM',
|
|
175
|
+
'relay switch 2 pm': 'Relay Switch 2PM',
|
|
176
|
+
'plug mini eu': 'Plug Mini (EU)',
|
|
177
|
+
'plug mini jp': 'Plug Mini (JP)',
|
|
178
|
+
'plug mini us': 'Plug Mini (US)',
|
|
179
|
+
// Migration mappings for invalid/legacy device types
|
|
180
|
+
'lock vision pro': 'Lock Vision Pro', // Valid alias; map to canonical
|
|
181
|
+
// 'lock vision': 'Keypad Vision', // Invalid type (removed, now alias above)
|
|
182
|
+
'lock touch': 'Keypad Touch', // Invalid type
|
|
183
|
+
// Additional normalization for new/unknown types from logs
|
|
184
|
+
'woplugus': 'Plug Mini (US)',
|
|
185
|
+
// Removed duplicate keys below, only last occurrence kept
|
|
186
|
+
// 'plug mini us': 'plug mini (us)', // duplicate, removed
|
|
187
|
+
// 'plug us': 'plug mini (us)', // duplicate, removed
|
|
188
|
+
// 'plug': 'plug', // duplicate, removed
|
|
189
|
+
// 'air purifier pm2.5': 'air purifier pm2.5', // duplicate, removed
|
|
190
|
+
// 'rgbic neon wire rope light': 'rgbic neon wire rope light', // duplicate, removed
|
|
191
|
+
// 'candle warmer lamp': 'candle warmer lamp', // duplicate, removed
|
|
192
|
+
// 'pan/tilt cam plus 3k': 'pan/tilt cam plus 3k', // duplicate, removed
|
|
193
|
+
// 'remote with screen': 'remote with screen', // duplicate, removed
|
|
194
|
+
// 'ai hub': 'ai hub', // duplicate, removed
|
|
195
|
+
// 'lock vision pro': 'lock vision pro', // duplicate, remove this line
|
|
196
|
+
// Add any other device types from logs as needed
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Get all valid device types as a flat set for validation
|
|
200
|
+
*/
|
|
201
|
+
export function getValidDeviceTypes() {
|
|
202
|
+
const validTypes = new Set();
|
|
203
|
+
for (const category of Object.values(DEVICE_TYPES)) {
|
|
204
|
+
for (const type of category) {
|
|
205
|
+
validTypes.add(type);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return validTypes;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Normalize and validate a device type, returning a valid type or null
|
|
212
|
+
* @param deviceType The device type to validate/normalize
|
|
213
|
+
* @returns Valid device type string or null if no valid mapping found
|
|
214
|
+
*/
|
|
215
|
+
export function normalizeDeviceType(deviceType) {
|
|
216
|
+
if (!deviceType || typeof deviceType !== 'string') {
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
219
|
+
const trimmed = deviceType.trim();
|
|
220
|
+
const lowercase = trimmed.toLowerCase();
|
|
221
|
+
// Check if already valid
|
|
222
|
+
const validTypes = getValidDeviceTypes();
|
|
223
|
+
if (validTypes.has(trimmed)) {
|
|
224
|
+
return trimmed;
|
|
225
|
+
}
|
|
226
|
+
// Check normalization map
|
|
227
|
+
const normalized = DEVICE_TYPE_NORMALIZATION_MAP[lowercase];
|
|
228
|
+
if (normalized && validTypes.has(normalized)) {
|
|
229
|
+
return normalized;
|
|
230
|
+
}
|
|
231
|
+
// No valid mapping found
|
|
232
|
+
return null;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Check if a device type is valid
|
|
236
|
+
* @param deviceType The device type to check
|
|
237
|
+
* @returns true if device type is in DEVICE_TYPES
|
|
238
|
+
*/
|
|
239
|
+
export function isValidDeviceType(deviceType) {
|
|
240
|
+
if (!deviceType || typeof deviceType !== 'string') {
|
|
241
|
+
return false;
|
|
242
|
+
}
|
|
243
|
+
const validTypes = getValidDeviceTypes();
|
|
244
|
+
return validTypes.has(deviceType.trim());
|
|
245
|
+
}
|
|
246
|
+
//# sourceMappingURL=device-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device-types.js","sourceRoot":"","sources":["device-types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,kBAAkB,EAAE,CAAC,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,CAAC;IACzE,gBAAgB,EAAE;QAChB,QAAQ;QACR,cAAc;QACd,eAAe;QACf,mBAAmB;QACnB,iBAAiB;QACjB,WAAW;QACX,YAAY;QACZ,gBAAgB;QAChB,kBAAkB;QAClB,gBAAgB;KACjB;IACD,SAAS,EAAE,CAAC,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,CAAC;IACnF,UAAU,EAAE;QACV,oBAAoB;QACpB,eAAe;QACf,mBAAmB;QACnB,YAAY;QACZ,YAAY;QACZ,uBAAuB;QACvB,4BAA4B;QAC5B,oBAAoB;QACpB,qBAAqB;QACrB,aAAa;QACb,eAAe;KAChB;IACD,iBAAiB,EAAE;QACjB,oBAAoB;QACpB,0BAA0B;QAC1B,kBAAkB;QAClB,wBAAwB;QACxB,wBAAwB;QACxB,gBAAgB;QAChB,YAAY;QACZ,aAAa;QACb,OAAO;QACP,WAAW;QACX,YAAY;QACZ,UAAU;QACV,WAAW;QACX,eAAe;QACf,iBAAiB;QACjB,2BAA2B;QAC3B,yBAAyB;QACzB,YAAY;KACb;IACD,kBAAkB,EAAE;QAClB,oBAAoB;QACpB,MAAM;QACN,gBAAgB;QAChB,gBAAgB;QAChB,gBAAgB;QAChB,gBAAgB;QAChB,kBAAkB;QAClB,kBAAkB;KACnB;IACD,eAAe,EAAE;QACf,MAAM;QACN,UAAU;QACV,qCAAqC;QACrC,2BAA2B;QAC3B,mCAAmC;QACnC,yBAAyB;QACzB,8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AAI,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,0BAA0B;IAC1B,MAAM,UAAU,GAAG,6BAA6B,CAAC,SAAS,CAAC,CAAA;IAC3D,IAAI,UAAU,IAAI,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;QAC7C,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,yBAAyB;IACzB,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAqC;IACrE,IAAI,CAAC,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QAClD,OAAO,KAAK,CAAA;IACd,CAAC;IACD,MAAM,UAAU,GAAG,mBAAmB,EAAE,CAAA;IACxC,OAAO,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAA;AAC1C,CAAC"}
|
package/src/device-types.ts
CHANGED
|
@@ -95,21 +95,21 @@ export const DEVICE_TYPES = {
|
|
|
95
95
|
} as const
|
|
96
96
|
|
|
97
97
|
export const DEVICE_TYPE_NORMALIZATION_MAP: Record<string, string> = {
|
|
98
|
-
// --- node-switchbot
|
|
98
|
+
// --- node-switchbot v4 normalization additions ---
|
|
99
99
|
'hub mini': 'Hub Mini',
|
|
100
100
|
'hub 3': 'Hub 3',
|
|
101
|
-
'keypad': 'Keypad',
|
|
101
|
+
'keypad': 'Keypad',
|
|
102
102
|
'plug mini': 'Plug Mini (US)', // fallback to US if region not specified
|
|
103
103
|
'art frame': 'AI Art Frame',
|
|
104
104
|
'rgbicww': 'RGBICWW Strip Light',
|
|
105
105
|
'lock vision': 'Lock Vision Pro', // alias for new lock vision
|
|
106
106
|
'lock pro': 'Smart Lock Pro',
|
|
107
|
-
'lock lite': 'Lock Lite',
|
|
108
|
-
'circulator fan': 'Circulator Fan',
|
|
107
|
+
'lock lite': 'Lock Lite',
|
|
108
|
+
'circulator fan': 'Circulator Fan',
|
|
109
109
|
'smart thermostat radiator': 'Smart Radiator Thermostat',
|
|
110
110
|
'climate panel': 'Home Climate Panel',
|
|
111
111
|
'evaporative humidifier': 'Humidifier',
|
|
112
|
-
// --- end node-switchbot
|
|
112
|
+
// --- end node-switchbot v4 additions ---
|
|
113
113
|
// Only keep the last occurrence for each key, all values canonical
|
|
114
114
|
'air purifier pm2.5': 'Air Purifier PM2.5',
|
|
115
115
|
'pan/tilt cam plus 3k': 'Pan/Tilt Cam Plus 3K',
|
|
@@ -150,7 +150,7 @@ export const DEVICE_TYPE_NORMALIZATION_MAP: Record<string, string> = {
|
|
|
150
150
|
'rgbicww floor lamp': 'RGBICWW Floor Lamp',
|
|
151
151
|
'rgbicww strip light': 'RGBICWW Strip Light',
|
|
152
152
|
'strip light': 'Strip Light',
|
|
153
|
-
'strip light 3': 'Strip Light 3',
|
|
153
|
+
'strip light 3': 'Strip Light 3',
|
|
154
154
|
|
|
155
155
|
// Vacuum conversions
|
|
156
156
|
'robot vacuum cleaner s1': 'Robot Vacuum Cleaner S1',
|
|
@@ -186,7 +186,7 @@ export const DEVICE_TYPE_NORMALIZATION_MAP: Record<string, string> = {
|
|
|
186
186
|
|
|
187
187
|
// Migration mappings for invalid/legacy device types
|
|
188
188
|
'lock vision pro': 'Lock Vision Pro', // Valid alias; map to canonical
|
|
189
|
-
// 'lock vision': 'Keypad Vision', // Invalid type (removed, now
|
|
189
|
+
// 'lock vision': 'Keypad Vision', // Invalid type (removed, now alias above)
|
|
190
190
|
'lock touch': 'Keypad Touch', // Invalid type
|
|
191
191
|
|
|
192
192
|
// Additional normalization for new/unknown types from logs
|
|
@@ -0,0 +1,319 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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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