@switchbot/homebridge-switchbot 3.5.0-beta.39 → 3.5.0-beta.40
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.js +3 -3
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot.js +3 -3
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.js +3 -3
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.js +3 -3
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.js +3 -3
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.js +3 -3
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/device.js +8 -5
- package/dist/device/device.js.map +1 -1
- package/dist/device/fan.js +6 -6
- package/dist/device/fan.js.map +1 -1
- package/dist/device/hub.js +3 -3
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.js +3 -3
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.js +3 -3
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.js +3 -3
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.js +3 -3
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.js +3 -3
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.js +3 -3
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.js +3 -3
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.js +3 -3
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.js +3 -3
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.js +3 -3
- package/dist/device/waterdetector.js.map +1 -1
- package/dist/homebridge-ui/public/index.html +2 -2
- package/dist/irdevice/irdevice.js +6 -6
- package/dist/irdevice/irdevice.js.map +1 -1
- package/dist/platform.js +55 -55
- package/dist/platform.js.map +1 -1
- package/package.json +1 -1
- package/src/device/blindtilt.ts +3 -3
- package/src/device/bot.ts +3 -3
- package/src/device/ceilinglight.ts +3 -3
- package/src/device/colorbulb.ts +3 -3
- package/src/device/contact.ts +3 -3
- package/src/device/curtain.ts +3 -3
- package/src/device/device.ts +8 -5
- package/src/device/fan.ts +6 -6
- package/src/device/hub.ts +3 -3
- package/src/device/humidifier.ts +3 -3
- package/src/device/iosensor.ts +3 -3
- package/src/device/lightstrip.ts +3 -3
- package/src/device/lock.ts +3 -3
- package/src/device/meter.ts +3 -3
- package/src/device/meterplus.ts +3 -3
- package/src/device/motion.ts +3 -3
- package/src/device/plug.ts +3 -3
- package/src/device/robotvacuumcleaner.ts +3 -3
- package/src/device/waterdetector.ts +3 -3
- package/src/homebridge-ui/public/index.html +2 -2
- package/src/irdevice/irdevice.ts +6 -6
- package/src/platform.ts +55 -55
package/src/device/contact.ts
CHANGED
|
@@ -280,12 +280,12 @@ export class Contact extends deviceBase {
|
|
|
280
280
|
|
|
281
281
|
// FirmwareRevision
|
|
282
282
|
if (deviceStatus.body.version) {
|
|
283
|
-
this.accessory.context.
|
|
283
|
+
this.accessory.context.version = deviceStatus.body.version;
|
|
284
284
|
this.accessory
|
|
285
285
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
286
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.
|
|
286
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
287
287
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
288
|
-
.updateValue(this.accessory.context.
|
|
288
|
+
.updateValue(this.accessory.context.version);
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
|
package/src/device/curtain.ts
CHANGED
|
@@ -465,12 +465,12 @@ export class Curtain extends deviceBase {
|
|
|
465
465
|
|
|
466
466
|
// FirmwareRevision
|
|
467
467
|
if (deviceStatus.body.version) {
|
|
468
|
-
this.accessory.context.
|
|
468
|
+
this.accessory.context.version = deviceStatus.body.version;
|
|
469
469
|
this.accessory
|
|
470
470
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
471
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.
|
|
471
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
472
472
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
473
|
-
.updateValue(this.accessory.context.
|
|
473
|
+
.updateValue(this.accessory.context.version);
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
476
|
|
package/src/device/device.ts
CHANGED
|
@@ -70,7 +70,10 @@ export abstract class deviceBase {
|
|
|
70
70
|
.setCharacteristic(this.hap.Characteristic.Name, accessory.displayName)
|
|
71
71
|
.setCharacteristic(this.hap.Characteristic.ConfiguredName, accessory.context.name)
|
|
72
72
|
.setCharacteristic(this.hap.Characteristic.Model, accessory.context.model)
|
|
73
|
-
.setCharacteristic(this.hap.Characteristic.SerialNumber, accessory.context.deviceId)
|
|
73
|
+
.setCharacteristic(this.hap.Characteristic.SerialNumber, accessory.context.deviceId)
|
|
74
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, accessory.context.version)
|
|
75
|
+
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
76
|
+
.updateValue(accessory.context.version);
|
|
74
77
|
}
|
|
75
78
|
|
|
76
79
|
async getDeviceLogSettings(device: device & devicesConfig): Promise<void> {
|
|
@@ -544,12 +547,12 @@ export abstract class deviceBase {
|
|
|
544
547
|
accessory.context.deviceType = device.deviceType;
|
|
545
548
|
|
|
546
549
|
if (device.firmware) {
|
|
547
|
-
accessory.context.
|
|
548
|
-
} else if (device.firmware === undefined && device.version === undefined && accessory.context.
|
|
550
|
+
accessory.context.version = device.firmware;
|
|
551
|
+
} else if (device.firmware === undefined && device.version === undefined && accessory.context.version === undefined) {
|
|
549
552
|
device.version = this.platform.version;
|
|
550
|
-
accessory.context.
|
|
553
|
+
accessory.context.version = this.platform.version;
|
|
551
554
|
} else {
|
|
552
|
-
accessory.context.
|
|
555
|
+
accessory.context.version = device.version;
|
|
553
556
|
}
|
|
554
557
|
}
|
|
555
558
|
|
package/src/device/fan.ts
CHANGED
|
@@ -120,12 +120,12 @@ export class Fan extends deviceBase {
|
|
|
120
120
|
|
|
121
121
|
// FirmwareRevision
|
|
122
122
|
if (version) {
|
|
123
|
-
this.accessory.context.
|
|
123
|
+
this.accessory.context.version = version;
|
|
124
124
|
this.accessory
|
|
125
125
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
126
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.
|
|
126
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
127
127
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
128
|
-
.updateValue(this.accessory.context.
|
|
128
|
+
.updateValue(this.accessory.context.version);
|
|
129
129
|
}
|
|
130
130
|
this.updateHomeKitCharacteristics();
|
|
131
131
|
} catch (e: any) {
|
|
@@ -205,12 +205,12 @@ export class Fan extends deviceBase {
|
|
|
205
205
|
|
|
206
206
|
// FirmwareRevision
|
|
207
207
|
if (deviceStatus.body.version) {
|
|
208
|
-
this.accessory.context.
|
|
208
|
+
this.accessory.context.version = deviceStatus.body.version;
|
|
209
209
|
this.accessory
|
|
210
210
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
211
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.
|
|
211
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
212
212
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
213
|
-
.updateValue(this.accessory.context.
|
|
213
|
+
.updateValue(this.accessory.context.version);
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
|
package/src/device/hub.ts
CHANGED
|
@@ -218,12 +218,12 @@ export class Hub extends deviceBase {
|
|
|
218
218
|
|
|
219
219
|
// FirmwareRevision
|
|
220
220
|
if (deviceStatus.body.version) {
|
|
221
|
-
this.accessory.context.
|
|
221
|
+
this.accessory.context.version = deviceStatus.body.version;
|
|
222
222
|
this.accessory
|
|
223
223
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
224
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.
|
|
224
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
225
225
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
226
|
-
.updateValue(this.accessory.context.
|
|
226
|
+
.updateValue(this.accessory.context.version);
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
|
package/src/device/humidifier.ts
CHANGED
|
@@ -270,12 +270,12 @@ export class Humidifier extends deviceBase {
|
|
|
270
270
|
|
|
271
271
|
// FirmwareRevision
|
|
272
272
|
if (deviceStatus.body.version) {
|
|
273
|
-
this.accessory.context.
|
|
273
|
+
this.accessory.context.version = deviceStatus.body.version;
|
|
274
274
|
this.accessory
|
|
275
275
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
276
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.
|
|
276
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
277
277
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
278
|
-
.updateValue(this.accessory.context.
|
|
278
|
+
.updateValue(this.accessory.context.version);
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
|
package/src/device/iosensor.ts
CHANGED
|
@@ -229,12 +229,12 @@ export class IOSensor extends deviceBase {
|
|
|
229
229
|
}
|
|
230
230
|
// FirmwareRevision
|
|
231
231
|
if (deviceStatus.body.version) {
|
|
232
|
-
this.accessory.context.
|
|
232
|
+
this.accessory.context.version = deviceStatus.body.version;
|
|
233
233
|
this.accessory
|
|
234
234
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
235
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.
|
|
235
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
236
236
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
237
|
-
.updateValue(this.accessory.context.
|
|
237
|
+
.updateValue(this.accessory.context.version);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
|
package/src/device/lightstrip.ts
CHANGED
|
@@ -327,12 +327,12 @@ export class StripLight extends deviceBase {
|
|
|
327
327
|
|
|
328
328
|
// FirmwareRevision
|
|
329
329
|
if (deviceStatus.body.version) {
|
|
330
|
-
this.accessory.context.
|
|
330
|
+
this.accessory.context.version = deviceStatus.body.version;
|
|
331
331
|
this.accessory
|
|
332
332
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
333
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.
|
|
333
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
334
334
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
335
|
-
.updateValue(this.accessory.context.
|
|
335
|
+
.updateValue(this.accessory.context.version);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
|
package/src/device/lock.ts
CHANGED
|
@@ -257,12 +257,12 @@ export class Lock extends deviceBase {
|
|
|
257
257
|
|
|
258
258
|
// FirmwareRevision
|
|
259
259
|
if (deviceStatus.body.version) {
|
|
260
|
-
this.accessory.context.
|
|
260
|
+
this.accessory.context.version = deviceStatus.body.version;
|
|
261
261
|
this.accessory
|
|
262
262
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
263
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.
|
|
263
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
264
264
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
265
|
-
.updateValue(this.accessory.context.
|
|
265
|
+
.updateValue(this.accessory.context.version);
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
|
package/src/device/meter.ts
CHANGED
|
@@ -225,12 +225,12 @@ export class Meter extends deviceBase {
|
|
|
225
225
|
|
|
226
226
|
// FirmwareRevision
|
|
227
227
|
if (deviceStatus.body.version) {
|
|
228
|
-
this.accessory.context.
|
|
228
|
+
this.accessory.context.version = deviceStatus.body.version;
|
|
229
229
|
this.accessory
|
|
230
230
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
231
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.
|
|
231
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
232
232
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
233
|
-
.updateValue(this.accessory.context.
|
|
233
|
+
.updateValue(this.accessory.context.version);
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
|
package/src/device/meterplus.ts
CHANGED
|
@@ -226,12 +226,12 @@ export class MeterPlus extends deviceBase {
|
|
|
226
226
|
}
|
|
227
227
|
// FirmwareRevision
|
|
228
228
|
if (deviceStatus.body.version) {
|
|
229
|
-
this.accessory.context.
|
|
229
|
+
this.accessory.context.version = deviceStatus.body.version;
|
|
230
230
|
this.accessory
|
|
231
231
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
232
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.
|
|
232
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
233
233
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
234
|
-
.updateValue(this.accessory.context.
|
|
234
|
+
.updateValue(this.accessory.context.version);
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
|
package/src/device/motion.ts
CHANGED
|
@@ -201,12 +201,12 @@ export class Motion extends deviceBase {
|
|
|
201
201
|
|
|
202
202
|
// FirmwareRevision
|
|
203
203
|
if (deviceStatus.body.version) {
|
|
204
|
-
this.accessory.context.
|
|
204
|
+
this.accessory.context.version = deviceStatus.body.version;
|
|
205
205
|
this.accessory
|
|
206
206
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
207
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.
|
|
207
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
208
208
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
209
|
-
.updateValue(this.accessory.context.
|
|
209
|
+
.updateValue(this.accessory.context.version);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
|
package/src/device/plug.ts
CHANGED
|
@@ -131,12 +131,12 @@ export class Plug extends deviceBase {
|
|
|
131
131
|
|
|
132
132
|
// FirmwareRevision
|
|
133
133
|
if (deviceStatus.body.version) {
|
|
134
|
-
this.accessory.context.
|
|
134
|
+
this.accessory.context.version = deviceStatus.body.version;
|
|
135
135
|
this.accessory
|
|
136
136
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
137
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.
|
|
137
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
138
138
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
139
|
-
.updateValue(this.accessory.context.
|
|
139
|
+
.updateValue(this.accessory.context.version);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
|
|
@@ -200,12 +200,12 @@ export class RobotVacuumCleaner extends deviceBase {
|
|
|
200
200
|
|
|
201
201
|
// FirmwareRevision
|
|
202
202
|
if (deviceStatus.body.version) {
|
|
203
|
-
this.accessory.context.
|
|
203
|
+
this.accessory.context.version = deviceStatus.body.version;
|
|
204
204
|
this.accessory
|
|
205
205
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
206
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.
|
|
206
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
207
207
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
208
|
-
.updateValue(this.accessory.context.
|
|
208
|
+
.updateValue(this.accessory.context.version);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
|
|
@@ -167,12 +167,12 @@ export class WaterDetector extends deviceBase {
|
|
|
167
167
|
|
|
168
168
|
// FirmwareRevision
|
|
169
169
|
if (deviceStatus.body.version) {
|
|
170
|
-
this.accessory.context.
|
|
170
|
+
this.accessory.context.version = deviceStatus.body.version;
|
|
171
171
|
this.accessory
|
|
172
172
|
.getService(this.hap.Service.AccessoryInformation)!
|
|
173
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.
|
|
173
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, this.accessory.context.version)
|
|
174
174
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
175
|
-
.updateValue(this.accessory.context.
|
|
175
|
+
.updateValue(this.accessory.context.version);
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
</tr>
|
|
61
61
|
<tr>
|
|
62
62
|
<th scope="row">Firmware Version</th>
|
|
63
|
-
<td id="
|
|
63
|
+
<td id="version"></td>
|
|
64
64
|
</tr>
|
|
65
65
|
<tr>
|
|
66
66
|
<th scope="row">Device Type</th>
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
document.getElementById('displayName').innerHTML = thisAcc.displayName;
|
|
163
163
|
document.getElementById('deviceID').innerHTML = context.deviceID;
|
|
164
164
|
document.getElementById('model').innerHTML = context.model;
|
|
165
|
-
document.getElementById('
|
|
165
|
+
document.getElementById('version').innerHTML = context.version || 'N/A';
|
|
166
166
|
document.getElementById('deviceType').innerHTML = context.deviceType;
|
|
167
167
|
document.getElementById('connectionType').innerHTML = context.connectionType;
|
|
168
168
|
document.getElementById('deviceTable').style.display = 'inline-table';
|
package/src/irdevice/irdevice.ts
CHANGED
|
@@ -43,9 +43,9 @@ export abstract class irdeviceBase {
|
|
|
43
43
|
.setCharacteristic(this.hap.Characteristic.ConfiguredName, accessory.context.name)
|
|
44
44
|
.setCharacteristic(this.hap.Characteristic.Model, accessory.context.model)
|
|
45
45
|
.setCharacteristic(this.hap.Characteristic.SerialNumber, accessory.context.deviceId)
|
|
46
|
-
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, accessory.context.
|
|
46
|
+
.setCharacteristic(this.hap.Characteristic.FirmwareRevision, accessory.context.firmware)
|
|
47
47
|
.getCharacteristic(this.hap.Characteristic.FirmwareRevision)
|
|
48
|
-
.updateValue(accessory.context.
|
|
48
|
+
.updateValue(accessory.context.firmware);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
async getDeviceLogSettings(device: irdevice & irDevicesConfig): Promise<void> {
|
|
@@ -326,12 +326,12 @@ export abstract class irdeviceBase {
|
|
|
326
326
|
accessory.context.deviceId = device.deviceId;
|
|
327
327
|
accessory.context.remoteType = device.remoteType;
|
|
328
328
|
if (device.firmware) {
|
|
329
|
-
accessory.context.
|
|
330
|
-
} else if (device.firmware === undefined || accessory.context.
|
|
329
|
+
accessory.context.firmware = device.firmware;
|
|
330
|
+
} else if (device.firmware === undefined || accessory.context.firmware === undefined) {
|
|
331
331
|
device.firmware = this.platform.version;
|
|
332
|
-
accessory.context.
|
|
332
|
+
accessory.context.firmware = device.firmware;
|
|
333
333
|
} else {
|
|
334
|
-
accessory.context.
|
|
334
|
+
accessory.context.firmware = 'Unknown';
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
337
|
|