@apocaliss92/scrypted-reolink-native 0.2.5 → 0.2.7

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.2.5",
3
+ "version": "0.2.7",
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/camera.ts CHANGED
@@ -207,6 +207,7 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
207
207
  // Basic connection settings
208
208
  ipAddress: {
209
209
  title: 'IP Address',
210
+ hide: true,
210
211
  type: 'string',
211
212
  onPut: async () => {
212
213
  await this.credentialsChanged();
@@ -214,6 +215,7 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
214
215
  },
215
216
  username: {
216
217
  type: 'string',
218
+ hide: true,
217
219
  title: 'Username',
218
220
  onPut: async () => {
219
221
  await this.credentialsChanged();
@@ -221,6 +223,7 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
221
223
  },
222
224
  password: {
223
225
  type: 'password',
226
+ hide: true,
224
227
  title: 'Password',
225
228
  onPut: async () => {
226
229
  await this.credentialsChanged();
@@ -2538,11 +2541,20 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
2538
2541
  // Extract variant from stream ID or URL if present (e.g., "autotrack" from "native_autotrack_main" or "?variant=autotrack")
2539
2542
  let variant = extractVariantFromStreamId(selected.id, selected.url);
2540
2543
 
2541
- // Fallback: if no variant found in stream ID/URL, use variantType from device settings
2542
- // This is important for multi-focal devices where the device has a variantType setting
2544
+ // Fallback: if no variant found in stream ID/URL, use variantType from device settings.
2545
+ // IMPORTANT:
2546
+ // - On NVR/Hub multifocal setups, the tele lens is often selected via a variant (autotrack/telephoto) on the same channel.
2547
+ // - On standalone TrackMix (no NVR), the tele lens is selected via channel=1 (no variant).
2548
+ // Forcing a variant on standalone can result in a started stream with no frames.
2543
2549
  if (!variant && this.storageSettings.values.variantType && this.storageSettings.values.variantType !== 'default') {
2544
- variant = this.storageSettings.values.variantType as 'autotrack' | 'telephoto';
2545
- logger.log(`Using variant from device settings: '${variant}' (not found in stream ID/URL)`);
2550
+ if (this.isOnNvr) {
2551
+ variant = this.storageSettings.values.variantType as 'autotrack' | 'telephoto';
2552
+ logger.log(`Using variant from device settings: '${variant}' (not found in stream ID/URL)`);
2553
+ } else {
2554
+ logger.log(
2555
+ `Ignoring device variantType '${this.storageSettings.values.variantType}' for standalone stream (channel-based lens selection)`
2556
+ );
2557
+ }
2546
2558
  }
2547
2559
 
2548
2560
  logger.log(`Stream selection: id='${selected.id}', profile='${profile}', channel=${channel}, variant='${variant || 'default'}'`);
@@ -2698,6 +2710,16 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
2698
2710
  this.storageSettings.settings.clipsSource.hide = !this.nvrDevice;
2699
2711
  this.storageSettings.settings.clipsSource.defaultValue = this.nvrDevice ? "NVR" : "Device";
2700
2712
 
2713
+ // if (!!this.multiFocalDevice) {
2714
+ // const allSettingKeys = Object.keys(this.storageSettings.settings);
2715
+
2716
+ // for (const key of allSettingKeys) {
2717
+ // const setting = this.storageSettings.settings[key];
2718
+ // if (['Videoclips', 'PTZ'].includes(setting.subgroup)) {
2719
+ // setting.hide = true;
2720
+ // }
2721
+ // }
2722
+ // }
2701
2723
  this.storageSettings.settings.enableVideoclips.hide = !!this.multiFocalDevice;
2702
2724
  this.storageSettings.settings.videoclipsDaysToPreload.hide = !!this.multiFocalDevice;
2703
2725
  this.storageSettings.settings.videoclipsRegularChecks.hide = !!this.multiFocalDevice;
@@ -2715,8 +2737,9 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
2715
2737
  this.storageSettings.settings.pipSize.hide = !this.isMultiFocal;
2716
2738
  this.storageSettings.settings.pipMargin.hide = !this.isMultiFocal;
2717
2739
 
2718
- this.storageSettings.settings.uid.hide = !this.isBattery || this.isOnNvr;
2719
- this.storageSettings.settings.discoveryMethod.hide = !this.isBattery && !this.nvrDevice;
2740
+ const hideUid = !this.isBattery || this.isOnNvr || !!this.multiFocalDevice
2741
+ this.storageSettings.settings.uid.hide = hideUid;
2742
+ this.storageSettings.settings.discoveryMethod.hide = hideUid;
2720
2743
 
2721
2744
  if (this.isBattery && !this.storageSettings.values.mixinsSetup) {
2722
2745
  try {
@@ -2753,7 +2776,7 @@ export class ReolinkCamera extends BaseBaichuanClass implements VideoCamera, Cam
2753
2776
  this.intercom = new ReolinkBaichuanIntercom(this);
2754
2777
  }
2755
2778
 
2756
- if (hasPtz) {
2779
+ if (hasPtz && !this.multiFocalDevice) {
2757
2780
  const choices = (this.presets || []).map((preset: any) => preset.id + '=' + preset.name);
2758
2781
 
2759
2782
  this.storageSettings.settings.presets.choices = choices;