@apocaliss92/scrypted-reolink-native 0.1.26 → 0.1.27

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/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.1.26",
3
+ "version": "0.1.27",
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",
package/src/multiFocal.ts CHANGED
@@ -181,13 +181,15 @@ export class ReolinkNativeMultiFocalDevice extends CommonCameraMixin implements
181
181
  this.storageSettings.values.multifocalInfo = multifocalInfo;
182
182
  this.storageSettings.values.capabilities = capabilities;
183
183
 
184
- logger.debug(`Multichannel info: ${JSON.stringify({ multifocalInfo, capabilities, support, abilities, features, objects, presets })}`);
184
+ // TODO: Remove this after debugging
185
+ logger.log(`Multichannel info: ${JSON.stringify({ multifocalInfo, capabilities, support, abilities, features, objects, presets })}`);
186
+ // logger.debug(`Multichannel info: ${JSON.stringify({ multifocalInfo, capabilities, support, abilities, features, objects, presets })}`);
185
187
 
186
188
  for (const channelInfo of multifocalInfo?.channels ?? []) {
187
189
  const { channel, lensType } = channelInfo;
188
190
 
189
191
  const name = `${this.name} - ${lensType}`;
190
- const nativeId = this.buildNativeId(channel);
192
+ const nativeId = `${this.nativeId}-channel${channel}${this.isBattery ? batteryCameraSuffix : cameraSuffix}`;
191
193
 
192
194
  this.channelToNativeIdMap.set(channel, nativeId);
193
195
  const { interfaces, capabilities: deviceCapabilities } = this.getInterfaces(channel);
@@ -209,6 +211,9 @@ export class ReolinkNativeMultiFocalDevice extends CommonCameraMixin implements
209
211
 
210
212
  await sdk.deviceManager.onDeviceDiscovered(device);
211
213
 
214
+ // TODO: Remove this after debugging
215
+ logger.log(`Discovering lens device ${nativeId}: ${JSON.stringify({ interfaces, deviceCapabilities })}`);
216
+
212
217
  const camera = await this.getDevice(nativeId);
213
218
 
214
219
  camera.storageSettings.values.rtspChannel = channel;
@@ -254,10 +259,6 @@ export class ReolinkNativeMultiFocalDevice extends CommonCameraMixin implements
254
259
  super.releaseDevice(id, nativeId);
255
260
  }
256
261
 
257
- buildNativeId(channel: number): string {
258
- return `${this.nativeId}-channel${channel}`;
259
- }
260
-
261
262
  forwardNativeEvent(ev: ReolinkSimpleEvent): void {
262
263
  const logger = this.getBaichuanLogger();
263
264
  const channel = ev?.channel;