@apocaliss92/scrypted-reolink-native 0.1.41 → 0.1.42
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 +1 -1
- package/src/main.ts +1 -1
- package/src/nvr.ts +7 -3
package/dist/plugin.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/main.ts
CHANGED
|
@@ -79,7 +79,7 @@ class ReolinkNativePlugin extends ScryptedDeviceBase implements DeviceProvider,
|
|
|
79
79
|
},
|
|
80
80
|
);
|
|
81
81
|
|
|
82
|
-
this.console.log(`[AutoDetect] Detected device type: ${detection.type} (transport: ${detection.transport})`);
|
|
82
|
+
this.console.log(`[AutoDetect] Detected device type: ${detection.type} (transport: ${detection.transport}). Device info: ${JSON.stringify(detection.deviceInfo)}`);
|
|
83
83
|
|
|
84
84
|
// Use the API that was successfully used for detection
|
|
85
85
|
const detectedApi = detection.api;
|
package/src/nvr.ts
CHANGED
|
@@ -508,7 +508,7 @@ export class ReolinkNativeNvrDevice extends BaseBaichuanClass implements Setting
|
|
|
508
508
|
logger.log(`Sync entities from remote for ${channels.length} channels`);
|
|
509
509
|
|
|
510
510
|
for (const deviceData of devices) {
|
|
511
|
-
const { isBattery, name, model, isDoorbell, uid, channel } = deviceData
|
|
511
|
+
const { isBattery, serialNumber, name, model, isDoorbell, uid, channel } = deviceData
|
|
512
512
|
|
|
513
513
|
try {
|
|
514
514
|
const nativeId = this.buildNativeId(channel, uid, isBattery);
|
|
@@ -535,8 +535,12 @@ export class ReolinkNativeNvrDevice extends BaseBaichuanClass implements Setting
|
|
|
535
535
|
|
|
536
536
|
const allNativeIds = sdk.deviceManager.getNativeIds().filter(nid => !!nid);
|
|
537
537
|
|
|
538
|
-
if (
|
|
539
|
-
allNativeIds.
|
|
538
|
+
if (
|
|
539
|
+
allNativeIds.some(
|
|
540
|
+
nid => nid.includes(uid) ||
|
|
541
|
+
nid.includes(serialNumber) ||
|
|
542
|
+
nid === nativeId)
|
|
543
|
+
) {
|
|
540
544
|
continue;
|
|
541
545
|
}
|
|
542
546
|
|