@camstack/addon-provider-tuya 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
@@ -6226,6 +6226,12 @@ Object.fromEntries([
6226
6226
  icon: "move",
6227
6227
  order: 40
6228
6228
  },
6229
+ {
6230
+ id: "navigation",
6231
+ label: "Navigation",
6232
+ icon: "compass",
6233
+ order: 41
6234
+ },
6229
6235
  {
6230
6236
  id: "consumables",
6231
6237
  label: "Consumables",
@@ -7259,6 +7265,21 @@ var CameraStreamSchema = object({
7259
7265
  */
7260
7266
  autoEligible: boolean().optional(),
7261
7267
  /**
7268
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
7269
+ * whose only sensible role is the low-bandwidth one, `high` for a main
7270
+ * stream. Consulted by the broker's automatic ranking
7271
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
7272
+ * an operator's manual assignment still wins, and an absent hint is the
7273
+ * pixel-ranked default every camera had before this field existed.
7274
+ *
7275
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
7276
+ * storage class is written for on its own (`recordings` is high|mid,
7277
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
7278
+ * camera's single 720p relay is a `low` in every respect except the slot the
7279
+ * heuristic put it in.
7280
+ */
7281
+ profileHint: CamProfileSchema.optional(),
7282
+ /**
7262
7283
  * Transport-specific opaque metadata. The broker passes it through to
7263
7284
  * the source reader without inspecting it. Currently used by
7264
7285
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -8708,7 +8729,22 @@ var RecordingTriggersSchema = object({
8708
8729
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
8709
8730
  * registrare.
8710
8731
  */
8711
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
8732
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
8733
+ /**
8734
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
8735
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
8736
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
8737
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
8738
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
8739
+ *
8740
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
8741
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
8742
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
8743
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
8744
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
8745
+ * (`holdTrigger` / `releaseTrigger`).
8746
+ */
8747
+ deviceSignal: boolean().optional()
8712
8748
  });
8713
8749
  /**
8714
8750
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -12172,6 +12208,8 @@ method(object({
12172
12208
  label: string().optional(),
12173
12209
  deviceFeatures: array(string()).optional(),
12174
12210
  autoEligible: boolean().optional(),
12211
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
12212
+ profileHint: CamProfileSchema.optional(),
12175
12213
  metadata: record(string(), unknown()).optional(),
12176
12214
  /** Required when kind === 'derived' — the source camStreamId the
12177
12215
  * derived broker reads its encoded plane from.
@@ -30722,6 +30760,77 @@ method(object({
30722
30760
  auth: "protected"
30723
30761
  });
30724
30762
  /**
30763
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
30764
+ * something it knows about is happening (a robot vacuum cleaning, a machine
30765
+ * running, a gate open) and lowers when it stops.
30766
+ *
30767
+ * It is a level, not an edge. The sensor triggers the recorder already listens
30768
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30769
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30770
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30771
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30772
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30773
+ * which records the dock for that long after every short one. So the recorder
30774
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30775
+ * own post-buffer once it falls.
30776
+ *
30777
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30778
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30779
+ * writes this slice on every change; consumers subscribe to the kernel's
30780
+ * `DeviceStateChanged` for it and read it back through
30781
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30782
+ * against the device (D224, D8/D11).
30783
+ *
30784
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30785
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30786
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30787
+ * about the camera, on the camera.
30788
+ */
30789
+ var RecordingSignalStatusSchema = object({
30790
+ /** True while the device asks to be recorded. */
30791
+ active: boolean(),
30792
+ /**
30793
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30794
+ * …). Free text for the log line and the UI badge; the recorder never
30795
+ * branches on it.
30796
+ */
30797
+ reason: string(),
30798
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30799
+ lastChangedAt: number()
30800
+ });
30801
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30802
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30803
+ var recordingSignalCapability = {
30804
+ name: "recording-signal",
30805
+ scope: "device",
30806
+ deviceNative: true,
30807
+ mode: "singleton",
30808
+ deviceTypes: [DeviceType.Camera],
30809
+ methods: {
30810
+ /** The current level, straight from the slice the provider keeps fresh. */
30811
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30812
+ status: {
30813
+ schema: RecordingSignalStatusSchema,
30814
+ kind: "push",
30815
+ empty: {
30816
+ active: false,
30817
+ reason: "unknown",
30818
+ lastChangedAt: 0
30819
+ }
30820
+ },
30821
+ runtimeState: RecordingSignalRuntimeStateSchema,
30822
+ /**
30823
+ * Runtime-state durability: **session** — a restored `active: true` from
30824
+ * before a restart is exactly the stale level the recorder's reconcile bound
30825
+ * exists to end, and the provider re-derives the true level on activation
30826
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30827
+ *
30828
+ * See `RuntimeStateDurability`. Enforced by
30829
+ * `scripts/check-runtime-state-durability.ts`.
30830
+ */
30831
+ durability: "session"
30832
+ };
30833
+ /**
30725
30834
  * scene-monitor — device-scoped reference-region state cap. An operator marks
30726
30835
  * a rect ROI on a camera frame and names one or more states; the engine
30727
30836
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -31219,6 +31328,8 @@ var CamStreamDescriptorSchema = object({
31219
31328
  deviceFeatures: array(string()).optional(),
31220
31329
  /** Eligible for automatic profile assignment. Absent = `true`. */
31221
31330
  autoEligible: boolean().optional(),
31331
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
31332
+ profileHint: CamProfileSchema.optional(),
31222
31333
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
31223
31334
  metadata: record(string(), unknown()).optional()
31224
31335
  });
@@ -33358,6 +33469,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33358
33469
  pressureSensor: pressureSensorCapability,
33359
33470
  privacyMask: privacyMaskCapability,
33360
33471
  ptzAutotrack: ptzAutotrackCapability,
33472
+ recordingSignal: recordingSignalCapability,
33361
33473
  sceneMonitor: sceneMonitorCapability,
33362
33474
  scriptRunner: scriptRunnerCapability,
33363
33475
  smoke: smokeCapability,
@@ -39105,6 +39217,12 @@ Object.freeze({
39105
39217
  addonId: null,
39106
39218
  access: "view"
39107
39219
  },
39220
+ "recordingSignal.getStatus": {
39221
+ capName: "recording-signal",
39222
+ capScope: "device",
39223
+ addonId: null,
39224
+ access: "view"
39225
+ },
39108
39226
  "sceneMonitor.captureReference": {
39109
39227
  capName: "scene-monitor",
39110
39228
  capScope: "device",
@@ -42097,6 +42215,11 @@ Object.freeze({
42097
42215
  form: "single",
42098
42216
  optional: true
42099
42217
  }],
42218
+ "recordingSignal.getStatus": [{
42219
+ name: "deviceId",
42220
+ form: "single",
42221
+ optional: false
42222
+ }],
42100
42223
  "sceneMonitor.captureReference": [{
42101
42224
  name: "deviceId",
42102
42225
  form: "single",
package/dist/addon.mjs CHANGED
@@ -6225,6 +6225,12 @@ Object.fromEntries([
6225
6225
  icon: "move",
6226
6226
  order: 40
6227
6227
  },
6228
+ {
6229
+ id: "navigation",
6230
+ label: "Navigation",
6231
+ icon: "compass",
6232
+ order: 41
6233
+ },
6228
6234
  {
6229
6235
  id: "consumables",
6230
6236
  label: "Consumables",
@@ -7258,6 +7264,21 @@ var CameraStreamSchema = object({
7258
7264
  */
7259
7265
  autoEligible: boolean().optional(),
7260
7266
  /**
7267
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
7268
+ * whose only sensible role is the low-bandwidth one, `high` for a main
7269
+ * stream. Consulted by the broker's automatic ranking
7270
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
7271
+ * an operator's manual assignment still wins, and an absent hint is the
7272
+ * pixel-ranked default every camera had before this field existed.
7273
+ *
7274
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
7275
+ * storage class is written for on its own (`recordings` is high|mid,
7276
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
7277
+ * camera's single 720p relay is a `low` in every respect except the slot the
7278
+ * heuristic put it in.
7279
+ */
7280
+ profileHint: CamProfileSchema.optional(),
7281
+ /**
7261
7282
  * Transport-specific opaque metadata. The broker passes it through to
7262
7283
  * the source reader without inspecting it. Currently used by
7263
7284
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -8707,7 +8728,22 @@ var RecordingTriggersSchema = object({
8707
8728
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
8708
8729
  * registrare.
8709
8730
  */
8710
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
8731
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
8732
+ /**
8733
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
8734
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
8735
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
8736
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
8737
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
8738
+ *
8739
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
8740
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
8741
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
8742
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
8743
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
8744
+ * (`holdTrigger` / `releaseTrigger`).
8745
+ */
8746
+ deviceSignal: boolean().optional()
8711
8747
  });
8712
8748
  /**
8713
8749
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -12171,6 +12207,8 @@ method(object({
12171
12207
  label: string().optional(),
12172
12208
  deviceFeatures: array(string()).optional(),
12173
12209
  autoEligible: boolean().optional(),
12210
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
12211
+ profileHint: CamProfileSchema.optional(),
12174
12212
  metadata: record(string(), unknown()).optional(),
12175
12213
  /** Required when kind === 'derived' — the source camStreamId the
12176
12214
  * derived broker reads its encoded plane from.
@@ -30721,6 +30759,77 @@ method(object({
30721
30759
  auth: "protected"
30722
30760
  });
30723
30761
  /**
30762
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
30763
+ * something it knows about is happening (a robot vacuum cleaning, a machine
30764
+ * running, a gate open) and lowers when it stops.
30765
+ *
30766
+ * It is a level, not an edge. The sensor triggers the recorder already listens
30767
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30768
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30769
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30770
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30771
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30772
+ * which records the dock for that long after every short one. So the recorder
30773
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30774
+ * own post-buffer once it falls.
30775
+ *
30776
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30777
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30778
+ * writes this slice on every change; consumers subscribe to the kernel's
30779
+ * `DeviceStateChanged` for it and read it back through
30780
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30781
+ * against the device (D224, D8/D11).
30782
+ *
30783
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30784
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30785
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30786
+ * about the camera, on the camera.
30787
+ */
30788
+ var RecordingSignalStatusSchema = object({
30789
+ /** True while the device asks to be recorded. */
30790
+ active: boolean(),
30791
+ /**
30792
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30793
+ * …). Free text for the log line and the UI badge; the recorder never
30794
+ * branches on it.
30795
+ */
30796
+ reason: string(),
30797
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30798
+ lastChangedAt: number()
30799
+ });
30800
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30801
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30802
+ var recordingSignalCapability = {
30803
+ name: "recording-signal",
30804
+ scope: "device",
30805
+ deviceNative: true,
30806
+ mode: "singleton",
30807
+ deviceTypes: [DeviceType.Camera],
30808
+ methods: {
30809
+ /** The current level, straight from the slice the provider keeps fresh. */
30810
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30811
+ status: {
30812
+ schema: RecordingSignalStatusSchema,
30813
+ kind: "push",
30814
+ empty: {
30815
+ active: false,
30816
+ reason: "unknown",
30817
+ lastChangedAt: 0
30818
+ }
30819
+ },
30820
+ runtimeState: RecordingSignalRuntimeStateSchema,
30821
+ /**
30822
+ * Runtime-state durability: **session** — a restored `active: true` from
30823
+ * before a restart is exactly the stale level the recorder's reconcile bound
30824
+ * exists to end, and the provider re-derives the true level on activation
30825
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30826
+ *
30827
+ * See `RuntimeStateDurability`. Enforced by
30828
+ * `scripts/check-runtime-state-durability.ts`.
30829
+ */
30830
+ durability: "session"
30831
+ };
30832
+ /**
30724
30833
  * scene-monitor — device-scoped reference-region state cap. An operator marks
30725
30834
  * a rect ROI on a camera frame and names one or more states; the engine
30726
30835
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -31218,6 +31327,8 @@ var CamStreamDescriptorSchema = object({
31218
31327
  deviceFeatures: array(string()).optional(),
31219
31328
  /** Eligible for automatic profile assignment. Absent = `true`. */
31220
31329
  autoEligible: boolean().optional(),
31330
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
31331
+ profileHint: CamProfileSchema.optional(),
31221
31332
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
31222
31333
  metadata: record(string(), unknown()).optional()
31223
31334
  });
@@ -33357,6 +33468,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33357
33468
  pressureSensor: pressureSensorCapability,
33358
33469
  privacyMask: privacyMaskCapability,
33359
33470
  ptzAutotrack: ptzAutotrackCapability,
33471
+ recordingSignal: recordingSignalCapability,
33360
33472
  sceneMonitor: sceneMonitorCapability,
33361
33473
  scriptRunner: scriptRunnerCapability,
33362
33474
  smoke: smokeCapability,
@@ -39104,6 +39216,12 @@ Object.freeze({
39104
39216
  addonId: null,
39105
39217
  access: "view"
39106
39218
  },
39219
+ "recordingSignal.getStatus": {
39220
+ capName: "recording-signal",
39221
+ capScope: "device",
39222
+ addonId: null,
39223
+ access: "view"
39224
+ },
39107
39225
  "sceneMonitor.captureReference": {
39108
39226
  capName: "scene-monitor",
39109
39227
  capScope: "device",
@@ -42096,6 +42214,11 @@ Object.freeze({
42096
42214
  form: "single",
42097
42215
  optional: true
42098
42216
  }],
42217
+ "recordingSignal.getStatus": [{
42218
+ name: "deviceId",
42219
+ form: "single",
42220
+ optional: false
42221
+ }],
42099
42222
  "sceneMonitor.captureReference": [{
42100
42223
  name: "deviceId",
42101
42224
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-tuya",
3
- "version": "0.2.71",
3
+ "version": "0.2.73",
4
4
  "description": "Tuya / Smart Life device-provider addon for CamStack — account-onboarded (Tuya IoT cloud fetch of device localKeys) + LOCAL DP control via the @apocaliss92/nodetuya encrypted-LAN client, exposing switch / water-heater-family kettle entities",
5
5
  "keywords": [
6
6
  "camstack",