@camstack/addon-provider-homematic 1.2.0 → 1.2.2

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/addon.js CHANGED
@@ -12330,7 +12330,8 @@ var PipelineStepInputSchema = lazy(() => object({
12330
12330
  modelId: string().optional(),
12331
12331
  enabled: boolean().default(true),
12332
12332
  children: array(PipelineStepInputSchema).optional(),
12333
- settings: record(string(), unknown()).optional()
12333
+ settings: record(string(), unknown()).optional(),
12334
+ jumpDeviceKey: string().optional()
12334
12335
  }));
12335
12336
  var ModelSubstitutionSchema = object({
12336
12337
  addonId: string(),
@@ -12669,10 +12670,40 @@ var NativeCropBboxSchema = object({
12669
12670
  });
12670
12671
  /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
12671
12672
  var NativeCropResultSchema = object({
12672
- /** Packed rgb (24-bit) pixels of the crop. */
12673
- bytes: _instanceof(Uint8Array),
12673
+ /**
12674
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
12675
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
12676
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
12677
+ * path below), where shipping raw RGB is both an invariant violation and, for
12678
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
12679
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
12680
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
12681
+ */
12682
+ bytes: _instanceof(Uint8Array).optional(),
12683
+ /**
12684
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
12685
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
12686
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
12687
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
12688
+ * set `encodeJpeg: true`; `bytes` is then absent.
12689
+ */
12690
+ jpeg: string().optional(),
12674
12691
  width: number().int().positive(),
12675
- height: number().int().positive()
12692
+ height: number().int().positive(),
12693
+ /**
12694
+ * Which source served this crop, so a quality-sensitive consumer (the native
12695
+ * `keyFrame`) can reject a degraded fallback:
12696
+ * - `native` — cut from the decode worker's retained NATIVE surface (the
12697
+ * quality path).
12698
+ * - `ram-fullframe` — the native surface MISSED but the request was full-frame,
12699
+ * so the ≤640 RAM `RetainedFrameStore` served it (honest lower-res; legit for
12700
+ * the blank-frame guard / 640-snapshot resolve, NOT for the clean keyFrame).
12701
+ *
12702
+ * OPTIONAL: a pre-tier runner (version skew) omits it — an ABSENT `tier` MUST be
12703
+ * treated as `native` (accepted) by every consumer so mixed-version clusters
12704
+ * keep the pre-tier behaviour. An ROI miss returns `null` (no tier at all).
12705
+ */
12706
+ tier: _enum(["native", "ram-fullframe"]).optional()
12676
12707
  });
12677
12708
  /** Parent detection context passed to `runDetailSubtree` — the crop's
12678
12709
  * originating detection, in FRAME-space coordinates. Reuses
@@ -12802,6 +12833,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
12802
12833
  hubHostnameOverride: string().optional()
12803
12834
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
12804
12835
  /**
12836
+ * One ENABLED inference device on the runner's node, as the step-tree
12837
+ * device-jump resolver sees it (phase 1). The orchestrator populates this
12838
+ * roster on the attach payload whenever the camera is elected onto a specific
12839
+ * `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
12840
+ * runner auto-jumps an enrichment step to when the elected device's format
12841
+ * cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
12842
+ * per-device knobs so the auto choice is weighted-least-loaded.
12843
+ */
12844
+ var RunnerInferenceDeviceSchema = object({
12845
+ deviceKey: string(),
12846
+ weight: number().positive().default(1),
12847
+ maxSessions: number().int().positive().nullable().default(null)
12848
+ });
12849
+ /**
12805
12850
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
12806
12851
  * specific runner instance via `attachCamera`. Carries everything the
12807
12852
  * runner needs to subscribe to the local broker and execute inference.
@@ -12919,7 +12964,16 @@ var RunnerCameraConfigSchema = object({
12919
12964
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
12920
12965
  * this only selects WHICH device pool of that node runs the session.
12921
12966
  */
12922
- deviceKey: string().optional()
12967
+ deviceKey: string().optional(),
12968
+ /**
12969
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
12970
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
12971
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
12972
+ * step whose model has no build for the elected device's format onto another
12973
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
12974
+ * ⇒ no jump possible; the step runs on `deviceKey`.
12975
+ */
12976
+ inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
12923
12977
  });
12924
12978
  motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
12925
12979
  /**
@@ -12975,7 +13029,18 @@ var RunnerLocalMetricsSchema = object({
12975
13029
  method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
12976
13030
  handle: FrameHandleSchema,
12977
13031
  bbox: NativeCropBboxSchema,
12978
- maxWidth: number().int().positive().optional()
13032
+ maxWidth: number().int().positive().optional(),
13033
+ /**
13034
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
13035
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
13036
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
13037
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
13038
+ * no raw pixels cross the process boundary. Same-node callers omit it
13039
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
13040
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
13041
+ * the caller falls back to encoding locally.
13042
+ */
13043
+ encodeJpeg: boolean().optional()
12979
13044
  }), NativeCropResultSchema.nullable()), method(object({
12980
13045
  deviceId: number(),
12981
13046
  frameHandle: FrameHandleSchema.optional(),
@@ -17742,7 +17807,8 @@ var LinkedDeviceSchema = object({
17742
17807
  deviceId: number(),
17743
17808
  name: string(),
17744
17809
  location: string().nullable(),
17745
- features: array(string())
17810
+ features: array(string()),
17811
+ producesTrackedEvents: boolean().optional()
17746
17812
  });
17747
17813
  var SavedDeviceRowSchema = object({
17748
17814
  /** Numeric id reserved at allocateDeviceId time. */
@@ -19372,6 +19438,7 @@ var TrackSchema = object({
19372
19438
  deviceId: number(),
19373
19439
  className: string(),
19374
19440
  label: string().optional(),
19441
+ producingDeviceName: string().optional(),
19375
19442
  /** Track provenance. Absent ⇒ `pipeline` (legacy rows). */
19376
19443
  source: TrackSourceSchema.optional(),
19377
19444
  firstSeen: number(),
@@ -19509,7 +19576,8 @@ var MediaFileKindEnum = _enum([
19509
19576
  "fullFrameBoxed",
19510
19577
  "faceCrop",
19511
19578
  "plateCrop",
19512
- "keyFrame"
19579
+ "keyFrame",
19580
+ "keyFrameSmall"
19513
19581
  ]);
19514
19582
  var MediaFileSchema = object({
19515
19583
  key: string(),
@@ -19840,7 +19908,16 @@ var PipelineTemplateSchema = object({
19840
19908
  });
19841
19909
  var DeviceStepConfigSchema = object({
19842
19910
  modelId: string().optional(),
19843
- settings: record(string(), unknown()).optional()
19911
+ settings: record(string(), unknown()).optional(),
19912
+ /**
19913
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
19914
+ * When set, this step runs on the named enabled device of the SAME node
19915
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
19916
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
19917
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
19918
+ * auto-jumps only when the effective device's format cannot run the step.
19919
+ */
19920
+ jumpDeviceKey: string().optional()
19844
19921
  });
19845
19922
  var AgentPipelineSettingsSchema = object({
19846
19923
  maxCameras: number().int().nonnegative().nullable().default(null),
package/dist/addon.mjs CHANGED
@@ -12331,7 +12331,8 @@ var PipelineStepInputSchema = lazy(() => object({
12331
12331
  modelId: string().optional(),
12332
12332
  enabled: boolean().default(true),
12333
12333
  children: array(PipelineStepInputSchema).optional(),
12334
- settings: record(string(), unknown()).optional()
12334
+ settings: record(string(), unknown()).optional(),
12335
+ jumpDeviceKey: string().optional()
12335
12336
  }));
12336
12337
  var ModelSubstitutionSchema = object({
12337
12338
  addonId: string(),
@@ -12670,10 +12671,40 @@ var NativeCropBboxSchema = object({
12670
12671
  });
12671
12672
  /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
12672
12673
  var NativeCropResultSchema = object({
12673
- /** Packed rgb (24-bit) pixels of the crop. */
12674
- bytes: _instanceof(Uint8Array),
12674
+ /**
12675
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
12676
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
12677
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
12678
+ * path below), where shipping raw RGB is both an invariant violation and, for
12679
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
12680
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
12681
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
12682
+ */
12683
+ bytes: _instanceof(Uint8Array).optional(),
12684
+ /**
12685
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
12686
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
12687
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
12688
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
12689
+ * set `encodeJpeg: true`; `bytes` is then absent.
12690
+ */
12691
+ jpeg: string().optional(),
12675
12692
  width: number().int().positive(),
12676
- height: number().int().positive()
12693
+ height: number().int().positive(),
12694
+ /**
12695
+ * Which source served this crop, so a quality-sensitive consumer (the native
12696
+ * `keyFrame`) can reject a degraded fallback:
12697
+ * - `native` — cut from the decode worker's retained NATIVE surface (the
12698
+ * quality path).
12699
+ * - `ram-fullframe` — the native surface MISSED but the request was full-frame,
12700
+ * so the ≤640 RAM `RetainedFrameStore` served it (honest lower-res; legit for
12701
+ * the blank-frame guard / 640-snapshot resolve, NOT for the clean keyFrame).
12702
+ *
12703
+ * OPTIONAL: a pre-tier runner (version skew) omits it — an ABSENT `tier` MUST be
12704
+ * treated as `native` (accepted) by every consumer so mixed-version clusters
12705
+ * keep the pre-tier behaviour. An ROI miss returns `null` (no tier at all).
12706
+ */
12707
+ tier: _enum(["native", "ram-fullframe"]).optional()
12677
12708
  });
12678
12709
  /** Parent detection context passed to `runDetailSubtree` — the crop's
12679
12710
  * originating detection, in FRAME-space coordinates. Reuses
@@ -12803,6 +12834,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
12803
12834
  hubHostnameOverride: string().optional()
12804
12835
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
12805
12836
  /**
12837
+ * One ENABLED inference device on the runner's node, as the step-tree
12838
+ * device-jump resolver sees it (phase 1). The orchestrator populates this
12839
+ * roster on the attach payload whenever the camera is elected onto a specific
12840
+ * `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
12841
+ * runner auto-jumps an enrichment step to when the elected device's format
12842
+ * cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
12843
+ * per-device knobs so the auto choice is weighted-least-loaded.
12844
+ */
12845
+ var RunnerInferenceDeviceSchema = object({
12846
+ deviceKey: string(),
12847
+ weight: number().positive().default(1),
12848
+ maxSessions: number().int().positive().nullable().default(null)
12849
+ });
12850
+ /**
12806
12851
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
12807
12852
  * specific runner instance via `attachCamera`. Carries everything the
12808
12853
  * runner needs to subscribe to the local broker and execute inference.
@@ -12920,7 +12965,16 @@ var RunnerCameraConfigSchema = object({
12920
12965
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
12921
12966
  * this only selects WHICH device pool of that node runs the session.
12922
12967
  */
12923
- deviceKey: string().optional()
12968
+ deviceKey: string().optional(),
12969
+ /**
12970
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
12971
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
12972
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
12973
+ * step whose model has no build for the elected device's format onto another
12974
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
12975
+ * ⇒ no jump possible; the step runs on `deviceKey`.
12976
+ */
12977
+ inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
12924
12978
  });
12925
12979
  motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
12926
12980
  /**
@@ -12976,7 +13030,18 @@ var RunnerLocalMetricsSchema = object({
12976
13030
  method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
12977
13031
  handle: FrameHandleSchema,
12978
13032
  bbox: NativeCropBboxSchema,
12979
- maxWidth: number().int().positive().optional()
13033
+ maxWidth: number().int().positive().optional(),
13034
+ /**
13035
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
13036
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
13037
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
13038
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
13039
+ * no raw pixels cross the process boundary. Same-node callers omit it
13040
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
13041
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
13042
+ * the caller falls back to encoding locally.
13043
+ */
13044
+ encodeJpeg: boolean().optional()
12980
13045
  }), NativeCropResultSchema.nullable()), method(object({
12981
13046
  deviceId: number(),
12982
13047
  frameHandle: FrameHandleSchema.optional(),
@@ -17743,7 +17808,8 @@ var LinkedDeviceSchema = object({
17743
17808
  deviceId: number(),
17744
17809
  name: string(),
17745
17810
  location: string().nullable(),
17746
- features: array(string())
17811
+ features: array(string()),
17812
+ producesTrackedEvents: boolean().optional()
17747
17813
  });
17748
17814
  var SavedDeviceRowSchema = object({
17749
17815
  /** Numeric id reserved at allocateDeviceId time. */
@@ -19373,6 +19439,7 @@ var TrackSchema = object({
19373
19439
  deviceId: number(),
19374
19440
  className: string(),
19375
19441
  label: string().optional(),
19442
+ producingDeviceName: string().optional(),
19376
19443
  /** Track provenance. Absent ⇒ `pipeline` (legacy rows). */
19377
19444
  source: TrackSourceSchema.optional(),
19378
19445
  firstSeen: number(),
@@ -19510,7 +19577,8 @@ var MediaFileKindEnum = _enum([
19510
19577
  "fullFrameBoxed",
19511
19578
  "faceCrop",
19512
19579
  "plateCrop",
19513
- "keyFrame"
19580
+ "keyFrame",
19581
+ "keyFrameSmall"
19514
19582
  ]);
19515
19583
  var MediaFileSchema = object({
19516
19584
  key: string(),
@@ -19841,7 +19909,16 @@ var PipelineTemplateSchema = object({
19841
19909
  });
19842
19910
  var DeviceStepConfigSchema = object({
19843
19911
  modelId: string().optional(),
19844
- settings: record(string(), unknown()).optional()
19912
+ settings: record(string(), unknown()).optional(),
19913
+ /**
19914
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
19915
+ * When set, this step runs on the named enabled device of the SAME node
19916
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
19917
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
19918
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
19919
+ * auto-jumps only when the effective device's format cannot run the step.
19920
+ */
19921
+ jumpDeviceKey: string().optional()
19845
19922
  });
19846
19923
  var AgentPipelineSettingsSchema = object({
19847
19924
  maxCameras: number().int().nonnegative().nullable().default(null),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homematic",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Homematic / HomematicIP (CCU3 / RaspberryMatic) device-provider addon for CamStack — wraps the nodehomematic library",
5
5
  "keywords": [
6
6
  "camstack",