@camstack/addon-provider-dreo 0.2.71 → 0.2.73

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
@@ -5442,6 +5442,12 @@ Object.fromEntries([
5442
5442
  icon: "move",
5443
5443
  order: 40
5444
5444
  },
5445
+ {
5446
+ id: "navigation",
5447
+ label: "Navigation",
5448
+ icon: "compass",
5449
+ order: 41
5450
+ },
5445
5451
  {
5446
5452
  id: "consumables",
5447
5453
  label: "Consumables",
@@ -6475,6 +6481,21 @@ var CameraStreamSchema = object({
6475
6481
  */
6476
6482
  autoEligible: boolean().optional(),
6477
6483
  /**
6484
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6485
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6486
+ * stream. Consulted by the broker's automatic ranking
6487
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6488
+ * an operator's manual assignment still wins, and an absent hint is the
6489
+ * pixel-ranked default every camera had before this field existed.
6490
+ *
6491
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6492
+ * storage class is written for on its own (`recordings` is high|mid,
6493
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6494
+ * camera's single 720p relay is a `low` in every respect except the slot the
6495
+ * heuristic put it in.
6496
+ */
6497
+ profileHint: CamProfileSchema.optional(),
6498
+ /**
6478
6499
  * Transport-specific opaque metadata. The broker passes it through to
6479
6500
  * the source reader without inspecting it. Currently used by
6480
6501
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7924,7 +7945,22 @@ var RecordingTriggersSchema = object({
7924
7945
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7925
7946
  * registrare.
7926
7947
  */
7927
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7948
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7949
+ /**
7950
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7951
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7952
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7953
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7954
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7955
+ *
7956
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7957
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7958
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7959
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7960
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7961
+ * (`holdTrigger` / `releaseTrigger`).
7962
+ */
7963
+ deviceSignal: boolean().optional()
7928
7964
  });
7929
7965
  /**
7930
7966
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11388,6 +11424,8 @@ method(object({
11388
11424
  label: string().optional(),
11389
11425
  deviceFeatures: array(string()).optional(),
11390
11426
  autoEligible: boolean().optional(),
11427
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11428
+ profileHint: CamProfileSchema.optional(),
11391
11429
  metadata: record(string(), unknown()).optional(),
11392
11430
  /** Required when kind === 'derived' — the source camStreamId the
11393
11431
  * derived broker reads its encoded plane from.
@@ -29938,6 +29976,77 @@ method(object({
29938
29976
  auth: "protected"
29939
29977
  });
29940
29978
  /**
29979
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
29980
+ * something it knows about is happening (a robot vacuum cleaning, a machine
29981
+ * running, a gate open) and lowers when it stops.
29982
+ *
29983
+ * It is a level, not an edge. The sensor triggers the recorder already listens
29984
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
29985
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
29986
+ * still happening" cannot be expressed as an edge plus a post-buffer without
29987
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
29988
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
29989
+ * which records the dock for that long after every short one. So the recorder
29990
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
29991
+ * own post-buffer once it falls.
29992
+ *
29993
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
29994
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
29995
+ * writes this slice on every change; consumers subscribe to the kernel's
29996
+ * `DeviceStateChanged` for it and read it back through
29997
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
29998
+ * against the device (D224, D8/D11).
29999
+ *
30000
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30001
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30002
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30003
+ * about the camera, on the camera.
30004
+ */
30005
+ var RecordingSignalStatusSchema = object({
30006
+ /** True while the device asks to be recorded. */
30007
+ active: boolean(),
30008
+ /**
30009
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30010
+ * …). Free text for the log line and the UI badge; the recorder never
30011
+ * branches on it.
30012
+ */
30013
+ reason: string(),
30014
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30015
+ lastChangedAt: number()
30016
+ });
30017
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30018
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30019
+ var recordingSignalCapability = {
30020
+ name: "recording-signal",
30021
+ scope: "device",
30022
+ deviceNative: true,
30023
+ mode: "singleton",
30024
+ deviceTypes: [DeviceType.Camera],
30025
+ methods: {
30026
+ /** The current level, straight from the slice the provider keeps fresh. */
30027
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30028
+ status: {
30029
+ schema: RecordingSignalStatusSchema,
30030
+ kind: "push",
30031
+ empty: {
30032
+ active: false,
30033
+ reason: "unknown",
30034
+ lastChangedAt: 0
30035
+ }
30036
+ },
30037
+ runtimeState: RecordingSignalRuntimeStateSchema,
30038
+ /**
30039
+ * Runtime-state durability: **session** — a restored `active: true` from
30040
+ * before a restart is exactly the stale level the recorder's reconcile bound
30041
+ * exists to end, and the provider re-derives the true level on activation
30042
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30043
+ *
30044
+ * See `RuntimeStateDurability`. Enforced by
30045
+ * `scripts/check-runtime-state-durability.ts`.
30046
+ */
30047
+ durability: "session"
30048
+ };
30049
+ /**
29941
30050
  * scene-monitor — device-scoped reference-region state cap. An operator marks
29942
30051
  * a rect ROI on a camera frame and names one or more states; the engine
29943
30052
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30435,6 +30544,8 @@ var CamStreamDescriptorSchema = object({
30435
30544
  deviceFeatures: array(string()).optional(),
30436
30545
  /** Eligible for automatic profile assignment. Absent = `true`. */
30437
30546
  autoEligible: boolean().optional(),
30547
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30548
+ profileHint: CamProfileSchema.optional(),
30438
30549
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30439
30550
  metadata: record(string(), unknown()).optional()
30440
30551
  });
@@ -32574,6 +32685,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32574
32685
  pressureSensor: pressureSensorCapability,
32575
32686
  privacyMask: privacyMaskCapability,
32576
32687
  ptzAutotrack: ptzAutotrackCapability,
32688
+ recordingSignal: recordingSignalCapability,
32577
32689
  sceneMonitor: sceneMonitorCapability,
32578
32690
  scriptRunner: scriptRunnerCapability,
32579
32691
  smoke: smokeCapability,
@@ -38321,6 +38433,12 @@ Object.freeze({
38321
38433
  addonId: null,
38322
38434
  access: "view"
38323
38435
  },
38436
+ "recordingSignal.getStatus": {
38437
+ capName: "recording-signal",
38438
+ capScope: "device",
38439
+ addonId: null,
38440
+ access: "view"
38441
+ },
38324
38442
  "sceneMonitor.captureReference": {
38325
38443
  capName: "scene-monitor",
38326
38444
  capScope: "device",
@@ -41313,6 +41431,11 @@ Object.freeze({
41313
41431
  form: "single",
41314
41432
  optional: true
41315
41433
  }],
41434
+ "recordingSignal.getStatus": [{
41435
+ name: "deviceId",
41436
+ form: "single",
41437
+ optional: false
41438
+ }],
41316
41439
  "sceneMonitor.captureReference": [{
41317
41440
  name: "deviceId",
41318
41441
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5443,6 +5443,12 @@ Object.fromEntries([
5443
5443
  icon: "move",
5444
5444
  order: 40
5445
5445
  },
5446
+ {
5447
+ id: "navigation",
5448
+ label: "Navigation",
5449
+ icon: "compass",
5450
+ order: 41
5451
+ },
5446
5452
  {
5447
5453
  id: "consumables",
5448
5454
  label: "Consumables",
@@ -6476,6 +6482,21 @@ var CameraStreamSchema = object({
6476
6482
  */
6477
6483
  autoEligible: boolean().optional(),
6478
6484
  /**
6485
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6486
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6487
+ * stream. Consulted by the broker's automatic ranking
6488
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6489
+ * an operator's manual assignment still wins, and an absent hint is the
6490
+ * pixel-ranked default every camera had before this field existed.
6491
+ *
6492
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6493
+ * storage class is written for on its own (`recordings` is high|mid,
6494
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6495
+ * camera's single 720p relay is a `low` in every respect except the slot the
6496
+ * heuristic put it in.
6497
+ */
6498
+ profileHint: CamProfileSchema.optional(),
6499
+ /**
6479
6500
  * Transport-specific opaque metadata. The broker passes it through to
6480
6501
  * the source reader without inspecting it. Currently used by
6481
6502
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7925,7 +7946,22 @@ var RecordingTriggersSchema = object({
7925
7946
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7926
7947
  * registrare.
7927
7948
  */
7928
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7949
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7950
+ /**
7951
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7952
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7953
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7954
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7955
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7956
+ *
7957
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7958
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7959
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7960
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7961
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7962
+ * (`holdTrigger` / `releaseTrigger`).
7963
+ */
7964
+ deviceSignal: boolean().optional()
7929
7965
  });
7930
7966
  /**
7931
7967
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11389,6 +11425,8 @@ method(object({
11389
11425
  label: string().optional(),
11390
11426
  deviceFeatures: array(string()).optional(),
11391
11427
  autoEligible: boolean().optional(),
11428
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11429
+ profileHint: CamProfileSchema.optional(),
11392
11430
  metadata: record(string(), unknown()).optional(),
11393
11431
  /** Required when kind === 'derived' — the source camStreamId the
11394
11432
  * derived broker reads its encoded plane from.
@@ -29939,6 +29977,77 @@ method(object({
29939
29977
  auth: "protected"
29940
29978
  });
29941
29979
  /**
29980
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
29981
+ * something it knows about is happening (a robot vacuum cleaning, a machine
29982
+ * running, a gate open) and lowers when it stops.
29983
+ *
29984
+ * It is a level, not an edge. The sensor triggers the recorder already listens
29985
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
29986
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
29987
+ * still happening" cannot be expressed as an edge plus a post-buffer without
29988
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
29989
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
29990
+ * which records the dock for that long after every short one. So the recorder
29991
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
29992
+ * own post-buffer once it falls.
29993
+ *
29994
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
29995
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
29996
+ * writes this slice on every change; consumers subscribe to the kernel's
29997
+ * `DeviceStateChanged` for it and read it back through
29998
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
29999
+ * against the device (D224, D8/D11).
30000
+ *
30001
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30002
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30003
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30004
+ * about the camera, on the camera.
30005
+ */
30006
+ var RecordingSignalStatusSchema = object({
30007
+ /** True while the device asks to be recorded. */
30008
+ active: boolean(),
30009
+ /**
30010
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30011
+ * …). Free text for the log line and the UI badge; the recorder never
30012
+ * branches on it.
30013
+ */
30014
+ reason: string(),
30015
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30016
+ lastChangedAt: number()
30017
+ });
30018
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30019
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30020
+ var recordingSignalCapability = {
30021
+ name: "recording-signal",
30022
+ scope: "device",
30023
+ deviceNative: true,
30024
+ mode: "singleton",
30025
+ deviceTypes: [DeviceType.Camera],
30026
+ methods: {
30027
+ /** The current level, straight from the slice the provider keeps fresh. */
30028
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30029
+ status: {
30030
+ schema: RecordingSignalStatusSchema,
30031
+ kind: "push",
30032
+ empty: {
30033
+ active: false,
30034
+ reason: "unknown",
30035
+ lastChangedAt: 0
30036
+ }
30037
+ },
30038
+ runtimeState: RecordingSignalRuntimeStateSchema,
30039
+ /**
30040
+ * Runtime-state durability: **session** — a restored `active: true` from
30041
+ * before a restart is exactly the stale level the recorder's reconcile bound
30042
+ * exists to end, and the provider re-derives the true level on activation
30043
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30044
+ *
30045
+ * See `RuntimeStateDurability`. Enforced by
30046
+ * `scripts/check-runtime-state-durability.ts`.
30047
+ */
30048
+ durability: "session"
30049
+ };
30050
+ /**
29942
30051
  * scene-monitor — device-scoped reference-region state cap. An operator marks
29943
30052
  * a rect ROI on a camera frame and names one or more states; the engine
29944
30053
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30436,6 +30545,8 @@ var CamStreamDescriptorSchema = object({
30436
30545
  deviceFeatures: array(string()).optional(),
30437
30546
  /** Eligible for automatic profile assignment. Absent = `true`. */
30438
30547
  autoEligible: boolean().optional(),
30548
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30549
+ profileHint: CamProfileSchema.optional(),
30439
30550
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30440
30551
  metadata: record(string(), unknown()).optional()
30441
30552
  });
@@ -32575,6 +32686,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32575
32686
  pressureSensor: pressureSensorCapability,
32576
32687
  privacyMask: privacyMaskCapability,
32577
32688
  ptzAutotrack: ptzAutotrackCapability,
32689
+ recordingSignal: recordingSignalCapability,
32578
32690
  sceneMonitor: sceneMonitorCapability,
32579
32691
  scriptRunner: scriptRunnerCapability,
32580
32692
  smoke: smokeCapability,
@@ -38322,6 +38434,12 @@ Object.freeze({
38322
38434
  addonId: null,
38323
38435
  access: "view"
38324
38436
  },
38437
+ "recordingSignal.getStatus": {
38438
+ capName: "recording-signal",
38439
+ capScope: "device",
38440
+ addonId: null,
38441
+ access: "view"
38442
+ },
38325
38443
  "sceneMonitor.captureReference": {
38326
38444
  capName: "scene-monitor",
38327
38445
  capScope: "device",
@@ -41314,6 +41432,11 @@ Object.freeze({
41314
41432
  form: "single",
41315
41433
  optional: true
41316
41434
  }],
41435
+ "recordingSignal.getStatus": [{
41436
+ name: "deviceId",
41437
+ form: "single",
41438
+ optional: false
41439
+ }],
41317
41440
  "sceneMonitor.captureReference": [{
41318
41441
  name: "deviceId",
41319
41442
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreo",
3
- "version": "0.2.71",
3
+ "version": "0.2.73",
4
4
  "description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
5
5
  "keywords": [
6
6
  "camstack",