@camstack/addon-provider-reolink 1.2.249 → 1.2.250
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 +6 -0
- package/dist/addon.js +38 -2
- package/dist/addon.mjs +38 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.250] - 2026-11-20
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- A Reolink battery camera that is being recorded or watched now stays awake: a firmware sleep notification no longer cuts its live stream while a consumer is attached
|
|
15
|
+
|
|
10
16
|
## [1.2.249] - 2026-11-20
|
|
11
17
|
|
|
12
18
|
### Changed
|
package/dist/addon.js
CHANGED
|
@@ -124709,7 +124709,7 @@ function sleep(ms) {
|
|
|
124709
124709
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
124710
124710
|
}
|
|
124711
124711
|
//#endregion
|
|
124712
|
-
//#region ../types/dist/implemented-methods-
|
|
124712
|
+
//#region ../types/dist/implemented-methods-GRoJIvYs.mjs
|
|
124713
124713
|
/**
|
|
124714
124714
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
124715
124715
|
*
|
|
@@ -125712,6 +125712,19 @@ var HelperSpecSchema = discriminatedUnion("kind", [
|
|
|
125712
125712
|
publishedProfiles: array(_enum(GRID_PROFILES)).max(3),
|
|
125713
125713
|
cells: array(GridCellSpecSchema).max(16)
|
|
125714
125714
|
}),
|
|
125715
|
+
object({
|
|
125716
|
+
kind: literal("crop"),
|
|
125717
|
+
source: CompositionSourceRefSchema,
|
|
125718
|
+
rect: GridRectSchema,
|
|
125719
|
+
aspect: _enum([
|
|
125720
|
+
"16:9",
|
|
125721
|
+
"4:3",
|
|
125722
|
+
"1:1",
|
|
125723
|
+
"free"
|
|
125724
|
+
]),
|
|
125725
|
+
fps: number$1().int().min(1).max(60),
|
|
125726
|
+
publishedProfiles: array(_enum(GRID_PROFILES)).max(3)
|
|
125727
|
+
}),
|
|
125715
125728
|
object({
|
|
125716
125729
|
kind: literal("terminal"),
|
|
125717
125730
|
terminalId: string().uuid()
|
|
@@ -217020,7 +217033,7 @@ DeviceFeature.BatteryOperated, DeviceFeature.Sleeps, derived("low-power-sleep",
|
|
|
217020
217033
|
"startTalkSession",
|
|
217021
217034
|
"pushTalkAudio",
|
|
217022
217035
|
"endTalkSession"
|
|
217023
|
-
]), DeviceFeature.PanTiltZoom, derived("ptz"), DeviceFeature.PtzAutotrack, derived("ptz-autotrack"), DeviceFeature.MotionTrigger, derived("motion-trigger", ["setMotionTrigger"]), DeviceFeature.TimedRun, derived("timed-run", ["runFor"]), DeviceFeature.Switch, DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired, DeviceFeature.ClimateDualSetpoint, DeviceFeature.ClimateHumidity, DeviceFeature.ClimateFanMode, DeviceFeature.ClimatePreset, DeviceFeature.ClimateSwingVertical, DeviceFeature.ClimateSwingHorizontal, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.CoverStoppable, DeviceFeature.ValvePositionable, DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.LockOpen, DeviceFeature.MediaPlayerSeek, DeviceFeature.MediaPlayerVolume, DeviceFeature.MediaPlayerMute, DeviceFeature.MediaPlayerShuffle, DeviceFeature.MediaPlayerRepeat, DeviceFeature.MediaPlayerSelectSource, DeviceFeature.MediaPlayerPlayMedia, DeviceFeature.MediaPlayerNext, DeviceFeature.MediaPlayerPrevious, DeviceFeature.MediaPlayerStop, DeviceFeature.MediaPlayerVolumeStep, DeviceFeature.MediaPlayerChannelStep, DeviceFeature.MediaPlayerPower, DeviceFeature.PresenceGps, DeviceFeature.NotifierImage, DeviceFeature.NotifierPriority, DeviceFeature.NotifierData, DeviceFeature.NotifierActions, DeviceFeature.NotifierRecipients, DeviceFeature.ScriptVariables, DeviceFeature.AutomationSkipCondition, DeviceFeature.VacuumHasAi, DeviceFeature.MowerHasTargetedMowing, DeviceFeature.Navigation, derived("navigation"), DeviceFeature.NetworkLink, derived("network-link");
|
|
217036
|
+
]), DeviceFeature.PanTiltZoom, derived("ptz"), DeviceFeature.PtzAutotrack, derived("ptz-autotrack"), DeviceFeature.MotionTrigger, derived("motion-trigger", ["setMotionTrigger"]), DeviceFeature.TimedRun, derived("timed-run", ["runFor"]), DeviceFeature.Switch, DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired, DeviceFeature.ClimateDualSetpoint, DeviceFeature.ClimateHumidity, DeviceFeature.ClimateFanMode, DeviceFeature.ClimatePreset, DeviceFeature.ClimateSwingVertical, DeviceFeature.ClimateSwingHorizontal, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.CoverStoppable, DeviceFeature.ValvePositionable, derived("valve", ["setPosition"]), DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.LockOpen, DeviceFeature.MediaPlayerSeek, DeviceFeature.MediaPlayerVolume, DeviceFeature.MediaPlayerMute, DeviceFeature.MediaPlayerShuffle, DeviceFeature.MediaPlayerRepeat, DeviceFeature.MediaPlayerSelectSource, DeviceFeature.MediaPlayerPlayMedia, DeviceFeature.MediaPlayerNext, DeviceFeature.MediaPlayerPrevious, DeviceFeature.MediaPlayerStop, DeviceFeature.MediaPlayerVolumeStep, DeviceFeature.MediaPlayerChannelStep, DeviceFeature.MediaPlayerPower, DeviceFeature.PresenceGps, DeviceFeature.NotifierImage, DeviceFeature.NotifierPriority, DeviceFeature.NotifierData, DeviceFeature.NotifierActions, DeviceFeature.NotifierRecipients, DeviceFeature.ScriptVariables, DeviceFeature.AutomationSkipCondition, DeviceFeature.VacuumHasAi, DeviceFeature.MowerHasTargetedMowing, DeviceFeature.Navigation, derived("navigation"), DeviceFeature.NetworkLink, derived("network-link");
|
|
217024
217037
|
var ALL_FEATURES = Object.values(DeviceFeature);
|
|
217025
217038
|
new Set(ALL_FEATURES);
|
|
217026
217039
|
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
@@ -231068,6 +231081,16 @@ function decideSleepCommit(input) {
|
|
|
231068
231081
|
stampFirstHand: source !== "hub-reconcile"
|
|
231069
231082
|
};
|
|
231070
231083
|
}
|
|
231084
|
+
/**
|
|
231085
|
+
* A firmware `sleeping` push is ignored while a consumer (the recorder,
|
|
231086
|
+
* a live view) holds an RFC 4571 server on the camera. Teardown on that
|
|
231087
|
+
* push is what cut a recorded battery camera into 40–110 s gaps: the
|
|
231088
|
+
* broker only re-dialled ~20 s after we closed the stream. With no
|
|
231089
|
+
* consumer the push is acted on exactly as before.
|
|
231090
|
+
*/
|
|
231091
|
+
function shouldIgnoreSleepPush(input) {
|
|
231092
|
+
return input.activeStreams > 0;
|
|
231093
|
+
}
|
|
231071
231094
|
//#endregion
|
|
231072
231095
|
//#region src/snapshot-wake-gate.ts
|
|
231073
231096
|
/**
|
|
@@ -234781,6 +234804,8 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
234781
234804
|
* `sleep-state-decision.ts` for the measurement (D603).
|
|
234782
234805
|
*/
|
|
234783
234806
|
sleepStateChangedAt = 0;
|
|
234807
|
+
/** True once the 'sleep push ignored' line was logged for the current consumer-attached stretch. */
|
|
234808
|
+
sleepPushIgnoreLogged = false;
|
|
234784
234809
|
/**
|
|
234785
234810
|
* Wall-clock ms of the last PROACTIVE wake — one we issued on our own
|
|
234786
234811
|
* initiative (background snapshot refresh), not because the operator
|
|
@@ -242300,6 +242325,17 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
242300
242325
|
return;
|
|
242301
242326
|
}
|
|
242302
242327
|
if (event.type === "sleeping") {
|
|
242328
|
+
if (this.isBattery && shouldIgnoreSleepPush({ activeStreams: this.active.size })) {
|
|
242329
|
+
if (!this.sleepPushIgnoreLogged) {
|
|
242330
|
+
this.sleepPushIgnoreLogged = true;
|
|
242331
|
+
this.ctx.logger.info(`sleep push ignored: ${this.active.size} active stream consumer(s)`, {
|
|
242332
|
+
tags: { deviceId: this.id },
|
|
242333
|
+
meta: { activeStreams: this.active.size }
|
|
242334
|
+
});
|
|
242335
|
+
}
|
|
242336
|
+
return;
|
|
242337
|
+
}
|
|
242338
|
+
this.sleepPushIgnoreLogged = false;
|
|
242303
242339
|
const wasSleeping = this.sleeping;
|
|
242304
242340
|
if (!this.commitSleepState(true, "simple-event")) return;
|
|
242305
242341
|
if (!wasSleeping) this.ctx.eventBus.emit(createEvent(EventCategory.DeviceSleeping, eventSource, {
|
package/dist/addon.mjs
CHANGED
|
@@ -124701,7 +124701,7 @@ function sleep(ms) {
|
|
|
124701
124701
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
124702
124702
|
}
|
|
124703
124703
|
//#endregion
|
|
124704
|
-
//#region ../types/dist/implemented-methods-
|
|
124704
|
+
//#region ../types/dist/implemented-methods-GRoJIvYs.mjs
|
|
124705
124705
|
/**
|
|
124706
124706
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
124707
124707
|
*
|
|
@@ -125704,6 +125704,19 @@ var HelperSpecSchema = discriminatedUnion("kind", [
|
|
|
125704
125704
|
publishedProfiles: array(_enum(GRID_PROFILES)).max(3),
|
|
125705
125705
|
cells: array(GridCellSpecSchema).max(16)
|
|
125706
125706
|
}),
|
|
125707
|
+
object({
|
|
125708
|
+
kind: literal("crop"),
|
|
125709
|
+
source: CompositionSourceRefSchema,
|
|
125710
|
+
rect: GridRectSchema,
|
|
125711
|
+
aspect: _enum([
|
|
125712
|
+
"16:9",
|
|
125713
|
+
"4:3",
|
|
125714
|
+
"1:1",
|
|
125715
|
+
"free"
|
|
125716
|
+
]),
|
|
125717
|
+
fps: number$1().int().min(1).max(60),
|
|
125718
|
+
publishedProfiles: array(_enum(GRID_PROFILES)).max(3)
|
|
125719
|
+
}),
|
|
125707
125720
|
object({
|
|
125708
125721
|
kind: literal("terminal"),
|
|
125709
125722
|
terminalId: string().uuid()
|
|
@@ -217012,7 +217025,7 @@ DeviceFeature.BatteryOperated, DeviceFeature.Sleeps, derived("low-power-sleep",
|
|
|
217012
217025
|
"startTalkSession",
|
|
217013
217026
|
"pushTalkAudio",
|
|
217014
217027
|
"endTalkSession"
|
|
217015
|
-
]), DeviceFeature.PanTiltZoom, derived("ptz"), DeviceFeature.PtzAutotrack, derived("ptz-autotrack"), DeviceFeature.MotionTrigger, derived("motion-trigger", ["setMotionTrigger"]), DeviceFeature.TimedRun, derived("timed-run", ["runFor"]), DeviceFeature.Switch, DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired, DeviceFeature.ClimateDualSetpoint, DeviceFeature.ClimateHumidity, DeviceFeature.ClimateFanMode, DeviceFeature.ClimatePreset, DeviceFeature.ClimateSwingVertical, DeviceFeature.ClimateSwingHorizontal, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.CoverStoppable, DeviceFeature.ValvePositionable, DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.LockOpen, DeviceFeature.MediaPlayerSeek, DeviceFeature.MediaPlayerVolume, DeviceFeature.MediaPlayerMute, DeviceFeature.MediaPlayerShuffle, DeviceFeature.MediaPlayerRepeat, DeviceFeature.MediaPlayerSelectSource, DeviceFeature.MediaPlayerPlayMedia, DeviceFeature.MediaPlayerNext, DeviceFeature.MediaPlayerPrevious, DeviceFeature.MediaPlayerStop, DeviceFeature.MediaPlayerVolumeStep, DeviceFeature.MediaPlayerChannelStep, DeviceFeature.MediaPlayerPower, DeviceFeature.PresenceGps, DeviceFeature.NotifierImage, DeviceFeature.NotifierPriority, DeviceFeature.NotifierData, DeviceFeature.NotifierActions, DeviceFeature.NotifierRecipients, DeviceFeature.ScriptVariables, DeviceFeature.AutomationSkipCondition, DeviceFeature.VacuumHasAi, DeviceFeature.MowerHasTargetedMowing, DeviceFeature.Navigation, derived("navigation"), DeviceFeature.NetworkLink, derived("network-link");
|
|
217028
|
+
]), DeviceFeature.PanTiltZoom, derived("ptz"), DeviceFeature.PtzAutotrack, derived("ptz-autotrack"), DeviceFeature.MotionTrigger, derived("motion-trigger", ["setMotionTrigger"]), DeviceFeature.TimedRun, derived("timed-run", ["runFor"]), DeviceFeature.Switch, DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired, DeviceFeature.ClimateDualSetpoint, DeviceFeature.ClimateHumidity, DeviceFeature.ClimateFanMode, DeviceFeature.ClimatePreset, DeviceFeature.ClimateSwingVertical, DeviceFeature.ClimateSwingHorizontal, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.CoverStoppable, DeviceFeature.ValvePositionable, derived("valve", ["setPosition"]), DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.LockOpen, DeviceFeature.MediaPlayerSeek, DeviceFeature.MediaPlayerVolume, DeviceFeature.MediaPlayerMute, DeviceFeature.MediaPlayerShuffle, DeviceFeature.MediaPlayerRepeat, DeviceFeature.MediaPlayerSelectSource, DeviceFeature.MediaPlayerPlayMedia, DeviceFeature.MediaPlayerNext, DeviceFeature.MediaPlayerPrevious, DeviceFeature.MediaPlayerStop, DeviceFeature.MediaPlayerVolumeStep, DeviceFeature.MediaPlayerChannelStep, DeviceFeature.MediaPlayerPower, DeviceFeature.PresenceGps, DeviceFeature.NotifierImage, DeviceFeature.NotifierPriority, DeviceFeature.NotifierData, DeviceFeature.NotifierActions, DeviceFeature.NotifierRecipients, DeviceFeature.ScriptVariables, DeviceFeature.AutomationSkipCondition, DeviceFeature.VacuumHasAi, DeviceFeature.MowerHasTargetedMowing, DeviceFeature.Navigation, derived("navigation"), DeviceFeature.NetworkLink, derived("network-link");
|
|
217016
217029
|
var ALL_FEATURES = Object.values(DeviceFeature);
|
|
217017
217030
|
new Set(ALL_FEATURES);
|
|
217018
217031
|
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
@@ -231060,6 +231073,16 @@ function decideSleepCommit(input) {
|
|
|
231060
231073
|
stampFirstHand: source !== "hub-reconcile"
|
|
231061
231074
|
};
|
|
231062
231075
|
}
|
|
231076
|
+
/**
|
|
231077
|
+
* A firmware `sleeping` push is ignored while a consumer (the recorder,
|
|
231078
|
+
* a live view) holds an RFC 4571 server on the camera. Teardown on that
|
|
231079
|
+
* push is what cut a recorded battery camera into 40–110 s gaps: the
|
|
231080
|
+
* broker only re-dialled ~20 s after we closed the stream. With no
|
|
231081
|
+
* consumer the push is acted on exactly as before.
|
|
231082
|
+
*/
|
|
231083
|
+
function shouldIgnoreSleepPush(input) {
|
|
231084
|
+
return input.activeStreams > 0;
|
|
231085
|
+
}
|
|
231063
231086
|
//#endregion
|
|
231064
231087
|
//#region src/snapshot-wake-gate.ts
|
|
231065
231088
|
/**
|
|
@@ -234773,6 +234796,8 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
234773
234796
|
* `sleep-state-decision.ts` for the measurement (D603).
|
|
234774
234797
|
*/
|
|
234775
234798
|
sleepStateChangedAt = 0;
|
|
234799
|
+
/** True once the 'sleep push ignored' line was logged for the current consumer-attached stretch. */
|
|
234800
|
+
sleepPushIgnoreLogged = false;
|
|
234776
234801
|
/**
|
|
234777
234802
|
* Wall-clock ms of the last PROACTIVE wake — one we issued on our own
|
|
234778
234803
|
* initiative (background snapshot refresh), not because the operator
|
|
@@ -242292,6 +242317,17 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
242292
242317
|
return;
|
|
242293
242318
|
}
|
|
242294
242319
|
if (event.type === "sleeping") {
|
|
242320
|
+
if (this.isBattery && shouldIgnoreSleepPush({ activeStreams: this.active.size })) {
|
|
242321
|
+
if (!this.sleepPushIgnoreLogged) {
|
|
242322
|
+
this.sleepPushIgnoreLogged = true;
|
|
242323
|
+
this.ctx.logger.info(`sleep push ignored: ${this.active.size} active stream consumer(s)`, {
|
|
242324
|
+
tags: { deviceId: this.id },
|
|
242325
|
+
meta: { activeStreams: this.active.size }
|
|
242326
|
+
});
|
|
242327
|
+
}
|
|
242328
|
+
return;
|
|
242329
|
+
}
|
|
242330
|
+
this.sleepPushIgnoreLogged = false;
|
|
242295
242331
|
const wasSleeping = this.sleeping;
|
|
242296
242332
|
if (!this.commitSleepState(true, "simple-event")) return;
|
|
242297
242333
|
if (!wasSleeping) this.ctx.eventBus.emit(createEvent(EventCategory.DeviceSleeping, eventSource, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-reolink",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.250",
|
|
4
4
|
"description": "Reolink camera device provider addon for CamStack — native Baichuan protocol",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"werift"
|
|
97
97
|
],
|
|
98
98
|
"requires": {
|
|
99
|
-
"server": ">=1.2.
|
|
99
|
+
"server": ">=1.2.917"
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
"files": [
|