@camstack/addon-provider-homematic 1.2.73 → 1.2.74

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
@@ -6454,6 +6454,21 @@ var CameraStreamSchema = object({
6454
6454
  */
6455
6455
  autoEligible: boolean().optional(),
6456
6456
  /**
6457
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6458
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6459
+ * stream. Consulted by the broker's automatic ranking
6460
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6461
+ * an operator's manual assignment still wins, and an absent hint is the
6462
+ * pixel-ranked default every camera had before this field existed.
6463
+ *
6464
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6465
+ * storage class is written for on its own (`recordings` is high|mid,
6466
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6467
+ * camera's single 720p relay is a `low` in every respect except the slot the
6468
+ * heuristic put it in.
6469
+ */
6470
+ profileHint: CamProfileSchema.optional(),
6471
+ /**
6457
6472
  * Transport-specific opaque metadata. The broker passes it through to
6458
6473
  * the source reader without inspecting it. Currently used by
6459
6474
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7903,7 +7918,22 @@ var RecordingTriggersSchema = object({
7903
7918
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7904
7919
  * registrare.
7905
7920
  */
7906
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7921
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7922
+ /**
7923
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7924
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7925
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7926
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7927
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7928
+ *
7929
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7930
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7931
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7932
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7933
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7934
+ * (`holdTrigger` / `releaseTrigger`).
7935
+ */
7936
+ deviceSignal: boolean().optional()
7907
7937
  });
7908
7938
  /**
7909
7939
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11416,6 +11446,8 @@ method(object({
11416
11446
  label: string().optional(),
11417
11447
  deviceFeatures: array(string()).optional(),
11418
11448
  autoEligible: boolean().optional(),
11449
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11450
+ profileHint: CamProfileSchema.optional(),
11419
11451
  metadata: record(string(), unknown()).optional(),
11420
11452
  /** Required when kind === 'derived' — the source camStreamId the
11421
11453
  * derived broker reads its encoded plane from.
@@ -29958,6 +29990,77 @@ method(object({
29958
29990
  auth: "protected"
29959
29991
  });
29960
29992
  /**
29993
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
29994
+ * something it knows about is happening (a robot vacuum cleaning, a machine
29995
+ * running, a gate open) and lowers when it stops.
29996
+ *
29997
+ * It is a level, not an edge. The sensor triggers the recorder already listens
29998
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
29999
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30000
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30001
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30002
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30003
+ * which records the dock for that long after every short one. So the recorder
30004
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30005
+ * own post-buffer once it falls.
30006
+ *
30007
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30008
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30009
+ * writes this slice on every change; consumers subscribe to the kernel's
30010
+ * `DeviceStateChanged` for it and read it back through
30011
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30012
+ * against the device (D224, D8/D11).
30013
+ *
30014
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30015
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30016
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30017
+ * about the camera, on the camera.
30018
+ */
30019
+ var RecordingSignalStatusSchema = object({
30020
+ /** True while the device asks to be recorded. */
30021
+ active: boolean(),
30022
+ /**
30023
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30024
+ * …). Free text for the log line and the UI badge; the recorder never
30025
+ * branches on it.
30026
+ */
30027
+ reason: string(),
30028
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30029
+ lastChangedAt: number()
30030
+ });
30031
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30032
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30033
+ var recordingSignalCapability = {
30034
+ name: "recording-signal",
30035
+ scope: "device",
30036
+ deviceNative: true,
30037
+ mode: "singleton",
30038
+ deviceTypes: [DeviceType.Camera],
30039
+ methods: {
30040
+ /** The current level, straight from the slice the provider keeps fresh. */
30041
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30042
+ status: {
30043
+ schema: RecordingSignalStatusSchema,
30044
+ kind: "push",
30045
+ empty: {
30046
+ active: false,
30047
+ reason: "unknown",
30048
+ lastChangedAt: 0
30049
+ }
30050
+ },
30051
+ runtimeState: RecordingSignalRuntimeStateSchema,
30052
+ /**
30053
+ * Runtime-state durability: **session** — a restored `active: true` from
30054
+ * before a restart is exactly the stale level the recorder's reconcile bound
30055
+ * exists to end, and the provider re-derives the true level on activation
30056
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30057
+ *
30058
+ * See `RuntimeStateDurability`. Enforced by
30059
+ * `scripts/check-runtime-state-durability.ts`.
30060
+ */
30061
+ durability: "session"
30062
+ };
30063
+ /**
29961
30064
  * scene-monitor — device-scoped reference-region state cap. An operator marks
29962
30065
  * a rect ROI on a camera frame and names one or more states; the engine
29963
30066
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30455,6 +30558,8 @@ var CamStreamDescriptorSchema = object({
30455
30558
  deviceFeatures: array(string()).optional(),
30456
30559
  /** Eligible for automatic profile assignment. Absent = `true`. */
30457
30560
  autoEligible: boolean().optional(),
30561
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30562
+ profileHint: CamProfileSchema.optional(),
30458
30563
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30459
30564
  metadata: record(string(), unknown()).optional()
30460
30565
  });
@@ -32594,6 +32699,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32594
32699
  pressureSensor: pressureSensorCapability,
32595
32700
  privacyMask: privacyMaskCapability,
32596
32701
  ptzAutotrack: ptzAutotrackCapability,
32702
+ recordingSignal: recordingSignalCapability,
32597
32703
  sceneMonitor: sceneMonitorCapability,
32598
32704
  scriptRunner: scriptRunnerCapability,
32599
32705
  smoke: smokeCapability,
@@ -38341,6 +38447,12 @@ Object.freeze({
38341
38447
  addonId: null,
38342
38448
  access: "view"
38343
38449
  },
38450
+ "recordingSignal.getStatus": {
38451
+ capName: "recording-signal",
38452
+ capScope: "device",
38453
+ addonId: null,
38454
+ access: "view"
38455
+ },
38344
38456
  "sceneMonitor.captureReference": {
38345
38457
  capName: "scene-monitor",
38346
38458
  capScope: "device",
@@ -41333,6 +41445,11 @@ Object.freeze({
41333
41445
  form: "single",
41334
41446
  optional: true
41335
41447
  }],
41448
+ "recordingSignal.getStatus": [{
41449
+ name: "deviceId",
41450
+ form: "single",
41451
+ optional: false
41452
+ }],
41336
41453
  "sceneMonitor.captureReference": [{
41337
41454
  name: "deviceId",
41338
41455
  form: "single",
package/dist/addon.mjs CHANGED
@@ -6455,6 +6455,21 @@ var CameraStreamSchema = object({
6455
6455
  */
6456
6456
  autoEligible: boolean().optional(),
6457
6457
  /**
6458
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6459
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6460
+ * stream. Consulted by the broker's automatic ranking
6461
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6462
+ * an operator's manual assignment still wins, and an absent hint is the
6463
+ * pixel-ranked default every camera had before this field existed.
6464
+ *
6465
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6466
+ * storage class is written for on its own (`recordings` is high|mid,
6467
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6468
+ * camera's single 720p relay is a `low` in every respect except the slot the
6469
+ * heuristic put it in.
6470
+ */
6471
+ profileHint: CamProfileSchema.optional(),
6472
+ /**
6458
6473
  * Transport-specific opaque metadata. The broker passes it through to
6459
6474
  * the source reader without inspecting it. Currently used by
6460
6475
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7904,7 +7919,22 @@ var RecordingTriggersSchema = object({
7904
7919
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7905
7920
  * registrare.
7906
7921
  */
7907
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7922
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7923
+ /**
7924
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7925
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7926
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7927
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7928
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7929
+ *
7930
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7931
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7932
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7933
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7934
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7935
+ * (`holdTrigger` / `releaseTrigger`).
7936
+ */
7937
+ deviceSignal: boolean().optional()
7908
7938
  });
7909
7939
  /**
7910
7940
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11417,6 +11447,8 @@ method(object({
11417
11447
  label: string().optional(),
11418
11448
  deviceFeatures: array(string()).optional(),
11419
11449
  autoEligible: boolean().optional(),
11450
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11451
+ profileHint: CamProfileSchema.optional(),
11420
11452
  metadata: record(string(), unknown()).optional(),
11421
11453
  /** Required when kind === 'derived' — the source camStreamId the
11422
11454
  * derived broker reads its encoded plane from.
@@ -29959,6 +29991,77 @@ method(object({
29959
29991
  auth: "protected"
29960
29992
  });
29961
29993
  /**
29994
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
29995
+ * something it knows about is happening (a robot vacuum cleaning, a machine
29996
+ * running, a gate open) and lowers when it stops.
29997
+ *
29998
+ * It is a level, not an edge. The sensor triggers the recorder already listens
29999
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30000
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30001
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30002
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30003
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30004
+ * which records the dock for that long after every short one. So the recorder
30005
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30006
+ * own post-buffer once it falls.
30007
+ *
30008
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30009
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30010
+ * writes this slice on every change; consumers subscribe to the kernel's
30011
+ * `DeviceStateChanged` for it and read it back through
30012
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30013
+ * against the device (D224, D8/D11).
30014
+ *
30015
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30016
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30017
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30018
+ * about the camera, on the camera.
30019
+ */
30020
+ var RecordingSignalStatusSchema = object({
30021
+ /** True while the device asks to be recorded. */
30022
+ active: boolean(),
30023
+ /**
30024
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30025
+ * …). Free text for the log line and the UI badge; the recorder never
30026
+ * branches on it.
30027
+ */
30028
+ reason: string(),
30029
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30030
+ lastChangedAt: number()
30031
+ });
30032
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30033
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30034
+ var recordingSignalCapability = {
30035
+ name: "recording-signal",
30036
+ scope: "device",
30037
+ deviceNative: true,
30038
+ mode: "singleton",
30039
+ deviceTypes: [DeviceType.Camera],
30040
+ methods: {
30041
+ /** The current level, straight from the slice the provider keeps fresh. */
30042
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30043
+ status: {
30044
+ schema: RecordingSignalStatusSchema,
30045
+ kind: "push",
30046
+ empty: {
30047
+ active: false,
30048
+ reason: "unknown",
30049
+ lastChangedAt: 0
30050
+ }
30051
+ },
30052
+ runtimeState: RecordingSignalRuntimeStateSchema,
30053
+ /**
30054
+ * Runtime-state durability: **session** — a restored `active: true` from
30055
+ * before a restart is exactly the stale level the recorder's reconcile bound
30056
+ * exists to end, and the provider re-derives the true level on activation
30057
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30058
+ *
30059
+ * See `RuntimeStateDurability`. Enforced by
30060
+ * `scripts/check-runtime-state-durability.ts`.
30061
+ */
30062
+ durability: "session"
30063
+ };
30064
+ /**
29962
30065
  * scene-monitor — device-scoped reference-region state cap. An operator marks
29963
30066
  * a rect ROI on a camera frame and names one or more states; the engine
29964
30067
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30456,6 +30559,8 @@ var CamStreamDescriptorSchema = object({
30456
30559
  deviceFeatures: array(string()).optional(),
30457
30560
  /** Eligible for automatic profile assignment. Absent = `true`. */
30458
30561
  autoEligible: boolean().optional(),
30562
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30563
+ profileHint: CamProfileSchema.optional(),
30459
30564
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30460
30565
  metadata: record(string(), unknown()).optional()
30461
30566
  });
@@ -32595,6 +32700,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32595
32700
  pressureSensor: pressureSensorCapability,
32596
32701
  privacyMask: privacyMaskCapability,
32597
32702
  ptzAutotrack: ptzAutotrackCapability,
32703
+ recordingSignal: recordingSignalCapability,
32598
32704
  sceneMonitor: sceneMonitorCapability,
32599
32705
  scriptRunner: scriptRunnerCapability,
32600
32706
  smoke: smokeCapability,
@@ -38342,6 +38448,12 @@ Object.freeze({
38342
38448
  addonId: null,
38343
38449
  access: "view"
38344
38450
  },
38451
+ "recordingSignal.getStatus": {
38452
+ capName: "recording-signal",
38453
+ capScope: "device",
38454
+ addonId: null,
38455
+ access: "view"
38456
+ },
38345
38457
  "sceneMonitor.captureReference": {
38346
38458
  capName: "scene-monitor",
38347
38459
  capScope: "device",
@@ -41334,6 +41446,11 @@ Object.freeze({
41334
41446
  form: "single",
41335
41447
  optional: true
41336
41448
  }],
41449
+ "recordingSignal.getStatus": [{
41450
+ name: "deviceId",
41451
+ form: "single",
41452
+ optional: false
41453
+ }],
41337
41454
  "sceneMonitor.captureReference": [{
41338
41455
  name: "deviceId",
41339
41456
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homematic",
3
- "version": "1.2.73",
3
+ "version": "1.2.74",
4
4
  "description": "Homematic / HomematicIP (CCU3 / RaspberryMatic) device-provider addon for CamStack — wraps the nodehomematic library",
5
5
  "keywords": [
6
6
  "camstack",