@switchbot/homebridge-switchbot 3.7.1-beta.2 → 3.7.1-beta.21
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 +10 -0
- package/README.md +14 -0
- package/assets/security-privacy-bluetooth.png +0 -0
- package/config.schema.json +74 -2
- package/dist/device/blindtilt.d.ts +21 -9
- package/dist/device/blindtilt.d.ts.map +1 -1
- package/dist/device/blindtilt.js +167 -96
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot-old.d.ts +132 -0
- package/dist/device/bot-old.d.ts.map +1 -0
- package/dist/device/bot-old.js +1482 -0
- package/dist/device/bot-old.js.map +1 -0
- package/dist/device/bot.d.ts +10 -9
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +186 -187
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.d.ts +14 -13
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +87 -97
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts +13 -12
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +92 -105
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts +6 -5
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +71 -68
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts +17 -5
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +184 -118
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/device.d.ts +18 -18
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/device.js +33 -36
- package/dist/device/device.js.map +1 -1
- package/dist/device/fan.d.ts +9 -8
- package/dist/device/fan.d.ts.map +1 -1
- package/dist/device/fan.js +94 -101
- package/dist/device/fan.js.map +1 -1
- package/dist/device/hub.d.ts +6 -5
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +69 -65
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts +6 -5
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +89 -104
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.d.ts +6 -5
- package/dist/device/iosensor.d.ts.map +1 -1
- package/dist/device/iosensor.js +72 -66
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.d.ts +7 -6
- package/dist/device/lightstrip.d.ts.map +1 -1
- package/dist/device/lightstrip.js +85 -99
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.d.ts +10 -9
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +89 -79
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts +6 -5
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +72 -65
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts +6 -5
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +72 -64
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts +6 -5
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +65 -58
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts +13 -12
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +68 -52
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.d.ts +12 -11
- package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
- package/dist/device/robotvacuumcleaner.js +93 -82
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.d.ts +6 -5
- package/dist/device/waterdetector.d.ts.map +1 -1
- package/dist/device/waterdetector.js +73 -63
- package/dist/device/waterdetector.js.map +1 -1
- package/dist/homebridge-ui/server.js +2 -2
- package/dist/homebridge-ui/server.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/dist/irdevice/airconditioner.d.ts +8 -8
- package/dist/irdevice/airconditioner.d.ts.map +1 -1
- package/dist/irdevice/airconditioner.js +61 -105
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/irdevice/airpurifier.d.ts +10 -10
- package/dist/irdevice/airpurifier.d.ts.map +1 -1
- package/dist/irdevice/airpurifier.js +22 -42
- package/dist/irdevice/airpurifier.js.map +1 -1
- package/dist/irdevice/camera.d.ts +9 -9
- package/dist/irdevice/camera.d.ts.map +1 -1
- package/dist/irdevice/camera.js +15 -25
- package/dist/irdevice/camera.js.map +1 -1
- package/dist/irdevice/fan.d.ts +8 -8
- package/dist/irdevice/fan.d.ts.map +1 -1
- package/dist/irdevice/fan.js +21 -40
- package/dist/irdevice/fan.js.map +1 -1
- package/dist/irdevice/irdevice.d.ts +11 -11
- package/dist/irdevice/irdevice.d.ts.map +1 -1
- package/dist/irdevice/irdevice.js +14 -22
- package/dist/irdevice/irdevice.js.map +1 -1
- package/dist/irdevice/light.d.ts +9 -9
- package/dist/irdevice/light.d.ts.map +1 -1
- package/dist/irdevice/light.js +24 -47
- package/dist/irdevice/light.js.map +1 -1
- package/dist/irdevice/other.d.ts +9 -9
- package/dist/irdevice/other.d.ts.map +1 -1
- package/dist/irdevice/other.js +40 -83
- package/dist/irdevice/other.js.map +1 -1
- package/dist/irdevice/tv.d.ts +9 -9
- package/dist/irdevice/tv.d.ts.map +1 -1
- package/dist/irdevice/tv.js +29 -54
- package/dist/irdevice/tv.js.map +1 -1
- package/dist/irdevice/vacuumcleaner.d.ts +5 -5
- package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
- package/dist/irdevice/vacuumcleaner.js +11 -21
- package/dist/irdevice/vacuumcleaner.js.map +1 -1
- package/dist/irdevice/waterheater.d.ts +5 -5
- package/dist/irdevice/waterheater.d.ts.map +1 -1
- package/dist/irdevice/waterheater.js +11 -22
- package/dist/irdevice/waterheater.js.map +1 -1
- package/dist/platform.d.ts +24 -23
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +509 -723
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +5 -2
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js.map +1 -1
- package/dist/types/bledevicestatus.d.ts +9 -9
- package/dist/types/bledevicestatus.d.ts.map +1 -1
- package/dist/types/devicelist.d.ts +6 -6
- package/dist/types/devicelist.d.ts.map +1 -1
- package/dist/types/deviceresponse.d.ts +4 -4
- package/dist/types/deviceresponse.d.ts.map +1 -1
- package/dist/types/devicestatus.d.ts +2 -2
- package/dist/types/devicestatus.d.ts.map +1 -1
- package/dist/types/devicewebhookstatus.d.ts +5 -5
- package/dist/types/devicewebhookstatus.d.ts.map +1 -1
- package/dist/types/irdevicelist.d.ts +4 -4
- package/dist/types/irdevicelist.d.ts.map +1 -1
- package/dist/types/pushbody.d.ts +2 -2
- package/dist/types/pushbody.d.ts.map +1 -1
- package/dist/utils.d.ts +4 -4
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +9 -13
- package/dist/utils.js.map +1 -1
- package/eslint.config.js +48 -93
- package/package.json +64 -57
- package/src/device/blindtilt.ts +537 -456
- package/src/device/bot-old.ts +1540 -0
- package/src/device/bot.ts +732 -725
- package/src/device/ceilinglight.ts +359 -368
- package/src/device/colorbulb.ts +441 -453
- package/src/device/contact.ts +229 -226
- package/src/device/curtain.ts +526 -444
- package/src/device/device.ts +206 -208
- package/src/device/fan.ts +336 -345
- package/src/device/hub.ts +213 -214
- package/src/device/humidifier.ts +326 -347
- package/src/device/iosensor.ts +211 -209
- package/src/device/lightstrip.ts +391 -404
- package/src/device/lock.ts +292 -282
- package/src/device/meter.ts +212 -210
- package/src/device/meterplus.ts +212 -209
- package/src/device/motion.ts +198 -190
- package/src/device/plug.ts +203 -182
- package/src/device/robotvacuumcleaner.ts +280 -269
- package/src/device/waterdetector.ts +198 -189
- package/src/homebridge-ui/server.ts +16 -15
- package/src/index.ts +5 -6
- package/src/irdevice/airconditioner.ts +277 -326
- package/src/irdevice/airpurifier.ts +124 -143
- package/src/irdevice/camera.ts +58 -64
- package/src/irdevice/fan.ts +106 -123
- package/src/irdevice/irdevice.ts +116 -119
- package/src/irdevice/light.ts +119 -143
- package/src/irdevice/other.ts +417 -461
- package/src/irdevice/tv.ts +155 -177
- package/src/irdevice/vacuumcleaner.ts +54 -60
- package/src/irdevice/waterheater.ts +56 -63
- package/src/platform.ts +1491 -1681
- package/src/settings.ts +172 -169
- package/src/types/bledevicestatus.ts +252 -256
- package/src/types/devicelist.ts +79 -79
- package/src/types/deviceresponse.ts +12 -13
- package/src/types/devicestatus.ts +124 -124
- package/src/types/devicewebhookstatus.ts +126 -131
- package/src/types/irdevicelist.ts +10 -10
- package/src/types/pushbody.ts +5 -5
- package/src/utils.ts +64 -65
- package/tsconfig.json +10 -9
package/dist/irdevice/light.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CharacteristicValue, PlatformAccessory } from 'homebridge';
|
|
2
2
|
import type { SwitchBotPlatform } from '../platform.js';
|
|
3
3
|
import type { irDevicesConfig } from '../settings.js';
|
|
4
4
|
import type { irdevice } from '../types/irdevicelist.js';
|
|
5
|
-
import
|
|
5
|
+
import { irdeviceBase } from './irdevice.js';
|
|
6
6
|
/**
|
|
7
7
|
* Platform Accessory
|
|
8
8
|
* An instance of this class is created for each accessory your platform registers
|
|
@@ -19,13 +19,13 @@ export declare class Light extends irdeviceBase {
|
|
|
19
19
|
ProgrammableSwitchOutputStateSetOff(value: CharacteristicValue): Promise<void>;
|
|
20
20
|
/**
|
|
21
21
|
* Pushes the requested changes to the SwitchBot API
|
|
22
|
-
* deviceType
|
|
23
|
-
* Light -
|
|
24
|
-
* Light - "command" "turnOn" "default"
|
|
25
|
-
* Light - "command" "volumeAdd" "default"
|
|
26
|
-
* Light - "command" "volumeSub" "default"
|
|
27
|
-
* Light - "command" "channelAdd" "default"
|
|
28
|
-
* Light - "command" "channelSub" "default"
|
|
22
|
+
* deviceType commandType Command command parameter Description
|
|
23
|
+
* Light - "command" "turnOff" "default" = set to OFF state
|
|
24
|
+
* Light - "command" "turnOn" "default" = set to ON state
|
|
25
|
+
* Light - "command" "volumeAdd" "default" = volume up
|
|
26
|
+
* Light - "command" "volumeSub" "default" = volume down
|
|
27
|
+
* Light - "command" "channelAdd" "default" = next channel
|
|
28
|
+
* Light - "command" "channelSub" "default" = previous channel
|
|
29
29
|
*/
|
|
30
30
|
pushLightOnChanges(On: boolean): Promise<void>;
|
|
31
31
|
pushLightOffChanges(On: boolean): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"light.d.ts","sourceRoot":"","sources":["../../src/irdevice/light.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"light.d.ts","sourceRoot":"","sources":["../../src/irdevice/light.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAW,MAAM,YAAY,CAAA;AAEjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE5C;;;;GAIG;AACH,qBAAa,KAAM,SAAQ,YAAY;IAuBnC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB;IArBtC,OAAO,CAAC,SAAS,CAAC,CAIjB;IAED,OAAO,CAAC,oBAAoB,CAAC,CAK5B;IAED,OAAO,CAAC,qBAAqB,CAAC,CAK7B;gBAGU,QAAQ,EAAE,iBAAiB,EACpC,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,QAAQ,GAAG,eAAe;IAsE9B,KAAK,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBhD,kCAAkC,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAc7E,mCAAmC,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAcpF;;;;;;;;;OASG;IACG,kBAAkB,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAc9C,mBAAmB,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAc/C,WAAW,CAAC,UAAU,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBxD,4BAA4B,IAAI,OAAO,CAAC,IAAI,CAAC;IAiB7C,QAAQ,CAAC,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;CAUtC"}
|
package/dist/irdevice/light.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/* Copyright(C) 2021-2024, donavanbecker (https://github.com/donavanbecker). All rights reserved.
|
|
2
|
-
*
|
|
3
|
-
* light.ts: @switchbot/homebridge-switchbot.
|
|
4
|
-
*/
|
|
5
1
|
import { irdeviceBase } from './irdevice.js';
|
|
6
2
|
/**
|
|
7
3
|
* Platform Accessory
|
|
@@ -28,71 +24,53 @@ export class Light extends irdeviceBase {
|
|
|
28
24
|
On: accessory.context.On || false,
|
|
29
25
|
};
|
|
30
26
|
accessory.context.LightBulb = this.LightBulb;
|
|
31
|
-
this.LightBulb.Service
|
|
32
|
-
.setCharacteristic(this.hap.Characteristic.Name, this.LightBulb.Name)
|
|
33
|
-
.getCharacteristic(this.hap.Characteristic.On)
|
|
34
|
-
.onGet(() => {
|
|
27
|
+
this.LightBulb.Service.setCharacteristic(this.hap.Characteristic.Name, this.LightBulb.Name).getCharacteristic(this.hap.Characteristic.On).onGet(() => {
|
|
35
28
|
return this.LightBulb.On;
|
|
36
|
-
})
|
|
37
|
-
.onSet(this.OnSet.bind(this));
|
|
29
|
+
}).onSet(this.OnSet.bind(this));
|
|
38
30
|
}
|
|
39
31
|
else {
|
|
40
32
|
// Initialize ProgrammableSwitchOn Service
|
|
41
33
|
accessory.context.ProgrammableSwitchOn = accessory.context.ProgrammableSwitchOn ?? {};
|
|
42
34
|
this.ProgrammableSwitchOn = {
|
|
43
35
|
Name: `${accessory.displayName} On`,
|
|
44
|
-
Service: accessory.getService(this.hap.Service.StatefulProgrammableSwitch)
|
|
45
|
-
?? accessory.addService(this.hap.Service.StatefulProgrammableSwitch),
|
|
36
|
+
Service: accessory.getService(this.hap.Service.StatefulProgrammableSwitch) ?? accessory.addService(this.hap.Service.StatefulProgrammableSwitch),
|
|
46
37
|
ProgrammableSwitchEvent: accessory.context.ProgrammableSwitchEvent ?? this.hap.Characteristic.ProgrammableSwitchEvent.SINGLE_PRESS,
|
|
47
38
|
ProgrammableSwitchOutputState: accessory.context.ProgrammableSwitchOutputState ?? 0,
|
|
48
39
|
};
|
|
49
40
|
accessory.context.ProgrammableSwitchOn = this.ProgrammableSwitchOn;
|
|
50
41
|
// Initialize ProgrammableSwitchOn Characteristics
|
|
51
|
-
this.ProgrammableSwitchOn?.Service
|
|
52
|
-
.setCharacteristic(this.hap.Characteristic.Name, this.ProgrammableSwitchOn.Name)
|
|
53
|
-
.getCharacteristic(this.hap.Characteristic.ProgrammableSwitchEvent).setProps({
|
|
42
|
+
this.ProgrammableSwitchOn?.Service.setCharacteristic(this.hap.Characteristic.Name, this.ProgrammableSwitchOn.Name).getCharacteristic(this.hap.Characteristic.ProgrammableSwitchEvent).setProps({
|
|
54
43
|
validValueRanges: [0, 0],
|
|
55
44
|
minValue: 0,
|
|
56
45
|
maxValue: 0,
|
|
57
46
|
validValues: [0],
|
|
58
|
-
})
|
|
59
|
-
.onGet(() => {
|
|
47
|
+
}).onGet(() => {
|
|
60
48
|
return this.ProgrammableSwitchOn.ProgrammableSwitchEvent;
|
|
61
49
|
});
|
|
62
|
-
this.ProgrammableSwitchOn?.Service
|
|
63
|
-
.getCharacteristic(this.hap.Characteristic.ProgrammableSwitchOutputState)
|
|
64
|
-
.onGet(() => {
|
|
50
|
+
this.ProgrammableSwitchOn?.Service.getCharacteristic(this.hap.Characteristic.ProgrammableSwitchOutputState).onGet(() => {
|
|
65
51
|
return this.ProgrammableSwitchOn.ProgrammableSwitchOutputState;
|
|
66
|
-
})
|
|
67
|
-
.onSet(this.ProgrammableSwitchOutputStateSetOn.bind(this));
|
|
52
|
+
}).onSet(this.ProgrammableSwitchOutputStateSetOn.bind(this));
|
|
68
53
|
// Initialize ProgrammableSwitchOff Service
|
|
69
54
|
accessory.context.ProgrammableSwitchOff = accessory.context.ProgrammableSwitchOff ?? {};
|
|
70
55
|
this.ProgrammableSwitchOff = {
|
|
71
56
|
Name: `${accessory.displayName} Off`,
|
|
72
|
-
Service: accessory.getService(this.hap.Service.StatefulProgrammableSwitch)
|
|
73
|
-
?? accessory.addService(this.hap.Service.StatefulProgrammableSwitch),
|
|
57
|
+
Service: accessory.getService(this.hap.Service.StatefulProgrammableSwitch) ?? accessory.addService(this.hap.Service.StatefulProgrammableSwitch),
|
|
74
58
|
ProgrammableSwitchEvent: accessory.context.ProgrammableSwitchEvent ?? this.hap.Characteristic.ProgrammableSwitchEvent.SINGLE_PRESS,
|
|
75
59
|
ProgrammableSwitchOutputState: accessory.context.ProgrammableSwitchOutputState ?? 0,
|
|
76
60
|
};
|
|
77
61
|
accessory.context.ProgrammableSwitchOff = this.ProgrammableSwitchOff;
|
|
78
62
|
// Initialize ProgrammableSwitchOff Characteristics
|
|
79
|
-
this.ProgrammableSwitchOff?.Service
|
|
80
|
-
.setCharacteristic(this.hap.Characteristic.Name, this.ProgrammableSwitchOff.Name)
|
|
81
|
-
.getCharacteristic(this.hap.Characteristic.ProgrammableSwitchEvent).setProps({
|
|
63
|
+
this.ProgrammableSwitchOff?.Service.setCharacteristic(this.hap.Characteristic.Name, this.ProgrammableSwitchOff.Name).getCharacteristic(this.hap.Characteristic.ProgrammableSwitchEvent).setProps({
|
|
82
64
|
validValueRanges: [0, 0],
|
|
83
65
|
minValue: 0,
|
|
84
66
|
maxValue: 0,
|
|
85
67
|
validValues: [0],
|
|
86
|
-
})
|
|
87
|
-
.onGet(() => {
|
|
68
|
+
}).onGet(() => {
|
|
88
69
|
return this.ProgrammableSwitchOff.ProgrammableSwitchEvent;
|
|
89
70
|
});
|
|
90
|
-
this.ProgrammableSwitchOff?.Service
|
|
91
|
-
.getCharacteristic(this.hap.Characteristic.ProgrammableSwitchOutputState)
|
|
92
|
-
.onGet(() => {
|
|
71
|
+
this.ProgrammableSwitchOff?.Service.getCharacteristic(this.hap.Characteristic.ProgrammableSwitchOutputState).onGet(() => {
|
|
93
72
|
return this.ProgrammableSwitchOff.ProgrammableSwitchOutputState;
|
|
94
|
-
})
|
|
95
|
-
.onSet(this.ProgrammableSwitchOutputStateSetOff.bind(this));
|
|
73
|
+
}).onSet(this.ProgrammableSwitchOutputStateSetOff.bind(this));
|
|
96
74
|
}
|
|
97
75
|
}
|
|
98
76
|
async OnSet(value) {
|
|
@@ -137,13 +115,13 @@ export class Light extends irdeviceBase {
|
|
|
137
115
|
}
|
|
138
116
|
/**
|
|
139
117
|
* Pushes the requested changes to the SwitchBot API
|
|
140
|
-
* deviceType
|
|
141
|
-
* Light -
|
|
142
|
-
* Light - "command" "turnOn" "default"
|
|
143
|
-
* Light - "command" "volumeAdd" "default"
|
|
144
|
-
* Light - "command" "volumeSub" "default"
|
|
145
|
-
* Light - "command" "channelAdd" "default"
|
|
146
|
-
* Light - "command" "channelSub" "default"
|
|
118
|
+
* deviceType commandType Command command parameter Description
|
|
119
|
+
* Light - "command" "turnOff" "default" = set to OFF state
|
|
120
|
+
* Light - "command" "turnOn" "default" = set to ON state
|
|
121
|
+
* Light - "command" "volumeAdd" "default" = volume up
|
|
122
|
+
* Light - "command" "volumeSub" "default" = volume down
|
|
123
|
+
* Light - "command" "channelAdd" "default" = next channel
|
|
124
|
+
* Light - "command" "channelSub" "default" = previous channel
|
|
147
125
|
*/
|
|
148
126
|
async pushLightOnChanges(On) {
|
|
149
127
|
await this.debugLog(`pushLightOnChanges On: ${On}, disablePushOn: ${this.disablePushOn}`);
|
|
@@ -151,9 +129,9 @@ export class Light extends irdeviceBase {
|
|
|
151
129
|
const commandType = await this.commandType();
|
|
152
130
|
const command = await this.commandOn();
|
|
153
131
|
const bodyChange = JSON.stringify({
|
|
154
|
-
command
|
|
132
|
+
command,
|
|
155
133
|
parameter: 'default',
|
|
156
|
-
commandType
|
|
134
|
+
commandType,
|
|
157
135
|
});
|
|
158
136
|
await this.pushChanges(bodyChange, On);
|
|
159
137
|
}
|
|
@@ -164,9 +142,9 @@ export class Light extends irdeviceBase {
|
|
|
164
142
|
const commandType = await this.commandType();
|
|
165
143
|
const command = await this.commandOff();
|
|
166
144
|
const bodyChange = JSON.stringify({
|
|
167
|
-
command
|
|
145
|
+
command,
|
|
168
146
|
parameter: 'default',
|
|
169
|
-
commandType
|
|
147
|
+
commandType,
|
|
170
148
|
});
|
|
171
149
|
await this.pushChanges(bodyChange, On);
|
|
172
150
|
}
|
|
@@ -195,8 +173,7 @@ export class Light extends irdeviceBase {
|
|
|
195
173
|
}
|
|
196
174
|
}
|
|
197
175
|
else {
|
|
198
|
-
this.warnLog(
|
|
199
|
-
+ `${this.device.connectionType}, commands will not be sent to OpenAPI`);
|
|
176
|
+
this.warnLog(`Connection Type: ${this.device.connectionType}, commands will not be sent to OpenAPI`);
|
|
200
177
|
}
|
|
201
178
|
}
|
|
202
179
|
async updateHomeKitCharacteristics() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"light.js","sourceRoot":"","sources":["../../src/irdevice/light.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"light.js","sourceRoot":"","sources":["../../src/irdevice/light.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE5C;;;;GAIG;AACH,MAAM,OAAO,KAAM,SAAQ,YAAY;IAuB1B;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Q,CAAC,CAAM;QACnB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC;YACpC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;QAC7E,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,uBAAuB,EAAE,CAAC,CAAC,CAAA;YAC3G,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,6BAA6B,EAAE,CAAC,CAAC,CAAA;YACjH,IAAI,CAAC,qBAAqB,EAAE,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,uBAAuB,EAAE,CAAC,CAAC,CAAA;YAC5G,IAAI,CAAC,qBAAqB,EAAE,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,6BAA6B,EAAE,CAAC,CAAC,CAAA;QACpH,CAAC;IACH,CAAC;CACF"}
|
package/dist/irdevice/other.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CharacteristicValue, PlatformAccessory } from 'homebridge';
|
|
2
2
|
import type { SwitchBotPlatform } from '../platform.js';
|
|
3
3
|
import type { irDevicesConfig } from '../settings.js';
|
|
4
4
|
import type { irdevice } from '../types/irdevicelist.js';
|
|
5
|
-
import
|
|
5
|
+
import { irdeviceBase } from './irdevice.js';
|
|
6
6
|
/**
|
|
7
7
|
* Platform Accessory
|
|
8
8
|
* An instance of this class is created for each accessory your platform registers
|
|
@@ -29,13 +29,13 @@ export declare class Others extends irdeviceBase {
|
|
|
29
29
|
OnSet(value: CharacteristicValue): Promise<void>;
|
|
30
30
|
/**
|
|
31
31
|
* Pushes the requested changes to the SwitchBot API
|
|
32
|
-
* deviceType
|
|
33
|
-
* Other -
|
|
34
|
-
* Other - "command" "turnOn" "default"
|
|
35
|
-
* Other - "command" "volumeAdd" "default"
|
|
36
|
-
* Other - "command" "volumeSub" "default"
|
|
37
|
-
* Other - "command" "channelAdd" "default"
|
|
38
|
-
* Other - "command" "channelSub" "default"
|
|
32
|
+
* deviceType commandType Command command parameter Description
|
|
33
|
+
* Other - "command" "turnOff" "default" = set to OFF state
|
|
34
|
+
* Other - "command" "turnOn" "default" = set to ON state
|
|
35
|
+
* Other - "command" "volumeAdd" "default" = volume up
|
|
36
|
+
* Other - "command" "volumeSub" "default" = volume down
|
|
37
|
+
* Other - "command" "channelAdd" "default" = next channel
|
|
38
|
+
* Other - "command" "channelSub" "default" = previous channel
|
|
39
39
|
*/
|
|
40
40
|
pushOnChanges(On: boolean): Promise<void>;
|
|
41
41
|
pushOffChanges(On: boolean): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"other.d.ts","sourceRoot":"","sources":["../../src/irdevice/other.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"other.d.ts","sourceRoot":"","sources":["../../src/irdevice/other.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAW,MAAM,YAAY,CAAA;AAEjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE5C;;;;GAIG;AACH,qBAAa,MAAO,SAAQ,YAAY;IA0DpC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB;IAxDtC,OAAO,CAAC,MAAM,CAAC,CAGd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,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAYhE,gBAAgB,CAAC,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAY7D,mBAAmB,CAAC,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAYhE,2BAA2B,CAAC,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAYxE,uCAAuC,CAAC,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAYpF,mBAAmB,CAAC,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAYhE,sBAAsB,CAAC,SAAS,EAAE,iBAAiB,EAAE,MAAM,EAAE,QAAQ,GAAG,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;CAO9G"}
|
package/dist/irdevice/other.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/* Copyright(C) 2021-2024, donavanbecker (https://github.com/donavanbecker). All rights reserved.
|
|
2
|
-
*
|
|
3
|
-
* other.ts: @switchbot/homebridge-switchbot.
|
|
4
|
-
*/
|
|
5
1
|
import { irdeviceBase } from './irdevice.js';
|
|
6
2
|
/**
|
|
7
3
|
* Platform Accessory
|
|
@@ -42,10 +38,7 @@ export class Others extends irdeviceBase {
|
|
|
42
38
|
accessory.context.Switch = this.Switch;
|
|
43
39
|
this.debugLog('Displaying as Switch');
|
|
44
40
|
// Initialize Switch Characteristics
|
|
45
|
-
this.Switch.Service
|
|
46
|
-
.setCharacteristic(this.hap.Characteristic.Name, this.Switch.Name)
|
|
47
|
-
.getCharacteristic(this.hap.Characteristic.On)
|
|
48
|
-
.onSet(this.OnSet.bind(this));
|
|
41
|
+
this.Switch.Service.setCharacteristic(this.hap.Characteristic.Name, this.Switch.Name).getCharacteristic(this.hap.Characteristic.On).onSet(this.OnSet.bind(this));
|
|
49
42
|
// Remove other services
|
|
50
43
|
this.removeFanService(accessory);
|
|
51
44
|
this.removeLockService(accessory);
|
|
@@ -69,17 +62,12 @@ export class Others extends irdeviceBase {
|
|
|
69
62
|
accessory.context.GarageDoor = this.GarageDoor;
|
|
70
63
|
this.debugLog('Displaying as Garage Door Opener');
|
|
71
64
|
// Initialize GarageDoor Characteristics
|
|
72
|
-
this.GarageDoor.Service
|
|
73
|
-
.setCharacteristic(this.hap.Characteristic.Name, this.GarageDoor.Name)
|
|
74
|
-
.setCharacteristic(this.hap.Characteristic.ObstructionDetected, false)
|
|
75
|
-
.getCharacteristic(this.hap.Characteristic.TargetDoorState)
|
|
76
|
-
.setProps({
|
|
65
|
+
this.GarageDoor.Service.setCharacteristic(this.hap.Characteristic.Name, this.GarageDoor.Name).setCharacteristic(this.hap.Characteristic.ObstructionDetected, false).getCharacteristic(this.hap.Characteristic.TargetDoorState).setProps({
|
|
77
66
|
validValues: [0, 100],
|
|
78
67
|
minValue: 0,
|
|
79
68
|
maxValue: 100,
|
|
80
69
|
minStep: 100,
|
|
81
|
-
})
|
|
82
|
-
.onSet(this.OnSet.bind(this));
|
|
70
|
+
}).onSet(this.OnSet.bind(this));
|
|
83
71
|
// Remove other services
|
|
84
72
|
this.removeFanService(accessory);
|
|
85
73
|
this.removeLockService(accessory);
|
|
@@ -103,16 +91,12 @@ export class Others extends irdeviceBase {
|
|
|
103
91
|
accessory.context.Door = this.Door;
|
|
104
92
|
this.debugLog('Displaying as Door');
|
|
105
93
|
// Initialize Door Characteristics
|
|
106
|
-
this.Door.Service
|
|
107
|
-
.setCharacteristic(this.hap.Characteristic.Name, this.Door.Name)
|
|
108
|
-
.setCharacteristic(this.hap.Characteristic.PositionState, this.hap.Characteristic.PositionState.STOPPED)
|
|
109
|
-
.getCharacteristic(this.hap.Characteristic.TargetPosition).setProps({
|
|
94
|
+
this.Door.Service.setCharacteristic(this.hap.Characteristic.Name, this.Door.Name).setCharacteristic(this.hap.Characteristic.PositionState, this.hap.Characteristic.PositionState.STOPPED).getCharacteristic(this.hap.Characteristic.TargetPosition).setProps({
|
|
110
95
|
validValues: [0, 100],
|
|
111
96
|
minValue: 0,
|
|
112
97
|
maxValue: 100,
|
|
113
98
|
minStep: 100,
|
|
114
|
-
})
|
|
115
|
-
.onSet(this.OnSet.bind(this));
|
|
99
|
+
}).onSet(this.OnSet.bind(this));
|
|
116
100
|
// Remove other services
|
|
117
101
|
this.removeFanService(accessory);
|
|
118
102
|
this.removeLockService(accessory);
|
|
@@ -136,16 +120,12 @@ export class Others extends irdeviceBase {
|
|
|
136
120
|
accessory.context.Window = this.Window;
|
|
137
121
|
this.debugLog('Displaying as Window');
|
|
138
122
|
// Initialize Window Characteristics
|
|
139
|
-
this.Window.Service
|
|
140
|
-
.setCharacteristic(this.hap.Characteristic.Name, this.Window.Name)
|
|
141
|
-
.setCharacteristic(this.hap.Characteristic.PositionState, this.hap.Characteristic.PositionState.STOPPED)
|
|
142
|
-
.getCharacteristic(this.hap.Characteristic.TargetPosition).setProps({
|
|
123
|
+
this.Window.Service.setCharacteristic(this.hap.Characteristic.Name, this.Window.Name).setCharacteristic(this.hap.Characteristic.PositionState, this.hap.Characteristic.PositionState.STOPPED).getCharacteristic(this.hap.Characteristic.TargetPosition).setProps({
|
|
143
124
|
validValues: [0, 100],
|
|
144
125
|
minValue: 0,
|
|
145
126
|
maxValue: 100,
|
|
146
127
|
minStep: 100,
|
|
147
|
-
})
|
|
148
|
-
.onSet(this.OnSet.bind(this));
|
|
128
|
+
}).onSet(this.OnSet.bind(this));
|
|
149
129
|
// Remove other services
|
|
150
130
|
this.removeFanService(accessory);
|
|
151
131
|
this.removeLockService(accessory);
|
|
@@ -169,17 +149,12 @@ export class Others extends irdeviceBase {
|
|
|
169
149
|
accessory.context.WindowCovering = this.WindowCovering;
|
|
170
150
|
this.debugLog('Displaying as Window Covering');
|
|
171
151
|
// Initialize WindowCovering Characteristics
|
|
172
|
-
this.WindowCovering.Service
|
|
173
|
-
.setCharacteristic(this.hap.Characteristic.Name, this.WindowCovering.Name)
|
|
174
|
-
.setCharacteristic(this.hap.Characteristic.PositionState, this.hap.Characteristic.PositionState.STOPPED)
|
|
175
|
-
.getCharacteristic(this.hap.Characteristic.TargetPosition)
|
|
176
|
-
.setProps({
|
|
152
|
+
this.WindowCovering.Service.setCharacteristic(this.hap.Characteristic.Name, this.WindowCovering.Name).setCharacteristic(this.hap.Characteristic.PositionState, this.hap.Characteristic.PositionState.STOPPED).getCharacteristic(this.hap.Characteristic.TargetPosition).setProps({
|
|
177
153
|
validValues: [0, 100],
|
|
178
154
|
minValue: 0,
|
|
179
155
|
maxValue: 100,
|
|
180
156
|
minStep: 100,
|
|
181
|
-
})
|
|
182
|
-
.onSet(this.OnSet.bind(this));
|
|
157
|
+
}).onSet(this.OnSet.bind(this));
|
|
183
158
|
// Remove other services
|
|
184
159
|
this.removeFanService(accessory);
|
|
185
160
|
this.removeLockService(accessory);
|
|
@@ -203,11 +178,7 @@ export class Others extends irdeviceBase {
|
|
|
203
178
|
accessory.context.LockMechanism = this.LockMechanism;
|
|
204
179
|
this.debugLog('Displaying as Lock');
|
|
205
180
|
// Initialize Lock Characteristics
|
|
206
|
-
this.LockMechanism.Service
|
|
207
|
-
.setCharacteristic(this.hap.Characteristic.Name, this.LockMechanism.Name)
|
|
208
|
-
.setCharacteristic(this.hap.Characteristic.PositionState, this.hap.Characteristic.PositionState.STOPPED)
|
|
209
|
-
.getCharacteristic(this.hap.Characteristic.LockTargetState)
|
|
210
|
-
.onSet(this.OnSet.bind(this));
|
|
181
|
+
this.LockMechanism.Service.setCharacteristic(this.hap.Characteristic.Name, this.LockMechanism.Name).setCharacteristic(this.hap.Characteristic.PositionState, this.hap.Characteristic.PositionState.STOPPED).getCharacteristic(this.hap.Characteristic.LockTargetState).onSet(this.OnSet.bind(this));
|
|
211
182
|
// Remove other services
|
|
212
183
|
this.removeFanService(accessory);
|
|
213
184
|
this.removeDoorService(accessory);
|
|
@@ -231,10 +202,7 @@ export class Others extends irdeviceBase {
|
|
|
231
202
|
accessory.context.Faucet = this.Faucet;
|
|
232
203
|
this.debugLog('Displaying as Faucet');
|
|
233
204
|
// Initialize Faucet Characteristics
|
|
234
|
-
this.Faucet.Service
|
|
235
|
-
.setCharacteristic(this.hap.Characteristic.Name, this.Faucet.Name)
|
|
236
|
-
.getCharacteristic(this.hap.Characteristic.Active)
|
|
237
|
-
.onSet(this.OnSet.bind(this));
|
|
205
|
+
this.Faucet.Service.setCharacteristic(this.hap.Characteristic.Name, this.Faucet.Name).getCharacteristic(this.hap.Characteristic.Active).onSet(this.OnSet.bind(this));
|
|
238
206
|
// Remove other services
|
|
239
207
|
this.removeFanService(accessory);
|
|
240
208
|
this.removeLockService(accessory);
|
|
@@ -258,10 +226,7 @@ export class Others extends irdeviceBase {
|
|
|
258
226
|
accessory.context.Fan = this.Fan;
|
|
259
227
|
this.debugLog('Displaying as Fan');
|
|
260
228
|
// Initialize Fan Characteristics
|
|
261
|
-
this.Fan.Service
|
|
262
|
-
.setCharacteristic(this.hap.Characteristic.Name, this.Fan.Name)
|
|
263
|
-
.getCharacteristic(this.hap.Characteristic.Active)
|
|
264
|
-
.onSet(this.OnSet.bind(this));
|
|
229
|
+
this.Fan.Service.setCharacteristic(this.hap.Characteristic.Name, this.Fan.Name).getCharacteristic(this.hap.Characteristic.Active).onSet(this.OnSet.bind(this));
|
|
265
230
|
// Remove other services
|
|
266
231
|
this.removeLockService(accessory);
|
|
267
232
|
this.removeDoorService(accessory);
|
|
@@ -280,16 +245,12 @@ export class Others extends irdeviceBase {
|
|
|
280
245
|
accessory.context.StatefulProgrammableSwitch = accessory.context.StatefulProgrammableSwitch ?? {};
|
|
281
246
|
this.StatefulProgrammableSwitch = {
|
|
282
247
|
Name: accessory.displayName,
|
|
283
|
-
Service: accessory.getService(this.hap.Service.StatefulProgrammableSwitch)
|
|
284
|
-
?? accessory.addService(this.hap.Service.StatefulProgrammableSwitch),
|
|
248
|
+
Service: accessory.getService(this.hap.Service.StatefulProgrammableSwitch) ?? accessory.addService(this.hap.Service.StatefulProgrammableSwitch),
|
|
285
249
|
};
|
|
286
250
|
accessory.context.StatefulProgrammableSwitch = this.StatefulProgrammableSwitch;
|
|
287
251
|
this.debugLog('Displaying as Stateful Programmable Switch');
|
|
288
252
|
// Initialize StatefulProgrammableSwitch Characteristics
|
|
289
|
-
this.StatefulProgrammableSwitch.Service
|
|
290
|
-
.setCharacteristic(this.hap.Characteristic.Name, this.StatefulProgrammableSwitch.Name)
|
|
291
|
-
.getCharacteristic(this.hap.Characteristic.ProgrammableSwitchOutputState)
|
|
292
|
-
.onSet(this.OnSet.bind(this));
|
|
253
|
+
this.StatefulProgrammableSwitch.Service.setCharacteristic(this.hap.Characteristic.Name, this.StatefulProgrammableSwitch.Name).getCharacteristic(this.hap.Characteristic.ProgrammableSwitchOutputState).onSet(this.OnSet.bind(this));
|
|
293
254
|
// Remove other services
|
|
294
255
|
this.removeFanService(accessory);
|
|
295
256
|
this.removeLockService(accessory);
|
|
@@ -313,10 +274,7 @@ export class Others extends irdeviceBase {
|
|
|
313
274
|
accessory.context.Outlet = this.Outlet;
|
|
314
275
|
this.debugLog('Displaying as Outlet');
|
|
315
276
|
// Initialize Outlet Characteristics
|
|
316
|
-
this.Outlet.Service
|
|
317
|
-
.setCharacteristic(this.hap.Characteristic.Name, this.Outlet.Name)
|
|
318
|
-
.getCharacteristic(this.hap.Characteristic.On)
|
|
319
|
-
.onSet(this.OnSet.bind(this));
|
|
277
|
+
this.Outlet.Service.setCharacteristic(this.hap.Characteristic.Name, this.Outlet.Name).getCharacteristic(this.hap.Characteristic.On).onSet(this.OnSet.bind(this));
|
|
320
278
|
// Remove other services
|
|
321
279
|
this.removeFanService(accessory);
|
|
322
280
|
this.removeLockService(accessory);
|
|
@@ -339,58 +297,58 @@ export class Others extends irdeviceBase {
|
|
|
339
297
|
if (this.otherDeviceType === 'switch') {
|
|
340
298
|
if (this.Switch) {
|
|
341
299
|
await this.debugLog(`Set On: ${value}`);
|
|
342
|
-
this.On = value
|
|
300
|
+
this.On = value !== false;
|
|
343
301
|
}
|
|
344
302
|
}
|
|
345
303
|
else if (this.otherDeviceType === 'garagedoor') {
|
|
346
304
|
if (this.GarageDoor) {
|
|
347
305
|
await this.debugLog(`Set TargetDoorState: ${value}`);
|
|
348
|
-
this.On = value
|
|
306
|
+
this.On = value !== this.hap.Characteristic.TargetDoorState.CLOSED;
|
|
349
307
|
}
|
|
350
308
|
}
|
|
351
309
|
else if (this.otherDeviceType === 'door') {
|
|
352
310
|
if (this.Door) {
|
|
353
311
|
await this.debugLog(`Set TargetPosition: ${value}`);
|
|
354
|
-
this.On = value
|
|
312
|
+
this.On = value !== 0;
|
|
355
313
|
}
|
|
356
314
|
}
|
|
357
315
|
else if (this.otherDeviceType === 'window') {
|
|
358
316
|
if (this.Window) {
|
|
359
317
|
await this.debugLog(`Set TargetPosition: ${value}`);
|
|
360
|
-
this.On = value
|
|
318
|
+
this.On = value !== 0;
|
|
361
319
|
}
|
|
362
320
|
}
|
|
363
321
|
else if (this.otherDeviceType === 'windowcovering') {
|
|
364
322
|
if (this.WindowCovering) {
|
|
365
323
|
await this.debugLog(`Set TargetPosition: ${value}`);
|
|
366
|
-
this.On = value
|
|
324
|
+
this.On = value !== 0;
|
|
367
325
|
}
|
|
368
326
|
}
|
|
369
327
|
else if (this.otherDeviceType === 'lock') {
|
|
370
328
|
if (this.LockMechanism) {
|
|
371
329
|
await this.debugLog(`Set LockTargetState: ${value}`);
|
|
372
|
-
this.On = value
|
|
330
|
+
this.On = value !== this.hap.Characteristic.LockTargetState.SECURED;
|
|
373
331
|
}
|
|
374
332
|
}
|
|
375
333
|
else if (this.otherDeviceType === 'faucet') {
|
|
376
334
|
if (this.Faucet) {
|
|
377
335
|
await this.debugLog(`Set Active: ${value}`);
|
|
378
|
-
this.On = value
|
|
336
|
+
this.On = value !== this.hap.Characteristic.Active.INACTIVE;
|
|
379
337
|
}
|
|
380
338
|
}
|
|
381
339
|
else if (this.otherDeviceType === 'stateful') {
|
|
382
340
|
if (this.StatefulProgrammableSwitch) {
|
|
383
341
|
await this.debugLog(`Set ProgrammableSwitchOutputState: ${value}`);
|
|
384
|
-
this.On = value
|
|
342
|
+
this.On = value !== 0;
|
|
385
343
|
}
|
|
386
344
|
}
|
|
387
345
|
else {
|
|
388
346
|
if (this.Outlet) {
|
|
389
347
|
await this.debugLog(`Set On: ${value}`);
|
|
390
|
-
this.On = value
|
|
348
|
+
this.On = value !== false;
|
|
391
349
|
}
|
|
392
350
|
}
|
|
393
|
-
//pushChanges
|
|
351
|
+
// pushChanges
|
|
394
352
|
if (this.On === true) {
|
|
395
353
|
await this.pushOnChanges(this.On);
|
|
396
354
|
}
|
|
@@ -400,25 +358,24 @@ export class Others extends irdeviceBase {
|
|
|
400
358
|
}
|
|
401
359
|
/**
|
|
402
360
|
* Pushes the requested changes to the SwitchBot API
|
|
403
|
-
* deviceType
|
|
404
|
-
* Other -
|
|
405
|
-
* Other - "command" "turnOn" "default"
|
|
406
|
-
* Other - "command" "volumeAdd" "default"
|
|
407
|
-
* Other - "command" "volumeSub" "default"
|
|
408
|
-
* Other - "command" "channelAdd" "default"
|
|
409
|
-
* Other - "command" "channelSub" "default"
|
|
361
|
+
* deviceType commandType Command command parameter Description
|
|
362
|
+
* Other - "command" "turnOff" "default" = set to OFF state
|
|
363
|
+
* Other - "command" "turnOn" "default" = set to ON state
|
|
364
|
+
* Other - "command" "volumeAdd" "default" = volume up
|
|
365
|
+
* Other - "command" "volumeSub" "default" = volume down
|
|
366
|
+
* Other - "command" "channelAdd" "default" = next channel
|
|
367
|
+
* Other - "command" "channelSub" "default" = previous channel
|
|
410
368
|
*/
|
|
411
369
|
async pushOnChanges(On) {
|
|
412
|
-
await this.debugLog(`pushOnChanges On: ${On}
|
|
413
|
-
+ ` disablePushOn: ${this.disablePushOn}, customize: ${this.device.customize}, customOn: ${this.device.customOn}`);
|
|
370
|
+
await this.debugLog(`pushOnChanges On: ${On}, disablePushOn: ${this.disablePushOn}, customize: ${this.device.customize}, customOn: ${this.device.customOn}`);
|
|
414
371
|
if (this.device.customize) {
|
|
415
372
|
if (On === true && !this.disablePushOn) {
|
|
416
373
|
const commandType = await this.commandType();
|
|
417
374
|
const command = await this.commandOn();
|
|
418
375
|
const bodyChange = JSON.stringify({
|
|
419
|
-
command
|
|
376
|
+
command,
|
|
420
377
|
parameter: 'default',
|
|
421
|
-
commandType
|
|
378
|
+
commandType,
|
|
422
379
|
});
|
|
423
380
|
await this.pushChanges(bodyChange);
|
|
424
381
|
}
|
|
@@ -428,16 +385,15 @@ export class Others extends irdeviceBase {
|
|
|
428
385
|
}
|
|
429
386
|
}
|
|
430
387
|
async pushOffChanges(On) {
|
|
431
|
-
await this.debugLog(`pushOffChanges On: ${On}
|
|
432
|
-
+ ` disablePushOff: ${this.disablePushOff}, customize: ${this.device.customize}, customOff: ${this.device.customOff}`);
|
|
388
|
+
await this.debugLog(`pushOffChanges On: ${On}, disablePushOff: ${this.disablePushOff}, customize: ${this.device.customize}, customOff: ${this.device.customOff}`);
|
|
433
389
|
if (this.device.customize) {
|
|
434
390
|
if (On === false && !this.disablePushOff) {
|
|
435
391
|
const commandType = await this.commandType();
|
|
436
392
|
const command = await this.commandOff();
|
|
437
393
|
const bodyChange = JSON.stringify({
|
|
438
|
-
command
|
|
394
|
+
command,
|
|
439
395
|
parameter: 'default',
|
|
440
|
-
commandType
|
|
396
|
+
commandType,
|
|
441
397
|
});
|
|
442
398
|
await this.pushChanges(bodyChange);
|
|
443
399
|
}
|
|
@@ -816,7 +772,8 @@ export class Others extends irdeviceBase {
|
|
|
816
772
|
accessory.removeService(this.Switch.Service);
|
|
817
773
|
}
|
|
818
774
|
async getOtherConfigSettings(accessory, device) {
|
|
819
|
-
this.otherDeviceType = accessory.context.otherDeviceType
|
|
775
|
+
this.otherDeviceType = accessory.context.otherDeviceType
|
|
776
|
+
? accessory.context.otherDeviceType
|
|
820
777
|
: device.other?.deviceType ? device.other.deviceType : 'outlet';
|
|
821
778
|
const deviceType = accessory.context.otherDeviceType ? 'Accessory Cache' : device.other?.deviceType ? 'Device Config' : 'Default';
|
|
822
779
|
await this.debugLog(`Use ${deviceType} Type: ${this.otherDeviceType}`);
|