node-switchbot 4.0.0-beta.15 → 4.0.0-beta.16
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/dist/ble.d.ts +1 -1
- package/dist/ble.d.ts.map +1 -1
- package/dist/ble.js +32 -26
- package/dist/ble.js.map +1 -1
- package/dist/devices/wo-ai-hub.d.ts +5 -2
- package/dist/devices/wo-ai-hub.d.ts.map +1 -1
- package/dist/devices/wo-ai-hub.js +35 -1
- package/dist/devices/wo-ai-hub.js.map +1 -1
- package/dist/devices/wo-air-purifier-pm25.d.ts +25 -2
- package/dist/devices/wo-air-purifier-pm25.d.ts.map +1 -1
- package/dist/devices/wo-air-purifier-pm25.js +153 -1
- package/dist/devices/wo-air-purifier-pm25.js.map +1 -1
- package/dist/devices/wo-candle-warmer-lamp.d.ts +20 -1
- package/dist/devices/wo-candle-warmer-lamp.d.ts.map +1 -1
- package/dist/devices/wo-candle-warmer-lamp.js +91 -1
- package/dist/devices/wo-candle-warmer-lamp.js.map +1 -1
- package/dist/devices/wo-pan-tilt-cam-plus-3k.d.ts +15 -0
- package/dist/devices/wo-pan-tilt-cam-plus-3k.d.ts.map +1 -1
- package/dist/devices/wo-pan-tilt-cam-plus-3k.js +93 -1
- package/dist/devices/wo-pan-tilt-cam-plus-3k.js.map +1 -1
- package/dist/devices/wo-remote-with-screen.d.ts +3 -0
- package/dist/devices/wo-remote-with-screen.d.ts.map +1 -1
- package/dist/devices/wo-remote-with-screen.js +32 -1
- package/dist/devices/wo-remote-with-screen.js.map +1 -1
- package/dist/devices/wo-rgbic-neon-wire-rope-light.d.ts +25 -2
- package/dist/devices/wo-rgbic-neon-wire-rope-light.d.ts.map +1 -1
- package/dist/devices/wo-rgbic-neon-wire-rope-light.js +123 -1
- package/dist/devices/wo-rgbic-neon-wire-rope-light.js.map +1 -1
- package/dist/devices/wo-water-detector.d.ts +5 -2
- package/dist/devices/wo-water-detector.d.ts.map +1 -1
- package/dist/devices/wo-water-detector.js +30 -1
- package/dist/devices/wo-water-detector.js.map +1 -1
- package/dist/switchbot.d.ts.map +1 -1
- package/dist/switchbot.js +12 -12
- package/dist/switchbot.js.map +1 -1
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/APIError.html +2 -2
- package/docs/classes/APINotAvailableError.html +2 -2
- package/docs/classes/BLEConnection.html +10 -10
- package/docs/classes/BLENotAvailableError.html +2 -2
- package/docs/classes/BLEScanner.html +9 -9
- package/docs/classes/CommandFailedError.html +2 -2
- package/docs/classes/ConnectionTimeoutError.html +2 -2
- package/docs/classes/DeviceManager.html +13 -13
- package/docs/classes/DeviceNotFoundError.html +2 -2
- package/docs/classes/DeviceOverrideStateDuringConnection.html +34 -34
- package/docs/classes/DiscoveryError.html +2 -2
- package/docs/classes/OpenAPIClient.html +24 -24
- package/docs/classes/SequenceDevice.html +35 -35
- package/docs/classes/SwitchBot.html +11 -11
- package/docs/classes/SwitchBotDevice.html +34 -34
- package/docs/classes/SwitchBotError.html +2 -2
- package/docs/classes/ValidationError.html +2 -2
- package/docs/classes/WoAIHub.html +34 -34
- package/docs/classes/WoAirPurifier.html +40 -40
- package/docs/classes/WoAirPurifierPM25.html +43 -42
- package/docs/classes/WoAirPurifierTable.html +40 -40
- package/docs/classes/WoArtFrame.html +43 -43
- package/docs/classes/WoBlindTilt.html +41 -41
- package/docs/classes/WoBulb.html +43 -43
- package/docs/classes/WoCandleWarmerLamp.html +40 -34
- package/docs/classes/WoCeilingLight.html +43 -43
- package/docs/classes/WoCirculatorFan.html +40 -40
- package/docs/classes/WoClimatePanel.html +40 -40
- package/docs/classes/WoContact.html +34 -34
- package/docs/classes/WoCurtain.html +40 -40
- package/docs/classes/WoFloorLamp.html +43 -43
- package/docs/classes/WoGarageDoorOpener.html +39 -39
- package/docs/classes/WoHand.html +43 -43
- package/docs/classes/WoHub2.html +34 -34
- package/docs/classes/WoHub3.html +34 -34
- package/docs/classes/WoHubMiniMatter.html +34 -34
- package/docs/classes/WoHumi.html +41 -41
- package/docs/classes/WoHumi2.html +41 -41
- package/docs/classes/WoIOSensorTH.html +34 -34
- package/docs/classes/WoKeypad.html +34 -34
- package/docs/classes/WoKeypadVision.html +34 -34
- package/docs/classes/WoKeypadVisionPro.html +34 -34
- package/docs/classes/WoLeak.html +34 -34
- package/docs/classes/WoPanTiltCamPlus3K.html +40 -34
- package/docs/classes/WoPlugMiniJP.html +37 -37
- package/docs/classes/WoPlugMiniUS.html +37 -37
- package/docs/classes/WoPresence.html +34 -34
- package/docs/classes/WoRGBICBulb.html +45 -45
- package/docs/classes/WoRGBICNeonWireRopeLight.html +44 -34
- package/docs/classes/WoRGBICWWFloorLamp.html +45 -45
- package/docs/classes/WoRGBICWWStripLight.html +45 -45
- package/docs/classes/WoRelaySwitch1.html +39 -39
- package/docs/classes/WoRelaySwitch1PM.html +39 -39
- package/docs/classes/WoRelaySwitch2PM.html +41 -41
- package/docs/classes/WoRemote.html +34 -34
- package/docs/classes/WoRemoteWithScreen.html +34 -34
- package/docs/classes/WoRollerShade.html +40 -40
- package/docs/classes/WoSensorTH.html +34 -34
- package/docs/classes/WoSensorTHPlus.html +34 -34
- package/docs/classes/WoSensorTHPro.html +34 -34
- package/docs/classes/WoSensorTHProCO2.html +34 -34
- package/docs/classes/WoSmartLock.html +37 -37
- package/docs/classes/WoSmartLockLite.html +37 -37
- package/docs/classes/WoSmartLockPro.html +39 -39
- package/docs/classes/WoSmartLockProWiFi.html +39 -39
- package/docs/classes/WoSmartLockVision.html +37 -37
- package/docs/classes/WoSmartLockVisionPro.html +39 -39
- package/docs/classes/WoSmartThermostatRadiator.html +40 -40
- package/docs/classes/WoStrip.html +43 -43
- package/docs/classes/WoStripLight3.html +43 -43
- package/docs/classes/WoVacuum.html +42 -42
- package/docs/classes/WoVacuumK10Plus.html +42 -42
- package/docs/classes/WoVacuumK10Pro.html +42 -42
- package/docs/classes/WoVacuumK10ProCombo.html +42 -42
- package/docs/classes/WoVacuumK11Plus.html +42 -42
- package/docs/classes/WoVacuumK20.html +42 -42
- package/docs/classes/WoVacuumS10.html +42 -42
- package/docs/classes/WoVacuumS20.html +42 -42
- package/docs/classes/WoWaterDetector.html +34 -34
- package/docs/enums/LogLevel.html +2 -2
- package/docs/enums/SwitchBotBLEModel.html +2 -2
- package/docs/enums/SwitchBotBLEModelName.html +2 -2
- package/docs/functions/updateBaseURL.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/APICommandRequest.html +2 -2
- package/docs/interfaces/APICommandResponse.html +2 -2
- package/docs/interfaces/APIDevice.html +2 -2
- package/docs/interfaces/APIDeviceStatus.html +2 -2
- package/docs/interfaces/APIErrorResponse.html +2 -2
- package/docs/interfaces/APIResponse.html +2 -2
- package/docs/interfaces/AirPurifierCommands.html +2 -2
- package/docs/interfaces/AirPurifierServiceData.html +14 -14
- package/docs/interfaces/AirPurifierStatus.html +7 -7
- package/docs/interfaces/BLEAdvertisement.html +5 -5
- package/docs/interfaces/BLEScanOptions.html +5 -5
- package/docs/interfaces/BLEServiceData.html +14 -14
- package/docs/interfaces/BlindTiltCommands.html +2 -2
- package/docs/interfaces/BlindTiltServiceData.html +14 -14
- package/docs/interfaces/BlindTiltStatus.html +6 -6
- package/docs/interfaces/BotCommands.html +2 -2
- package/docs/interfaces/BotServiceData.html +14 -14
- package/docs/interfaces/BotStatus.html +6 -6
- package/docs/interfaces/BulbCommands.html +2 -2
- package/docs/interfaces/BulbServiceData.html +14 -14
- package/docs/interfaces/BulbStatus.html +6 -6
- package/docs/interfaces/CeilingLightCommands.html +2 -2
- package/docs/interfaces/CeilingLightServiceData.html +14 -14
- package/docs/interfaces/CeilingLightStatus.html +6 -6
- package/docs/interfaces/CommandResult.html +6 -6
- package/docs/interfaces/ContactServiceData.html +14 -14
- package/docs/interfaces/ContactStatus.html +6 -6
- package/docs/interfaces/CurtainCommands.html +2 -2
- package/docs/interfaces/CurtainExtendedInfo.html +2 -2
- package/docs/interfaces/CurtainServiceData.html +14 -14
- package/docs/interfaces/CurtainStatus.html +6 -6
- package/docs/interfaces/DeviceInfo.html +18 -18
- package/docs/interfaces/DeviceListResponse.html +2 -2
- package/docs/interfaces/DeviceStatus.html +6 -6
- package/docs/interfaces/DiscoveryOptions.html +7 -7
- package/docs/interfaces/HubServiceData.html +14 -14
- package/docs/interfaces/HubStatus.html +6 -6
- package/docs/interfaces/HumidifierCommands.html +2 -2
- package/docs/interfaces/HumidifierServiceData.html +15 -15
- package/docs/interfaces/HumidifierStatus.html +6 -6
- package/docs/interfaces/KeypadStatus.html +6 -6
- package/docs/interfaces/LeakServiceData.html +14 -14
- package/docs/interfaces/LeakStatus.html +6 -6
- package/docs/interfaces/LockCommands.html +2 -2
- package/docs/interfaces/LockServiceData.html +15 -15
- package/docs/interfaces/LockStatus.html +6 -6
- package/docs/interfaces/MeterServiceData.html +14 -14
- package/docs/interfaces/MeterStatus.html +6 -6
- package/docs/interfaces/MotionServiceData.html +14 -14
- package/docs/interfaces/MotionStatus.html +6 -6
- package/docs/interfaces/PlugCommands.html +2 -2
- package/docs/interfaces/PlugServiceData.html +14 -14
- package/docs/interfaces/PlugStatus.html +6 -6
- package/docs/interfaces/PresenceServiceData.html +14 -14
- package/docs/interfaces/PresenceStatus.html +6 -6
- package/docs/interfaces/RelaySwitchCommands.html +2 -2
- package/docs/interfaces/RelaySwitchServiceData.html +14 -14
- package/docs/interfaces/RelaySwitchStatus.html +6 -6
- package/docs/interfaces/RemoteStatus.html +6 -6
- package/docs/interfaces/SceneListResponse.html +2 -2
- package/docs/interfaces/StripCommands.html +2 -2
- package/docs/interfaces/StripServiceData.html +14 -14
- package/docs/interfaces/StripStatus.html +6 -6
- package/docs/interfaces/SwitchBotConfig.html +15 -15
- package/docs/interfaces/VacuumCommands.html +2 -2
- package/docs/interfaces/VacuumStatus.html +6 -6
- package/docs/interfaces/WebhookConfig.html +2 -2
- package/docs/interfaces/WebhookDetails.html +2 -2
- package/docs/interfaces/WebhookQueryResponse.html +2 -2
- package/docs/interfaces/WebhookSetupResponse.html +2 -2
- package/docs/types/ConnectionType.html +1 -1
- package/docs/types/PhysicalDeviceType.html +1 -1
- package/docs/types/VirtualDeviceType.html +1 -1
- package/docs/variables/urls.html +1 -1
- package/package.json +1 -1
- package/todo/todo.md +10 -0
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
import type { DeviceStatus } from '../types/index.js';
|
|
2
2
|
import { SwitchBotDevice } from './base.js';
|
|
3
|
+
export interface CandleWarmerLampStatus extends DeviceStatus {
|
|
4
|
+
power?: 'on' | 'off';
|
|
5
|
+
brightness?: number;
|
|
6
|
+
}
|
|
3
7
|
export declare class WoCandleWarmerLamp extends SwitchBotDevice {
|
|
4
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Get device status (BLE first, then API)
|
|
10
|
+
*/
|
|
11
|
+
getStatus(): Promise<CandleWarmerLampStatus>;
|
|
12
|
+
/**
|
|
13
|
+
* Turn on the candle warmer lamp
|
|
14
|
+
*/
|
|
15
|
+
turnOn(): Promise<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* Turn off the candle warmer lamp
|
|
18
|
+
*/
|
|
19
|
+
turnOff(): Promise<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* Set brightness (1-100)
|
|
22
|
+
*/
|
|
23
|
+
setBrightness(level: number): Promise<boolean>;
|
|
5
24
|
}
|
|
6
25
|
//# sourceMappingURL=wo-candle-warmer-lamp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wo-candle-warmer-lamp.d.ts","sourceRoot":"","sources":["../../src/devices/wo-candle-warmer-lamp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"wo-candle-warmer-lamp.d.ts","sourceRoot":"","sources":["../../src/devices/wo-candle-warmer-lamp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,WAAW,sBAAuB,SAAQ,YAAY;IAC1D,KAAK,CAAC,EAAE,IAAI,GAAG,KAAK,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,qBAAa,kBAAmB,SAAQ,eAAe;IACrD;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,sBAAsB,CAAC;IAgClD;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAmBhC;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;IAmBjC;;OAEG;IACG,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAmBrD"}
|
|
@@ -1,7 +1,97 @@
|
|
|
1
|
+
import { Buffer } from 'node:buffer';
|
|
1
2
|
import { SwitchBotDevice } from './base.js';
|
|
2
3
|
export class WoCandleWarmerLamp extends SwitchBotDevice {
|
|
4
|
+
/**
|
|
5
|
+
* Get device status (BLE first, then API)
|
|
6
|
+
*/
|
|
3
7
|
async getStatus() {
|
|
4
|
-
|
|
8
|
+
try {
|
|
9
|
+
// Try BLE first
|
|
10
|
+
if (this.hasBLE()) {
|
|
11
|
+
const bleData = await this.getBLEStatus();
|
|
12
|
+
return {
|
|
13
|
+
deviceId: this.info.id,
|
|
14
|
+
connectionType: 'ble',
|
|
15
|
+
updatedAt: new Date(),
|
|
16
|
+
power: bleData.state ? 'on' : 'off',
|
|
17
|
+
brightness: typeof bleData.brightness === 'number' ? bleData.brightness : undefined,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
// Fallback to API
|
|
21
|
+
if (this.hasAPI()) {
|
|
22
|
+
const apiStatus = await this.getAPIStatus();
|
|
23
|
+
return {
|
|
24
|
+
deviceId: this.info.id,
|
|
25
|
+
connectionType: 'api',
|
|
26
|
+
updatedAt: new Date(),
|
|
27
|
+
power: apiStatus.power,
|
|
28
|
+
brightness: typeof apiStatus.brightness === 'number' ? apiStatus.brightness : undefined,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
throw new Error('No connection method available');
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
this.logger.error('Failed to get status', error);
|
|
35
|
+
throw error;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Turn on the candle warmer lamp
|
|
40
|
+
*/
|
|
41
|
+
async turnOn() {
|
|
42
|
+
// BLE first
|
|
43
|
+
if (this.hasBLE()) {
|
|
44
|
+
const command = Buffer.from([0x57, 0x01, 0x01]);
|
|
45
|
+
const result = await this.sendCommand(command, 'turnOn');
|
|
46
|
+
if (result.success) {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
// API fallback
|
|
51
|
+
if (this.hasAPI()) {
|
|
52
|
+
const result = await this.sendAPICommand('turnOn');
|
|
53
|
+
return result.success;
|
|
54
|
+
}
|
|
55
|
+
throw new Error('No connection method available');
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Turn off the candle warmer lamp
|
|
59
|
+
*/
|
|
60
|
+
async turnOff() {
|
|
61
|
+
// BLE first
|
|
62
|
+
if (this.hasBLE()) {
|
|
63
|
+
const command = Buffer.from([0x57, 0x01, 0x02]);
|
|
64
|
+
const result = await this.sendCommand(command, 'turnOff');
|
|
65
|
+
if (result.success) {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// API fallback
|
|
70
|
+
if (this.hasAPI()) {
|
|
71
|
+
const result = await this.sendAPICommand('turnOff');
|
|
72
|
+
return result.success;
|
|
73
|
+
}
|
|
74
|
+
throw new Error('No connection method available');
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Set brightness (1-100)
|
|
78
|
+
*/
|
|
79
|
+
async setBrightness(level) {
|
|
80
|
+
const clamped = Math.max(1, Math.min(100, level));
|
|
81
|
+
// BLE first
|
|
82
|
+
if (this.hasBLE()) {
|
|
83
|
+
const command = Buffer.from([0x57, 0x02, clamped]);
|
|
84
|
+
const result = await this.sendCommand(command, 'setBrightness', clamped);
|
|
85
|
+
if (result.success) {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
// API fallback
|
|
90
|
+
if (this.hasAPI()) {
|
|
91
|
+
const result = await this.sendAPICommand('setBrightness', clamped);
|
|
92
|
+
return result.success;
|
|
93
|
+
}
|
|
94
|
+
throw new Error('No connection method available');
|
|
5
95
|
}
|
|
6
96
|
}
|
|
7
97
|
//# sourceMappingURL=wo-candle-warmer-lamp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wo-candle-warmer-lamp.js","sourceRoot":"","sources":["../../src/devices/wo-candle-warmer-lamp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"wo-candle-warmer-lamp.js","sourceRoot":"","sources":["../../src/devices/wo-candle-warmer-lamp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAO3C,MAAM,OAAO,kBAAmB,SAAQ,eAAe;IACrD;;OAEG;IACH,KAAK,CAAC,SAAS;QACb,IAAI,CAAC;YACH,gBAAgB;YAChB,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;gBAClB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;gBACzC,OAAO;oBACL,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE;oBACtB,cAAc,EAAE,KAAK;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;oBACnC,UAAU,EAAE,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,IAAI,CAAA;YACb,CAAC;QACH,CAAC;QAED,eAAe;QACf,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;YAClB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,EAAE,OAAO,CAAC,CAAA;YAClE,OAAO,MAAM,CAAC,OAAO,CAAA;QACvB,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;IACnD,CAAC;CACF"}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import type { DeviceStatus } from '../types/index.js';
|
|
2
2
|
import { SwitchBotDevice } from './base.js';
|
|
3
3
|
export declare class WoPanTiltCamPlus3K extends SwitchBotDevice {
|
|
4
|
+
/**
|
|
5
|
+
* Get device status (BLE first, then API)
|
|
6
|
+
*/
|
|
4
7
|
getStatus(): Promise<DeviceStatus>;
|
|
8
|
+
/**
|
|
9
|
+
* Pan the camera (degrees: -180 to 180)
|
|
10
|
+
*/
|
|
11
|
+
pan(degrees: number): Promise<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* Tilt the camera (degrees: -90 to 90)
|
|
14
|
+
*/
|
|
15
|
+
tilt(degrees: number): Promise<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* Reset the camera position
|
|
18
|
+
*/
|
|
19
|
+
reset(): Promise<boolean>;
|
|
5
20
|
}
|
|
6
21
|
//# sourceMappingURL=wo-pan-tilt-cam-plus-3k.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wo-pan-tilt-cam-plus-3k.d.ts","sourceRoot":"","sources":["../../src/devices/wo-pan-tilt-cam-plus-3k.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"wo-pan-tilt-cam-plus-3k.d.ts","sourceRoot":"","sources":["../../src/devices/wo-pan-tilt-cam-plus-3k.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,qBAAa,kBAAmB,SAAQ,eAAe;IACrD;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,YAAY,CAAC;IA8BxC;;OAEG;IACG,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAmB5C;;OAEG;IACG,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAmB7C;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;CAiBhC"}
|
|
@@ -1,7 +1,99 @@
|
|
|
1
|
+
import { Buffer } from 'node:buffer';
|
|
1
2
|
import { SwitchBotDevice } from './base.js';
|
|
2
3
|
export class WoPanTiltCamPlus3K extends SwitchBotDevice {
|
|
4
|
+
/**
|
|
5
|
+
* Get device status (BLE first, then API)
|
|
6
|
+
*/
|
|
3
7
|
async getStatus() {
|
|
4
|
-
|
|
8
|
+
try {
|
|
9
|
+
// Try BLE first
|
|
10
|
+
if (this.hasBLE()) {
|
|
11
|
+
await this.getBLEStatus();
|
|
12
|
+
return {
|
|
13
|
+
deviceId: this.info.id,
|
|
14
|
+
connectionType: 'ble',
|
|
15
|
+
updatedAt: new Date(),
|
|
16
|
+
// Add more fields if available from BLE
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
// Fallback to API
|
|
20
|
+
if (this.hasAPI()) {
|
|
21
|
+
await this.getAPIStatus();
|
|
22
|
+
return {
|
|
23
|
+
deviceId: this.info.id,
|
|
24
|
+
connectionType: 'api',
|
|
25
|
+
updatedAt: new Date(),
|
|
26
|
+
// Add more fields if available from API
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
throw new Error('No connection method available');
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
this.logger.error('Failed to get status', error);
|
|
33
|
+
throw error;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Pan the camera (degrees: -180 to 180)
|
|
38
|
+
*/
|
|
39
|
+
async pan(degrees) {
|
|
40
|
+
const clamped = Math.max(-180, Math.min(180, degrees));
|
|
41
|
+
// BLE first
|
|
42
|
+
if (this.hasBLE()) {
|
|
43
|
+
// Example BLE command, update as needed
|
|
44
|
+
const command = Buffer.from([0x60, 0x01, clamped & 0xFF]);
|
|
45
|
+
const result = await this.sendCommand(command, 'pan', clamped);
|
|
46
|
+
if (result.success) {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
// API fallback
|
|
51
|
+
if (this.hasAPI()) {
|
|
52
|
+
const result = await this.sendAPICommand('pan', clamped);
|
|
53
|
+
return result.success;
|
|
54
|
+
}
|
|
55
|
+
throw new Error('No connection method available');
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Tilt the camera (degrees: -90 to 90)
|
|
59
|
+
*/
|
|
60
|
+
async tilt(degrees) {
|
|
61
|
+
const clamped = Math.max(-90, Math.min(90, degrees));
|
|
62
|
+
// BLE first
|
|
63
|
+
if (this.hasBLE()) {
|
|
64
|
+
// Example BLE command, update as needed
|
|
65
|
+
const command = Buffer.from([0x60, 0x02, clamped & 0xFF]);
|
|
66
|
+
const result = await this.sendCommand(command, 'tilt', clamped);
|
|
67
|
+
if (result.success) {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// API fallback
|
|
72
|
+
if (this.hasAPI()) {
|
|
73
|
+
const result = await this.sendAPICommand('tilt', clamped);
|
|
74
|
+
return result.success;
|
|
75
|
+
}
|
|
76
|
+
throw new Error('No connection method available');
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Reset the camera position
|
|
80
|
+
*/
|
|
81
|
+
async reset() {
|
|
82
|
+
// BLE first
|
|
83
|
+
if (this.hasBLE()) {
|
|
84
|
+
// Example BLE command, update as needed
|
|
85
|
+
const command = Buffer.from([0x60, 0x03, 0x00]);
|
|
86
|
+
const result = await this.sendCommand(command, 'reset');
|
|
87
|
+
if (result.success) {
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
// API fallback
|
|
92
|
+
if (this.hasAPI()) {
|
|
93
|
+
const result = await this.sendAPICommand('reset');
|
|
94
|
+
return result.success;
|
|
95
|
+
}
|
|
96
|
+
throw new Error('No connection method available');
|
|
5
97
|
}
|
|
6
98
|
}
|
|
7
99
|
//# sourceMappingURL=wo-pan-tilt-cam-plus-3k.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wo-pan-tilt-cam-plus-3k.js","sourceRoot":"","sources":["../../src/devices/wo-pan-tilt-cam-plus-3k.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,OAAO,kBAAmB,SAAQ,eAAe;IACrD,KAAK,CAAC,SAAS;QACb,MAAM,IAAI,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"wo-pan-tilt-cam-plus-3k.js","sourceRoot":"","sources":["../../src/devices/wo-pan-tilt-cam-plus-3k.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,OAAO,kBAAmB,SAAQ,eAAe;IACrD;;OAEG;IACH,KAAK,CAAC,SAAS;QACb,IAAI,CAAC;YACH,gBAAgB;YAChB,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;gBAClB,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;gBACzB,OAAO;oBACL,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE;oBACtB,cAAc,EAAE,KAAK;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,wCAAwC;iBACzC,CAAA;YACH,CAAC;YAED,kBAAkB;YAClB,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AI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;YAClB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;YACjD,OAAO,MAAM,CAAC,OAAO,CAAA;QACvB,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;IACnD,CAAC;CACF"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { DeviceStatus } from '../types/index.js';
|
|
2
2
|
import { SwitchBotDevice } from './base.js';
|
|
3
3
|
export declare class WoRemoteWithScreen extends SwitchBotDevice {
|
|
4
|
+
/**
|
|
5
|
+
* Get device status (BLE first, then API)
|
|
6
|
+
*/
|
|
4
7
|
getStatus(): Promise<DeviceStatus>;
|
|
5
8
|
}
|
|
6
9
|
//# sourceMappingURL=wo-remote-with-screen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wo-remote-with-screen.d.ts","sourceRoot":"","sources":["../../src/devices/wo-remote-with-screen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,qBAAa,kBAAmB,SAAQ,eAAe;
|
|
1
|
+
{"version":3,"file":"wo-remote-with-screen.d.ts","sourceRoot":"","sources":["../../src/devices/wo-remote-with-screen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,qBAAa,kBAAmB,SAAQ,eAAe;IACrD;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,YAAY,CAAC;CA+BzC"}
|
|
@@ -1,7 +1,38 @@
|
|
|
1
1
|
import { SwitchBotDevice } from './base.js';
|
|
2
2
|
export class WoRemoteWithScreen extends SwitchBotDevice {
|
|
3
|
+
/**
|
|
4
|
+
* Get device status (BLE first, then API)
|
|
5
|
+
*/
|
|
3
6
|
async getStatus() {
|
|
4
|
-
|
|
7
|
+
try {
|
|
8
|
+
// Try BLE first
|
|
9
|
+
if (this.hasBLE()) {
|
|
10
|
+
const bleData = await this.getBLEStatus();
|
|
11
|
+
return {
|
|
12
|
+
deviceId: this.info.id,
|
|
13
|
+
connectionType: 'ble',
|
|
14
|
+
updatedAt: new Date(),
|
|
15
|
+
battery: bleData.battery,
|
|
16
|
+
version: bleData.version,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
// Fallback to API
|
|
20
|
+
if (this.hasAPI()) {
|
|
21
|
+
const apiStatus = await this.getAPIStatus();
|
|
22
|
+
return {
|
|
23
|
+
deviceId: this.info.id,
|
|
24
|
+
connectionType: 'api',
|
|
25
|
+
updatedAt: new Date(),
|
|
26
|
+
battery: apiStatus.battery,
|
|
27
|
+
version: apiStatus.version,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
throw new Error('No connection method available');
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
this.logger?.error?.('Failed to get status', error);
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
5
36
|
}
|
|
6
37
|
}
|
|
7
38
|
//# sourceMappingURL=wo-remote-with-screen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wo-remote-with-screen.js","sourceRoot":"","sources":["../../src/devices/wo-remote-with-screen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,OAAO,kBAAmB,SAAQ,eAAe;IACrD,KAAK,CAAC,SAAS;QACb,MAAM,IAAI,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"wo-remote-with-screen.js","sourceRoot":"","sources":["../../src/devices/wo-remote-with-screen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,OAAO,kBAAmB,SAAQ,eAAe;IACrD;;OAEG;IACH,KAAK,CAAC,SAAS;QACb,IAAI,CAAC;YACH,gBAAgB;YAChB,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;gBAClB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;gBACzC,OAAO;oBACL,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE;oBACtB,cAAc,EAAE,KAAK;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,OAAO,EAAE,OAAO,CAAC,OAAO;iBACzB,CAAA;YACH,CAAC;YAED,kBAAkB;YAClB,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;gBAClB,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;gBAC3C,OAAO;oBACL,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE;oBACtB,cAAc,EAAE,KAAK;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,OAAO,EAAE,SAAS,CAAC,OAAO;oBAC1B,OAAO,EAAE,SAAS,CAAC,OAAO;iBAC3B,CAAA;YACH,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;QACnD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAA;YACnD,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,6 +1,29 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RGBICBulbStatus } from '../types/device.js';
|
|
2
2
|
import { SwitchBotDevice } from './base.js';
|
|
3
3
|
export declare class WoRGBICNeonWireRopeLight extends SwitchBotDevice {
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Get device status (BLE first, then API)
|
|
6
|
+
*/
|
|
7
|
+
getStatus(): Promise<RGBICBulbStatus>;
|
|
8
|
+
/**
|
|
9
|
+
* Turn on the neon wire rope light
|
|
10
|
+
*/
|
|
11
|
+
turnOn(): Promise<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* Turn off the neon wire rope light
|
|
14
|
+
*/
|
|
15
|
+
turnOff(): Promise<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* Set brightness (1-100)
|
|
18
|
+
*/
|
|
19
|
+
setBrightness(level: number): Promise<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* Set color (RGB)
|
|
22
|
+
*/
|
|
23
|
+
setColor(red: number, green: number, blue: number): Promise<boolean>;
|
|
24
|
+
/**
|
|
25
|
+
* Set color temperature (Kelvin)
|
|
26
|
+
*/
|
|
27
|
+
setColorTemperature(temperature: number): Promise<boolean>;
|
|
5
28
|
}
|
|
6
29
|
//# sourceMappingURL=wo-rgbic-neon-wire-rope-light.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wo-rgbic-neon-wire-rope-light.d.ts","sourceRoot":"","sources":["../../src/devices/wo-rgbic-neon-wire-rope-light.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"wo-rgbic-neon-wire-rope-light.d.ts","sourceRoot":"","sources":["../../src/devices/wo-rgbic-neon-wire-rope-light.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,qBAAa,wBAAyB,SAAQ,eAAe;IAC3D;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC;IAmC3C;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAehC;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;IAejC;;OAEG;IACG,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAgBpD;;OAEG;IACG,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAe1E;;OAEG;IACG,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAcjE"}
|
|
@@ -1,7 +1,129 @@
|
|
|
1
|
+
import { Buffer } from 'node:buffer';
|
|
1
2
|
import { SwitchBotDevice } from './base.js';
|
|
2
3
|
export class WoRGBICNeonWireRopeLight extends SwitchBotDevice {
|
|
4
|
+
/**
|
|
5
|
+
* Get device status (BLE first, then API)
|
|
6
|
+
*/
|
|
3
7
|
async getStatus() {
|
|
4
|
-
|
|
8
|
+
try {
|
|
9
|
+
// BLE first
|
|
10
|
+
if (this.hasBLE()) {
|
|
11
|
+
const bleData = await this.getBLEStatus();
|
|
12
|
+
return {
|
|
13
|
+
deviceId: this.info.id,
|
|
14
|
+
connectionType: 'ble',
|
|
15
|
+
updatedAt: new Date(),
|
|
16
|
+
power: bleData.state ? 'on' : 'off',
|
|
17
|
+
brightness: bleData.brightness,
|
|
18
|
+
colorTemperature: bleData.colorTemperature,
|
|
19
|
+
color: bleData.red !== undefined ? { r: bleData.red, g: bleData.green, b: bleData.blue } : undefined,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
// API fallback
|
|
23
|
+
if (this.hasAPI()) {
|
|
24
|
+
const apiStatus = await this.getAPIStatus();
|
|
25
|
+
return {
|
|
26
|
+
deviceId: this.info.id,
|
|
27
|
+
connectionType: 'api',
|
|
28
|
+
updatedAt: new Date(),
|
|
29
|
+
power: apiStatus.power,
|
|
30
|
+
brightness: apiStatus.brightness,
|
|
31
|
+
colorTemperature: apiStatus.colorTemperature,
|
|
32
|
+
color: apiStatus.color,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
throw new Error('No connection method available');
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
this.logger?.error?.('Failed to get status', error);
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Turn on the neon wire rope light
|
|
44
|
+
*/
|
|
45
|
+
async turnOn() {
|
|
46
|
+
if (this.hasBLE()) {
|
|
47
|
+
const command = Buffer.from([0x57, 0x01, 0x01]);
|
|
48
|
+
const result = await this.sendCommand(command, 'turnOn');
|
|
49
|
+
if (result.success) {
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (this.hasAPI()) {
|
|
54
|
+
const result = await this.sendAPICommand('turnOn');
|
|
55
|
+
return result.success;
|
|
56
|
+
}
|
|
57
|
+
throw new Error('No connection method available');
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Turn off the neon wire rope light
|
|
61
|
+
*/
|
|
62
|
+
async turnOff() {
|
|
63
|
+
if (this.hasBLE()) {
|
|
64
|
+
const command = Buffer.from([0x57, 0x01, 0x02]);
|
|
65
|
+
const result = await this.sendCommand(command, 'turnOff');
|
|
66
|
+
if (result.success) {
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (this.hasAPI()) {
|
|
71
|
+
const result = await this.sendAPICommand('turnOff');
|
|
72
|
+
return result.success;
|
|
73
|
+
}
|
|
74
|
+
throw new Error('No connection method available');
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Set brightness (1-100)
|
|
78
|
+
*/
|
|
79
|
+
async setBrightness(level) {
|
|
80
|
+
const clamped = Math.max(1, Math.min(100, level));
|
|
81
|
+
if (this.hasBLE()) {
|
|
82
|
+
const command = Buffer.from([0x57, 0x02, clamped]);
|
|
83
|
+
const result = await this.sendCommand(command, 'setBrightness', clamped);
|
|
84
|
+
if (result.success) {
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (this.hasAPI()) {
|
|
89
|
+
const result = await this.sendAPICommand('setBrightness', clamped);
|
|
90
|
+
return result.success;
|
|
91
|
+
}
|
|
92
|
+
throw new Error('No connection method available');
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Set color (RGB)
|
|
96
|
+
*/
|
|
97
|
+
async setColor(red, green, blue) {
|
|
98
|
+
if (this.hasBLE()) {
|
|
99
|
+
const command = Buffer.from([0x57, 0x03, red, green, blue]);
|
|
100
|
+
const result = await this.sendCommand(command, 'setColor', { red, green, blue });
|
|
101
|
+
if (result.success) {
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (this.hasAPI()) {
|
|
106
|
+
const result = await this.sendAPICommand('setColor', { red, green, blue });
|
|
107
|
+
return result.success;
|
|
108
|
+
}
|
|
109
|
+
throw new Error('No connection method available');
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Set color temperature (Kelvin)
|
|
113
|
+
*/
|
|
114
|
+
async setColorTemperature(temperature) {
|
|
115
|
+
if (this.hasBLE()) {
|
|
116
|
+
const command = Buffer.from([0x57, 0x04, temperature & 0xFF, (temperature >> 8) & 0xFF]);
|
|
117
|
+
const result = await this.sendCommand(command, 'setColorTemperature', temperature);
|
|
118
|
+
if (result.success) {
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (this.hasAPI()) {
|
|
123
|
+
const result = await this.sendAPICommand('setColorTemperature', temperature);
|
|
124
|
+
return result.success;
|
|
125
|
+
}
|
|
126
|
+
throw new Error('No connection method available');
|
|
5
127
|
}
|
|
6
128
|
}
|
|
7
129
|
//# sourceMappingURL=wo-rgbic-neon-wire-rope-light.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wo-rgbic-neon-wire-rope-light.js","sourceRoot":"","sources":["../../src/devices/wo-rgbic-neon-wire-rope-light.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE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AAA;YAC5E,OAAO,MAAM,CAAC,OAAO,CAAA;QACvB,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;IACnD,CAAC;CACF"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LeakStatus } from '../types/device.js';
|
|
2
2
|
import { SwitchBotDevice } from './base.js';
|
|
3
3
|
export declare class WoWaterDetector extends SwitchBotDevice {
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Get device status (BLE first, then API)
|
|
6
|
+
*/
|
|
7
|
+
getStatus(): Promise<LeakStatus>;
|
|
5
8
|
}
|
|
6
9
|
//# sourceMappingURL=wo-water-detector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wo-water-detector.d.ts","sourceRoot":"","sources":["../../src/devices/wo-water-detector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"wo-water-detector.d.ts","sourceRoot":"","sources":["../../src/devices/wo-water-detector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,qBAAa,eAAgB,SAAQ,eAAe;IAClD;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC;CA4BvC"}
|
|
@@ -1,7 +1,36 @@
|
|
|
1
1
|
import { SwitchBotDevice } from './base.js';
|
|
2
2
|
export class WoWaterDetector extends SwitchBotDevice {
|
|
3
|
+
/**
|
|
4
|
+
* Get device status (BLE first, then API)
|
|
5
|
+
*/
|
|
3
6
|
async getStatus() {
|
|
4
|
-
|
|
7
|
+
try {
|
|
8
|
+
// BLE first
|
|
9
|
+
if (this.hasBLE()) {
|
|
10
|
+
const bleData = await this.getBLEStatus();
|
|
11
|
+
return {
|
|
12
|
+
deviceId: this.info.id,
|
|
13
|
+
connectionType: 'ble',
|
|
14
|
+
updatedAt: new Date(),
|
|
15
|
+
waterLeakDetected: !!bleData.waterLeakDetected,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
// API fallback
|
|
19
|
+
if (this.hasAPI()) {
|
|
20
|
+
const apiStatus = await this.getAPIStatus();
|
|
21
|
+
return {
|
|
22
|
+
deviceId: this.info.id,
|
|
23
|
+
connectionType: 'api',
|
|
24
|
+
updatedAt: new Date(),
|
|
25
|
+
waterLeakDetected: !!apiStatus.waterLeakDetected,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
throw new Error('No connection method available');
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
this.logger?.error?.('Failed to get status', error);
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
5
34
|
}
|
|
6
35
|
}
|
|
7
36
|
//# sourceMappingURL=wo-water-detector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wo-water-detector.js","sourceRoot":"","sources":["../../src/devices/wo-water-detector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,OAAO,eAAgB,SAAQ,eAAe;IAClD,KAAK,CAAC,SAAS;QACb,MAAM,IAAI,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"wo-water-detector.js","sourceRoot":"","sources":["../../src/devices/wo-water-detector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,OAAO,eAAgB,SAAQ,eAAe;IAClD;;OAEG;IACH,KAAK,CAAC,SAAS;QACb,IAAI,CAAC;YACH,YAAY;YACZ,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;gBAClB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;gBACzC,OAAO;oBACL,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE;oBACtB,cAAc,EAAE,KAAK;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB;iBAC/C,CAAA;YACH,CAAC;YACD,eAAe;YACf,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;gBAClB,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;gBAC3C,OAAO;oBACL,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE;oBACtB,cAAc,EAAE,KAAK;oBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;oBACrB,iBAAiB,EAAE,CAAC,CAAC,SAAS,CAAC,iBAAiB;iBACjD,CAAA;YACH,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;QACnD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAA;YACnD,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC;CACF"}
|
package/dist/switchbot.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switchbot.d.ts","sourceRoot":"","sources":["../src/switchbot.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EAAkB,gBAAgB,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAEnG,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAiB,UAAU,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"switchbot.d.ts","sourceRoot":"","sources":["../src/switchbot.ts"],"names":[],"mappings":"AAKA,OAAO,K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