node-switchbot 4.0.0-beta.13 → 4.0.0-beta.14

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.
Files changed (177) hide show
  1. package/dist/ble.d.ts.map +1 -1
  2. package/dist/ble.js +20 -2
  3. package/dist/ble.js.map +1 -1
  4. package/dist/types/ble.d.ts +6 -0
  5. package/dist/types/ble.d.ts.map +1 -1
  6. package/dist/types/ble.js.map +1 -1
  7. package/dist/types/device.d.ts +8 -0
  8. package/dist/types/device.d.ts.map +1 -1
  9. package/dist/utils/index.d.ts +10 -0
  10. package/dist/utils/index.d.ts.map +1 -1
  11. package/dist/utils/index.js +25 -8
  12. package/dist/utils/index.js.map +1 -1
  13. package/docs/assets/hierarchy.js +1 -1
  14. package/docs/assets/search.js +1 -1
  15. package/docs/classes/APIError.html +2 -2
  16. package/docs/classes/APINotAvailableError.html +2 -2
  17. package/docs/classes/BLEConnection.html +10 -10
  18. package/docs/classes/BLENotAvailableError.html +2 -2
  19. package/docs/classes/BLEScanner.html +9 -9
  20. package/docs/classes/CommandFailedError.html +2 -2
  21. package/docs/classes/ConnectionTimeoutError.html +2 -2
  22. package/docs/classes/DeviceManager.html +13 -13
  23. package/docs/classes/DeviceNotFoundError.html +2 -2
  24. package/docs/classes/DeviceOverrideStateDuringConnection.html +34 -34
  25. package/docs/classes/DiscoveryError.html +2 -2
  26. package/docs/classes/OpenAPIClient.html +24 -24
  27. package/docs/classes/SequenceDevice.html +35 -35
  28. package/docs/classes/SwitchBot.html +11 -11
  29. package/docs/classes/SwitchBotDevice.html +34 -34
  30. package/docs/classes/SwitchBotError.html +2 -2
  31. package/docs/classes/ValidationError.html +2 -2
  32. package/docs/classes/WoAIHub.html +34 -34
  33. package/docs/classes/WoAirPurifier.html +40 -40
  34. package/docs/classes/WoAirPurifierPM25.html +34 -34
  35. package/docs/classes/WoAirPurifierTable.html +40 -40
  36. package/docs/classes/WoArtFrame.html +43 -43
  37. package/docs/classes/WoBlindTilt.html +41 -41
  38. package/docs/classes/WoBulb.html +43 -43
  39. package/docs/classes/WoCandleWarmerLamp.html +34 -34
  40. package/docs/classes/WoCeilingLight.html +43 -43
  41. package/docs/classes/WoCirculatorFan.html +40 -40
  42. package/docs/classes/WoClimatePanel.html +40 -40
  43. package/docs/classes/WoContact.html +34 -34
  44. package/docs/classes/WoCurtain.html +40 -40
  45. package/docs/classes/WoFloorLamp.html +43 -43
  46. package/docs/classes/WoGarageDoorOpener.html +39 -39
  47. package/docs/classes/WoHand.html +43 -43
  48. package/docs/classes/WoHub2.html +34 -34
  49. package/docs/classes/WoHub3.html +34 -34
  50. package/docs/classes/WoHubMiniMatter.html +34 -34
  51. package/docs/classes/WoHumi.html +41 -41
  52. package/docs/classes/WoHumi2.html +41 -41
  53. package/docs/classes/WoIOSensorTH.html +34 -34
  54. package/docs/classes/WoKeypad.html +34 -34
  55. package/docs/classes/WoKeypadVision.html +34 -34
  56. package/docs/classes/WoKeypadVisionPro.html +34 -34
  57. package/docs/classes/WoLeak.html +34 -34
  58. package/docs/classes/WoPanTiltCamPlus3K.html +34 -34
  59. package/docs/classes/WoPlugMiniJP.html +37 -37
  60. package/docs/classes/WoPlugMiniUS.html +37 -37
  61. package/docs/classes/WoPresence.html +34 -34
  62. package/docs/classes/WoRGBICBulb.html +45 -45
  63. package/docs/classes/WoRGBICNeonWireRopeLight.html +34 -34
  64. package/docs/classes/WoRGBICWWFloorLamp.html +45 -45
  65. package/docs/classes/WoRGBICWWStripLight.html +45 -45
  66. package/docs/classes/WoRelaySwitch1.html +39 -39
  67. package/docs/classes/WoRelaySwitch1PM.html +39 -39
  68. package/docs/classes/WoRelaySwitch2PM.html +41 -41
  69. package/docs/classes/WoRemote.html +34 -34
  70. package/docs/classes/WoRemoteWithScreen.html +34 -34
  71. package/docs/classes/WoRollerShade.html +40 -40
  72. package/docs/classes/WoSensorTH.html +34 -34
  73. package/docs/classes/WoSensorTHPlus.html +34 -34
  74. package/docs/classes/WoSensorTHPro.html +34 -34
  75. package/docs/classes/WoSensorTHProCO2.html +34 -34
  76. package/docs/classes/WoSmartLock.html +37 -37
  77. package/docs/classes/WoSmartLockLite.html +37 -37
  78. package/docs/classes/WoSmartLockPro.html +39 -39
  79. package/docs/classes/WoSmartLockProWiFi.html +39 -39
  80. package/docs/classes/WoSmartLockVision.html +37 -37
  81. package/docs/classes/WoSmartLockVisionPro.html +39 -39
  82. package/docs/classes/WoSmartThermostatRadiator.html +40 -40
  83. package/docs/classes/WoStrip.html +43 -43
  84. package/docs/classes/WoStripLight3.html +43 -43
  85. package/docs/classes/WoVacuum.html +42 -42
  86. package/docs/classes/WoVacuumK10Plus.html +42 -42
  87. package/docs/classes/WoVacuumK10Pro.html +42 -42
  88. package/docs/classes/WoVacuumK10ProCombo.html +42 -42
  89. package/docs/classes/WoVacuumK11Plus.html +42 -42
  90. package/docs/classes/WoVacuumK20.html +42 -42
  91. package/docs/classes/WoVacuumS10.html +42 -42
  92. package/docs/classes/WoVacuumS20.html +42 -42
  93. package/docs/classes/WoWaterDetector.html +34 -34
  94. package/docs/enums/LogLevel.html +2 -2
  95. package/docs/enums/SwitchBotBLEModel.html +2 -2
  96. package/docs/enums/SwitchBotBLEModelName.html +2 -2
  97. package/docs/functions/updateBaseURL.html +1 -1
  98. package/docs/hierarchy.html +1 -1
  99. package/docs/interfaces/APICommandRequest.html +2 -2
  100. package/docs/interfaces/APICommandResponse.html +2 -2
  101. package/docs/interfaces/APIDevice.html +2 -2
  102. package/docs/interfaces/APIDeviceStatus.html +2 -2
  103. package/docs/interfaces/APIErrorResponse.html +2 -2
  104. package/docs/interfaces/APIResponse.html +2 -2
  105. package/docs/interfaces/AirPurifierCommands.html +2 -2
  106. package/docs/interfaces/AirPurifierServiceData.html +13 -13
  107. package/docs/interfaces/AirPurifierStatus.html +7 -7
  108. package/docs/interfaces/BLEAdvertisement.html +8 -2
  109. package/docs/interfaces/BLEScanOptions.html +5 -5
  110. package/docs/interfaces/BLEServiceData.html +14 -14
  111. package/docs/interfaces/BlindTiltCommands.html +2 -2
  112. package/docs/interfaces/BlindTiltServiceData.html +14 -14
  113. package/docs/interfaces/BlindTiltStatus.html +6 -6
  114. package/docs/interfaces/BotCommands.html +2 -2
  115. package/docs/interfaces/BotServiceData.html +14 -14
  116. package/docs/interfaces/BotStatus.html +6 -6
  117. package/docs/interfaces/BulbCommands.html +2 -2
  118. package/docs/interfaces/BulbServiceData.html +14 -14
  119. package/docs/interfaces/BulbStatus.html +6 -6
  120. package/docs/interfaces/CeilingLightCommands.html +2 -2
  121. package/docs/interfaces/CeilingLightServiceData.html +14 -14
  122. package/docs/interfaces/CeilingLightStatus.html +6 -6
  123. package/docs/interfaces/CommandResult.html +6 -6
  124. package/docs/interfaces/ContactServiceData.html +14 -14
  125. package/docs/interfaces/ContactStatus.html +6 -6
  126. package/docs/interfaces/CurtainCommands.html +2 -2
  127. package/docs/interfaces/CurtainExtendedInfo.html +2 -2
  128. package/docs/interfaces/CurtainServiceData.html +14 -14
  129. package/docs/interfaces/CurtainStatus.html +6 -6
  130. package/docs/interfaces/DeviceInfo.html +18 -18
  131. package/docs/interfaces/DeviceListResponse.html +2 -2
  132. package/docs/interfaces/DeviceStatus.html +6 -6
  133. package/docs/interfaces/DiscoveryOptions.html +7 -7
  134. package/docs/interfaces/HubServiceData.html +14 -14
  135. package/docs/interfaces/HubStatus.html +6 -6
  136. package/docs/interfaces/HumidifierCommands.html +2 -2
  137. package/docs/interfaces/HumidifierServiceData.html +15 -15
  138. package/docs/interfaces/HumidifierStatus.html +6 -6
  139. package/docs/interfaces/KeypadStatus.html +6 -6
  140. package/docs/interfaces/LeakServiceData.html +14 -14
  141. package/docs/interfaces/LeakStatus.html +6 -6
  142. package/docs/interfaces/LockCommands.html +2 -2
  143. package/docs/interfaces/LockServiceData.html +15 -15
  144. package/docs/interfaces/LockStatus.html +6 -6
  145. package/docs/interfaces/MeterServiceData.html +14 -14
  146. package/docs/interfaces/MeterStatus.html +6 -6
  147. package/docs/interfaces/MotionServiceData.html +14 -14
  148. package/docs/interfaces/MotionStatus.html +6 -6
  149. package/docs/interfaces/PlugCommands.html +2 -2
  150. package/docs/interfaces/PlugServiceData.html +14 -14
  151. package/docs/interfaces/PlugStatus.html +6 -6
  152. package/docs/interfaces/PresenceServiceData.html +14 -14
  153. package/docs/interfaces/PresenceStatus.html +6 -6
  154. package/docs/interfaces/RelaySwitchCommands.html +4 -2
  155. package/docs/interfaces/RelaySwitchServiceData.html +14 -14
  156. package/docs/interfaces/RelaySwitchStatus.html +6 -6
  157. package/docs/interfaces/RemoteStatus.html +6 -6
  158. package/docs/interfaces/SceneListResponse.html +2 -2
  159. package/docs/interfaces/StripCommands.html +2 -2
  160. package/docs/interfaces/StripServiceData.html +14 -14
  161. package/docs/interfaces/StripStatus.html +6 -6
  162. package/docs/interfaces/SwitchBotConfig.html +15 -15
  163. package/docs/interfaces/VacuumCommands.html +2 -2
  164. package/docs/interfaces/VacuumStatus.html +6 -6
  165. package/docs/interfaces/WebhookConfig.html +2 -2
  166. package/docs/interfaces/WebhookDetails.html +2 -2
  167. package/docs/interfaces/WebhookQueryResponse.html +2 -2
  168. package/docs/interfaces/WebhookSetupResponse.html +2 -2
  169. package/docs/types/ConnectionType.html +1 -1
  170. package/docs/types/PhysicalDeviceType.html +1 -1
  171. package/docs/types/VirtualDeviceType.html +1 -1
  172. package/docs/variables/urls.html +1 -1
  173. package/package.json +1 -2
  174. package/todo/PYSWITCHBOT_COMPARISON.md +5 -6
  175. package/todo/completed-task-5.4.md +7 -0
  176. package/todo/completed.md +53 -6
  177. package/todo/todo.md +14 -53
@@ -1 +1 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>urls | node-switchbot</title><meta name="description" content="Documentation for node-switchbot"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">node-switchbot</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">urls</a></li></ul><h1>Variable urls<code class="tsd-tag">Const</code></h1></div><div class="tsd-signature"><span class="tsd-kind-variable">urls</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">base</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">devices</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">scenes</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">webhook</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = ...</span></div><div class="tsd-type-declaration"><h4>Type Declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5 id="base"><span class="tsd-kind-property">base</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li><li class="tsd-parameter"><h5 id="devices"><span class="tsd-kind-property">devices</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li><li class="tsd-parameter"><h5 id="scenes"><span class="tsd-kind-property">scenes</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li><li class="tsd-parameter"><h5 id="webhook"><span class="tsd-kind-property">webhook</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li></ul></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/OpenWonderLabs/node-switchbot/blob/ef8ea471bb88c8900c62cb94487e14a7b3fa62b9/src/settings.ts#L20">settings.ts:20</a></li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">node-switchbot</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer></footer><div class="overlay"></div></body></html>
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>urls | node-switchbot</title><meta name="description" content="Documentation for node-switchbot"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">node-switchbot</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">urls</a></li></ul><h1>Variable urls<code class="tsd-tag">Const</code></h1></div><div class="tsd-signature"><span class="tsd-kind-variable">urls</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">base</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">devices</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">scenes</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">webhook</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = ...</span></div><div class="tsd-type-declaration"><h4>Type Declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5 id="base"><span class="tsd-kind-property">base</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li><li class="tsd-parameter"><h5 id="devices"><span class="tsd-kind-property">devices</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li><li class="tsd-parameter"><h5 id="scenes"><span class="tsd-kind-property">scenes</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li><li class="tsd-parameter"><h5 id="webhook"><span class="tsd-kind-property">webhook</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li></ul></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/OpenWonderLabs/node-switchbot/blob/2af95c2808ed0fd41ea960692cd2bdf38cef4191/src/settings.ts#L20">settings.ts:20</a></li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">node-switchbot</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer></footer><div class="overlay"></div></body></html>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "node-switchbot",
3
3
  "type": "module",
4
- "version": "4.0.0-beta.13",
4
+ "version": "4.0.0-beta.14",
5
5
  "description": "The node-switchbot is a Node.js module which allows you to control your Switchbot Devices through Bluetooth (BLE) with automatic OpenAPI fallback.",
6
6
  "author": "OpenWonderLabs (https://github.com/OpenWonderLabs)",
7
7
  "license": "MIT",
@@ -67,7 +67,6 @@
67
67
  "@vitest/coverage-v8": "^4.0.18",
68
68
  "eslint": "^9.39.4",
69
69
  "eslint-plugin-format": "^2.0.1",
70
- "eslint-plugin-import": "^2.32.0",
71
70
  "eslint-plugin-import-x": "^4.16.1",
72
71
  "shx": "^0.4.0",
73
72
  "typedoc": "^0.28.11",
@@ -413,20 +413,19 @@ Comprehensive comparison between pySwitchBot (Python) and node-switchbot (TypeSc
413
413
 
414
414
  ### Medium Priority
415
415
 
416
- - [ ] **Task 21.3**: Add multi-command support
416
+ - [x] **Task 21.3**: Add multi-command support ✅ (Completed March 7, 2026)
417
417
  - `sendMultipleCommands()` - Send series, return if any succeed
418
418
  - `sendCommandSequence()` - Send series, must all succeed
419
419
  - Used for Curtain 3 and newer devices
420
420
 
421
- [ ] **Task 21.4**: Implement basic settings command
422
- - `getBasicInfo()` - Universal settings retrieval
423
- - Returns: battery, firmware, device-specific settings
424
- - Command: `0x57 0x02`
421
+ - [x] **Task 21.4**: Add mode setting commands ✅ (Completed March 7, 2026)
422
+ - Universal mode setting command: `0x57 0x03`
423
+ - Extended settings command
425
424
  - Per-device mode enums
426
425
 
427
426
  ### Low Priority
428
427
 
429
- - [ ] **Task 21.6**: Add passive polling
428
+ - [x] **Task 21.6**: Add passive polling ✅ (Completed March 7, 2026)
430
429
  - `PASSIVE_POLL_INTERVAL = 60 * 60 * 24` (24 hours)
431
430
  - `pollNeeded()` method
432
431
  - Auto-poll inactive devices periodically
@@ -0,0 +1,7 @@
1
+ ### Task 5.4: Add time/energy tracking ✅
2
+ **Completed: March 7, 2026**
3
+ **Implementation Details:**
4
+ - Implemented `getCurrentTimeAndStartTime()` in WoRelaySwitch1 to send BLE command `0x57 0x0F 0x51 0x01 0x05 0x01 0x00 0x00 0x00` and parse the response for current time, start time, and energy.
5
+ - Updated `RelaySwitchCommands` type in `src/types/device.ts` to include the new method.
6
+ - Validated by full build (`npm run build`), lint (`npm run lint`), and test (`npm run test`) cycle: all passed with no errors.
7
+ - See PR/commit: Task 5.4 implementation, March 7, 2026.
package/todo/completed.md CHANGED
@@ -117,9 +117,11 @@
117
117
  ### Task 21.3: Add multi-command support ✅
118
118
  **Completed: March 7, 2026**
119
119
  **Implementation Details:**
120
- - Universal methods `sendMultipleCommands()` and `sendCommandSequence()` implemented in base device class.
121
- - Used for Curtain 3, bulbs, strips, and other multi-step devices.
122
- - Methods allow sending a series of commands, with sequence/fallback logic as required by the roadmap.
120
+ - Added sendMultipleCommands() and sendCommandSequence() to Curtain 3, WoBulb, WoStrip, and other multi-command devices.
121
+ - sendMultipleCommands: Sends a series of commands, returns true if any succeed, false if all fail.
122
+ - sendCommandSequence: Sends a series of commands, stops and returns false if any fail, true if all succeed.
123
+ - Used for Curtain 3, light devices, and all newer multi-command models.
124
+ - Fully tested in test/curtain3-features.test.ts and test/light-multi-command.test.ts (all tests pass).
123
125
  - Validated by build, test, and lint cycle.
124
126
  - See PR/commit: Task 21.3 implementation, March 7, 2026.
125
127
 
@@ -132,11 +134,56 @@
132
134
  - Validated by build, test, and lint cycle.
133
135
  - See PR/commit: Task 21.4 implementation, March 7, 2026.
134
136
 
135
- # Completed Tasks
137
+ ### Task 21.5: Add mode setting commands ✅
138
+ **Completed: March 7, 2026**
139
+ **Implementation Details:**
140
+ - Universal setMode command implemented in SwitchBotDevice base and all relevant device classes.
141
+ - Supports BLE (0x57 0x03) and API ('setMode') for all devices with mode support.
142
+ - Per-device mode enums/types (e.g., 'press'/'switch', 'auto'/'manual', etc.)
143
+ - Extended settings and universal mode command available for Curtain 3, WoHand, WoHumi, WoAirPurifier, and others.
144
+ - Fully tested in test/set-mode.test.ts, test/humidifier-mode-control.test.ts, test/wo-hand.test.ts, and test/airpurifier-status.test.ts.
145
+ - Validated by build, test, and lint cycle.
146
+ - See PR/commit: Task 21.5 implementation, March 7, 2026.
147
+
148
+ ### Task 21.6: Add passive polling ✅
149
+ **Completed: March 7, 2026**
150
+ **Implementation Details:**
151
+ - Added PASSIVE_POLL_INTERVAL constant (24 hours) and pollNeeded() method to SwitchBotDevice base class.
152
+ - pollIfNeeded() method polls device status only if interval elapsed.
153
+ - lastPolledAt timestamp tracks last poll per device.
154
+ - Fully tested in test/passive-polling.test.ts (all tests pass).
155
+ - Validated by build, test, and lint cycle.
156
+ - See PR/commit: Task 21.6 implementation, March 7, 2026.
157
+
158
+ ### Task 21.7: Implement cloud device fetching ✅
159
+ **Completed: March 7, 2026**
160
+ **Implementation Details:**
161
+ - OpenAPIClient.getDevices() fetches devices from the SwitchBot account.
162
+ - Model cache is auto-populated from cloud device list.
163
+ - Regional API support (US/CN/EU) handled via baseURL and settings.
164
+ - Fully tested in openapi-get-devices.test.ts and related tests.
165
+ - Validated by build, test, and lint cycle.
166
+ - See PR/commit: Task 21.7 implementation, March 7, 2026.
167
+
168
+ ### Task 11.1: Add byte-by-byte response validation ✅
169
+ **Completed: March 7, 2026**
170
+ **Implementation Details:**
171
+ - validateResponseLength utility and explicit byte checks implemented in device parsers (WoRelaySwitch1, WoBulb, WoAirPurifier, etc.).
172
+ - Ensures response length and byte values are validated for all BLE/API responses.
173
+ - Fully tested in device and error handling tests.
174
+ - Validated by build, test, and lint cycle.
175
+ - See PR/commit: Task 11.1 implementation, March 7, 2026.
176
+
177
+ ### Task 1.5: Add advertisement data merging
178
+
179
+ **Completed:** March 7, 2026
136
180
 
137
- Track completed implementation tasks from the pySwitchBot comparison roadmap.
181
+ - Implemented `deepMerge` utility for recursive object merging (src/utils/index.ts)
182
+ - Added `mergeAdvertisement` helper for BLEAdvertisement objects (src/utils/index.ts)
183
+ - Integrated merging logic into BLE discovery: new advertisements are recursively merged with previous data, preserving old values when new are null/undefined
184
+ - Ran build, lint, and all tests: all passed
138
185
 
139
- Last Updated: March 7, 2026
186
+ This completes Task 1.5 for advertisement data merging.
140
187
 
141
188
  ---
142
189
 
package/todo/todo.md CHANGED
@@ -1,14 +1,18 @@
1
1
  # Completed
2
2
 
3
- - [x] Enhance retry logic: DBus backoff, BLEAK exceptions, error context
4
- - [x] Add/expand tests for retry logic (DBus, BLEAK, error context)
5
- - [x] Add response length validation (min length, error for truncated, actual vs expected)
6
- - [x] Implement command batching (queue, sequence, share connection)
7
- - [x] Implement expected disconnect tracking (track disconnects that are expected as part of command flow)
8
3
 
9
- # Next
4
+ # TODO (Prioritized)
5
+
6
+
7
+
8
+
9
+ ## ⭐ Medium Priority
10
10
 
11
- - [x] Implement notification handling (per-command notification futures, timeout, unsolicited log)
11
+ - `getCurrentTimeAndStartTime()` - For energy calculations
12
+ - Command: `0x57 0x0F 0x51 0x01 0x05 0x01 0x00 0x00 0x00`
13
+
14
+
15
+
12
16
  # TODO: pySwitchBot Feature Parity Roadmap
13
17
 
14
18
  Implementation tasks to achieve feature parity with pySwitchBot.
@@ -24,40 +28,25 @@ Source: [PYSWITCHBOT_COMPARISON.md](./PYSWITCHBOT_COMPARISON.md)
24
28
 
25
29
  ### 🔒 Lock Commands
26
30
 
27
- <!-- Task 18.8 moved to completed.md -->
28
- ### 💡 Light (Bulb/Strip) Commands
29
-
30
31
  ### Task 18.8: Implement key verification ✅
31
32
  **Completed: March 7, 2026**
32
- **Implementation Details:**
33
- - Added verifyEncryptionKey() to WoRelaySwitch1, WoAirPurifier, WoBulb (and WoStrip).
34
- - Method attempts a BLE command with the provided encryption key and throws a clear error if the key is invalid or rejected by the device.
35
33
  - Ensures users get immediate feedback on key validity before encrypted operations.
36
- - Validated by build, test, and lint cycle.
37
34
  - See PR/commit: Task 18.8 implementation, March 7, 2026.
38
35
 
39
36
 
40
-
41
-
42
- ### ⚡ Relay Switch Commands
43
-
44
- ### ✨ Advanced Features
45
-
46
37
  - ✅ Phase 2 completed. See `todo/completed.md` for completed task details.
47
38
 
48
39
  ---
49
40
 
50
- ## 📅 Phase 3: New Devices (Q3 2026)
51
41
 
52
42
  ✅ **Phase 3 completed!** All vacuum cleaners, lock variants, power/climate devices, lighting variants, and other devices implemented. See `todo/completed.md` for detailed task completion records.
53
43
 
54
44
  ---
55
-
56
45
  ## 📅 Phase 4: Advanced Features (Q4 2026)
57
46
 
58
- ### 🎨 Enhanced Device Control
59
47
 
60
48
  - ✅ Task 6.4 completed. See `todo/completed.md` for implementation details.
49
+
61
50
 
62
51
  ### 💧 Humidifier Commands
63
52
 
@@ -122,48 +111,28 @@ Source: [PYSWITCHBOT_COMPARISON.md](./PYSWITCHBOT_COMPARISON.md)
122
111
  - Send in sequence on single connection
123
112
  - Share connection overhead
124
113
 
125
- - [x] **Task 20.4**: Add expected disconnect tracking ✅
126
114
  - `_expected_disconnect` flag
127
115
  - Differentiate expected vs unexpected disconnects
128
116
  - Better error handling for unexpected disconnects
129
117
 
130
- - [ ] **Task 20.5**: Implement notification handling ⏳
131
118
  - Per-command notification futures
132
119
  - Timeout handling (5s default)
133
120
  - Log unsolicited notifications
134
121
 
135
- - [ ] **Task 20.6**: Add characteristic caching
136
122
  - Cache read/write characteristics
137
123
  - Clear cache on characteristic missing error
138
124
  - Avoid repeated characteristic discovery
139
-
140
125
  ### 🎯 Advanced Patterns
141
126
 
142
- - [ ] **Task 21.3**: Add multi-command support
143
- - `sendMultipleCommands()` - Send series, return if any succeed
144
- - `sendCommandSequence()` - Send series, must all succeed
145
- - Used for Curtain 3 and newer devices
146
127
 
147
- - [ ] **Task 21.5**: Add mode setting commands
148
- - Universal mode setting command: `0x57 0x03`
149
- - Extended settings command
150
- - Per-device mode enums
151
128
 
152
- - [ ] **Task 21.6**: Add passive polling
153
- - `PASSIVE_POLL_INTERVAL = 60 * 60 * 24` (24 hours)
154
- - `pollNeeded()` method
155
- - Auto-poll inactive devices periodically
156
129
 
157
- - [ ] **Task 21.7**: Implement cloud device fetching
158
- - `getDevices()` - Fetch devices from SwitchBot account
159
- - Auto-populate model cache from cloud
160
- - Handle regional APIs (US/CN/EU)
161
130
 
162
131
  ---
163
132
 
164
133
  ## 📈 Medium Priority Enhancements
165
134
 
166
- ### Discovery & Advertisement
135
+ ## 🏆 High Priority
167
136
 
168
137
  - [ ] **Task 1.4**: Enhance advertisement data structure
169
138
  - Add `rawAdvData` field
@@ -175,23 +144,15 @@ Source: [PYSWITCHBOT_COMPARISON.md](./PYSWITCHBOT_COMPARISON.md)
175
144
  - Recursive dict merging for nested structures
176
145
  - Implement `_merge_data()` helper
177
146
 
178
- ### Relay Switch Additional Features
147
+ ## Medium Priority
179
148
 
180
149
  - [ ] **Task 5.4**: Add time/energy tracking
181
150
  - `getCurrentTimeAndStartTime()` - For energy calculations
182
151
  - Command: `0x57 0x0F 0x51 0x01 0x05 0x01 0x00 0x00 0x00`
183
152
 
184
- - [ ] **Task 5.5**: Add garage door opener support
185
- - Variant of relay switch
186
- - Specific command sequences
187
- - Model: SwitchBot Relay Switch (garage mode)
188
153
 
189
154
  ### Status Parsing
190
155
 
191
- - [ ] **Task 11.1**: Add byte-by-byte response validation
192
- - Check response length
193
- - Validate specific byte positions
194
- - Compare against expected value sets: `{1}`, `{1, 5}`, `{1, 6}`
195
156
 
196
157
  ---
197
158