@blueharford/scrypted-spatial-awareness 0.6.22 → 0.6.23

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
@@ -36828,7 +36828,13 @@ Use the mount height to help estimate distances - objects at ground level will a
36828
36828
  this.status.lastScanTime = Date.now();
36829
36829
  return null;
36830
36830
  }
36831
- // Correlate if we have multiple cameras
36831
+ // ALWAYS generate suggestions from each camera's analysis first
36832
+ // This ensures landmarks and zones from individual cameras are captured
36833
+ for (const analysis of analyses) {
36834
+ this.generateSuggestionsFromAnalysis(analysis);
36835
+ }
36836
+ this.console.log(`[Discovery] Generated suggestions from ${analyses.length} camera analyses`);
36837
+ // Then correlate if we have multiple cameras (adds shared landmarks and connections)
36832
36838
  let correlation = null;
36833
36839
  if (analyses.length >= 2) {
36834
36840
  correlation = await this.correlateScenes(analyses);
@@ -36836,10 +36842,6 @@ Use the mount height to help estimate distances - objects at ground level will a
36836
36842
  this.generateSuggestionsFromCorrelation(correlation);
36837
36843
  }
36838
36844
  }
36839
- else if (analyses.length === 1) {
36840
- // Single camera - generate suggestions from its analysis
36841
- this.generateSuggestionsFromAnalysis(analyses[0]);
36842
- }
36843
36845
  this.status.lastScanTime = Date.now();
36844
36846
  this.status.pendingSuggestions = this.getPendingSuggestions().length;
36845
36847
  return correlation;
@@ -40829,6 +40831,8 @@ class SpatialAwarenessPlugin extends sdk_1.ScryptedDeviceBase {
40829
40831
  const landmarkData = suggestion.landmark;
40830
40832
  const distanceFeet = landmarkData.distanceFeet || 50; // Default 50ft if not set
40831
40833
  const distanceInPixels = distanceFeet * floorPlanScale;
40834
+ // Debug: log the distance data to verify it's being used correctly
40835
+ this.console.log(`[Discovery] Landmark "${suggestion.landmark.name}" distance data: distanceFeet=${distanceFeet}, distance="${landmarkData.distance || 'not set'}", floorPlanScale=${floorPlanScale}, distanceInPixels=${distanceInPixels}`);
40832
40836
  // Use bounding box for horizontal positioning within the FOV
40833
40837
  const bbox = landmarkData.boundingBox;
40834
40838
  let angleOffset;