@camstack/addon-provider-dreo 0.2.75 → 0.2.76
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 +47 -34
- package/dist/addon.mjs +47 -34
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7885,17 +7885,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
7885
7885
|
/**
|
|
7886
7886
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7887
7887
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7888
|
-
* - `off`
|
|
7889
|
-
* - `events`
|
|
7890
|
-
* - `continuous`
|
|
7891
|
-
*
|
|
7892
|
-
*
|
|
7893
|
-
*
|
|
7888
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7889
|
+
* - `events` — every band records around triggers only.
|
|
7890
|
+
* - `continuous` — at least one band records continuously.
|
|
7891
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
7892
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
7893
|
+
* is no schedule to author, because there is no hour to program — see
|
|
7894
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
7895
|
+
*
|
|
7896
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
7897
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
7898
|
+
* has no effect.
|
|
7899
|
+
*
|
|
7900
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
7901
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
7902
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
7903
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
7904
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
7894
7905
|
*/
|
|
7895
7906
|
var RecordingStorageModeSchema = _enum([
|
|
7896
7907
|
"off",
|
|
7897
7908
|
"events",
|
|
7898
|
-
"continuous"
|
|
7909
|
+
"continuous",
|
|
7910
|
+
"on-device-decision"
|
|
7899
7911
|
]);
|
|
7900
7912
|
/**
|
|
7901
7913
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -7945,22 +7957,7 @@ var RecordingTriggersSchema = object({
|
|
|
7945
7957
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7946
7958
|
* registrare.
|
|
7947
7959
|
*/
|
|
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()
|
|
7960
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7964
7961
|
});
|
|
7965
7962
|
/**
|
|
7966
7963
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8044,8 +8041,29 @@ var RecordingConfigSchema = object({
|
|
|
8044
8041
|
* "off" is the absence of a covering band, never a band value.
|
|
8045
8042
|
*/
|
|
8046
8043
|
bands: array(RecordingBandSchema).default([]),
|
|
8044
|
+
/**
|
|
8045
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8046
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8047
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8048
|
+
* recording intent that is not a band.
|
|
8049
|
+
*
|
|
8050
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8051
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8052
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8053
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8054
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8055
|
+
* job however long it is, and closes one pad after the fall.
|
|
8056
|
+
*
|
|
8057
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8058
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8059
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8060
|
+
*/
|
|
8061
|
+
deviceDecision: boolean().optional(),
|
|
8047
8062
|
retention: RecordingRetentionSchema.optional()
|
|
8048
|
-
}).strict()
|
|
8063
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8064
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8065
|
+
path: ["bands"]
|
|
8066
|
+
});
|
|
8049
8067
|
/**
|
|
8050
8068
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8051
8069
|
*
|
|
@@ -21078,11 +21096,7 @@ var CameraAudioStatusSchema = object({
|
|
|
21078
21096
|
});
|
|
21079
21097
|
/** Recording block — null when no recording cap is active for this device. */
|
|
21080
21098
|
var CameraRecordingStatusSchema = object({
|
|
21081
|
-
mode:
|
|
21082
|
-
"off",
|
|
21083
|
-
"continuous",
|
|
21084
|
-
"events"
|
|
21085
|
-
]),
|
|
21099
|
+
mode: RecordingStorageModeSchema,
|
|
21086
21100
|
active: boolean(),
|
|
21087
21101
|
storageBytes: number()
|
|
21088
21102
|
});
|
|
@@ -29344,11 +29358,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
29344
29358
|
var RecordingStatusSchema = object({
|
|
29345
29359
|
deviceId: number(),
|
|
29346
29360
|
enabled: boolean(),
|
|
29347
|
-
|
|
29348
|
-
|
|
29349
|
-
|
|
29350
|
-
|
|
29351
|
-
]),
|
|
29361
|
+
/** THE derived storage mode, from the one definition
|
|
29362
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
29363
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
29364
|
+
activeMode: RecordingStorageModeSchema,
|
|
29352
29365
|
nodeId: string(),
|
|
29353
29366
|
storageBytes: number()
|
|
29354
29367
|
});
|
package/dist/addon.mjs
CHANGED
|
@@ -7886,17 +7886,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
7886
7886
|
/**
|
|
7887
7887
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7888
7888
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7889
|
-
* - `off`
|
|
7890
|
-
* - `events`
|
|
7891
|
-
* - `continuous`
|
|
7892
|
-
*
|
|
7893
|
-
*
|
|
7894
|
-
*
|
|
7889
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7890
|
+
* - `events` — every band records around triggers only.
|
|
7891
|
+
* - `continuous` — at least one band records continuously.
|
|
7892
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
7893
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
7894
|
+
* is no schedule to author, because there is no hour to program — see
|
|
7895
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
7896
|
+
*
|
|
7897
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
7898
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
7899
|
+
* has no effect.
|
|
7900
|
+
*
|
|
7901
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
7902
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
7903
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
7904
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
7905
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
7895
7906
|
*/
|
|
7896
7907
|
var RecordingStorageModeSchema = _enum([
|
|
7897
7908
|
"off",
|
|
7898
7909
|
"events",
|
|
7899
|
-
"continuous"
|
|
7910
|
+
"continuous",
|
|
7911
|
+
"on-device-decision"
|
|
7900
7912
|
]);
|
|
7901
7913
|
/**
|
|
7902
7914
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -7946,22 +7958,7 @@ var RecordingTriggersSchema = object({
|
|
|
7946
7958
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7947
7959
|
* registrare.
|
|
7948
7960
|
*/
|
|
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()
|
|
7961
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7965
7962
|
});
|
|
7966
7963
|
/**
|
|
7967
7964
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8045,8 +8042,29 @@ var RecordingConfigSchema = object({
|
|
|
8045
8042
|
* "off" is the absence of a covering band, never a band value.
|
|
8046
8043
|
*/
|
|
8047
8044
|
bands: array(RecordingBandSchema).default([]),
|
|
8045
|
+
/**
|
|
8046
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8047
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8048
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8049
|
+
* recording intent that is not a band.
|
|
8050
|
+
*
|
|
8051
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8052
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8053
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8054
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8055
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8056
|
+
* job however long it is, and closes one pad after the fall.
|
|
8057
|
+
*
|
|
8058
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8059
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8060
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8061
|
+
*/
|
|
8062
|
+
deviceDecision: boolean().optional(),
|
|
8048
8063
|
retention: RecordingRetentionSchema.optional()
|
|
8049
|
-
}).strict()
|
|
8064
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8065
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8066
|
+
path: ["bands"]
|
|
8067
|
+
});
|
|
8050
8068
|
/**
|
|
8051
8069
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8052
8070
|
*
|
|
@@ -21079,11 +21097,7 @@ var CameraAudioStatusSchema = object({
|
|
|
21079
21097
|
});
|
|
21080
21098
|
/** Recording block — null when no recording cap is active for this device. */
|
|
21081
21099
|
var CameraRecordingStatusSchema = object({
|
|
21082
|
-
mode:
|
|
21083
|
-
"off",
|
|
21084
|
-
"continuous",
|
|
21085
|
-
"events"
|
|
21086
|
-
]),
|
|
21100
|
+
mode: RecordingStorageModeSchema,
|
|
21087
21101
|
active: boolean(),
|
|
21088
21102
|
storageBytes: number()
|
|
21089
21103
|
});
|
|
@@ -29345,11 +29359,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
29345
29359
|
var RecordingStatusSchema = object({
|
|
29346
29360
|
deviceId: number(),
|
|
29347
29361
|
enabled: boolean(),
|
|
29348
|
-
|
|
29349
|
-
|
|
29350
|
-
|
|
29351
|
-
|
|
29352
|
-
]),
|
|
29362
|
+
/** THE derived storage mode, from the one definition
|
|
29363
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
29364
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
29365
|
+
activeMode: RecordingStorageModeSchema,
|
|
29353
29366
|
nodeId: string(),
|
|
29354
29367
|
storageBytes: number()
|
|
29355
29368
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-dreo",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.76",
|
|
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",
|