@switchbot/homebridge-switchbot 1.2.1-beta.1 → 1.2.1-beta.5
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/config.schema.json +3 -3
- package/dist/devices/bots.d.ts +3 -3
- package/dist/devices/bots.d.ts.map +1 -1
- package/dist/devices/bots.js +36 -29
- package/dist/devices/bots.js.map +1 -1
- package/dist/devices/colorbulb.d.ts +2 -2
- package/dist/devices/colorbulb.d.ts.map +1 -1
- package/dist/devices/colorbulb.js +1 -0
- package/dist/devices/colorbulb.js.map +1 -1
- package/dist/devices/contact.d.ts +2 -2
- package/dist/devices/contact.d.ts.map +1 -1
- package/dist/devices/contact.js +8 -7
- package/dist/devices/contact.js.map +1 -1
- package/dist/devices/curtains.d.ts +2 -2
- package/dist/devices/curtains.d.ts.map +1 -1
- package/dist/devices/curtains.js +17 -15
- package/dist/devices/curtains.js.map +1 -1
- package/dist/devices/humidifiers.d.ts +2 -2
- package/dist/devices/humidifiers.d.ts.map +1 -1
- package/dist/devices/humidifiers.js +10 -8
- package/dist/devices/humidifiers.js.map +1 -1
- package/dist/devices/indoorcam.d.ts +2 -2
- package/dist/devices/indoorcam.d.ts.map +1 -1
- package/dist/devices/indoorcam.js.map +1 -1
- package/dist/devices/meters.d.ts +2 -2
- package/dist/devices/meters.d.ts.map +1 -1
- package/dist/devices/meters.js +8 -7
- package/dist/devices/meters.js.map +1 -1
- package/dist/devices/motion.d.ts +2 -2
- package/dist/devices/motion.d.ts.map +1 -1
- package/dist/devices/motion.js +8 -7
- package/dist/devices/motion.js.map +1 -1
- package/dist/devices/plugs.d.ts +2 -2
- package/dist/devices/plugs.d.ts.map +1 -1
- package/dist/devices/plugs.js.map +1 -1
- package/dist/irdevices/airconditioners.d.ts +1 -1
- package/dist/irdevices/airconditioners.d.ts.map +1 -1
- package/dist/irdevices/airconditioners.js +2 -2
- package/dist/irdevices/airconditioners.js.map +1 -1
- package/dist/irdevices/airpurifiers.d.ts +1 -1
- package/dist/irdevices/airpurifiers.d.ts.map +1 -1
- package/dist/irdevices/airpurifiers.js +2 -2
- package/dist/irdevices/airpurifiers.js.map +1 -1
- package/dist/irdevices/cameras.d.ts +1 -1
- package/dist/irdevices/cameras.d.ts.map +1 -1
- package/dist/irdevices/cameras.js +2 -2
- package/dist/irdevices/cameras.js.map +1 -1
- package/dist/irdevices/fans.d.ts +1 -1
- package/dist/irdevices/fans.d.ts.map +1 -1
- package/dist/irdevices/fans.js +2 -2
- package/dist/irdevices/fans.js.map +1 -1
- package/dist/irdevices/lights.d.ts +1 -1
- package/dist/irdevices/lights.d.ts.map +1 -1
- package/dist/irdevices/lights.js +2 -2
- package/dist/irdevices/lights.js.map +1 -1
- package/dist/irdevices/others.d.ts +1 -1
- package/dist/irdevices/others.d.ts.map +1 -1
- package/dist/irdevices/others.js +2 -2
- package/dist/irdevices/others.js.map +1 -1
- package/dist/irdevices/tvs.d.ts +1 -1
- package/dist/irdevices/tvs.d.ts.map +1 -1
- package/dist/irdevices/vacuumcleaners.d.ts +1 -1
- package/dist/irdevices/vacuumcleaners.d.ts.map +1 -1
- package/dist/irdevices/vacuumcleaners.js.map +1 -1
- package/dist/irdevices/waterheaters.d.ts +1 -1
- package/dist/irdevices/waterheaters.d.ts.map +1 -1
- package/dist/irdevices/waterheaters.js +2 -2
- package/dist/irdevices/waterheaters.js.map +1 -1
- package/dist/platform.d.ts +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +31 -27
- package/dist/platform.js.map +1 -1
- package/package.json +3 -3
- package/src/devices/bots.ts +37 -32
- package/src/devices/colorbulb.ts +4 -3
- package/src/devices/contact.ts +6 -8
- package/src/devices/curtains.ts +17 -17
- package/src/devices/humidifiers.ts +9 -10
- package/src/devices/indoorcam.ts +3 -3
- package/src/devices/meters.ts +6 -8
- package/src/devices/motion.ts +6 -8
- package/src/devices/plugs.ts +4 -3
- package/src/irdevices/airconditioners.ts +3 -3
- package/src/irdevices/airpurifiers.ts +3 -3
- package/src/irdevices/cameras.ts +3 -3
- package/src/irdevices/fans.ts +3 -3
- package/src/irdevices/lights.ts +3 -3
- package/src/irdevices/others.ts +3 -3
- package/src/irdevices/tvs.ts +1 -1
- package/src/irdevices/vacuumcleaners.ts +1 -1
- package/src/irdevices/waterheaters.ts +3 -3
- package/src/platform.ts +33 -37
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tvs.d.ts","sourceRoot":"","sources":["../../src/irdevices/tvs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"tvs.d.ts","sourceRoot":"","sources":["../../src/irdevices/tvs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAa,QAAQ,EAAE,oBAAoB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAElG;;;;GAIG;AACH,qBAAa,EAAE;IAiBX,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,SAAS;IACV,MAAM,EAAE,QAAQ,GAAG,eAAe;IAjB3C,OAAO,EAAG,OAAO,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IAGxB,MAAM,EAAG,mBAAmB,CAAC;IAC7B,gBAAgB,EAAG,mBAAmB,CAAC;IAGvC,YAAY,EAAG,oBAAoB,CAAC;IAGpC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA+E;IAC3G,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA8E;gBAGtF,QAAQ,EAAE,iBAAiB,EACpC,SAAS,EAAE,iBAAiB,EAC7B,MAAM,EAAE,QAAQ,GAAG,eAAe;IA6F3C,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,YAAY;IAgEpB,OAAO,CAAC,mBAAmB;IAK3B,OAAO,CAAC,SAAS;IAYjB,OAAO,CAAC,4BAA4B;IAgBpC;;;;;;;;;OASG;IACG,eAAe;IAWf,gBAAgB;IAShB,aAAa;IASb,eAAe;IASf,eAAe;IASf,aAAa;IASb,eAAe;IASf,gBAAgB;IAShB,eAAe;IASf,mBAAmB;IASnB,qBAAqB;IASd,aAAa,CAAC,OAAO,EAAE,OAAO;IAyB3C,OAAO,CAAC,UAAU;IA8BX,QAAQ,CAAC,CAAC,EAAE,GAAG;CAIvB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CharacteristicValue, PlatformAccessory, Service } from 'homebridge';
|
|
2
1
|
import { SwitchBotPlatform } from '../platform';
|
|
3
2
|
import { irDevicesConfig, irdevice, payload } from '../settings';
|
|
3
|
+
import { CharacteristicValue, PlatformAccessory, Service } from 'homebridge';
|
|
4
4
|
/**
|
|
5
5
|
* Platform Accessory
|
|
6
6
|
* An instance of this class is created for each accessory your platform registers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vacuumcleaners.d.ts","sourceRoot":"","sources":["../../src/irdevices/vacuumcleaners.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"vacuumcleaners.d.ts","sourceRoot":"","sources":["../../src/irdevices/vacuumcleaners.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,eAAe,EAAa,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE7E;;;;GAIG;AACH,qBAAa,aAAa;IAYtB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,SAAS;IACV,MAAM,EAAE,QAAQ,GAAG,eAAe;IAZ3C,OAAO,EAAG,OAAO,CAAC;IAGlB,EAAE,EAAG,mBAAmB,CAAC;IAGzB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA+E;IAC3G,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA8E;gBAGtF,QAAQ,EAAE,iBAAiB,EACpC,SAAS,EAAE,iBAAiB,EAC7B,MAAM,EAAE,QAAQ,GAAG,eAAe;IA2B3C,OAAO,CAAC,KAAK;IAUb,OAAO,CAAC,4BAA4B;IASpC;;;;;;;;;OASG;IACG,aAAa;IAWb,cAAc;IAWP,WAAW,CAAC,OAAO,EAAE,OAAO;IAwBzC,OAAO,CAAC,UAAU;IA6BX,QAAQ,CAAC,CAAC,EAAE,GAAG;CAGvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vacuumcleaners.js","sourceRoot":"","sources":["../../src/irdevices/vacuumcleaners.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"vacuumcleaners.js","sourceRoot":"","sources":["../../src/irdevices/vacuumcleaners.ts"],"names":[],"mappings":";;;AAEA,0CAA4E;AAG5E;;;;GAIG;AACH,MAAa,aAAa;IAWxB,YACmB,QAA2B,EACpC,SAA4B,EAC7B,MAAkC;QAFxB,aAAQ,GAAR,QAAQ,CAAmB;QACpC,cAAS,GAAT,SAAS,CAAmB;QAC7B,WAAM,GAAN,MAAM,CAA4B;QAP3C,SAAS;QACQ,gBAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC1F,eAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,KAAK,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;QAOvG,4BAA4B;QAC5B,SAAS;aACN,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,oBAAoB,CAAE;aACvD,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,YAAY,EAAE,WAAW,CAA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import { CharacteristicValue, PlatformAccessory, Service } from 'homebridge';
|
|
2
1
|
import { SwitchBotPlatform } from '../platform';
|
|
3
2
|
import { irDevicesConfig, irdevice, payload } from '../settings';
|
|
3
|
+
import { CharacteristicValue, PlatformAccessory, Service } from 'homebridge';
|
|
4
4
|
/**
|
|
5
5
|
* Platform Accessory
|
|
6
6
|
* An instance of this class is created for each accessory your platform registers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waterheaters.d.ts","sourceRoot":"","sources":["../../src/irdevices/waterheaters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"waterheaters.d.ts","sourceRoot":"","sources":["../../src/irdevices/waterheaters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,eAAe,EAAa,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE7E;;;;GAIG;AACH,qBAAa,WAAW;IAYpB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,SAAS;IACV,MAAM,EAAE,QAAQ,GAAG,eAAe;IAZ3C,OAAO,EAAG,OAAO,CAAC;IAGlB,MAAM,EAAG,mBAAmB,CAAC;IAG7B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA+E;IAC3G,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA8E;gBAGtF,QAAQ,EAAE,iBAAiB,EACpC,SAAS,EAAE,iBAAiB,EAC7B,MAAM,EAAE,QAAQ,GAAG,eAAe;IAoC3C,OAAO,CAAC,SAAS;IAejB,OAAO,CAAC,4BAA4B;IASpC;;;;;;;;;OASG;IACG,wBAAwB;IAWxB,yBAAyB;IAWlB,WAAW,CAAC,OAAO,EAAE,OAAO;IAwBzC,OAAO,CAAC,UAAU;IA6BX,QAAQ,CAAC,CAAC,EAAE,GAAG;CAGvB"}
|
|
@@ -129,8 +129,8 @@ class WaterHeater {
|
|
|
129
129
|
this.platform.log.error(`Water Heater: ${this.accessory.displayName} Hub Device is offline.`);
|
|
130
130
|
break;
|
|
131
131
|
case 190:
|
|
132
|
-
this.platform.log.error(`Water Heater: ${this.accessory.displayName} Device internal error due to device states not synchronized
|
|
133
|
-
+ ` Or command: ${JSON.stringify(push.data)} format is invalid`);
|
|
132
|
+
this.platform.log.error(`Water Heater: ${this.accessory.displayName} Device internal error due to device states not synchronized`
|
|
133
|
+
+ ` with server, Or command: ${JSON.stringify(push.data)} format is invalid`);
|
|
134
134
|
break;
|
|
135
135
|
case 100:
|
|
136
136
|
this.platform.debug(`Water Heater: ${this.accessory.displayName} Command successfully sent.`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waterheaters.js","sourceRoot":"","sources":["../../src/irdevices/waterheaters.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"waterheaters.js","sourceRoot":"","sources":["../../src/irdevices/waterheaters.ts"],"names":[],"mappings":";;;AAEA,0CAA4E;AAG5E;;;;GAIG;AACH,MAAa,WAAW;IAWtB,YACmB,QAA2B,EACpC,SAA4B,EAC7B,MAAkC;QAFxB,aAAQ,GAAR,QAAQ,CAAmB;QACpC,cAAS,GAAT,SAAS,CAAmB;QAC7B,WAAM,GAAN,MAAM,CAA4B;QAP3C,SAAS;QACQ,gBAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC1F,eAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,KAAK,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;QAOvG,4BAA4B;QAC5B,SAAS;aACN,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CA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yBAAyB,CAAC,CAAC;gBAC9F,MAAM;YACR,KAAK,GAAG;gBACN,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,IAAI,CAAC,SAAS,CAAC,WAAW,8DAA8D;sBAC7H,6BAA6B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;gBAChF,MAAM;YACR,KAAK,GAAG;gBACN,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,iBAAiB,IAAI,CAAC,SAAS,CAAC,WAAW,6BAA6B,CAAC,CAAC;gBAC9F,MAAM;YACR;gBACE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,iBAAiB,IAAI,CAAC,SAAS,CAAC,WAAW,sBAAsB,CAAC,CAAC;SAC1F;IACH,CAAC;IAEM,QAAQ,CAAC,CAAM;QACpB,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC5E,CAAC;CACF;AAlKD,kCAkKC"}
|
package/dist/platform.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { API, DynamicPlatformPlugin, Logger, PlatformAccessory, Service, Characteristic } from 'homebridge';
|
|
2
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { API, DynamicPlatformPlugin, Logger, PlatformAccessory, Service, Characteristic } from 'homebridge';
|
|
3
3
|
import { irdevice, device, SwitchBotPlatformConfig, deviceResponses, devicesConfig } from './settings';
|
|
4
4
|
/**
|
|
5
5
|
* HomebridgePlatform
|
package/dist/platform.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAmBA,OAAc,EAAE,aAAa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rC,MAAM,EAAE,MAAM,GAAG,aAAa,EAC9B,SAAS,EAAE,iBAAiB;IAQjB,+BAA+B,CAC1C,MAAM,EAAE,MAAM,GAAG,aAAa,EAC9B,iBAAiB,EAAE,iBAAiB;IAS/B,6BAA6B,CAAC,iBAAiB,EAAE,iBAAiB;IAMlE,cAAc,CAAC,OAAO,EAAE,eAAe;IAMjC,UAAU,CAAC,MAAM,EAAE,QAAQ,GAAG,aAAa,GAAG,MAAM,GAAG,aAAa;IAajF;;;;OAIG;IACH,KAAK,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE;IAQnB;;;OAGG;IACH,MAAM,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE;CAOrB"}
|
package/dist/platform.js
CHANGED
|
@@ -4,8 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SwitchBotPlatform = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const settings_1 = require("./settings");
|
|
9
7
|
const bots_1 = require("./devices/bots");
|
|
10
8
|
const plugs_1 = require("./devices/plugs");
|
|
11
9
|
const meters_1 = require("./devices/meters");
|
|
@@ -24,6 +22,8 @@ const airpurifiers_1 = require("./irdevices/airpurifiers");
|
|
|
24
22
|
const waterheaters_1 = require("./irdevices/waterheaters");
|
|
25
23
|
const vacuumcleaners_1 = require("./irdevices/vacuumcleaners");
|
|
26
24
|
const airconditioners_1 = require("./irdevices/airconditioners");
|
|
25
|
+
const axios_1 = __importDefault(require("axios"));
|
|
26
|
+
const settings_1 = require("./settings");
|
|
27
27
|
/**
|
|
28
28
|
* HomebridgePlatform
|
|
29
29
|
* This class is the main constructor for your plugin, this is where you should
|
|
@@ -416,7 +416,7 @@ class SwitchBotPlatform {
|
|
|
416
416
|
accessory.context.model = device.deviceType;
|
|
417
417
|
accessory.context.deviceID = device.deviceId;
|
|
418
418
|
accessory.context.firmwareRevision = this.version;
|
|
419
|
-
await this.
|
|
419
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
420
420
|
// create the accessory handler for the newly create accessory
|
|
421
421
|
// this is imported from `platformAccessory.ts`
|
|
422
422
|
new humidifiers_1.Humidifier(this, accessory, device);
|
|
@@ -467,7 +467,7 @@ class SwitchBotPlatform {
|
|
|
467
467
|
accessory.context.model = device.deviceType;
|
|
468
468
|
accessory.context.deviceID = device.deviceId;
|
|
469
469
|
accessory.context.firmwareRevision = this.version;
|
|
470
|
-
await this.
|
|
470
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
471
471
|
// accessory.context.firmwareRevision = findaccessories.accessoryAttribute.softwareRevision;
|
|
472
472
|
// create the accessory handler for the newly create accessory
|
|
473
473
|
// this is imported from `platformAccessory.ts`
|
|
@@ -517,7 +517,7 @@ class SwitchBotPlatform {
|
|
|
517
517
|
accessory.context.model = device.deviceType;
|
|
518
518
|
accessory.context.deviceID = device.deviceId;
|
|
519
519
|
accessory.context.firmwareRevision = this.version;
|
|
520
|
-
await this.
|
|
520
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
521
521
|
// create the accessory handler for the newly create accessory
|
|
522
522
|
// this is imported from `platformAccessory.ts`
|
|
523
523
|
new meters_1.Meter(this, accessory, device);
|
|
@@ -544,6 +544,7 @@ class SwitchBotPlatform {
|
|
|
544
544
|
existingAccessory.context.deviceID = device.deviceId;
|
|
545
545
|
existingAccessory.displayName = device.deviceName;
|
|
546
546
|
existingAccessory.context.firmwareRevision = this.version;
|
|
547
|
+
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
547
548
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
548
549
|
// create the accessory handler for the restored accessory
|
|
549
550
|
// this is imported from `platformAccessory.ts`
|
|
@@ -565,6 +566,7 @@ class SwitchBotPlatform {
|
|
|
565
566
|
accessory.context.model = device.deviceType;
|
|
566
567
|
accessory.context.deviceID = device.deviceId;
|
|
567
568
|
accessory.context.firmwareRevision = this.version;
|
|
569
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
568
570
|
// create the accessory handler for the newly create accessory
|
|
569
571
|
// this is imported from `platformAccessory.ts`
|
|
570
572
|
new motion_1.Motion(this, accessory, device);
|
|
@@ -591,6 +593,7 @@ class SwitchBotPlatform {
|
|
|
591
593
|
existingAccessory.context.deviceID = device.deviceId;
|
|
592
594
|
existingAccessory.displayName = device.deviceName;
|
|
593
595
|
existingAccessory.context.firmwareRevision = this.version;
|
|
596
|
+
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
594
597
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
595
598
|
// create the accessory handler for the restored accessory
|
|
596
599
|
// this is imported from `platformAccessory.ts`
|
|
@@ -612,6 +615,7 @@ class SwitchBotPlatform {
|
|
|
612
615
|
accessory.context.model = device.deviceType;
|
|
613
616
|
accessory.context.deviceID = device.deviceId;
|
|
614
617
|
accessory.context.firmwareRevision = this.version;
|
|
618
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
615
619
|
// create the accessory handler for the newly create accessory
|
|
616
620
|
// this is imported from `platformAccessory.ts`
|
|
617
621
|
new contact_1.Contact(this, accessory, device);
|
|
@@ -672,7 +676,7 @@ class SwitchBotPlatform {
|
|
|
672
676
|
accessory.context.model = device.deviceType;
|
|
673
677
|
accessory.context.deviceID = device.deviceId;
|
|
674
678
|
accessory.context.firmwareRevision = this.version;
|
|
675
|
-
await this.
|
|
679
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
676
680
|
// create the accessory handler for the newly create accessory
|
|
677
681
|
// this is imported from `platformAccessory.ts`
|
|
678
682
|
new curtains_1.Curtain(this, accessory, device);
|
|
@@ -733,7 +737,7 @@ class SwitchBotPlatform {
|
|
|
733
737
|
accessory.context.model = device.deviceType;
|
|
734
738
|
accessory.context.deviceID = device.deviceId;
|
|
735
739
|
accessory.context.firmwareRevision = this.version;
|
|
736
|
-
await this.
|
|
740
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
737
741
|
// create the accessory handler for the newly create accessory
|
|
738
742
|
// this is imported from `platformAccessory.ts`
|
|
739
743
|
new plugs_1.Plug(this, accessory, device);
|
|
@@ -782,7 +786,7 @@ class SwitchBotPlatform {
|
|
|
782
786
|
accessory.context.model = device.deviceType;
|
|
783
787
|
accessory.context.deviceID = device.deviceId;
|
|
784
788
|
accessory.context.firmwareRevision = this.version;
|
|
785
|
-
await this.
|
|
789
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
786
790
|
// create the accessory handler for the newly create accessory
|
|
787
791
|
// this is imported from `platformAccessory.ts`
|
|
788
792
|
new colorbulb_1.ColorBulb(this, accessory, device);
|
|
@@ -831,7 +835,7 @@ class SwitchBotPlatform {
|
|
|
831
835
|
accessory.context.model = device.deviceType;
|
|
832
836
|
accessory.context.deviceID = device.deviceId;
|
|
833
837
|
accessory.context.firmwareRevision = this.version;
|
|
834
|
-
await this.
|
|
838
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
835
839
|
// create the accessory handler for the newly create accessory
|
|
836
840
|
// this is imported from `platformAccessory.ts`
|
|
837
841
|
new indoorcam_1.IndoorCam(this, accessory, device);
|
|
@@ -856,7 +860,7 @@ class SwitchBotPlatform {
|
|
|
856
860
|
existingAccessory.context.deviceID = device.deviceId;
|
|
857
861
|
existingAccessory.displayName = device.deviceName;
|
|
858
862
|
existingAccessory.context.firmwareRevision = this.version;
|
|
859
|
-
|
|
863
|
+
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
860
864
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
861
865
|
// create the accessory handler for the restored accessory
|
|
862
866
|
// this is imported from `platformAccessory.ts`
|
|
@@ -874,7 +878,7 @@ class SwitchBotPlatform {
|
|
|
874
878
|
accessory.context.model = device.remoteType;
|
|
875
879
|
accessory.context.deviceID = device.deviceId;
|
|
876
880
|
accessory.context.firmwareRevision = this.version;
|
|
877
|
-
|
|
881
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
878
882
|
// create the accessory handler for the newly create accessory
|
|
879
883
|
// this is imported from `platformAccessory.ts`
|
|
880
884
|
new tvs_1.TV(this, accessory, device);
|
|
@@ -905,7 +909,7 @@ class SwitchBotPlatform {
|
|
|
905
909
|
existingAccessory.context.deviceID = device.deviceId;
|
|
906
910
|
existingAccessory.displayName = device.deviceName;
|
|
907
911
|
existingAccessory.context.firmwareRevision = this.version;
|
|
908
|
-
|
|
912
|
+
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
909
913
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
910
914
|
// create the accessory handler for the restored accessory
|
|
911
915
|
// this is imported from `platformAccessory.ts`
|
|
@@ -927,7 +931,7 @@ class SwitchBotPlatform {
|
|
|
927
931
|
accessory.context.model = device.remoteType;
|
|
928
932
|
accessory.context.deviceID = device.deviceId;
|
|
929
933
|
accessory.context.firmwareRevision = this.version;
|
|
930
|
-
|
|
934
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
931
935
|
// create the accessory handler for the newly create accessory
|
|
932
936
|
// this is imported from `platformAccessory.ts`
|
|
933
937
|
new fans_1.Fan(this, accessory, device);
|
|
@@ -954,7 +958,7 @@ class SwitchBotPlatform {
|
|
|
954
958
|
existingAccessory.context.deviceID = device.deviceId;
|
|
955
959
|
existingAccessory.displayName = device.deviceName;
|
|
956
960
|
existingAccessory.context.firmwareRevision = this.version;
|
|
957
|
-
|
|
961
|
+
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
958
962
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
959
963
|
// create the accessory handler for the restored accessory
|
|
960
964
|
// this is imported from `platformAccessory.ts`
|
|
@@ -976,7 +980,7 @@ class SwitchBotPlatform {
|
|
|
976
980
|
accessory.context.model = device.remoteType;
|
|
977
981
|
accessory.context.deviceID = device.deviceId;
|
|
978
982
|
accessory.context.firmwareRevision = this.version;
|
|
979
|
-
|
|
983
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
980
984
|
// create the accessory handler for the newly create accessory
|
|
981
985
|
// this is imported from `platformAccessory.ts`
|
|
982
986
|
new lights_1.Light(this, accessory, device);
|
|
@@ -1003,7 +1007,7 @@ class SwitchBotPlatform {
|
|
|
1003
1007
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1004
1008
|
existingAccessory.displayName = device.deviceName;
|
|
1005
1009
|
existingAccessory.context.firmwareRevision = this.version;
|
|
1006
|
-
|
|
1010
|
+
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
1007
1011
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
1008
1012
|
// create the accessory handler for the restored accessory
|
|
1009
1013
|
// this is imported from `platformAccessory.ts`
|
|
@@ -1025,7 +1029,7 @@ class SwitchBotPlatform {
|
|
|
1025
1029
|
accessory.context.model = device.remoteType;
|
|
1026
1030
|
accessory.context.deviceID = device.deviceId;
|
|
1027
1031
|
accessory.context.firmwareRevision = this.version;
|
|
1028
|
-
|
|
1032
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
1029
1033
|
// create the accessory handler for the newly create accessory
|
|
1030
1034
|
// this is imported from `platformAccessory.ts`
|
|
1031
1035
|
new airconditioners_1.AirConditioner(this, accessory, device);
|
|
@@ -1052,7 +1056,7 @@ class SwitchBotPlatform {
|
|
|
1052
1056
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1053
1057
|
existingAccessory.displayName = device.deviceName;
|
|
1054
1058
|
existingAccessory.context.firmwareRevision = this.version;
|
|
1055
|
-
|
|
1059
|
+
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
1056
1060
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
1057
1061
|
// create the accessory handler for the restored accessory
|
|
1058
1062
|
// this is imported from `platformAccessory.ts`
|
|
@@ -1074,7 +1078,7 @@ class SwitchBotPlatform {
|
|
|
1074
1078
|
accessory.context.model = device.remoteType;
|
|
1075
1079
|
accessory.context.deviceID = device.deviceId;
|
|
1076
1080
|
accessory.context.firmwareRevision = this.version;
|
|
1077
|
-
|
|
1081
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
1078
1082
|
// create the accessory handler for the newly create accessory
|
|
1079
1083
|
// this is imported from `platformAccessory.ts`
|
|
1080
1084
|
new airpurifiers_1.AirPurifier(this, accessory, device);
|
|
@@ -1101,7 +1105,7 @@ class SwitchBotPlatform {
|
|
|
1101
1105
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1102
1106
|
existingAccessory.displayName = device.deviceName;
|
|
1103
1107
|
existingAccessory.context.firmwareRevision = this.version;
|
|
1104
|
-
|
|
1108
|
+
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
1105
1109
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
1106
1110
|
// create the accessory handler for the restored accessory
|
|
1107
1111
|
// this is imported from `platformAccessory.ts`
|
|
@@ -1123,7 +1127,7 @@ class SwitchBotPlatform {
|
|
|
1123
1127
|
accessory.context.model = device.remoteType;
|
|
1124
1128
|
accessory.context.deviceID = device.deviceId;
|
|
1125
1129
|
accessory.context.firmwareRevision = this.version;
|
|
1126
|
-
|
|
1130
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
1127
1131
|
// create the accessory handler for the newly create accessory
|
|
1128
1132
|
// this is imported from `platformAccessory.ts`
|
|
1129
1133
|
new waterheaters_1.WaterHeater(this, accessory, device);
|
|
@@ -1150,7 +1154,7 @@ class SwitchBotPlatform {
|
|
|
1150
1154
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1151
1155
|
existingAccessory.displayName = device.deviceName;
|
|
1152
1156
|
existingAccessory.context.firmwareRevision = this.version;
|
|
1153
|
-
|
|
1157
|
+
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
1154
1158
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
1155
1159
|
// create the accessory handler for the restored accessory
|
|
1156
1160
|
// this is imported from `platformAccessory.ts`
|
|
@@ -1172,7 +1176,7 @@ class SwitchBotPlatform {
|
|
|
1172
1176
|
accessory.context.model = device.remoteType;
|
|
1173
1177
|
accessory.context.deviceID = device.deviceId;
|
|
1174
1178
|
accessory.context.firmwareRevision = this.version;
|
|
1175
|
-
|
|
1179
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
1176
1180
|
// create the accessory handler for the newly create accessory
|
|
1177
1181
|
// this is imported from `platformAccessory.ts`
|
|
1178
1182
|
new vacuumcleaners_1.VacuumCleaner(this, accessory, device);
|
|
@@ -1199,7 +1203,7 @@ class SwitchBotPlatform {
|
|
|
1199
1203
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1200
1204
|
existingAccessory.displayName = device.deviceName;
|
|
1201
1205
|
existingAccessory.context.firmwareRevision = this.version;
|
|
1202
|
-
|
|
1206
|
+
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
1203
1207
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
1204
1208
|
// create the accessory handler for the restored accessory
|
|
1205
1209
|
// this is imported from `platformAccessory.ts`
|
|
@@ -1221,7 +1225,7 @@ class SwitchBotPlatform {
|
|
|
1221
1225
|
accessory.context.model = device.remoteType;
|
|
1222
1226
|
accessory.context.deviceID = device.deviceId;
|
|
1223
1227
|
accessory.context.firmwareRevision = this.version;
|
|
1224
|
-
|
|
1228
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
1225
1229
|
// create the accessory handler for the newly create accessory
|
|
1226
1230
|
// this is imported from `platformAccessory.ts`
|
|
1227
1231
|
new cameras_1.Camera(this, accessory, device);
|
|
@@ -1248,7 +1252,7 @@ class SwitchBotPlatform {
|
|
|
1248
1252
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1249
1253
|
existingAccessory.displayName = device.deviceName;
|
|
1250
1254
|
existingAccessory.context.firmwareRevision = this.version;
|
|
1251
|
-
|
|
1255
|
+
await this.connectionTypeExistingAccessory(device, existingAccessory);
|
|
1252
1256
|
this.api.updatePlatformAccessories([existingAccessory]);
|
|
1253
1257
|
// create the accessory handler for the restored accessory
|
|
1254
1258
|
// this is imported from `platformAccessory.ts`
|
|
@@ -1270,7 +1274,7 @@ class SwitchBotPlatform {
|
|
|
1270
1274
|
accessory.context.model = device.remoteType;
|
|
1271
1275
|
accessory.context.deviceID = device.deviceId;
|
|
1272
1276
|
accessory.context.firmwareRevision = this.version;
|
|
1273
|
-
|
|
1277
|
+
await this.connectionTypeNewAccessory(device, accessory);
|
|
1274
1278
|
// create the accessory handler for the newly create accessory
|
|
1275
1279
|
// this is imported from `platformAccessory.ts`
|
|
1276
1280
|
new others_1.Others(this, accessory, device);
|