@apocaliss92/scrypted-reolink-native 0.1.28 → 0.1.30
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/common.ts +9 -13
- package/src/main.ts +1 -1
package/dist/plugin.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/common.ts
CHANGED
|
@@ -1058,11 +1058,9 @@ export abstract class CommonCameraMixin extends BaseBaichuanClass implements Vid
|
|
|
1058
1058
|
|
|
1059
1059
|
const { hasSiren, hasFloodlight, hasPir } = abilities;
|
|
1060
1060
|
|
|
1061
|
-
const devices: Device[] = [];
|
|
1062
|
-
|
|
1063
1061
|
if (hasSiren) {
|
|
1064
1062
|
const sirenNativeId = `${this.nativeId}${sirenSuffix}`;
|
|
1065
|
-
|
|
1063
|
+
const device: Device = {
|
|
1066
1064
|
providerNativeId: this.nativeId,
|
|
1067
1065
|
name: `${this.name} Siren`,
|
|
1068
1066
|
nativeId: sirenNativeId,
|
|
@@ -1071,12 +1069,13 @@ export abstract class CommonCameraMixin extends BaseBaichuanClass implements Vid
|
|
|
1071
1069
|
},
|
|
1072
1070
|
interfaces: [ScryptedInterface.OnOff, ScryptedInterface.Settings],
|
|
1073
1071
|
type: ScryptedDeviceType.Siren,
|
|
1074
|
-
}
|
|
1072
|
+
};
|
|
1073
|
+
sdk.deviceManager.onDeviceDiscovered(device);
|
|
1075
1074
|
}
|
|
1076
1075
|
|
|
1077
1076
|
if (hasFloodlight) {
|
|
1078
1077
|
const floodlightNativeId = `${this.nativeId}${floodlightSuffix}`;
|
|
1079
|
-
|
|
1078
|
+
const device: Device = {
|
|
1080
1079
|
providerNativeId: this.nativeId,
|
|
1081
1080
|
name: `${this.name} Floodlight`,
|
|
1082
1081
|
nativeId: floodlightNativeId,
|
|
@@ -1085,12 +1084,13 @@ export abstract class CommonCameraMixin extends BaseBaichuanClass implements Vid
|
|
|
1085
1084
|
},
|
|
1086
1085
|
interfaces: [ScryptedInterface.OnOff, ScryptedInterface.Settings],
|
|
1087
1086
|
type: ScryptedDeviceType.Light,
|
|
1088
|
-
}
|
|
1087
|
+
};
|
|
1088
|
+
sdk.deviceManager.onDeviceDiscovered(device);
|
|
1089
1089
|
}
|
|
1090
1090
|
|
|
1091
1091
|
if (hasPir) {
|
|
1092
1092
|
const pirNativeId = `${this.nativeId}${pirSuffix}`;
|
|
1093
|
-
|
|
1093
|
+
const device: Device = {
|
|
1094
1094
|
providerNativeId: this.nativeId,
|
|
1095
1095
|
name: `${this.name} PIR`,
|
|
1096
1096
|
nativeId: pirNativeId,
|
|
@@ -1099,13 +1099,9 @@ export abstract class CommonCameraMixin extends BaseBaichuanClass implements Vid
|
|
|
1099
1099
|
},
|
|
1100
1100
|
interfaces: [ScryptedInterface.OnOff, ScryptedInterface.Settings],
|
|
1101
1101
|
type: ScryptedDeviceType.Switch,
|
|
1102
|
-
}
|
|
1102
|
+
};
|
|
1103
|
+
sdk.deviceManager.onDeviceDiscovered(device);
|
|
1103
1104
|
}
|
|
1104
|
-
|
|
1105
|
-
sdk.deviceManager.onDevicesChanged({
|
|
1106
|
-
providerNativeId: this.nativeId,
|
|
1107
|
-
devices,
|
|
1108
|
-
});
|
|
1109
1105
|
}
|
|
1110
1106
|
|
|
1111
1107
|
async getSettings(): Promise<Setting[]> {
|
package/src/main.ts
CHANGED
|
@@ -57,7 +57,7 @@ class ReolinkNativePlugin extends ScryptedDeviceBase implements DeviceProvider,
|
|
|
57
57
|
},
|
|
58
58
|
);
|
|
59
59
|
|
|
60
|
-
this.console.log(`[AutoDetect] Detected device type
|
|
60
|
+
this.console.log(`[AutoDetect] Detected device type ${detection.type} on transport ${detection.transport}: ${JSON.stringify(detection.deviceInfo)}`);
|
|
61
61
|
|
|
62
62
|
// Handle multi-focal device case
|
|
63
63
|
if (detection.type === 'multifocal') {
|