node-switchbot 4.0.0-beta.8 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BLE.md +215 -838
- package/CHANGELOG.md +96 -1371
- package/OpenAPI.md +169 -135
- package/README.md +1 -1
- package/dist/api.d.ts +3 -3
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +9 -6
- package/dist/api.js.map +1 -1
- package/dist/ble.d.ts +33 -1
- package/dist/ble.d.ts.map +1 -1
- package/dist/ble.js +415 -37
- package/dist/ble.js.map +1 -1
- package/dist/devices/base.d.ts +100 -1
- package/dist/devices/base.d.ts.map +1 -1
- package/dist/devices/base.js +248 -11
- package/dist/devices/base.js.map +1 -1
- package/dist/devices/device-override-state-during-connection.d.ts +27 -0
- package/dist/devices/device-override-state-during-connection.d.ts.map +1 -0
- package/dist/devices/device-override-state-during-connection.js +45 -0
- package/dist/devices/device-override-state-during-connection.js.map +1 -0
- package/dist/devices/index.d.ts +36 -0
- package/dist/devices/index.d.ts.map +1 -1
- package/dist/devices/index.js +36 -0
- package/dist/devices/index.js.map +1 -1
- package/dist/devices/sequence-device.d.ts +52 -0
- package/dist/devices/sequence-device.d.ts.map +1 -0
- package/dist/devices/sequence-device.js +91 -0
- package/dist/devices/sequence-device.js.map +1 -0
- package/dist/devices/wo-ai-hub.d.ts +9 -0
- package/dist/devices/wo-ai-hub.d.ts.map +1 -0
- package/dist/devices/wo-ai-hub.js +25 -0
- package/dist/devices/wo-ai-hub.js.map +1 -0
- package/dist/devices/wo-air-purifier-pm25.d.ts +29 -0
- package/dist/devices/wo-air-purifier-pm25.d.ts.map +1 -0
- package/dist/devices/wo-air-purifier-pm25.js +144 -0
- package/dist/devices/wo-air-purifier-pm25.js.map +1 -0
- package/dist/devices/wo-air-purifier.d.ts +21 -4
- package/dist/devices/wo-air-purifier.d.ts.map +1 -1
- package/dist/devices/wo-air-purifier.js +111 -61
- package/dist/devices/wo-air-purifier.js.map +1 -1
- package/dist/devices/wo-art-frame.d.ts +8 -0
- package/dist/devices/wo-art-frame.d.ts.map +1 -0
- package/dist/devices/wo-art-frame.js +12 -0
- package/dist/devices/wo-art-frame.js.map +1 -0
- package/dist/devices/wo-blind-tilt.d.ts +2 -16
- package/dist/devices/wo-blind-tilt.d.ts.map +1 -1
- package/dist/devices/wo-blind-tilt.js +135 -62
- package/dist/devices/wo-blind-tilt.js.map +1 -1
- package/dist/devices/wo-bulb.d.ts +37 -1
- package/dist/devices/wo-bulb.d.ts.map +1 -1
- package/dist/devices/wo-bulb.js +196 -51
- package/dist/devices/wo-bulb.js.map +1 -1
- package/dist/devices/wo-candle-warmer-lamp.d.ts +25 -0
- package/dist/devices/wo-candle-warmer-lamp.d.ts.map +1 -0
- package/dist/devices/wo-candle-warmer-lamp.js +81 -0
- package/dist/devices/wo-candle-warmer-lamp.js.map +1 -0
- package/dist/devices/wo-circulator-fan.d.ts +8 -0
- package/dist/devices/wo-circulator-fan.d.ts.map +1 -0
- package/dist/devices/wo-circulator-fan.js +12 -0
- package/dist/devices/wo-circulator-fan.js.map +1 -0
- package/dist/devices/wo-climate-panel.d.ts +8 -0
- package/dist/devices/wo-climate-panel.d.ts.map +1 -0
- package/dist/devices/wo-climate-panel.js +12 -0
- package/dist/devices/wo-climate-panel.js.map +1 -0
- package/dist/devices/wo-contact.d.ts +1 -1
- package/dist/devices/wo-contact.d.ts.map +1 -1
- package/dist/devices/wo-contact.js +19 -35
- package/dist/devices/wo-contact.js.map +1 -1
- package/dist/devices/wo-curtain.d.ts +20 -4
- package/dist/devices/wo-curtain.d.ts.map +1 -1
- package/dist/devices/wo-curtain.js +130 -35
- package/dist/devices/wo-curtain.js.map +1 -1
- package/dist/devices/wo-floor-lamp.d.ts +8 -0
- package/dist/devices/wo-floor-lamp.d.ts.map +1 -0
- package/dist/devices/wo-floor-lamp.js +12 -0
- package/dist/devices/wo-floor-lamp.js.map +1 -0
- package/dist/devices/wo-garage-door-opener.d.ts +8 -0
- package/dist/devices/wo-garage-door-opener.d.ts.map +1 -0
- package/dist/devices/wo-garage-door-opener.js +12 -0
- package/dist/devices/wo-garage-door-opener.js.map +1 -0
- package/dist/devices/wo-hand.d.ts +22 -6
- package/dist/devices/wo-hand.d.ts.map +1 -1
- package/dist/devices/wo-hand.js +55 -39
- package/dist/devices/wo-hand.js.map +1 -1
- package/dist/devices/wo-hub2.d.ts +1 -1
- package/dist/devices/wo-hub2.d.ts.map +1 -1
- package/dist/devices/wo-hub2.js +17 -33
- package/dist/devices/wo-hub2.js.map +1 -1
- package/dist/devices/wo-hubmini-matter.d.ts +8 -0
- package/dist/devices/wo-hubmini-matter.d.ts.map +1 -0
- package/dist/devices/wo-hubmini-matter.js +12 -0
- package/dist/devices/wo-hubmini-matter.js.map +1 -0
- package/dist/devices/wo-humi.d.ts +18 -2
- package/dist/devices/wo-humi.d.ts.map +1 -1
- package/dist/devices/wo-humi.js +60 -36
- package/dist/devices/wo-humi.js.map +1 -1
- package/dist/devices/wo-humi2.d.ts.map +1 -1
- package/dist/devices/wo-humi2.js.map +1 -1
- package/dist/devices/wo-keypad-vision-pro.d.ts +18 -0
- package/dist/devices/wo-keypad-vision-pro.d.ts.map +1 -0
- package/dist/devices/wo-keypad-vision-pro.js +15 -0
- package/dist/devices/wo-keypad-vision-pro.js.map +1 -0
- package/dist/devices/wo-keypad-vision.d.ts +8 -0
- package/dist/devices/wo-keypad-vision.d.ts.map +1 -0
- package/dist/devices/wo-keypad-vision.js +12 -0
- package/dist/devices/wo-keypad-vision.js.map +1 -0
- package/dist/devices/wo-keypad.d.ts +1 -1
- package/dist/devices/wo-keypad.d.ts.map +1 -1
- package/dist/devices/wo-keypad.js +14 -30
- package/dist/devices/wo-keypad.js.map +1 -1
- package/dist/devices/wo-leak.d.ts +1 -1
- package/dist/devices/wo-leak.d.ts.map +1 -1
- package/dist/devices/wo-leak.js +15 -31
- package/dist/devices/wo-leak.js.map +1 -1
- package/dist/devices/wo-lock-lite.d.ts +7 -0
- package/dist/devices/wo-lock-lite.d.ts.map +1 -0
- package/dist/devices/wo-lock-lite.js +11 -0
- package/dist/devices/wo-lock-lite.js.map +1 -0
- package/dist/devices/wo-lock-pro-wifi.d.ts +7 -0
- package/dist/devices/wo-lock-pro-wifi.d.ts.map +1 -0
- package/dist/devices/wo-lock-pro-wifi.js +11 -0
- package/dist/devices/wo-lock-pro-wifi.js.map +1 -0
- package/dist/devices/wo-lock-pro.d.ts +12 -3
- package/dist/devices/wo-lock-pro.d.ts.map +1 -1
- package/dist/devices/wo-lock-pro.js +83 -37
- package/dist/devices/wo-lock-pro.js.map +1 -1
- package/dist/devices/wo-lock-vision-pro.d.ts +7 -0
- package/dist/devices/wo-lock-vision-pro.d.ts.map +1 -0
- package/dist/devices/wo-lock-vision-pro.js +11 -0
- package/dist/devices/wo-lock-vision-pro.js.map +1 -0
- package/dist/devices/wo-lock-vision.d.ts +7 -0
- package/dist/devices/wo-lock-vision.d.ts.map +1 -0
- package/dist/devices/wo-lock-vision.js +11 -0
- package/dist/devices/wo-lock-vision.js.map +1 -0
- package/dist/devices/wo-lock.d.ts +8 -3
- package/dist/devices/wo-lock.d.ts.map +1 -1
- package/dist/devices/wo-lock.js +75 -36
- package/dist/devices/wo-lock.js.map +1 -1
- package/dist/devices/wo-pan-tilt-cam-plus-3k.d.ts +21 -0
- package/dist/devices/wo-pan-tilt-cam-plus-3k.d.ts.map +1 -0
- package/dist/devices/wo-pan-tilt-cam-plus-3k.js +87 -0
- package/dist/devices/wo-pan-tilt-cam-plus-3k.js.map +1 -0
- package/dist/devices/wo-plug-mini-us.d.ts +3 -3
- package/dist/devices/wo-plug-mini-us.d.ts.map +1 -1
- package/dist/devices/wo-plug-mini-us.js +25 -35
- package/dist/devices/wo-plug-mini-us.js.map +1 -1
- package/dist/devices/wo-presence.d.ts +1 -1
- package/dist/devices/wo-presence.d.ts.map +1 -1
- package/dist/devices/wo-presence.js +17 -33
- package/dist/devices/wo-presence.js.map +1 -1
- package/dist/devices/wo-relay-switch-1.d.ts +19 -3
- package/dist/devices/wo-relay-switch-1.d.ts.map +1 -1
- package/dist/devices/wo-relay-switch-1.js +90 -42
- package/dist/devices/wo-relay-switch-1.js.map +1 -1
- package/dist/devices/wo-relay-switch-2pm.d.ts +21 -0
- package/dist/devices/wo-relay-switch-2pm.d.ts.map +1 -0
- package/dist/devices/wo-relay-switch-2pm.js +37 -0
- package/dist/devices/wo-relay-switch-2pm.js.map +1 -0
- package/dist/devices/wo-remote-with-screen.d.ts +9 -0
- package/dist/devices/wo-remote-with-screen.d.ts.map +1 -0
- package/dist/devices/wo-remote-with-screen.js +22 -0
- package/dist/devices/wo-remote-with-screen.js.map +1 -0
- package/dist/devices/wo-remote.d.ts +1 -1
- package/dist/devices/wo-remote.d.ts.map +1 -1
- package/dist/devices/wo-remote.js +13 -29
- package/dist/devices/wo-remote.js.map +1 -1
- package/dist/devices/wo-rgbic-bulb.d.ts +29 -0
- package/dist/devices/wo-rgbic-bulb.d.ts.map +1 -0
- package/dist/devices/wo-rgbic-bulb.js +84 -0
- package/dist/devices/wo-rgbic-bulb.js.map +1 -0
- package/dist/devices/wo-rgbic-neon-wire-rope-light.d.ts +29 -0
- package/dist/devices/wo-rgbic-neon-wire-rope-light.d.ts.map +1 -0
- package/dist/devices/wo-rgbic-neon-wire-rope-light.js +113 -0
- package/dist/devices/wo-rgbic-neon-wire-rope-light.js.map +1 -0
- package/dist/devices/wo-rgbicww-floor-lamp.d.ts +8 -0
- package/dist/devices/wo-rgbicww-floor-lamp.d.ts.map +1 -0
- package/dist/devices/wo-rgbicww-floor-lamp.js +12 -0
- package/dist/devices/wo-rgbicww-floor-lamp.js.map +1 -0
- package/dist/devices/wo-rgbicww-strip-light.d.ts +8 -0
- package/dist/devices/wo-rgbicww-strip-light.d.ts.map +1 -0
- package/dist/devices/wo-rgbicww-strip-light.js +12 -0
- package/dist/devices/wo-rgbicww-strip-light.js.map +1 -0
- package/dist/devices/wo-roller-shade.d.ts +8 -0
- package/dist/devices/wo-roller-shade.d.ts.map +1 -0
- package/dist/devices/wo-roller-shade.js +12 -0
- package/dist/devices/wo-roller-shade.js.map +1 -0
- package/dist/devices/wo-sensor-th.d.ts +1 -1
- package/dist/devices/wo-sensor-th.d.ts.map +1 -1
- package/dist/devices/wo-sensor-th.js +18 -34
- package/dist/devices/wo-sensor-th.js.map +1 -1
- package/dist/devices/wo-smart-thermostat-radiator.d.ts +8 -0
- package/dist/devices/wo-smart-thermostat-radiator.d.ts.map +1 -0
- package/dist/devices/wo-smart-thermostat-radiator.js +12 -0
- package/dist/devices/wo-smart-thermostat-radiator.js.map +1 -0
- package/dist/devices/wo-strip-light-3.d.ts +8 -0
- package/dist/devices/wo-strip-light-3.d.ts.map +1 -0
- package/dist/devices/wo-strip-light-3.js +12 -0
- package/dist/devices/wo-strip-light-3.js.map +1 -0
- package/dist/devices/wo-vacuum-k10-plus.d.ts +7 -0
- package/dist/devices/wo-vacuum-k10-plus.d.ts.map +1 -0
- package/dist/devices/wo-vacuum-k10-plus.js +11 -0
- package/dist/devices/wo-vacuum-k10-plus.js.map +1 -0
- package/dist/devices/wo-vacuum-k10-pro-combo.d.ts +7 -0
- package/dist/devices/wo-vacuum-k10-pro-combo.d.ts.map +1 -0
- package/dist/devices/wo-vacuum-k10-pro-combo.js +11 -0
- package/dist/devices/wo-vacuum-k10-pro-combo.js.map +1 -0
- package/dist/devices/wo-vacuum-k10-pro.d.ts +7 -0
- package/dist/devices/wo-vacuum-k10-pro.d.ts.map +1 -0
- package/dist/devices/wo-vacuum-k10-pro.js +11 -0
- package/dist/devices/wo-vacuum-k10-pro.js.map +1 -0
- package/dist/devices/wo-vacuum-k11-plus.d.ts +7 -0
- package/dist/devices/wo-vacuum-k11-plus.d.ts.map +1 -0
- package/dist/devices/wo-vacuum-k11-plus.js +11 -0
- package/dist/devices/wo-vacuum-k11-plus.js.map +1 -0
- package/dist/devices/wo-vacuum-k20.d.ts +7 -0
- package/dist/devices/wo-vacuum-k20.d.ts.map +1 -0
- package/dist/devices/wo-vacuum-k20.js +11 -0
- package/dist/devices/wo-vacuum-k20.js.map +1 -0
- package/dist/devices/wo-vacuum-s10.d.ts +7 -0
- package/dist/devices/wo-vacuum-s10.d.ts.map +1 -0
- package/dist/devices/wo-vacuum-s10.js +11 -0
- package/dist/devices/wo-vacuum-s10.js.map +1 -0
- package/dist/devices/wo-vacuum-s20.d.ts +7 -0
- package/dist/devices/wo-vacuum-s20.d.ts.map +1 -0
- package/dist/devices/wo-vacuum-s20.js +11 -0
- package/dist/devices/wo-vacuum-s20.js.map +1 -0
- package/dist/devices/wo-vacuum.d.ts +44 -0
- package/dist/devices/wo-vacuum.d.ts.map +1 -0
- package/dist/devices/wo-vacuum.js +143 -0
- package/dist/devices/wo-vacuum.js.map +1 -0
- package/dist/devices/wo-water-detector.d.ts +9 -0
- package/dist/devices/wo-water-detector.d.ts.map +1 -0
- package/dist/devices/wo-water-detector.js +20 -0
- package/dist/devices/wo-water-detector.js.map +1 -0
- package/dist/errors.d.ts +20 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +31 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/settings.d.ts +25 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +85 -6
- package/dist/settings.js.map +1 -1
- package/dist/switchbot.d.ts +1 -0
- package/dist/switchbot.d.ts.map +1 -1
- package/dist/switchbot.js +154 -34
- package/dist/switchbot.js.map +1 -1
- package/dist/types/ble.d.ts +24 -0
- package/dist/types/ble.d.ts.map +1 -1
- package/dist/types/ble.js.map +1 -1
- package/dist/types/device.d.ts +84 -5
- package/dist/types/device.d.ts.map +1 -1
- package/dist/types/index.d.ts +26 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utils/fallback-handler.js +0 -1
- package/dist/utils/fallback-handler.js.map +1 -1
- package/dist/utils/index.d.ts +21 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +49 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/relay-encryption.d.ts +10 -0
- package/dist/utils/relay-encryption.d.ts.map +1 -0
- package/dist/utils/relay-encryption.js +23 -0
- package/dist/utils/relay-encryption.js.map +1 -0
- package/dist/utils/retry.d.ts.map +1 -1
- package/dist/utils/retry.js +49 -6
- package/dist/utils/retry.js.map +1 -1
- package/package.json +30 -14
- package/.gitattributes +0 -2
- package/.github/copilot-instructions.md +0 -179
- package/.github/dependabot.yml +0 -17
- package/.github/labeler.yml +0 -38
- package/.github/npm-version-script-esm.js +0 -97
- package/.github/workflows/beta-release.yml +0 -52
- package/.github/workflows/release.yml +0 -71
- package/.github/workflows/stale.yml +0 -12
- package/PRODUCTION_READY.md +0 -135
- package/branding/Node_x_SwitchBot.svg +0 -8
- package/branding/icon.png +0 -0
- package/branding/switchbot.png +0 -0
- package/docs/.nojekyll +0 -1
- package/docs/assets/hierarchy.js +0 -1
- package/docs/assets/highlight.css +0 -85
- package/docs/assets/icons.js +0 -18
- package/docs/assets/icons.svg +0 -1
- package/docs/assets/main.js +0 -60
- package/docs/assets/navigation.js +0 -1
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1633
- package/docs/classes/APIError.html +0 -6
- package/docs/classes/APINotAvailableError.html +0 -4
- package/docs/classes/BLEConnection.html +0 -17
- package/docs/classes/BLENotAvailableError.html +0 -4
- package/docs/classes/BLEScanner.html +0 -17
- package/docs/classes/CommandFailedError.html +0 -6
- package/docs/classes/ConnectionTimeoutError.html +0 -5
- package/docs/classes/DeviceManager.html +0 -25
- package/docs/classes/DeviceNotFoundError.html +0 -4
- package/docs/classes/DiscoveryError.html +0 -5
- package/docs/classes/OpenAPIClient.html +0 -66
- package/docs/classes/SwitchBot.html +0 -22
- package/docs/classes/SwitchBotDevice.html +0 -56
- package/docs/classes/SwitchBotError.html +0 -4
- package/docs/classes/ValidationError.html +0 -5
- package/docs/classes/WoAirPurifier.html +0 -63
- package/docs/classes/WoAirPurifierTable.html +0 -64
- package/docs/classes/WoBlindTilt.html +0 -67
- package/docs/classes/WoBulb.html +0 -65
- package/docs/classes/WoCeilingLight.html +0 -66
- package/docs/classes/WoContact.html +0 -55
- package/docs/classes/WoCurtain.html +0 -63
- package/docs/classes/WoHand.html +0 -69
- package/docs/classes/WoHub2.html +0 -55
- package/docs/classes/WoHub3.html +0 -56
- package/docs/classes/WoHumi.html +0 -63
- package/docs/classes/WoHumi2.html +0 -64
- package/docs/classes/WoIOSensorTH.html +0 -56
- package/docs/classes/WoKeypad.html +0 -56
- package/docs/classes/WoLeak.html +0 -55
- package/docs/classes/WoPlugMiniJP.html +0 -62
- package/docs/classes/WoPlugMiniUS.html +0 -61
- package/docs/classes/WoPresence.html +0 -55
- package/docs/classes/WoRelaySwitch1.html +0 -61
- package/docs/classes/WoRelaySwitch1PM.html +0 -62
- package/docs/classes/WoRemote.html +0 -56
- package/docs/classes/WoSensorTH.html +0 -55
- package/docs/classes/WoSensorTHPlus.html +0 -56
- package/docs/classes/WoSensorTHPro.html +0 -56
- package/docs/classes/WoSensorTHProCO2.html +0 -56
- package/docs/classes/WoSmartLock.html +0 -59
- package/docs/classes/WoSmartLockPro.html +0 -61
- package/docs/classes/WoStrip.html +0 -66
- package/docs/enums/LogLevel.html +0 -7
- package/docs/enums/SwitchBotBLEModel.html +0 -40
- package/docs/enums/SwitchBotBLEModelName.html +0 -40
- package/docs/functions/updateBaseURL.html +0 -3
- package/docs/hierarchy.html +0 -1
- package/docs/index.html +0 -55
- package/docs/interfaces/APICommandRequest.html +0 -5
- package/docs/interfaces/APICommandResponse.html +0 -5
- package/docs/interfaces/APIDevice.html +0 -18
- package/docs/interfaces/APIDeviceStatus.html +0 -36
- package/docs/interfaces/APIErrorResponse.html +0 -5
- package/docs/interfaces/APIResponse.html +0 -5
- package/docs/interfaces/AirPurifierCommands.html +0 -5
- package/docs/interfaces/AirPurifierServiceData.html +0 -14
- package/docs/interfaces/AirPurifierStatus.html +0 -17
- package/docs/interfaces/BLEAdvertisement.html +0 -7
- package/docs/interfaces/BLEScanOptions.html +0 -10
- package/docs/interfaces/BLEServiceData.html +0 -10
- package/docs/interfaces/BlindTiltCommands.html +0 -7
- package/docs/interfaces/BlindTiltServiceData.html +0 -14
- package/docs/interfaces/BlindTiltStatus.html +0 -15
- package/docs/interfaces/BotCommands.html +0 -4
- package/docs/interfaces/BotServiceData.html +0 -12
- package/docs/interfaces/BotStatus.html +0 -14
- package/docs/interfaces/BulbCommands.html +0 -6
- package/docs/interfaces/BulbServiceData.html +0 -19
- package/docs/interfaces/BulbStatus.html +0 -16
- package/docs/interfaces/CeilingLightCommands.html +0 -6
- package/docs/interfaces/CeilingLightServiceData.html +0 -19
- package/docs/interfaces/CeilingLightStatus.html +0 -16
- package/docs/interfaces/CommandResult.html +0 -12
- package/docs/interfaces/ContactServiceData.html +0 -13
- package/docs/interfaces/ContactStatus.html +0 -15
- package/docs/interfaces/CurtainCommands.html +0 -5
- package/docs/interfaces/CurtainServiceData.html +0 -14
- package/docs/interfaces/CurtainStatus.html +0 -17
- package/docs/interfaces/DeviceInfo.html +0 -28
- package/docs/interfaces/DeviceListResponse.html +0 -4
- package/docs/interfaces/DeviceStatus.html +0 -12
- package/docs/interfaces/DiscoveryOptions.html +0 -14
- package/docs/interfaces/HubServiceData.html +0 -14
- package/docs/interfaces/HubStatus.html +0 -15
- package/docs/interfaces/HumidifierCommands.html +0 -5
- package/docs/interfaces/HumidifierServiceData.html +0 -14
- package/docs/interfaces/HumidifierStatus.html +0 -18
- package/docs/interfaces/KeypadStatus.html +0 -13
- package/docs/interfaces/LeakServiceData.html +0 -11
- package/docs/interfaces/LeakStatus.html +0 -13
- package/docs/interfaces/LockCommands.html +0 -3
- package/docs/interfaces/LockServiceData.html +0 -15
- package/docs/interfaces/LockStatus.html +0 -15
- package/docs/interfaces/MeterServiceData.html +0 -13
- package/docs/interfaces/MeterStatus.html +0 -15
- package/docs/interfaces/MotionServiceData.html +0 -13
- package/docs/interfaces/MotionStatus.html +0 -14
- package/docs/interfaces/PlugCommands.html +0 -4
- package/docs/interfaces/PlugServiceData.html +0 -17
- package/docs/interfaces/PlugStatus.html +0 -16
- package/docs/interfaces/PresenceServiceData.html +0 -12
- package/docs/interfaces/PresenceStatus.html +0 -14
- package/docs/interfaces/RelaySwitchCommands.html +0 -4
- package/docs/interfaces/RelaySwitchServiceData.html +0 -14
- package/docs/interfaces/RelaySwitchStatus.html +0 -16
- package/docs/interfaces/RemoteStatus.html +0 -12
- package/docs/interfaces/SceneListResponse.html +0 -3
- package/docs/interfaces/StripCommands.html +0 -6
- package/docs/interfaces/StripServiceData.html +0 -19
- package/docs/interfaces/StripStatus.html +0 -16
- package/docs/interfaces/SwitchBotConfig.html +0 -30
- package/docs/interfaces/WebhookConfig.html +0 -4
- package/docs/interfaces/WebhookDetails.html +0 -7
- package/docs/interfaces/WebhookQueryResponse.html +0 -5
- package/docs/interfaces/WebhookSetupResponse.html +0 -5
- package/docs/media/BLE.md +0 -1259
- package/docs/media/OpenAPI.md +0 -186
- package/docs/modules.html +0 -1
- package/docs/types/ConnectionType.html +0 -2
- package/docs/types/PhysicalDeviceType.html +0 -2
- package/docs/types/VirtualDeviceType.html +0 -2
- package/docs/variables/urls.html +0 -1
- package/tmp-switchbot-scan.mjs +0 -79
- package/tsconfig.build.json +0 -17
package/docs/variables/urls.html
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/f817feccc138c85e1b387ae95d00b30743e9ddee/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>
|
package/tmp-switchbot-scan.mjs
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import noble from '@stoprocent/noble'
|
|
2
|
-
|
|
3
|
-
const SWITCHBOT_UUIDS = new Set(['fd3d', '0000fd3d00001000800000805f9b34fb'])
|
|
4
|
-
const discovered = new Map()
|
|
5
|
-
|
|
6
|
-
function normalizeUuid(uuid = '') {
|
|
7
|
-
return String(uuid).toLowerCase().replace(/-/g, '')
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function toHex(buf) {
|
|
11
|
-
if (!buf) return undefined
|
|
12
|
-
return Buffer.from(buf).toString('hex')
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const timeoutMs = 12000
|
|
16
|
-
let finished = false
|
|
17
|
-
|
|
18
|
-
function done(reason = 'completed') {
|
|
19
|
-
if (finished) return
|
|
20
|
-
finished = true
|
|
21
|
-
|
|
22
|
-
try {
|
|
23
|
-
noble.stopScanning()
|
|
24
|
-
} catch {}
|
|
25
|
-
|
|
26
|
-
const devices = [...discovered.values()]
|
|
27
|
-
const output = {
|
|
28
|
-
reason,
|
|
29
|
-
count: devices.length,
|
|
30
|
-
devices,
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
console.log('\n=== SwitchBot BLE Scan Result ===')
|
|
34
|
-
console.log(JSON.stringify(output, null, 2))
|
|
35
|
-
process.exit(0)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
noble.on('stateChange', (state) => {
|
|
39
|
-
console.log(`[scan] stateChange: ${state}`)
|
|
40
|
-
if (state === 'poweredOn') {
|
|
41
|
-
try {
|
|
42
|
-
noble.startScanning([], true)
|
|
43
|
-
console.log('[scan] scanning started')
|
|
44
|
-
setTimeout(() => done('scan-timeout'), timeoutMs)
|
|
45
|
-
} catch (error) {
|
|
46
|
-
console.error('[scan] failed to start scan', error)
|
|
47
|
-
done('scan-start-failed')
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
noble.on('discover', (peripheral) => {
|
|
53
|
-
const ad = peripheral?.advertisement || {}
|
|
54
|
-
const serviceData = Array.isArray(ad.serviceData) ? ad.serviceData : []
|
|
55
|
-
const switchbotServiceData = serviceData.filter(item => SWITCHBOT_UUIDS.has(normalizeUuid(item?.uuid)))
|
|
56
|
-
if (!switchbotServiceData.length) {
|
|
57
|
-
return
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const key = peripheral?.id || peripheral?.address || `unknown-${discovered.size + 1}`
|
|
61
|
-
discovered.set(key, {
|
|
62
|
-
id: peripheral?.id,
|
|
63
|
-
address: peripheral?.address,
|
|
64
|
-
connectable: peripheral?.connectable,
|
|
65
|
-
rssi: peripheral?.rssi,
|
|
66
|
-
localName: ad.localName,
|
|
67
|
-
serviceUuids: ad.serviceUuids,
|
|
68
|
-
serviceData: switchbotServiceData.map(item => ({
|
|
69
|
-
uuid: item?.uuid,
|
|
70
|
-
dataHex: toHex(item?.data),
|
|
71
|
-
})),
|
|
72
|
-
manufacturerDataHex: toHex(ad.manufacturerData),
|
|
73
|
-
})
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
setTimeout(() => {
|
|
77
|
-
console.log(`[scan] timeout waiting for poweredOn state`)
|
|
78
|
-
done('poweredOn-timeout')
|
|
79
|
-
}, timeoutMs + 5000)
|
package/tsconfig.build.json
DELETED