@switchbot/homebridge-switchbot 3.5.0-beta.3 → 3.5.0-beta.31
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/CHANGELOG.md +4 -1
- package/config.schema.json +147 -9
- package/dist/device/blindtilt.d.ts +21 -94
- package/dist/device/blindtilt.d.ts.map +1 -1
- package/dist/device/blindtilt.js +347 -756
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.d.ts +25 -71
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +582 -759
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.d.ts +13 -67
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +209 -587
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts +13 -74
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +250 -632
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts +14 -65
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +204 -531
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts +17 -86
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +335 -786
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/device.d.ts +59 -0
- package/dist/device/device.d.ts.map +1 -0
- package/dist/device/device.js +654 -0
- package/dist/device/device.js.map +1 -0
- package/dist/device/fan.d.ts +51 -0
- package/dist/device/fan.d.ts.map +1 -0
- package/dist/device/fan.js +499 -0
- package/dist/device/fan.js.map +1 -0
- package/dist/device/hub.d.ts +15 -59
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +242 -596
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts +10 -65
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +207 -571
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.d.ts +11 -64
- package/dist/device/iosensor.d.ts.map +1 -1
- package/dist/device/iosensor.js +174 -584
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.d.ts +10 -68
- package/dist/device/lightstrip.d.ts.map +1 -1
- package/dist/device/lightstrip.js +252 -568
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.d.ts +15 -62
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +210 -542
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts +13 -63
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +170 -577
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts +13 -64
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +159 -577
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts +13 -69
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +136 -518
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts +9 -57
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +82 -452
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.d.ts +11 -62
- package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
- package/dist/device/robotvacuumcleaner.js +140 -451
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.d.ts +9 -70
- package/dist/device/waterdetector.d.ts.map +1 -1
- package/dist/device/waterdetector.js +121 -664
- package/dist/device/waterdetector.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/irdevice/airconditioner.d.ts +8 -48
- package/dist/irdevice/airconditioner.d.ts.map +1 -1
- package/dist/irdevice/airconditioner.js +309 -419
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/irdevice/airpurifier.d.ts +7 -38
- package/dist/irdevice/airpurifier.d.ts.map +1 -1
- package/dist/irdevice/airpurifier.js +72 -304
- package/dist/irdevice/airpurifier.js.map +1 -1
- package/dist/irdevice/camera.d.ts +6 -35
- package/dist/irdevice/camera.d.ts.map +1 -1
- package/dist/irdevice/camera.js +34 -278
- package/dist/irdevice/camera.js.map +1 -1
- package/dist/irdevice/fan.d.ts +6 -39
- package/dist/irdevice/fan.d.ts.map +1 -1
- package/dist/irdevice/fan.js +67 -311
- package/dist/irdevice/fan.js.map +1 -1
- package/dist/irdevice/irdevice.d.ts +40 -0
- package/dist/irdevice/irdevice.d.ts.map +1 -0
- package/dist/irdevice/irdevice.js +509 -0
- package/dist/irdevice/irdevice.js.map +1 -0
- package/dist/irdevice/light.d.ts +6 -34
- package/dist/irdevice/light.d.ts.map +1 -1
- package/dist/irdevice/light.js +23 -272
- package/dist/irdevice/light.js.map +1 -1
- package/dist/irdevice/other.d.ts +18 -47
- package/dist/irdevice/other.d.ts.map +1 -1
- package/dist/irdevice/other.js +352 -546
- package/dist/irdevice/other.js.map +1 -1
- package/dist/irdevice/tv.d.ts +7 -39
- package/dist/irdevice/tv.d.ts.map +1 -1
- package/dist/irdevice/tv.js +82 -321
- package/dist/irdevice/tv.js.map +1 -1
- package/dist/irdevice/vacuumcleaner.d.ts +6 -35
- package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
- package/dist/irdevice/vacuumcleaner.js +41 -284
- package/dist/irdevice/vacuumcleaner.js.map +1 -1
- package/dist/irdevice/waterheater.d.ts +6 -35
- package/dist/irdevice/waterheater.d.ts.map +1 -1
- package/dist/irdevice/waterheater.js +42 -287
- package/dist/irdevice/waterheater.js.map +1 -1
- package/dist/platform.d.ts +14 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +237 -94
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +40 -10
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +0 -552
- package/dist/settings.js.map +1 -1
- package/dist/utils.d.ts +77 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +638 -1
- package/dist/utils.js.map +1 -1
- package/package.json +16 -15
- package/src/custom.d.ts +2 -1
- package/src/device/blindtilt.ts +373 -782
- package/src/device/bot.ts +616 -844
- package/src/device/ceilinglight.ts +222 -607
- package/src/device/colorbulb.ts +264 -656
- package/src/device/contact.ts +229 -553
- package/src/device/curtain.ts +355 -810
- package/src/device/device.ts +681 -0
- package/src/device/fan.ts +548 -0
- package/src/device/hub.ts +268 -623
- package/src/device/humidifier.ts +237 -618
- package/src/device/iosensor.ts +200 -610
- package/src/device/lightstrip.ts +273 -596
- package/src/device/lock.ts +247 -582
- package/src/device/meter.ts +196 -601
- package/src/device/meterplus.ts +184 -602
- package/src/device/motion.ts +156 -541
- package/src/device/plug.ts +92 -480
- package/src/device/robotvacuumcleaner.ts +161 -477
- package/src/device/waterdetector.ts +139 -689
- package/src/index.ts +1 -1
- package/src/irdevice/airconditioner.ts +330 -446
- package/src/irdevice/airpurifier.ts +89 -321
- package/src/irdevice/camera.ts +42 -293
- package/src/irdevice/fan.ts +78 -327
- package/src/irdevice/irdevice.ts +526 -0
- package/src/irdevice/light.ts +32 -287
- package/src/irdevice/other.ts +396 -615
- package/src/irdevice/tv.ts +100 -339
- package/src/irdevice/vacuumcleaner.ts +49 -305
- package/src/irdevice/waterheater.ts +50 -310
- package/src/platform.ts +247 -102
- package/src/settings.ts +56 -565
- package/src/utils.ts +642 -1
|
@@ -1,25 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { irdeviceBase } from './irdevice.js';
|
|
2
2
|
import { SwitchBotPlatform } from '../platform.js';
|
|
3
|
-
import { irDevicesConfig, irdevice
|
|
3
|
+
import { irDevicesConfig, irdevice } from '../settings.js';
|
|
4
|
+
import { CharacteristicValue, PlatformAccessory } from 'homebridge';
|
|
4
5
|
/**
|
|
5
6
|
* Platform Accessory
|
|
6
7
|
* An instance of this class is created for each accessory your platform registers
|
|
7
8
|
* Each accessory may expose multiple services of different service types.
|
|
8
9
|
*/
|
|
9
|
-
export declare class VacuumCleaner {
|
|
10
|
-
|
|
11
|
-
private
|
|
12
|
-
device: irdevice & irDevicesConfig;
|
|
13
|
-
readonly api: API;
|
|
14
|
-
readonly log: Logging;
|
|
15
|
-
readonly config: SwitchBotPlatformConfig;
|
|
16
|
-
protected readonly hap: HAP;
|
|
17
|
-
switchService: Service;
|
|
18
|
-
On: CharacteristicValue;
|
|
19
|
-
FirmwareRevision: CharacteristicValue;
|
|
20
|
-
deviceLogging: string;
|
|
21
|
-
disablePushOn?: boolean;
|
|
22
|
-
disablePushOff?: boolean;
|
|
10
|
+
export declare class VacuumCleaner extends irdeviceBase {
|
|
11
|
+
readonly platform: SwitchBotPlatform;
|
|
12
|
+
private Switch;
|
|
23
13
|
constructor(platform: SwitchBotPlatform, accessory: PlatformAccessory, device: irdevice & irDevicesConfig);
|
|
24
14
|
OnSet(value: CharacteristicValue): Promise<void>;
|
|
25
15
|
/**
|
|
@@ -32,25 +22,6 @@ export declare class VacuumCleaner {
|
|
|
32
22
|
pushOffChanges(): Promise<void>;
|
|
33
23
|
pushChanges(bodyChange: any): Promise<void>;
|
|
34
24
|
updateHomeKitCharacteristics(): Promise<void>;
|
|
35
|
-
disablePushOnChanges(device: irdevice & irDevicesConfig): Promise<void>;
|
|
36
|
-
disablePushOffChanges(device: irdevice & irDevicesConfig): Promise<void>;
|
|
37
|
-
commandType(): Promise<string>;
|
|
38
|
-
commandOn(): Promise<string>;
|
|
39
|
-
commandOff(): Promise<string>;
|
|
40
|
-
statusCode(statusCode: number): Promise<void>;
|
|
41
25
|
apiError(e: any): Promise<void>;
|
|
42
|
-
deviceContext(): Promise<void>;
|
|
43
|
-
deviceConfig(device: irdevice & irDevicesConfig): Promise<void>;
|
|
44
|
-
deviceLogs(device: irdevice & irDevicesConfig): Promise<void>;
|
|
45
|
-
/**
|
|
46
|
-
* Logging for Device
|
|
47
|
-
*/
|
|
48
|
-
infoLog(...log: any[]): void;
|
|
49
|
-
warnLog(...log: any[]): void;
|
|
50
|
-
debugWarnLog(...log: any[]): void;
|
|
51
|
-
errorLog(...log: any[]): void;
|
|
52
|
-
debugErrorLog(...log: any[]): void;
|
|
53
|
-
debugLog(...log: any[]): void;
|
|
54
|
-
enablingDeviceLogging(): boolean;
|
|
55
26
|
}
|
|
56
27
|
//# sourceMappingURL=vacuumcleaner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vacuumcleaner.d.ts","sourceRoot":"","sources":["../../src/irdevice/vacuumcleaner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vacuumcleaner.d.ts","sourceRoot":"","sources":["../../src/irdevice/vacuumcleaner.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAW,eAAe,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAW,MAAM,YAAY,CAAC;AAE7E;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,YAAY;IAQ3C,QAAQ,CAAC,QAAQ,EAAE,iBAAiB;IANtC,OAAO,CAAC,MAAM,CAGZ;gBAGS,QAAQ,EAAE,iBAAiB,EACpC,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,QAAQ,GAAG,eAAe;IAqB9B,KAAK,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAYtD;;;;;OAKG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAe9B,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAe/B,WAAW,CAAC,UAAU,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAmC3C,4BAA4B,IAAI,OAAO,CAAC,IAAI,CAAC;IAW7C,QAAQ,CAAC,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;CAGtC"}
|
|
@@ -1,64 +1,40 @@
|
|
|
1
|
+
/* Copyright(C) 2021-2024, donavanbecker (https://github.com/donavanbecker). All rights reserved.
|
|
2
|
+
*
|
|
3
|
+
* vacuumcleaner.ts: @switchbot/homebridge-switchbot.
|
|
4
|
+
*/
|
|
1
5
|
import { request } from 'undici';
|
|
6
|
+
import { irdeviceBase } from './irdevice.js';
|
|
2
7
|
import { Devices } from '../settings.js';
|
|
3
8
|
/**
|
|
4
9
|
* Platform Accessory
|
|
5
10
|
* An instance of this class is created for each accessory your platform registers
|
|
6
11
|
* Each accessory may expose multiple services of different service types.
|
|
7
12
|
*/
|
|
8
|
-
export class VacuumCleaner {
|
|
13
|
+
export class VacuumCleaner extends irdeviceBase {
|
|
9
14
|
platform;
|
|
10
|
-
accessory;
|
|
11
|
-
device;
|
|
12
|
-
api;
|
|
13
|
-
log;
|
|
14
|
-
config;
|
|
15
|
-
hap;
|
|
16
15
|
// Services
|
|
17
|
-
|
|
18
|
-
// Characteristic Values
|
|
19
|
-
On;
|
|
20
|
-
FirmwareRevision;
|
|
21
|
-
// Config
|
|
22
|
-
deviceLogging;
|
|
23
|
-
disablePushOn;
|
|
24
|
-
disablePushOff;
|
|
16
|
+
Switch;
|
|
25
17
|
constructor(platform, accessory, device) {
|
|
18
|
+
super(platform, accessory, device);
|
|
26
19
|
this.platform = platform;
|
|
27
|
-
|
|
28
|
-
this.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
this.
|
|
35
|
-
|
|
36
|
-
this.
|
|
37
|
-
this.disablePushOffChanges(device);
|
|
38
|
-
this.deviceConfig(device);
|
|
39
|
-
// set accessory information
|
|
40
|
-
accessory
|
|
41
|
-
.getService(this.hap.Service.AccessoryInformation)
|
|
42
|
-
.setCharacteristic(this.hap.Characteristic.Manufacturer, 'SwitchBot')
|
|
43
|
-
.setCharacteristic(this.hap.Characteristic.Model, device.remoteType)
|
|
44
|
-
.setCharacteristic(this.hap.Characteristic.SerialNumber, device.deviceId)
|
|
45
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, accessory.context.FirmwareRevision);
|
|
46
|
-
// get the Television service if it exists, otherwise create a new Television service
|
|
47
|
-
// you can create multiple services for each accessory
|
|
48
|
-
const switchService = `${accessory.displayName} ${device.remoteType}`;
|
|
49
|
-
(this.switchService = accessory.getService(this.hap.Service.Switch)
|
|
50
|
-
|| accessory.addService(this.hap.Service.Switch)), switchService;
|
|
51
|
-
this.switchService.setCharacteristic(this.hap.Characteristic.Name, accessory.displayName);
|
|
52
|
-
if (!this.switchService.testCharacteristic(this.hap.Characteristic.ConfiguredName)) {
|
|
53
|
-
this.switchService.addCharacteristic(this.hap.Characteristic.ConfiguredName, accessory.displayName);
|
|
54
|
-
}
|
|
20
|
+
// Initialize Switch property
|
|
21
|
+
this.Switch = {
|
|
22
|
+
Service: accessory.getService(this.hap.Service.Switch),
|
|
23
|
+
On: accessory.context.On || false,
|
|
24
|
+
};
|
|
25
|
+
// get the Switch service if it exists, otherwise create a new Switch service
|
|
26
|
+
const SwitchService = `${accessory.displayName} ${device.remoteType}`;
|
|
27
|
+
(this.Switch.Service = accessory.getService(this.hap.Service.Switch)
|
|
28
|
+
|| accessory.addService(this.hap.Service.Switch)), SwitchService;
|
|
29
|
+
this.Switch.Service.setCharacteristic(this.hap.Characteristic.Name, accessory.displayName);
|
|
55
30
|
// handle on / off events using the On characteristic
|
|
56
|
-
this.
|
|
31
|
+
this.Switch.Service.getCharacteristic(this.hap.Characteristic.On).onSet(this.OnSet.bind(this));
|
|
57
32
|
}
|
|
58
33
|
async OnSet(value) {
|
|
59
34
|
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} On: ${value}`);
|
|
60
|
-
|
|
61
|
-
|
|
35
|
+
// Set the requested state
|
|
36
|
+
this.Switch.On = value;
|
|
37
|
+
if (this.Switch.On) {
|
|
62
38
|
await this.pushOnChanges();
|
|
63
39
|
}
|
|
64
40
|
else {
|
|
@@ -72,8 +48,9 @@ export class VacuumCleaner {
|
|
|
72
48
|
* Vacuum Cleaner "command" "turnOn" "default" set to ON state
|
|
73
49
|
*/
|
|
74
50
|
async pushOnChanges() {
|
|
75
|
-
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushOnChanges
|
|
76
|
-
|
|
51
|
+
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushOnChanges`
|
|
52
|
+
+ ` On: ${this.Switch.On}, disablePushOn: ${this.disablePushOn}`);
|
|
53
|
+
if (this.Switch.On && !this.disablePushOn) {
|
|
77
54
|
const commandType = await this.commandType();
|
|
78
55
|
const command = await this.commandOn();
|
|
79
56
|
const bodyChange = JSON.stringify({
|
|
@@ -85,8 +62,9 @@ export class VacuumCleaner {
|
|
|
85
62
|
}
|
|
86
63
|
}
|
|
87
64
|
async pushOffChanges() {
|
|
88
|
-
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushOffChanges
|
|
89
|
-
|
|
65
|
+
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushOffChanges`
|
|
66
|
+
+ ` On: ${this.Switch.On}, disablePushOff: ${this.disablePushOff}`);
|
|
67
|
+
if (!this.Switch.On && !this.disablePushOff) {
|
|
90
68
|
const commandType = await this.commandType();
|
|
91
69
|
const command = await this.commandOff();
|
|
92
70
|
const bodyChange = JSON.stringify({
|
|
@@ -112,8 +90,10 @@ export class VacuumCleaner {
|
|
|
112
90
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
113
91
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
114
92
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
115
|
-
this.
|
|
93
|
+
this.debugSuccessLog(`${this.device.remoteType}: ${this.accessory.displayName} `
|
|
116
94
|
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
95
|
+
this.successLog(`${this.device.remoteType}: ${this.accessory.displayName}`
|
|
96
|
+
+ ` request to SwitchBot API, body: ${JSON.stringify(bodyChange)} sent successfully`);
|
|
117
97
|
this.updateHomeKitCharacteristics();
|
|
118
98
|
}
|
|
119
99
|
else {
|
|
@@ -123,251 +103,28 @@ export class VacuumCleaner {
|
|
|
123
103
|
}
|
|
124
104
|
catch (e) {
|
|
125
105
|
this.apiError(e);
|
|
126
|
-
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} failed
|
|
127
|
-
` Connection, Error Message: ${JSON.stringify(e.message)}`);
|
|
106
|
+
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} failed pushChange`
|
|
107
|
+
+ ` with ${this.device.connectionType} Connection, Error Message: ${JSON.stringify(e.message)}`);
|
|
128
108
|
}
|
|
129
109
|
}
|
|
130
110
|
else {
|
|
131
|
-
this.warnLog(`${this.device.remoteType}: ${this.accessory.displayName}`
|
|
132
|
-
` Connection Type: ${this.device.connectionType}, commands will not be sent to OpenAPI`);
|
|
111
|
+
this.warnLog(`${this.device.remoteType}: ${this.accessory.displayName}`
|
|
112
|
+
+ ` Connection Type: ${this.device.connectionType}, commands will not be sent to OpenAPI`);
|
|
133
113
|
}
|
|
134
114
|
}
|
|
135
115
|
async updateHomeKitCharacteristics() {
|
|
136
116
|
// On
|
|
137
|
-
if (this.On === undefined) {
|
|
138
|
-
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} On: ${this.On}`);
|
|
117
|
+
if (this.Switch.On === undefined) {
|
|
118
|
+
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} On: ${this.Switch.On}`);
|
|
139
119
|
}
|
|
140
120
|
else {
|
|
141
|
-
this.accessory.context.On = this.On;
|
|
142
|
-
this.
|
|
143
|
-
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} updateCharacteristic On: ${this.On}`);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
async disablePushOnChanges(device) {
|
|
147
|
-
if (device.disablePushOn === undefined) {
|
|
148
|
-
this.disablePushOn = false;
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
this.disablePushOn = device.disablePushOn;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
async disablePushOffChanges(device) {
|
|
155
|
-
if (device.disablePushOff === undefined) {
|
|
156
|
-
this.disablePushOff = false;
|
|
157
|
-
}
|
|
158
|
-
else {
|
|
159
|
-
this.disablePushOff = device.disablePushOff;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
async commandType() {
|
|
163
|
-
let commandType;
|
|
164
|
-
if (this.device.customize) {
|
|
165
|
-
commandType = 'customize';
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
commandType = 'command';
|
|
169
|
-
}
|
|
170
|
-
return commandType;
|
|
171
|
-
}
|
|
172
|
-
async commandOn() {
|
|
173
|
-
let command;
|
|
174
|
-
if (this.device.customize && this.device.customOn) {
|
|
175
|
-
command = this.device.customOn;
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
command = 'turnOn';
|
|
179
|
-
}
|
|
180
|
-
return command;
|
|
181
|
-
}
|
|
182
|
-
async commandOff() {
|
|
183
|
-
let command;
|
|
184
|
-
if (this.device.customize && this.device.customOff) {
|
|
185
|
-
command = this.device.customOff;
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
command = 'turnOff';
|
|
189
|
-
}
|
|
190
|
-
return command;
|
|
191
|
-
}
|
|
192
|
-
async statusCode(statusCode) {
|
|
193
|
-
switch (statusCode) {
|
|
194
|
-
case 151:
|
|
195
|
-
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Command not supported by this deviceType, statusCode: ${statusCode}`);
|
|
196
|
-
break;
|
|
197
|
-
case 152:
|
|
198
|
-
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Device not found, statusCode: ${statusCode}`);
|
|
199
|
-
break;
|
|
200
|
-
case 160:
|
|
201
|
-
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Command is not supported, statusCode: ${statusCode}`);
|
|
202
|
-
break;
|
|
203
|
-
case 161:
|
|
204
|
-
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Device is offline, statusCode: ${statusCode}`);
|
|
205
|
-
break;
|
|
206
|
-
case 171:
|
|
207
|
-
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Hub Device is offline, statusCode: ${statusCode}. ` +
|
|
208
|
-
`Hub: ${this.device.hubDeviceId}`);
|
|
209
|
-
break;
|
|
210
|
-
case 190:
|
|
211
|
-
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Device internal error due to device states not synchronized with server,` +
|
|
212
|
-
` Or command format is invalid, statusCode: ${statusCode}`);
|
|
213
|
-
break;
|
|
214
|
-
case 100:
|
|
215
|
-
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Command successfully sent, statusCode: ${statusCode}`);
|
|
216
|
-
break;
|
|
217
|
-
case 200:
|
|
218
|
-
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
|
|
219
|
-
break;
|
|
220
|
-
case 400:
|
|
221
|
-
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
|
|
222
|
-
+ `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
|
|
223
|
-
break;
|
|
224
|
-
case 401:
|
|
225
|
-
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
|
|
226
|
-
+ `but the request has not been authenticated, statusCode: ${statusCode}`);
|
|
227
|
-
break;
|
|
228
|
-
case 403:
|
|
229
|
-
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
|
|
230
|
-
+ `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
|
|
231
|
-
break;
|
|
232
|
-
case 404:
|
|
233
|
-
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
|
|
234
|
-
+ `statusCode: ${statusCode}`);
|
|
235
|
-
break;
|
|
236
|
-
case 406:
|
|
237
|
-
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
|
|
238
|
-
+ `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
|
|
239
|
-
break;
|
|
240
|
-
case 415:
|
|
241
|
-
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
|
|
242
|
-
+ `header that is not supported by the server, statusCode: ${statusCode}`);
|
|
243
|
-
break;
|
|
244
|
-
case 422:
|
|
245
|
-
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, but `
|
|
246
|
-
+ `the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
|
|
247
|
-
break;
|
|
248
|
-
case 429:
|
|
249
|
-
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
|
|
250
|
-
+ `requests allowed for a given time window, statusCode: ${statusCode}`);
|
|
251
|
-
break;
|
|
252
|
-
case 500:
|
|
253
|
-
this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
|
|
254
|
-
+ `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
|
|
255
|
-
break;
|
|
256
|
-
default:
|
|
257
|
-
this.infoLog(`${this.device.remoteType}: ${this.accessory.displayName} Unknown statusCode: ` +
|
|
258
|
-
`${statusCode}, Submit Bugs Here: ' + 'https://tinyurl.com/SwitchBotBug`);
|
|
121
|
+
this.accessory.context.On = this.Switch.On;
|
|
122
|
+
this.Switch.Service?.updateCharacteristic(this.hap.Characteristic.On, this.Switch.On);
|
|
123
|
+
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} updateCharacteristic On: ${this.Switch.On}`);
|
|
259
124
|
}
|
|
260
125
|
}
|
|
261
126
|
async apiError(e) {
|
|
262
|
-
this.
|
|
263
|
-
}
|
|
264
|
-
async deviceContext() {
|
|
265
|
-
if (this.On === undefined) {
|
|
266
|
-
this.On = false;
|
|
267
|
-
}
|
|
268
|
-
else {
|
|
269
|
-
this.On = this.accessory.context.On;
|
|
270
|
-
}
|
|
271
|
-
if (this.FirmwareRevision === undefined) {
|
|
272
|
-
this.FirmwareRevision = this.platform.version;
|
|
273
|
-
this.accessory.context.FirmwareRevision = this.FirmwareRevision;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
async deviceConfig(device) {
|
|
277
|
-
let config = {};
|
|
278
|
-
if (device.irvc) {
|
|
279
|
-
config = device.irvc;
|
|
280
|
-
}
|
|
281
|
-
if (device.logging !== undefined) {
|
|
282
|
-
config['logging'] = device.logging;
|
|
283
|
-
}
|
|
284
|
-
if (device.connectionType !== undefined) {
|
|
285
|
-
config['connectionType'] = device.connectionType;
|
|
286
|
-
}
|
|
287
|
-
if (device.external !== undefined) {
|
|
288
|
-
config['external'] = device.external;
|
|
289
|
-
}
|
|
290
|
-
if (device.customOn !== undefined) {
|
|
291
|
-
config['customOn'] = device.customOn;
|
|
292
|
-
}
|
|
293
|
-
if (device.customOff !== undefined) {
|
|
294
|
-
config['customOff'] = device.customOff;
|
|
295
|
-
}
|
|
296
|
-
if (device.customize !== undefined) {
|
|
297
|
-
config['customize'] = device.customize;
|
|
298
|
-
}
|
|
299
|
-
if (device.disablePushOn !== undefined) {
|
|
300
|
-
config['disablePushOn'] = device.disablePushOn;
|
|
301
|
-
}
|
|
302
|
-
if (device.disablePushOff !== undefined) {
|
|
303
|
-
config['disablePushOff'] = device.disablePushOff;
|
|
304
|
-
}
|
|
305
|
-
if (Object.entries(config).length !== 0) {
|
|
306
|
-
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
async deviceLogs(device) {
|
|
310
|
-
if (this.platform.debugMode) {
|
|
311
|
-
this.deviceLogging = this.accessory.context.logging = 'debugMode';
|
|
312
|
-
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
|
|
313
|
-
}
|
|
314
|
-
else if (device.logging) {
|
|
315
|
-
this.deviceLogging = this.accessory.context.logging = device.logging;
|
|
316
|
-
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
|
|
317
|
-
}
|
|
318
|
-
else if (this.platform.config.options?.logging) {
|
|
319
|
-
this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
|
|
320
|
-
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
|
|
321
|
-
}
|
|
322
|
-
else {
|
|
323
|
-
this.deviceLogging = this.accessory.context.logging = 'standard';
|
|
324
|
-
this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Logging Not Set, Using: ${this.deviceLogging}`);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
/**
|
|
328
|
-
* Logging for Device
|
|
329
|
-
*/
|
|
330
|
-
infoLog(...log) {
|
|
331
|
-
if (this.enablingDeviceLogging()) {
|
|
332
|
-
this.platform.log.info(String(...log));
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
warnLog(...log) {
|
|
336
|
-
if (this.enablingDeviceLogging()) {
|
|
337
|
-
this.platform.log.warn(String(...log));
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
debugWarnLog(...log) {
|
|
341
|
-
if (this.enablingDeviceLogging()) {
|
|
342
|
-
if (this.deviceLogging?.includes('debug')) {
|
|
343
|
-
this.platform.log.warn('[DEBUG]', String(...log));
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
errorLog(...log) {
|
|
348
|
-
if (this.enablingDeviceLogging()) {
|
|
349
|
-
this.platform.log.error(String(...log));
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
debugErrorLog(...log) {
|
|
353
|
-
if (this.enablingDeviceLogging()) {
|
|
354
|
-
if (this.deviceLogging?.includes('debug')) {
|
|
355
|
-
this.platform.log.error('[DEBUG]', String(...log));
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
debugLog(...log) {
|
|
360
|
-
if (this.enablingDeviceLogging()) {
|
|
361
|
-
if (this.deviceLogging === 'debug') {
|
|
362
|
-
this.platform.log.info('[DEBUG]', String(...log));
|
|
363
|
-
}
|
|
364
|
-
else {
|
|
365
|
-
this.platform.log.debug(String(...log));
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
enablingDeviceLogging() {
|
|
370
|
-
return this.deviceLogging.includes('debug') || this.deviceLogging === 'standard';
|
|
127
|
+
this.Switch.Service.updateCharacteristic(this.hap.Characteristic.On, e);
|
|
371
128
|
}
|
|
372
129
|
}
|
|
373
130
|
//# sourceMappingURL=vacuumcleaner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vacuumcleaner.js","sourceRoot":"","sources":["../../src/irdevice/vacuumcleaner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAsD,MAAM,gBAAgB,CAAC;AAE7F;;;;GAIG;AACH,MAAM,OAAO,aAAa;IAkBL;IACT;IACD;IAnBO,GAAG,CAAM;IACT,GAAG,CAAU;IACb,MAAM,CAA2B;IAC9B,GAAG,CAAM;IAC5B,WAAW;IACX,aAAa,CAAW;IAExB,wBAAwB;IACxB,EAAE,CAAuB;IACzB,gBAAgB,CAAuB;IAEvC,SAAS;IACT,aAAa,CAAU;IACvB,aAAa,CAAW;IACxB,cAAc,CAAW;IAEzB,YACmB,QAA2B,EACpC,SAA4B,EAC7B,MAAkC;QAFxB,aAAQ,GAAR,QAAQ,CAAmB;QACpC,cA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,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACtF,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,KAAK,IAAI,CAAC,SAAS,CAAC,WAAW,6BAA6B,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;QACvH,CAAC;IACH,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,CAAM;QACnB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC1E,CAAC;CACF"}
|
|
@@ -1,25 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { irdeviceBase } from './irdevice.js';
|
|
2
2
|
import { SwitchBotPlatform } from '../platform.js';
|
|
3
|
-
import { irDevicesConfig, irdevice
|
|
3
|
+
import { irDevicesConfig, irdevice } from '../settings.js';
|
|
4
|
+
import { CharacteristicValue, PlatformAccessory } from 'homebridge';
|
|
4
5
|
/**
|
|
5
6
|
* Platform Accessory
|
|
6
7
|
* An instance of this class is created for each accessory your platform registers
|
|
7
8
|
* Each accessory may expose multiple services of different service types.
|
|
8
9
|
*/
|
|
9
|
-
export declare class WaterHeater {
|
|
10
|
-
|
|
11
|
-
private
|
|
12
|
-
device: irdevice & irDevicesConfig;
|
|
13
|
-
readonly api: API;
|
|
14
|
-
readonly log: Logging;
|
|
15
|
-
readonly config: SwitchBotPlatformConfig;
|
|
16
|
-
protected readonly hap: HAP;
|
|
17
|
-
valveService: Service;
|
|
18
|
-
Active: CharacteristicValue;
|
|
19
|
-
FirmwareRevision: CharacteristicValue;
|
|
20
|
-
deviceLogging: string;
|
|
21
|
-
disablePushOn?: boolean;
|
|
22
|
-
disablePushOff?: boolean;
|
|
10
|
+
export declare class WaterHeater extends irdeviceBase {
|
|
11
|
+
readonly platform: SwitchBotPlatform;
|
|
12
|
+
private Valve;
|
|
23
13
|
constructor(platform: SwitchBotPlatform, accessory: PlatformAccessory, device: irdevice & irDevicesConfig);
|
|
24
14
|
ActiveSet(value: CharacteristicValue): Promise<void>;
|
|
25
15
|
/**
|
|
@@ -32,27 +22,8 @@ export declare class WaterHeater {
|
|
|
32
22
|
pushWaterHeaterOffChanges(): Promise<void>;
|
|
33
23
|
pushChanges(bodyChange: any): Promise<void>;
|
|
34
24
|
updateHomeKitCharacteristics(): Promise<void>;
|
|
35
|
-
disablePushOnChanges(device: irdevice & irDevicesConfig): Promise<void>;
|
|
36
|
-
disablePushOffChanges(device: irdevice & irDevicesConfig): Promise<void>;
|
|
37
|
-
commandType(): Promise<string>;
|
|
38
|
-
commandOn(): Promise<string>;
|
|
39
|
-
commandOff(): Promise<string>;
|
|
40
|
-
statusCode(statusCode: number): Promise<void>;
|
|
41
25
|
apiError({ e }: {
|
|
42
26
|
e: any;
|
|
43
27
|
}): Promise<void>;
|
|
44
|
-
deviceContext(): Promise<void>;
|
|
45
|
-
deviceConfig(device: irdevice & irDevicesConfig): Promise<void>;
|
|
46
|
-
deviceLogs(device: irdevice & irDevicesConfig): Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* Logging for Device
|
|
49
|
-
*/
|
|
50
|
-
infoLog(...log: any[]): void;
|
|
51
|
-
warnLog(...log: any[]): void;
|
|
52
|
-
debugWarnLog(...log: any[]): void;
|
|
53
|
-
errorLog(...log: any[]): void;
|
|
54
|
-
debugErrorLog(...log: any[]): void;
|
|
55
|
-
debugLog(...log: any[]): void;
|
|
56
|
-
enablingDeviceLogging(): boolean;
|
|
57
28
|
}
|
|
58
29
|
//# sourceMappingURL=waterheater.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waterheater.d.ts","sourceRoot":"","sources":["../../src/irdevice/waterheater.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"waterheater.d.ts","sourceRoot":"","sources":["../../src/irdevice/waterheater.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAW,eAAe,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAW,MAAM,YAAY,CAAC;AAE7E;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,YAAY;IAQzC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB;IANtC,OAAO,CAAC,KAAK,CAGX;gBAGS,QAAQ,EAAE,iBAAiB,EACpC,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,QAAQ,GAAG,eAAe;IAyB9B,SAAS,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAa1D;;;;;OAKG;IACG,wBAAwB,IAAI,OAAO,CAAC,IAAI,CAAC;IAezC,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC;IAe1C,WAAW,CAAC,UAAU,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAmC3C,4BAA4B,IAAI,OAAO,CAAC,IAAI,CAAC;IAW7C,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE;QAAE,CAAC,EAAE,GAAG,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAGjD"}
|