@camstack/addon-provider-wyze 0.2.75 → 0.2.77

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
@@ -5438,6 +5438,12 @@ Object.fromEntries([
5438
5438
  icon: "move",
5439
5439
  order: 40
5440
5440
  },
5441
+ {
5442
+ id: "navigation",
5443
+ label: "Navigation",
5444
+ icon: "compass",
5445
+ order: 41
5446
+ },
5441
5447
  {
5442
5448
  id: "consumables",
5443
5449
  label: "Consumables",
@@ -6471,6 +6477,21 @@ var CameraStreamSchema = object({
6471
6477
  */
6472
6478
  autoEligible: boolean().optional(),
6473
6479
  /**
6480
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6481
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6482
+ * stream. Consulted by the broker's automatic ranking
6483
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6484
+ * an operator's manual assignment still wins, and an absent hint is the
6485
+ * pixel-ranked default every camera had before this field existed.
6486
+ *
6487
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6488
+ * storage class is written for on its own (`recordings` is high|mid,
6489
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6490
+ * camera's single 720p relay is a `low` in every respect except the slot the
6491
+ * heuristic put it in.
6492
+ */
6493
+ profileHint: CamProfileSchema.optional(),
6494
+ /**
6474
6495
  * Transport-specific opaque metadata. The broker passes it through to
6475
6496
  * the source reader without inspecting it. Currently used by
6476
6497
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7920,7 +7941,22 @@ var RecordingTriggersSchema = object({
7920
7941
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7921
7942
  * registrare.
7922
7943
  */
7923
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7944
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7945
+ /**
7946
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7947
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7948
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7949
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7950
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7951
+ *
7952
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7953
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7954
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7955
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7956
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7957
+ * (`holdTrigger` / `releaseTrigger`).
7958
+ */
7959
+ deviceSignal: boolean().optional()
7924
7960
  });
7925
7961
  /**
7926
7962
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11384,6 +11420,8 @@ method(object({
11384
11420
  label: string().optional(),
11385
11421
  deviceFeatures: array(string()).optional(),
11386
11422
  autoEligible: boolean().optional(),
11423
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11424
+ profileHint: CamProfileSchema.optional(),
11387
11425
  metadata: record(string(), unknown()).optional(),
11388
11426
  /** Required when kind === 'derived' — the source camStreamId the
11389
11427
  * derived broker reads its encoded plane from.
@@ -30038,6 +30076,77 @@ method(object({
30038
30076
  auth: "protected"
30039
30077
  });
30040
30078
  /**
30079
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
30080
+ * something it knows about is happening (a robot vacuum cleaning, a machine
30081
+ * running, a gate open) and lowers when it stops.
30082
+ *
30083
+ * It is a level, not an edge. The sensor triggers the recorder already listens
30084
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30085
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30086
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30087
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30088
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30089
+ * which records the dock for that long after every short one. So the recorder
30090
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30091
+ * own post-buffer once it falls.
30092
+ *
30093
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30094
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30095
+ * writes this slice on every change; consumers subscribe to the kernel's
30096
+ * `DeviceStateChanged` for it and read it back through
30097
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30098
+ * against the device (D224, D8/D11).
30099
+ *
30100
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30101
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30102
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30103
+ * about the camera, on the camera.
30104
+ */
30105
+ var RecordingSignalStatusSchema = object({
30106
+ /** True while the device asks to be recorded. */
30107
+ active: boolean(),
30108
+ /**
30109
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30110
+ * …). Free text for the log line and the UI badge; the recorder never
30111
+ * branches on it.
30112
+ */
30113
+ reason: string(),
30114
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30115
+ lastChangedAt: number()
30116
+ });
30117
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30118
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30119
+ var recordingSignalCapability = {
30120
+ name: "recording-signal",
30121
+ scope: "device",
30122
+ deviceNative: true,
30123
+ mode: "singleton",
30124
+ deviceTypes: [DeviceType.Camera],
30125
+ methods: {
30126
+ /** The current level, straight from the slice the provider keeps fresh. */
30127
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30128
+ status: {
30129
+ schema: RecordingSignalStatusSchema,
30130
+ kind: "push",
30131
+ empty: {
30132
+ active: false,
30133
+ reason: "unknown",
30134
+ lastChangedAt: 0
30135
+ }
30136
+ },
30137
+ runtimeState: RecordingSignalRuntimeStateSchema,
30138
+ /**
30139
+ * Runtime-state durability: **session** — a restored `active: true` from
30140
+ * before a restart is exactly the stale level the recorder's reconcile bound
30141
+ * exists to end, and the provider re-derives the true level on activation
30142
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30143
+ *
30144
+ * See `RuntimeStateDurability`. Enforced by
30145
+ * `scripts/check-runtime-state-durability.ts`.
30146
+ */
30147
+ durability: "session"
30148
+ };
30149
+ /**
30041
30150
  * scene-monitor — device-scoped reference-region state cap. An operator marks
30042
30151
  * a rect ROI on a camera frame and names one or more states; the engine
30043
30152
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30535,6 +30644,8 @@ var CamStreamDescriptorSchema = object({
30535
30644
  deviceFeatures: array(string()).optional(),
30536
30645
  /** Eligible for automatic profile assignment. Absent = `true`. */
30537
30646
  autoEligible: boolean().optional(),
30647
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30648
+ profileHint: CamProfileSchema.optional(),
30538
30649
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30539
30650
  metadata: record(string(), unknown()).optional()
30540
30651
  });
@@ -32674,6 +32785,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32674
32785
  pressureSensor: pressureSensorCapability,
32675
32786
  privacyMask: privacyMaskCapability,
32676
32787
  ptzAutotrack: ptzAutotrackCapability,
32788
+ recordingSignal: recordingSignalCapability,
32677
32789
  sceneMonitor: sceneMonitorCapability,
32678
32790
  scriptRunner: scriptRunnerCapability,
32679
32791
  smoke: smokeCapability,
@@ -38421,6 +38533,12 @@ Object.freeze({
38421
38533
  addonId: null,
38422
38534
  access: "view"
38423
38535
  },
38536
+ "recordingSignal.getStatus": {
38537
+ capName: "recording-signal",
38538
+ capScope: "device",
38539
+ addonId: null,
38540
+ access: "view"
38541
+ },
38424
38542
  "sceneMonitor.captureReference": {
38425
38543
  capName: "scene-monitor",
38426
38544
  capScope: "device",
@@ -41413,6 +41531,11 @@ Object.freeze({
41413
41531
  form: "single",
41414
41532
  optional: true
41415
41533
  }],
41534
+ "recordingSignal.getStatus": [{
41535
+ name: "deviceId",
41536
+ form: "single",
41537
+ optional: false
41538
+ }],
41416
41539
  "sceneMonitor.captureReference": [{
41417
41540
  name: "deviceId",
41418
41541
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5417,6 +5417,12 @@ Object.fromEntries([
5417
5417
  icon: "move",
5418
5418
  order: 40
5419
5419
  },
5420
+ {
5421
+ id: "navigation",
5422
+ label: "Navigation",
5423
+ icon: "compass",
5424
+ order: 41
5425
+ },
5420
5426
  {
5421
5427
  id: "consumables",
5422
5428
  label: "Consumables",
@@ -6450,6 +6456,21 @@ var CameraStreamSchema = object({
6450
6456
  */
6451
6457
  autoEligible: boolean().optional(),
6452
6458
  /**
6459
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6460
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6461
+ * stream. Consulted by the broker's automatic ranking
6462
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6463
+ * an operator's manual assignment still wins, and an absent hint is the
6464
+ * pixel-ranked default every camera had before this field existed.
6465
+ *
6466
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6467
+ * storage class is written for on its own (`recordings` is high|mid,
6468
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6469
+ * camera's single 720p relay is a `low` in every respect except the slot the
6470
+ * heuristic put it in.
6471
+ */
6472
+ profileHint: CamProfileSchema.optional(),
6473
+ /**
6453
6474
  * Transport-specific opaque metadata. The broker passes it through to
6454
6475
  * the source reader without inspecting it. Currently used by
6455
6476
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7899,7 +7920,22 @@ var RecordingTriggersSchema = object({
7899
7920
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7900
7921
  * registrare.
7901
7922
  */
7902
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7923
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7924
+ /**
7925
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7926
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7927
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7928
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7929
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7930
+ *
7931
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7932
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7933
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7934
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7935
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7936
+ * (`holdTrigger` / `releaseTrigger`).
7937
+ */
7938
+ deviceSignal: boolean().optional()
7903
7939
  });
7904
7940
  /**
7905
7941
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11363,6 +11399,8 @@ method(object({
11363
11399
  label: string().optional(),
11364
11400
  deviceFeatures: array(string()).optional(),
11365
11401
  autoEligible: boolean().optional(),
11402
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11403
+ profileHint: CamProfileSchema.optional(),
11366
11404
  metadata: record(string(), unknown()).optional(),
11367
11405
  /** Required when kind === 'derived' — the source camStreamId the
11368
11406
  * derived broker reads its encoded plane from.
@@ -30017,6 +30055,77 @@ method(object({
30017
30055
  auth: "protected"
30018
30056
  });
30019
30057
  /**
30058
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
30059
+ * something it knows about is happening (a robot vacuum cleaning, a machine
30060
+ * running, a gate open) and lowers when it stops.
30061
+ *
30062
+ * It is a level, not an edge. The sensor triggers the recorder already listens
30063
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30064
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30065
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30066
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30067
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30068
+ * which records the dock for that long after every short one. So the recorder
30069
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30070
+ * own post-buffer once it falls.
30071
+ *
30072
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30073
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30074
+ * writes this slice on every change; consumers subscribe to the kernel's
30075
+ * `DeviceStateChanged` for it and read it back through
30076
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30077
+ * against the device (D224, D8/D11).
30078
+ *
30079
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30080
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30081
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30082
+ * about the camera, on the camera.
30083
+ */
30084
+ var RecordingSignalStatusSchema = object({
30085
+ /** True while the device asks to be recorded. */
30086
+ active: boolean(),
30087
+ /**
30088
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30089
+ * …). Free text for the log line and the UI badge; the recorder never
30090
+ * branches on it.
30091
+ */
30092
+ reason: string(),
30093
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30094
+ lastChangedAt: number()
30095
+ });
30096
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30097
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30098
+ var recordingSignalCapability = {
30099
+ name: "recording-signal",
30100
+ scope: "device",
30101
+ deviceNative: true,
30102
+ mode: "singleton",
30103
+ deviceTypes: [DeviceType.Camera],
30104
+ methods: {
30105
+ /** The current level, straight from the slice the provider keeps fresh. */
30106
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30107
+ status: {
30108
+ schema: RecordingSignalStatusSchema,
30109
+ kind: "push",
30110
+ empty: {
30111
+ active: false,
30112
+ reason: "unknown",
30113
+ lastChangedAt: 0
30114
+ }
30115
+ },
30116
+ runtimeState: RecordingSignalRuntimeStateSchema,
30117
+ /**
30118
+ * Runtime-state durability: **session** — a restored `active: true` from
30119
+ * before a restart is exactly the stale level the recorder's reconcile bound
30120
+ * exists to end, and the provider re-derives the true level on activation
30121
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30122
+ *
30123
+ * See `RuntimeStateDurability`. Enforced by
30124
+ * `scripts/check-runtime-state-durability.ts`.
30125
+ */
30126
+ durability: "session"
30127
+ };
30128
+ /**
30020
30129
  * scene-monitor — device-scoped reference-region state cap. An operator marks
30021
30130
  * a rect ROI on a camera frame and names one or more states; the engine
30022
30131
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30514,6 +30623,8 @@ var CamStreamDescriptorSchema = object({
30514
30623
  deviceFeatures: array(string()).optional(),
30515
30624
  /** Eligible for automatic profile assignment. Absent = `true`. */
30516
30625
  autoEligible: boolean().optional(),
30626
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30627
+ profileHint: CamProfileSchema.optional(),
30517
30628
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30518
30629
  metadata: record(string(), unknown()).optional()
30519
30630
  });
@@ -32653,6 +32764,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32653
32764
  pressureSensor: pressureSensorCapability,
32654
32765
  privacyMask: privacyMaskCapability,
32655
32766
  ptzAutotrack: ptzAutotrackCapability,
32767
+ recordingSignal: recordingSignalCapability,
32656
32768
  sceneMonitor: sceneMonitorCapability,
32657
32769
  scriptRunner: scriptRunnerCapability,
32658
32770
  smoke: smokeCapability,
@@ -38400,6 +38512,12 @@ Object.freeze({
38400
38512
  addonId: null,
38401
38513
  access: "view"
38402
38514
  },
38515
+ "recordingSignal.getStatus": {
38516
+ capName: "recording-signal",
38517
+ capScope: "device",
38518
+ addonId: null,
38519
+ access: "view"
38520
+ },
38403
38521
  "sceneMonitor.captureReference": {
38404
38522
  capName: "scene-monitor",
38405
38523
  capScope: "device",
@@ -41392,6 +41510,11 @@ Object.freeze({
41392
41510
  form: "single",
41393
41511
  optional: true
41394
41512
  }],
41513
+ "recordingSignal.getStatus": [{
41514
+ name: "deviceId",
41515
+ form: "single",
41516
+ optional: false
41517
+ }],
41395
41518
  "sceneMonitor.captureReference": [{
41396
41519
  name: "deviceId",
41397
41520
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-wyze",
3
- "version": "0.2.75",
3
+ "version": "0.2.77",
4
4
  "description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
5
5
  "keywords": [
6
6
  "camstack",