@camstack/addon-provider-unifi 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
@@ -5406,6 +5406,12 @@ Object.fromEntries([
5406
5406
  icon: "move",
5407
5407
  order: 40
5408
5408
  },
5409
+ {
5410
+ id: "navigation",
5411
+ label: "Navigation",
5412
+ icon: "compass",
5413
+ order: 41
5414
+ },
5409
5415
  {
5410
5416
  id: "consumables",
5411
5417
  label: "Consumables",
@@ -6439,6 +6445,21 @@ var CameraStreamSchema = object({
6439
6445
  */
6440
6446
  autoEligible: boolean().optional(),
6441
6447
  /**
6448
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6449
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6450
+ * stream. Consulted by the broker's automatic ranking
6451
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6452
+ * an operator's manual assignment still wins, and an absent hint is the
6453
+ * pixel-ranked default every camera had before this field existed.
6454
+ *
6455
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6456
+ * storage class is written for on its own (`recordings` is high|mid,
6457
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6458
+ * camera's single 720p relay is a `low` in every respect except the slot the
6459
+ * heuristic put it in.
6460
+ */
6461
+ profileHint: CamProfileSchema.optional(),
6462
+ /**
6442
6463
  * Transport-specific opaque metadata. The broker passes it through to
6443
6464
  * the source reader without inspecting it. Currently used by
6444
6465
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7888,7 +7909,22 @@ var RecordingTriggersSchema = object({
7888
7909
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7889
7910
  * registrare.
7890
7911
  */
7891
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7912
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7913
+ /**
7914
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7915
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7916
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7917
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7918
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7919
+ *
7920
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7921
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7922
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7923
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7924
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7925
+ * (`holdTrigger` / `releaseTrigger`).
7926
+ */
7927
+ deviceSignal: boolean().optional()
7892
7928
  });
7893
7929
  /**
7894
7930
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11352,6 +11388,8 @@ method(object({
11352
11388
  label: string().optional(),
11353
11389
  deviceFeatures: array(string()).optional(),
11354
11390
  autoEligible: boolean().optional(),
11391
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11392
+ profileHint: CamProfileSchema.optional(),
11355
11393
  metadata: record(string(), unknown()).optional(),
11356
11394
  /** Required when kind === 'derived' — the source camStreamId the
11357
11395
  * derived broker reads its encoded plane from.
@@ -29894,6 +29932,77 @@ method(object({
29894
29932
  auth: "protected"
29895
29933
  });
29896
29934
  /**
29935
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
29936
+ * something it knows about is happening (a robot vacuum cleaning, a machine
29937
+ * running, a gate open) and lowers when it stops.
29938
+ *
29939
+ * It is a level, not an edge. The sensor triggers the recorder already listens
29940
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
29941
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
29942
+ * still happening" cannot be expressed as an edge plus a post-buffer without
29943
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
29944
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
29945
+ * which records the dock for that long after every short one. So the recorder
29946
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
29947
+ * own post-buffer once it falls.
29948
+ *
29949
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
29950
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
29951
+ * writes this slice on every change; consumers subscribe to the kernel's
29952
+ * `DeviceStateChanged` for it and read it back through
29953
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
29954
+ * against the device (D224, D8/D11).
29955
+ *
29956
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
29957
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
29958
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
29959
+ * about the camera, on the camera.
29960
+ */
29961
+ var RecordingSignalStatusSchema = object({
29962
+ /** True while the device asks to be recorded. */
29963
+ active: boolean(),
29964
+ /**
29965
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
29966
+ * …). Free text for the log line and the UI badge; the recorder never
29967
+ * branches on it.
29968
+ */
29969
+ reason: string(),
29970
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
29971
+ lastChangedAt: number()
29972
+ });
29973
+ /** The runtime-state slice: the status plus the clock every slice carries. */
29974
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
29975
+ var recordingSignalCapability = {
29976
+ name: "recording-signal",
29977
+ scope: "device",
29978
+ deviceNative: true,
29979
+ mode: "singleton",
29980
+ deviceTypes: [DeviceType.Camera],
29981
+ methods: {
29982
+ /** The current level, straight from the slice the provider keeps fresh. */
29983
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
29984
+ status: {
29985
+ schema: RecordingSignalStatusSchema,
29986
+ kind: "push",
29987
+ empty: {
29988
+ active: false,
29989
+ reason: "unknown",
29990
+ lastChangedAt: 0
29991
+ }
29992
+ },
29993
+ runtimeState: RecordingSignalRuntimeStateSchema,
29994
+ /**
29995
+ * Runtime-state durability: **session** — a restored `active: true` from
29996
+ * before a restart is exactly the stale level the recorder's reconcile bound
29997
+ * exists to end, and the provider re-derives the true level on activation
29998
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
29999
+ *
30000
+ * See `RuntimeStateDurability`. Enforced by
30001
+ * `scripts/check-runtime-state-durability.ts`.
30002
+ */
30003
+ durability: "session"
30004
+ };
30005
+ /**
29897
30006
  * scene-monitor — device-scoped reference-region state cap. An operator marks
29898
30007
  * a rect ROI on a camera frame and names one or more states; the engine
29899
30008
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30391,6 +30500,8 @@ var CamStreamDescriptorSchema = object({
30391
30500
  deviceFeatures: array(string()).optional(),
30392
30501
  /** Eligible for automatic profile assignment. Absent = `true`. */
30393
30502
  autoEligible: boolean().optional(),
30503
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30504
+ profileHint: CamProfileSchema.optional(),
30394
30505
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30395
30506
  metadata: record(string(), unknown()).optional()
30396
30507
  });
@@ -32530,6 +32641,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32530
32641
  pressureSensor: pressureSensorCapability,
32531
32642
  privacyMask: privacyMaskCapability,
32532
32643
  ptzAutotrack: ptzAutotrackCapability,
32644
+ recordingSignal: recordingSignalCapability,
32533
32645
  sceneMonitor: sceneMonitorCapability,
32534
32646
  scriptRunner: scriptRunnerCapability,
32535
32647
  smoke: smokeCapability,
@@ -38277,6 +38389,12 @@ Object.freeze({
38277
38389
  addonId: null,
38278
38390
  access: "view"
38279
38391
  },
38392
+ "recordingSignal.getStatus": {
38393
+ capName: "recording-signal",
38394
+ capScope: "device",
38395
+ addonId: null,
38396
+ access: "view"
38397
+ },
38280
38398
  "sceneMonitor.captureReference": {
38281
38399
  capName: "scene-monitor",
38282
38400
  capScope: "device",
@@ -41269,6 +41387,11 @@ Object.freeze({
41269
41387
  form: "single",
41270
41388
  optional: true
41271
41389
  }],
41390
+ "recordingSignal.getStatus": [{
41391
+ name: "deviceId",
41392
+ form: "single",
41393
+ optional: false
41394
+ }],
41272
41395
  "sceneMonitor.captureReference": [{
41273
41396
  name: "deviceId",
41274
41397
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5405,6 +5405,12 @@ Object.fromEntries([
5405
5405
  icon: "move",
5406
5406
  order: 40
5407
5407
  },
5408
+ {
5409
+ id: "navigation",
5410
+ label: "Navigation",
5411
+ icon: "compass",
5412
+ order: 41
5413
+ },
5408
5414
  {
5409
5415
  id: "consumables",
5410
5416
  label: "Consumables",
@@ -6438,6 +6444,21 @@ var CameraStreamSchema = object({
6438
6444
  */
6439
6445
  autoEligible: boolean().optional(),
6440
6446
  /**
6447
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6448
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6449
+ * stream. Consulted by the broker's automatic ranking
6450
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6451
+ * an operator's manual assignment still wins, and an absent hint is the
6452
+ * pixel-ranked default every camera had before this field existed.
6453
+ *
6454
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6455
+ * storage class is written for on its own (`recordings` is high|mid,
6456
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6457
+ * camera's single 720p relay is a `low` in every respect except the slot the
6458
+ * heuristic put it in.
6459
+ */
6460
+ profileHint: CamProfileSchema.optional(),
6461
+ /**
6441
6462
  * Transport-specific opaque metadata. The broker passes it through to
6442
6463
  * the source reader without inspecting it. Currently used by
6443
6464
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7887,7 +7908,22 @@ var RecordingTriggersSchema = object({
7887
7908
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7888
7909
  * registrare.
7889
7910
  */
7890
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7911
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7912
+ /**
7913
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7914
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7915
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7916
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7917
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7918
+ *
7919
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7920
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7921
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7922
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7923
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7924
+ * (`holdTrigger` / `releaseTrigger`).
7925
+ */
7926
+ deviceSignal: boolean().optional()
7891
7927
  });
7892
7928
  /**
7893
7929
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11351,6 +11387,8 @@ method(object({
11351
11387
  label: string().optional(),
11352
11388
  deviceFeatures: array(string()).optional(),
11353
11389
  autoEligible: boolean().optional(),
11390
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11391
+ profileHint: CamProfileSchema.optional(),
11354
11392
  metadata: record(string(), unknown()).optional(),
11355
11393
  /** Required when kind === 'derived' — the source camStreamId the
11356
11394
  * derived broker reads its encoded plane from.
@@ -29893,6 +29931,77 @@ method(object({
29893
29931
  auth: "protected"
29894
29932
  });
29895
29933
  /**
29934
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
29935
+ * something it knows about is happening (a robot vacuum cleaning, a machine
29936
+ * running, a gate open) and lowers when it stops.
29937
+ *
29938
+ * It is a level, not an edge. The sensor triggers the recorder already listens
29939
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
29940
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
29941
+ * still happening" cannot be expressed as an edge plus a post-buffer without
29942
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
29943
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
29944
+ * which records the dock for that long after every short one. So the recorder
29945
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
29946
+ * own post-buffer once it falls.
29947
+ *
29948
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
29949
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
29950
+ * writes this slice on every change; consumers subscribe to the kernel's
29951
+ * `DeviceStateChanged` for it and read it back through
29952
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
29953
+ * against the device (D224, D8/D11).
29954
+ *
29955
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
29956
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
29957
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
29958
+ * about the camera, on the camera.
29959
+ */
29960
+ var RecordingSignalStatusSchema = object({
29961
+ /** True while the device asks to be recorded. */
29962
+ active: boolean(),
29963
+ /**
29964
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
29965
+ * …). Free text for the log line and the UI badge; the recorder never
29966
+ * branches on it.
29967
+ */
29968
+ reason: string(),
29969
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
29970
+ lastChangedAt: number()
29971
+ });
29972
+ /** The runtime-state slice: the status plus the clock every slice carries. */
29973
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
29974
+ var recordingSignalCapability = {
29975
+ name: "recording-signal",
29976
+ scope: "device",
29977
+ deviceNative: true,
29978
+ mode: "singleton",
29979
+ deviceTypes: [DeviceType.Camera],
29980
+ methods: {
29981
+ /** The current level, straight from the slice the provider keeps fresh. */
29982
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
29983
+ status: {
29984
+ schema: RecordingSignalStatusSchema,
29985
+ kind: "push",
29986
+ empty: {
29987
+ active: false,
29988
+ reason: "unknown",
29989
+ lastChangedAt: 0
29990
+ }
29991
+ },
29992
+ runtimeState: RecordingSignalRuntimeStateSchema,
29993
+ /**
29994
+ * Runtime-state durability: **session** — a restored `active: true` from
29995
+ * before a restart is exactly the stale level the recorder's reconcile bound
29996
+ * exists to end, and the provider re-derives the true level on activation
29997
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
29998
+ *
29999
+ * See `RuntimeStateDurability`. Enforced by
30000
+ * `scripts/check-runtime-state-durability.ts`.
30001
+ */
30002
+ durability: "session"
30003
+ };
30004
+ /**
29896
30005
  * scene-monitor — device-scoped reference-region state cap. An operator marks
29897
30006
  * a rect ROI on a camera frame and names one or more states; the engine
29898
30007
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30390,6 +30499,8 @@ var CamStreamDescriptorSchema = object({
30390
30499
  deviceFeatures: array(string()).optional(),
30391
30500
  /** Eligible for automatic profile assignment. Absent = `true`. */
30392
30501
  autoEligible: boolean().optional(),
30502
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30503
+ profileHint: CamProfileSchema.optional(),
30393
30504
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30394
30505
  metadata: record(string(), unknown()).optional()
30395
30506
  });
@@ -32529,6 +32640,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32529
32640
  pressureSensor: pressureSensorCapability,
32530
32641
  privacyMask: privacyMaskCapability,
32531
32642
  ptzAutotrack: ptzAutotrackCapability,
32643
+ recordingSignal: recordingSignalCapability,
32532
32644
  sceneMonitor: sceneMonitorCapability,
32533
32645
  scriptRunner: scriptRunnerCapability,
32534
32646
  smoke: smokeCapability,
@@ -38276,6 +38388,12 @@ Object.freeze({
38276
38388
  addonId: null,
38277
38389
  access: "view"
38278
38390
  },
38391
+ "recordingSignal.getStatus": {
38392
+ capName: "recording-signal",
38393
+ capScope: "device",
38394
+ addonId: null,
38395
+ access: "view"
38396
+ },
38279
38397
  "sceneMonitor.captureReference": {
38280
38398
  capName: "scene-monitor",
38281
38399
  capScope: "device",
@@ -41268,6 +41386,11 @@ Object.freeze({
41268
41386
  form: "single",
41269
41387
  optional: true
41270
41388
  }],
41389
+ "recordingSignal.getStatus": [{
41390
+ name: "deviceId",
41391
+ form: "single",
41392
+ optional: false
41393
+ }],
41271
41394
  "sceneMonitor.captureReference": [{
41272
41395
  name: "deviceId",
41273
41396
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-unifi",
3
- "version": "0.2.71",
3
+ "version": "0.2.73",
4
4
  "description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
5
5
  "keywords": [
6
6
  "camstack",