@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/todo/COMPLETED.md
CHANGED
|
@@ -1,9 +1,309 @@
|
|
|
1
|
+
# Batch Import & Discovery UI Enhancements ✅ COMPLETED
|
|
2
|
+
|
|
3
|
+
- [x] Add checkboxes to select multiple devices
|
|
4
|
+
- Users can now select multiple discovered devices using checkboxes in the discovery UI for batch actions.
|
|
5
|
+
- [x] Add "Add Selected to Config" button
|
|
6
|
+
- A prominent "Add Selected to Config" button enables batch import of all selected devices, streamlining onboarding.
|
|
7
|
+
- [x] Implement bulk configuration with smart defaults
|
|
8
|
+
- When importing multiple devices, the system applies smart defaults (type, name, MAC, etc.) and auto-fills config fields, reducing manual entry and errors.
|
|
9
|
+
- [x] Show firmware update available indicators
|
|
10
|
+
- Devices with available firmware updates display an orange "Update Available" badge in the discovery UI.
|
|
11
|
+
- [x] Show offline/unreachable warnings
|
|
12
|
+
- Devices that are offline or unreachable show a red "Offline" badge, based on status or last-seen timestamp.
|
|
13
|
+
- [x] Add "Needs Attention" section at top
|
|
14
|
+
- Devices needing action (low battery, firmware update, offline) are grouped in a "Needs Attention" section at the top of the discovery UI for quick access.
|
|
15
|
+
|
|
16
|
+
**Status:** All batch import and discovery UI features are implemented and live. Only battery level trending (historical data) remains as a future enhancement.
|
|
17
|
+
# Integration: node-switchbot Beta Updates (March 2026)
|
|
18
|
+
|
|
19
|
+
### Duplicate Detection ✅ COMPLETED
|
|
20
|
+
|
|
21
|
+
- [x] The UI disables the "Add to Config" button and shows an "Already Added" badge for devices already in the config, preventing duplicate entries. Badges for recommended connection (BLE/API) are also shown based on signal/device type.
|
|
22
|
+
|
|
23
|
+
**Status:** Duplicate detection is enforced in the UI, so users cannot add the same device twice. Connection recommendation badges are also displayed.
|
|
24
|
+
# Integration: node-switchbot Beta Updates (March 2026)
|
|
25
|
+
|
|
26
|
+
### One-Click Device Import ✅ COMPLETED
|
|
27
|
+
|
|
28
|
+
- [x] Add "Add to Config" button next to each discovered device. Dramatically speeds up onboarding, reduces manual steps for users.
|
|
29
|
+
|
|
30
|
+
**Status:** Each discovered device in the UI now has an "Add to Config" button. This enables one-click import directly from the discovery list.
|
|
31
|
+
|
|
32
|
+
### Auto-populate Device Config Modal ✅ COMPLETED
|
|
33
|
+
|
|
34
|
+
- [x] When importing, the config modal is auto-filled with discovered values (name, type, MAC, etc). Reduces user error and makes adding devices nearly frictionless.
|
|
35
|
+
|
|
36
|
+
**Status:** The import modal pre-fills all relevant fields with discovered device data, streamlining the import process.
|
|
37
|
+
|
|
38
|
+
### Pre-fill MAC Address for BLE Devices ✅ COMPLETED
|
|
39
|
+
|
|
40
|
+
- [x] The import modal auto-fills the MAC address field with the discovered device's address, ensuring BLE devices are always added with the correct MAC.
|
|
41
|
+
|
|
42
|
+
**Status:** The MAC address is pre-filled in the config modal for BLE devices, preventing user error and connection issues.
|
|
43
|
+
|
|
44
|
+
### Duplicate Detection ✅ COMPLETED
|
|
45
|
+
|
|
46
|
+
- [x] The UI disables the "Add to Config" button and shows an "Already Added" badge for devices already in the config, preventing duplicate entries.
|
|
47
|
+
|
|
48
|
+
**Status:** Duplicate detection is enforced in the UI, so users cannot add the same device twice.
|
|
49
|
+
# Integration: node-switchbot Beta Updates (March 2026)
|
|
50
|
+
|
|
51
|
+
### Duplicate Detection ✅ COMPLETED
|
|
52
|
+
|
|
53
|
+
- [x] The UI disables the "Add to Config" button and shows an "Already Added" badge for devices already in the config, preventing duplicate entries.
|
|
54
|
+
|
|
55
|
+
**Status:** Duplicate detection is enforced in the UI, so users cannot add the same device twice.
|
|
56
|
+
# Integration: node-switchbot Beta Updates (March 2026)
|
|
57
|
+
|
|
58
|
+
### Pre-fill MAC Address for BLE Devices ✅ COMPLETED
|
|
59
|
+
|
|
60
|
+
- [x] The import modal auto-fills the MAC address field with the discovered device's address, ensuring BLE devices are always added with the correct MAC.
|
|
61
|
+
|
|
62
|
+
**Status:** The MAC address is pre-filled in the config modal for BLE devices, preventing user error and connection issues.
|
|
63
|
+
# Integration: node-switchbot Beta Updates (March 2026)
|
|
64
|
+
|
|
65
|
+
### One-Click Device Import ✅ COMPLETED
|
|
66
|
+
|
|
67
|
+
- [x] Add "Add to Config" button next to each discovered device. Dramatically speeds up onboarding, reduces manual steps for users.
|
|
68
|
+
|
|
69
|
+
**Status:** Each discovered device in the UI now has an "Add to Config" button. This enables one-click import directly from the discovery list.
|
|
70
|
+
|
|
71
|
+
### Auto-populate Device Config Modal ✅ COMPLETED
|
|
72
|
+
|
|
73
|
+
- [x] When importing, the config modal is auto-filled with discovered values (name, type, MAC, etc). Reduces user error and makes adding devices nearly frictionless.
|
|
74
|
+
|
|
75
|
+
**Status:** The import modal pre-fills all relevant fields with discovered device data, streamlining the import process.
|
|
76
|
+
# Integration: node-switchbot Beta Updates (March 2026)
|
|
77
|
+
- [x] Update device registry and class mapping to match node-switchbot
|
|
78
|
+
- [x] Add notification handling for BLE devices (per-command notification futures, unsolicited notification logging)
|
|
79
|
+
|
|
80
|
+
- [x] Map new device types to Homebridge plugin (HubMini Matter, Hub3, Keypad Vision/Pro, Plug Mini EU, Roller Shade, Garage Door Opener, Floor Lamp, Art Frame, RGBICWW variants, K10/K11/K20/S10/S20 vacuums, Lock Lite/Vision/Pro/WiFi, Circulator Fan, Smart Thermostat Radiator, Climate Panel, Evaporative Humidifier, Strip Light 3, etc.)
|
|
81
|
+
- [x] Expose new device features in UI (air quality, preset modes, calibration, direction, multi-command, extended info, segmented control, etc.)
|
|
82
|
+
- [x] Integrate BLE encryption for all supported devices (relay, lock, air purifier, light strip, bulb, etc.)
|
|
83
|
+
# BLE Response Length Validation ✅ COMPLETED
|
|
84
|
+
|
|
85
|
+
- [x] Implement response length validation for BLE status parsing
|
|
86
|
+
|
|
87
|
+
**Status:** All BLE status parsing now validates the response buffer/array length before parsing. Invalid responses are logged and rejected, improving robustness and diagnostics for all BLE devices.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
# Error Class Handling Integration ✅ COMPLETED
|
|
91
|
+
|
|
92
|
+
- [x] Add support for new error classes and improved error handling (SwitchbotOperationError, SwitchbotAuthenticationError, CharacteristicMissingError)
|
|
93
|
+
|
|
94
|
+
**Status:** The plugin now imports and uses node-switchbot v4 error classes, with robust instanceof-based handling and compatible fallbacks. All error types are logged and surfaced appropriately, and the code is ready for future node-switchbot error model changes.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
### Batch Enable/Disable Devices ✅ COMPLETED
|
|
98
|
+
|
|
99
|
+
- [x] Allow batch enable/disable of devices
|
|
100
|
+
|
|
101
|
+
**Status:** The UI now provides 'Enable Selected' and 'Disable Selected' buttons, allowing users to batch enable or disable devices directly from the discovery view.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
### Batch Operation Progress Indicator ✅ COMPLETED
|
|
106
|
+
|
|
107
|
+
- [x] Show progress for batch operations
|
|
108
|
+
|
|
109
|
+
**Status:** The UI now displays a progress indicator during batch add/configure operations, giving users real-time feedback on operation status and completion.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### Real-Time RSSI Updates During Scan ✅ COMPLETED
|
|
114
|
+
|
|
115
|
+
- [x] Update RSSI values in real-time during scan
|
|
116
|
+
|
|
117
|
+
**Status:** The UI now polls for BLE scan results and updates device RSSI values live during the scan window, providing real-time signal strength feedback.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
### Needs Attention Section in Discovery UI ✅ COMPLETED
|
|
122
|
+
|
|
123
|
+
- [x] Add 'Needs Attention' section at the top of the device discovery UI
|
|
124
|
+
|
|
125
|
+
**Status:** Devices with low battery (<20%), firmware updates available, or offline/unreachable status are now aggregated and displayed in a prominent 'Needs Attention' section at the top of the discovery UI. This helps users quickly identify and address devices that require action.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
1
129
|
# Completed TODOs
|
|
2
130
|
|
|
131
|
+
### Firmware Update Available Indicator ✅ COMPLETED
|
|
132
|
+
|
|
133
|
+
### Offline/Unreachable Warning Indicator ✅ COMPLETED
|
|
134
|
+
|
|
135
|
+
- [x] Show offline/unreachable warnings
|
|
136
|
+
|
|
137
|
+
**Status:** Devices that are offline or unreachable (either via a boolean property or if last seen > 1 hour ago) now display a red 'Offline' badge in the discovery UI next to the device name.
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
- [x] Show firmware update available indicators
|
|
141
|
+
|
|
142
|
+
**Status:** Devices with a firmware update available now display an orange 'Update Available' badge in the discovery UI next to the device name.
|
|
143
|
+
|
|
144
|
+
|
|
3
145
|
This file tracks all completed features and improvements for the SwitchBot Homebridge Plugin.
|
|
4
146
|
|
|
5
147
|
---
|
|
6
148
|
|
|
149
|
+
## Recent Completed Work
|
|
150
|
+
|
|
151
|
+
### Connection Testing (First Slice) ✅ COMPLETED
|
|
152
|
+
|
|
153
|
+
- [x] Added "Test Connection" button per device (discovered and configured cards)
|
|
154
|
+
- [x] Added backend connectivity check endpoint (`/test-connection`)
|
|
155
|
+
- [x] Attempted basic status read via device fetch during test
|
|
156
|
+
- [x] Added success/failure indicator with inline result details
|
|
157
|
+
- [x] Displayed measured connection latency (ms)
|
|
158
|
+
- [x] Displayed connection method result (BLE/OpenAPI/Auto)
|
|
159
|
+
|
|
160
|
+
**Status:** Users can now run per-device connection checks directly from the UI and immediately see method and latency results.
|
|
161
|
+
|
|
162
|
+
### Matter Neon Wire Rope Light Registration Verification ✅ COMPLETED
|
|
163
|
+
|
|
164
|
+
- [x] **Verify Matter registration for "Family Room Neon Wire Rope Light" succeeds without behavior rollback**
|
|
165
|
+
- [x] Added targeted Matter integration regression test for `RGBIC Neon Wire Rope Light`
|
|
166
|
+
- [x] Verified normalization to Matter type `lightstrip`
|
|
167
|
+
- [x] Verified `colorControl.colorMode` default is present (`0`) to satisfy conformance
|
|
168
|
+
- [x] Validated registration path end-to-end with Matter harness
|
|
169
|
+
|
|
170
|
+
**Status:** Neon Wire Rope Light registration now has regression coverage and registers with conformant ColorControl defaults.
|
|
171
|
+
|
|
172
|
+
### Matter Lightstrip Conformance ✅ COMPLETED
|
|
173
|
+
|
|
174
|
+
- [x] **Fix Matter lightstrip registration conformance requiring `colorControl.colorMode`**
|
|
175
|
+
- [x] **Issue:** Matter accessory initialization failed for color lightstrip devices with conformance errors
|
|
176
|
+
- [x] **Error:** `Conformance "M": Matter requires you to set this attribute ... colorControl.state.colorMode`
|
|
177
|
+
- [x] **Fix:** Added required `colorMode` default for lightstrip color control state while avoiding disallowed default writes
|
|
178
|
+
|
|
179
|
+
**Status:** Lightstrip accessories now provide required ColorControl state for Matter initialization.
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
### Battery Warnings in Device List ✅ COMPLETED
|
|
183
|
+
|
|
184
|
+
- [x] Show battery warnings (< 20%) with yellow/red indicators
|
|
185
|
+
|
|
186
|
+
**Status:** Devices with battery below 20% now display a yellow (10–19%) or red (<10%) warning badge in the discovery UI, with a tooltip for low/critical battery.
|
|
187
|
+
|
|
188
|
+
### Streaming BLE Device Discovery ✅ COMPLETED
|
|
189
|
+
|
|
190
|
+
- [x] Show devices as they're discovered (streaming results via polling)
|
|
191
|
+
|
|
192
|
+
**Status:** Devices now appear in the UI as soon as they're discovered during BLE scan, providing a real-time streaming experience.
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
### Discovery Better Loading States ✅ COMPLETED
|
|
197
|
+
|
|
198
|
+
- [x] Show progress indicator phases: `Scanning BLE` → `Fetching OpenAPI` → `Complete`
|
|
199
|
+
- [x] Added spinner/progress visuals for each phase
|
|
200
|
+
- [x] Display partial discovery results while later phases continue
|
|
201
|
+
- [x] Show elapsed time for current phase and total discovery time
|
|
202
|
+
- [x] Added cancel button for long discovery runs
|
|
203
|
+
|
|
204
|
+
**Status:** Discovery UX now provides real-time progress and immediate partial feedback.
|
|
205
|
+
|
|
206
|
+
### Discovery Device Grouping ✅ COMPLETED
|
|
207
|
+
|
|
208
|
+
- [x] Implemented grouping by connection type
|
|
209
|
+
- [x] Implemented grouping by hub
|
|
210
|
+
- [x] Added expandable/collapsible group headers
|
|
211
|
+
- [x] Added group counts in headers
|
|
212
|
+
- [x] Persisted expanded/collapsed state in localStorage
|
|
213
|
+
|
|
214
|
+
**Status:** Discovery lists are grouped, collapsible, and stateful across sessions.
|
|
215
|
+
|
|
216
|
+
### Discovery Connection Recommendations ✅ COMPLETED
|
|
217
|
+
|
|
218
|
+
- [x] Added `⚡ Recommended: BLE` badge for strong RSSI devices
|
|
219
|
+
- [x] Added `☁️ Recommended: API` badge for hub-dependent devices
|
|
220
|
+
- [x] Added recommendation tooltips explaining reasoning
|
|
221
|
+
- [x] Applied device-type-aware recommendation heuristics
|
|
222
|
+
|
|
223
|
+
**Status:** Discovery cards now provide actionable connection guidance.
|
|
224
|
+
|
|
225
|
+
### Configurable BLE Scan ✅ COMPLETED
|
|
226
|
+
|
|
227
|
+
- [x] Added scan duration settings (3s/5s/10s/15s)
|
|
228
|
+
- [x] Added option to disable BLE scanning
|
|
229
|
+
- [x] Added adjustable BLE timeout setting
|
|
230
|
+
- [x] Persisted BLE scan preferences in localStorage
|
|
231
|
+
- [x] Added Bluetooth availability status indicator
|
|
232
|
+
|
|
233
|
+
**Status:** BLE discovery behavior is user-configurable and persisted.
|
|
234
|
+
|
|
235
|
+
### Discovery History/Cache ✅ COMPLETED
|
|
236
|
+
|
|
237
|
+
- [x] Cache last discovery results for 5 minutes
|
|
238
|
+
- [x] Show "Last scanned: X minutes ago" with timestamp
|
|
239
|
+
- [x] Add "Refresh" button to re-scan
|
|
240
|
+
- [x] Show cached results immediately on page load
|
|
241
|
+
- [x] Auto-refresh option with configurable interval
|
|
242
|
+
|
|
243
|
+
**Status:** Discovery now restores recent results instantly and supports manual/automatic refresh.
|
|
244
|
+
|
|
245
|
+
### Discovery UX Polish ✅ COMPLETED
|
|
246
|
+
|
|
247
|
+
- [x] Added `Hide Added` discovery filter to exclude already-configured devices
|
|
248
|
+
- [x] Improved BLE settings row alignment (`Scan`, `Timeout`, and units)
|
|
249
|
+
- [x] Reduced extra spacing between BLE settings row and Bluetooth adapter status
|
|
250
|
+
- [x] Hide `Scan` and `Timeout` controls when `Disable BLE scan` is enabled
|
|
251
|
+
|
|
252
|
+
**Status:** Discovery controls are cleaner and faster to use for repeat configuration workflows.
|
|
253
|
+
|
|
254
|
+
### Detailed Device Info Panel ✅ COMPLETED
|
|
255
|
+
|
|
256
|
+
- [x] Added click-to-expand toggle button (▾) to device cards with rotation animation
|
|
257
|
+
- [x] Created expandable details panel showing extended device information:
|
|
258
|
+
- [x] Device ID with copy button
|
|
259
|
+
- [x] MAC Address with copy button
|
|
260
|
+
- [x] Device Type
|
|
261
|
+
- [x] Model
|
|
262
|
+
- [x] Hub ID (if applicable)
|
|
263
|
+
- [x] Battery level (if available)
|
|
264
|
+
- [x] Firmware version (if available)
|
|
265
|
+
- [x] Cloud Service status (enabled/disabled)
|
|
266
|
+
- [x] Last Seen timestamp (human-readable format)
|
|
267
|
+
- [x] Implemented copy-to-clipboard functionality with visual feedback (📋 → ✓ for 2s)
|
|
268
|
+
- [x] Styled details panel with SwitchBot theme (light gray background, compact rows)
|
|
269
|
+
- [x] Persisted expand/collapse state in-session (resets on page reload)
|
|
270
|
+
|
|
271
|
+
**Status:** Device cards now provide quick access to extended metadata with one-click copying of ID and MAC. Details panel uses clean, readable table layout within the card.
|
|
272
|
+
|
|
273
|
+
### Extended Details in Configured Devices ✅ COMPLETED
|
|
274
|
+
|
|
275
|
+
- [x] Added expandable toggle (▾) to configured device cards in config section
|
|
276
|
+
- [x] Details panel shows same extended information as discovered devices:
|
|
277
|
+
- [x] Device ID with copy button
|
|
278
|
+
- [x] MAC Address with copy button
|
|
279
|
+
- [x] Device Type
|
|
280
|
+
- [x] Model
|
|
281
|
+
- [x] Hub ID (if applicable)
|
|
282
|
+
- [x] Battery level (if available)
|
|
283
|
+
- [x] Firmware version (if available)
|
|
284
|
+
- [x] Cloud Service status
|
|
285
|
+
- [x] Last Seen timestamp
|
|
286
|
+
- [x] Toggle button rotates when expanded/collapsed (smooth animation)
|
|
287
|
+
- [x] Details available directly from card without opening Edit modal
|
|
288
|
+
|
|
289
|
+
**Status:** Configured devices now have the same quick-access details panel as discovered devices, making it easy to view metadata without opening the Edit dialog.
|
|
290
|
+
|
|
291
|
+
### Real-Time BLE Scanning (Partial) ✅ PARTIALLY COMPLETED
|
|
292
|
+
|
|
293
|
+
- [x] Added animated "pulsing" indicator during active BLE scan using CSS animation
|
|
294
|
+
- [x] Implemented "X devices found..." counter that displays during scan
|
|
295
|
+
- Shows BLE device count after BLE phase completes
|
|
296
|
+
- Updates to merged count when OpenAPI phase completes
|
|
297
|
+
- Auto-hides when discovery finishes
|
|
298
|
+
- [x] Counter shows pulse animation (1.5s opacity fade cycle) while scanning
|
|
299
|
+
- [x] Gracefully removes pulse animation and hides counter on cancellation/error
|
|
300
|
+
- [ ] Real-time streaming results via polling (partial implementation - displays final count per phase)
|
|
301
|
+
- [ ] Real-time RSSI updates during scan (requires server-side streaming support)
|
|
302
|
+
|
|
303
|
+
**Status:** Discovery now shows visual feedback with a pulsing "X devices found" counter. Full streaming of individual results per-device would require backend support for Server-Sent Events (SSE) or WebSocket streaming. Current implementation displays phase-wise device counts (BLE count → merged final count).
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
7
307
|
## Code Refactoring & Architecture
|
|
8
308
|
|
|
9
309
|
### Server-Side Refactoring ✅ COMPLETED
|
package/todo/TODO.md
CHANGED
|
@@ -1,104 +1,118 @@
|
|
|
1
|
-
# SwitchBot Plugin TODO List
|
|
1
|
+
# SwitchBot Plugin TODO List (2026)
|
|
2
2
|
|
|
3
|
-
## Active Tasks
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
#### 8. Batch Import
|
|
6
5
|
|
|
7
|
-
-
|
|
6
|
+
- [x] Add checkboxes to select multiple devices
|
|
7
|
+
- [x] Add "Add Selected to Config" button
|
|
8
|
+
- [x] Implement bulk configuration with smart defaults
|
|
9
|
+
|
|
10
|
+
- [x] Show firmware update available indicators
|
|
11
|
+
- [x] Show offline/unreachable warnings
|
|
12
|
+
- [x] Add "Needs Attention" section at top
|
|
13
|
+
- [ ] Implement battery level trending (if historical data available)
|
|
14
|
+
|
|
15
|
+
#### 10. Export/Import Discovery
|
|
16
|
+
|
|
17
|
+
- [ ] Add "Export Results" button (JSON format)
|
|
18
|
+
- [ ] Add "Import Results" for comparison or troubleshooting
|
|
19
|
+
- [ ] Share with support for debugging
|
|
20
|
+
- [ ] Compare current vs previous discovery (show differences)
|
|
21
|
+
- [ ] Generate discovery report (formatted summary)
|
|
8
22
|
|
|
9
23
|
---
|
|
10
24
|
|
|
11
|
-
##
|
|
25
|
+
## Bug Fixes & Technical Debt
|
|
12
26
|
|
|
13
|
-
###
|
|
27
|
+
### Testing & Quality Assurance
|
|
14
28
|
|
|
15
|
-
|
|
29
|
+
- [ ] **Test discovery with real hardware**
|
|
30
|
+
- [ ] Test BLE discovery with nearby devices
|
|
31
|
+
- [ ] Test OpenAPI discovery with cloud-registered devices
|
|
32
|
+
- [ ] Test with mixed BLE+API devices
|
|
33
|
+
- [ ] Test connection type badge display
|
|
34
|
+
- [ ] Verify deduplication works correctly
|
|
16
35
|
|
|
17
|
-
- [ ]
|
|
18
|
-
- [ ]
|
|
19
|
-
- [ ]
|
|
20
|
-
- [ ]
|
|
21
|
-
- [ ]
|
|
36
|
+
- [ ] **Add error handling improvements**
|
|
37
|
+
- [ ] Better error messages for users
|
|
38
|
+
- [ ] Retry logic with exponential backoff
|
|
39
|
+
- [ ] Graceful degradation when BLE unavailable
|
|
40
|
+
- [ ] Network timeout handling
|
|
22
41
|
|
|
23
|
-
|
|
42
|
+
---
|
|
24
43
|
|
|
25
|
-
|
|
44
|
+
## Documentation
|
|
26
45
|
|
|
27
|
-
- [ ]
|
|
28
|
-
- [ ]
|
|
29
|
-
- [ ] Add
|
|
30
|
-
- [ ]
|
|
31
|
-
- [ ]
|
|
46
|
+
- [ ] **Update README with discovery features**
|
|
47
|
+
- [ ] Document BLE vs OpenAPI discovery
|
|
48
|
+
- [ ] Add screenshots of new UI features
|
|
49
|
+
- [ ] Explain connection type badges
|
|
50
|
+
- [ ] Add troubleshooting guide for discovery issues
|
|
32
51
|
|
|
33
|
-
|
|
52
|
+
- [ ] **Create developer documentation**
|
|
53
|
+
- [ ] Document new modular structure
|
|
54
|
+
- [ ] API documentation for endpoints
|
|
55
|
+
- [ ] Contributing guidelines for UI changes
|
|
34
56
|
|
|
35
|
-
|
|
36
|
-
- [ ] Add badge: "☁️ Recommended: API" for hub-dependent devices
|
|
37
|
-
- [ ] Show tooltip explaining why recommendation is made
|
|
38
|
-
- [ ] Consider device type (some work better with BLE vs API)
|
|
57
|
+
---
|
|
39
58
|
|
|
40
|
-
|
|
59
|
+
## Priority Summary
|
|
41
60
|
|
|
42
|
-
|
|
43
|
-
- [ ] Add option to disable BLE scanning if no Bluetooth adapter
|
|
44
|
-
- [ ] Add option to adjust BLE timeout
|
|
45
|
-
- [ ] Remember user preferences in localStorage
|
|
46
|
-
- [ ] Show system Bluetooth availability status
|
|
61
|
+
### Must Do (Next Release)
|
|
47
62
|
|
|
48
|
-
|
|
63
|
+
1. Better Loading States
|
|
49
64
|
|
|
50
|
-
|
|
51
|
-
- [ ] Show "Last scanned: X minutes ago" with timestamp
|
|
52
|
-
- [ ] Add "Refresh" button to re-scan
|
|
53
|
-
- [ ] Show cached results immediately on page load
|
|
54
|
-
- [ ] Auto-refresh option with configurable interval
|
|
65
|
+
### Should Do (Soon)
|
|
55
66
|
|
|
56
|
-
|
|
67
|
+
1. Connection Recommendations
|
|
68
|
+
2. Device Grouping
|
|
69
|
+
3. Test discovery with real hardware
|
|
70
|
+
4. Update README with new features
|
|
57
71
|
|
|
58
|
-
|
|
59
|
-
- [ ] Show extended information:
|
|
60
|
-
- [ ] Battery level (if available)
|
|
61
|
-
- [ ] Firmware version
|
|
62
|
-
- [ ] Cloud service enabled/disabled status
|
|
63
|
-
- [ ] Last seen timestamp
|
|
64
|
-
- [ ] Full MAC address
|
|
65
|
-
- [ ] Device capabilities/features
|
|
66
|
-
- [ ] Add "Copy ID" and "Copy MAC" buttons
|
|
72
|
+
### Nice to Have (Future)
|
|
67
73
|
|
|
68
|
-
|
|
74
|
+
1. Configurable BLE Scan
|
|
75
|
+
2. Discovery History/Cache
|
|
76
|
+
3. Connection Testing
|
|
77
|
+
4. Batch Import
|
|
78
|
+
5. Device Health Dashboard
|
|
69
79
|
|
|
70
|
-
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Notes
|
|
83
|
+
|
|
84
|
+
- See [COMPLETED.md](COMPLETED.md) for all completed features
|
|
85
|
+
- UI mockups available in [mockups/](mockups/) directory
|
|
86
|
+
- Consider user feedback on most-wanted features
|
|
87
|
+
- Test all changes with real SwitchBot devices
|
|
88
|
+
- Maintain backwards compatibility with existing configs
|
|
89
|
+
- Keep UI responsive and fast (< 500ms interactions)
|
|
90
|
+
- Follow Homebridge UI/UX conventions
|
|
91
|
+
# Integration: node-switchbot Beta Updates (March 2026)
|
|
92
|
+
|
|
93
|
+
## Tasks to Integrate Latest node-switchbot Features
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
## Next Features
|
|
97
|
+
|
|
98
|
+
### Advanced Features (Priority: Low)
|
|
71
99
|
|
|
72
|
-
- [ ] Show devices as they're discovered (streaming results)
|
|
73
|
-
- [ ] Add animated "pulsing" indicator for active BLE scan
|
|
74
|
-
- [ ] Update RSSI values in real-time during scan
|
|
75
|
-
- [ ] Show "X devices found..." counter during scan
|
|
76
100
|
|
|
77
|
-
#### 8. Connection Testing
|
|
78
101
|
|
|
79
|
-
- [ ] Add "Test Connection" button per device
|
|
80
|
-
- [ ] Attempt to connect and read basic device status
|
|
81
|
-
- [ ] Show success/failure indicator with details
|
|
82
|
-
- [ ] Display connection latency
|
|
83
|
-
- [ ] Show which connection method succeeded (BLE/API)
|
|
84
102
|
|
|
85
|
-
####
|
|
103
|
+
#### 8. Batch Import
|
|
86
104
|
|
|
87
105
|
- [ ] Add checkboxes to select multiple devices
|
|
88
106
|
- [ ] Add "Add Selected to Config" button
|
|
89
107
|
- [ ] Implement bulk configuration with smart defaults
|
|
90
|
-
- [ ] Show progress for batch operations
|
|
91
|
-
- [ ] Allow batch enable/disable of devices
|
|
92
108
|
|
|
93
|
-
#### 10. Device Health Dashboard
|
|
94
109
|
|
|
95
|
-
- [
|
|
96
|
-
- [
|
|
97
|
-
- [ ] Show offline/unreachable warnings
|
|
110
|
+
- [x] Show firmware update available indicators
|
|
111
|
+
- [x] Show offline/unreachable warnings
|
|
98
112
|
- [ ] Add "Needs Attention" section at top
|
|
99
113
|
- [ ] Implement battery level trending (if historical data available)
|
|
100
114
|
|
|
101
|
-
####
|
|
115
|
+
#### 10. Export/Import Discovery
|
|
102
116
|
|
|
103
117
|
- [ ] Add "Export Results" button (JSON format)
|
|
104
118
|
- [ ] Add "Import Results" for comparison or troubleshooting
|