@switchbot/homebridge-switchbot 3.5.0-beta.63 → 3.5.0-beta.65
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 +15 -9
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +37 -24
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +10 -6
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +7 -6
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +20 -13
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +6 -3
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/device.js +47 -18
- package/dist/device/device.js.map +1 -1
- package/dist/device/fan.d.ts.map +1 -1
- package/dist/device/fan.js +13 -8
- package/dist/device/fan.js.map +1 -1
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +15 -9
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +12 -7
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.d.ts.map +1 -1
- package/dist/device/iosensor.js +16 -9
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.d.ts.map +1 -1
- package/dist/device/lightstrip.js +9 -5
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +18 -11
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +14 -8
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +15 -9
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +15 -8
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +9 -5
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
- package/dist/device/robotvacuumcleaner.js +12 -7
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.d.ts.map +1 -1
- package/dist/device/waterdetector.js +10 -5
- package/dist/device/waterdetector.js.map +1 -1
- package/dist/irdevice/airconditioner.d.ts.map +1 -1
- package/dist/irdevice/airconditioner.js +5 -5
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/irdevice/airpurifier.d.ts.map +1 -1
- package/dist/irdevice/airpurifier.js +6 -10
- package/dist/irdevice/airpurifier.js.map +1 -1
- package/dist/irdevice/camera.d.ts.map +1 -1
- package/dist/irdevice/camera.js +3 -5
- package/dist/irdevice/camera.js.map +1 -1
- package/dist/irdevice/fan.d.ts.map +1 -1
- package/dist/irdevice/fan.js +3 -6
- package/dist/irdevice/fan.js.map +1 -1
- package/dist/irdevice/light.d.ts.map +1 -1
- package/dist/irdevice/light.js +7 -13
- package/dist/irdevice/light.js.map +1 -1
- package/dist/irdevice/other.d.ts.map +1 -1
- package/dist/irdevice/other.js +34 -55
- package/dist/irdevice/other.js.map +1 -1
- package/dist/irdevice/tv.d.ts.map +1 -1
- package/dist/irdevice/tv.js +4 -8
- package/dist/irdevice/tv.js.map +1 -1
- package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
- package/dist/irdevice/vacuumcleaner.js +3 -5
- package/dist/irdevice/vacuumcleaner.js.map +1 -1
- package/dist/irdevice/waterheater.d.ts.map +1 -1
- package/dist/irdevice/waterheater.js +3 -5
- package/dist/irdevice/waterheater.js.map +1 -1
- package/package.json +1 -1
- package/src/device/blindtilt.ts +15 -9
- package/src/device/bot.ts +37 -24
- package/src/device/ceilinglight.ts +10 -6
- package/src/device/colorbulb.ts +7 -6
- package/src/device/contact.ts +20 -13
- package/src/device/curtain.ts +8 -7
- package/src/device/device.ts +44 -18
- package/src/device/fan.ts +13 -8
- package/src/device/hub.ts +15 -9
- package/src/device/humidifier.ts +12 -7
- package/src/device/iosensor.ts +17 -9
- package/src/device/lightstrip.ts +9 -5
- package/src/device/lock.ts +18 -11
- package/src/device/meter.ts +14 -8
- package/src/device/meterplus.ts +16 -9
- package/src/device/motion.ts +15 -8
- package/src/device/plug.ts +9 -5
- package/src/device/robotvacuumcleaner.ts +12 -7
- package/src/device/waterdetector.ts +10 -5
- package/src/irdevice/airconditioner.ts +5 -6
- package/src/irdevice/airpurifier.ts +6 -11
- package/src/irdevice/camera.ts +3 -5
- package/src/irdevice/fan.ts +3 -7
- package/src/irdevice/light.ts +7 -15
- package/src/irdevice/other.ts +34 -55
- package/src/irdevice/tv.ts +4 -8
- package/src/irdevice/vacuumcleaner.ts +3 -5
- package/src/irdevice/waterheater.ts +3 -5
package/src/device/contact.ts
CHANGED
|
@@ -57,12 +57,14 @@ export class Contact extends deviceBase {
|
|
|
57
57
|
this.doContactUpdate = new Subject();
|
|
58
58
|
this.contactUpdateInProgress = false;
|
|
59
59
|
|
|
60
|
-
// Initialize Contact Sensor
|
|
60
|
+
// Initialize Contact Sensor Service
|
|
61
|
+
accessory.context.ContactSensor = accessory.context.ContactSensor ?? {};
|
|
61
62
|
this.ContactSensor = {
|
|
62
|
-
Name: accessory.context.
|
|
63
|
+
Name: accessory.context.ContactSensor.Name ?? accessory.displayName,
|
|
63
64
|
Service: accessory.getService(this.hap.Service.ContactSensor) ?? accessory.addService(this.hap.Service.ContactSensor) as Service,
|
|
64
65
|
ContactSensorState: accessory.context.ContactSensorState ?? this.hap.Characteristic.ContactSensorState.CONTACT_DETECTED,
|
|
65
66
|
};
|
|
67
|
+
accessory.context.ContactSensor = this.ContactSensor as object;
|
|
66
68
|
|
|
67
69
|
// Initialize ContactSensor Characteristics
|
|
68
70
|
this.ContactSensor.Service
|
|
@@ -72,15 +74,16 @@ export class Contact extends deviceBase {
|
|
|
72
74
|
.onGet(() => {
|
|
73
75
|
return this.ContactSensor.ContactSensorState;
|
|
74
76
|
});
|
|
75
|
-
accessory.context.ContactSensorName = this.ContactSensor.Name;
|
|
76
77
|
|
|
77
|
-
// Initialize Battery
|
|
78
|
+
// Initialize Battery Service
|
|
79
|
+
accessory.context.Battery = accessory.context.Battery ?? {};
|
|
78
80
|
this.Battery = {
|
|
79
|
-
Name: accessory.context.
|
|
81
|
+
Name: accessory.context.Battery.Name ?? `${accessory.displayName} Battery`,
|
|
80
82
|
Service: accessory.getService(this.hap.Service.Battery) ?? accessory.addService(this.hap.Service.Battery) as Service,
|
|
81
83
|
BatteryLevel: accessory.context.BatteryLevel ?? 100,
|
|
82
84
|
StatusLowBattery: accessory.context.StatusLowBattery ?? this.hap.Characteristic.StatusLowBattery.BATTERY_LEVEL_NORMAL,
|
|
83
85
|
};
|
|
86
|
+
accessory.context.Battery = this.Battery as object;
|
|
84
87
|
|
|
85
88
|
// Initialize Battery Characteristics
|
|
86
89
|
this.Battery.Service
|
|
@@ -97,7 +100,6 @@ export class Contact extends deviceBase {
|
|
|
97
100
|
.onGet(() => {
|
|
98
101
|
return this.Battery.StatusLowBattery;
|
|
99
102
|
});
|
|
100
|
-
accessory.context.BatteryName = this.Battery.Name;
|
|
101
103
|
|
|
102
104
|
// Initialize Motion Sensor Service
|
|
103
105
|
if (this.device.contact?.hide_motionsensor) {
|
|
@@ -105,11 +107,13 @@ export class Contact extends deviceBase {
|
|
|
105
107
|
this.MotionSensor!.Service = accessory.getService(this.hap.Service.MotionSensor) as Service;
|
|
106
108
|
accessory.removeService(this.MotionSensor!.Service);
|
|
107
109
|
} else {
|
|
110
|
+
accessory.context.MotionSensor = accessory.context.MotionSensor ?? {};
|
|
108
111
|
this.MotionSensor = {
|
|
109
|
-
Name: accessory.context.
|
|
112
|
+
Name: accessory.context.MotionSensor.Name ?? `${accessory.displayName} Motion Sensor`,
|
|
110
113
|
Service: accessory.getService(this.hap.Service.MotionSensor) ?? accessory.addService(this.hap.Service.MotionSensor) as Service,
|
|
111
114
|
MotionDetected: accessory.context.MotionDetected ?? false,
|
|
112
115
|
};
|
|
116
|
+
accessory.context.MotionSensor = this.MotionSensor as object;
|
|
113
117
|
|
|
114
118
|
// Motion Sensor Characteristics
|
|
115
119
|
this.MotionSensor.Service
|
|
@@ -119,7 +123,6 @@ export class Contact extends deviceBase {
|
|
|
119
123
|
.onGet(() => {
|
|
120
124
|
return this.MotionSensor!.MotionDetected;
|
|
121
125
|
});
|
|
122
|
-
accessory.context.MotionSensorName = this.MotionSensor.Name;
|
|
123
126
|
}
|
|
124
127
|
|
|
125
128
|
// Initialize Light Sensor Service
|
|
@@ -128,11 +131,13 @@ export class Contact extends deviceBase {
|
|
|
128
131
|
this.LightSensor!.Service = accessory.getService(this.hap.Service.LightSensor) as Service;
|
|
129
132
|
accessory.removeService(this.LightSensor!.Service);
|
|
130
133
|
} else {
|
|
134
|
+
accessory.context.LightSensor = accessory.context.LightSensor ?? {};
|
|
131
135
|
this.LightSensor = {
|
|
132
|
-
Name: accessory.context.
|
|
136
|
+
Name: accessory.context.LightSensor.Name ?? `${accessory.displayName} Light Sensor`,
|
|
133
137
|
Service: accessory.getService(this.hap.Service.LightSensor) ?? accessory.addService(this.hap.Service.LightSensor) as Service,
|
|
134
138
|
CurrentAmbientLightLevel: accessory.context.CurrentAmbientLightLevel ?? 0.0001,
|
|
135
139
|
};
|
|
140
|
+
accessory.context.LightSensor = this.LightSensor as object;
|
|
136
141
|
|
|
137
142
|
// Light Sensor Characteristics
|
|
138
143
|
this.LightSensor.Service
|
|
@@ -142,7 +147,6 @@ export class Contact extends deviceBase {
|
|
|
142
147
|
.onGet(() => {
|
|
143
148
|
return this.LightSensor!.CurrentAmbientLightLevel;
|
|
144
149
|
});
|
|
145
|
-
accessory.context.LightSensorName = this.LightSensor.Name;
|
|
146
150
|
}
|
|
147
151
|
|
|
148
152
|
// Retrieve initial values and updateHomekit
|
|
@@ -305,12 +309,15 @@ export class Contact extends deviceBase {
|
|
|
305
309
|
const version = deviceStatus.body.version?.toString();
|
|
306
310
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
307
311
|
if (deviceStatus.body.version) {
|
|
308
|
-
|
|
312
|
+
const deviceVersion = version?.replace(/^V|-.*$/g, '') ?? '0.0.0';
|
|
309
313
|
this.accessory
|
|
310
314
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
311
|
-
.setCharacteristic(this.hap.Characteristic.
|
|
315
|
+
.setCharacteristic(this.hap.Characteristic.HardwareRevision, deviceVersion)
|
|
316
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, deviceVersion)
|
|
312
317
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
313
|
-
.updateValue(
|
|
318
|
+
.updateValue(deviceVersion);
|
|
319
|
+
this.accessory.context.deviceVersion = deviceVersion;
|
|
320
|
+
this.debugSuccessLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceVersion: ${this.accessory.context.deviceVersion}`);
|
|
314
321
|
}
|
|
315
322
|
}
|
|
316
323
|
|
package/src/device/curtain.ts
CHANGED
|
@@ -422,10 +422,8 @@ export class Curtain extends deviceBase {
|
|
|
422
422
|
} else {
|
|
423
423
|
this.Battery.StatusLowBattery = this.hap.Characteristic.StatusLowBattery.BATTERY_LEVEL_NORMAL;
|
|
424
424
|
}
|
|
425
|
-
this.debugLog(
|
|
426
|
-
|
|
427
|
-
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}`,
|
|
428
|
-
);
|
|
425
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} BatteryLevel: ${this.Battery.BatteryLevel},`
|
|
426
|
+
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
429
427
|
}
|
|
430
428
|
|
|
431
429
|
async openAPIparseStatus(deviceStatus: deviceStatus): Promise<void> {
|
|
@@ -505,12 +503,15 @@ export class Curtain extends deviceBase {
|
|
|
505
503
|
const version = deviceStatus.body.version?.toString();
|
|
506
504
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
507
505
|
if (deviceStatus.body.version) {
|
|
508
|
-
|
|
506
|
+
const deviceVersion = version?.replace(/^V|-.*$/g, '') ?? '0.0.0';
|
|
509
507
|
this.accessory
|
|
510
508
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
511
|
-
.setCharacteristic(this.hap.Characteristic.
|
|
509
|
+
.setCharacteristic(this.hap.Characteristic.HardwareRevision, deviceVersion)
|
|
510
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, deviceVersion)
|
|
512
511
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
513
|
-
.updateValue(
|
|
512
|
+
.updateValue(deviceVersion);
|
|
513
|
+
this.accessory.context.deviceVersion = deviceVersion;
|
|
514
|
+
this.debugSuccessLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceVersion: ${this.accessory.context.deviceVersion}`);
|
|
514
515
|
}
|
|
515
516
|
}
|
|
516
517
|
|
package/src/device/device.ts
CHANGED
|
@@ -68,10 +68,10 @@ export abstract class deviceBase {
|
|
|
68
68
|
accessory
|
|
69
69
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
70
70
|
.setCharacteristic(this.hap.Characteristic.Manufacturer, 'SwitchBot')
|
|
71
|
-
.setCharacteristic(this.hap.Characteristic.Name,
|
|
72
|
-
.setCharacteristic(this.hap.Characteristic.ConfiguredName,
|
|
73
|
-
.setCharacteristic(this.hap.Characteristic.Model,
|
|
74
|
-
.setCharacteristic(this.hap.Characteristic.SerialNumber,
|
|
71
|
+
.setCharacteristic(this.hap.Characteristic.Name, device.deviceName)
|
|
72
|
+
.setCharacteristic(this.hap.Characteristic.ConfiguredName, device.deviceName)
|
|
73
|
+
.setCharacteristic(this.hap.Characteristic.Model, device.model!)
|
|
74
|
+
.setCharacteristic(this.hap.Characteristic.SerialNumber, device.deviceId);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
async getDeviceLogSettings(device: device & devicesConfig): Promise<void> {
|
|
@@ -539,29 +539,55 @@ export abstract class deviceBase {
|
|
|
539
539
|
device.bleModel = SwitchBotBLEModel.Unknown;
|
|
540
540
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Model: ${device.model}, BLE Model: ${device.bleModel}`);
|
|
541
541
|
}
|
|
542
|
-
accessory.context.name = device.deviceName;
|
|
543
542
|
accessory.context.model = device.model;
|
|
544
|
-
accessory.context.deviceId = device.deviceId;
|
|
545
|
-
accessory.context.deviceType = device.deviceType;
|
|
546
543
|
|
|
544
|
+
let deviceFirmwareVersion: string;
|
|
547
545
|
if (device.firmware) {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
546
|
+
deviceFirmwareVersion = device.firmware;
|
|
547
|
+
this.warnLog(`${this.device.deviceType}: ${this.accessory.displayName} 1 FirmwareRevision: ${device.firmware}`);
|
|
548
|
+
} else if (device.version) {
|
|
549
|
+
deviceFirmwareVersion = device.version;
|
|
550
|
+
this.warnLog(`${this.device.deviceType}: ${this.accessory.displayName} 2 FirmwareRevision: ${device.version}`);
|
|
551
|
+
} else if (accessory.context.deviceVersion) {
|
|
552
|
+
deviceFirmwareVersion = accessory.context.deviceVersion;
|
|
553
|
+
this.warnLog(`${this.device.deviceType}: ${this.accessory.displayName} 3 FirmwareRevision: ${accessory.context.deviceVersion}`);
|
|
552
554
|
} else {
|
|
553
|
-
|
|
555
|
+
deviceFirmwareVersion = this.platform.version ?? '0.0.0';
|
|
556
|
+
if (this.platform.version) {
|
|
557
|
+
this.warnLog(`${this.device.deviceType}: ${this.accessory.displayName} 4 FirmwareRevision: ${this.platform.version}`);
|
|
558
|
+
} else {
|
|
559
|
+
this.warnLog(`${this.device.deviceType}: ${this.accessory.displayName} 5 FirmwareRevision: ${deviceFirmwareVersion}`);
|
|
560
|
+
}
|
|
554
561
|
}
|
|
555
|
-
|
|
556
|
-
|
|
562
|
+
if (device.deviceType === 'Blind Tilt') {
|
|
563
|
+
// Firmware Version
|
|
564
|
+
const version = deviceFirmwareVersion.toString();
|
|
565
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
566
|
+
const replace = version?.replace(/^V|-.*$/g, '');
|
|
567
|
+
const match = replace?.match(/.{1,1}/g);
|
|
568
|
+
const blindTiltVersion = match?.join('.') ?? '0.0.0';
|
|
569
|
+
this.accessory
|
|
570
|
+
.getService(this.hap.Service.AccessoryInformation)!
|
|
571
|
+
.setCharacteristic(this.hap.Characteristic.HardwareRevision, blindTiltVersion)
|
|
572
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, blindTiltVersion)
|
|
573
|
+
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
574
|
+
.updateValue(blindTiltVersion);
|
|
575
|
+
this.accessory.context.deviceVersion = blindTiltVersion;
|
|
576
|
+
this.debugSuccessLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceVersion: ${this.accessory.context.deviceVersion}`);
|
|
577
|
+
} else {
|
|
578
|
+
// Firmware Version
|
|
579
|
+
const version = deviceFirmwareVersion.toString();
|
|
580
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
581
|
+
const deviceVersion = version?.replace(/^V|-.*$/g, '') ?? '0.0.0';
|
|
557
582
|
this.accessory
|
|
558
583
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
559
|
-
.setCharacteristic(this.hap.Characteristic.HardwareRevision,
|
|
560
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision,
|
|
584
|
+
.setCharacteristic(this.hap.Characteristic.HardwareRevision, deviceVersion)
|
|
585
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, deviceVersion)
|
|
561
586
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
562
|
-
.updateValue(
|
|
587
|
+
.updateValue(deviceVersion);
|
|
588
|
+
this.accessory.context.deviceVersion = deviceVersion;
|
|
589
|
+
this.debugSuccessLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceVersion: ${this.accessory.context.deviceVersion}`);
|
|
563
590
|
}
|
|
564
|
-
this.debugSuccessLog(`${this.device.deviceType}: ${this.accessory.displayName} Context: ${JSON.stringify(accessory.context)}`);
|
|
565
591
|
}
|
|
566
592
|
|
|
567
593
|
async statusCode(statusCode: number): Promise<void> {
|
package/src/device/fan.ts
CHANGED
|
@@ -44,13 +44,15 @@ export class Fan extends deviceBase {
|
|
|
44
44
|
this.plugUpdateInProgress = false;
|
|
45
45
|
|
|
46
46
|
// Initialize Fan Service
|
|
47
|
+
accessory.context.Fan = accessory.context.Fan ?? {};
|
|
47
48
|
this.Fan = {
|
|
48
|
-
Name: accessory.context.
|
|
49
|
+
Name: accessory.context.Fan.Name ?? accessory.displayName,
|
|
49
50
|
Service: accessory.getService(this.hap.Service.Fanv2) ?? accessory.addService(this.hap.Service.Fanv2) as Service,
|
|
50
51
|
Active: accessory.context.Active ?? this.hap.Characteristic.Active.INACTIVE,
|
|
51
52
|
SwingMode: accessory.context.SwingMode ?? this.hap.Characteristic.SwingMode.SWING_DISABLED,
|
|
52
53
|
RotationSpeed: accessory.context.RotationSpeed ?? 0,
|
|
53
54
|
};
|
|
55
|
+
accessory.context.Fan = this.Fan as object;
|
|
54
56
|
|
|
55
57
|
// Initialize Fan Service
|
|
56
58
|
this.Fan.Service
|
|
@@ -75,16 +77,17 @@ export class Fan extends deviceBase {
|
|
|
75
77
|
return this.Fan.SwingMode;
|
|
76
78
|
})
|
|
77
79
|
.onSet(this.SwingModeSet.bind(this));
|
|
78
|
-
accessory.context.FanName = this.Fan.Name;
|
|
79
80
|
|
|
80
|
-
// Initialize Battery
|
|
81
|
+
// Initialize Battery Service
|
|
82
|
+
accessory.context.Battery = accessory.context.Battery ?? {};
|
|
81
83
|
this.Battery = {
|
|
82
|
-
Name: accessory.context.
|
|
84
|
+
Name: accessory.context.Battery.Name ?? accessory.displayName,
|
|
83
85
|
Service: accessory.getService(this.hap.Service.Battery) ?? accessory.addService(this.hap.Service.Battery) as Service,
|
|
84
86
|
BatteryLevel: accessory.context.BatteryLevel ?? 100,
|
|
85
87
|
StatusLowBattery: accessory.context.StatusLowBattery ?? this.hap.Characteristic.StatusLowBattery.BATTERY_LEVEL_NORMAL,
|
|
86
88
|
ChargingState: accessory.context.ChargingState ?? this.hap.Characteristic.ChargingState.NOT_CHARGING,
|
|
87
89
|
};
|
|
90
|
+
accessory.context.Battery = this.Battery as object;
|
|
88
91
|
|
|
89
92
|
// Initialize Battery Service
|
|
90
93
|
this.Battery.Service
|
|
@@ -107,7 +110,6 @@ export class Fan extends deviceBase {
|
|
|
107
110
|
.onGet(() => {
|
|
108
111
|
return this.Battery.StatusLowBattery;
|
|
109
112
|
});
|
|
110
|
-
accessory.context.BatteryName = this.Battery.Name;
|
|
111
113
|
|
|
112
114
|
// Retrieve initial values and updateHomekit
|
|
113
115
|
this.refreshStatus();
|
|
@@ -243,12 +245,15 @@ export class Fan extends deviceBase {
|
|
|
243
245
|
const version = deviceStatus.body.version?.toString();
|
|
244
246
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
245
247
|
if (deviceStatus.body.version) {
|
|
246
|
-
|
|
248
|
+
const deviceVersion = version?.replace(/^V|-.*$/g, '') ?? '0.0.0';
|
|
247
249
|
this.accessory
|
|
248
250
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
249
|
-
.setCharacteristic(this.hap.Characteristic.
|
|
251
|
+
.setCharacteristic(this.hap.Characteristic.HardwareRevision, deviceVersion)
|
|
252
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, deviceVersion)
|
|
250
253
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
251
|
-
.updateValue(
|
|
254
|
+
.updateValue(deviceVersion);
|
|
255
|
+
this.accessory.context.deviceVersion = deviceVersion;
|
|
256
|
+
this.debugSuccessLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceVersion: ${this.accessory.context.deviceVersion}`);
|
|
252
257
|
}
|
|
253
258
|
}
|
|
254
259
|
|
package/src/device/hub.ts
CHANGED
|
@@ -52,11 +52,13 @@ export class Hub extends deviceBase {
|
|
|
52
52
|
this.TemperatureSensor!.Service = this.accessory.getService(this.hap.Service.TemperatureSensor) as Service;
|
|
53
53
|
accessory.removeService(this.TemperatureSensor!.Service);
|
|
54
54
|
} else {
|
|
55
|
+
accessory.context.TemperatureSensor = accessory.context.TemperatureSensor ?? {};
|
|
55
56
|
this.TemperatureSensor = {
|
|
56
|
-
Name: accessory.context.
|
|
57
|
+
Name: accessory.context.TemperatureSensor.Name ?? `${accessory.displayName} Temperature Sensor`,
|
|
57
58
|
Service: accessory.getService(this.hap.Service.TemperatureSensor) ?? this.accessory.addService(this.hap.Service.TemperatureSensor) as Service,
|
|
58
59
|
CurrentTemperature: accessory.context.CurrentTemperature ?? 0,
|
|
59
60
|
};
|
|
61
|
+
accessory.context.TemperatureSensor = this.TemperatureSensor as object;
|
|
60
62
|
|
|
61
63
|
// Initialize Temperature Sensor Characteristic
|
|
62
64
|
this.TemperatureSensor.Service
|
|
@@ -72,7 +74,6 @@ export class Hub extends deviceBase {
|
|
|
72
74
|
.onGet(() => {
|
|
73
75
|
return this.TemperatureSensor!.CurrentTemperature;
|
|
74
76
|
});
|
|
75
|
-
accessory.context.TemperatureSensorName = this.TemperatureSensor.Name;
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
// Initialize Humidity Sensor Service
|
|
@@ -81,11 +82,13 @@ export class Hub extends deviceBase {
|
|
|
81
82
|
this.HumiditySensor!.Service = this.accessory.getService(this.hap.Service.HumiditySensor) as Service;
|
|
82
83
|
accessory.removeService(this.HumiditySensor!.Service);
|
|
83
84
|
} else {
|
|
85
|
+
accessory.context.HumiditySensor = accessory.context.HumiditySensor ?? {};
|
|
84
86
|
this.HumiditySensor = {
|
|
85
|
-
Name: accessory.context.
|
|
87
|
+
Name: accessory.context.HumiditySensor.Name ?? `${accessory.displayName} Humidity Sensor`,
|
|
86
88
|
Service: accessory.getService(this.hap.Service.HumiditySensor) ?? this.accessory.addService(this.hap.Service.HumiditySensor) as Service,
|
|
87
89
|
CurrentRelativeHumidity: accessory.context.CurrentRelativeHumidity ?? 0,
|
|
88
90
|
};
|
|
91
|
+
accessory.context.HumiditySensor = this.HumiditySensor as object;
|
|
89
92
|
|
|
90
93
|
// Initialize Humidity Sensor Characteristics
|
|
91
94
|
this.HumiditySensor!.Service
|
|
@@ -97,7 +100,6 @@ export class Hub extends deviceBase {
|
|
|
97
100
|
.onGet(() => {
|
|
98
101
|
return this.HumiditySensor!.CurrentRelativeHumidity;
|
|
99
102
|
});
|
|
100
|
-
accessory.context.HumiditySensorName = this.HumiditySensor.Name;
|
|
101
103
|
}
|
|
102
104
|
|
|
103
105
|
// Initialize Light Sensor Service
|
|
@@ -106,11 +108,13 @@ export class Hub extends deviceBase {
|
|
|
106
108
|
this.LightSensor!.Service = this.accessory.getService(this.hap.Service.LightSensor) as Service;
|
|
107
109
|
accessory.removeService(this.LightSensor!.Service);
|
|
108
110
|
} else {
|
|
111
|
+
accessory.context.LightSensor = accessory.context.LightSensor ?? {};
|
|
109
112
|
this.LightSensor = {
|
|
110
|
-
Name: accessory.context.
|
|
113
|
+
Name: accessory.context.LightSensor.Name ?? `${accessory.displayName} Light Sensor`,
|
|
111
114
|
Service: accessory.getService(this.hap.Service.LightSensor) ?? this.accessory.addService(this.hap.Service.LightSensor) as Service,
|
|
112
115
|
CurrentAmbientLightLevel: accessory.context.CurrentAmbientLightLevel ?? 0.0001,
|
|
113
116
|
};
|
|
117
|
+
accessory.context.LightSensor = this.LightSensor as object;
|
|
114
118
|
|
|
115
119
|
// Initialize Light Sensor Characteristics
|
|
116
120
|
this.LightSensor!.Service
|
|
@@ -122,7 +126,6 @@ export class Hub extends deviceBase {
|
|
|
122
126
|
.onGet(() => {
|
|
123
127
|
return this.LightSensor!.CurrentAmbientLightLevel;
|
|
124
128
|
});
|
|
125
|
-
accessory.context.LightSensorName = this.LightSensor.Name;
|
|
126
129
|
}
|
|
127
130
|
|
|
128
131
|
// Retrieve initial values and updateHomekit
|
|
@@ -213,12 +216,15 @@ export class Hub extends deviceBase {
|
|
|
213
216
|
const version = deviceStatus.body.version?.toString();
|
|
214
217
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
215
218
|
if (deviceStatus.body.version) {
|
|
216
|
-
|
|
219
|
+
const deviceVersion = version?.replace(/^V|-.*$/g, '') ?? '0.0.0';
|
|
217
220
|
this.accessory
|
|
218
221
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
219
|
-
.setCharacteristic(this.hap.Characteristic.
|
|
222
|
+
.setCharacteristic(this.hap.Characteristic.HardwareRevision, deviceVersion)
|
|
223
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, deviceVersion)
|
|
220
224
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
221
|
-
.updateValue(
|
|
225
|
+
.updateValue(deviceVersion);
|
|
226
|
+
this.accessory.context.deviceVersion = deviceVersion;
|
|
227
|
+
this.debugSuccessLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceVersion: ${this.accessory.context.deviceVersion}`);
|
|
222
228
|
}
|
|
223
229
|
}
|
|
224
230
|
|
package/src/device/humidifier.ts
CHANGED
|
@@ -48,8 +48,9 @@ export class Humidifier extends deviceBase {
|
|
|
48
48
|
this.humidifierUpdateInProgress = false;
|
|
49
49
|
|
|
50
50
|
// Initialize the HumidifierDehumidifier Service
|
|
51
|
+
accessory.context.HumidifierDehumidifier = accessory.context.HumidifierDehumidifier ?? {};
|
|
51
52
|
this.HumidifierDehumidifier = {
|
|
52
|
-
Name: accessory.context.
|
|
53
|
+
Name: accessory.context.HumidifierDehumidifier.Name ?? accessory.displayName,
|
|
53
54
|
Service: accessory.getService(this.hap.Service.HumidifierDehumidifier)
|
|
54
55
|
?? accessory.addService(this.hap.Service.HumidifierDehumidifier) as Service,
|
|
55
56
|
Active: accessory.context.Active ?? this.hap.Characteristic.Active.ACTIVE,
|
|
@@ -61,6 +62,7 @@ export class Humidifier extends deviceBase {
|
|
|
61
62
|
?? this.hap.Characteristic.CurrentHumidifierDehumidifierState.INACTIVE,
|
|
62
63
|
RelativeHumidityHumidifierThreshold: accessory.context.RelativeHumidityHumidifierThreshold ?? 50,
|
|
63
64
|
};
|
|
65
|
+
accessory.context.HumidifierDehumidifier = this.HumidifierDehumidifier as object;
|
|
64
66
|
|
|
65
67
|
// Initialize the HumidifierDehumidifier Characteristics
|
|
66
68
|
this.HumidifierDehumidifier.Service
|
|
@@ -98,7 +100,6 @@ export class Humidifier extends deviceBase {
|
|
|
98
100
|
return this.HumidifierDehumidifier.RelativeHumidityHumidifierThreshold;
|
|
99
101
|
})
|
|
100
102
|
.onSet(this.RelativeHumidityHumidifierThresholdSet.bind(this));
|
|
101
|
-
accessory.context.HumidifierDehumidifierName = this.HumidifierDehumidifier.Name;
|
|
102
103
|
|
|
103
104
|
// Initialize the Temperature Sensor Service
|
|
104
105
|
if (device.humidifier?.hide_temperature) {
|
|
@@ -106,11 +107,13 @@ export class Humidifier extends deviceBase {
|
|
|
106
107
|
this.TemperatureSensor!.Service = this.accessory.getService(this.hap.Service.TemperatureSensor) as Service;
|
|
107
108
|
accessory.removeService(this.TemperatureSensor!.Service);
|
|
108
109
|
} else {
|
|
110
|
+
accessory.context.TemperatureSensor = accessory.context.TemperatureSensor ?? {};
|
|
109
111
|
this.TemperatureSensor = {
|
|
110
|
-
Name: accessory.context.
|
|
112
|
+
Name: accessory.context.TemperatureSensor.Name ?? `${accessory.displayName} Temperature Sensor`,
|
|
111
113
|
Service: accessory.getService(this.hap.Service.TemperatureSensor) ?? this.accessory.addService(this.hap.Service.TemperatureSensor) as Service,
|
|
112
114
|
CurrentTemperature: accessory.context.CurrentTemperature || 30,
|
|
113
115
|
};
|
|
116
|
+
accessory.context.TemperatureSensor = this.TemperatureSensor as object;
|
|
114
117
|
|
|
115
118
|
// Initialize the Temperature Sensor Characteristics
|
|
116
119
|
this.TemperatureSensor.Service
|
|
@@ -125,7 +128,6 @@ export class Humidifier extends deviceBase {
|
|
|
125
128
|
.onGet(() => {
|
|
126
129
|
return this.TemperatureSensor!.CurrentTemperature;
|
|
127
130
|
});
|
|
128
|
-
accessory.context.TemperatureSensorName = this.TemperatureSensor.Name;
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
// Retrieve initial values and updateHomekit
|
|
@@ -269,12 +271,15 @@ export class Humidifier extends deviceBase {
|
|
|
269
271
|
const version = deviceStatus.body.version?.toString();
|
|
270
272
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
271
273
|
if (deviceStatus.body.version) {
|
|
272
|
-
|
|
274
|
+
const deviceVersion = version?.replace(/^V|-.*$/g, '') ?? '0.0.0';
|
|
273
275
|
this.accessory
|
|
274
276
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
275
|
-
.setCharacteristic(this.hap.Characteristic.
|
|
277
|
+
.setCharacteristic(this.hap.Characteristic.HardwareRevision, deviceVersion)
|
|
278
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, deviceVersion)
|
|
276
279
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
277
|
-
.updateValue(
|
|
280
|
+
.updateValue(deviceVersion);
|
|
281
|
+
this.accessory.context.deviceVersion = deviceVersion;
|
|
282
|
+
this.debugSuccessLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceVersion: ${this.accessory.context.deviceVersion}`);
|
|
278
283
|
}
|
|
279
284
|
}
|
|
280
285
|
|
package/src/device/iosensor.ts
CHANGED
|
@@ -52,13 +52,15 @@ export class IOSensor extends deviceBase {
|
|
|
52
52
|
this.doIOSensorUpdate = new Subject();
|
|
53
53
|
this.ioSensorUpdateInProgress = false;
|
|
54
54
|
|
|
55
|
-
// Initialize Battery
|
|
55
|
+
// Initialize Battery Service
|
|
56
|
+
accessory.context.Battery = accessory.context.Battery ?? {};
|
|
56
57
|
this.Battery = {
|
|
57
|
-
Name: accessory.context.
|
|
58
|
+
Name: accessory.context.Battery.Name ?? `${accessory.displayName} Battery`,
|
|
58
59
|
Service: accessory.getService(this.hap.Service.Battery) ?? accessory.addService(this.hap.Service.Battery) as Service,
|
|
59
60
|
BatteryLevel: accessory.context.BatteryLevel ?? 100,
|
|
60
61
|
StatusLowBattery: accessory.context.StatusLowBattery ?? this.hap.Characteristic.StatusLowBattery.BATTERY_LEVEL_NORMAL,
|
|
61
62
|
};
|
|
63
|
+
accessory.context.Battery = this.Battery as object;
|
|
62
64
|
|
|
63
65
|
// Initialize Battery Characteristics
|
|
64
66
|
this.Battery.Service
|
|
@@ -82,11 +84,13 @@ export class IOSensor extends deviceBase {
|
|
|
82
84
|
this.TemperatureSensor!.Service = this.accessory.getService(this.hap.Service.TemperatureSensor) as Service;
|
|
83
85
|
accessory.removeService(this.TemperatureSensor!.Service);
|
|
84
86
|
} else {
|
|
87
|
+
accessory.context.TemperatureSensor = accessory.context.TemperatureSensor ?? {};
|
|
85
88
|
this.TemperatureSensor = {
|
|
86
|
-
Name: accessory.context.
|
|
89
|
+
Name: accessory.context.TemperatureSensor.Name ?? `${accessory.displayName} Temperature Sensor`,
|
|
87
90
|
Service: accessory.getService(this.hap.Service.TemperatureSensor) ?? this.accessory.addService(this.hap.Service.TemperatureSensor) as Service,
|
|
88
91
|
CurrentTemperature: accessory.context.CurrentTemperature ?? 30,
|
|
89
92
|
};
|
|
93
|
+
accessory.context.TemperatureSensor = this.TemperatureSensor as object;
|
|
90
94
|
|
|
91
95
|
// Initialize Temperature Sensor Characteristics
|
|
92
96
|
this.TemperatureSensor.Service
|
|
@@ -102,7 +106,6 @@ export class IOSensor extends deviceBase {
|
|
|
102
106
|
.onGet(() => {
|
|
103
107
|
return this.TemperatureSensor!.CurrentTemperature;
|
|
104
108
|
});
|
|
105
|
-
accessory.context.TemperatureSensorName = this.TemperatureSensor.Name;
|
|
106
109
|
}
|
|
107
110
|
|
|
108
111
|
// Initialize Humidity Sensor Service
|
|
@@ -111,11 +114,13 @@ export class IOSensor extends deviceBase {
|
|
|
111
114
|
this.HumiditySensor!.Service = this.accessory.getService(this.hap.Service.HumiditySensor) as Service;
|
|
112
115
|
accessory.removeService(this.HumiditySensor!.Service);
|
|
113
116
|
} else {
|
|
117
|
+
accessory.context.HumiditySensor = accessory.context.HumiditySensor ?? {};
|
|
114
118
|
this.HumiditySensor = {
|
|
115
|
-
Name: accessory.context.
|
|
119
|
+
Name: accessory.context.HumiditySensor.Name ?? `${accessory.displayName} Humidity Sensor`,
|
|
116
120
|
Service: accessory.getService(this.hap.Service.HumiditySensor) ?? this.accessory.addService(this.hap.Service.HumiditySensor) as Service,
|
|
117
121
|
CurrentRelativeHumidity: accessory.context.CurrentRelativeHumidity ?? 50,
|
|
118
122
|
};
|
|
123
|
+
accessory.context.HumiditySensor = this.HumiditySensor as object;
|
|
119
124
|
|
|
120
125
|
// Initialize Humidity Sensor Characteristics
|
|
121
126
|
this.HumiditySensor.Service
|
|
@@ -127,7 +132,6 @@ export class IOSensor extends deviceBase {
|
|
|
127
132
|
.onGet(() => {
|
|
128
133
|
return this.HumiditySensor!.CurrentRelativeHumidity;
|
|
129
134
|
});
|
|
130
|
-
accessory.context.HumiditySensorName = this.HumiditySensor.Name;
|
|
131
135
|
}
|
|
132
136
|
|
|
133
137
|
// Retrieve initial values and updateHomekit
|
|
@@ -228,16 +232,20 @@ export class IOSensor extends deviceBase {
|
|
|
228
232
|
this.TemperatureSensor!.CurrentTemperature = deviceStatus.body.temperature!;
|
|
229
233
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Temperature: ${this.TemperatureSensor!.CurrentTemperature}°c`);
|
|
230
234
|
}
|
|
235
|
+
|
|
231
236
|
// Firmware Version
|
|
232
237
|
const version = deviceStatus.body.version?.toString();
|
|
233
238
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
234
239
|
if (deviceStatus.body.version) {
|
|
235
|
-
|
|
240
|
+
const deviceVersion = version?.replace(/^V|-.*$/g, '') ?? '0.0.0';
|
|
236
241
|
this.accessory
|
|
237
242
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
238
|
-
.setCharacteristic(this.hap.Characteristic.
|
|
243
|
+
.setCharacteristic(this.hap.Characteristic.HardwareRevision, deviceVersion)
|
|
244
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, deviceVersion)
|
|
239
245
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
240
|
-
.updateValue(
|
|
246
|
+
.updateValue(deviceVersion);
|
|
247
|
+
this.accessory.context.deviceVersion = deviceVersion;
|
|
248
|
+
this.debugSuccessLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceVersion: ${this.accessory.context.deviceVersion}`);
|
|
241
249
|
}
|
|
242
250
|
}
|
|
243
251
|
|
package/src/device/lightstrip.ts
CHANGED
|
@@ -46,8 +46,9 @@ export class StripLight extends deviceBase {
|
|
|
46
46
|
this.stripLightUpdateInProgress = false;
|
|
47
47
|
|
|
48
48
|
// Initialize the LightBulb Service
|
|
49
|
+
accessory.context.LightBulb = accessory.context.LightBulb ?? {};
|
|
49
50
|
this.LightBulb = {
|
|
50
|
-
Name: accessory.context.
|
|
51
|
+
Name: accessory.context.LightBulb.Name ?? accessory.displayName,
|
|
51
52
|
Service: accessory.getService(this.hap.Service.Lightbulb) ?? accessory.addService(this.hap.Service.Lightbulb) as Service,
|
|
52
53
|
On: accessory.context.On ?? false,
|
|
53
54
|
Hue: accessory.context.Hue ?? 0,
|
|
@@ -55,6 +56,7 @@ export class StripLight extends deviceBase {
|
|
|
55
56
|
Brightness: accessory.context.Brightness ?? 0,
|
|
56
57
|
ColorTemperature: accessory.context.ColorTemperature ?? 140,
|
|
57
58
|
};
|
|
59
|
+
accessory.context.LightBulb = this.LightBulb as object;
|
|
58
60
|
|
|
59
61
|
// Adaptive Lighting
|
|
60
62
|
if (this.adaptiveLightingShift === -1 && this.accessory.context.adaptiveLighting) {
|
|
@@ -137,7 +139,6 @@ export class StripLight extends deviceBase {
|
|
|
137
139
|
return this.LightBulb.Saturation;
|
|
138
140
|
})
|
|
139
141
|
.onSet(this.SaturationSet.bind(this));
|
|
140
|
-
accessory.context.LightBulbName = this.LightBulb.Name;
|
|
141
142
|
|
|
142
143
|
// Retrieve initial values and updateHomekit
|
|
143
144
|
this.refreshStatus();
|
|
@@ -333,12 +334,15 @@ export class StripLight extends deviceBase {
|
|
|
333
334
|
const version = deviceStatus.body.version?.toString();
|
|
334
335
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${version?.replace(/^V|-.*$/g, '')}`);
|
|
335
336
|
if (deviceStatus.body.version) {
|
|
336
|
-
|
|
337
|
+
const deviceVersion = version?.replace(/^V|-.*$/g, '') ?? '0.0.0';
|
|
337
338
|
this.accessory
|
|
338
339
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
339
|
-
.setCharacteristic(this.hap.Characteristic.
|
|
340
|
+
.setCharacteristic(this.hap.Characteristic.HardwareRevision, deviceVersion)
|
|
341
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, deviceVersion)
|
|
340
342
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
341
|
-
.updateValue(
|
|
343
|
+
.updateValue(deviceVersion);
|
|
344
|
+
this.accessory.context.deviceVersion = deviceVersion;
|
|
345
|
+
this.debugSuccessLog(`${this.device.deviceType}: ${this.accessory.displayName} deviceVersion: ${this.accessory.context.deviceVersion}`);
|
|
342
346
|
}
|
|
343
347
|
}
|
|
344
348
|
|