node-switchbot 4.0.0-beta.1 → 4.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/copilot-instructions.md +19 -5
- package/BLE.md +117 -4
- package/CHANGELOG.md +45 -0
- package/README.md +7 -1
- package/dist/api.d.ts +3 -3
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +9 -6
- package/dist/api.js.map +1 -1
- package/dist/ble.d.ts +38 -4
- package/dist/ble.d.ts.map +1 -1
- package/dist/ble.js +409 -53
- package/dist/ble.js.map +1 -1
- package/dist/devices/base.d.ts +83 -5
- package/dist/devices/base.d.ts.map +1 -1
- package/dist/devices/base.js +371 -34
- package/dist/devices/base.js.map +1 -1
- package/dist/devices/device-override-state-during-connection.d.ts +27 -0
- package/dist/devices/device-override-state-during-connection.d.ts.map +1 -0
- package/dist/devices/device-override-state-during-connection.js +45 -0
- package/dist/devices/device-override-state-during-connection.js.map +1 -0
- package/dist/devices/index.d.ts +29 -0
- package/dist/devices/index.d.ts.map +1 -1
- package/dist/devices/index.js +29 -0
- package/dist/devices/index.js.map +1 -1
- package/dist/devices/sequence-device.d.ts +36 -0
- package/dist/devices/sequence-device.d.ts.map +1 -0
- package/dist/devices/sequence-device.js +75 -0
- package/dist/devices/sequence-device.js.map +1 -0
- package/dist/devices/wo-air-purifier.d.ts +2 -2
- package/dist/devices/wo-air-purifier.d.ts.map +1 -1
- package/dist/devices/wo-air-purifier.js +2 -2
- package/dist/devices/wo-air-purifier.js.map +1 -1
- package/dist/devices/wo-art-frame.d.ts +8 -0
- package/dist/devices/wo-art-frame.d.ts.map +1 -0
- package/dist/devices/wo-art-frame.js +12 -0
- package/dist/devices/wo-art-frame.js.map +1 -0
- package/dist/devices/wo-bulb.d.ts +10 -0
- package/dist/devices/wo-bulb.d.ts.map +1 -1
- package/dist/devices/wo-bulb.js +69 -0
- package/dist/devices/wo-bulb.js.map +1 -1
- package/dist/devices/wo-circulator-fan.d.ts +8 -0
- package/dist/devices/wo-circulator-fan.d.ts.map +1 -0
- package/dist/devices/wo-circulator-fan.js +12 -0
- package/dist/devices/wo-circulator-fan.js.map +1 -0
- package/dist/devices/wo-climate-panel.d.ts +8 -0
- package/dist/devices/wo-climate-panel.d.ts.map +1 -0
- package/dist/devices/wo-climate-panel.js +12 -0
- package/dist/devices/wo-climate-panel.js.map +1 -0
- package/dist/devices/wo-curtain.d.ts +3 -3
- package/dist/devices/wo-curtain.d.ts.map +1 -1
- package/dist/devices/wo-curtain.js +12 -9
- package/dist/devices/wo-curtain.js.map +1 -1
- package/dist/devices/wo-floor-lamp.d.ts +8 -0
- package/dist/devices/wo-floor-lamp.d.ts.map +1 -0
- package/dist/devices/wo-floor-lamp.js +12 -0
- package/dist/devices/wo-floor-lamp.js.map +1 -0
- package/dist/devices/wo-garage-door-opener.d.ts +8 -0
- package/dist/devices/wo-garage-door-opener.d.ts.map +1 -0
- package/dist/devices/wo-garage-door-opener.js +12 -0
- package/dist/devices/wo-garage-door-opener.js.map +1 -0
- package/dist/devices/wo-hand.d.ts +53 -2
- package/dist/devices/wo-hand.d.ts.map +1 -1
- package/dist/devices/wo-hand.js +121 -3
- package/dist/devices/wo-hand.js.map +1 -1
- package/dist/devices/wo-hubmini-matter.d.ts +8 -0
- package/dist/devices/wo-hubmini-matter.d.ts.map +1 -0
- package/dist/devices/wo-hubmini-matter.js +12 -0
- package/dist/devices/wo-hubmini-matter.js.map +1 -0
- package/dist/devices/wo-humi2.d.ts +12 -0
- package/dist/devices/wo-humi2.d.ts.map +1 -1
- package/dist/devices/wo-humi2.js +18 -0
- package/dist/devices/wo-humi2.js.map +1 -1
- package/dist/devices/wo-keypad-vision-pro.d.ts +18 -0
- package/dist/devices/wo-keypad-vision-pro.d.ts.map +1 -0
- package/dist/devices/wo-keypad-vision-pro.js +15 -0
- package/dist/devices/wo-keypad-vision-pro.js.map +1 -0
- package/dist/devices/wo-keypad-vision.d.ts +8 -0
- package/dist/devices/wo-keypad-vision.d.ts.map +1 -0
- package/dist/devices/wo-keypad-vision.js +12 -0
- package/dist/devices/wo-keypad-vision.js.map +1 -0
- package/dist/devices/wo-lock-lite.d.ts +7 -0
- package/dist/devices/wo-lock-lite.d.ts.map +1 -0
- package/dist/devices/wo-lock-lite.js +11 -0
- package/dist/devices/wo-lock-lite.js.map +1 -0
- package/dist/devices/wo-lock-pro-wifi.d.ts +7 -0
- package/dist/devices/wo-lock-pro-wifi.d.ts.map +1 -0
- package/dist/devices/wo-lock-pro-wifi.js +11 -0
- package/dist/devices/wo-lock-pro-wifi.js.map +1 -0
- package/dist/devices/wo-lock-pro.d.ts +11 -2
- package/dist/devices/wo-lock-pro.d.ts.map +1 -1
- package/dist/devices/wo-lock-pro.js +65 -3
- package/dist/devices/wo-lock-pro.js.map +1 -1
- package/dist/devices/wo-lock-vision-pro.d.ts +7 -0
- package/dist/devices/wo-lock-vision-pro.d.ts.map +1 -0
- package/dist/devices/wo-lock-vision-pro.js +11 -0
- package/dist/devices/wo-lock-vision-pro.js.map +1 -0
- package/dist/devices/wo-lock-vision.d.ts +7 -0
- package/dist/devices/wo-lock-vision.d.ts.map +1 -0
- package/dist/devices/wo-lock-vision.js +11 -0
- package/dist/devices/wo-lock-vision.js.map +1 -0
- package/dist/devices/wo-lock.d.ts +7 -2
- package/dist/devices/wo-lock.d.ts.map +1 -1
- package/dist/devices/wo-lock.js +58 -3
- package/dist/devices/wo-lock.js.map +1 -1
- package/dist/devices/wo-plug-mini-us.d.ts +2 -2
- package/dist/devices/wo-plug-mini-us.d.ts.map +1 -1
- package/dist/devices/wo-plug-mini-us.js +2 -2
- package/dist/devices/wo-plug-mini-us.js.map +1 -1
- package/dist/devices/wo-relay-switch-1.d.ts +4 -2
- package/dist/devices/wo-relay-switch-1.d.ts.map +1 -1
- package/dist/devices/wo-relay-switch-1.js +36 -4
- package/dist/devices/wo-relay-switch-1.js.map +1 -1
- package/dist/devices/wo-relay-switch-2pm.d.ts +21 -0
- package/dist/devices/wo-relay-switch-2pm.d.ts.map +1 -0
- package/dist/devices/wo-relay-switch-2pm.js +39 -0
- package/dist/devices/wo-relay-switch-2pm.js.map +1 -0
- package/dist/devices/wo-rgbic-bulb.d.ts +29 -0
- package/dist/devices/wo-rgbic-bulb.d.ts.map +1 -0
- package/dist/devices/wo-rgbic-bulb.js +84 -0
- package/dist/devices/wo-rgbic-bulb.js.map +1 -0
- package/dist/devices/wo-rgbicww-floor-lamp.d.ts +8 -0
- package/dist/devices/wo-rgbicww-floor-lamp.d.ts.map +1 -0
- package/dist/devices/wo-rgbicww-floor-lamp.js +12 -0
- package/dist/devices/wo-rgbicww-floor-lamp.js.map +1 -0
- package/dist/devices/wo-rgbicww-strip-light.d.ts +8 -0
- package/dist/devices/wo-rgbicww-strip-light.d.ts.map +1 -0
- package/dist/devices/wo-rgbicww-strip-light.js +12 -0
- package/dist/devices/wo-rgbicww-strip-light.js.map +1 -0
- package/dist/devices/wo-roller-shade.d.ts +8 -0
- package/dist/devices/wo-roller-shade.d.ts.map +1 -0
- package/dist/devices/wo-roller-shade.js +12 -0
- package/dist/devices/wo-roller-shade.js.map +1 -0
- package/dist/devices/wo-smart-thermostat-radiator.d.ts +8 -0
- package/dist/devices/wo-smart-thermostat-radiator.d.ts.map +1 -0
- package/dist/devices/wo-smart-thermostat-radiator.js +12 -0
- package/dist/devices/wo-smart-thermostat-radiator.js.map +1 -0
- package/dist/devices/wo-strip-light-3.d.ts +8 -0
- package/dist/devices/wo-strip-light-3.d.ts.map +1 -0
- package/dist/devices/wo-strip-light-3.js +12 -0
- package/dist/devices/wo-strip-light-3.js.map +1 -0
- package/dist/devices/wo-vacuum-k10-plus.d.ts +7 -0
- package/dist/devices/wo-vacuum-k10-plus.d.ts.map +1 -0
- package/dist/devices/wo-vacuum-k10-plus.js +11 -0
- package/dist/devices/wo-vacuum-k10-plus.js.map +1 -0
- package/dist/devices/wo-vacuum-k10-pro-combo.d.ts +7 -0
- package/dist/devices/wo-vacuum-k10-pro-combo.d.ts.map +1 -0
- package/dist/devices/wo-vacuum-k10-pro-combo.js +11 -0
- package/dist/devices/wo-vacuum-k10-pro-combo.js.map +1 -0
- package/dist/devices/wo-vacuum-k10-pro.d.ts +7 -0
- package/dist/devices/wo-vacuum-k10-pro.d.ts.map +1 -0
- package/dist/devices/wo-vacuum-k10-pro.js +11 -0
- package/dist/devices/wo-vacuum-k10-pro.js.map +1 -0
- package/dist/devices/wo-vacuum-k11-plus.d.ts +7 -0
- package/dist/devices/wo-vacuum-k11-plus.d.ts.map +1 -0
- package/dist/devices/wo-vacuum-k11-plus.js +11 -0
- package/dist/devices/wo-vacuum-k11-plus.js.map +1 -0
- package/dist/devices/wo-vacuum-k20.d.ts +7 -0
- package/dist/devices/wo-vacuum-k20.d.ts.map +1 -0
- package/dist/devices/wo-vacuum-k20.js +11 -0
- package/dist/devices/wo-vacuum-k20.js.map +1 -0
- package/dist/devices/wo-vacuum-s10.d.ts +7 -0
- package/dist/devices/wo-vacuum-s10.d.ts.map +1 -0
- package/dist/devices/wo-vacuum-s10.js +11 -0
- package/dist/devices/wo-vacuum-s10.js.map +1 -0
- package/dist/devices/wo-vacuum-s20.d.ts +7 -0
- package/dist/devices/wo-vacuum-s20.d.ts.map +1 -0
- package/dist/devices/wo-vacuum-s20.js +11 -0
- package/dist/devices/wo-vacuum-s20.js.map +1 -0
- package/dist/devices/wo-vacuum.d.ts +44 -0
- package/dist/devices/wo-vacuum.d.ts.map +1 -0
- package/dist/devices/wo-vacuum.js +117 -0
- package/dist/devices/wo-vacuum.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/settings.d.ts +27 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +76 -6
- package/dist/settings.js.map +1 -1
- package/dist/switchbot.d.ts.map +1 -1
- package/dist/switchbot.js +86 -9
- package/dist/switchbot.js.map +1 -1
- package/dist/types/ble.d.ts +20 -1
- package/dist/types/ble.d.ts.map +1 -1
- package/dist/types/ble.js.map +1 -1
- package/dist/types/device.d.ts +49 -3
- package/dist/types/device.d.ts.map +1 -1
- package/dist/types/index.d.ts +22 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utils/bot-ble.d.ts +36 -0
- package/dist/utils/bot-ble.d.ts.map +1 -0
- package/dist/utils/bot-ble.js +109 -0
- package/dist/utils/bot-ble.js.map +1 -0
- package/dist/utils/circuit-breaker.d.ts +98 -0
- package/dist/utils/circuit-breaker.d.ts.map +1 -0
- package/dist/utils/circuit-breaker.js +187 -0
- package/dist/utils/circuit-breaker.js.map +1 -0
- package/dist/utils/connection-tracker.d.ts +66 -0
- package/dist/utils/connection-tracker.d.ts.map +1 -0
- package/dist/utils/connection-tracker.js +184 -0
- package/dist/utils/connection-tracker.js.map +1 -0
- package/dist/utils/fallback-handler.d.ts +68 -0
- package/dist/utils/fallback-handler.d.ts.map +1 -0
- package/dist/utils/fallback-handler.js +131 -0
- package/dist/utils/fallback-handler.js.map +1 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +41 -4
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/retry.d.ts +55 -0
- package/dist/utils/retry.d.ts.map +1 -0
- package/dist/utils/retry.js +95 -0
- package/dist/utils/retry.js.map +1 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/APIError.html +2 -2
- package/docs/classes/APINotAvailableError.html +2 -2
- package/docs/classes/BLEConnection.html +16 -10
- package/docs/classes/BLENotAvailableError.html +2 -2
- package/docs/classes/BLEScanner.html +11 -9
- package/docs/classes/CommandFailedError.html +2 -2
- package/docs/classes/ConnectionTimeoutError.html +2 -2
- package/docs/classes/DeviceManager.html +13 -13
- package/docs/classes/DeviceNotFoundError.html +2 -2
- package/docs/classes/DeviceOverrideStateDuringConnection.html +56 -0
- package/docs/classes/DiscoveryError.html +2 -2
- package/docs/classes/OpenAPIClient.html +24 -24
- package/docs/classes/SequenceDevice.html +58 -0
- package/docs/classes/SwitchBot.html +11 -11
- package/docs/classes/SwitchBotDevice.html +43 -15
- package/docs/classes/SwitchBotError.html +2 -2
- package/docs/classes/ValidationError.html +2 -2
- package/docs/classes/WoAirPurifier.html +48 -18
- package/docs/classes/WoAirPurifierTable.html +48 -18
- package/docs/classes/WoArtFrame.html +71 -0
- package/docs/classes/WoBlindTilt.html +48 -20
- package/docs/classes/WoBulb.html +52 -19
- package/docs/classes/WoCeilingLight.html +52 -19
- package/docs/classes/WoCirculatorFan.html +66 -0
- package/docs/classes/WoClimatePanel.html +66 -0
- package/docs/classes/WoContact.html +42 -14
- package/docs/classes/WoCurtain.html +46 -18
- package/docs/classes/WoFloorLamp.html +71 -0
- package/docs/classes/WoGarageDoorOpener.html +64 -0
- package/docs/classes/WoHand.html +63 -19
- package/docs/classes/WoHub2.html +42 -14
- package/docs/classes/WoHub3.html +42 -14
- package/docs/classes/WoHubMiniMatter.html +56 -0
- package/docs/classes/WoHumi.html +46 -18
- package/docs/classes/WoHumi2.html +52 -18
- package/docs/classes/WoIOSensorTH.html +42 -14
- package/docs/classes/WoKeypad.html +42 -14
- package/docs/classes/WoKeypadVision.html +56 -0
- package/docs/classes/WoKeypadVisionPro.html +56 -0
- package/docs/classes/WoLeak.html +42 -14
- package/docs/classes/WoPlugMiniJP.html +45 -17
- package/docs/classes/WoPlugMiniUS.html +45 -17
- package/docs/classes/WoPresence.html +42 -14
- package/docs/classes/WoRGBICBulb.html +82 -0
- package/docs/classes/WoRGBICWWFloorLamp.html +82 -0
- package/docs/classes/WoRGBICWWStripLight.html +82 -0
- package/docs/classes/WoRelaySwitch1.html +47 -17
- package/docs/classes/WoRelaySwitch1PM.html +47 -17
- package/docs/classes/WoRelaySwitch2PM.html +68 -0
- package/docs/classes/WoRemote.html +42 -14
- package/docs/classes/WoRollerShade.html +64 -0
- package/docs/classes/WoSensorTH.html +42 -14
- package/docs/classes/WoSensorTHPlus.html +42 -14
- package/docs/classes/WoSensorTHPro.html +42 -14
- package/docs/classes/WoSensorTHProCO2.html +42 -14
- package/docs/classes/WoSmartLock.html +49 -16
- package/docs/classes/WoSmartLockLite.html +64 -0
- package/docs/classes/WoSmartLockPro.html +52 -17
- package/docs/classes/WoSmartLockProWiFi.html +68 -0
- package/docs/classes/WoSmartLockVision.html +64 -0
- package/docs/classes/WoSmartLockVisionPro.html +68 -0
- package/docs/classes/WoSmartThermostatRadiator.html +66 -0
- package/docs/classes/WoStrip.html +52 -19
- package/docs/classes/WoStripLight3.html +71 -0
- package/docs/classes/WoVacuum.html +71 -0
- package/docs/classes/WoVacuumK10Plus.html +71 -0
- package/docs/classes/WoVacuumK10Pro.html +71 -0
- package/docs/classes/WoVacuumK10ProCombo.html +71 -0
- package/docs/classes/WoVacuumK11Plus.html +71 -0
- package/docs/classes/WoVacuumK20.html +71 -0
- package/docs/classes/WoVacuumS10.html +71 -0
- package/docs/classes/WoVacuumS20.html +71 -0
- package/docs/enums/LogLevel.html +2 -2
- package/docs/enums/SwitchBotBLEModel.html +2 -2
- package/docs/enums/SwitchBotBLEModelName.html +2 -2
- package/docs/functions/updateBaseURL.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +2 -2
- package/docs/interfaces/APICommandRequest.html +2 -2
- package/docs/interfaces/APICommandResponse.html +2 -2
- package/docs/interfaces/APIDevice.html +2 -2
- package/docs/interfaces/APIDeviceStatus.html +2 -2
- package/docs/interfaces/APIErrorResponse.html +2 -2
- package/docs/interfaces/APIResponse.html +2 -2
- package/docs/interfaces/AirPurifierCommands.html +2 -2
- package/docs/interfaces/AirPurifierServiceData.html +20 -5
- package/docs/interfaces/AirPurifierStatus.html +7 -7
- package/docs/interfaces/BLEAdvertisement.html +3 -2
- package/docs/interfaces/BLEScanOptions.html +5 -5
- package/docs/interfaces/BLEServiceData.html +22 -5
- package/docs/interfaces/BlindTiltCommands.html +2 -2
- package/docs/interfaces/BlindTiltServiceData.html +21 -5
- package/docs/interfaces/BlindTiltStatus.html +6 -6
- package/docs/interfaces/BotCommands.html +6 -2
- package/docs/interfaces/BotServiceData.html +20 -5
- package/docs/interfaces/BotStatus.html +6 -6
- package/docs/interfaces/BulbCommands.html +4 -2
- package/docs/interfaces/BulbServiceData.html +21 -5
- package/docs/interfaces/BulbStatus.html +6 -6
- package/docs/interfaces/CeilingLightCommands.html +4 -2
- package/docs/interfaces/CeilingLightServiceData.html +21 -5
- package/docs/interfaces/CeilingLightStatus.html +6 -6
- package/docs/interfaces/CommandResult.html +6 -6
- package/docs/interfaces/ContactServiceData.html +22 -5
- package/docs/interfaces/ContactStatus.html +6 -6
- package/docs/interfaces/CurtainCommands.html +2 -2
- package/docs/interfaces/CurtainServiceData.html +22 -5
- package/docs/interfaces/CurtainStatus.html +6 -6
- package/docs/interfaces/DeviceInfo.html +23 -13
- package/docs/interfaces/DeviceListResponse.html +2 -2
- package/docs/interfaces/DeviceStatus.html +6 -6
- package/docs/interfaces/DiscoveryOptions.html +7 -7
- package/docs/interfaces/HubServiceData.html +22 -5
- package/docs/interfaces/HubStatus.html +6 -6
- package/docs/interfaces/HumidifierCommands.html +2 -2
- package/docs/interfaces/HumidifierServiceData.html +23 -6
- package/docs/interfaces/HumidifierStatus.html +6 -6
- package/docs/interfaces/KeypadStatus.html +6 -6
- package/docs/interfaces/LeakServiceData.html +22 -5
- package/docs/interfaces/LeakStatus.html +6 -6
- package/docs/interfaces/LockCommands.html +6 -2
- package/docs/interfaces/LockServiceData.html +20 -6
- package/docs/interfaces/LockStatus.html +6 -6
- package/docs/interfaces/MeterServiceData.html +22 -5
- package/docs/interfaces/MeterStatus.html +6 -6
- package/docs/interfaces/MotionServiceData.html +22 -5
- package/docs/interfaces/MotionStatus.html +6 -6
- package/docs/interfaces/PlugCommands.html +2 -2
- package/docs/interfaces/PlugServiceData.html +21 -5
- package/docs/interfaces/PlugStatus.html +6 -6
- package/docs/interfaces/PresenceServiceData.html +22 -5
- package/docs/interfaces/PresenceStatus.html +6 -6
- package/docs/interfaces/RelaySwitchCommands.html +2 -2
- package/docs/interfaces/RelaySwitchServiceData.html +21 -5
- package/docs/interfaces/RelaySwitchStatus.html +6 -6
- package/docs/interfaces/RemoteStatus.html +6 -6
- package/docs/interfaces/SceneListResponse.html +2 -2
- package/docs/interfaces/StripCommands.html +4 -2
- package/docs/interfaces/StripServiceData.html +21 -5
- package/docs/interfaces/StripStatus.html +6 -6
- package/docs/interfaces/SwitchBotConfig.html +21 -9
- package/docs/interfaces/VacuumCommands.html +8 -0
- package/docs/interfaces/VacuumStatus.html +16 -0
- package/docs/interfaces/WebhookConfig.html +2 -2
- package/docs/interfaces/WebhookDetails.html +2 -2
- package/docs/interfaces/WebhookQueryResponse.html +2 -2
- package/docs/interfaces/WebhookSetupResponse.html +2 -2
- package/docs/media/BLE.md +117 -4
- package/docs/modules.html +1 -1
- package/docs/types/ConnectionType.html +1 -1
- package/docs/types/PhysicalDeviceType.html +1 -1
- package/docs/types/VirtualDeviceType.html +1 -1
- package/docs/variables/urls.html +1 -1
- package/package.json +11 -7
- package/tmp-switchbot-scan.mjs +79 -0
- package/todo/PYSWITCHBOT_COMPARISON.md +484 -0
- package/todo/README.md +68 -0
- package/todo/completed.md +309 -0
- package/todo/todo.md +302 -0
- package/tsconfig.build.json +17 -0
- package/PRODUCTION_READY.md +0 -135
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
# Completed Tasks
|
|
2
|
+
|
|
3
|
+
Track completed implementation tasks from the pySwitchBot comparison roadmap.
|
|
4
|
+
|
|
5
|
+
Last Updated: March 7, 2026
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Phase 3: New Devices - Other Devices Block (March 7, 2026)
|
|
10
|
+
|
|
11
|
+
### Task 17.6: HubMini Matter ✅
|
|
12
|
+
**Implementation Details:**
|
|
13
|
+
- Created `WoHubMiniMatter` class extending `WoHub2` in `src/devices/wo-hubmini-matter.ts`
|
|
14
|
+
- Inherits all hub functionality: `getStatus()` returning sensor data (temperature, humidity, lightLevel)
|
|
15
|
+
- Wired through 3-layer export chain (device → devices/index.ts → src/index.ts)
|
|
16
|
+
- Added to runtime registry: `DEVICE_CLASSES['WoHubMiniMatter']` in `src/switchbot.ts`
|
|
17
|
+
- Added device-type mappings in `src/settings.ts`: "HubMini Matter", "SwitchBot HubMini Matter"
|
|
18
|
+
- Created `test/hubmini-matter.test.ts` with 3 tests validating device-type mappings and method inheritance from WoHub2
|
|
19
|
+
- Full validation passed: build ✅ tests ✅ (233 passing) lint ✅ type-check ✅
|
|
20
|
+
|
|
21
|
+
### Task 17.5: Hub3 Enhancement ✅
|
|
22
|
+
**Implementation Details:**
|
|
23
|
+
- Enhanced existing `WoHub3` class (extends `WoHub2` in `src/devices/wo-hub3.ts`)
|
|
24
|
+
- Added device-type alias in `src/settings.ts`: "SwitchBot Hub 3" (in addition to existing "Hub 3")
|
|
25
|
+
- Created `test/hub3.test.ts` with 3 tests validating device-type mappings and method inheritance from WoHub2
|
|
26
|
+
- Verified inheritance: `getStatus()` method returns hub sensor data (temperature, humidity, lightLevel)
|
|
27
|
+
- Full validation passed: build ✅ tests ✅ (230 passing) lint ✅ type-check ✅
|
|
28
|
+
|
|
29
|
+
### Task 17.4: Keypad Vision Pro ✅
|
|
30
|
+
**Implementation Details:**
|
|
31
|
+
- Created `WoKeypadVisionPro` class extending `WoKeypad` in `src/devices/wo-keypad-vision-pro.ts`
|
|
32
|
+
- Inherits all keypad functionality: `getStatus()` methods
|
|
33
|
+
- Wired through 3-layer export chain (device → devices/index.ts → src/index.ts)
|
|
34
|
+
- Added to runtime registry: `DEVICE_CLASSES['WoKeypadVisionPro']` in `src/switchbot.ts`
|
|
35
|
+
- Added device-type mappings in `src/settings.ts`: "Keypad Vision Pro", "SwitchBot Keypad Vision Pro"
|
|
36
|
+
- Created `test/keypad-vision-pro.test.ts` with 3 tests validating device-type mapping and method inheritance
|
|
37
|
+
- Full validation passed: build ✅ tests ✅ (227 passing) lint ✅ type-check ✅
|
|
38
|
+
|
|
39
|
+
### Task 17.3: Keypad Vision ✅
|
|
40
|
+
**Implementation Details:**
|
|
41
|
+
- Created `WoKeypadVision` class extending `WoKeypad` in `src/devices/wo-keypad-vision.ts`
|
|
42
|
+
- Inherits all keypad functionality: `getStatus()` methods
|
|
43
|
+
- Wired through 3-layer export chain (device → devices/index.ts → src/index.ts)
|
|
44
|
+
- Added to runtime registry: `DEVICE_CLASSES['WoKeypadVision']` in `src/switchbot.ts`
|
|
45
|
+
- Added device-type mappings in `src/settings.ts`: "Keypad Vision", "SwitchBot Keypad Vision"
|
|
46
|
+
- Created `test/keypad-vision.test.ts` with 3 tests validating device-type mapping and method inheritance
|
|
47
|
+
- Full validation passed: build ✅ tests ✅ (224 passing) lint ✅ type-check ✅
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Phase 0: Foundation & Preparation ✅
|
|
52
|
+
|
|
53
|
+
### BLE Infrastructure Hardening (Completed March 6, 2026)
|
|
54
|
+
- [x] Add enumerable device properties for Homebridge compatibility
|
|
55
|
+
- [x] Implement ID-based BLE lookups for macOS (empty MAC address support)
|
|
56
|
+
- [x] Add manufacturer data MAC extraction fallback
|
|
57
|
+
- [x] Broaden discovery filters for legacy UUIDs (000d)
|
|
58
|
+
- [x] Add peripheral validation (connectable flag, RSSI bounds)
|
|
59
|
+
- [x] Implement BLE event listener cleanup
|
|
60
|
+
- [x] Add connection error cleanup (characteristics discovery failure)
|
|
61
|
+
- [x] Create BLE lifecycle regression tests
|
|
62
|
+
- [x] Fix resource leaks (event listeners, connection maps)
|
|
63
|
+
|
|
64
|
+
### Testing & Validation (Completed March 6-7, 2026)
|
|
65
|
+
- [x] 124 unit tests passing
|
|
66
|
+
- [x] BLE scanner lifecycle tests
|
|
67
|
+
- [x] BLE connection cleanup tests
|
|
68
|
+
- [x] macOS compatibility validation (45 real devices)
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Phase 1: Core Parity Sprint ✅
|
|
73
|
+
|
|
74
|
+
### Completed March 7, 2026
|
|
75
|
+
- [x] Advertisement status parsing and model cache support
|
|
76
|
+
- Added richer advertisement parsing for Bot, Curtain/Curtain3, Lock/Lock Pro, and Relay Switch models
|
|
77
|
+
- Added per-discovery model cache in `BLEScanner`
|
|
78
|
+
- Stored parsed BLE service data on device info for status fallback
|
|
79
|
+
|
|
80
|
+
- [x] Curtain speed control
|
|
81
|
+
- Added optional speed to `open`, `close`, and `setPosition` commands
|
|
82
|
+
- Updated BLE payload and OpenAPI `setPosition` parameter construction
|
|
83
|
+
|
|
84
|
+
- [x] GCM/CTR BLE encryption plumbing
|
|
85
|
+
- Added encryption mode (`auto`/`ctr`/`gcm`) support in `BLEConnection`
|
|
86
|
+
- Added IV length validation, auto mode resolution, and GCM IV increment behavior
|
|
87
|
+
|
|
88
|
+
- [x] BLE command result and password response validation
|
|
89
|
+
- Added command response checks for ack bytes (`0x01`, `0x05`, `0x06`)
|
|
90
|
+
- Added password-required (`0x07`) and password-incorrect (`0x09`) detection
|
|
91
|
+
|
|
92
|
+
- [x] Persistent BLE connections + operation locking
|
|
93
|
+
- Added per-device operation lock queue in `BLEConnection`
|
|
94
|
+
- Added configurable persistent connection timer with auto-disconnect
|
|
95
|
+
- Added device-level BLE command serialization in base device class
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Phase 2: Command Enhancement (Wave 1) ✅
|
|
100
|
+
|
|
101
|
+
### Completed March 7, 2026
|
|
102
|
+
- [x] Bot mode configuration
|
|
103
|
+
- Implemented `setMode('press'|'switch')`, `setLongPress(duration)`, `handUp()`, and `handDown()` on `WoHand`
|
|
104
|
+
|
|
105
|
+
- [x] Lock advanced features
|
|
106
|
+
- Implemented `unlockWithoutUnlatch()` on `WoSmartLockPro`
|
|
107
|
+
- Added smart pre-checks to skip lock/unlock when already in target state
|
|
108
|
+
- Added `getLockInfo()` helper on lock devices
|
|
109
|
+
- Added BLE notification subscription hooks for lock updates
|
|
110
|
+
|
|
111
|
+
- [x] Light effect presets
|
|
112
|
+
- Added 20 preset effects with `setEffect(effectName, speed)` on `WoBulb`/`WoStrip`
|
|
113
|
+
|
|
114
|
+
- [x] Relay power monitoring
|
|
115
|
+
- Added relay basic-info parsing for voltage/current/energy from BLE response payload
|
|
116
|
+
- Integrated parsed metrics into relay BLE status response
|
|
117
|
+
|
|
118
|
+
- [x] Phase 2 regression coverage
|
|
119
|
+
- Added `test/phase2-features.test.ts` covering Bot mode config, lock smart detection, light effects, and relay metrics parsing
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Phase 2: Command Enhancement (Wave 2) ✅
|
|
124
|
+
|
|
125
|
+
### Completed March 7, 2026
|
|
126
|
+
- [x] Relay 2PM channel-specific control (Task 5.3)
|
|
127
|
+
- Created `WoRelaySwitch2PM` class extending `WoRelaySwitch1`
|
|
128
|
+
- Implemented `setChannel1(state: boolean)` and `setChannel2(state: boolean)` methods
|
|
129
|
+
- Added channel-specific command constants (CHANNEL1_ON/OFF, CHANNEL2_ON/OFF) to DEVICE_COMMANDS.RELAY
|
|
130
|
+
|
|
131
|
+
- [x] Bulb color temperature with min/max bounds (Task 6.3)
|
|
132
|
+
- Added `setColorTemp(minTemp, maxTemp, temp)` method to `WoBulb` class
|
|
133
|
+
- Command format: `0x57 0x0F 0x47 0x01 0x17 BRIGHTNESS MIN_KEL MAX_KEL TEMP`
|
|
134
|
+
- Validates and clamps temperatures, ensures current temp within min/max bounds
|
|
135
|
+
- Auto-corrects reversed min/max values
|
|
136
|
+
|
|
137
|
+
- [x] RGBIC bulb segmented control (Task 6.2)
|
|
138
|
+
- Created `WoRGBICBulb` class extending `WoBulb`
|
|
139
|
+
- Implemented `setSegmentColor(segmentId, r, g, b)` for individual LED segment color control
|
|
140
|
+
- Implemented `setSegmentEffect(segmentId, effectName, speed)` for segment-specific effects
|
|
141
|
+
- Added 25 RGBIC effects including segment_cycle, segment_wave, segment_chase, segment_strobe, segment_twinkle
|
|
142
|
+
- Inherits all standard bulb features from WoBulb (standard effects, color temperature bounds)
|
|
143
|
+
|
|
144
|
+
- [x] Phase 2 Wave 2 regression coverage
|
|
145
|
+
- Added `test/phase2-remaining.test.ts` with 21 tests covering Relay 2PM channels, color temperature bounds, and RGBIC segmented control
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Phase 2: Advanced Features ✅
|
|
150
|
+
|
|
151
|
+
### Completed March 7, 2026
|
|
152
|
+
- [x] Sequence device pattern (Task 21.1)
|
|
153
|
+
- Added `SequenceDevice` base class
|
|
154
|
+
- Tracks advertisement `sequenceNumber` changes and emits `sequence-changed`
|
|
155
|
+
- Auto-triggers `update()` on sequence changes with in-flight suppression
|
|
156
|
+
- Applied to lock, relay switch, and air purifier device families
|
|
157
|
+
- Added regression coverage in `test/sequence-device.test.ts`
|
|
158
|
+
|
|
159
|
+
- [x] Override state during connection pattern (Task 21.2)
|
|
160
|
+
- Added `DeviceOverrideStateDuringConnection` base class
|
|
161
|
+
- Ignores advertisement state (`bleServiceData`, battery, RSSI) while BLE connection is active
|
|
162
|
+
- Prevents stale advertisement fallback state during live connections
|
|
163
|
+
- Applied to bot and plug device families
|
|
164
|
+
- Added regression coverage in `test/device-override-state-during-connection.test.ts`
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Phase 3: New Device Types (Vacuum Variants) ✅
|
|
169
|
+
|
|
170
|
+
### Completed March 7, 2026
|
|
171
|
+
- [x] K10+ / K10+ Pro / K10+ Pro Combo vacuum variants (Tasks 12.1-12.3)
|
|
172
|
+
- Added `WoVacuumK10Plus`, `WoVacuumK10Pro`, and `WoVacuumK10ProCombo` classes
|
|
173
|
+
- Reused shared `WoVacuum` command/status behavior to avoid duplication
|
|
174
|
+
- Wired `DEVICE_CLASS_MAP` routing for K10 family API/BLE names
|
|
175
|
+
|
|
176
|
+
- [x] K11+ / K20 / S10 / S20 vacuum variants (Tasks 12.4-12.7)
|
|
177
|
+
- Added `WoVacuumK11Plus`, `WoVacuumK20`, `WoVacuumS10`, and `WoVacuumS20` classes
|
|
178
|
+
- Updated `SwitchBot` runtime device registry and package exports
|
|
179
|
+
- Added regression coverage in `test/vacuum-variants.test.ts` for class mapping
|
|
180
|
+
|
|
181
|
+
- [x] Lock Lite / Lock Vision variants (Tasks 13.1-13.2)
|
|
182
|
+
- Added `WoSmartLockLite` and `WoSmartLockVision` classes extending `WoSmartLock`
|
|
183
|
+
- Both variants use base lock functionality without unlatch support
|
|
184
|
+
- Wired `DEVICE_CLASS_MAP` routing for lock variant API/BLE names
|
|
185
|
+
|
|
186
|
+
- [x] Lock Vision Pro / Lock Pro WiFi variants (Tasks 13.3-13.4)
|
|
187
|
+
- Added `WoSmartLockVisionPro` and `WoSmartLockProWiFi` classes extending `WoSmartLockPro`
|
|
188
|
+
- Both variants inherit pro lock features including unlatch support
|
|
189
|
+
- Updated `SwitchBot` runtime device registry and package exports
|
|
190
|
+
- Added regression coverage in `test/lock-variants.test.ts` for class mapping and method inheritance
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Phase 3: New Device Types (Relay Variants) ✅
|
|
195
|
+
|
|
196
|
+
### Completed March 7, 2026
|
|
197
|
+
- [x] Relay Switch 2PM wiring completion (Task 14.1)
|
|
198
|
+
- WoRelaySwitch2PM class already existed from Phase 2
|
|
199
|
+
- Completed wiring through src/index.ts exports
|
|
200
|
+
- Added to src/switchbot.ts DEVICE_CLASSES registry
|
|
201
|
+
- Added 'Relay Switch 2PM' mapping to DEVICE_CLASS_MAP in src/settings.ts
|
|
202
|
+
|
|
203
|
+
- [x] Garage Door Opener relay variant (Task 14.2)
|
|
204
|
+
- Added WoGarageDoorOpener class extending WoRelaySwitch1
|
|
205
|
+
- Lightweight variant reuses relay switch control methods (turnOn/turnOff/toggle)
|
|
206
|
+
- Wired through exports, registry, and DEVICE_CLASS_MAP
|
|
207
|
+
- Added regression coverage in test/relay-variants.test.ts (4 tests)
|
|
208
|
+
- Tests verify: 2PM class mapping, Garage Door Opener mapping, channel methods on 2PM, relay methods on opener
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Phase 3: New Device Types (Climate Enhancements) ✅
|
|
213
|
+
|
|
214
|
+
### Completed March 7, 2026
|
|
215
|
+
- [x] Evaporative Humidifier (WoHumi2) enhancement (Task 15.1)
|
|
216
|
+
- Enhanced WoHumi2 with convenience methods: setAuto(), setManual(), setLevel(level)
|
|
217
|
+
- Added evaporative humidifier API aliases in DEVICE_CLASS_MAP to map to WoHumi2
|
|
218
|
+
- Added regression coverage in test/humidifier2-enhancement.test.ts (4 tests)
|
|
219
|
+
- Tests verify WoHumi2 method delegation and evaporative humidifier device-type mapping
|
|
220
|
+
|
|
221
|
+
- [x] Circulator Fan (Battery/USB) variant (Task 15.2)
|
|
222
|
+
- Added WoCirculatorFan class extending WoAirPurifier
|
|
223
|
+
- Wired fan class through exports and SwitchBot runtime DEVICE_CLASSES registry
|
|
224
|
+
- Added device-type aliases in DEVICE_CLASS_MAP for Battery/USB fan names
|
|
225
|
+
- Added regression coverage in test/circulator-fan-variants.test.ts (4 tests)
|
|
226
|
+
- Tests verify model mapping and inherited control methods (turnOn/turnOff/setFanSpeed)
|
|
227
|
+
|
|
228
|
+
- [x] Smart Thermostat Radiator variant (Task 15.3)
|
|
229
|
+
- Added WoSmartThermostatRadiator class extending WoAirPurifier
|
|
230
|
+
- Wired class through exports and SwitchBot runtime DEVICE_CLASSES registry
|
|
231
|
+
- Added device-type aliases in DEVICE_CLASS_MAP for thermostat radiator names
|
|
232
|
+
- Added regression coverage in test/thermostat-radiator-variants.test.ts (4 tests)
|
|
233
|
+
- Tests verify model mapping and inherited climate control methods (turnOn/turnOff/setMode)
|
|
234
|
+
|
|
235
|
+
- [x] Climate Panel variant (Task 15.4)
|
|
236
|
+
- Added WoClimatePanel class extending WoAirPurifier
|
|
237
|
+
- Wired class through exports and SwitchBot runtime DEVICE_CLASSES registry
|
|
238
|
+
- Added climate panel aliases in DEVICE_CLASS_MAP
|
|
239
|
+
- Added regression coverage in test/climate-panel-variants.test.ts (3 tests)
|
|
240
|
+
- Tests verify model mapping and inherited climate control methods (turnOn/turnOff/setMode)
|
|
241
|
+
|
|
242
|
+
## Phase 3: New Device Types (Lighting Variants) ⏳
|
|
243
|
+
|
|
244
|
+
### Completed March 7, 2026
|
|
245
|
+
- [x] Strip Light 3 (Task 16.1)
|
|
246
|
+
- Added WoStripLight3 class extending WoBulb for color control
|
|
247
|
+
- Wired class through exports and SwitchBot runtime DEVICE_CLASSES registry
|
|
248
|
+
- Added device-type mappings: "Strip Light 3", "SwitchBot Strip Light 3"
|
|
249
|
+
- Added regression coverage in test/strip-light-3.test.ts (3 tests)
|
|
250
|
+
- Tests verify device-type mapping for both aliases and inherited color control methods
|
|
251
|
+
|
|
252
|
+
- [x] Floor Lamp (Task 16.2)
|
|
253
|
+
- Added WoFloorLamp class extending WoBulb for color control
|
|
254
|
+
- Wired class through exports and SwitchBot runtime DEVICE_CLASSES registry
|
|
255
|
+
- Added device-type mappings: "Floor Lamp", "SwitchBot Floor Lamp"
|
|
256
|
+
- Added regression coverage in test/floor-lamp.test.ts (3 tests)
|
|
257
|
+
- Tests verify device-type mapping for both aliases and inherited color control methods
|
|
258
|
+
|
|
259
|
+
- [x] RGBICWW Strip Light (Task 16.3)
|
|
260
|
+
- Added WoRGBICWWStripLight class extending WoRGBICBulb for segmented control
|
|
261
|
+
- Wired class through exports and SwitchBot runtime DEVICE_CLASSES registry
|
|
262
|
+
- Added device-type mappings: "RGBICWW Strip Light", "SwitchBot RGBICWW Strip Light"
|
|
263
|
+
- Added regression coverage in test/rgbicww-strip-light.test.ts (3 tests)
|
|
264
|
+
- Tests verify device-type mapping and inherited RGBIC methods (setSegmentColor, setSegmentEffect)
|
|
265
|
+
- Note: Also wired WoRGBICBulb through exports for completeness
|
|
266
|
+
|
|
267
|
+
- [x] RGBICWW Floor Lamp (Task 16.4)
|
|
268
|
+
- Added WoRGBICWWFloorLamp class extending WoRGBICBulb for segmented control
|
|
269
|
+
- Wired class through exports and SwitchBot runtime DEVICE_CLASSES registry
|
|
270
|
+
- Added device-type mappings: "RGBICWW Floor Lamp", "SwitchBot RGBICWW Floor Lamp"
|
|
271
|
+
- Added regression coverage in test/rgbicww-floor-lamp.test.ts (3 tests)
|
|
272
|
+
- Tests verify device-type mapping and inherited RGBIC methods (setSegmentColor, setSegmentEffect)
|
|
273
|
+
|
|
274
|
+
- [x] Art Frame (Task 16.5)
|
|
275
|
+
- Added WoArtFrame class extending WoBulb for color control
|
|
276
|
+
- Wired class through exports and SwitchBot runtime DEVICE_CLASSES registry
|
|
277
|
+
- Added device-type mappings: "Art Frame", "SwitchBot Art Frame"
|
|
278
|
+
- Added regression coverage in test/art-frame.test.ts (3 tests)
|
|
279
|
+
- Tests verify device-type mapping for both aliases and inherited color control methods
|
|
280
|
+
- **Lighting variants block (Tasks 16.1-16.5) complete!** ✅
|
|
281
|
+
|
|
282
|
+
## Phase 3: New Device Types (Other Devices) ⏳
|
|
283
|
+
|
|
284
|
+
### Completed March 7, 2026
|
|
285
|
+
- [x] Plug Mini EU verification (Task 17.1)
|
|
286
|
+
- Verified WoPlugMiniEU exists in runtime registry (aliased to WoPlugMiniUS)
|
|
287
|
+
- Verified device-type mapping: "Plug Mini (EU)" → WoPlugMiniEU
|
|
288
|
+
- Added regression coverage in test/plug-mini-eu.test.ts (2 tests)
|
|
289
|
+
- Tests verify EU variant maps to WoPlugMiniUS class and inherits plug control methods
|
|
290
|
+
- Note: WoPlugMiniEU shares implementation with WoPlugMiniUS (regional variant)
|
|
291
|
+
|
|
292
|
+
- [x] Roller Shade (Task 17.2)
|
|
293
|
+
- Added WoRollerShade class extending WoCurtain for motorized window covering control
|
|
294
|
+
- Wired class through exports and SwitchBot runtime DEVICE_CLASSES registry
|
|
295
|
+
- Added device-type mappings: "Roller Shade", "SwitchBot Roller Shade"
|
|
296
|
+
- Added regression coverage in test/roller-shade.test.ts (3 tests)
|
|
297
|
+
- Tests verify device-type mapping and inherited curtain control methods (open, close, pause, setPosition)
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## Notes
|
|
302
|
+
|
|
303
|
+
When moving a task from todo.md to this file:
|
|
304
|
+
1. Add the completion date
|
|
305
|
+
2. Note any implementation details or deviations
|
|
306
|
+
3. Link to relevant PRs or commits if applicable
|
|
307
|
+
4. Update "Last Updated" timestamp
|
|
308
|
+
|
|
309
|
+
Format: `- [x] **Task X.Y**: Description (Completed: YYYY-MM-DD)`
|
package/todo/todo.md
ADDED
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
# TODO: pySwitchBot Feature Parity Roadmap
|
|
2
|
+
|
|
3
|
+
Implementation tasks to achieve feature parity with pySwitchBot.
|
|
4
|
+
|
|
5
|
+
Last Updated: March 7, 2026
|
|
6
|
+
Source: [PYSWITCHBOT_COMPARISON.md](./PYSWITCHBOT_COMPARISON.md)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 📅 Phase 2: Command Enhancement (Q2 2026)
|
|
11
|
+
|
|
12
|
+
### 🤖 Bot (WoHand) Commands
|
|
13
|
+
|
|
14
|
+
### 🔒 Lock Commands
|
|
15
|
+
|
|
16
|
+
### 💡 Light (Bulb/Strip) Commands
|
|
17
|
+
|
|
18
|
+
### ⚡ Relay Switch Commands
|
|
19
|
+
|
|
20
|
+
### ✨ Advanced Features
|
|
21
|
+
|
|
22
|
+
- ✅ Phase 2 completed. See `todo/completed.md` for completed task details.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 📅 Phase 3: New Devices (Q3 2026)
|
|
27
|
+
|
|
28
|
+
### 🧹 Vacuum Cleaners
|
|
29
|
+
|
|
30
|
+
- [x] **Task 12.1**: K10+ Vacuum ✅
|
|
31
|
+
- [x] **Task 12.2**: K10+ Pro Vacuum ✅
|
|
32
|
+
- [x] **Task 12.3**: K10+ Pro Combo Vacuum ✅
|
|
33
|
+
- [x] **Task 12.4**: K11+ Vacuum ✅
|
|
34
|
+
- [x] **Task 12.5**: K20 Vacuum ✅
|
|
35
|
+
- [x] **Task 12.6**: S10 Vacuum ✅
|
|
36
|
+
- [x] **Task 12.7**: S20 Vacuum ✅
|
|
37
|
+
|
|
38
|
+
#### Vacuum Commands
|
|
39
|
+
- [x] **Task 9.2**: Add basic vacuum commands ✅
|
|
40
|
+
- `cleanUp(protocolVersion: number)` - Start cleaning
|
|
41
|
+
- `returnToDock(protocolVersion: number)` - Return to base
|
|
42
|
+
- Support protocol versions 1 and 2
|
|
43
|
+
|
|
44
|
+
- [x] **Task 9.3**: Add vacuum status getters ✅
|
|
45
|
+
- Battery level
|
|
46
|
+
- Work status (cleaning, returning, docked, etc.)
|
|
47
|
+
- Dustbin status
|
|
48
|
+
- Network status
|
|
49
|
+
|
|
50
|
+
### 🔐 Lock Variants
|
|
51
|
+
|
|
52
|
+
- [x] **Task 13.1**: Lock Lite ✅
|
|
53
|
+
- [x] **Task 13.2**: Lock Vision ✅
|
|
54
|
+
- [x] **Task 13.3**: Lock Vision Pro ✅
|
|
55
|
+
- [x] **Task 13.4**: Lock Pro WiFi ✅
|
|
56
|
+
|
|
57
|
+
### ⚡ Power & Climate
|
|
58
|
+
|
|
59
|
+
- [x] **Task 14.1**: Relay Switch 2PM ✅
|
|
60
|
+
- [x] **Task 14.2**: Garage Door Opener (relay variant) ✅
|
|
61
|
+
- [x] **Task 15.1**: Evaporative Humidifier (WoHumi2) - Already exists, enhance ✅
|
|
62
|
+
- [x] **Task 15.2**: Circulator Fan (Battery/USB) ✅
|
|
63
|
+
- [x] **Task 15.3**: Smart Thermostat Radiator ✅
|
|
64
|
+
- [x] **Task 15.4**: Climate Panel ✅
|
|
65
|
+
|
|
66
|
+
### 🎛️ Other Devices
|
|
67
|
+
|
|
68
|
+
✅ **Phase 3 Other Devices block completed!** See `todo/completed.md` for task details.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
### ✅ Completed in Phase 3
|
|
73
|
+
|
|
74
|
+
- [x] **Task 10.1**: Implement passive status from advertisements ✅
|
|
75
|
+
- [x] **Task 10.2**: Add sequence number tracking ✅
|
|
76
|
+
|
|
77
|
+
### 🎯 Next Steps (Phase 3)
|
|
78
|
+
|
|
79
|
+
1. **Climate Control**
|
|
80
|
+
- Climate control block complete ✅
|
|
81
|
+
2. **Lighting Variants**
|
|
82
|
+
- Tasks 16.1-16.5: Strip Light 3, Floor Lamp, RGBICWW Strip/Floor, Art Frame
|
|
83
|
+
3. **Other Devices**
|
|
84
|
+
- Tasks 17.1-17.6: Plug Mini EU verify, Roller Shade, Keypad Vision/Pro, Hub3 enhance, HubMini Matter
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 📅 Phase 4: Advanced Features (Q4 2026)
|
|
89
|
+
|
|
90
|
+
### 🎨 Enhanced Device Control
|
|
91
|
+
|
|
92
|
+
- [ ] **Task 3.2**: Add Curtain 3 specific commands
|
|
93
|
+
- Support Curtain 3 model detection
|
|
94
|
+
- Implement multi-command sequences
|
|
95
|
+
- Add extended info retrieval
|
|
96
|
+
|
|
97
|
+
- [ ] **Task 3.3**: Add `getExtendedInfo()` command for curtains
|
|
98
|
+
- Returns device chain information
|
|
99
|
+
- Grouped curtain status
|
|
100
|
+
- Command: `0x57 0x0F 0x46 0x01`
|
|
101
|
+
|
|
102
|
+
- [ ] **Task 6.4**: Implement multi-command sequences for lights
|
|
103
|
+
- Send multiple commands in series
|
|
104
|
+
- Used for complex light patterns
|
|
105
|
+
- Support for Strip Light 3
|
|
106
|
+
|
|
107
|
+
### 💧 Humidifier Commands
|
|
108
|
+
|
|
109
|
+
- [ ] **Task 7.1**: Add humidity level control
|
|
110
|
+
- `setLevel(level: number)` - Set target humidity (1-100)
|
|
111
|
+
- Command: `0x57 0x0F 0xXX 0x01 LEVEL` (XX varies by model)
|
|
112
|
+
|
|
113
|
+
- [ ] **Task 7.2**: Add mode control
|
|
114
|
+
- `setAuto()` - Automatic mode
|
|
115
|
+
- `setManual()` - Manual mode
|
|
116
|
+
- Get target humidity level
|
|
117
|
+
|
|
118
|
+
### 🌬️ Air Purifier Commands
|
|
119
|
+
|
|
120
|
+
- [ ] **Task 8.1**: Add preset modes
|
|
121
|
+
- Modes: `level_1`, `level_2`, `level_3`, `auto`, `sleep`, `pet`
|
|
122
|
+
- `setPresetMode(mode: string)`
|
|
123
|
+
- Command: `0x57 0x0F 0x4E 0x01 MODE_ID`
|
|
124
|
+
|
|
125
|
+
- [ ] **Task 8.2**: Add status with AQI/PM2.5
|
|
126
|
+
- Parse air quality index from response
|
|
127
|
+
- PM2.5 levels
|
|
128
|
+
- Fan speed and mode
|
|
129
|
+
|
|
130
|
+
### 🔐 Encryption Enhancements
|
|
131
|
+
|
|
132
|
+
- [ ] **Task 18.4**: Add encryption for relay switches
|
|
133
|
+
- Newer relay switches require encryption
|
|
134
|
+
- Same key retrieval process as locks
|
|
135
|
+
|
|
136
|
+
- [ ] **Task 18.5**: Add encryption for air purifiers
|
|
137
|
+
- Newer air purifiers require encryption
|
|
138
|
+
- Command encryption for all control commands
|
|
139
|
+
|
|
140
|
+
- [ ] **Task 18.6**: Add encryption for light strips
|
|
141
|
+
- Newer light strips require encryption
|
|
142
|
+
- Effect commands need encryption
|
|
143
|
+
|
|
144
|
+
- [ ] **Task 18.7**: Add encryption state reset on disconnect
|
|
145
|
+
- Clear IV, cipher, encryption mode
|
|
146
|
+
- Re-initialize on next connection
|
|
147
|
+
- Handle firmware updates that change encryption
|
|
148
|
+
|
|
149
|
+
- [ ] **Task 18.8**: Implement key verification
|
|
150
|
+
- `verifyEncryptionKey()` - Test key validity
|
|
151
|
+
- Try commands with key before assuming valid
|
|
152
|
+
- Better error messages for invalid keys
|
|
153
|
+
|
|
154
|
+
### 📊 Status & Response Parsing
|
|
155
|
+
|
|
156
|
+
- [x] **Task 10.1**: Implement passive status from advertisements ✅
|
|
157
|
+
- Parse device state from BLE advertisements
|
|
158
|
+
- No connection needed for basic status
|
|
159
|
+
- Cache last known state
|
|
160
|
+
|
|
161
|
+
- [x] **Task 10.2**: Add sequence number tracking ✅
|
|
162
|
+
- Monitor `sequence_number` in advertisements
|
|
163
|
+
- Auto-trigger status update when sequence changes
|
|
164
|
+
- Implement for: locks, relay switches, vacuums, air purifiers
|
|
165
|
+
|
|
166
|
+
- [ ] **Task 10.3**: Add calibration status tracking
|
|
167
|
+
- Parse calibration bit from advertisements
|
|
168
|
+
- Track for: curtains, blind tilts
|
|
169
|
+
- Warn if device not calibrated
|
|
170
|
+
|
|
171
|
+
- [ ] **Task 10.4**: Add direction detection for covers
|
|
172
|
+
- Track `_is_opening` / `_is_closing` states
|
|
173
|
+
- Update based on position changes
|
|
174
|
+
- Help UI show proper icons
|
|
175
|
+
|
|
176
|
+
### 🔗 Connection & Error Improvements
|
|
177
|
+
|
|
178
|
+
- [ ] **Task 19.1**: Add specific BLE exceptions
|
|
179
|
+
- `SwitchbotOperationError` - Operation failures
|
|
180
|
+
- `SwitchbotAuthenticationError` - Auth failures
|
|
181
|
+
- `CharacteristicMissingError` - BLE characteristic missing
|
|
182
|
+
|
|
183
|
+
- [ ] **Task 19.4**: Enhance retry logic
|
|
184
|
+
- DBus error backoff (0.25s)
|
|
185
|
+
- `BLEAK_RETRY_EXCEPTIONS` handling
|
|
186
|
+
- Better context in retry errors
|
|
187
|
+
|
|
188
|
+
- [ ] **Task 19.5**: Add response length validation
|
|
189
|
+
- Check minimum expected length
|
|
190
|
+
- Throw errors for truncated responses
|
|
191
|
+
- Include actual vs expected length in error
|
|
192
|
+
|
|
193
|
+
- [ ] **Task 20.3**: Implement command batching
|
|
194
|
+
- Queue multiple commands
|
|
195
|
+
- Send in sequence on single connection
|
|
196
|
+
- Share connection overhead
|
|
197
|
+
|
|
198
|
+
- [ ] **Task 20.4**: Add expected disconnect tracking
|
|
199
|
+
- `_expected_disconnect` flag
|
|
200
|
+
- Differentiate expected vs unexpected disconnects
|
|
201
|
+
- Better error handling for unexpected disconnects
|
|
202
|
+
|
|
203
|
+
- [ ] **Task 20.5**: Implement notification handling
|
|
204
|
+
- Per-command notification futures
|
|
205
|
+
- Timeout handling (5s default)
|
|
206
|
+
- Log unsolicited notifications
|
|
207
|
+
|
|
208
|
+
- [ ] **Task 20.6**: Add characteristic caching
|
|
209
|
+
- Cache read/write characteristics
|
|
210
|
+
- Clear cache on characteristic missing error
|
|
211
|
+
- Avoid repeated characteristic discovery
|
|
212
|
+
|
|
213
|
+
### 🎯 Advanced Patterns
|
|
214
|
+
|
|
215
|
+
- [ ] **Task 21.3**: Add multi-command support
|
|
216
|
+
- `sendMultipleCommands()` - Send series, return if any succeed
|
|
217
|
+
- `sendCommandSequence()` - Send series, must all succeed
|
|
218
|
+
- Used for Curtain 3 and newer devices
|
|
219
|
+
|
|
220
|
+
- [ ] **Task 21.4**: Implement basic settings command
|
|
221
|
+
- `getBasicInfo()` - Universal settings retrieval
|
|
222
|
+
- Returns: battery, firmware, device-specific settings
|
|
223
|
+
- Command: `0x57 0x02`
|
|
224
|
+
|
|
225
|
+
- [ ] **Task 21.5**: Add mode setting commands
|
|
226
|
+
- Universal mode setting command: `0x57 0x03`
|
|
227
|
+
- Extended settings command
|
|
228
|
+
- Per-device mode enums
|
|
229
|
+
|
|
230
|
+
- [ ] **Task 21.6**: Add passive polling
|
|
231
|
+
- `PASSIVE_POLL_INTERVAL = 60 * 60 * 24` (24 hours)
|
|
232
|
+
- `pollNeeded()` method
|
|
233
|
+
- Auto-poll inactive devices periodically
|
|
234
|
+
|
|
235
|
+
- [ ] **Task 21.7**: Implement cloud device fetching
|
|
236
|
+
- `getDevices()` - Fetch devices from SwitchBot account
|
|
237
|
+
- Auto-populate model cache from cloud
|
|
238
|
+
- Handle regional APIs (US/CN/EU)
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## 📈 Medium Priority Enhancements
|
|
243
|
+
|
|
244
|
+
### Discovery & Advertisement
|
|
245
|
+
|
|
246
|
+
- [ ] **Task 1.4**: Enhance advertisement data structure
|
|
247
|
+
- Add `rawAdvData` field
|
|
248
|
+
- Add `isEncrypted` flag
|
|
249
|
+
- Add `modelFriendlyName` field
|
|
250
|
+
|
|
251
|
+
- [ ] **Task 1.5**: Add advertisement data merging
|
|
252
|
+
- Preserve old values when new data is None
|
|
253
|
+
- Recursive dict merging for nested structures
|
|
254
|
+
- Implement `_merge_data()` helper
|
|
255
|
+
|
|
256
|
+
### Relay Switch Additional Features
|
|
257
|
+
|
|
258
|
+
- [ ] **Task 5.4**: Add time/energy tracking
|
|
259
|
+
- `getCurrentTimeAndStartTime()` - For energy calculations
|
|
260
|
+
- Command: `0x57 0x0F 0x51 0x01 0x05 0x01 0x00 0x00 0x00`
|
|
261
|
+
|
|
262
|
+
- [ ] **Task 5.5**: Add garage door opener support
|
|
263
|
+
- Variant of relay switch
|
|
264
|
+
- Specific command sequences
|
|
265
|
+
- Model: SwitchBot Relay Switch (garage mode)
|
|
266
|
+
|
|
267
|
+
### Status Parsing
|
|
268
|
+
|
|
269
|
+
- [ ] **Task 11.1**: Add byte-by-byte response validation
|
|
270
|
+
- Check response length
|
|
271
|
+
- Validate specific byte positions
|
|
272
|
+
- Compare against expected value sets: `{1}`, `{1, 5}`, `{1, 6}`
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## 🎯 Success Metrics
|
|
277
|
+
|
|
278
|
+
- **Feature Parity**: 90%+ of pySwitchBot commands implemented
|
|
279
|
+
- **Device Coverage**: 95%+ of SwitchBot device types supported
|
|
280
|
+
- **Status Accuracy**: Advertisement-based status for all devices
|
|
281
|
+
- **Connection Efficiency**: 50% reduction in connection overhead via batching
|
|
282
|
+
- **Error Clarity**: Specific error types for all failure modes
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## 📝 Notes
|
|
287
|
+
|
|
288
|
+
### Task Completion Process
|
|
289
|
+
1. Move completed task from this file to `completed.md`
|
|
290
|
+
2. Add completion date and any notes
|
|
291
|
+
3. Update "Last Updated" timestamp
|
|
292
|
+
4. Reference any relevant PRs or commits
|
|
293
|
+
|
|
294
|
+
### Priority Levels
|
|
295
|
+
- **High Priority**: Core functionality, user-facing features
|
|
296
|
+
- **Medium Priority**: Enhancements, optimizations
|
|
297
|
+
- **Low Priority**: Nice-to-have features
|
|
298
|
+
|
|
299
|
+
### Reference
|
|
300
|
+
- Full comparison details: [PYSWITCHBOT_COMPARISON.md](../PYSWITCHBOT_COMPARISON.md)
|
|
301
|
+
- pySwitchBot Repository: https://github.com/Danielhiversen/pySwitchbot
|
|
302
|
+
- SwitchBot BLE API: https://github.com/OpenWonderLabs/SwitchBotAPI-BLE
|