@switchbot/homebridge-switchbot 2.8.1-beta.17 → 2.8.1-beta.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/device/blindtilt.d.ts.map +1 -1
- package/dist/device/blindtilt.js +37 -16
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.js +10 -10
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +78 -24
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +36 -5
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +22 -12
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +36 -15
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +21 -11
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +66 -23
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.d.ts.map +1 -1
- package/dist/device/iosensor.js +21 -11
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.d.ts.map +1 -1
- package/dist/device/lightstrip.js +63 -20
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +35 -14
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +21 -11
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +21 -11
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +21 -11
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +32 -11
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
- package/dist/device/robotvacuumcleaner.js +48 -16
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/irdevice/airconditioner.d.ts.map +1 -1
- package/dist/irdevice/airconditioner.js +15 -4
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/irdevice/airpurifier.d.ts.map +1 -1
- package/dist/irdevice/airpurifier.js +15 -4
- package/dist/irdevice/airpurifier.js.map +1 -1
- package/dist/irdevice/camera.d.ts.map +1 -1
- package/dist/irdevice/camera.js +15 -4
- package/dist/irdevice/camera.js.map +1 -1
- package/dist/irdevice/fan.d.ts.map +1 -1
- package/dist/irdevice/fan.js +15 -4
- package/dist/irdevice/fan.js.map +1 -1
- package/dist/irdevice/light.d.ts.map +1 -1
- package/dist/irdevice/light.js +16 -5
- package/dist/irdevice/light.js.map +1 -1
- package/dist/irdevice/other.d.ts.map +1 -1
- package/dist/irdevice/other.js +15 -4
- package/dist/irdevice/other.js.map +1 -1
- package/dist/irdevice/tv.d.ts.map +1 -1
- package/dist/irdevice/tv.js +15 -4
- package/dist/irdevice/tv.js.map +1 -1
- package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
- package/dist/irdevice/vacuumcleaner.js +15 -4
- package/dist/irdevice/vacuumcleaner.js.map +1 -1
- package/dist/irdevice/waterheater.d.ts.map +1 -1
- package/dist/irdevice/waterheater.js +15 -4
- package/dist/irdevice/waterheater.js.map +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +18 -3
- package/dist/platform.js.map +1 -1
- package/package.json +1 -1
- package/src/device/blindtilt.ts +35 -16
- package/src/device/bot.ts +11 -11
- package/src/device/ceilinglight.ts +73 -24
- package/src/device/colorbulb.ts +32 -5
- package/src/device/contact.ts +21 -12
- package/src/device/curtain.ts +34 -15
- package/src/device/hub.ts +20 -11
- package/src/device/humidifier.ts +62 -23
- package/src/device/iosensor.ts +20 -11
- package/src/device/lightstrip.ts +59 -20
- package/src/device/lock.ts +33 -14
- package/src/device/meter.ts +20 -11
- package/src/device/meterplus.ts +20 -11
- package/src/device/motion.ts +20 -11
- package/src/device/plug.ts +30 -11
- package/src/device/robotvacuumcleaner.ts +45 -16
- package/src/irdevice/airconditioner.ts +14 -4
- package/src/irdevice/airpurifier.ts +14 -4
- package/src/irdevice/camera.ts +14 -4
- package/src/irdevice/fan.ts +14 -4
- package/src/irdevice/light.ts +15 -5
- package/src/irdevice/other.ts +14 -4
- package/src/irdevice/tv.ts +14 -4
- package/src/irdevice/vacuumcleaner.ts +14 -4
- package/src/irdevice/waterheater.ts +14 -4
- package/src/platform.ts +15 -3
package/src/device/humidifier.ts
CHANGED
|
@@ -375,20 +375,29 @@ export class Humidifier {
|
|
|
375
375
|
const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
|
|
376
376
|
headers: this.platform.generateHeaders(),
|
|
377
377
|
});
|
|
378
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} body: ${JSON.stringify(body)}`);
|
|
379
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
380
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} headers: ${JSON.stringify(headers)}`);
|
|
378
381
|
const deviceStatus: any = await body.json();
|
|
379
|
-
this.
|
|
380
|
-
this.
|
|
381
|
-
this.
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
382
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
383
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
384
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
385
|
+
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
386
|
+
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
387
|
+
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
388
|
+
this.OpenAPI_CurrentHumidifierDehumidifierState = deviceStatus.body.auto;
|
|
389
|
+
this.OpenAPI_Active = deviceStatus.body.power;
|
|
390
|
+
this.OpenAPI_WaterLevel = deviceStatus.body.lackWater;
|
|
391
|
+
this.OpenAPI_CurrentRelativeHumidity = deviceStatus.body.humidity;
|
|
392
|
+
this.OpenAPI_CurrentTemperature = deviceStatus.body.temperature;
|
|
393
|
+
this.OpenAPI_RelativeHumidityHumidifierThreshold = deviceStatus.body.nebulizationEfficiency;
|
|
394
|
+
this.OpenAPI_FirmwareRevision = deviceStatus.body.version;
|
|
395
|
+
this.openAPIparseStatus();
|
|
396
|
+
this.updateHomeKitCharacteristics();
|
|
397
|
+
} else {
|
|
398
|
+
this.statusCode(statusCode);
|
|
399
|
+
this.statusCode(deviceStatus.statusCode);
|
|
400
|
+
}
|
|
392
401
|
} catch (e: any) {
|
|
393
402
|
this.apiError(e);
|
|
394
403
|
this.errorLog(
|
|
@@ -472,10 +481,20 @@ export class Humidifier {
|
|
|
472
481
|
method: 'POST',
|
|
473
482
|
headers: this.platform.generateHeaders(),
|
|
474
483
|
});
|
|
484
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} body: ${JSON.stringify(body)}`);
|
|
485
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
486
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} headers: ${JSON.stringify(headers)}`);
|
|
475
487
|
const deviceStatus: any = await body.json();
|
|
476
|
-
this.
|
|
477
|
-
this.
|
|
478
|
-
this.
|
|
488
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
489
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
490
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
491
|
+
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
492
|
+
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
493
|
+
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
494
|
+
} else {
|
|
495
|
+
this.statusCode(statusCode);
|
|
496
|
+
this.statusCode(deviceStatus.statusCode);
|
|
497
|
+
}
|
|
479
498
|
} catch (e: any) {
|
|
480
499
|
this.apiError(e);
|
|
481
500
|
this.errorLog(
|
|
@@ -515,10 +534,20 @@ export class Humidifier {
|
|
|
515
534
|
method: 'POST',
|
|
516
535
|
headers: this.platform.generateHeaders(),
|
|
517
536
|
});
|
|
537
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} body: ${JSON.stringify(body)}`);
|
|
538
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
539
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} headers: ${JSON.stringify(headers)}`);
|
|
518
540
|
const deviceStatus: any = await body.json();
|
|
519
|
-
this.
|
|
520
|
-
this.
|
|
521
|
-
this.
|
|
541
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
542
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
543
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
544
|
+
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
545
|
+
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
546
|
+
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
547
|
+
} else {
|
|
548
|
+
this.statusCode(statusCode);
|
|
549
|
+
this.statusCode(deviceStatus.statusCode);
|
|
550
|
+
}
|
|
522
551
|
} catch (e: any) {
|
|
523
552
|
this.apiError(e);
|
|
524
553
|
this.errorLog(
|
|
@@ -553,10 +582,20 @@ export class Humidifier {
|
|
|
553
582
|
method: 'POST',
|
|
554
583
|
headers: this.platform.generateHeaders(),
|
|
555
584
|
});
|
|
585
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} body: ${JSON.stringify(body)}`);
|
|
586
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
587
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} headers: ${JSON.stringify(headers)}`);
|
|
556
588
|
const deviceStatus: any = await body.json();
|
|
557
|
-
this.
|
|
558
|
-
this.
|
|
559
|
-
this.
|
|
589
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
590
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
591
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
592
|
+
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
593
|
+
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
594
|
+
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
595
|
+
} else {
|
|
596
|
+
this.statusCode(statusCode);
|
|
597
|
+
this.statusCode(deviceStatus.statusCode);
|
|
598
|
+
}
|
|
560
599
|
} catch (e: any) {
|
|
561
600
|
this.apiError(e);
|
|
562
601
|
this.errorLog(
|
|
@@ -708,7 +747,7 @@ export class Humidifier {
|
|
|
708
747
|
this.accessory.getService(this.platform.Service.AccessoryInformation)!
|
|
709
748
|
.updateCharacteristic(this.platform.Characteristic.FirmwareRevision, this.OpenAPI_FirmwareRevision);
|
|
710
749
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
711
|
-
+ `updateCharacteristic
|
|
750
|
+
+ `updateCharacteristic FirmwareRevision: ${this.OpenAPI_FirmwareRevision}`);
|
|
712
751
|
}
|
|
713
752
|
}
|
|
714
753
|
|
package/src/device/iosensor.ts
CHANGED
|
@@ -333,17 +333,26 @@ export class IOSensor {
|
|
|
333
333
|
const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
|
|
334
334
|
headers: this.platform.generateHeaders(),
|
|
335
335
|
});
|
|
336
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} body: ${JSON.stringify(body)}`);
|
|
337
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
338
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} headers: ${JSON.stringify(headers)}`);
|
|
336
339
|
const deviceStatus: any = await body.json();
|
|
337
|
-
this.
|
|
338
|
-
this.
|
|
339
|
-
this.
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
340
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
341
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
342
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
343
|
+
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
344
|
+
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
345
|
+
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
346
|
+
this.OpenAPI_CurrentRelativeHumidity = deviceStatus.body.humidity!;
|
|
347
|
+
this.OpenAPI_CurrentTemperature = deviceStatus.body.temperature!;
|
|
348
|
+
this.OpenAPI_BatteryLevel = deviceStatus.body.battery;
|
|
349
|
+
this.OpenAPI_FirmwareRevision = deviceStatus.body.version;
|
|
350
|
+
this.openAPIparseStatus();
|
|
351
|
+
this.updateHomeKitCharacteristics();
|
|
352
|
+
} else {
|
|
353
|
+
this.statusCode(statusCode);
|
|
354
|
+
this.statusCode(deviceStatus.statusCode);
|
|
355
|
+
}
|
|
347
356
|
} catch (e: any) {
|
|
348
357
|
this.apiError(e);
|
|
349
358
|
this.errorLog(
|
|
@@ -429,7 +438,7 @@ export class IOSensor {
|
|
|
429
438
|
this.accessory.getService(this.platform.Service.AccessoryInformation)!
|
|
430
439
|
.updateCharacteristic(this.platform.Characteristic.FirmwareRevision, this.OpenAPI_FirmwareRevision);
|
|
431
440
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
432
|
-
+ `updateCharacteristic
|
|
441
|
+
+ `updateCharacteristic FirmwareRevision: ${this.OpenAPI_FirmwareRevision}`);
|
|
433
442
|
}
|
|
434
443
|
}
|
|
435
444
|
|
package/src/device/lightstrip.ts
CHANGED
|
@@ -369,17 +369,26 @@ export class StripLight {
|
|
|
369
369
|
const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
|
|
370
370
|
headers: this.platform.generateHeaders(),
|
|
371
371
|
});
|
|
372
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} body: ${JSON.stringify(body)}`);
|
|
373
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
374
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} headers: ${JSON.stringify(headers)}`);
|
|
372
375
|
const deviceStatus: any = await body.json();
|
|
373
|
-
this.
|
|
374
|
-
this.
|
|
375
|
-
this.
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
376
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
377
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
378
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
379
|
+
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
380
|
+
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
381
|
+
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
382
|
+
this.OpenAPI_On = deviceStatus.body.power;
|
|
383
|
+
this.OpenAPI_RGB = deviceStatus.body.color;
|
|
384
|
+
this.OpenAPI_Brightness = deviceStatus.body.brightness;
|
|
385
|
+
this.OpenAPI_FirmwareRevision = deviceStatus.body.version;
|
|
386
|
+
this.openAPIparseStatus();
|
|
387
|
+
this.updateHomeKitCharacteristics();
|
|
388
|
+
} else {
|
|
389
|
+
this.statusCode(statusCode);
|
|
390
|
+
this.statusCode(deviceStatus.statusCode);
|
|
391
|
+
}
|
|
383
392
|
} catch (e: any) {
|
|
384
393
|
this.apiError(e);
|
|
385
394
|
this.errorLog(
|
|
@@ -583,10 +592,20 @@ export class StripLight {
|
|
|
583
592
|
method: 'POST',
|
|
584
593
|
headers: this.platform.generateHeaders(),
|
|
585
594
|
});
|
|
595
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} body: ${JSON.stringify(body)}`);
|
|
596
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
597
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} headers: ${JSON.stringify(headers)}`);
|
|
586
598
|
const deviceStatus: any = await body.json();
|
|
587
|
-
this.
|
|
588
|
-
this.
|
|
589
|
-
this.
|
|
599
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
600
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
601
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
602
|
+
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
603
|
+
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
604
|
+
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
605
|
+
} else {
|
|
606
|
+
this.statusCode(statusCode);
|
|
607
|
+
this.statusCode(deviceStatus.statusCode);
|
|
608
|
+
}
|
|
590
609
|
} catch (e: any) {
|
|
591
610
|
this.apiError(e);
|
|
592
611
|
this.errorLog(
|
|
@@ -631,10 +650,20 @@ export class StripLight {
|
|
|
631
650
|
method: 'POST',
|
|
632
651
|
headers: this.platform.generateHeaders(),
|
|
633
652
|
});
|
|
653
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} body: ${JSON.stringify(body)}`);
|
|
654
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
655
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} headers: ${JSON.stringify(headers)}`);
|
|
634
656
|
const deviceStatus: any = await body.json();
|
|
635
|
-
this.
|
|
636
|
-
this.
|
|
637
|
-
this.
|
|
657
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
658
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
659
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
660
|
+
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
661
|
+
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
662
|
+
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
663
|
+
} else {
|
|
664
|
+
this.statusCode(statusCode);
|
|
665
|
+
this.statusCode(deviceStatus.statusCode);
|
|
666
|
+
}
|
|
638
667
|
} catch (e: any) {
|
|
639
668
|
this.apiError(e);
|
|
640
669
|
this.errorLog(
|
|
@@ -665,10 +694,20 @@ export class StripLight {
|
|
|
665
694
|
method: 'POST',
|
|
666
695
|
headers: this.platform.generateHeaders(),
|
|
667
696
|
});
|
|
697
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} body: ${JSON.stringify(body)}`);
|
|
698
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
699
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} headers: ${JSON.stringify(headers)}`);
|
|
668
700
|
const deviceStatus: any = await body.json();
|
|
669
|
-
this.
|
|
670
|
-
this.
|
|
671
|
-
this.
|
|
701
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
702
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
703
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
704
|
+
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
705
|
+
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
706
|
+
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
707
|
+
} else {
|
|
708
|
+
this.statusCode(statusCode);
|
|
709
|
+
this.statusCode(deviceStatus.statusCode);
|
|
710
|
+
}
|
|
672
711
|
} catch (e: any) {
|
|
673
712
|
this.apiError(e);
|
|
674
713
|
this.errorLog(
|
|
@@ -826,7 +865,7 @@ export class StripLight {
|
|
|
826
865
|
this.accessory.getService(this.platform.Service.AccessoryInformation)!
|
|
827
866
|
.updateCharacteristic(this.platform.Characteristic.FirmwareRevision, this.OpenAPI_FirmwareRevision);
|
|
828
867
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
829
|
-
+ `updateCharacteristic
|
|
868
|
+
+ `updateCharacteristic FirmwareRevision: ${this.OpenAPI_FirmwareRevision}`);
|
|
830
869
|
}
|
|
831
870
|
}
|
|
832
871
|
|
package/src/device/lock.ts
CHANGED
|
@@ -333,17 +333,26 @@ export class Lock {
|
|
|
333
333
|
const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
|
|
334
334
|
headers: this.platform.generateHeaders(),
|
|
335
335
|
});
|
|
336
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} body: ${JSON.stringify(body)}`);
|
|
337
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
338
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} headers: ${JSON.stringify(headers)}`);
|
|
336
339
|
const deviceStatus: any = await body.json();
|
|
337
|
-
this.
|
|
338
|
-
this.
|
|
339
|
-
this.
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
340
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
341
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
342
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
343
|
+
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
344
|
+
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
345
|
+
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
346
|
+
this.OpenAPI_LockCurrentState = deviceStatus.body.lockState;
|
|
347
|
+
this.OpenAPI_ContactSensorState = deviceStatus.body.doorState;
|
|
348
|
+
this.OpenAPI_BatteryLevel = deviceStatus.body.battery;
|
|
349
|
+
this.OpenAPI_FirmwareRevision = deviceStatus.body.version;
|
|
350
|
+
this.openAPIparseStatus();
|
|
351
|
+
this.updateHomeKitCharacteristics();
|
|
352
|
+
} else {
|
|
353
|
+
this.statusCode(statusCode);
|
|
354
|
+
this.statusCode(deviceStatus.statusCode);
|
|
355
|
+
}
|
|
347
356
|
} catch (e: any) {
|
|
348
357
|
this.apiError(e);
|
|
349
358
|
this.errorLog(
|
|
@@ -442,10 +451,20 @@ export class Lock {
|
|
|
442
451
|
method: 'POST',
|
|
443
452
|
headers: this.platform.generateHeaders(),
|
|
444
453
|
});
|
|
454
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} body: ${JSON.stringify(body)}`);
|
|
455
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
456
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} headers: ${JSON.stringify(headers)}`);
|
|
445
457
|
const deviceStatus: any = await body.json();
|
|
446
|
-
this.
|
|
447
|
-
this.
|
|
448
|
-
this.
|
|
458
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
459
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
460
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
461
|
+
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
462
|
+
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
463
|
+
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
464
|
+
} else {
|
|
465
|
+
this.statusCode(statusCode);
|
|
466
|
+
this.statusCode(deviceStatus.statusCode);
|
|
467
|
+
}
|
|
449
468
|
} catch (e: any) {
|
|
450
469
|
this.apiError(e);
|
|
451
470
|
this.errorLog(
|
|
@@ -522,7 +541,7 @@ export class Lock {
|
|
|
522
541
|
this.accessory.getService(this.platform.Service.AccessoryInformation)!
|
|
523
542
|
.updateCharacteristic(this.platform.Characteristic.FirmwareRevision, this.OpenAPI_FirmwareRevision);
|
|
524
543
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
525
|
-
+ `updateCharacteristic
|
|
544
|
+
+ `updateCharacteristic FirmwareRevision: ${this.OpenAPI_FirmwareRevision}`);
|
|
526
545
|
}
|
|
527
546
|
}
|
|
528
547
|
|
package/src/device/meter.ts
CHANGED
|
@@ -334,17 +334,26 @@ export class Meter {
|
|
|
334
334
|
const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
|
|
335
335
|
headers: this.platform.generateHeaders(),
|
|
336
336
|
});
|
|
337
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} body: ${JSON.stringify(body)}`);
|
|
338
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
339
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} headers: ${JSON.stringify(headers)}`);
|
|
337
340
|
const deviceStatus: any = await body.json();
|
|
338
|
-
this.
|
|
339
|
-
this.
|
|
340
|
-
this.
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
341
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
342
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
343
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
344
|
+
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
345
|
+
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
346
|
+
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
347
|
+
this.OpenAPI_CurrentRelativeHumidity = deviceStatus.body.humidity!;
|
|
348
|
+
this.OpenAPI_CurrentTemperature = deviceStatus.body.temperature!;
|
|
349
|
+
this.OpenAPI_BatteryLevel = deviceStatus.body.battery;
|
|
350
|
+
this.OpenAPI_FirmwareRevision = deviceStatus.body.version;
|
|
351
|
+
this.openAPIparseStatus();
|
|
352
|
+
this.updateHomeKitCharacteristics();
|
|
353
|
+
} else {
|
|
354
|
+
this.statusCode(statusCode);
|
|
355
|
+
this.statusCode(deviceStatus.statusCode);
|
|
356
|
+
}
|
|
348
357
|
} catch (e: any) {
|
|
349
358
|
this.apiError(e);
|
|
350
359
|
this.errorLog(
|
|
@@ -432,7 +441,7 @@ export class Meter {
|
|
|
432
441
|
this.accessory.getService(this.platform.Service.AccessoryInformation)!
|
|
433
442
|
.updateCharacteristic(this.platform.Characteristic.FirmwareRevision, this.OpenAPI_FirmwareRevision);
|
|
434
443
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
435
|
-
+ `updateCharacteristic
|
|
444
|
+
+ `updateCharacteristic FirmwareRevision: ${this.OpenAPI_FirmwareRevision}`);
|
|
436
445
|
}
|
|
437
446
|
}
|
|
438
447
|
|
package/src/device/meterplus.ts
CHANGED
|
@@ -334,17 +334,26 @@ export class MeterPlus {
|
|
|
334
334
|
const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
|
|
335
335
|
headers: this.platform.generateHeaders(),
|
|
336
336
|
});
|
|
337
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} body: ${JSON.stringify(body)}`);
|
|
338
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
339
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} headers: ${JSON.stringify(headers)}`);
|
|
337
340
|
const deviceStatus: any = await body.json();
|
|
338
|
-
this.
|
|
339
|
-
this.
|
|
340
|
-
this.
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
341
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
342
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
343
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
344
|
+
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
345
|
+
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
346
|
+
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
347
|
+
this.OpenAPI_CurrentRelativeHumidity = deviceStatus.body.humidity!;
|
|
348
|
+
this.OpenAPI_CurrentTemperature = deviceStatus.body.temperature!;
|
|
349
|
+
this.OpenAPI_BatteryLevel = deviceStatus.body.battery;
|
|
350
|
+
this.OpenAPI_FirmwareRevision = deviceStatus.body.version;
|
|
351
|
+
this.openAPIparseStatus();
|
|
352
|
+
this.updateHomeKitCharacteristics();
|
|
353
|
+
} else {
|
|
354
|
+
this.statusCode(statusCode);
|
|
355
|
+
this.statusCode(deviceStatus.statusCode);
|
|
356
|
+
}
|
|
348
357
|
} catch (e: any) {
|
|
349
358
|
this.apiError(e);
|
|
350
359
|
this.errorLog(
|
|
@@ -432,7 +441,7 @@ export class MeterPlus {
|
|
|
432
441
|
this.accessory.getService(this.platform.Service.AccessoryInformation)!
|
|
433
442
|
.updateCharacteristic(this.platform.Characteristic.FirmwareRevision, this.OpenAPI_FirmwareRevision);
|
|
434
443
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
435
|
-
+ `updateCharacteristic
|
|
444
|
+
+ `updateCharacteristic FirmwareRevision: ${this.OpenAPI_FirmwareRevision}`);
|
|
436
445
|
}
|
|
437
446
|
}
|
|
438
447
|
|
package/src/device/motion.ts
CHANGED
|
@@ -343,17 +343,26 @@ export class Motion {
|
|
|
343
343
|
const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
|
|
344
344
|
headers: this.platform.generateHeaders(),
|
|
345
345
|
});
|
|
346
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} body: ${JSON.stringify(body)}`);
|
|
347
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
348
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} headers: ${JSON.stringify(headers)}`);
|
|
346
349
|
const deviceStatus: any = await body.json();
|
|
347
|
-
this.
|
|
348
|
-
this.
|
|
349
|
-
this.
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
350
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
351
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
352
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
353
|
+
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
354
|
+
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
355
|
+
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
356
|
+
this.OpenAPI_MotionDetected = deviceStatus.body.moveDetected;
|
|
357
|
+
this.OpenAPI_CurrentAmbientLightLevel = deviceStatus.body.brightness;
|
|
358
|
+
this.OpenAPI_BatteryLevel = deviceStatus.body.battery;
|
|
359
|
+
this.OpenAPI_FirmwareRevision = deviceStatus.body.version;
|
|
360
|
+
this.openAPIparseStatus();
|
|
361
|
+
this.updateHomeKitCharacteristics();
|
|
362
|
+
} else {
|
|
363
|
+
this.statusCode(statusCode);
|
|
364
|
+
this.statusCode(deviceStatus.statusCode);
|
|
365
|
+
}
|
|
357
366
|
} catch (e: any) {
|
|
358
367
|
this.apiError(e);
|
|
359
368
|
this.errorLog(
|
|
@@ -408,7 +417,7 @@ export class Motion {
|
|
|
408
417
|
this.accessory.getService(this.platform.Service.AccessoryInformation)!
|
|
409
418
|
.updateCharacteristic(this.platform.Characteristic.FirmwareRevision, this.OpenAPI_FirmwareRevision);
|
|
410
419
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
411
|
-
+ `updateCharacteristic
|
|
420
|
+
+ `updateCharacteristic FirmwareRevision: ${this.OpenAPI_FirmwareRevision}`);
|
|
412
421
|
}
|
|
413
422
|
}
|
|
414
423
|
|
package/src/device/plug.ts
CHANGED
|
@@ -247,14 +247,23 @@ export class Plug {
|
|
|
247
247
|
const { body, statusCode, headers } = await request(`${Devices}/${this.device.deviceId}/status`, {
|
|
248
248
|
headers: this.platform.generateHeaders(),
|
|
249
249
|
});
|
|
250
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} body: ${JSON.stringify(body)}`);
|
|
251
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
252
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} headers: ${JSON.stringify(headers)}`);
|
|
250
253
|
const deviceStatus: any = await body.json();
|
|
251
|
-
this.
|
|
252
|
-
this.
|
|
253
|
-
this.
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
254
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
255
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
256
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
257
|
+
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
258
|
+
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
259
|
+
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
260
|
+
this.OpenAPI_On = deviceStatus.body.power;
|
|
261
|
+
this.openAPIparseStatus();
|
|
262
|
+
this.updateHomeKitCharacteristics();
|
|
263
|
+
} else {
|
|
264
|
+
this.statusCode(statusCode);
|
|
265
|
+
this.statusCode(deviceStatus.statusCode);
|
|
266
|
+
}
|
|
258
267
|
} catch (e: any) {
|
|
259
268
|
this.apiError(e);
|
|
260
269
|
this.errorLog(
|
|
@@ -365,10 +374,20 @@ export class Plug {
|
|
|
365
374
|
method: 'POST',
|
|
366
375
|
headers: this.platform.generateHeaders(),
|
|
367
376
|
});
|
|
377
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} body: ${JSON.stringify(body)}`);
|
|
378
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
|
|
379
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} headers: ${JSON.stringify(headers)}`);
|
|
368
380
|
const deviceStatus: any = await body.json();
|
|
369
|
-
this.
|
|
370
|
-
this.
|
|
371
|
-
this.
|
|
381
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
|
|
382
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus body: ${JSON.stringify(deviceStatus.body)}`);
|
|
383
|
+
this.debugWarnLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
|
|
384
|
+
if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
|
|
385
|
+
this.debugErrorLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
386
|
+
+ `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
|
|
387
|
+
} else {
|
|
388
|
+
this.statusCode(statusCode);
|
|
389
|
+
this.statusCode(deviceStatus.statusCode);
|
|
390
|
+
}
|
|
372
391
|
} catch (e: any) {
|
|
373
392
|
this.apiError(e);
|
|
374
393
|
this.errorLog(
|
|
@@ -415,7 +434,7 @@ export class Plug {
|
|
|
415
434
|
this.accessory.getService(this.platform.Service.AccessoryInformation)!
|
|
416
435
|
.updateCharacteristic(this.platform.Characteristic.FirmwareRevision, this.OpenAPI_FirmwareRevision);
|
|
417
436
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} `
|
|
418
|
-
+ `updateCharacteristic
|
|
437
|
+
+ `updateCharacteristic FirmwareRevision: ${this.OpenAPI_FirmwareRevision}`);
|
|
419
438
|
}
|
|
420
439
|
}
|
|
421
440
|
|