@switchbot/homebridge-switchbot 5.0.0-beta.112 → 5.0.0-beta.113
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/MIGRATION.md +10 -0
- package/README.md +43 -0
- package/TODO.md +263 -0
- package/config.schema.json +27 -10
- package/dist/device-types.d.ts.map +1 -1
- package/dist/device-types.js +93 -63
- package/dist/device-types.js.map +1 -1
- package/dist/deviceFactory.d.ts.map +1 -1
- package/dist/deviceFactory.js +55 -33
- package/dist/deviceFactory.js.map +1 -1
- package/dist/devices/genericDevice.d.ts +12 -1
- package/dist/devices/genericDevice.d.ts.map +1 -1
- package/dist/devices/genericDevice.js +121 -1
- package/dist/devices/genericDevice.js.map +1 -1
- package/dist/errors.d.ts +5 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +51 -0
- package/dist/errors.js.map +1 -0
- package/dist/homebridge-ui/endpoints/devices.d.ts.map +1 -1
- package/dist/homebridge-ui/endpoints/devices.js +80 -1
- package/dist/homebridge-ui/endpoints/devices.js.map +1 -1
- package/dist/homebridge-ui/endpoints/discovery.d.ts.map +1 -1
- package/dist/homebridge-ui/endpoints/discovery.js +73 -41
- package/dist/homebridge-ui/endpoints/discovery.js.map +1 -1
- package/dist/homebridge-ui/public/css/styles.css +98 -0
- package/dist/homebridge-ui/public/index.html +57 -0
- package/dist/homebridge-ui/public/js/api.d.ts +24 -1
- package/dist/homebridge-ui/public/js/api.d.ts.map +1 -1
- package/dist/homebridge-ui/public/js/api.js +33 -2
- package/dist/homebridge-ui/public/js/api.js.map +1 -1
- package/dist/homebridge-ui/public/js/api.ts +52 -3
- package/dist/homebridge-ui/public/js/app.js +1503 -104
- package/dist/homebridge-ui/public/js/app.js.map +3 -3
- package/dist/homebridge-ui/public/js/app.ts +2 -1
- package/dist/homebridge-ui/public/js/devices.d.ts.map +1 -1
- package/dist/homebridge-ui/public/js/devices.js +2 -0
- package/dist/homebridge-ui/public/js/devices.js.map +1 -1
- package/dist/homebridge-ui/public/js/devices.ts +13 -1
- package/dist/homebridge-ui/public/js/discovery.d.ts +1 -0
- package/dist/homebridge-ui/public/js/discovery.d.ts.map +1 -1
- package/dist/homebridge-ui/public/js/discovery.js +1223 -126
- package/dist/homebridge-ui/public/js/discovery.js.map +1 -1
- package/dist/homebridge-ui/public/js/discovery.ts +1323 -145
- package/dist/homebridge-ui/public/js/modals.d.ts.map +1 -1
- package/dist/homebridge-ui/public/js/modals.js +42 -0
- package/dist/homebridge-ui/public/js/modals.js.map +1 -1
- package/dist/homebridge-ui/public/js/modals.ts +50 -1
- package/dist/homebridge-ui/public/js/render.d.ts +3 -0
- package/dist/homebridge-ui/public/js/render.d.ts.map +1 -1
- package/dist/homebridge-ui/public/js/render.js +311 -1
- package/dist/homebridge-ui/public/js/render.js.map +1 -1
- package/dist/homebridge-ui/public/js/render.ts +341 -2
- package/dist/platform.d.ts +1 -0
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +6 -2
- package/dist/platform.js.map +1 -1
- package/dist/switchbotClient.d.ts.map +1 -1
- package/dist/switchbotClient.js +51 -5
- package/dist/switchbotClient.js.map +1 -1
- package/docs/assets/highlight.css +9 -2
- package/docs/index.html +28 -2
- package/docs/variables/default.html +1 -1
- package/package.json +2 -2
- package/src/device-types.ts +95 -64
- package/src/deviceFactory.ts +55 -33
- package/src/devices/genericDevice.ts +113 -1
- package/src/errors.ts +43 -0
- package/src/homebridge-ui/endpoints/devices.ts +82 -1
- package/src/homebridge-ui/endpoints/discovery.ts +78 -44
- package/src/homebridge-ui/public/css/styles.css +98 -0
- package/src/homebridge-ui/public/index.html +57 -0
- package/src/homebridge-ui/public/js/api.ts +52 -3
- package/src/homebridge-ui/public/js/app.ts +2 -1
- package/src/homebridge-ui/public/js/devices.ts +13 -1
- package/src/homebridge-ui/public/js/discovery.ts +1323 -145
- package/src/homebridge-ui/public/js/modals.ts +50 -1
- package/src/homebridge-ui/public/js/render.ts +341 -2
- package/src/platform.ts +6 -2
- package/src/switchbotClient.ts +44 -9
- package/test/matter-integration.spec.ts +21 -0
- package/todo/COMPLETED.md +300 -0
- package/todo/TODO.md +80 -66
package/MIGRATION.md
CHANGED
|
@@ -30,6 +30,16 @@ This document highlights important changes and recommended actions before upgrad
|
|
|
30
30
|
6. Rollback plan
|
|
31
31
|
- If the beta causes issues, revert to the previous stable plugin version by reinstalling the prior package or checking out the stable branch.
|
|
32
32
|
|
|
33
|
+
|
|
34
|
+
8. BLE encryption key and keyId fields
|
|
35
|
+
|
|
36
|
+
- The plugin now supports BLE encryption for devices that require it (e.g., SwitchBot Lock, Curtain 3, and some sensors).
|
|
37
|
+
- New config fields: `encryptionKey` and `keyId` can be set per-device in the Homebridge UI or config.json.
|
|
38
|
+
- To upgrade, obtain your device's BLE encryption key and keyId from the SwitchBot app (see README for instructions) and add them to your device config if required.
|
|
39
|
+
- Devices that do not require encryption can leave these fields blank.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
33
43
|
7. Regenerating Matter ID maps
|
|
34
44
|
|
|
35
45
|
- A helper script `scripts/generate-matter-maps.js` is included to generate `src/matter-maps.generated.ts` from official zap/matter JSON metadata. The script expects a JSON input with a `clusters` array and will write mapped `MATTER_CLUSTER_IDS` and `MATTER_ATTRIBUTE_IDS` constants.
|
package/README.md
CHANGED
|
@@ -176,6 +176,49 @@
|
|
|
176
176
|
- [SwitchBot Water Leak Detector](https://us.switch-bot.com/products/switchbot-water-leak-detector)
|
|
177
177
|
- Supports OpenAPI & Bluetooth Low Energy (BLE) Connections
|
|
178
178
|
|
|
179
|
+
|
|
180
|
+
## BLE Encryption Support
|
|
181
|
+
|
|
182
|
+
### BLE Encryption Key and Key ID
|
|
183
|
+
|
|
184
|
+
Some SwitchBot devices (notably newer locks, curtains, and select sensors) require a BLE encryption key and keyId for secure Bluetooth communication. This plugin supports configuring these fields for each device.
|
|
185
|
+
|
|
186
|
+
#### How to Obtain BLE Encryption Key and Key ID
|
|
187
|
+
|
|
188
|
+
1. **Open the SwitchBot App** and select your device.
|
|
189
|
+
2. Go to **Device Settings** (gear icon).
|
|
190
|
+
3. Tap **Device Info**.
|
|
191
|
+
4. If your device supports BLE encryption, you will see fields for **Encryption Key** and **Key ID**. (If not visible, your device may not require encryption or may need a firmware update.)
|
|
192
|
+
5. Copy the **Encryption Key** and **Key ID** values.
|
|
193
|
+
|
|
194
|
+
#### How to Configure in Homebridge
|
|
195
|
+
|
|
196
|
+
In the Homebridge UI, when adding or editing a SwitchBot device, enter the **Encryption Key** and **Key ID** in the provided fields. These values will be securely used for BLE communication with your device.
|
|
197
|
+
|
|
198
|
+
**Example device config excerpt:**
|
|
199
|
+
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"deviceId": "E7F8A1B2C3D4",
|
|
203
|
+
"deviceName": "SwitchBot Lock",
|
|
204
|
+
"enableBLE": true,
|
|
205
|
+
"encryptionKey": "0123456789abcdef0123456789abcdef",
|
|
206
|
+
"keyId": "01"
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
#### Which Devices Require BLE Encryption?
|
|
211
|
+
|
|
212
|
+
- SwitchBot Lock (and Lock Pro)
|
|
213
|
+
- SwitchBot Curtain 3 (and some Curtain 2 with updated firmware)
|
|
214
|
+
- Some sensors and new device models (see device info in app)
|
|
215
|
+
|
|
216
|
+
If you are unsure, check your device's info in the SwitchBot app. If the fields are present, copy them into the plugin config.
|
|
217
|
+
|
|
218
|
+
**Note:** If you enter an incorrect key or keyId, BLE communication will fail for that device. Double-check values if you encounter connection issues.
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
179
222
|
## Supported IR Devices
|
|
180
223
|
|
|
181
224
|
### _(All IR Devices require [SwitchBot Hub 2](https://us.switch-bot.com/products/switchbot-hub-2), [SwitchBot Hub 3](https://us.switch-bot.com/products/switchbot-hub-3), or [Hub Mini](https://www.switch-bot.com/products/switchbot-hub-mini))_
|
package/TODO.md
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
# SwitchBot Plugin TODO List
|
|
2
|
+
|
|
3
|
+
## Code Refactoring & Architecture
|
|
4
|
+
|
|
5
|
+
### Server-Side Refactoring (Priority: High)
|
|
6
|
+
|
|
7
|
+
- [x] **Split `server.ts` into modular structure** ✅ COMPLETED
|
|
8
|
+
- [x] Created `src/homebridge-ui/endpoints/discovery.ts` - Discovery endpoint
|
|
9
|
+
- [x] Created `src/homebridge-ui/endpoints/config.ts` - Config management endpoint
|
|
10
|
+
- [x] Created `src/homebridge-ui/endpoints/devices.ts` - Device CRUD operations
|
|
11
|
+
- [x] Created `src/homebridge-ui/endpoints/credentials.ts` - Credentials endpoint
|
|
12
|
+
- [x] Created `src/homebridge-ui/utils/config-parser.ts` - Config parsing helpers
|
|
13
|
+
- [x] Created `src/homebridge-ui/utils/logger.ts` - Logging utility
|
|
14
|
+
- [x] Updated `src/homebridge-ui/server.ts` - Main entry point (imports and registers endpoints)
|
|
15
|
+
|
|
16
|
+
**Status:** Server endpoints are fully modularized and organized by concern.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Bug Fixes (Priority: Critical)
|
|
21
|
+
|
|
22
|
+
### Matter Window Covering Conformance Issue
|
|
23
|
+
|
|
24
|
+
- [ ] **Fix Matter window covering Drapery enum validation error**
|
|
25
|
+
- [ ] **Issue:** Matter accessory registration fails for Curtain devices
|
|
26
|
+
- [ ] **Error:** `Conformance "LF & !TL": Matter does not allow enum value Drapery (ID 4) here`
|
|
27
|
+
- [ ] **Root Cause:** windowCovering.state.type is set to "Drapery" but Matter spec requires "LF & !TL" conformance (Lift Fail without Tilt)
|
|
28
|
+
- [ ] **Solution:** Need to validate/correct window covering type mappings for Matter compatibility
|
|
29
|
+
- [ ] **Affected Devices:** Curtain-type devices (e.g., "Master Bathroom Left Curtain")
|
|
30
|
+
- [ ] **Steps to Fix:**
|
|
31
|
+
- [ ] Check Matter window covering specification for valid type combinations
|
|
32
|
+
- [ ] Update device type mapping to use compliant enum values
|
|
33
|
+
- [ ] Validate conformance rules for Lift/Tilt combinations
|
|
34
|
+
- [ ] Test with Curtain, Curtain3, and Roller Shade devices
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
### Invalid Device Type Validation ✅ COMPLETED
|
|
39
|
+
|
|
40
|
+
- [x] **Fix invalid device type in config schema validation**
|
|
41
|
+
- [x] **Issue:** Config validation rejects devices with invalid `configDeviceType` values (e.g., "Lock Vision Pro" is not in valid enum)
|
|
42
|
+
- [x] **Error:** "Value is not accepted. Valid values: ..." error shown in Homebridge UI
|
|
43
|
+
- [x] **Root Cause:** Device types in existing configs may not match current DEVICE_TYPES enum (legacy names, typos, or renamed devices)
|
|
44
|
+
- [x] **Affected Devices:** Any device with `configDeviceType` not matching DEVICE_TYPES enum
|
|
45
|
+
- [x] **Solution:** Implemented device type validation migration and auto-correction
|
|
46
|
+
|
|
47
|
+
**Implementation:**
|
|
48
|
+
- Added `normalizeDeviceType()` — Validates and maps invalid types to valid equivalents
|
|
49
|
+
- Added `isValidDeviceType()` — Checks if device type is in DEVICE_TYPES enum
|
|
50
|
+
- Added `getValidDeviceTypes()` — Returns set of all valid device types
|
|
51
|
+
- Created `src/homebridge-ui/utils/device-migration.ts` — Migration utilities for batch validation
|
|
52
|
+
- Updated `src/homebridge-ui/endpoints/config.ts` — Device loading now validates types and warns about invalid ones
|
|
53
|
+
- Added migration mapping: `"Lock Vision Pro"` → `"Keypad Vision Pro"` (and others)
|
|
54
|
+
- Config endpoint returns `validationWarnings` with invalid device types and suggestions
|
|
55
|
+
|
|
56
|
+
**Status:** Device type validation is now automatic. Invalid types are detected and suggestions provided to users. Auto-correction mappings handle legacy/typo device names.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
### Client-Side Refactoring (Priority: Medium)
|
|
61
|
+
|
|
62
|
+
#### Phase 1: Quick Wins
|
|
63
|
+
|
|
64
|
+
- [x] **Extract DEVICE_TYPES constant** (~100 lines) ✅ COMPLETED
|
|
65
|
+
- [x] Created `src/device-types.ts` as single source of truth
|
|
66
|
+
- [x] Updated `src/homebridge-ui/public/js/constants.ts` to import from shared source
|
|
67
|
+
- [x] Added `DEVICE_TYPE_NORMALIZATION_MAP` for plugin type lookups
|
|
68
|
+
- [x] Updated `src/deviceFactory.ts` to use normalized type mappings
|
|
69
|
+
- [x] Created `scripts/sync-device-types.mjs` to auto-sync config.schema.json
|
|
70
|
+
- [x] Integrated sync into build process (runs before tsc)
|
|
71
|
+
|
|
72
|
+
**Status:** Device types now single-sourced with auto-sync. Config schema, UI dropdown, and plugin type handling all stay aligned automatically.
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
# SwitchBot Plugin TODO List (2026)
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## PRIORITY: HIGH (Start Here)
|
|
81
|
+
|
|
82
|
+
- [ ] **One-Click Device Import**
|
|
83
|
+
Add "Add to Config" button next to each discovered device. Dramatically speeds up onboarding, reduces manual steps for users.
|
|
84
|
+
- [ ] **Auto-populate Device Config Modal**
|
|
85
|
+
When importing, auto-fill the config modal with discovered values. Reduces user error, makes adding devices nearly frictionless.
|
|
86
|
+
- [ ] **Pre-fill MAC Address for BLE Devices**
|
|
87
|
+
Ensure BLE devices are always added with correct MAC, avoids connection issues.
|
|
88
|
+
- [ ] **Duplicate Detection**
|
|
89
|
+
Check if discovered device ID already exists in config. Prevents duplicate entries, avoids user confusion.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## PRIORITY: MEDIUM
|
|
94
|
+
|
|
95
|
+
- [ ] **Confirmation Toast on Import**
|
|
96
|
+
Show a toast message on successful import for user feedback.
|
|
97
|
+
- [ ] **Loading States for Discovery**
|
|
98
|
+
Show progress indicator, spinner, and allow cancel during discovery. Improves perceived performance and transparency.
|
|
99
|
+
- [ ] **Device Grouping**
|
|
100
|
+
Group devices by hub or connection type. Useful for users with many devices/hubs.
|
|
101
|
+
- [ ] **Connection Recommendations**
|
|
102
|
+
Show badges for recommended connection (BLE/API) based on signal/device type.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## PRIORITY: LOW
|
|
107
|
+
|
|
108
|
+
- [ ] **UI Polish: Badges, View in Config, Group Headers**
|
|
109
|
+
Add badges for "Already Added"/"New Device", view-in-config links, expandable group headers, device count per group, and remember expanded/collapsed state.
|
|
110
|
+
- [ ] **Configurable BLE Scan**
|
|
111
|
+
Add scan duration, BLE timeout, and Bluetooth availability status in settings. Remember user preferences in localStorage.
|
|
112
|
+
- [ ] **Discovery History/Cache**
|
|
113
|
+
Cache last discovery results, show last scanned timestamp, refresh button, and auto-refresh option.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
**Recommendation:**
|
|
118
|
+
|
|
119
|
+
Start with the HIGH priority section—these features have the biggest impact on user experience and onboarding. MEDIUM priority items improve polish and usability for power users. LOW priority items are mostly UI/UX enhancements and advanced options.
|
|
120
|
+
|
|
121
|
+
- [ ] **Build & Test**
|
|
122
|
+
- [ ] Run `npm run build`
|
|
123
|
+
- [ ] Test add device modal
|
|
124
|
+
- [ ] Test edit device modal
|
|
125
|
+
- [ ] Test delete confirmation modal
|
|
126
|
+
- [ ] Verify form validation works
|
|
127
|
+
|
|
128
|
+
### Step 6: Extract Form Handling
|
|
129
|
+
|
|
130
|
+
**Goal:** Move form validation and submission logic
|
|
131
|
+
|
|
132
|
+
- [ ] **Create forms module**
|
|
133
|
+
- [ ] Create `src/homebridge-ui/public/js/forms.js`
|
|
134
|
+
- [ ] Extract and export these functions:
|
|
135
|
+
- [ ] `validateDeviceForm(formData)` - Validate form inputs
|
|
136
|
+
- [ ] `handleDeviceSubmit(formData)` - Process form submission
|
|
137
|
+
- [ ] `resetForm()` - Clear form fields
|
|
138
|
+
- [ ] `formatFormData(rawData)` - Format form data for API
|
|
139
|
+
- [ ] `showFormError(field, message)` - Display validation error
|
|
140
|
+
- [ ] `clearFormErrors()` - Clear all validation errors
|
|
141
|
+
|
|
142
|
+
- [ ] **Update HTML**
|
|
143
|
+
- [ ] Remove form handling functions from `<script>` block
|
|
144
|
+
- [ ] Add import: `import * as forms from './js/forms.js'`
|
|
145
|
+
- [ ] Update event handlers to use imported functions
|
|
146
|
+
- [ ] Test form validation and submission
|
|
147
|
+
|
|
148
|
+
- [ ] **Build & Test**
|
|
149
|
+
- [ ] Run `npm run build`
|
|
150
|
+
- [ ] Test form validation (empty fields, invalid data)
|
|
151
|
+
- [ ] Test form submission (add/edit device)
|
|
152
|
+
- [ ] Verify error messages display correctly
|
|
153
|
+
|
|
154
|
+
### Step 7: Create Main App Module
|
|
155
|
+
|
|
156
|
+
**Goal:** Create central app initialization and coordination
|
|
157
|
+
|
|
158
|
+
- [ ] **Create app module**
|
|
159
|
+
- [ ] Create `src/homebridge-ui/public/js/app.ts`
|
|
160
|
+
- [ ] Export `init()` function that:
|
|
161
|
+
- [ ] Loads initial config on page load
|
|
162
|
+
- [ ] Sets up all event listeners
|
|
163
|
+
- [ ] Initializes UI components
|
|
164
|
+
- [ ] Handles global state
|
|
165
|
+
- [ ] Move event listeners from HTML to app.js
|
|
166
|
+
- [ ] Coordinate between all other modules
|
|
167
|
+
|
|
168
|
+
- [ ] **Update HTML**
|
|
169
|
+
- [ ] Remove all remaining JavaScript from `<script>` block
|
|
170
|
+
- [ ] Keep only imports and single line: `import { init } from './js/app.js'; init();`
|
|
171
|
+
- [ ] Or use DOMContentLoaded: `document.addEventListener('DOMContentLoaded', () => init())`
|
|
172
|
+
- [ ] Remove now-empty `<script>` block if all code moved
|
|
173
|
+
|
|
174
|
+
- [ ] **Build & Test**
|
|
175
|
+
- [ ] Run `npm run build`
|
|
176
|
+
- [ ] Test complete page load and initialization
|
|
177
|
+
- [ ] Test all features end-to-end
|
|
178
|
+
- [ ] Verify no console errors
|
|
179
|
+
|
|
180
|
+
### Step 8: Final Cleanup and Verification
|
|
181
|
+
|
|
182
|
+
**Goal:** Ensure everything works and clean up
|
|
183
|
+
|
|
184
|
+
- [ ] **Verify build output**
|
|
185
|
+
- [ ] Check all files copied to `dist/homebridge-ui/public/`
|
|
186
|
+
- [ ] Verify file structure matches source
|
|
187
|
+
- [ ] Check file sizes (modules should be reasonable)
|
|
188
|
+
|
|
189
|
+
- [ ] **Test all functionality**
|
|
190
|
+
- [ ] Load config on page open
|
|
191
|
+
- [ ] Add new device
|
|
192
|
+
- [ ] Edit existing device
|
|
193
|
+
- [ ] Delete device
|
|
194
|
+
- [ ] Run discovery
|
|
195
|
+
- [ ] Test all filters/sorting (if implemented)
|
|
196
|
+
- [ ] Test on different browsers (Chrome, Safari, Firefox)
|
|
197
|
+
|
|
198
|
+
- [ ] **Code cleanup**
|
|
199
|
+
- [ ] Remove any unused functions
|
|
200
|
+
- [ ] Add JSDoc comments to all exports
|
|
201
|
+
- [ ] Ensure consistent code style
|
|
202
|
+
- [ ] Remove console.log statements (or convert to proper logging)
|
|
203
|
+
|
|
204
|
+
- [ ] **Documentation**
|
|
205
|
+
- [ ] Update comments in code
|
|
206
|
+
- [ ] Document module dependencies
|
|
207
|
+
- [ ] Add README in `src/homebridge-ui/public/js/` if needed
|
|
208
|
+
- [ ] Update main README if UI architecture changed significantly
|
|
209
|
+
|
|
210
|
+
### Step 9: Optional Enhancements
|
|
211
|
+
|
|
212
|
+
**Goal:** Further improvements after basic split
|
|
213
|
+
|
|
214
|
+
- [ ] **Add TypeScript for UI code**
|
|
215
|
+
- [ ] Rename `.js` files to `.ts`
|
|
216
|
+
- [ ] Add type definitions
|
|
217
|
+
- [ ] Update build to compile UI TypeScript
|
|
218
|
+
- [ ] Add type checking to lint scripts
|
|
219
|
+
|
|
220
|
+
- [ ] **Add minification**
|
|
221
|
+
- [ ] Consider adding Terser for JS minification
|
|
222
|
+
- [ ] Consider adding cssnano for CSS minification
|
|
223
|
+
- [ ] Update build script for production builds
|
|
224
|
+
|
|
225
|
+
- [ ] **Add source maps**
|
|
226
|
+
- [ ] Generate source maps for easier debugging
|
|
227
|
+
- [ ] Configure build to include maps
|
|
228
|
+
- [ ] Test debugging in browser DevTools
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## Implementation Notes
|
|
233
|
+
|
|
234
|
+
### Why Native ES6 Modules?
|
|
235
|
+
|
|
236
|
+
- ✅ No bundler needed (simpler build process)
|
|
237
|
+
- ✅ Native browser support (Safari 11+, Chrome 61+, Firefox 60+)
|
|
238
|
+
- ✅ Easier debugging (direct source code visibility)
|
|
239
|
+
- ✅ Suitable for local Homebridge UI (no network latency concerns)
|
|
240
|
+
- ✅ Hot reload friendly (just refresh browser)
|
|
241
|
+
|
|
242
|
+
### Browser Compatibility
|
|
243
|
+
|
|
244
|
+
- ES6 modules work in all modern browsers (2017+)
|
|
245
|
+
- Homebridge UI runs locally, so old browser support not critical
|
|
246
|
+
- Most Homebridge users have up-to-date browsers
|
|
247
|
+
|
|
248
|
+
### Build Process
|
|
249
|
+
|
|
250
|
+
- Current: `npm run plugin-ui` copies `src/homebridge-ui/public` → `dist/homebridge-ui/public`
|
|
251
|
+
- After split: Same command, just copies more files (no changes needed)
|
|
252
|
+
- Glob pattern `**/*` already handles subdirectories
|
|
253
|
+
|
|
254
|
+
### Testing Checklist
|
|
255
|
+
|
|
256
|
+
Each step should be tested before moving to next:
|
|
257
|
+
|
|
258
|
+
1. Build succeeds without errors
|
|
259
|
+
2. Files copied to dist/ correctly
|
|
260
|
+
3. UI loads in browser without errors
|
|
261
|
+
4. All functionality works as before
|
|
262
|
+
5. No console errors or warnings
|
|
263
|
+
6. Performance is same or better
|
package/config.schema.json
CHANGED
|
@@ -38,6 +38,12 @@
|
|
|
38
38
|
"configDeviceType"
|
|
39
39
|
],
|
|
40
40
|
"properties": {
|
|
41
|
+
"enabled": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"title": "Enabled",
|
|
44
|
+
"description": "Enable or disable this device without removing it from the config.",
|
|
45
|
+
"default": true
|
|
46
|
+
},
|
|
41
47
|
"configDeviceName": {
|
|
42
48
|
"type": "string",
|
|
43
49
|
"title": "Name",
|
|
@@ -164,20 +170,31 @@
|
|
|
164
170
|
"type": "string",
|
|
165
171
|
"title": "Room",
|
|
166
172
|
"description": "Optional room/location metadata for the device."
|
|
173
|
+
},
|
|
174
|
+
"encryptionKey": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"title": "BLE Encryption Key",
|
|
177
|
+
"description": "(Advanced) Optional BLE encryption key for this device. Required for some locks, relays, air purifiers, and light strips. See plugin docs for how to obtain this key.",
|
|
178
|
+
"format": "password"
|
|
179
|
+
},
|
|
180
|
+
"keyId": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"title": "BLE Key ID",
|
|
183
|
+
"description": "(Advanced) Optional BLE key ID for this device (usually 2 hex characters, e.g. 'ff'). Only required for some locks."
|
|
167
184
|
}
|
|
168
185
|
}
|
|
169
186
|
}
|
|
170
|
-
},
|
|
171
|
-
"enableMatter": {
|
|
172
|
-
"type": "boolean",
|
|
173
|
-
"title": "Enable Matter Support (Override)",
|
|
174
|
-
"description": "Manually enable Matter support. By default, Matter is auto-detected from the child bridge configuration. Only change this if you need to override the auto-detection."
|
|
175
|
-
},
|
|
176
|
-
"preferMatter": {
|
|
177
|
-
"type": "boolean",
|
|
178
|
-
"title": "Prefer Matter when available",
|
|
179
|
-
"description": "If enabled and Matter is available, devices will be presented as Matter accessories where supported (instead of HAP)."
|
|
180
187
|
}
|
|
188
|
+
},
|
|
189
|
+
"enableMatter": {
|
|
190
|
+
"type": "boolean",
|
|
191
|
+
"title": "Enable Matter Support (Override)",
|
|
192
|
+
"description": "Manually enable Matter support. By default, Matter is auto-detected from the child bridge configuration. Only change this if you need to override the auto-detection."
|
|
193
|
+
},
|
|
194
|
+
"preferMatter": {
|
|
195
|
+
"type": "boolean",
|
|
196
|
+
"title": "Prefer Matter when available",
|
|
197
|
+
"description": "If enabled and Matter is available, devices will be presented as Matter accessories where supported (instead of HAP)."
|
|
181
198
|
}
|
|
182
199
|
},
|
|
183
200
|
"layout": [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-types.d.ts","sourceRoot":"","sources":["../src/device-types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;CA8Ff,CAAA;AAEV,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"device-types.d.ts","sourceRoot":"","sources":["../src/device-types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;CA8Ff,CAAA;AAEV,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA6GhE,CAAA;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,GAAG,CAAC,MAAM,CAAC,CAQjD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAsBxF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAMhF"}
|
package/dist/device-types.js
CHANGED
|
@@ -94,76 +94,106 @@ export const DEVICE_TYPES = {
|
|
|
94
94
|
'Other Devices': ['AI Art Frame', 'Bot', 'Home Climate Panel', 'Remote', 'remote with screen'],
|
|
95
95
|
};
|
|
96
96
|
export const DEVICE_TYPE_NORMALIZATION_MAP = {
|
|
97
|
-
//
|
|
98
|
-
'
|
|
99
|
-
'
|
|
100
|
-
'
|
|
101
|
-
'
|
|
97
|
+
// --- node-switchbot beta new types normalization additions ---
|
|
98
|
+
'hub mini': 'Hub Mini',
|
|
99
|
+
'hub 3': 'Hub 3',
|
|
100
|
+
'keypad': 'Keypad', // node-switchbot beta
|
|
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', // node-switchbot beta
|
|
107
|
+
'circulator fan': 'Circulator Fan', // node-switchbot beta
|
|
108
|
+
'smart thermostat radiator': 'Smart Radiator Thermostat',
|
|
109
|
+
'climate panel': 'Home Climate Panel',
|
|
110
|
+
'evaporative humidifier': 'Humidifier',
|
|
111
|
+
// --- end node-switchbot beta 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.
|
|
102
127
|
// Climate control conversions
|
|
103
|
-
'humidifier2': '
|
|
104
|
-
'circulator fan': '
|
|
105
|
-
'
|
|
106
|
-
'standing circulator fan': 'fan',
|
|
128
|
+
'humidifier2': 'Humidifier2',
|
|
129
|
+
'battery circulator fan': 'Battery Circulator Fan',
|
|
130
|
+
'standing circulator fan': 'Standing Circulator Fan',
|
|
107
131
|
// Lock/keypad conversions
|
|
108
|
-
'smart lock': '
|
|
109
|
-
'smart lock pro': '
|
|
110
|
-
'smart lock ultra': '
|
|
111
|
-
'
|
|
112
|
-
'keypad': '
|
|
113
|
-
'keypad
|
|
114
|
-
'keypad vision': 'lock',
|
|
115
|
-
'keypad vision pro': 'lock',
|
|
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',
|
|
116
138
|
// Light conversions
|
|
117
|
-
'color bulb': '
|
|
118
|
-
'ceiling light': '
|
|
119
|
-
'ceiling light pro': '
|
|
120
|
-
'candle warmer lamp': '
|
|
121
|
-
'floor lamp': '
|
|
122
|
-
'rgbic neon rope light': '
|
|
123
|
-
'rgbic neon wire rope light': '
|
|
124
|
-
'rgbicww floor lamp': '
|
|
125
|
-
'rgbicww strip light': '
|
|
126
|
-
'strip light': '
|
|
127
|
-
'strip light 3': '
|
|
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', // node-switchbot beta
|
|
128
150
|
// Vacuum conversions
|
|
129
|
-
'robot vacuum cleaner s1': '
|
|
130
|
-
'robot vacuum cleaner s1 plus': '
|
|
131
|
-
'robot vacuum cleaner s10': '
|
|
132
|
-
'robot vacuum cleaner s20': '
|
|
133
|
-
'robot vacuum cleaner k10+ pro combo': '
|
|
134
|
-
'robot vacuum cleaner k11+': '
|
|
135
|
-
'robot vacuum cleaner k20 plus pro': '
|
|
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',
|
|
136
158
|
// Exact device type mappings (API format → canonical format)
|
|
137
|
-
'
|
|
138
|
-
'
|
|
139
|
-
'
|
|
140
|
-
'
|
|
141
|
-
'
|
|
142
|
-
'
|
|
143
|
-
'
|
|
144
|
-
'
|
|
145
|
-
'
|
|
146
|
-
'
|
|
147
|
-
'
|
|
148
|
-
|
|
149
|
-
'
|
|
150
|
-
'
|
|
151
|
-
'
|
|
152
|
-
'
|
|
153
|
-
'
|
|
154
|
-
|
|
155
|
-
'
|
|
156
|
-
'
|
|
157
|
-
'meter plus': 'meterplus',
|
|
158
|
-
'relay switch 1 pm': 'relay switch 1pm',
|
|
159
|
-
'relay switch 2 pm': 'relay switch 2pm',
|
|
160
|
-
'plug mini eu': 'plug mini (eu)',
|
|
161
|
-
'plug mini jp': 'plug mini (jp)',
|
|
162
|
-
'plug mini us': 'plug mini (us)',
|
|
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)',
|
|
163
179
|
// Migration mappings for invalid/legacy device types
|
|
164
|
-
'lock vision pro': '
|
|
165
|
-
'lock vision': 'Keypad Vision', // Invalid type
|
|
180
|
+
'lock vision pro': 'Lock Vision Pro', // Valid alias; map to canonical
|
|
181
|
+
// 'lock vision': 'Keypad Vision', // Invalid type (removed, now node-switchbot beta alias above)
|
|
166
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
|
|
167
197
|
};
|
|
168
198
|
/**
|
|
169
199
|
* Get all valid device types as a flat set for validation
|
package/dist/device-types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-types.js","sourceRoot":"","sources":["../src/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,8BAA8B;QAC9B,0BAA0B;QAC1B,0BAA0B;KAC3B;IACD,MAAM,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC;IACnE,SAAS,EAAE;QACT,YAAY;QACZ,cAAc;QACd,iBAAiB;QACjB,sBAAsB;QACtB,sBAAsB;KACvB;IACD,YAAY,EAAE;QACZ,iBAAiB;QACjB,cAAc;QACd,QAAQ;QACR,KAAK;QACL,KAAK;QACL,OAAO;QACP,QAAQ;QACR,WAAW;QACX,aAAa;QACb,SAAS;QACT,UAAU;QACV,IAAI;QACJ,gBAAgB;QAChB,cAAc;KACf;IACD,eAAe,EAAE,CAAC,cAAc,EAAE,KAAK,EAAE,oBAAoB,EAAE,QAAQ,EAAE,oBAAoB,CAAC;CACtF,CAAA;AAEV,MAAM,CAAC,MAAM,6BAA6B,GAA2B;IACnE,
|
|
1
|
+
{"version":3,"file":"device-types.js","sourceRoot":"","sources":["../src/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;Q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;AAC1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceFactory.d.ts","sourceRoot":"","sources":["../src/deviceFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAmCtE,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,UAAU,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB;
|
|
1
|
+
{"version":3,"file":"deviceFactory.d.ts","sourceRoot":"","sources":["../src/deviceFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAmCtE,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,UAAU,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB;AAqGD,wBAAsB,YAAY,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,qBAAqB,EAAE,SAAS,EAAE,OAAO;;2BAwC3E,GAAG;;GAG7B"}
|