@homebridge-plugins/homebridge-ewelink 12.18.2-beta.0 → 12.18.2-beta.2
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/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,8 @@ All notable changes to `@homebridge-plugins/homebridge-ewelink` will be document
|
|
|
15
15
|
- fix: survive a network change on the lan discovery socket instead of crashing the bridge
|
|
16
16
|
- fix: set a garage's sensor up after the garage, so it gets its open and closed feedback
|
|
17
17
|
- fix: make the per-device logging override settable, and drop the debug option that never was
|
|
18
|
+
- fix: move the two-door garage one door at a time, so the second is not cut short
|
|
19
|
+
- fix: stop the lan discovery printing straight to the console, whatever the log level
|
|
18
20
|
|
|
19
21
|
## v12.18.1 (2026-08-02)
|
|
20
22
|
|
|
@@ -232,10 +232,15 @@ export default class {
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
externalUpdate(params) {
|
|
235
|
+
async externalUpdate(params) {
|
|
236
236
|
try {
|
|
237
237
|
if (params.switches?.length >= 4 && !this.inUse) {
|
|
238
|
-
|
|
238
|
+
// One door at a time. This was a `forEach(async ...)`, so both doors ran
|
|
239
|
+
// at once over a shared `this.inUse` flag - door one cleared it two
|
|
240
|
+
// seconds in while door two was still moving, defeating the guard - and a
|
|
241
|
+
// rejection from the awaits below escaped the try above rather than being
|
|
242
|
+
// caught by it, because the callback's promise was thrown away.
|
|
243
|
+
for (const v of ['1', '2']) {
|
|
239
244
|
const gcService = this.accessory.getService(`Garage ${v}`)
|
|
240
245
|
const prevState = v === '1'
|
|
241
246
|
? this.accessory.context.cacheOneCurrentDoorState
|
|
@@ -247,7 +252,7 @@ export default class {
|
|
|
247
252
|
params.switches[0].switch === params.switches[1].switch
|
|
248
253
|
|| params.switches[prevState % 2].switch === 'on'
|
|
249
254
|
) {
|
|
250
|
-
|
|
255
|
+
continue
|
|
251
256
|
}
|
|
252
257
|
break
|
|
253
258
|
case '2':
|
|
@@ -255,11 +260,11 @@ export default class {
|
|
|
255
260
|
params.switches[2].switch === params.switches[3].switch
|
|
256
261
|
|| params.switches[(prevState % 2) + 2].switch === 'on'
|
|
257
262
|
) {
|
|
258
|
-
|
|
263
|
+
continue
|
|
259
264
|
}
|
|
260
265
|
break
|
|
261
266
|
default:
|
|
262
|
-
|
|
267
|
+
continue
|
|
263
268
|
}
|
|
264
269
|
this.inUse = true
|
|
265
270
|
gcService.updateCharacteristic(this.hapChar.TargetDoorState, newPos - 2)
|
|
@@ -274,7 +279,7 @@ export default class {
|
|
|
274
279
|
this.accessory.context.cacheTwoTargetDoorState = newPos - 2
|
|
275
280
|
break
|
|
276
281
|
default:
|
|
277
|
-
|
|
282
|
+
continue
|
|
278
283
|
}
|
|
279
284
|
await sleep(2000)
|
|
280
285
|
this.inUse = false
|
|
@@ -306,7 +311,7 @@ export default class {
|
|
|
306
311
|
break
|
|
307
312
|
default:
|
|
308
313
|
}
|
|
309
|
-
}
|
|
314
|
+
}
|
|
310
315
|
}
|
|
311
316
|
|
|
312
317
|
// Get the power readings given by certain devices
|
|
@@ -432,9 +432,11 @@ DnsSd.prototype._addMembership = function () {
|
|
|
432
432
|
this._source_address_list.forEach((netif) => {
|
|
433
433
|
try {
|
|
434
434
|
this._udp.addMembership(this._MULTICAST_ADDR, netif)
|
|
435
|
-
} catch
|
|
436
|
-
//
|
|
437
|
-
|
|
435
|
+
} catch {
|
|
436
|
+
// Adding the membership twice is normal when more than one interface
|
|
437
|
+
// resolves to the same address, and there is nothing the owner can do about
|
|
438
|
+
// it. This used to console.log, which bypasses Homebridge's logger entirely
|
|
439
|
+
// and so printed whatever the log level was set to.
|
|
438
440
|
}
|
|
439
441
|
})
|
|
440
442
|
}
|
|
@@ -443,9 +445,8 @@ DnsSd.prototype._dropMembership = function () {
|
|
|
443
445
|
this._source_address_list.forEach((netif) => {
|
|
444
446
|
try {
|
|
445
447
|
this._udp.dropMembership(this._MULTICAST_ADDR, netif)
|
|
446
|
-
} catch
|
|
447
|
-
//
|
|
448
|
-
console.log(`Catching error on dropMembership: ${JSON.stringify(e)}`)
|
|
448
|
+
} catch {
|
|
449
|
+
// Dropping a membership that was never added throws, and does not matter
|
|
449
450
|
}
|
|
450
451
|
})
|
|
451
452
|
}
|
package/package.json
CHANGED