@switchbot/homebridge-switchbot 3.5.0-beta.40 → 3.5.0-beta.42
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 +2 -1
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +2 -1
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +2 -1
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +2 -1
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +2 -1
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +2 -1
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/device.js +1 -2
- package/dist/device/device.js.map +1 -1
- package/dist/device/fan.d.ts.map +1 -1
- package/dist/device/fan.js +3 -2
- package/dist/device/fan.js.map +1 -1
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +2 -1
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +2 -1
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.d.ts.map +1 -1
- package/dist/device/iosensor.js +2 -1
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.d.ts.map +1 -1
- package/dist/device/lightstrip.js +2 -1
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +2 -1
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +2 -1
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +2 -1
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +2 -1
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +2 -1
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
- package/dist/device/robotvacuumcleaner.js +2 -1
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.d.ts.map +1 -1
- package/dist/device/waterdetector.js +2 -1
- package/dist/device/waterdetector.js.map +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +1 -0
- package/dist/platform.js.map +1 -1
- package/package.json +1 -1
- package/src/device/blindtilt.ts +2 -1
- package/src/device/bot.ts +2 -1
- package/src/device/ceilinglight.ts +2 -1
- package/src/device/colorbulb.ts +2 -1
- package/src/device/contact.ts +2 -1
- package/src/device/curtain.ts +2 -1
- package/src/device/device.ts +1 -2
- package/src/device/fan.ts +3 -2
- package/src/device/hub.ts +2 -1
- package/src/device/humidifier.ts +2 -1
- package/src/device/iosensor.ts +2 -1
- package/src/device/lightstrip.ts +2 -1
- package/src/device/lock.ts +2 -1
- package/src/device/meter.ts +2 -1
- package/src/device/meterplus.ts +2 -1
- package/src/device/motion.ts +2 -1
- package/src/device/plug.ts +2 -1
- package/src/device/robotvacuumcleaner.ts +2 -1
- package/src/device/waterdetector.ts +2 -1
- package/src/platform.ts +1 -0
package/src/device/device.ts
CHANGED
|
@@ -72,8 +72,7 @@ export abstract class deviceBase {
|
|
|
72
72
|
.setCharacteristic(this.hap.Characteristic.Model, accessory.context.model)
|
|
73
73
|
.setCharacteristic(this.hap.Characteristic.SerialNumber, accessory.context.deviceId)
|
|
74
74
|
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, accessory.context.version)
|
|
75
|
-
.
|
|
76
|
-
.updateValue(accessory.context.version);
|
|
75
|
+
.setCharacteristic(this.hap.Characteristic.HardwareRevision, accessory.context.version);
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
async getDeviceLogSettings(device: device & devicesConfig): Promise<void> {
|
package/src/device/fan.ts
CHANGED
|
@@ -118,7 +118,7 @@ export class Fan extends deviceBase {
|
|
|
118
118
|
// BatteryLevel
|
|
119
119
|
this.Battery.BatteryLevel = battery;
|
|
120
120
|
|
|
121
|
-
//
|
|
121
|
+
// Firmware Version
|
|
122
122
|
if (version) {
|
|
123
123
|
this.accessory.context.version = version;
|
|
124
124
|
this.accessory
|
|
@@ -203,7 +203,8 @@ export class Fan extends deviceBase {
|
|
|
203
203
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} BatteryLevel: ${this.Battery.BatteryLevel},`
|
|
204
204
|
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
205
205
|
|
|
206
|
-
//
|
|
206
|
+
// Firmware Version
|
|
207
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
|
|
207
208
|
if (deviceStatus.body.version) {
|
|
208
209
|
this.accessory.context.version = deviceStatus.body.version;
|
|
209
210
|
this.accessory
|
package/src/device/hub.ts
CHANGED
|
@@ -216,7 +216,8 @@ export class Hub extends deviceBase {
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
//
|
|
219
|
+
// Firmware Version
|
|
220
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
|
|
220
221
|
if (deviceStatus.body.version) {
|
|
221
222
|
this.accessory.context.version = deviceStatus.body.version;
|
|
222
223
|
this.accessory
|
package/src/device/humidifier.ts
CHANGED
|
@@ -268,7 +268,8 @@ export class Humidifier extends deviceBase {
|
|
|
268
268
|
}
|
|
269
269
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} WaterLevel: ${this.HumidifierDehumidifier.WaterLevel}`);
|
|
270
270
|
|
|
271
|
-
//
|
|
271
|
+
// Firmware Version
|
|
272
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
|
|
272
273
|
if (deviceStatus.body.version) {
|
|
273
274
|
this.accessory.context.version = deviceStatus.body.version;
|
|
274
275
|
this.accessory
|
package/src/device/iosensor.ts
CHANGED
|
@@ -227,7 +227,8 @@ export class IOSensor extends deviceBase {
|
|
|
227
227
|
this.TemperatureSensor!.CurrentTemperature = deviceStatus.body.temperature!;
|
|
228
228
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Temperature: ${this.TemperatureSensor!.CurrentTemperature}°c`);
|
|
229
229
|
}
|
|
230
|
-
//
|
|
230
|
+
// Firmware Version
|
|
231
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
|
|
231
232
|
if (deviceStatus.body.version) {
|
|
232
233
|
this.accessory.context.version = deviceStatus.body.version;
|
|
233
234
|
this.accessory
|
package/src/device/lightstrip.ts
CHANGED
|
@@ -325,7 +325,8 @@ export class StripLight extends deviceBase {
|
|
|
325
325
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Saturation: ${this.LightBulb.Saturation}`);
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
//
|
|
328
|
+
// Firmware Version
|
|
329
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
|
|
329
330
|
if (deviceStatus.body.version) {
|
|
330
331
|
this.accessory.context.version = deviceStatus.body.version;
|
|
331
332
|
this.accessory
|
package/src/device/lock.ts
CHANGED
|
@@ -255,7 +255,8 @@ export class Lock extends deviceBase {
|
|
|
255
255
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} BatteryLevel: ${this.Battery.BatteryLevel},`
|
|
256
256
|
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
257
257
|
|
|
258
|
-
//
|
|
258
|
+
// Firmware Version
|
|
259
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
|
|
259
260
|
if (deviceStatus.body.version) {
|
|
260
261
|
this.accessory.context.version = deviceStatus.body.version;
|
|
261
262
|
this.accessory
|
package/src/device/meter.ts
CHANGED
|
@@ -223,7 +223,8 @@ export class Meter extends deviceBase {
|
|
|
223
223
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Temperature: ${this.TemperatureSensor!.CurrentTemperature}°c`);
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
//
|
|
226
|
+
// Firmware Version
|
|
227
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
|
|
227
228
|
if (deviceStatus.body.version) {
|
|
228
229
|
this.accessory.context.version = deviceStatus.body.version;
|
|
229
230
|
this.accessory
|
package/src/device/meterplus.ts
CHANGED
|
@@ -224,7 +224,8 @@ export class MeterPlus extends deviceBase {
|
|
|
224
224
|
this.TemperatureSensor!.CurrentTemperature = deviceStatus.body.temperature!;
|
|
225
225
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Temperature: ${this.TemperatureSensor!.CurrentTemperature}°c`);
|
|
226
226
|
}
|
|
227
|
-
//
|
|
227
|
+
// Firmware Version
|
|
228
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
|
|
228
229
|
if (deviceStatus.body.version) {
|
|
229
230
|
this.accessory.context.version = deviceStatus.body.version;
|
|
230
231
|
this.accessory
|
package/src/device/motion.ts
CHANGED
|
@@ -199,7 +199,8 @@ export class Motion extends deviceBase {
|
|
|
199
199
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} BatteryLevel: ${this.Battery.BatteryLevel},`
|
|
200
200
|
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
201
201
|
|
|
202
|
-
//
|
|
202
|
+
// Firmware Version
|
|
203
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
|
|
203
204
|
if (deviceStatus.body.version) {
|
|
204
205
|
this.accessory.context.version = deviceStatus.body.version;
|
|
205
206
|
this.accessory
|
package/src/device/plug.ts
CHANGED
|
@@ -129,7 +129,8 @@ export class Plug extends deviceBase {
|
|
|
129
129
|
}
|
|
130
130
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} On: ${this.Outlet.On}`);
|
|
131
131
|
|
|
132
|
-
//
|
|
132
|
+
// Firmware Version
|
|
133
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
|
|
133
134
|
if (deviceStatus.body.version) {
|
|
134
135
|
this.accessory.context.version = deviceStatus.body.version;
|
|
135
136
|
this.accessory
|
|
@@ -198,7 +198,8 @@ export class RobotVacuumCleaner extends deviceBase {
|
|
|
198
198
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} BatteryLevel: ${this.Battery.BatteryLevel},`
|
|
199
199
|
+ ` StatusLowBattery: ${this.Battery.StatusLowBattery}`);
|
|
200
200
|
|
|
201
|
-
//
|
|
201
|
+
// Firmware Version
|
|
202
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
|
|
202
203
|
if (deviceStatus.body.version) {
|
|
203
204
|
this.accessory.context.version = deviceStatus.body.version;
|
|
204
205
|
this.accessory
|
|
@@ -165,7 +165,8 @@ export class WaterDetector extends deviceBase {
|
|
|
165
165
|
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} LeakDetected: ${this.LeakSensor!.LeakDetected}`);
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
//
|
|
168
|
+
// Firmware Version
|
|
169
|
+
this.debugLog(`${this.device.deviceType}: ${this.accessory.displayName} Firmware Version: ${deviceStatus.body.version}`);
|
|
169
170
|
if (deviceStatus.body.version) {
|
|
170
171
|
this.accessory.context.version = deviceStatus.body.version;
|
|
171
172
|
this.accessory
|
package/src/platform.ts
CHANGED
|
@@ -1654,6 +1654,7 @@ export class SwitchBotPlatform implements DynamicPlatformPlugin {
|
|
|
1654
1654
|
existingAccessory.context.model = device.deviceType;
|
|
1655
1655
|
existingAccessory.context.deviceID = device.deviceId;
|
|
1656
1656
|
existingAccessory.displayName = device.configDeviceName || device.deviceName;
|
|
1657
|
+
this.warnLog(`${existingAccessory.displayName} version: ${device.version} firmware: ${device.firmware}`);
|
|
1657
1658
|
if (device.version && !device.firmware) {
|
|
1658
1659
|
existingAccessory.context.version = device.version;
|
|
1659
1660
|
}
|