@camstack/addon-provider-reolink 1.2.32 → 1.2.33
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/addon.js +22 -0
- package/dist/addon.mjs +22 -0
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -231002,6 +231002,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
231002
231002
|
tags: { deviceId: this.id },
|
|
231003
231003
|
meta: { confirmTimeoutMs: CONFIRM_TIMEOUT_MS }
|
|
231004
231004
|
});
|
|
231005
|
+
this.emitWakeSettled();
|
|
231005
231006
|
return {
|
|
231006
231007
|
awoke: false,
|
|
231007
231008
|
durationMs: Date.now() - startedAt
|
|
@@ -231019,6 +231020,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
231019
231020
|
error: err instanceof Error ? err.message : String(err)
|
|
231020
231021
|
}
|
|
231021
231022
|
});
|
|
231023
|
+
this.emitWakeSettled();
|
|
231022
231024
|
return {
|
|
231023
231025
|
awoke: false,
|
|
231024
231026
|
durationMs: Date.now() - startedAt
|
|
@@ -231184,6 +231186,26 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
231184
231186
|
this.lastProactiveWakeAt = Date.now();
|
|
231185
231187
|
}
|
|
231186
231188
|
/**
|
|
231189
|
+
* Close the transient "waking" window on a wake that did NOT produce a
|
|
231190
|
+
* committed transition (ACK with no awake evidence, or a timeout).
|
|
231191
|
+
* `BatteryOnWakeStarted` opens it; normally the `sleeping: false` commit
|
|
231192
|
+
* closes it via `BatteryOnStatusChanged` — but a failed wake changes no
|
|
231193
|
+
* state, so nothing ever closes it, and listeners (the snapshot overlay,
|
|
231194
|
+
* the broker's "WAKING UP" placeholder) kept showing WAKING for the whole
|
|
231195
|
+
* 35 s TTL after the answer was already known (2026-08-15: the overlay
|
|
231196
|
+
* flapped sleeping↔waking on every retry — read as "random"). Re-asserting
|
|
231197
|
+
* the unchanged slice still emits the event (the runtime-state bridge
|
|
231198
|
+
* re-emits per WRITE), which is exactly the "wake is over, nothing came of
|
|
231199
|
+
* it" signal those windows listen for.
|
|
231200
|
+
*/
|
|
231201
|
+
emitWakeSettled() {
|
|
231202
|
+
if (!this.isBattery) return;
|
|
231203
|
+
this.ctx.eventBus.emit(createEvent(EventCategory.BatteryOnStatusChanged, this.eventSource(), {
|
|
231204
|
+
deviceId: this.id,
|
|
231205
|
+
status: this.state.battery
|
|
231206
|
+
}));
|
|
231207
|
+
}
|
|
231208
|
+
/**
|
|
231187
231209
|
* Gate for a PROACTIVE camera read, checked BEFORE `ensureApi()`.
|
|
231188
231210
|
*
|
|
231189
231211
|
* The login itself is the wake. On a sleeping UDP/battery camera the
|
package/dist/addon.mjs
CHANGED
|
@@ -230982,6 +230982,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
230982
230982
|
tags: { deviceId: this.id },
|
|
230983
230983
|
meta: { confirmTimeoutMs: CONFIRM_TIMEOUT_MS }
|
|
230984
230984
|
});
|
|
230985
|
+
this.emitWakeSettled();
|
|
230985
230986
|
return {
|
|
230986
230987
|
awoke: false,
|
|
230987
230988
|
durationMs: Date.now() - startedAt
|
|
@@ -230999,6 +231000,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
230999
231000
|
error: err instanceof Error ? err.message : String(err)
|
|
231000
231001
|
}
|
|
231001
231002
|
});
|
|
231003
|
+
this.emitWakeSettled();
|
|
231002
231004
|
return {
|
|
231003
231005
|
awoke: false,
|
|
231004
231006
|
durationMs: Date.now() - startedAt
|
|
@@ -231164,6 +231166,26 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
231164
231166
|
this.lastProactiveWakeAt = Date.now();
|
|
231165
231167
|
}
|
|
231166
231168
|
/**
|
|
231169
|
+
* Close the transient "waking" window on a wake that did NOT produce a
|
|
231170
|
+
* committed transition (ACK with no awake evidence, or a timeout).
|
|
231171
|
+
* `BatteryOnWakeStarted` opens it; normally the `sleeping: false` commit
|
|
231172
|
+
* closes it via `BatteryOnStatusChanged` — but a failed wake changes no
|
|
231173
|
+
* state, so nothing ever closes it, and listeners (the snapshot overlay,
|
|
231174
|
+
* the broker's "WAKING UP" placeholder) kept showing WAKING for the whole
|
|
231175
|
+
* 35 s TTL after the answer was already known (2026-08-15: the overlay
|
|
231176
|
+
* flapped sleeping↔waking on every retry — read as "random"). Re-asserting
|
|
231177
|
+
* the unchanged slice still emits the event (the runtime-state bridge
|
|
231178
|
+
* re-emits per WRITE), which is exactly the "wake is over, nothing came of
|
|
231179
|
+
* it" signal those windows listen for.
|
|
231180
|
+
*/
|
|
231181
|
+
emitWakeSettled() {
|
|
231182
|
+
if (!this.isBattery) return;
|
|
231183
|
+
this.ctx.eventBus.emit(createEvent(EventCategory.BatteryOnStatusChanged, this.eventSource(), {
|
|
231184
|
+
deviceId: this.id,
|
|
231185
|
+
status: this.state.battery
|
|
231186
|
+
}));
|
|
231187
|
+
}
|
|
231188
|
+
/**
|
|
231167
231189
|
* Gate for a PROACTIVE camera read, checked BEFORE `ensureApi()`.
|
|
231168
231190
|
*
|
|
231169
231191
|
* The login itself is the wake. On a sleeping UDP/battery camera the
|