@switchbot/homebridge-switchbot 3.1.1-beta.3 → 3.1.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/.github/workflows/labeler.yml +2 -2
- package/dist/device/blindtilt.d.ts.map +1 -1
- package/dist/device/blindtilt.js +3 -1
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +3 -1
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +3 -1
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +3 -1
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts +2 -2
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +7 -5
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +3 -1
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +3 -1
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +3 -1
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.d.ts.map +1 -1
- package/dist/device/iosensor.js +3 -1
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.d.ts.map +1 -1
- package/dist/device/lightstrip.js +3 -1
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +3 -1
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +3 -1
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +3 -1
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +3 -1
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +3 -1
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
- package/dist/device/robotvacuumcleaner.js +3 -2
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/irdevice/airconditioner.d.ts.map +1 -1
- package/dist/irdevice/airconditioner.js +0 -1
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/irdevice/airpurifier.d.ts.map +1 -1
- package/dist/irdevice/airpurifier.js +0 -1
- package/dist/irdevice/airpurifier.js.map +1 -1
- package/dist/irdevice/camera.d.ts.map +1 -1
- package/dist/irdevice/camera.js +0 -1
- package/dist/irdevice/camera.js.map +1 -1
- package/dist/irdevice/fan.d.ts.map +1 -1
- package/dist/irdevice/fan.js +0 -1
- package/dist/irdevice/fan.js.map +1 -1
- package/dist/irdevice/light.d.ts.map +1 -1
- package/dist/irdevice/light.js +0 -1
- package/dist/irdevice/light.js.map +1 -1
- package/dist/irdevice/other.d.ts.map +1 -1
- package/dist/irdevice/other.js +0 -1
- package/dist/irdevice/other.js.map +1 -1
- package/dist/irdevice/tv.d.ts.map +1 -1
- package/dist/irdevice/tv.js +0 -1
- package/dist/irdevice/tv.js.map +1 -1
- package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
- package/dist/irdevice/vacuumcleaner.js +0 -1
- package/dist/irdevice/vacuumcleaner.js.map +1 -1
- package/dist/irdevice/waterheater.d.ts.map +1 -1
- package/dist/irdevice/waterheater.js +0 -1
- package/dist/irdevice/waterheater.js.map +1 -1
- package/package.json +10 -3
- package/src/device/blindtilt.ts +3 -2
- package/src/device/bot.ts +3 -1
- package/src/device/ceilinglight.ts +3 -1
- package/src/device/colorbulb.ts +3 -1
- package/src/device/contact.ts +7 -5
- package/src/device/curtain.ts +3 -1
- package/src/device/hub.ts +3 -1
- package/src/device/humidifier.ts +3 -1
- package/src/device/iosensor.ts +3 -1
- package/src/device/lightstrip.ts +3 -1
- package/src/device/lock.ts +3 -1
- package/src/device/meter.ts +3 -1
- package/src/device/meterplus.ts +3 -1
- package/src/device/motion.ts +3 -1
- package/src/device/plug.ts +3 -1
- package/src/device/robotvacuumcleaner.ts +3 -2
- package/src/irdevice/airconditioner.ts +0 -1
- package/src/irdevice/airpurifier.ts +0 -1
- package/src/irdevice/camera.ts +0 -1
- package/src/irdevice/fan.ts +0 -1
- package/src/irdevice/light.ts +0 -1
- package/src/irdevice/other.ts +0 -1
- package/src/irdevice/tv.ts +0 -1
- package/src/irdevice/vacuumcleaner.ts +0 -1
- package/src/irdevice/waterheater.ts +0 -1
|
@@ -437,7 +437,6 @@ export class CeilingLight {
|
|
|
437
437
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
438
438
|
const deviceStatus: any = await body.json();
|
|
439
439
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
440
|
-
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
441
440
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
442
441
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
443
442
|
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
@@ -1096,6 +1095,9 @@ export class CeilingLight {
|
|
|
1096
1095
|
if (device.maxRetry !== undefined) {
|
|
1097
1096
|
config['maxRetry'] = device.maxRetry;
|
|
1098
1097
|
}
|
|
1098
|
+
if (device.webhook !== undefined) {
|
|
1099
|
+
config['webhook'] = device.webhook;
|
|
1100
|
+
}
|
|
1099
1101
|
if (Object.entries(config).length !== 0) {
|
|
1100
1102
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
1101
1103
|
}
|
package/src/device/colorbulb.ts
CHANGED
|
@@ -484,7 +484,6 @@ export class ColorBulb {
|
|
|
484
484
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
485
485
|
const deviceStatus: any = await body.json();
|
|
486
486
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
487
|
-
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
488
487
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
489
488
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
490
489
|
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
@@ -1284,6 +1283,9 @@ export class ColorBulb {
|
|
|
1284
1283
|
if (device.maxRetry !== undefined) {
|
|
1285
1284
|
config['maxRetry'] = device.maxRetry;
|
|
1286
1285
|
}
|
|
1286
|
+
if (device.webhook !== undefined) {
|
|
1287
|
+
config['webhook'] = device.webhook;
|
|
1288
|
+
}
|
|
1287
1289
|
if (Object.entries(config).length !== 0) {
|
|
1288
1290
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
1289
1291
|
}
|
package/src/device/contact.ts
CHANGED
|
@@ -75,11 +75,11 @@ export class Contact {
|
|
|
75
75
|
this.BLE = this.device.connectionType === 'BLE' || this.device.connectionType === 'BLE/OpenAPI';
|
|
76
76
|
this.OpenAPI = this.device.connectionType === 'OpenAPI' || this.device.connectionType === 'BLE/OpenAPI';
|
|
77
77
|
// default placeholders
|
|
78
|
-
this.
|
|
78
|
+
this.deviceLogs(device);
|
|
79
79
|
this.scan(device);
|
|
80
80
|
this.refreshRate(device);
|
|
81
81
|
this.context();
|
|
82
|
-
this.
|
|
82
|
+
this.deviceConfig(device);
|
|
83
83
|
|
|
84
84
|
// this is subject we use to track when we need to POST changes to the SwitchBot API
|
|
85
85
|
this.doContactUpdate = new Subject();
|
|
@@ -417,7 +417,6 @@ export class Contact {
|
|
|
417
417
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
418
418
|
const deviceStatus: any = await body.json();
|
|
419
419
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
420
|
-
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
421
420
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
422
421
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
423
422
|
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
@@ -646,7 +645,7 @@ export class Contact {
|
|
|
646
645
|
}
|
|
647
646
|
}
|
|
648
647
|
|
|
649
|
-
async
|
|
648
|
+
async deviceConfig(device: device & devicesConfig): Promise<void> {
|
|
650
649
|
let config = {};
|
|
651
650
|
if (device.contact) {
|
|
652
651
|
config = device.contact;
|
|
@@ -666,12 +665,15 @@ export class Contact {
|
|
|
666
665
|
if (device.scanDuration !== undefined) {
|
|
667
666
|
config['scanDuration'] = device.scanDuration;
|
|
668
667
|
}
|
|
668
|
+
if (device.webhook !== undefined) {
|
|
669
|
+
config['webhook'] = device.webhook;
|
|
670
|
+
}
|
|
669
671
|
if (Object.entries(config).length !== 0) {
|
|
670
672
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
671
673
|
}
|
|
672
674
|
}
|
|
673
675
|
|
|
674
|
-
async
|
|
676
|
+
async deviceLogs(device: device & devicesConfig): Promise<void> {
|
|
675
677
|
if (this.platform.debugMode) {
|
|
676
678
|
this.deviceLogging = this.accessory.context.logging = 'debugMode';
|
|
677
679
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
|
package/src/device/curtain.ts
CHANGED
|
@@ -615,7 +615,6 @@ export class Curtain {
|
|
|
615
615
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
616
616
|
const deviceStatus: any = await body.json();
|
|
617
617
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
618
|
-
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
619
618
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
620
619
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
621
620
|
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
@@ -1276,6 +1275,9 @@ export class Curtain {
|
|
|
1276
1275
|
if (device.maxRetry !== undefined) {
|
|
1277
1276
|
config['maxRetry'] = device.maxRetry;
|
|
1278
1277
|
}
|
|
1278
|
+
if (device.webhook !== undefined) {
|
|
1279
|
+
config['webhook'] = device.webhook;
|
|
1280
|
+
}
|
|
1279
1281
|
if (Object.entries(config).length !== 0) {
|
|
1280
1282
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
1281
1283
|
}
|
package/src/device/hub.ts
CHANGED
|
@@ -434,7 +434,6 @@ export class Hub {
|
|
|
434
434
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
435
435
|
const deviceStatus: any = await body.json();
|
|
436
436
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
437
|
-
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
438
437
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
439
438
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
440
439
|
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
@@ -720,6 +719,9 @@ export class Hub {
|
|
|
720
719
|
if (device.refreshRate !== undefined) {
|
|
721
720
|
config['refreshRate'] = device.refreshRate;
|
|
722
721
|
}
|
|
722
|
+
if (device.webhook !== undefined) {
|
|
723
|
+
config['webhook'] = device.webhook;
|
|
724
|
+
}
|
|
723
725
|
if (Object.entries(config).length !== 0) {
|
|
724
726
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
725
727
|
}
|
package/src/device/humidifier.ts
CHANGED
|
@@ -408,7 +408,6 @@ export class Humidifier {
|
|
|
408
408
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
409
409
|
const deviceStatus: any = await body.json();
|
|
410
410
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
411
|
-
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
412
411
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
413
412
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
414
413
|
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
@@ -975,6 +974,9 @@ export class Humidifier {
|
|
|
975
974
|
if (device.offline !== undefined) {
|
|
976
975
|
config['offline'] = device.offline;
|
|
977
976
|
}
|
|
977
|
+
if (device.webhook !== undefined) {
|
|
978
|
+
config['webhook'] = device.webhook;
|
|
979
|
+
}
|
|
978
980
|
if (Object.entries(config).length !== 0) {
|
|
979
981
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
980
982
|
}
|
package/src/device/iosensor.ts
CHANGED
|
@@ -387,7 +387,6 @@ export class IOSensor {
|
|
|
387
387
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
388
388
|
const deviceStatus: any = await body.json();
|
|
389
389
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
390
|
-
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
391
390
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
392
391
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
393
392
|
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
@@ -702,6 +701,9 @@ export class IOSensor {
|
|
|
702
701
|
if (device.scanDuration !== undefined) {
|
|
703
702
|
config['scanDuration'] = device.scanDuration;
|
|
704
703
|
}
|
|
704
|
+
if (device.webhook !== undefined) {
|
|
705
|
+
config['webhook'] = device.webhook;
|
|
706
|
+
}
|
|
705
707
|
if (Object.entries(config).length !== 0) {
|
|
706
708
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
707
709
|
}
|
package/src/device/lightstrip.ts
CHANGED
|
@@ -423,7 +423,6 @@ export class StripLight {
|
|
|
423
423
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
424
424
|
const deviceStatus: any = await body.json();
|
|
425
425
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
426
|
-
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
427
426
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
428
427
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
429
428
|
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
@@ -1130,6 +1129,9 @@ export class StripLight {
|
|
|
1130
1129
|
if (device.maxRetry !== undefined) {
|
|
1131
1130
|
config['maxRetry'] = device.maxRetry;
|
|
1132
1131
|
}
|
|
1132
|
+
if (device.webhook !== undefined) {
|
|
1133
|
+
config['webhook'] = device.webhook;
|
|
1134
|
+
}
|
|
1133
1135
|
if (Object.entries(config).length !== 0) {
|
|
1134
1136
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
1135
1137
|
}
|
package/src/device/lock.ts
CHANGED
|
@@ -446,7 +446,6 @@ export class Lock {
|
|
|
446
446
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
447
447
|
const deviceStatus: any = await body.json();
|
|
448
448
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
449
|
-
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
450
449
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
451
450
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
452
451
|
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
@@ -799,6 +798,9 @@ export class Lock {
|
|
|
799
798
|
if (device.scanDuration !== undefined) {
|
|
800
799
|
config['scanDuration'] = device.scanDuration;
|
|
801
800
|
}
|
|
801
|
+
if (device.webhook !== undefined) {
|
|
802
|
+
config['webhook'] = device.webhook;
|
|
803
|
+
}
|
|
802
804
|
if (Object.entries(config).length !== 0) {
|
|
803
805
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
804
806
|
}
|
package/src/device/meter.ts
CHANGED
|
@@ -376,7 +376,6 @@ export class Meter {
|
|
|
376
376
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
377
377
|
const deviceStatus: any = await body.json();
|
|
378
378
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
379
|
-
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
380
379
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
381
380
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
382
381
|
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
@@ -695,6 +694,9 @@ export class Meter {
|
|
|
695
694
|
if (device.scanDuration !== undefined) {
|
|
696
695
|
config['scanDuration'] = device.scanDuration;
|
|
697
696
|
}
|
|
697
|
+
if (device.webhook !== undefined) {
|
|
698
|
+
config['webhook'] = device.webhook;
|
|
699
|
+
}
|
|
698
700
|
if (Object.entries(config).length !== 0) {
|
|
699
701
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
700
702
|
}
|
package/src/device/meterplus.ts
CHANGED
|
@@ -378,7 +378,6 @@ export class MeterPlus {
|
|
|
378
378
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
379
379
|
const deviceStatus: any = await body.json();
|
|
380
380
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
381
|
-
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
382
381
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
383
382
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
384
383
|
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
@@ -710,6 +709,9 @@ export class MeterPlus {
|
|
|
710
709
|
if (device.scanDuration !== undefined) {
|
|
711
710
|
config['scanDuration'] = device.scanDuration;
|
|
712
711
|
}
|
|
712
|
+
if (device.webhook !== undefined) {
|
|
713
|
+
config['webhook'] = device.webhook;
|
|
714
|
+
}
|
|
713
715
|
if (Object.entries(config).length !== 0) {
|
|
714
716
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
715
717
|
}
|
package/src/device/motion.ts
CHANGED
|
@@ -371,7 +371,6 @@ export class Motion {
|
|
|
371
371
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
372
372
|
const deviceStatus: any = await body.json();
|
|
373
373
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
374
|
-
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
375
374
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
376
375
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
377
376
|
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
@@ -621,6 +620,9 @@ export class Motion {
|
|
|
621
620
|
if (device.offline !== undefined) {
|
|
622
621
|
config['offline'] = device.offline;
|
|
623
622
|
}
|
|
623
|
+
if (device.webhook !== undefined) {
|
|
624
|
+
config['webhook'] = device.webhook;
|
|
625
|
+
}
|
|
624
626
|
if (Object.entries(config).length !== 0) {
|
|
625
627
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
626
628
|
}
|
package/src/device/plug.ts
CHANGED
|
@@ -279,7 +279,6 @@ export class Plug {
|
|
|
279
279
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
280
280
|
const deviceStatus: any = await body.json();
|
|
281
281
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
282
|
-
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
283
282
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
284
283
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
285
284
|
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
@@ -649,6 +648,9 @@ export class Plug {
|
|
|
649
648
|
if (device.maxRetry !== undefined) {
|
|
650
649
|
config['maxRetry'] = device.maxRetry;
|
|
651
650
|
}
|
|
651
|
+
if (device.webhook !== undefined) {
|
|
652
|
+
config['webhook'] = device.webhook;
|
|
653
|
+
}
|
|
652
654
|
if (Object.entries(config).length !== 0) {
|
|
653
655
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
654
656
|
}
|
|
@@ -326,7 +326,6 @@ export class RobotVacuumCleaner {
|
|
|
326
326
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
327
327
|
const deviceStatus: any = await body.json();
|
|
328
328
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
329
|
-
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
330
329
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
331
330
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
332
331
|
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
@@ -489,7 +488,6 @@ export class RobotVacuumCleaner {
|
|
|
489
488
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
490
489
|
const deviceStatus: any = await body.json();
|
|
491
490
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
492
|
-
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
493
491
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
494
492
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
495
493
|
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
@@ -816,6 +814,9 @@ export class RobotVacuumCleaner {
|
|
|
816
814
|
if (device.maxRetry !== undefined) {
|
|
817
815
|
config['maxRetry'] = device.maxRetry;
|
|
818
816
|
}
|
|
817
|
+
if (device.webhook !== undefined) {
|
|
818
|
+
config['webhook'] = device.webhook;
|
|
819
|
+
}
|
|
819
820
|
if (Object.entries(config).length !== 0) {
|
|
820
821
|
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
|
|
821
822
|
}
|
|
@@ -267,7 +267,6 @@ export class AirConditioner {
|
|
|
267
267
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
268
268
|
const deviceStatus: any = await body.json();
|
|
269
269
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
270
|
-
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
271
270
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
272
271
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
273
272
|
this.debugErrorLog(`${this.device.remoteType}: ${this.accessory.displayName} `
|
|
@@ -223,7 +223,6 @@ export class AirPurifier {
|
|
|
223
223
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
224
224
|
const deviceStatus: any = await body.json();
|
|
225
225
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
226
|
-
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
227
226
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
228
227
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
229
228
|
this.debugErrorLog(`${this.device.remoteType}: ${this.accessory.displayName} `
|
package/src/irdevice/camera.ts
CHANGED
|
@@ -128,7 +128,6 @@ export class Camera {
|
|
|
128
128
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
129
129
|
const deviceStatus: any = await body.json();
|
|
130
130
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
131
|
-
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
132
131
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
133
132
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
134
133
|
this.debugErrorLog(`${this.device.remoteType}: ${this.accessory.displayName} `
|
package/src/irdevice/fan.ts
CHANGED
|
@@ -245,7 +245,6 @@ export class Fan {
|
|
|
245
245
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
246
246
|
const deviceStatus: any = await body.json();
|
|
247
247
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
248
|
-
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
249
248
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
250
249
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
251
250
|
this.debugErrorLog(`${this.device.remoteType}: ${this.accessory.displayName} `
|
package/src/irdevice/light.ts
CHANGED
|
@@ -243,7 +243,6 @@ export class Light {
|
|
|
243
243
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
244
244
|
const deviceStatus: any = await body.json();
|
|
245
245
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
246
|
-
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
247
246
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
248
247
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
249
248
|
this.debugErrorLog(`${this.device.remoteType}: ${this.accessory.displayName} `
|
package/src/irdevice/other.ts
CHANGED
|
@@ -435,7 +435,6 @@ export class Others {
|
|
|
435
435
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
436
436
|
const deviceStatus: any = await body.json();
|
|
437
437
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
438
|
-
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
439
438
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
440
439
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
441
440
|
this.debugErrorLog(`${this.device.remoteType}: ${this.accessory.displayName} `
|
package/src/irdevice/tv.ts
CHANGED
|
@@ -377,7 +377,6 @@ export class TV {
|
|
|
377
377
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
378
378
|
const deviceStatus: any = await body.json();
|
|
379
379
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
380
|
-
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
381
380
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
382
381
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
383
382
|
this.debugErrorLog(`${this.device.remoteType}: ${this.accessory.displayName} `
|
|
@@ -124,7 +124,6 @@ export class VacuumCleaner {
|
|
|
124
124
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
125
125
|
const deviceStatus: any = await body.json();
|
|
126
126
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
127
|
-
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
128
127
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
129
128
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
130
129
|
this.debugErrorLog(`${this.device.remoteType}: ${this.accessory.displayName} `
|
|
@@ -133,7 +133,6 @@ export class WaterHeater {
|
|
|
133
133
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
134
134
|
const deviceStatus: any = await body.json();
|
|
135
135
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
136
|
-
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
137
136
|
this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
138
137
|
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
139
138
|
this.debugErrorLog(`${this.device.remoteType}: ${this.accessory.displayName} `
|