@apocaliss92/scrypted-reolink-native 0.5.29 → 0.5.31
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/main.nodejs.js +1 -1
- package/dist/plugin.zip +0 -0
- package/package.json +2 -2
- package/src/baichuan-base.ts +14 -0
package/dist/plugin.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apocaliss92/scrypted-reolink-native",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.31",
|
|
4
4
|
"description": "Use any reolink camera with Scrypted, even older/unsupported models without HTTP protocol support",
|
|
5
5
|
"author": "@apocaliss92",
|
|
6
6
|
"license": "Apache",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
]
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@apocaliss92/nodelink-js": "^0.4.
|
|
47
|
+
"@apocaliss92/nodelink-js": "^0.4.33",
|
|
48
48
|
"@scrypted/common": "file:../../scrypted/common",
|
|
49
49
|
"@scrypted/rtsp": "file:../../scrypted/plugins/rtsp",
|
|
50
50
|
"@scrypted/sdk": "^0.3.118"
|
package/src/baichuan-base.ts
CHANGED
|
@@ -766,6 +766,20 @@ export abstract class BaseBaichuanClass extends ScryptedDeviceBase {
|
|
|
766
766
|
return;
|
|
767
767
|
}
|
|
768
768
|
|
|
769
|
+
// Battery cameras on UDP transport spend most of their lifetime
|
|
770
|
+
// asleep — event silence is the *normal* operating mode, not a
|
|
771
|
+
// failure. Running `unsubscribeFromEvents + subscribeToEvents`
|
|
772
|
+
// here wakes the device every 10 minutes for no real benefit
|
|
773
|
+
// (the cam emits its own sleep/awake push when it wakes for
|
|
774
|
+
// motion, and the lib's own watchdog has the same UDP-skip
|
|
775
|
+
// guard for the same reason).
|
|
776
|
+
if (this.isBatteryDevice()) {
|
|
777
|
+
logger.debug?.(
|
|
778
|
+
"Event check: skipping silence-based restart for battery camera (UDP sleep is normal)",
|
|
779
|
+
);
|
|
780
|
+
return;
|
|
781
|
+
}
|
|
782
|
+
|
|
769
783
|
try {
|
|
770
784
|
const now = Date.now();
|
|
771
785
|
const timeSinceLastEvent = now - this.lastEventTime;
|