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

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 (269) hide show
  1. package/dist/ble.d.ts +10 -0
  2. package/dist/ble.d.ts.map +1 -1
  3. package/dist/ble.js +157 -29
  4. package/dist/ble.js.map +1 -1
  5. package/dist/devices/base.d.ts +45 -0
  6. package/dist/devices/base.d.ts.map +1 -1
  7. package/dist/devices/base.js +116 -0
  8. package/dist/devices/base.js.map +1 -1
  9. package/dist/devices/index.d.ts +7 -0
  10. package/dist/devices/index.d.ts.map +1 -1
  11. package/dist/devices/index.js +7 -0
  12. package/dist/devices/index.js.map +1 -1
  13. package/dist/devices/wo-ai-hub.d.ts +6 -0
  14. package/dist/devices/wo-ai-hub.d.ts.map +1 -0
  15. package/dist/devices/wo-ai-hub.js +7 -0
  16. package/dist/devices/wo-ai-hub.js.map +1 -0
  17. package/dist/devices/wo-air-purifier-pm25.d.ts +6 -0
  18. package/dist/devices/wo-air-purifier-pm25.d.ts.map +1 -0
  19. package/dist/devices/wo-air-purifier-pm25.js +7 -0
  20. package/dist/devices/wo-air-purifier-pm25.js.map +1 -0
  21. package/dist/devices/wo-air-purifier.d.ts +18 -1
  22. package/dist/devices/wo-air-purifier.d.ts.map +1 -1
  23. package/dist/devices/wo-air-purifier.js +74 -10
  24. package/dist/devices/wo-air-purifier.js.map +1 -1
  25. package/dist/devices/wo-blind-tilt.d.ts +1 -0
  26. package/dist/devices/wo-blind-tilt.d.ts.map +1 -1
  27. package/dist/devices/wo-blind-tilt.js +41 -2
  28. package/dist/devices/wo-blind-tilt.js.map +1 -1
  29. package/dist/devices/wo-bulb.d.ts +27 -1
  30. package/dist/devices/wo-bulb.d.ts.map +1 -1
  31. package/dist/devices/wo-bulb.js +124 -34
  32. package/dist/devices/wo-bulb.js.map +1 -1
  33. package/dist/devices/wo-candle-warmer-lamp.d.ts +6 -0
  34. package/dist/devices/wo-candle-warmer-lamp.d.ts.map +1 -0
  35. package/dist/devices/wo-candle-warmer-lamp.js +7 -0
  36. package/dist/devices/wo-candle-warmer-lamp.js.map +1 -0
  37. package/dist/devices/wo-curtain.d.ts +17 -1
  38. package/dist/devices/wo-curtain.d.ts.map +1 -1
  39. package/dist/devices/wo-curtain.js +106 -2
  40. package/dist/devices/wo-curtain.js.map +1 -1
  41. package/dist/devices/wo-hand.d.ts +1 -1
  42. package/dist/devices/wo-hand.d.ts.map +1 -1
  43. package/dist/devices/wo-hand.js +1 -2
  44. package/dist/devices/wo-hand.js.map +1 -1
  45. package/dist/devices/wo-humi.d.ts +17 -1
  46. package/dist/devices/wo-humi.d.ts.map +1 -1
  47. package/dist/devices/wo-humi.js +42 -2
  48. package/dist/devices/wo-humi.js.map +1 -1
  49. package/dist/devices/wo-humi2.d.ts +0 -12
  50. package/dist/devices/wo-humi2.d.ts.map +1 -1
  51. package/dist/devices/wo-humi2.js +0 -18
  52. package/dist/devices/wo-humi2.js.map +1 -1
  53. package/dist/devices/wo-pan-tilt-cam-plus-3k.d.ts +6 -0
  54. package/dist/devices/wo-pan-tilt-cam-plus-3k.d.ts.map +1 -0
  55. package/dist/devices/wo-pan-tilt-cam-plus-3k.js +7 -0
  56. package/dist/devices/wo-pan-tilt-cam-plus-3k.js.map +1 -0
  57. package/dist/devices/wo-relay-switch-1.d.ts +14 -0
  58. package/dist/devices/wo-relay-switch-1.d.ts.map +1 -1
  59. package/dist/devices/wo-relay-switch-1.js +47 -10
  60. package/dist/devices/wo-relay-switch-1.js.map +1 -1
  61. package/dist/devices/wo-relay-switch-2pm.d.ts.map +1 -1
  62. package/dist/devices/wo-relay-switch-2pm.js +4 -6
  63. package/dist/devices/wo-relay-switch-2pm.js.map +1 -1
  64. package/dist/devices/wo-remote-with-screen.d.ts +6 -0
  65. package/dist/devices/wo-remote-with-screen.d.ts.map +1 -0
  66. package/dist/devices/wo-remote-with-screen.js +7 -0
  67. package/dist/devices/wo-remote-with-screen.js.map +1 -0
  68. package/dist/devices/wo-rgbic-neon-wire-rope-light.d.ts +6 -0
  69. package/dist/devices/wo-rgbic-neon-wire-rope-light.d.ts.map +1 -0
  70. package/dist/devices/wo-rgbic-neon-wire-rope-light.js +7 -0
  71. package/dist/devices/wo-rgbic-neon-wire-rope-light.js.map +1 -0
  72. package/dist/devices/wo-water-detector.d.ts +6 -0
  73. package/dist/devices/wo-water-detector.d.ts.map +1 -0
  74. package/dist/devices/wo-water-detector.js +7 -0
  75. package/dist/devices/wo-water-detector.js.map +1 -0
  76. package/dist/errors.d.ts +20 -0
  77. package/dist/errors.d.ts.map +1 -1
  78. package/dist/errors.js +31 -1
  79. package/dist/errors.js.map +1 -1
  80. package/dist/index.d.ts +2 -2
  81. package/dist/index.d.ts.map +1 -1
  82. package/dist/index.js +1 -1
  83. package/dist/index.js.map +1 -1
  84. package/dist/settings.d.ts +5 -0
  85. package/dist/settings.d.ts.map +1 -1
  86. package/dist/settings.js +17 -1
  87. package/dist/settings.js.map +1 -1
  88. package/dist/switchbot.d.ts.map +1 -1
  89. package/dist/switchbot.js +14 -0
  90. package/dist/switchbot.js.map +1 -1
  91. package/dist/types/device.d.ts +28 -3
  92. package/dist/types/device.d.ts.map +1 -1
  93. package/dist/utils/index.d.ts +5 -0
  94. package/dist/utils/index.d.ts.map +1 -1
  95. package/dist/utils/index.js +9 -0
  96. package/dist/utils/index.js.map +1 -1
  97. package/dist/utils/relay-encryption.d.ts +10 -0
  98. package/dist/utils/relay-encryption.d.ts.map +1 -0
  99. package/dist/utils/relay-encryption.js +23 -0
  100. package/dist/utils/relay-encryption.js.map +1 -0
  101. package/dist/utils/retry.d.ts.map +1 -1
  102. package/dist/utils/retry.js +49 -6
  103. package/dist/utils/retry.js.map +1 -1
  104. package/docs/assets/hierarchy.js +1 -1
  105. package/docs/assets/navigation.js +1 -1
  106. package/docs/assets/search.js +1 -1
  107. package/docs/classes/APIError.html +2 -2
  108. package/docs/classes/APINotAvailableError.html +2 -2
  109. package/docs/classes/BLEConnection.html +11 -9
  110. package/docs/classes/BLENotAvailableError.html +2 -2
  111. package/docs/classes/BLEScanner.html +9 -9
  112. package/docs/classes/CommandFailedError.html +2 -2
  113. package/docs/classes/ConnectionTimeoutError.html +2 -2
  114. package/docs/classes/DeviceManager.html +13 -13
  115. package/docs/classes/DeviceNotFoundError.html +2 -2
  116. package/docs/classes/DeviceOverrideStateDuringConnection.html +55 -28
  117. package/docs/classes/DiscoveryError.html +2 -2
  118. package/docs/classes/OpenAPIClient.html +24 -24
  119. package/docs/classes/SequenceDevice.html +56 -29
  120. package/docs/classes/SwitchBot.html +11 -11
  121. package/docs/classes/SwitchBotDevice.html +55 -28
  122. package/docs/classes/SwitchBotError.html +2 -2
  123. package/docs/classes/ValidationError.html +2 -2
  124. package/docs/classes/WoAIHub.html +83 -0
  125. package/docs/classes/WoAirPurifier.html +56 -33
  126. package/docs/classes/WoAirPurifierPM25.html +83 -0
  127. package/docs/classes/WoAirPurifierTable.html +56 -33
  128. package/docs/classes/WoArtFrame.html +67 -35
  129. package/docs/classes/WoBlindTilt.html +63 -34
  130. package/docs/classes/WoBulb.html +67 -35
  131. package/docs/classes/WoCandleWarmerLamp.html +83 -0
  132. package/docs/classes/WoCeilingLight.html +67 -35
  133. package/docs/classes/WoCirculatorFan.html +56 -33
  134. package/docs/classes/WoClimatePanel.html +56 -33
  135. package/docs/classes/WoContact.html +55 -28
  136. package/docs/classes/WoCurtain.html +64 -32
  137. package/docs/classes/WoFloorLamp.html +67 -35
  138. package/docs/classes/WoGarageDoorOpener.html +62 -32
  139. package/docs/classes/WoHand.html +56 -38
  140. package/docs/classes/WoHub2.html +55 -28
  141. package/docs/classes/WoHub3.html +55 -28
  142. package/docs/classes/WoHubMiniMatter.html +55 -28
  143. package/docs/classes/WoHumi.html +58 -32
  144. package/docs/classes/WoHumi2.html +58 -38
  145. package/docs/classes/WoIOSensorTH.html +55 -28
  146. package/docs/classes/WoKeypad.html +55 -28
  147. package/docs/classes/WoKeypadVision.html +55 -28
  148. package/docs/classes/WoKeypadVisionPro.html +55 -28
  149. package/docs/classes/WoLeak.html +55 -28
  150. package/docs/classes/WoPanTiltCamPlus3K.html +83 -0
  151. package/docs/classes/WoPlugMiniJP.html +58 -31
  152. package/docs/classes/WoPlugMiniUS.html +58 -31
  153. package/docs/classes/WoPresence.html +55 -28
  154. package/docs/classes/WoRGBICBulb.html +69 -37
  155. package/docs/classes/WoRGBICNeonWireRopeLight.html +83 -0
  156. package/docs/classes/WoRGBICWWFloorLamp.html +69 -37
  157. package/docs/classes/WoRGBICWWStripLight.html +69 -37
  158. package/docs/classes/WoRelaySwitch1.html +62 -32
  159. package/docs/classes/WoRelaySwitch1PM.html +62 -32
  160. package/docs/classes/WoRelaySwitch2PM.html +64 -34
  161. package/docs/classes/WoRemote.html +55 -28
  162. package/docs/classes/WoRemoteWithScreen.html +83 -0
  163. package/docs/classes/WoRollerShade.html +64 -32
  164. package/docs/classes/WoSensorTH.html +55 -28
  165. package/docs/classes/WoSensorTHPlus.html +55 -28
  166. package/docs/classes/WoSensorTHPro.html +55 -28
  167. package/docs/classes/WoSensorTHProCO2.html +55 -28
  168. package/docs/classes/WoSmartLock.html +58 -31
  169. package/docs/classes/WoSmartLockLite.html +58 -31
  170. package/docs/classes/WoSmartLockPro.html +60 -33
  171. package/docs/classes/WoSmartLockProWiFi.html +60 -33
  172. package/docs/classes/WoSmartLockVision.html +58 -31
  173. package/docs/classes/WoSmartLockVisionPro.html +60 -33
  174. package/docs/classes/WoSmartThermostatRadiator.html +56 -33
  175. package/docs/classes/WoStrip.html +67 -35
  176. package/docs/classes/WoStripLight3.html +67 -35
  177. package/docs/classes/WoVacuum.html +63 -36
  178. package/docs/classes/WoVacuumK10Plus.html +63 -36
  179. package/docs/classes/WoVacuumK10Pro.html +63 -36
  180. package/docs/classes/WoVacuumK10ProCombo.html +63 -36
  181. package/docs/classes/WoVacuumK11Plus.html +63 -36
  182. package/docs/classes/WoVacuumK20.html +63 -36
  183. package/docs/classes/WoVacuumS10.html +63 -36
  184. package/docs/classes/WoVacuumS20.html +63 -36
  185. package/docs/classes/WoWaterDetector.html +83 -0
  186. package/docs/enums/LogLevel.html +2 -2
  187. package/docs/enums/SwitchBotBLEModel.html +2 -2
  188. package/docs/enums/SwitchBotBLEModelName.html +2 -2
  189. package/docs/functions/updateBaseURL.html +1 -1
  190. package/docs/hierarchy.html +1 -1
  191. package/docs/interfaces/APICommandRequest.html +2 -2
  192. package/docs/interfaces/APICommandResponse.html +2 -2
  193. package/docs/interfaces/APIDevice.html +2 -2
  194. package/docs/interfaces/APIDeviceStatus.html +2 -2
  195. package/docs/interfaces/APIErrorResponse.html +2 -2
  196. package/docs/interfaces/APIResponse.html +2 -2
  197. package/docs/interfaces/AirPurifierCommands.html +3 -2
  198. package/docs/interfaces/AirPurifierServiceData.html +14 -14
  199. package/docs/interfaces/AirPurifierStatus.html +7 -7
  200. package/docs/interfaces/BLEAdvertisement.html +2 -2
  201. package/docs/interfaces/BLEScanOptions.html +5 -5
  202. package/docs/interfaces/BLEServiceData.html +14 -14
  203. package/docs/interfaces/BlindTiltCommands.html +2 -2
  204. package/docs/interfaces/BlindTiltServiceData.html +14 -14
  205. package/docs/interfaces/BlindTiltStatus.html +7 -6
  206. package/docs/interfaces/BotCommands.html +2 -2
  207. package/docs/interfaces/BotServiceData.html +14 -14
  208. package/docs/interfaces/BotStatus.html +6 -6
  209. package/docs/interfaces/BulbCommands.html +4 -2
  210. package/docs/interfaces/BulbServiceData.html +14 -14
  211. package/docs/interfaces/BulbStatus.html +6 -6
  212. package/docs/interfaces/CeilingLightCommands.html +4 -2
  213. package/docs/interfaces/CeilingLightServiceData.html +14 -14
  214. package/docs/interfaces/CeilingLightStatus.html +6 -6
  215. package/docs/interfaces/CommandResult.html +6 -6
  216. package/docs/interfaces/ContactServiceData.html +14 -14
  217. package/docs/interfaces/ContactStatus.html +6 -6
  218. package/docs/interfaces/CurtainCommands.html +5 -2
  219. package/docs/interfaces/CurtainExtendedInfo.html +4 -0
  220. package/docs/interfaces/CurtainServiceData.html +14 -14
  221. package/docs/interfaces/CurtainStatus.html +6 -6
  222. package/docs/interfaces/DeviceInfo.html +18 -18
  223. package/docs/interfaces/DeviceListResponse.html +2 -2
  224. package/docs/interfaces/DeviceStatus.html +6 -6
  225. package/docs/interfaces/DiscoveryOptions.html +7 -7
  226. package/docs/interfaces/HubServiceData.html +14 -14
  227. package/docs/interfaces/HubStatus.html +6 -6
  228. package/docs/interfaces/HumidifierCommands.html +6 -2
  229. package/docs/interfaces/HumidifierServiceData.html +15 -15
  230. package/docs/interfaces/HumidifierStatus.html +6 -6
  231. package/docs/interfaces/KeypadStatus.html +6 -6
  232. package/docs/interfaces/LeakServiceData.html +14 -14
  233. package/docs/interfaces/LeakStatus.html +6 -6
  234. package/docs/interfaces/LockCommands.html +2 -2
  235. package/docs/interfaces/LockServiceData.html +15 -15
  236. package/docs/interfaces/LockStatus.html +6 -6
  237. package/docs/interfaces/MeterServiceData.html +14 -14
  238. package/docs/interfaces/MeterStatus.html +6 -6
  239. package/docs/interfaces/MotionServiceData.html +14 -14
  240. package/docs/interfaces/MotionStatus.html +6 -6
  241. package/docs/interfaces/PlugCommands.html +2 -2
  242. package/docs/interfaces/PlugServiceData.html +14 -14
  243. package/docs/interfaces/PlugStatus.html +6 -6
  244. package/docs/interfaces/PresenceServiceData.html +14 -14
  245. package/docs/interfaces/PresenceStatus.html +6 -6
  246. package/docs/interfaces/RelaySwitchCommands.html +2 -2
  247. package/docs/interfaces/RelaySwitchServiceData.html +14 -14
  248. package/docs/interfaces/RelaySwitchStatus.html +6 -6
  249. package/docs/interfaces/RemoteStatus.html +6 -6
  250. package/docs/interfaces/SceneListResponse.html +2 -2
  251. package/docs/interfaces/StripCommands.html +4 -2
  252. package/docs/interfaces/StripServiceData.html +14 -14
  253. package/docs/interfaces/StripStatus.html +6 -6
  254. package/docs/interfaces/SwitchBotConfig.html +15 -15
  255. package/docs/interfaces/VacuumCommands.html +2 -2
  256. package/docs/interfaces/VacuumStatus.html +6 -6
  257. package/docs/interfaces/WebhookConfig.html +2 -2
  258. package/docs/interfaces/WebhookDetails.html +2 -2
  259. package/docs/interfaces/WebhookQueryResponse.html +2 -2
  260. package/docs/interfaces/WebhookSetupResponse.html +2 -2
  261. package/docs/modules.html +1 -1
  262. package/docs/types/ConnectionType.html +1 -1
  263. package/docs/types/PhysicalDeviceType.html +1 -1
  264. package/docs/types/VirtualDeviceType.html +1 -1
  265. package/docs/variables/urls.html +1 -1
  266. package/package.json +2 -2
  267. package/todo/PYSWITCHBOT_COMPARISON.md +5 -9
  268. package/todo/completed.md +179 -0
  269. package/todo/todo.md +54 -122
@@ -1,2 +1,2 @@
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>ConnectionType | 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">ConnectionType</a></li></ul><h1>Type Alias ConnectionType</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">ConnectionType</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;ble&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;api&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;hybrid&quot;</span></div><div class="tsd-comment tsd-typography"><p>Device connection type</p>
2
- </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/OpenWonderLabs/node-switchbot/blob/4d519c7abbc4fb4e44f9ae1b58c53b18a14df244/src/types/index.ts#L20">types/index.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>
2
+ </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/OpenWonderLabs/node-switchbot/blob/ef8ea471bb88c8900c62cb94487e14a7b3fa62b9/src/types/index.ts#L20">types/index.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,2 +1,2 @@
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>PhysicalDeviceType | 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">PhysicalDeviceType</a></li></ul><h1>Type Alias PhysicalDeviceType</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">PhysicalDeviceType</span><span class="tsd-signature-symbol">:</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Bot&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Curtain&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Curtain3&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Plug&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Plug Mini (US)&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Plug Mini (JP)&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Meter&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Meter Plus&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Meter Pro&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Meter Pro (CO2)&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Outdoor Meter&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Lock&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Lock Pro&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Keypad&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Keypad Touch&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Motion Sensor&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Contact Sensor&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Ceiling Light&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Ceiling Light Pro&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Strip Light&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Color Bulb&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Robot Vacuum Cleaner S1&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Robot Vacuum Cleaner S1 Plus&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Robot Vacuum Cleaner K10 Plus&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Humidifier&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Humidifier 2&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Blind Tilt&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Hub 2&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Hub Mini&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Hub Plus&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Remote&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Battery Circulator Fan&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Air Purifier&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Air Purifier Table&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Water Leak Detector&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Presence Sensor&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Relay Switch 1PM&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Relay Switch 1&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;K10+ Pro Combo&quot;</span></div><div class="tsd-comment tsd-typography"><p>Physical device types supported by OpenAPI</p>
2
- </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/OpenWonderLabs/node-switchbot/blob/4d519c7abbc4fb4e44f9ae1b58c53b18a14df244/src/types/api.ts#L213">types/api.ts:213</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>
2
+ </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/OpenWonderLabs/node-switchbot/blob/ef8ea471bb88c8900c62cb94487e14a7b3fa62b9/src/types/api.ts#L213">types/api.ts:213</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,2 +1,2 @@
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>VirtualDeviceType | 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">VirtualDeviceType</a></li></ul><h1>Type Alias VirtualDeviceType</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">VirtualDeviceType</span><span class="tsd-signature-symbol">:</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Air Conditioner&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;TV&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Light&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;IPTV/Streamer&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Set Top Box&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;DVD&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Fan&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Projector&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Camera&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Air Purifier&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Speaker&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Water Heater&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Vacuum Cleaner&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;Others&quot;</span></div><div class="tsd-comment tsd-typography"><p>Virtual/Infrared device types</p>
2
- </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/OpenWonderLabs/node-switchbot/blob/4d519c7abbc4fb4e44f9ae1b58c53b18a14df244/src/types/api.ts#L257">types/api.ts:257</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>
2
+ </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/OpenWonderLabs/node-switchbot/blob/ef8ea471bb88c8900c62cb94487e14a7b3fa62b9/src/types/api.ts#L257">types/api.ts:257</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 +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/4d519c7abbc4fb4e44f9ae1b58c53b18a14df244/src/settings.ts#L14">settings.ts:14</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/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>
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.11",
4
+ "version": "4.0.0-beta.13",
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",
@@ -38,7 +38,7 @@
38
38
  "check": "npm install && npm outdated",
39
39
  "type-check": "tsc --noEmit",
40
40
  "lint": "eslint src/**/*.ts test/**/*.ts && npm run type-check",
41
- "lint:fix": "eslint src/**/*.ts test/**/*.ts --fix",
41
+ "lint:fix": "eslint src/**/*.ts test/**/*.ts --fix && npm run type-check",
42
42
  "lint:src": "eslint src/**/*.ts",
43
43
  "lint:test": "eslint test/**/*.ts",
44
44
  "watch": "npm run build && npm link && nodemon",
@@ -67,13 +67,13 @@ Comprehensive comparison between pySwitchBot (Python) and node-switchbot (TypeSc
67
67
  - `setPosition(position: number, speed?: number)` - Position with speed
68
68
  - Command: `0x57 0x0F 0x45 0x01 0x05 MODE SPEED POSITION`
69
69
 
70
- - [ ] **Task 3.2**: Add Curtain 3 specific commands
70
+ - [x] **Task 3.2**: Add Curtain 3 specific commands
71
71
  - Support Curtain 3 model detection
72
72
  - Implement multi-command sequences
73
73
  - Add extended info retrieval
74
74
 
75
75
  #### Medium Priority
76
- - [ ] **Task 3.3**: Add `getExtendedInfo()` command
76
+ - [x] **Task 3.3**: Add `getExtendedInfo()` command
77
77
  - Returns device chain information
78
78
  - Grouped curtain status
79
79
  - Command: `0x57 0x0F 0x46 0x01`
@@ -148,7 +148,7 @@ Comprehensive comparison between pySwitchBot (Python) and node-switchbot (TypeSc
148
148
  - `setColorTemp(minTemp: number, maxTemp: number, temp: number)`
149
149
  - Command: `0x57 0x0F 0x47 0x01 0x17 BRIGHTNESS MIN_KEL MAX_KEL TEMP`
150
150
 
151
- - [ ] **Task 6.4**: Implement multi-command sequences
151
+ - [x] **Task 6.4**: Implement multi-command sequences
152
152
  - Send multiple commands in series
153
153
  - Used for complex light patterns
154
154
  - Support for Strip Light 3
@@ -156,7 +156,7 @@ Comprehensive comparison between pySwitchBot (Python) and node-switchbot (TypeSc
156
156
  ### Humidifier Commands
157
157
 
158
158
  #### High Priority
159
- - [ ] **Task 7.1**: Add humidity level control
159
+ - [x] **Task 7.1**: Add humidity level control
160
160
  - `setLevel(level: number)` - Set target humidity (1-100)
161
161
  - Command: `0x57 0x0F 0xXX 0x01 LEVEL` (XX varies by model)
162
162
 
@@ -418,14 +418,10 @@ Comprehensive comparison between pySwitchBot (Python) and node-switchbot (TypeSc
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
421
+ [ ] **Task 21.4**: Implement basic settings command
422
422
  - `getBasicInfo()` - Universal settings retrieval
423
423
  - Returns: battery, firmware, device-specific settings
424
424
  - Command: `0x57 0x02`
425
-
426
- - [ ] **Task 21.5**: Add mode setting commands
427
- - Universal mode setting command: `0x57 0x03`
428
- - Extended settings command
429
425
  - Per-device mode enums
430
426
 
431
427
  ### Low Priority
package/todo/completed.md CHANGED
@@ -1,3 +1,137 @@
1
+ ### Task 8.2: Add status with AQI/PM2.5 for air purifiers ✅
2
+ **Completed: March 7, 2026**
3
+ **Implementation Details:**
4
+ - WoAirPurifier getStatus() returns pm25 and airQuality fields from both API and BLE.
5
+ - Air quality index is parsed and mapped to 'excellent', 'good', 'fair', or 'poor'.
6
+ - Fan speed and mode are also included in status.
7
+ - Validated by build, test, and lint cycle.
8
+ - See PR/commit: Task 8.2 implementation, March 7, 2026.
9
+
10
+ ### Task 8.1: Add preset modes for air purifiers ✅
11
+ **Completed: March 7, 2026**
12
+ **Implementation Details:**
13
+ - WoAirPurifier implements setPresetMode() for BLE, supporting all required preset modes: level_1, level_2, level_3, auto, sleep, pet.
14
+ - Command mapping matches roadmap requirements and is validated by build, test, and lint cycle.
15
+ - See PR/commit: Task 8.1 implementation, March 7, 2026.
16
+
17
+ ### Task 7.2: Add mode control for humidifiers ✅
18
+ **Completed: March 7, 2026**
19
+ **Implementation Details:**
20
+ - WoHumi and WoHumi2 implement setAuto(), setManual(), and getTargetLevel().
21
+ - Mode control and target humidity level are available via BLE and API.
22
+ - Methods: setAuto(), setManual(), setMode(), setLevel(), getTargetLevel().
23
+ - Validated by build, test, and lint cycle.
24
+ - See PR/commit: Task 7.2 implementation, March 7, 2026.
25
+
26
+ ### Task 18.7: Add encryption state reset on disconnect ✅
27
+ **Completed: March 7, 2026**
28
+ **Implementation Details:**
29
+ - BLEConnection now clears all encryption state (IV, cipher, mode) for a device on disconnect, ensuring fresh initialization on next connect.
30
+ - Applies to all encryption-enabled devices (relay switches, air purifiers, light strips, etc.).
31
+ - Validated by full build, test, and lint cycle. All encryption and cleanup tests pass.
32
+ - See PR/commit: Task 18.7 implementation, March 7, 2026.
33
+ ### Task 18.6: Add encryption for light strips ✅
34
+ **Completed: March 7, 2026**
35
+ **Implementation Details:**
36
+ - WoBulb, WoStrip, and WoStripLight3 now support BLE encryption using a 16-byte key (encryptionKey) and optional IV/mode, following the relay/lock/air purifier pattern.
37
+ - All BLE commands (turnOn, turnOff, setBrightness, setColor, setEffect, etc.) are encrypted if encryptionKey is present in device info.
38
+ - Utility used: src/utils/relay-encryption.ts for AES-128-CTR encryption and command formatting.
39
+ - Tests: test/strip-encryption.test.ts validates encrypted and plain command sending.
40
+ - All tests passing, lint clean after lint:fix.
41
+ - See PR/commit: Task 18.6 implementation, March 7, 2026.
42
+
43
+ ### Task 18.5: Add encryption for air purifiers ✅
44
+ **Completed: March 7, 2026**
45
+ **Implementation Details:**
46
+ - WoAirPurifier now supports BLE encryption using a 16-byte key (encryptionKey) and optional IV/mode, following the relay/lock pattern.
47
+ - All BLE commands (turnOn, turnOff, setMode, setFanSpeed, setPresetMode) are encrypted if encryptionKey is present in device info.
48
+ - Utility used: src/utils/relay-encryption.ts for AES-128-CTR encryption and command formatting.
49
+ - Tests: test/airpurifier-encryption.test.ts validates encrypted and plain command sending.
50
+ - All tests passing, lint clean after lint:fix.
51
+ - See PR/commit: Task 18.5 implementation, March 7, 2026.
52
+
53
+ ### Task 18.4: Add encryption for relay switches ✅
54
+ **Completed: March 7, 2026**
55
+ **Implementation Details:**
56
+ - Relay switch device classes (WoRelaySwitch1, WoRelaySwitch1PM, WoRelaySwitch2PM) now support BLE encryption using a 16-byte key (encryptionKey) and optional IV/mode, following the lock pattern.
57
+ - All relay switch commands (including channel control) are encrypted if encryptionKey is present in device info.
58
+ - Utility added: src/utils/relay-encryption.ts for AES-128-CTR encryption and command formatting.
59
+ - Tests: test/relay-encryption.test.ts validates encrypted and plain command sending; test/relay-2pm-channel-control.test.ts updated for Buffer compatibility.
60
+ - All tests passing, lint clean after lint:fix.
61
+ - See PR/commit: Task 18.4 implementation, March 7, 2026.
62
+
63
+ ### Task 10.3: Add calibration status tracking ✅
64
+ **Completed: March 7, 2026**
65
+ **Implementation Details:**
66
+ - WoCurtain and WoBlindTilt now parse the calibration bit from BLE advertisements and include a `calibrated` property in their status objects.
67
+ - BlindTiltStatus type updated to include `calibrated?: boolean`.
68
+ - Devices log a warning if not calibrated.
69
+ - Validated by build, test, and lint cycle.
70
+ - See PR/commit: Task 10.3 implementation, March 7, 2026.
71
+
72
+ ### Task 10.4: Add direction detection for covers ✅
73
+ **Completed: March 7, 2026**
74
+ **Implementation Details:**
75
+ - WoCurtain and WoBlindTilt now track direction ('opening' or 'closing') by comparing the current position to the previous position in getStatus().
76
+ - The status object for both devices includes a `direction` property.
77
+ - This enables UI and integrations to show proper movement icons and states.
78
+ - Validated by build, test, and lint cycle.
79
+ - See PR/commit: Task 10.4 implementation, March 7, 2026.
80
+
81
+ ### Task 19.1: Add specific BLE exceptions ✅
82
+ **Completed: March 7, 2026**
83
+ **Implementation Details:**
84
+ - Added SwitchbotOperationError for generic BLE operation failures.
85
+ - Added SwitchbotAuthenticationError for BLE authentication/encryption key failures.
86
+ - Added CharacteristicMissingError for missing BLE characteristics.
87
+ - All new error classes extend SwitchBotError and provide clear error codes and messages.
88
+ - Validated by build, test, and lint cycle.
89
+ - See PR/commit: Task 19.1 implementation, March 7, 2026.
90
+
91
+ ### Task 19.4: Add/expand tests for retry logic (DBus, BLEAK, error context) ✅
92
+ **Completed: March 7, 2026**
93
+ **Implementation Details:**
94
+ - Expanded test/utils.retry.test.ts to cover DBus error backoff, BLEAK_RETRY_EXCEPTIONS, and enhanced error context.
95
+ - Validated that retry logic triggers correct backoff and error handling for all relevant error types.
96
+ - All tests pass, build and lint are clean.
97
+ - See PR/commit: Task 19.4 implementation, March 7, 2026.
98
+
99
+ ### Task 19.5: Add response length validation ✅
100
+ **Completed: March 7, 2026**
101
+ **Implementation Details:**
102
+ - Added validateResponseLength utility to src/utils/index.ts.
103
+ - Applied response length checks to relay, bulb, and air purifier BLE status parsing.
104
+ - Throws descriptive error if response is truncated (shows actual vs expected length and context).
105
+ - All tests pass, build and lint are clean (only style warnings remain).
106
+ - See PR/commit: Task 19.5 implementation, March 7, 2026.
107
+
108
+ ### Task 20.5: Implement notification handling ✅
109
+ **Completed: March 7, 2026**
110
+ **Implementation Details:**
111
+ - BLEConnection now supports per-command notification futures with timeout handling (default 5s, configurable).
112
+ - Unsolicited notifications are logged with device MAC and payload.
113
+ - Test: test/ble-notification-handling.test.ts covers notification futures, timeout, and unsolicited log.
114
+ - Validated by build, test, and lint cycle.
115
+ - See PR/commit: Task 20.5 implementation, March 7, 2026.
116
+
117
+ ### Task 21.3: Add multi-command support ✅
118
+ **Completed: March 7, 2026**
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.
123
+ - Validated by build, test, and lint cycle.
124
+ - See PR/commit: Task 21.3 implementation, March 7, 2026.
125
+
126
+ ### Task 21.4: Implement basic settings command (getBasicInfo) ✅
127
+ **Completed: March 7, 2026**
128
+ **Implementation Details:**
129
+ - Universal method `getBasicInfo()` implemented in base device class.
130
+ - Uses BLE command [0x57, 0x02] or API fallback.
131
+ - Added full JSDoc documentation and a dedicated test file for BLE, API, and error cases.
132
+ - Validated by build, test, and lint cycle.
133
+ - See PR/commit: Task 21.4 implementation, March 7, 2026.
134
+
1
135
  # Completed Tasks
2
136
 
3
137
  Track completed implementation tasks from the pySwitchBot comparison roadmap.
@@ -6,6 +140,51 @@ Last Updated: March 7, 2026
6
140
 
7
141
  ---
8
142
 
143
+ ## Phase 4: Advanced Features (March 7, 2026)
144
+
145
+ ### Task 6.4: Light Multi-Command Sequences ✅
146
+ **Implementation Details:**
147
+ - Added `sendCommandSequence(commands)` to `WoBulb` for ordered multi-command execution where all commands must succeed
148
+ - Added `sendMultipleCommands(commands)` to `WoBulb` for fallback-style execution returning true if any command succeeds
149
+ - Updated `BulbCommands` interface with optional `sendCommandSequence` and `sendMultipleCommands`
150
+ - Added `test/light-multi-command.test.ts` with 8 tests validating:
151
+ - Method availability on `WoBulb` and `WoStripLight3`
152
+ - Sequence stop-on-failure behavior
153
+ - Any-success behavior for multiple commands
154
+ - Complex light pattern sequences
155
+ - Full validation passed: build ✅ tests ✅ (249 passing) lint ✅ type-check ✅
156
+
157
+ ### Task 7.1: Humidity Level Control ✅
158
+ **Implementation Details:**
159
+ - Added `setLevel(level: number)` to `WoHumi` as target humidity convenience command
160
+ - `setLevel` clamps to valid range (1-100) and delegates to `setEfficiency`
161
+ - Updated `HumidifierCommands` interface with optional `setLevel`
162
+ - Added `test/humidifier-level-control.test.ts` with 3 tests validating:
163
+ - Delegation from `setLevel` to `setEfficiency`
164
+ - Clamping behavior for out-of-range input
165
+ - Continued `setLevel` availability on `WoHumi2` via inheritance
166
+ - Full validation passed: build ✅ tests ✅ (249 passing) lint ✅ type-check ✅
167
+
168
+ ### Task 3.2 & 3.3: Curtain 3 Commands & Extended Info ✅
169
+ **Implementation Details:**
170
+ - Added Curtain 3 multi-command sequence support:
171
+ - `sendCommandSequence(commands)` - sends multiple commands in series, all must succeed
172
+ - `sendMultipleCommands(commands)` - sends multiple commands in series, returns true if any succeed
173
+ - Added `getExtendedInfo()` method (BLE command `0x57 0x0F 0x46 0x01`):
174
+ - Returns device chain information (master/slave devices)
175
+ - Provides grouped curtain status (position, calibrated, moving)
176
+ - Added `CurtainExtendedInfo` interface to type system
177
+ - Updated `CurtainCommands` interface with optional new methods
178
+ - Curtain 3 model detection already supported via BLE model '{' and device-type mappings
179
+ - Created `test/curtain3-features.test.ts` with 8 tests validating:
180
+ - Curtain3 device type recognition
181
+ - Multi-command sequence and multiple command methods
182
+ - Extended info method availability
183
+ - Command sequence success/failure behavior
184
+ - Full validation passed: build ✅ tests ✅ (241 passing, +8 new) lint ✅ type-check ✅
185
+
186
+ ---
187
+
9
188
  ## Phase 3: New Devices - Other Devices Block (March 7, 2026)
10
189
 
11
190
  ### Task 17.6: HubMini Matter ✅