@camstack/addon-provider-homeassistant 1.2.87 → 1.2.89
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 +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/{dist-G7mZomBW.mjs → dist-COeXrW_s.mjs} +124 -1
- package/dist/{dist-BmfTJtD2.js → dist-D3UkTYeb.js} +124 -1
- package/dist/ha-export/ha-export.addon.js +1 -1
- package/dist/ha-export/ha-export.addon.mjs +1 -1
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-D3UkTYeb.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let node_zlib = require("node:zlib");
|
|
5
5
|
//#region src/ha-device-source.ts
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-
|
|
1
|
+
import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-COeXrW_s.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
|
|
4
4
|
//#region src/ha-device-source.ts
|
|
@@ -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
|
|
@@ -8091,7 +8112,22 @@ var RecordingTriggersSchema = object({
|
|
|
8091
8112
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8092
8113
|
* registrare.
|
|
8093
8114
|
*/
|
|
8094
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8115
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
|
|
8116
|
+
/**
|
|
8117
|
+
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
8118
|
+
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
8119
|
+
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
8120
|
+
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
8121
|
+
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
8122
|
+
*
|
|
8123
|
+
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
8124
|
+
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
8125
|
+
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
8126
|
+
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
8127
|
+
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
8128
|
+
* (`holdTrigger` / `releaseTrigger`).
|
|
8129
|
+
*/
|
|
8130
|
+
deviceSignal: boolean().optional()
|
|
8095
8131
|
});
|
|
8096
8132
|
/**
|
|
8097
8133
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -11623,6 +11659,8 @@ method(object({
|
|
|
11623
11659
|
label: string().optional(),
|
|
11624
11660
|
deviceFeatures: array(string()).optional(),
|
|
11625
11661
|
autoEligible: boolean().optional(),
|
|
11662
|
+
/** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
|
|
11663
|
+
profileHint: CamProfileSchema.optional(),
|
|
11626
11664
|
metadata: record(string(), unknown()).optional(),
|
|
11627
11665
|
/** Required when kind === 'derived' — the source camStreamId the
|
|
11628
11666
|
* derived broker reads its encoded plane from.
|
|
@@ -30354,6 +30392,77 @@ method(object({
|
|
|
30354
30392
|
auth: "protected"
|
|
30355
30393
|
});
|
|
30356
30394
|
/**
|
|
30395
|
+
* A camera's own "record me NOW" LEVEL — a signal the device raises while
|
|
30396
|
+
* something it knows about is happening (a robot vacuum cleaning, a machine
|
|
30397
|
+
* running, a gate open) and lowers when it stops.
|
|
30398
|
+
*
|
|
30399
|
+
* It is a level, not an edge. The sensor triggers the recorder already listens
|
|
30400
|
+
* to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
|
|
30401
|
+
* post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
|
|
30402
|
+
* still happening" cannot be expressed as an edge plus a post-buffer without
|
|
30403
|
+
* either re-triggering on a timer (polling — D224 forbids the consumer keeping
|
|
30404
|
+
* the fact fresh) or picking a post-buffer long enough to cover every job,
|
|
30405
|
+
* which records the dock for that long after every short one. So the recorder
|
|
30406
|
+
* reads the LEVEL: it records for as long as `active` is true, plus the band's
|
|
30407
|
+
* own post-buffer once it falls.
|
|
30408
|
+
*
|
|
30409
|
+
* Who owns the fact: the PROVIDER of the device, which already reads the state
|
|
30410
|
+
* the signal is derived from (the vacuum's lifecycle state, for Dreame). It
|
|
30411
|
+
* writes this slice on every change; consumers subscribe to the kernel's
|
|
30412
|
+
* `DeviceStateChanged` for it and read it back through
|
|
30413
|
+
* `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
|
|
30414
|
+
* against the device (D224, D8/D11).
|
|
30415
|
+
*
|
|
30416
|
+
* Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
|
|
30417
|
+
* to Home Assistant, HomeKit and the sensor picker as a thing an operator can
|
|
30418
|
+
* bind, and "the camera wants to record" is not a room sensor. It is a fact
|
|
30419
|
+
* about the camera, on the camera.
|
|
30420
|
+
*/
|
|
30421
|
+
var RecordingSignalStatusSchema = object({
|
|
30422
|
+
/** True while the device asks to be recorded. */
|
|
30423
|
+
active: boolean(),
|
|
30424
|
+
/**
|
|
30425
|
+
* Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
|
|
30426
|
+
* …). Free text for the log line and the UI badge; the recorder never
|
|
30427
|
+
* branches on it.
|
|
30428
|
+
*/
|
|
30429
|
+
reason: string(),
|
|
30430
|
+
/** Ms epoch of the last `active` transition. 0 if never observed. */
|
|
30431
|
+
lastChangedAt: number()
|
|
30432
|
+
});
|
|
30433
|
+
/** The runtime-state slice: the status plus the clock every slice carries. */
|
|
30434
|
+
var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
|
|
30435
|
+
var recordingSignalCapability = {
|
|
30436
|
+
name: "recording-signal",
|
|
30437
|
+
scope: "device",
|
|
30438
|
+
deviceNative: true,
|
|
30439
|
+
mode: "singleton",
|
|
30440
|
+
deviceTypes: [DeviceType.Camera],
|
|
30441
|
+
methods: {
|
|
30442
|
+
/** The current level, straight from the slice the provider keeps fresh. */
|
|
30443
|
+
getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
|
|
30444
|
+
status: {
|
|
30445
|
+
schema: RecordingSignalStatusSchema,
|
|
30446
|
+
kind: "push",
|
|
30447
|
+
empty: {
|
|
30448
|
+
active: false,
|
|
30449
|
+
reason: "unknown",
|
|
30450
|
+
lastChangedAt: 0
|
|
30451
|
+
}
|
|
30452
|
+
},
|
|
30453
|
+
runtimeState: RecordingSignalRuntimeStateSchema,
|
|
30454
|
+
/**
|
|
30455
|
+
* Runtime-state durability: **session** — a restored `active: true` from
|
|
30456
|
+
* before a restart is exactly the stale level the recorder's reconcile bound
|
|
30457
|
+
* exists to end, and the provider re-derives the true level on activation
|
|
30458
|
+
* anyway. Nothing is lost by forgetting it; a lie is avoided.
|
|
30459
|
+
*
|
|
30460
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
30461
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
30462
|
+
*/
|
|
30463
|
+
durability: "session"
|
|
30464
|
+
};
|
|
30465
|
+
/**
|
|
30357
30466
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
30358
30467
|
* a rect ROI on a camera frame and names one or more states; the engine
|
|
30359
30468
|
* (pipeline-analytics, designated post-processing node) reports which state is
|
|
@@ -30851,6 +30960,8 @@ var CamStreamDescriptorSchema = object({
|
|
|
30851
30960
|
deviceFeatures: array(string()).optional(),
|
|
30852
30961
|
/** Eligible for automatic profile assignment. Absent = `true`. */
|
|
30853
30962
|
autoEligible: boolean().optional(),
|
|
30963
|
+
/** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
|
|
30964
|
+
profileHint: CamProfileSchema.optional(),
|
|
30854
30965
|
/** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
|
|
30855
30966
|
metadata: record(string(), unknown()).optional()
|
|
30856
30967
|
});
|
|
@@ -32990,6 +33101,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
32990
33101
|
pressureSensor: pressureSensorCapability,
|
|
32991
33102
|
privacyMask: privacyMaskCapability,
|
|
32992
33103
|
ptzAutotrack: ptzAutotrackCapability,
|
|
33104
|
+
recordingSignal: recordingSignalCapability,
|
|
32993
33105
|
sceneMonitor: sceneMonitorCapability,
|
|
32994
33106
|
scriptRunner: scriptRunnerCapability,
|
|
32995
33107
|
smoke: smokeCapability,
|
|
@@ -38737,6 +38849,12 @@ Object.freeze({
|
|
|
38737
38849
|
addonId: null,
|
|
38738
38850
|
access: "view"
|
|
38739
38851
|
},
|
|
38852
|
+
"recordingSignal.getStatus": {
|
|
38853
|
+
capName: "recording-signal",
|
|
38854
|
+
capScope: "device",
|
|
38855
|
+
addonId: null,
|
|
38856
|
+
access: "view"
|
|
38857
|
+
},
|
|
38740
38858
|
"sceneMonitor.captureReference": {
|
|
38741
38859
|
capName: "scene-monitor",
|
|
38742
38860
|
capScope: "device",
|
|
@@ -41729,6 +41847,11 @@ Object.freeze({
|
|
|
41729
41847
|
form: "single",
|
|
41730
41848
|
optional: true
|
|
41731
41849
|
}],
|
|
41850
|
+
"recordingSignal.getStatus": [{
|
|
41851
|
+
name: "deviceId",
|
|
41852
|
+
form: "single",
|
|
41853
|
+
optional: false
|
|
41854
|
+
}],
|
|
41732
41855
|
"sceneMonitor.captureReference": [{
|
|
41733
41856
|
name: "deviceId",
|
|
41734
41857
|
form: "single",
|
|
@@ -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
|
|
@@ -8091,7 +8112,22 @@ var RecordingTriggersSchema = object({
|
|
|
8091
8112
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8092
8113
|
* registrare.
|
|
8093
8114
|
*/
|
|
8094
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8115
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
|
|
8116
|
+
/**
|
|
8117
|
+
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
8118
|
+
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
8119
|
+
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
8120
|
+
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
8121
|
+
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
8122
|
+
*
|
|
8123
|
+
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
8124
|
+
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
8125
|
+
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
8126
|
+
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
8127
|
+
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
8128
|
+
* (`holdTrigger` / `releaseTrigger`).
|
|
8129
|
+
*/
|
|
8130
|
+
deviceSignal: boolean().optional()
|
|
8095
8131
|
});
|
|
8096
8132
|
/**
|
|
8097
8133
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -11623,6 +11659,8 @@ method(object({
|
|
|
11623
11659
|
label: string().optional(),
|
|
11624
11660
|
deviceFeatures: array(string()).optional(),
|
|
11625
11661
|
autoEligible: boolean().optional(),
|
|
11662
|
+
/** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
|
|
11663
|
+
profileHint: CamProfileSchema.optional(),
|
|
11626
11664
|
metadata: record(string(), unknown()).optional(),
|
|
11627
11665
|
/** Required when kind === 'derived' — the source camStreamId the
|
|
11628
11666
|
* derived broker reads its encoded plane from.
|
|
@@ -30354,6 +30392,77 @@ method(object({
|
|
|
30354
30392
|
auth: "protected"
|
|
30355
30393
|
});
|
|
30356
30394
|
/**
|
|
30395
|
+
* A camera's own "record me NOW" LEVEL — a signal the device raises while
|
|
30396
|
+
* something it knows about is happening (a robot vacuum cleaning, a machine
|
|
30397
|
+
* running, a gate open) and lowers when it stops.
|
|
30398
|
+
*
|
|
30399
|
+
* It is a level, not an edge. The sensor triggers the recorder already listens
|
|
30400
|
+
* to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
|
|
30401
|
+
* post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
|
|
30402
|
+
* still happening" cannot be expressed as an edge plus a post-buffer without
|
|
30403
|
+
* either re-triggering on a timer (polling — D224 forbids the consumer keeping
|
|
30404
|
+
* the fact fresh) or picking a post-buffer long enough to cover every job,
|
|
30405
|
+
* which records the dock for that long after every short one. So the recorder
|
|
30406
|
+
* reads the LEVEL: it records for as long as `active` is true, plus the band's
|
|
30407
|
+
* own post-buffer once it falls.
|
|
30408
|
+
*
|
|
30409
|
+
* Who owns the fact: the PROVIDER of the device, which already reads the state
|
|
30410
|
+
* the signal is derived from (the vacuum's lifecycle state, for Dreame). It
|
|
30411
|
+
* writes this slice on every change; consumers subscribe to the kernel's
|
|
30412
|
+
* `DeviceStateChanged` for it and read it back through
|
|
30413
|
+
* `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
|
|
30414
|
+
* against the device (D224, D8/D11).
|
|
30415
|
+
*
|
|
30416
|
+
* Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
|
|
30417
|
+
* to Home Assistant, HomeKit and the sensor picker as a thing an operator can
|
|
30418
|
+
* bind, and "the camera wants to record" is not a room sensor. It is a fact
|
|
30419
|
+
* about the camera, on the camera.
|
|
30420
|
+
*/
|
|
30421
|
+
var RecordingSignalStatusSchema = object({
|
|
30422
|
+
/** True while the device asks to be recorded. */
|
|
30423
|
+
active: boolean(),
|
|
30424
|
+
/**
|
|
30425
|
+
* Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
|
|
30426
|
+
* …). Free text for the log line and the UI badge; the recorder never
|
|
30427
|
+
* branches on it.
|
|
30428
|
+
*/
|
|
30429
|
+
reason: string(),
|
|
30430
|
+
/** Ms epoch of the last `active` transition. 0 if never observed. */
|
|
30431
|
+
lastChangedAt: number()
|
|
30432
|
+
});
|
|
30433
|
+
/** The runtime-state slice: the status plus the clock every slice carries. */
|
|
30434
|
+
var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
|
|
30435
|
+
var recordingSignalCapability = {
|
|
30436
|
+
name: "recording-signal",
|
|
30437
|
+
scope: "device",
|
|
30438
|
+
deviceNative: true,
|
|
30439
|
+
mode: "singleton",
|
|
30440
|
+
deviceTypes: [DeviceType.Camera],
|
|
30441
|
+
methods: {
|
|
30442
|
+
/** The current level, straight from the slice the provider keeps fresh. */
|
|
30443
|
+
getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
|
|
30444
|
+
status: {
|
|
30445
|
+
schema: RecordingSignalStatusSchema,
|
|
30446
|
+
kind: "push",
|
|
30447
|
+
empty: {
|
|
30448
|
+
active: false,
|
|
30449
|
+
reason: "unknown",
|
|
30450
|
+
lastChangedAt: 0
|
|
30451
|
+
}
|
|
30452
|
+
},
|
|
30453
|
+
runtimeState: RecordingSignalRuntimeStateSchema,
|
|
30454
|
+
/**
|
|
30455
|
+
* Runtime-state durability: **session** — a restored `active: true` from
|
|
30456
|
+
* before a restart is exactly the stale level the recorder's reconcile bound
|
|
30457
|
+
* exists to end, and the provider re-derives the true level on activation
|
|
30458
|
+
* anyway. Nothing is lost by forgetting it; a lie is avoided.
|
|
30459
|
+
*
|
|
30460
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
30461
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
30462
|
+
*/
|
|
30463
|
+
durability: "session"
|
|
30464
|
+
};
|
|
30465
|
+
/**
|
|
30357
30466
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
30358
30467
|
* a rect ROI on a camera frame and names one or more states; the engine
|
|
30359
30468
|
* (pipeline-analytics, designated post-processing node) reports which state is
|
|
@@ -30851,6 +30960,8 @@ var CamStreamDescriptorSchema = object({
|
|
|
30851
30960
|
deviceFeatures: array(string()).optional(),
|
|
30852
30961
|
/** Eligible for automatic profile assignment. Absent = `true`. */
|
|
30853
30962
|
autoEligible: boolean().optional(),
|
|
30963
|
+
/** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
|
|
30964
|
+
profileHint: CamProfileSchema.optional(),
|
|
30854
30965
|
/** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
|
|
30855
30966
|
metadata: record(string(), unknown()).optional()
|
|
30856
30967
|
});
|
|
@@ -32990,6 +33101,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
32990
33101
|
pressureSensor: pressureSensorCapability,
|
|
32991
33102
|
privacyMask: privacyMaskCapability,
|
|
32992
33103
|
ptzAutotrack: ptzAutotrackCapability,
|
|
33104
|
+
recordingSignal: recordingSignalCapability,
|
|
32993
33105
|
sceneMonitor: sceneMonitorCapability,
|
|
32994
33106
|
scriptRunner: scriptRunnerCapability,
|
|
32995
33107
|
smoke: smokeCapability,
|
|
@@ -38737,6 +38849,12 @@ Object.freeze({
|
|
|
38737
38849
|
addonId: null,
|
|
38738
38850
|
access: "view"
|
|
38739
38851
|
},
|
|
38852
|
+
"recordingSignal.getStatus": {
|
|
38853
|
+
capName: "recording-signal",
|
|
38854
|
+
capScope: "device",
|
|
38855
|
+
addonId: null,
|
|
38856
|
+
access: "view"
|
|
38857
|
+
},
|
|
38740
38858
|
"sceneMonitor.captureReference": {
|
|
38741
38859
|
capName: "scene-monitor",
|
|
38742
38860
|
capScope: "device",
|
|
@@ -41729,6 +41847,11 @@ Object.freeze({
|
|
|
41729
41847
|
form: "single",
|
|
41730
41848
|
optional: true
|
|
41731
41849
|
}],
|
|
41850
|
+
"recordingSignal.getStatus": [{
|
|
41851
|
+
name: "deviceId",
|
|
41852
|
+
form: "single",
|
|
41853
|
+
optional: false
|
|
41854
|
+
}],
|
|
41732
41855
|
"sceneMonitor.captureReference": [{
|
|
41733
41856
|
name: "deviceId",
|
|
41734
41857
|
form: "single",
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
//#endregion
|
|
6
|
-
const require_dist = require("../dist-
|
|
6
|
+
const require_dist = require("../dist-D3UkTYeb.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
//#region src/ha-export/topics.ts
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-
|
|
1
|
+
import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-COeXrW_s.mjs";
|
|
2
2
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
3
3
|
//#region src/ha-export/topics.ts
|
|
4
4
|
/**
|