@camstack/addon-provider-rtsp 1.0.5 → 1.0.6
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 +711 -676
- package/dist/addon.mjs +711 -676
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -4642,63 +4642,7 @@ function preprocess(fn, schema) {
|
|
|
4642
4642
|
});
|
|
4643
4643
|
}
|
|
4644
4644
|
//#endregion
|
|
4645
|
-
//#region ../types/dist/
|
|
4646
|
-
/**
|
|
4647
|
-
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
4648
|
-
* every declared capability + widget of every installed plugin, on every
|
|
4649
|
-
* node. Produced by the backend `WiringHealthService` and surfaced via
|
|
4650
|
-
* `GET /health/wiring`, the tRPC `health.wiring` query, and the boot-gate.
|
|
4651
|
-
*
|
|
4652
|
-
* Unlike `/health` (process liveness), this reflects whether each cap/widget
|
|
4653
|
-
* is actually *reachable* over the real cap-dispatch path. See spec
|
|
4654
|
-
* `docs/superpowers/specs/2026-05-23-deep-healthcheck-design.md`.
|
|
4655
|
-
*/
|
|
4656
|
-
/** What kind of target a probe addressed. */
|
|
4657
|
-
var wiringProbeKindSchema = _enum([
|
|
4658
|
-
"singleton",
|
|
4659
|
-
"device",
|
|
4660
|
-
"widget"
|
|
4661
|
-
]);
|
|
4662
|
-
/** Result of probing a single (cap|widget [, device]) target. */
|
|
4663
|
-
var wiringProbeResultSchema = object({
|
|
4664
|
-
capName: string(),
|
|
4665
|
-
kind: wiringProbeKindSchema,
|
|
4666
|
-
deviceId: number().optional(),
|
|
4667
|
-
reachable: boolean(),
|
|
4668
|
-
latencyMs: number(),
|
|
4669
|
-
error: string().optional()
|
|
4670
|
-
});
|
|
4671
|
-
/** Per-addon roll-up of cap + widget probe results. */
|
|
4672
|
-
var wiringAddonHealthSchema = object({
|
|
4673
|
-
addonId: string(),
|
|
4674
|
-
caps: array(wiringProbeResultSchema).readonly(),
|
|
4675
|
-
widgets: array(wiringProbeResultSchema).readonly()
|
|
4676
|
-
});
|
|
4677
|
-
/** Per-node roll-up. */
|
|
4678
|
-
var wiringNodeHealthSchema = object({
|
|
4679
|
-
nodeId: string(),
|
|
4680
|
-
addons: array(wiringAddonHealthSchema).readonly()
|
|
4681
|
-
});
|
|
4682
|
-
object({
|
|
4683
|
-
/** True only when every probed target is reachable. */
|
|
4684
|
-
ok: boolean(),
|
|
4685
|
-
/** True when at least one target is unreachable. */
|
|
4686
|
-
degraded: boolean(),
|
|
4687
|
-
checkedAt: string(),
|
|
4688
|
-
nodes: array(wiringNodeHealthSchema).readonly(),
|
|
4689
|
-
summary: object({
|
|
4690
|
-
total: number(),
|
|
4691
|
-
reachable: number(),
|
|
4692
|
-
unreachable: number()
|
|
4693
|
-
})
|
|
4694
|
-
});
|
|
4695
|
-
var MODEL_FORMATS = [
|
|
4696
|
-
"onnx",
|
|
4697
|
-
"coreml",
|
|
4698
|
-
"openvino",
|
|
4699
|
-
"tflite",
|
|
4700
|
-
"pt"
|
|
4701
|
-
];
|
|
4645
|
+
//#region ../types/dist/sleep-D7JeS58T.mjs
|
|
4702
4646
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4703
4647
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4704
4648
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -6021,7 +5965,7 @@ var ProfileSlotSchema = object({
|
|
|
6021
5965
|
* Zod schema for StreamSourceEntry — the canonical stream descriptor
|
|
6022
5966
|
* exposed by ICameraDevice.getStreamSources() and consumed by the broker.
|
|
6023
5967
|
*/
|
|
6024
|
-
var StreamSourceEntrySchema = object({
|
|
5968
|
+
var StreamSourceEntrySchema$1 = object({
|
|
6025
5969
|
id: string(),
|
|
6026
5970
|
label: string(),
|
|
6027
5971
|
protocol: _enum([
|
|
@@ -6243,117 +6187,583 @@ var ProfileRtspEntrySchema = object({
|
|
|
6243
6187
|
codec: string().optional(),
|
|
6244
6188
|
resolution: CamStreamResolutionSchema.optional()
|
|
6245
6189
|
});
|
|
6190
|
+
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
6191
|
+
DeviceType["Camera"] = "camera";
|
|
6192
|
+
DeviceType["Hub"] = "hub";
|
|
6193
|
+
DeviceType["Light"] = "light";
|
|
6194
|
+
DeviceType["Siren"] = "siren";
|
|
6195
|
+
DeviceType["Switch"] = "switch";
|
|
6196
|
+
DeviceType["Sensor"] = "sensor";
|
|
6197
|
+
DeviceType["Thermostat"] = "thermostat";
|
|
6198
|
+
DeviceType["Button"] = "button";
|
|
6199
|
+
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
6200
|
+
* event vocabulary verbatim (no normalization). Installed with the
|
|
6201
|
+
* `event-emitter` cap. Sources: HA `event.*` entities (structured) and
|
|
6202
|
+
* HA bus events (e.g. `zha_event`, generic). */
|
|
6203
|
+
DeviceType["EventEmitter"] = "event-emitter";
|
|
6204
|
+
/** Firmware/software update entity — current vs available version,
|
|
6205
|
+
* updatable flag, update state, and an install action. Installed with
|
|
6206
|
+
* the `update` cap. Sources: Homematic firmware-update channels (and
|
|
6207
|
+
* reusable by other providers, e.g. HA `update.*` entities). */
|
|
6208
|
+
DeviceType["Update"] = "update";
|
|
6209
|
+
DeviceType["Generic"] = "generic";
|
|
6210
|
+
/** Generic notification delivery target (HA `notify.<service>`, future
|
|
6211
|
+
* Telegram / Discord / ntfy / SMTP, …). One device per delivery
|
|
6212
|
+
* endpoint; the `notifier` cap defines the send surface. */
|
|
6213
|
+
DeviceType["Notifier"] = "notifier";
|
|
6214
|
+
/** Pre-recorded action sequence with optional parameters
|
|
6215
|
+
* (HA `script.*`). Runnable via `script-runner` cap. */
|
|
6216
|
+
DeviceType["Script"] = "script";
|
|
6217
|
+
/** Automation rule (HA `automation.*`) — enable/disable + manual
|
|
6218
|
+
* trigger surface exposed via `automation-control` cap. */
|
|
6219
|
+
DeviceType["Automation"] = "automation";
|
|
6220
|
+
/** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
|
|
6221
|
+
DeviceType["Lock"] = "lock";
|
|
6222
|
+
/** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
|
|
6223
|
+
* `valve.*`). `cover` cap with sub-roles for variant. */
|
|
6224
|
+
DeviceType["Cover"] = "cover";
|
|
6225
|
+
/** Pipe / water / gas valve with open/close/stop and optional
|
|
6226
|
+
* position (HA `valve.*`). `valve` cap — a cover-sibling actuator
|
|
6227
|
+
* modelled on the same open/closed lifecycle. */
|
|
6228
|
+
DeviceType["Valve"] = "valve";
|
|
6229
|
+
/** Humidifier / dehumidifier with on/off + target humidity + mode
|
|
6230
|
+
* (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
|
|
6231
|
+
* modelled on the same target / mode lifecycle. */
|
|
6232
|
+
DeviceType["Humidifier"] = "humidifier";
|
|
6233
|
+
/** Water heater / boiler with target temperature + operation mode +
|
|
6234
|
+
* away mode (HA `water_heater.*`). `water-heater` cap — a
|
|
6235
|
+
* climate-family actuator. */
|
|
6236
|
+
DeviceType["WaterHeater"] = "water-heater";
|
|
6237
|
+
/** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
|
|
6238
|
+
DeviceType["Fan"] = "fan";
|
|
6239
|
+
/** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
|
|
6240
|
+
* the camera surface — those use `Camera`. `media-player` cap. */
|
|
6241
|
+
DeviceType["MediaPlayer"] = "media-player";
|
|
6242
|
+
/** Security panel / alarm system (HA `alarm_control_panel.*`).
|
|
6243
|
+
* `alarm-panel` cap. */
|
|
6244
|
+
DeviceType["AlarmPanel"] = "alarm-panel";
|
|
6245
|
+
/** Generic user-settable input (HA `number` / `input_number` / `select`
|
|
6246
|
+
* / `input_select` / `text` / `input_text` / `input_datetime`).
|
|
6247
|
+
* Sub-type via `DeviceRole`: NumericControl / SelectControl /
|
|
6248
|
+
* TextControl / DateTimeControl. */
|
|
6249
|
+
DeviceType["Control"] = "control";
|
|
6250
|
+
/** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
|
|
6251
|
+
* `presence` cap. */
|
|
6252
|
+
DeviceType["Presence"] = "presence";
|
|
6253
|
+
/** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
|
|
6254
|
+
* `weather` cap. */
|
|
6255
|
+
DeviceType["Weather"] = "weather";
|
|
6256
|
+
/** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
|
|
6257
|
+
DeviceType["Vacuum"] = "vacuum";
|
|
6258
|
+
/** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
|
|
6259
|
+
* `lawn-mower-control` cap. */
|
|
6260
|
+
DeviceType["LawnMower"] = "lawn-mower";
|
|
6261
|
+
/** Physical HA device group — parent container for entity-children
|
|
6262
|
+
* adopted from a single HA device entry. Not renderable as a
|
|
6263
|
+
* standalone device; exists only to anchor child entities. */
|
|
6264
|
+
DeviceType["Container"] = "container";
|
|
6265
|
+
/** Single still-image entity (HA `image.*`). Read-only display of an
|
|
6266
|
+
* `entity_picture` signed URL the browser loads directly. `image` cap. */
|
|
6267
|
+
DeviceType["Image"] = "image";
|
|
6268
|
+
return DeviceType;
|
|
6269
|
+
}({});
|
|
6270
|
+
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
6271
|
+
DeviceFeature["BatteryOperated"] = "battery-operated";
|
|
6272
|
+
DeviceFeature["Rebootable"] = "rebootable";
|
|
6273
|
+
/**
|
|
6274
|
+
* Device supports an on-demand re-sync of its derived spec with its
|
|
6275
|
+
* upstream source — drives the generic Re-sync button. The owning
|
|
6276
|
+
* provider implements the action via the `device-adoption.resync` cap.
|
|
6277
|
+
*/
|
|
6278
|
+
DeviceFeature["Resyncable"] = "resyncable";
|
|
6279
|
+
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
6280
|
+
DeviceFeature["DoorbellButton"] = "doorbell-button";
|
|
6281
|
+
DeviceFeature["TwoWayAudio"] = "two-way-audio";
|
|
6282
|
+
DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
|
|
6283
|
+
/**
|
|
6284
|
+
* Camera supports the on-firmware autotrack subsystem (subject-
|
|
6285
|
+
* following). Distinct from `PanTiltZoom` because not every PTZ
|
|
6286
|
+
* camera ships autotrack — the admin UI uses this flag to gate
|
|
6287
|
+
* the autotrack toggle / settings card without re-deriving from
|
|
6288
|
+
* the cap registry. Mirrors `ptz-autotrack` cap registration:
|
|
6289
|
+
* driver sets this feature when probe confirms the firmware
|
|
6290
|
+
* surface, and registers the cap in the same code path.
|
|
6291
|
+
*/
|
|
6292
|
+
DeviceFeature["PtzAutotrack"] = "ptz-autotrack";
|
|
6293
|
+
/**
|
|
6294
|
+
* Accessory exposes a "trigger on motion" toggle — the parent camera's
|
|
6295
|
+
* motion detection automatically activates this device. Mirrors
|
|
6296
|
+
* `motion-trigger` cap registration: drivers set this feature in the
|
|
6297
|
+
* same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
|
|
6298
|
+
*
|
|
6299
|
+
* Used by admin UI (gate the in-hero `MotionTriggerToggle` against a
|
|
6300
|
+
* fast scalar without binding fetch), notifier rules, and `listAll`
|
|
6301
|
+
* filters that want "all devices with on-motion behaviour".
|
|
6302
|
+
*/
|
|
6303
|
+
DeviceFeature["MotionTrigger"] = "motion-trigger";
|
|
6304
|
+
/** Light supports rgb-triplet color via `color` cap. */
|
|
6305
|
+
DeviceFeature["LightColorRgb"] = "light-color-rgb";
|
|
6306
|
+
/** Light supports HSV color via `color` cap. */
|
|
6307
|
+
DeviceFeature["LightColorHsv"] = "light-color-hsv";
|
|
6308
|
+
/** Light supports color-temperature (mired) via `color` cap. */
|
|
6309
|
+
DeviceFeature["LightColorMired"] = "light-color-mired";
|
|
6310
|
+
/** Thermostat supports a `heat_cool` dual setpoint (targetLow +
|
|
6311
|
+
* targetHigh). Gates the range slider UI. */
|
|
6312
|
+
DeviceFeature["ClimateDualSetpoint"] = "climate-dual-setpoint";
|
|
6313
|
+
/** Thermostat exposes target humidity and/or current humidity
|
|
6314
|
+
* readings. Gates the humidity controls. */
|
|
6315
|
+
DeviceFeature["ClimateHumidity"] = "climate-humidity";
|
|
6316
|
+
/** Thermostat exposes a fan-mode selector. */
|
|
6317
|
+
DeviceFeature["ClimateFanMode"] = "climate-fan-mode";
|
|
6318
|
+
/** Thermostat exposes preset modes (eco / away / sleep / vendor). */
|
|
6319
|
+
DeviceFeature["ClimatePreset"] = "climate-preset";
|
|
6320
|
+
/** Cover exposes intermediate position control (0..100). Gates the
|
|
6321
|
+
* position slider UI. */
|
|
6322
|
+
DeviceFeature["CoverPositionable"] = "cover-positionable";
|
|
6323
|
+
/** Cover exposes slat-tilt control. Gates the tilt slider UI. */
|
|
6324
|
+
DeviceFeature["CoverTilt"] = "cover-tilt";
|
|
6325
|
+
/** Valve exposes intermediate position control (0..100). Gates the
|
|
6326
|
+
* position slider / drag surface UI. */
|
|
6327
|
+
DeviceFeature["ValvePositionable"] = "valve-positionable";
|
|
6328
|
+
/** Fan exposes a speed-percentage setter. Gates the speed slider UI. */
|
|
6329
|
+
DeviceFeature["FanSpeed"] = "fan-speed";
|
|
6330
|
+
/** Fan exposes a preset mode selector. */
|
|
6331
|
+
DeviceFeature["FanPreset"] = "fan-preset";
|
|
6332
|
+
/** Fan exposes blade direction (forward/reverse) — typical of
|
|
6333
|
+
* ceiling fans. */
|
|
6334
|
+
DeviceFeature["FanDirection"] = "fan-direction";
|
|
6335
|
+
/** Fan exposes an oscillation toggle. */
|
|
6336
|
+
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
6337
|
+
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
6338
|
+
* field on the UI lock-controls panel. */
|
|
6339
|
+
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
6340
|
+
/** Lock supports a latch-release ("open door") action distinct from
|
|
6341
|
+
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
6342
|
+
* `supported_features`. Gates the Open Door button in the UI. */
|
|
6343
|
+
DeviceFeature["LockOpen"] = "lock-open";
|
|
6344
|
+
/** Media player exposes a seek-to-position surface. */
|
|
6345
|
+
DeviceFeature["MediaPlayerSeek"] = "media-player-seek";
|
|
6346
|
+
/** Media player exposes a volume-level setter. */
|
|
6347
|
+
DeviceFeature["MediaPlayerVolume"] = "media-player-volume";
|
|
6348
|
+
/** Media player exposes a mute toggle distinct from volume=0. */
|
|
6349
|
+
DeviceFeature["MediaPlayerMute"] = "media-player-mute";
|
|
6350
|
+
/** Media player exposes a shuffle toggle. */
|
|
6351
|
+
DeviceFeature["MediaPlayerShuffle"] = "media-player-shuffle";
|
|
6352
|
+
/** Media player exposes a repeat mode (off / all / one). */
|
|
6353
|
+
DeviceFeature["MediaPlayerRepeat"] = "media-player-repeat";
|
|
6354
|
+
/** Media player exposes a source / input selector. */
|
|
6355
|
+
DeviceFeature["MediaPlayerSelectSource"] = "media-player-select-source";
|
|
6356
|
+
/** Media player exposes a play-arbitrary-media surface (URL / id). */
|
|
6357
|
+
DeviceFeature["MediaPlayerPlayMedia"] = "media-player-play-media";
|
|
6358
|
+
/** Media player exposes next-track. */
|
|
6359
|
+
DeviceFeature["MediaPlayerNext"] = "media-player-next";
|
|
6360
|
+
/** Media player exposes previous-track. */
|
|
6361
|
+
DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
|
|
6362
|
+
/** Media player exposes stop distinct from pause. */
|
|
6363
|
+
DeviceFeature["MediaPlayerStop"] = "media-player-stop";
|
|
6364
|
+
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
6365
|
+
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
6366
|
+
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
6367
|
+
* addition to a textual location. */
|
|
6368
|
+
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
6369
|
+
/** Notifier accepts an inline / URL image attachment. */
|
|
6370
|
+
DeviceFeature["NotifierImage"] = "notifier-image";
|
|
6371
|
+
/** Notifier accepts a priority hint (high/normal/low). */
|
|
6372
|
+
DeviceFeature["NotifierPriority"] = "notifier-priority";
|
|
6373
|
+
/** Notifier accepts a free-form `data` payload for platform-specific
|
|
6374
|
+
* fields. */
|
|
6375
|
+
DeviceFeature["NotifierData"] = "notifier-data";
|
|
6376
|
+
/** Notifier supports interactive action buttons / callbacks. */
|
|
6377
|
+
DeviceFeature["NotifierActions"] = "notifier-actions";
|
|
6378
|
+
/** Notifier supports per-call recipient targeting (multi-user). */
|
|
6379
|
+
DeviceFeature["NotifierRecipients"] = "notifier-recipients";
|
|
6380
|
+
/** Script runner accepts a variables map on each run invocation. */
|
|
6381
|
+
DeviceFeature["ScriptVariables"] = "script-variables";
|
|
6382
|
+
/** Automation `trigger` accepts a skipCondition flag — fires the
|
|
6383
|
+
* automation's actions while bypassing its condition block. */
|
|
6384
|
+
DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
|
|
6385
|
+
return DeviceFeature;
|
|
6386
|
+
}({});
|
|
6246
6387
|
/**
|
|
6247
|
-
*
|
|
6248
|
-
*
|
|
6249
|
-
*
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
|
|
6254
|
-
kind: literal("timeOfDay"),
|
|
6255
|
-
start: string().regex(HHMM),
|
|
6256
|
-
end: string().regex(HHMM),
|
|
6257
|
-
/** Restrict to these weekdays; omit = every day. */
|
|
6258
|
-
days: array(RecordingWeekdaySchema).optional()
|
|
6259
|
-
})]);
|
|
6260
|
-
var RecordingModeSchema = _enum([
|
|
6261
|
-
"continuous",
|
|
6262
|
-
"onMotion",
|
|
6263
|
-
"onAudioThreshold"
|
|
6264
|
-
]);
|
|
6265
|
-
/**
|
|
6266
|
-
* First-class, authoritative per-camera storage mode — the netta choice the UI
|
|
6267
|
-
* reads directly (never inferred from `rules`):
|
|
6268
|
-
* - `off` — not recording.
|
|
6269
|
-
* - `events` — record only around triggers (motion / audio threshold),
|
|
6270
|
-
* with pre/post-buffer.
|
|
6271
|
-
* - `continuous` — record 24/7 within the schedule.
|
|
6388
|
+
* Semantic role a device plays within its parent. Populated by driver
|
|
6389
|
+
* addons when creating accessory devices (Reolink siren/floodlight/
|
|
6390
|
+
* PIR/chime/autotrack/doorbell, ONVIF relay outputs, …). Used by the
|
|
6391
|
+
* admin UI to pick icons, labels, and widgets — a `Switch` with
|
|
6392
|
+
* `role: Floodlight` renders as a bulb with a brightness slider,
|
|
6393
|
+
* whereas a `Switch` with `role: Siren` renders as a klaxon.
|
|
6272
6394
|
*
|
|
6273
|
-
*
|
|
6274
|
-
*
|
|
6395
|
+
* Undefined for top-level devices (cameras, NVRs, hubs). Persisted in
|
|
6396
|
+
* sqlite as a nullable TEXT column — old rows keep working unchanged.
|
|
6275
6397
|
*/
|
|
6276
|
-
var
|
|
6277
|
-
"
|
|
6278
|
-
"
|
|
6279
|
-
"
|
|
6280
|
-
]
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6398
|
+
var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
6399
|
+
DeviceRole["Siren"] = "siren";
|
|
6400
|
+
DeviceRole["Floodlight"] = "floodlight";
|
|
6401
|
+
DeviceRole["Spotlight"] = "spotlight";
|
|
6402
|
+
DeviceRole["PirSensor"] = "pir-sensor";
|
|
6403
|
+
DeviceRole["Chime"] = "chime";
|
|
6404
|
+
DeviceRole["Autotrack"] = "autotrack";
|
|
6405
|
+
DeviceRole["Nightvision"] = "nightvision";
|
|
6406
|
+
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
6407
|
+
DeviceRole["Doorbell"] = "doorbell";
|
|
6408
|
+
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
6409
|
+
* real Switch device for UI rendering / export adapters. */
|
|
6410
|
+
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
6411
|
+
/** Generic motion / occupancy / moving event source. Distinct from
|
|
6412
|
+
* the camera accessory PirSensor role: that one is a camera child;
|
|
6413
|
+
* this is a standalone HA / 3rd-party motion sensor. */
|
|
6414
|
+
DeviceRole["MotionSensor"] = "motion-sensor";
|
|
6415
|
+
DeviceRole["ContactSensor"] = "contact-sensor";
|
|
6416
|
+
DeviceRole["LeakSensor"] = "leak-sensor";
|
|
6417
|
+
DeviceRole["SmokeSensor"] = "smoke-sensor";
|
|
6418
|
+
DeviceRole["COSensor"] = "co-sensor";
|
|
6419
|
+
DeviceRole["GasSensor"] = "gas-sensor";
|
|
6420
|
+
DeviceRole["TamperSensor"] = "tamper-sensor";
|
|
6421
|
+
DeviceRole["VibrationSensor"] = "vibration-sensor";
|
|
6422
|
+
DeviceRole["ConnectivitySensor"] = "connectivity-sensor";
|
|
6423
|
+
DeviceRole["SoundSensor"] = "sound-sensor";
|
|
6424
|
+
/** Fallback for `binary_sensor` without a known `device_class`. */
|
|
6425
|
+
DeviceRole["BinarySensor"] = "binary-sensor";
|
|
6426
|
+
DeviceRole["TemperatureSensor"] = "temperature-sensor";
|
|
6427
|
+
DeviceRole["HumiditySensor"] = "humidity-sensor";
|
|
6428
|
+
DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
|
|
6429
|
+
DeviceRole["PressureSensor"] = "pressure-sensor";
|
|
6430
|
+
DeviceRole["PowerSensor"] = "power-sensor";
|
|
6431
|
+
DeviceRole["EnergySensor"] = "energy-sensor";
|
|
6432
|
+
DeviceRole["VoltageSensor"] = "voltage-sensor";
|
|
6433
|
+
DeviceRole["CurrentSensor"] = "current-sensor";
|
|
6434
|
+
DeviceRole["AirQualitySensor"] = "air-quality-sensor";
|
|
6435
|
+
/** Battery level (numeric % via `sensor` OR low-bool via
|
|
6436
|
+
* `binary_sensor` — the cap distinguishes via the value type). */
|
|
6437
|
+
DeviceRole["BatterySensor"] = "battery-sensor";
|
|
6438
|
+
/** Fallback for `sensor` numeric without a known `device_class`. */
|
|
6439
|
+
DeviceRole["NumericSensor"] = "numeric-sensor";
|
|
6440
|
+
/** String / enum state (HA `sensor` with `state_class: enum` or
|
|
6441
|
+
* `attributes.options`). */
|
|
6442
|
+
DeviceRole["EnumSensor"] = "enum-sensor";
|
|
6443
|
+
/** Date / timestamp state (HA `sensor` with `device_class: timestamp`
|
|
6444
|
+
* or `date`). The slice carries the raw ISO string verbatim (hosted on
|
|
6445
|
+
* the `enum-sensor` cap); the UI renders it locale-formatted. */
|
|
6446
|
+
DeviceRole["DateTimeSensor"] = "datetime-sensor";
|
|
6447
|
+
/** Last-resort fallback when nothing else matches. */
|
|
6448
|
+
DeviceRole["GenericSensor"] = "generic-sensor";
|
|
6449
|
+
DeviceRole["NumericControl"] = "numeric-control";
|
|
6450
|
+
DeviceRole["SelectControl"] = "select-control";
|
|
6451
|
+
DeviceRole["TextControl"] = "text-control";
|
|
6452
|
+
DeviceRole["DateTimeControl"] = "datetime-control";
|
|
6453
|
+
/** Mobile push notifier (HA `notify.mobile_app_*`) — supports
|
|
6454
|
+
* rich features (image, priority, channel routing). */
|
|
6455
|
+
DeviceRole["MobilePushNotifier"] = "mobile-push-notifier";
|
|
6456
|
+
/** Chat / messaging service (HA `notify.telegram_*`,
|
|
6457
|
+
* `notify.discord_*`, etc.). */
|
|
6458
|
+
DeviceRole["MessagingNotifier"] = "messaging-notifier";
|
|
6459
|
+
/** Email-based delivery (HA `notify.smtp`, etc.). */
|
|
6460
|
+
DeviceRole["EmailNotifier"] = "email-notifier";
|
|
6461
|
+
/** Fallback when the notifier service name doesn't match a known
|
|
6462
|
+
* pattern. */
|
|
6463
|
+
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
6464
|
+
return DeviceRole;
|
|
6465
|
+
}({});
|
|
6286
6466
|
/**
|
|
6287
|
-
*
|
|
6467
|
+
* Generic types for capability definitions.
|
|
6288
6468
|
*
|
|
6289
|
-
*
|
|
6290
|
-
*
|
|
6291
|
-
* covering band, not by a band value.
|
|
6292
|
-
*/
|
|
6293
|
-
var RecordingBandModeSchema = _enum(["continuous", "events"]);
|
|
6294
|
-
/**
|
|
6295
|
-
* Triggers for an `events`-mode band. Identical shape to
|
|
6296
|
-
* `RecordingTriggersSchema` — reuse that schema as the band trigger type so the
|
|
6297
|
-
* two never drift.
|
|
6298
|
-
*/
|
|
6299
|
-
var RecordingBandTriggersSchema = RecordingTriggersSchema;
|
|
6300
|
-
/**
|
|
6301
|
-
* A single mode-per-band window — the canonical recorder band shape, the
|
|
6302
|
-
* single source of truth re-used by `addon-pipeline/recorder`.
|
|
6469
|
+
* A capability is defined with Zod schemas for methods, events, and settings.
|
|
6470
|
+
* TypeScript types are inferred via z.infer<> — zero duplication.
|
|
6303
6471
|
*
|
|
6304
|
-
*
|
|
6305
|
-
*
|
|
6306
|
-
*
|
|
6472
|
+
* Pattern:
|
|
6473
|
+
* 1. Define Zod schemas for data, methods, settings
|
|
6474
|
+
* 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
|
|
6475
|
+
* 3. Export type IProvider = InferProvider<typeof capabilityDef>
|
|
6476
|
+
* 4. Addon implements IProvider
|
|
6477
|
+
* 5. Registry auto-mounts tRPC router from definition.methods
|
|
6307
6478
|
*/
|
|
6308
|
-
var RecordingBandSchema = object({
|
|
6309
|
-
days: array(RecordingWeekdaySchema),
|
|
6310
|
-
start: string().regex(HHMM),
|
|
6311
|
-
end: string().regex(HHMM),
|
|
6312
|
-
mode: RecordingBandModeSchema,
|
|
6313
|
-
triggers: RecordingBandTriggersSchema.optional(),
|
|
6314
|
-
preBufferSec: number().min(0).optional(),
|
|
6315
|
-
postBufferSec: number().min(0).optional()
|
|
6316
|
-
});
|
|
6317
|
-
var RecordingRuleSchema = object({
|
|
6318
|
-
schedule: RecordingScheduleSchema,
|
|
6319
|
-
mode: RecordingModeSchema,
|
|
6320
|
-
/** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
|
|
6321
|
-
preBufferSec: number().min(0).default(0),
|
|
6322
|
-
/** Keep recording until this many seconds after the last trigger. */
|
|
6323
|
-
postBufferSec: number().min(0).default(0),
|
|
6324
|
-
/** Each new trigger restarts the post-buffer window. */
|
|
6325
|
-
resetTimeoutOnNewEvent: boolean().default(true),
|
|
6326
|
-
/** onAudioThreshold only — dBFS level that counts as a trigger. */
|
|
6327
|
-
thresholdDbfs: number().optional()
|
|
6328
|
-
});
|
|
6329
6479
|
/**
|
|
6330
|
-
*
|
|
6331
|
-
*
|
|
6332
|
-
*
|
|
6333
|
-
*
|
|
6334
|
-
*
|
|
6335
|
-
*
|
|
6480
|
+
* Output schema shared by the contribution + live methods.
|
|
6481
|
+
*
|
|
6482
|
+
* Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
|
|
6483
|
+
* tabs[]) without importing from `../interfaces/config-ui.js` — a
|
|
6484
|
+
* concrete-but-lenient Zod object keeps tRPC output inference happy
|
|
6485
|
+
* (using `z.unknown()` here collapses unrelated router branches to
|
|
6486
|
+
* `unknown` when the generator re-inlines the huge AppRouter type).
|
|
6487
|
+
*
|
|
6488
|
+
* `.passthrough()` on sections/fields accepts whatever FormBuilder
|
|
6489
|
+
* extensions the caller adds (showWhen, displayScale, …) without
|
|
6490
|
+
* rebuilding every time a new field kind is introduced.
|
|
6336
6491
|
*/
|
|
6337
|
-
var
|
|
6338
|
-
|
|
6339
|
-
|
|
6492
|
+
var ContributionSectionSchema = object({
|
|
6493
|
+
id: string(),
|
|
6494
|
+
title: string(),
|
|
6495
|
+
description: string().optional(),
|
|
6496
|
+
style: _enum(["card", "accordion"]).optional(),
|
|
6497
|
+
defaultCollapsed: boolean().optional(),
|
|
6498
|
+
columns: union([
|
|
6499
|
+
literal(1),
|
|
6500
|
+
literal(2),
|
|
6501
|
+
literal(3),
|
|
6502
|
+
literal(4)
|
|
6503
|
+
]).optional(),
|
|
6504
|
+
tab: string().optional(),
|
|
6505
|
+
location: _enum(["settings", "top-tab"]).optional(),
|
|
6506
|
+
order: number().optional(),
|
|
6507
|
+
fields: array(any())
|
|
6340
6508
|
});
|
|
6509
|
+
object({
|
|
6510
|
+
tabs: array(object({
|
|
6511
|
+
id: string(),
|
|
6512
|
+
label: string(),
|
|
6513
|
+
icon: string(),
|
|
6514
|
+
order: number().optional()
|
|
6515
|
+
})).optional(),
|
|
6516
|
+
sections: array(ContributionSectionSchema)
|
|
6517
|
+
}).nullable();
|
|
6518
|
+
object({ deviceId: number() }), object({ deviceId: number() }), object({
|
|
6519
|
+
deviceId: number(),
|
|
6520
|
+
patch: record(string(), unknown())
|
|
6521
|
+
}), object({ success: literal(true) });
|
|
6522
|
+
object({ deviceId: number() }), unknown().nullable();
|
|
6523
|
+
/** Shorthand to define a method schema */
|
|
6524
|
+
function method(input, output, options) {
|
|
6525
|
+
return {
|
|
6526
|
+
input,
|
|
6527
|
+
output,
|
|
6528
|
+
kind: options?.kind ?? "query",
|
|
6529
|
+
auth: options?.auth ?? "protected",
|
|
6530
|
+
...options?.access !== void 0 ? { access: options.access } : {},
|
|
6531
|
+
timeoutMs: options?.timeoutMs
|
|
6532
|
+
};
|
|
6533
|
+
}
|
|
6534
|
+
/** Shorthand to define an event schema */
|
|
6535
|
+
function event(data) {
|
|
6536
|
+
return { data };
|
|
6537
|
+
}
|
|
6538
|
+
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
6539
|
+
var VersionOutputSchema = object({ version: string() });
|
|
6540
|
+
method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
|
|
6341
6541
|
/**
|
|
6342
|
-
*
|
|
6542
|
+
* device-ops — device-scoped cap that unifies the per-IDevice operations
|
|
6543
|
+
* previously routed through the `.device-ops` Moleculer bridge service.
|
|
6343
6544
|
*
|
|
6344
|
-
*
|
|
6345
|
-
*
|
|
6346
|
-
*
|
|
6347
|
-
*
|
|
6545
|
+
* Each worker that hosts live `IDevice` instances auto-registers a native
|
|
6546
|
+
* provider for this cap (per device) backed by its local
|
|
6547
|
+
* `DeviceRegistry`. Hub-side callers reach it transparently through
|
|
6548
|
+
* `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
|
|
6549
|
+
* `deviceId` + `nodeId` and dispatches through the standard cap-router,
|
|
6550
|
+
* so there's no parallel bridge path anymore.
|
|
6551
|
+
*
|
|
6552
|
+
* The surface is intentionally small — every method corresponds to a
|
|
6553
|
+
* single action on the live `IDevice` (or `ICameraDevice` for
|
|
6554
|
+
* `getStreamSources`). Richer orchestration (enable/disable with
|
|
6555
|
+
* integration plumbing, bulk updates) stays in the `device-manager` cap;
|
|
6556
|
+
* `device-ops` is the per-device primitive the device-manager routes to.
|
|
6348
6557
|
*/
|
|
6349
|
-
var
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6558
|
+
var StreamSourceEntrySchema = object({
|
|
6559
|
+
id: string(),
|
|
6560
|
+
label: string(),
|
|
6561
|
+
protocol: _enum([
|
|
6562
|
+
"rtsp",
|
|
6563
|
+
"rtmp",
|
|
6564
|
+
"annexb",
|
|
6565
|
+
"http-mjpeg",
|
|
6566
|
+
"webrtc",
|
|
6567
|
+
"custom"
|
|
6568
|
+
]),
|
|
6569
|
+
url: string().optional(),
|
|
6570
|
+
resolution: object({
|
|
6571
|
+
width: number(),
|
|
6572
|
+
height: number()
|
|
6573
|
+
}).optional(),
|
|
6574
|
+
fps: number().optional(),
|
|
6575
|
+
bitrate: number().optional(),
|
|
6576
|
+
codec: string().optional(),
|
|
6577
|
+
profileHint: CamProfileSchema.optional(),
|
|
6578
|
+
sdp: string().optional()
|
|
6579
|
+
});
|
|
6580
|
+
var ConfigEntrySchema$1 = object({
|
|
6581
|
+
key: string(),
|
|
6582
|
+
value: unknown()
|
|
6583
|
+
});
|
|
6584
|
+
var RawStateResultSchema = object({
|
|
6585
|
+
/** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
|
|
6586
|
+
source: string(),
|
|
6587
|
+
/** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
|
|
6588
|
+
data: record(string(), unknown())
|
|
6589
|
+
});
|
|
6590
|
+
method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(object({ deviceId: number() }), array(ConfigEntrySchema$1)), method(object({
|
|
6591
|
+
deviceId: number(),
|
|
6592
|
+
values: record(string(), unknown())
|
|
6593
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
6594
|
+
deviceId: number(),
|
|
6595
|
+
action: string().min(1),
|
|
6596
|
+
input: unknown()
|
|
6597
|
+
}), unknown(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
6598
|
+
//#endregion
|
|
6599
|
+
//#region ../types/dist/index.mjs
|
|
6600
|
+
/**
|
|
6601
|
+
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
6602
|
+
* every declared capability + widget of every installed plugin, on every
|
|
6603
|
+
* node. Produced by the backend `WiringHealthService` and surfaced via
|
|
6604
|
+
* `GET /health/wiring`, the tRPC `health.wiring` query, and the boot-gate.
|
|
6605
|
+
*
|
|
6606
|
+
* Unlike `/health` (process liveness), this reflects whether each cap/widget
|
|
6607
|
+
* is actually *reachable* over the real cap-dispatch path. See spec
|
|
6608
|
+
* `docs/superpowers/specs/2026-05-23-deep-healthcheck-design.md`.
|
|
6609
|
+
*/
|
|
6610
|
+
/** What kind of target a probe addressed. */
|
|
6611
|
+
var wiringProbeKindSchema = _enum([
|
|
6612
|
+
"singleton",
|
|
6613
|
+
"device",
|
|
6614
|
+
"widget"
|
|
6615
|
+
]);
|
|
6616
|
+
/** Result of probing a single (cap|widget [, device]) target. */
|
|
6617
|
+
var wiringProbeResultSchema = object({
|
|
6618
|
+
capName: string(),
|
|
6619
|
+
kind: wiringProbeKindSchema,
|
|
6620
|
+
deviceId: number().optional(),
|
|
6621
|
+
reachable: boolean(),
|
|
6622
|
+
latencyMs: number(),
|
|
6623
|
+
error: string().optional()
|
|
6624
|
+
});
|
|
6625
|
+
/** Per-addon roll-up of cap + widget probe results. */
|
|
6626
|
+
var wiringAddonHealthSchema = object({
|
|
6627
|
+
addonId: string(),
|
|
6628
|
+
caps: array(wiringProbeResultSchema).readonly(),
|
|
6629
|
+
widgets: array(wiringProbeResultSchema).readonly()
|
|
6630
|
+
});
|
|
6631
|
+
/** Per-node roll-up. */
|
|
6632
|
+
var wiringNodeHealthSchema = object({
|
|
6633
|
+
nodeId: string(),
|
|
6634
|
+
addons: array(wiringAddonHealthSchema).readonly()
|
|
6635
|
+
});
|
|
6636
|
+
object({
|
|
6637
|
+
/** True only when every probed target is reachable. */
|
|
6638
|
+
ok: boolean(),
|
|
6639
|
+
/** True when at least one target is unreachable. */
|
|
6640
|
+
degraded: boolean(),
|
|
6641
|
+
checkedAt: string(),
|
|
6642
|
+
nodes: array(wiringNodeHealthSchema).readonly(),
|
|
6643
|
+
summary: object({
|
|
6644
|
+
total: number(),
|
|
6645
|
+
reachable: number(),
|
|
6646
|
+
unreachable: number()
|
|
6647
|
+
})
|
|
6648
|
+
});
|
|
6649
|
+
var MODEL_FORMATS = [
|
|
6650
|
+
"onnx",
|
|
6651
|
+
"coreml",
|
|
6652
|
+
"openvino",
|
|
6653
|
+
"tflite",
|
|
6654
|
+
"pt"
|
|
6655
|
+
];
|
|
6656
|
+
/**
|
|
6657
|
+
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
6658
|
+
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
6659
|
+
* `Weekday` exported from `interfaces/timezones.ts`.
|
|
6660
|
+
*/
|
|
6661
|
+
var RecordingWeekdaySchema = number().int().min(0).max(6);
|
|
6662
|
+
var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
6663
|
+
var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
|
|
6664
|
+
kind: literal("timeOfDay"),
|
|
6665
|
+
start: string().regex(HHMM),
|
|
6666
|
+
end: string().regex(HHMM),
|
|
6667
|
+
/** Restrict to these weekdays; omit = every day. */
|
|
6668
|
+
days: array(RecordingWeekdaySchema).optional()
|
|
6669
|
+
})]);
|
|
6670
|
+
var RecordingModeSchema = _enum([
|
|
6671
|
+
"continuous",
|
|
6672
|
+
"onMotion",
|
|
6673
|
+
"onAudioThreshold"
|
|
6674
|
+
]);
|
|
6675
|
+
/**
|
|
6676
|
+
* First-class, authoritative per-camera storage mode — the netta choice the UI
|
|
6677
|
+
* reads directly (never inferred from `rules`):
|
|
6678
|
+
* - `off` — not recording.
|
|
6679
|
+
* - `events` — record only around triggers (motion / audio threshold),
|
|
6680
|
+
* with pre/post-buffer.
|
|
6681
|
+
* - `continuous` — record 24/7 within the schedule.
|
|
6682
|
+
*
|
|
6683
|
+
* `mode` compiles one-way to the internal `rules[]` consumed by the policy
|
|
6684
|
+
* engine (see `compileRules`); `rules[]` is never authored directly anymore.
|
|
6685
|
+
*/
|
|
6686
|
+
var RecordingStorageModeSchema = _enum([
|
|
6687
|
+
"off",
|
|
6688
|
+
"events",
|
|
6689
|
+
"continuous"
|
|
6690
|
+
]);
|
|
6691
|
+
/** Which detectors trigger an `events`-mode recording. */
|
|
6692
|
+
var RecordingTriggersSchema = object({
|
|
6693
|
+
motion: boolean().optional(),
|
|
6694
|
+
audioThresholdDbfs: number().optional()
|
|
6695
|
+
});
|
|
6696
|
+
/**
|
|
6697
|
+
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
6698
|
+
*
|
|
6699
|
+
* Distinct from `RecordingStorageModeSchema` (which carries `off`): a band is
|
|
6700
|
+
* only ever `continuous` or `events`; "off" is expressed by the absence of a
|
|
6701
|
+
* covering band, not by a band value.
|
|
6702
|
+
*/
|
|
6703
|
+
var RecordingBandModeSchema = _enum(["continuous", "events"]);
|
|
6704
|
+
/**
|
|
6705
|
+
* Triggers for an `events`-mode band. Identical shape to
|
|
6706
|
+
* `RecordingTriggersSchema` — reuse that schema as the band trigger type so the
|
|
6707
|
+
* two never drift.
|
|
6708
|
+
*/
|
|
6709
|
+
var RecordingBandTriggersSchema = RecordingTriggersSchema;
|
|
6710
|
+
/**
|
|
6711
|
+
* A single mode-per-band window — the canonical recorder band shape, the
|
|
6712
|
+
* single source of truth re-used by `addon-pipeline/recorder`.
|
|
6713
|
+
*
|
|
6714
|
+
* `days` lists the weekdays the band covers (empty = every day, matching the
|
|
6715
|
+
* band engine's `applies` rule). `start`/`end` are `HH:MM`; an `end <= start`
|
|
6716
|
+
* span wraps past midnight (handled by the band engine).
|
|
6717
|
+
*/
|
|
6718
|
+
var RecordingBandSchema = object({
|
|
6719
|
+
days: array(RecordingWeekdaySchema),
|
|
6720
|
+
start: string().regex(HHMM),
|
|
6721
|
+
end: string().regex(HHMM),
|
|
6722
|
+
mode: RecordingBandModeSchema,
|
|
6723
|
+
triggers: RecordingBandTriggersSchema.optional(),
|
|
6724
|
+
preBufferSec: number().min(0).optional(),
|
|
6725
|
+
postBufferSec: number().min(0).optional()
|
|
6726
|
+
});
|
|
6727
|
+
var RecordingRuleSchema = object({
|
|
6728
|
+
schedule: RecordingScheduleSchema,
|
|
6729
|
+
mode: RecordingModeSchema,
|
|
6730
|
+
/** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
|
|
6731
|
+
preBufferSec: number().min(0).default(0),
|
|
6732
|
+
/** Keep recording until this many seconds after the last trigger. */
|
|
6733
|
+
postBufferSec: number().min(0).default(0),
|
|
6734
|
+
/** Each new trigger restarts the post-buffer window. */
|
|
6735
|
+
resetTimeoutOnNewEvent: boolean().default(true),
|
|
6736
|
+
/** onAudioThreshold only — dBFS level that counts as a trigger. */
|
|
6737
|
+
thresholdDbfs: number().optional()
|
|
6738
|
+
});
|
|
6739
|
+
/**
|
|
6740
|
+
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
6741
|
+
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
6742
|
+
* live per-camera: `maxAgeDays` and `maxSizeGb`. The disk-occupancy threshold
|
|
6743
|
+
* (when the volume is too full to keep recording) is NOT a per-camera concern —
|
|
6744
|
+
* it belongs to the StorageLocation (`StorageLocation.config.minFreePercent`),
|
|
6745
|
+
* shared by every camera writing to that volume.
|
|
6746
|
+
*/
|
|
6747
|
+
var RecordingRetentionSchema = object({
|
|
6748
|
+
maxAgeDays: number().min(0).optional(),
|
|
6749
|
+
maxSizeGb: number().min(0).optional()
|
|
6750
|
+
});
|
|
6751
|
+
/**
|
|
6752
|
+
* The full per-camera recording intent — the wire shape of a RecordingTarget.
|
|
6753
|
+
*
|
|
6754
|
+
* `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
|
|
6755
|
+
* are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
|
|
6756
|
+
* only for transition + migration (`migrateRulesToMode`); the policy engine
|
|
6757
|
+
* consumes the compiled output of `compileRules(config)`, never `rules` directly.
|
|
6758
|
+
*/
|
|
6759
|
+
var RecordingConfigSchema = object({
|
|
6760
|
+
enabled: boolean(),
|
|
6761
|
+
/** Authoritative storage mode. Absent on legacy targets → derived once via
|
|
6762
|
+
* `migrateRulesToMode`, then persisted. */
|
|
6763
|
+
mode: RecordingStorageModeSchema.optional(),
|
|
6764
|
+
profiles: array(CamProfileSchema).optional(),
|
|
6765
|
+
segmentSeconds: number().int().positive().optional(),
|
|
6766
|
+
/** Shared recording time-bands for `events` & `continuous` — record only when
|
|
6357
6767
|
* the wall-clock falls inside one of these windows. Omit or empty = always.
|
|
6358
6768
|
* `continuous` compiles to one rule per band; `events` to band × trigger. */
|
|
6359
6769
|
schedules: array(RecordingScheduleSchema).optional(),
|
|
@@ -6777,392 +7187,116 @@ var YAMNET_TO_MACRO = {
|
|
|
6777
7187
|
"Telephone dialing, DTMF": "telephone",
|
|
6778
7188
|
"Busy signal": "telephone",
|
|
6779
7189
|
Engine: "engine",
|
|
6780
|
-
"Engine starting": "engine",
|
|
6781
|
-
Idling: "engine",
|
|
6782
|
-
"Accelerating, revving, vroom": "engine",
|
|
6783
|
-
"Light engine (high frequency)": "engine",
|
|
6784
|
-
"Medium engine (mid frequency)": "engine",
|
|
6785
|
-
"Heavy engine (low frequency)": "engine",
|
|
6786
|
-
"Lawn mower": "engine",
|
|
6787
|
-
Chainsaw: "engine",
|
|
6788
|
-
Hammer: "tools",
|
|
6789
|
-
Jackhammer: "tools",
|
|
6790
|
-
Sawing: "tools",
|
|
6791
|
-
"Power tool": "tools",
|
|
6792
|
-
Drill: "tools",
|
|
6793
|
-
Sanding: "tools",
|
|
6794
|
-
Silence: "silence"
|
|
6795
|
-
},
|
|
6796
|
-
preserveOriginal: false
|
|
6797
|
-
};
|
|
6798
|
-
var APPLE_SA_TO_MACRO = {
|
|
6799
|
-
mapping: {
|
|
6800
|
-
speech: "speech",
|
|
6801
|
-
child_speech: "speech",
|
|
6802
|
-
conversation: "speech",
|
|
6803
|
-
whispering: "speech",
|
|
6804
|
-
singing: "speech",
|
|
6805
|
-
humming: "speech",
|
|
6806
|
-
shout: "scream",
|
|
6807
|
-
yell: "scream",
|
|
6808
|
-
screaming: "scream",
|
|
6809
|
-
crying: "crying",
|
|
6810
|
-
baby_crying: "crying",
|
|
6811
|
-
sobbing: "crying",
|
|
6812
|
-
laughter: "laughter",
|
|
6813
|
-
baby_laughter: "laughter",
|
|
6814
|
-
giggling: "laughter",
|
|
6815
|
-
music: "music",
|
|
6816
|
-
guitar: "music",
|
|
6817
|
-
piano: "music",
|
|
6818
|
-
drums: "music",
|
|
6819
|
-
dog_bark: "dog",
|
|
6820
|
-
dog_bow_wow: "dog",
|
|
6821
|
-
dog_growling: "dog",
|
|
6822
|
-
dog_howl: "dog",
|
|
6823
|
-
cat_meow: "cat",
|
|
6824
|
-
cat_purr: "cat",
|
|
6825
|
-
cat_hiss: "cat",
|
|
6826
|
-
bird: "bird",
|
|
6827
|
-
bird_chirp: "bird",
|
|
6828
|
-
bird_squawk: "bird",
|
|
6829
|
-
animal: "animal",
|
|
6830
|
-
horse: "animal",
|
|
6831
|
-
cow_moo: "animal",
|
|
6832
|
-
insect: "animal",
|
|
6833
|
-
alarm: "alarm",
|
|
6834
|
-
smoke_alarm: "alarm",
|
|
6835
|
-
fire_alarm: "alarm",
|
|
6836
|
-
car_alarm: "alarm",
|
|
6837
|
-
siren: "siren",
|
|
6838
|
-
police_siren: "siren",
|
|
6839
|
-
ambulance_siren: "siren",
|
|
6840
|
-
doorbell: "doorbell",
|
|
6841
|
-
door_knock: "doorbell",
|
|
6842
|
-
knocking: "doorbell",
|
|
6843
|
-
glass_breaking: "glass_breaking",
|
|
6844
|
-
glass_shatter: "glass_breaking",
|
|
6845
|
-
gunshot: "gunshot",
|
|
6846
|
-
explosion: "gunshot",
|
|
6847
|
-
fireworks: "gunshot",
|
|
6848
|
-
car: "vehicle",
|
|
6849
|
-
truck: "vehicle",
|
|
6850
|
-
motorcycle: "vehicle",
|
|
6851
|
-
car_horn: "vehicle",
|
|
6852
|
-
vehicle_horn: "vehicle",
|
|
6853
|
-
traffic: "vehicle",
|
|
6854
|
-
fire: "fire",
|
|
6855
|
-
fire_crackle: "fire",
|
|
6856
|
-
water: "water",
|
|
6857
|
-
rain: "water",
|
|
6858
|
-
ocean: "water",
|
|
6859
|
-
splash: "water",
|
|
6860
|
-
wind: "wind",
|
|
6861
|
-
thunder: "wind",
|
|
6862
|
-
thunderstorm: "wind",
|
|
6863
|
-
door: "door",
|
|
6864
|
-
door_slam: "door",
|
|
6865
|
-
sliding_door: "door",
|
|
6866
|
-
footsteps: "footsteps",
|
|
6867
|
-
walking: "footsteps",
|
|
6868
|
-
running: "footsteps",
|
|
6869
|
-
crowd: "crowd",
|
|
6870
|
-
chatter: "crowd",
|
|
6871
|
-
cheering: "crowd",
|
|
6872
|
-
applause: "crowd",
|
|
6873
|
-
telephone_ring: "telephone",
|
|
6874
|
-
ringtone: "telephone",
|
|
6875
|
-
engine: "engine",
|
|
6876
|
-
engine_starting: "engine",
|
|
6877
|
-
lawn_mower: "engine",
|
|
6878
|
-
chainsaw: "engine",
|
|
6879
|
-
hammer: "tools",
|
|
6880
|
-
jackhammer: "tools",
|
|
6881
|
-
drill: "tools",
|
|
6882
|
-
power_tool: "tools",
|
|
6883
|
-
silence: "silence"
|
|
6884
|
-
},
|
|
6885
|
-
preserveOriginal: false
|
|
6886
|
-
};
|
|
6887
|
-
var _macroLookup = /* @__PURE__ */ new Map();
|
|
6888
|
-
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
6889
|
-
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
6890
|
-
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
6891
|
-
DeviceType["Camera"] = "camera";
|
|
6892
|
-
DeviceType["Hub"] = "hub";
|
|
6893
|
-
DeviceType["Light"] = "light";
|
|
6894
|
-
DeviceType["Siren"] = "siren";
|
|
6895
|
-
DeviceType["Switch"] = "switch";
|
|
6896
|
-
DeviceType["Sensor"] = "sensor";
|
|
6897
|
-
DeviceType["Thermostat"] = "thermostat";
|
|
6898
|
-
DeviceType["Button"] = "button";
|
|
6899
|
-
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
6900
|
-
* event vocabulary verbatim (no normalization). Installed with the
|
|
6901
|
-
* `event-emitter` cap. Sources: HA `event.*` entities (structured) and
|
|
6902
|
-
* HA bus events (e.g. `zha_event`, generic). */
|
|
6903
|
-
DeviceType["EventEmitter"] = "event-emitter";
|
|
6904
|
-
/** Firmware/software update entity — current vs available version,
|
|
6905
|
-
* updatable flag, update state, and an install action. Installed with
|
|
6906
|
-
* the `update` cap. Sources: Homematic firmware-update channels (and
|
|
6907
|
-
* reusable by other providers, e.g. HA `update.*` entities). */
|
|
6908
|
-
DeviceType["Update"] = "update";
|
|
6909
|
-
DeviceType["Generic"] = "generic";
|
|
6910
|
-
/** Generic notification delivery target (HA `notify.<service>`, future
|
|
6911
|
-
* Telegram / Discord / ntfy / SMTP, …). One device per delivery
|
|
6912
|
-
* endpoint; the `notifier` cap defines the send surface. */
|
|
6913
|
-
DeviceType["Notifier"] = "notifier";
|
|
6914
|
-
/** Pre-recorded action sequence with optional parameters
|
|
6915
|
-
* (HA `script.*`). Runnable via `script-runner` cap. */
|
|
6916
|
-
DeviceType["Script"] = "script";
|
|
6917
|
-
/** Automation rule (HA `automation.*`) — enable/disable + manual
|
|
6918
|
-
* trigger surface exposed via `automation-control` cap. */
|
|
6919
|
-
DeviceType["Automation"] = "automation";
|
|
6920
|
-
/** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
|
|
6921
|
-
DeviceType["Lock"] = "lock";
|
|
6922
|
-
/** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
|
|
6923
|
-
* `valve.*`). `cover` cap with sub-roles for variant. */
|
|
6924
|
-
DeviceType["Cover"] = "cover";
|
|
6925
|
-
/** Pipe / water / gas valve with open/close/stop and optional
|
|
6926
|
-
* position (HA `valve.*`). `valve` cap — a cover-sibling actuator
|
|
6927
|
-
* modelled on the same open/closed lifecycle. */
|
|
6928
|
-
DeviceType["Valve"] = "valve";
|
|
6929
|
-
/** Humidifier / dehumidifier with on/off + target humidity + mode
|
|
6930
|
-
* (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
|
|
6931
|
-
* modelled on the same target / mode lifecycle. */
|
|
6932
|
-
DeviceType["Humidifier"] = "humidifier";
|
|
6933
|
-
/** Water heater / boiler with target temperature + operation mode +
|
|
6934
|
-
* away mode (HA `water_heater.*`). `water-heater` cap — a
|
|
6935
|
-
* climate-family actuator. */
|
|
6936
|
-
DeviceType["WaterHeater"] = "water-heater";
|
|
6937
|
-
/** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
|
|
6938
|
-
DeviceType["Fan"] = "fan";
|
|
6939
|
-
/** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
|
|
6940
|
-
* the camera surface — those use `Camera`. `media-player` cap. */
|
|
6941
|
-
DeviceType["MediaPlayer"] = "media-player";
|
|
6942
|
-
/** Security panel / alarm system (HA `alarm_control_panel.*`).
|
|
6943
|
-
* `alarm-panel` cap. */
|
|
6944
|
-
DeviceType["AlarmPanel"] = "alarm-panel";
|
|
6945
|
-
/** Generic user-settable input (HA `number` / `input_number` / `select`
|
|
6946
|
-
* / `input_select` / `text` / `input_text` / `input_datetime`).
|
|
6947
|
-
* Sub-type via `DeviceRole`: NumericControl / SelectControl /
|
|
6948
|
-
* TextControl / DateTimeControl. */
|
|
6949
|
-
DeviceType["Control"] = "control";
|
|
6950
|
-
/** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
|
|
6951
|
-
* `presence` cap. */
|
|
6952
|
-
DeviceType["Presence"] = "presence";
|
|
6953
|
-
/** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
|
|
6954
|
-
* `weather` cap. */
|
|
6955
|
-
DeviceType["Weather"] = "weather";
|
|
6956
|
-
/** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
|
|
6957
|
-
DeviceType["Vacuum"] = "vacuum";
|
|
6958
|
-
/** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
|
|
6959
|
-
* `lawn-mower-control` cap. */
|
|
6960
|
-
DeviceType["LawnMower"] = "lawn-mower";
|
|
6961
|
-
/** Physical HA device group — parent container for entity-children
|
|
6962
|
-
* adopted from a single HA device entry. Not renderable as a
|
|
6963
|
-
* standalone device; exists only to anchor child entities. */
|
|
6964
|
-
DeviceType["Container"] = "container";
|
|
6965
|
-
/** Single still-image entity (HA `image.*`). Read-only display of an
|
|
6966
|
-
* `entity_picture` signed URL the browser loads directly. `image` cap. */
|
|
6967
|
-
DeviceType["Image"] = "image";
|
|
6968
|
-
return DeviceType;
|
|
6969
|
-
}({});
|
|
6970
|
-
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
6971
|
-
DeviceFeature["BatteryOperated"] = "battery-operated";
|
|
6972
|
-
DeviceFeature["Rebootable"] = "rebootable";
|
|
6973
|
-
/**
|
|
6974
|
-
* Device supports an on-demand re-sync of its derived spec with its
|
|
6975
|
-
* upstream source — drives the generic Re-sync button. The owning
|
|
6976
|
-
* provider implements the action via the `device-adoption.resync` cap.
|
|
6977
|
-
*/
|
|
6978
|
-
DeviceFeature["Resyncable"] = "resyncable";
|
|
6979
|
-
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
6980
|
-
DeviceFeature["DoorbellButton"] = "doorbell-button";
|
|
6981
|
-
DeviceFeature["TwoWayAudio"] = "two-way-audio";
|
|
6982
|
-
DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
|
|
6983
|
-
/**
|
|
6984
|
-
* Camera supports the on-firmware autotrack subsystem (subject-
|
|
6985
|
-
* following). Distinct from `PanTiltZoom` because not every PTZ
|
|
6986
|
-
* camera ships autotrack — the admin UI uses this flag to gate
|
|
6987
|
-
* the autotrack toggle / settings card without re-deriving from
|
|
6988
|
-
* the cap registry. Mirrors `ptz-autotrack` cap registration:
|
|
6989
|
-
* driver sets this feature when probe confirms the firmware
|
|
6990
|
-
* surface, and registers the cap in the same code path.
|
|
6991
|
-
*/
|
|
6992
|
-
DeviceFeature["PtzAutotrack"] = "ptz-autotrack";
|
|
6993
|
-
/**
|
|
6994
|
-
* Accessory exposes a "trigger on motion" toggle — the parent camera's
|
|
6995
|
-
* motion detection automatically activates this device. Mirrors
|
|
6996
|
-
* `motion-trigger` cap registration: drivers set this feature in the
|
|
6997
|
-
* same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
|
|
6998
|
-
*
|
|
6999
|
-
* Used by admin UI (gate the in-hero `MotionTriggerToggle` against a
|
|
7000
|
-
* fast scalar without binding fetch), notifier rules, and `listAll`
|
|
7001
|
-
* filters that want "all devices with on-motion behaviour".
|
|
7002
|
-
*/
|
|
7003
|
-
DeviceFeature["MotionTrigger"] = "motion-trigger";
|
|
7004
|
-
/** Light supports rgb-triplet color via `color` cap. */
|
|
7005
|
-
DeviceFeature["LightColorRgb"] = "light-color-rgb";
|
|
7006
|
-
/** Light supports HSV color via `color` cap. */
|
|
7007
|
-
DeviceFeature["LightColorHsv"] = "light-color-hsv";
|
|
7008
|
-
/** Light supports color-temperature (mired) via `color` cap. */
|
|
7009
|
-
DeviceFeature["LightColorMired"] = "light-color-mired";
|
|
7010
|
-
/** Thermostat supports a `heat_cool` dual setpoint (targetLow +
|
|
7011
|
-
* targetHigh). Gates the range slider UI. */
|
|
7012
|
-
DeviceFeature["ClimateDualSetpoint"] = "climate-dual-setpoint";
|
|
7013
|
-
/** Thermostat exposes target humidity and/or current humidity
|
|
7014
|
-
* readings. Gates the humidity controls. */
|
|
7015
|
-
DeviceFeature["ClimateHumidity"] = "climate-humidity";
|
|
7016
|
-
/** Thermostat exposes a fan-mode selector. */
|
|
7017
|
-
DeviceFeature["ClimateFanMode"] = "climate-fan-mode";
|
|
7018
|
-
/** Thermostat exposes preset modes (eco / away / sleep / vendor). */
|
|
7019
|
-
DeviceFeature["ClimatePreset"] = "climate-preset";
|
|
7020
|
-
/** Cover exposes intermediate position control (0..100). Gates the
|
|
7021
|
-
* position slider UI. */
|
|
7022
|
-
DeviceFeature["CoverPositionable"] = "cover-positionable";
|
|
7023
|
-
/** Cover exposes slat-tilt control. Gates the tilt slider UI. */
|
|
7024
|
-
DeviceFeature["CoverTilt"] = "cover-tilt";
|
|
7025
|
-
/** Valve exposes intermediate position control (0..100). Gates the
|
|
7026
|
-
* position slider / drag surface UI. */
|
|
7027
|
-
DeviceFeature["ValvePositionable"] = "valve-positionable";
|
|
7028
|
-
/** Fan exposes a speed-percentage setter. Gates the speed slider UI. */
|
|
7029
|
-
DeviceFeature["FanSpeed"] = "fan-speed";
|
|
7030
|
-
/** Fan exposes a preset mode selector. */
|
|
7031
|
-
DeviceFeature["FanPreset"] = "fan-preset";
|
|
7032
|
-
/** Fan exposes blade direction (forward/reverse) — typical of
|
|
7033
|
-
* ceiling fans. */
|
|
7034
|
-
DeviceFeature["FanDirection"] = "fan-direction";
|
|
7035
|
-
/** Fan exposes an oscillation toggle. */
|
|
7036
|
-
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
7037
|
-
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
7038
|
-
* field on the UI lock-controls panel. */
|
|
7039
|
-
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
7040
|
-
/** Lock supports a latch-release ("open door") action distinct from
|
|
7041
|
-
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
7042
|
-
* `supported_features`. Gates the Open Door button in the UI. */
|
|
7043
|
-
DeviceFeature["LockOpen"] = "lock-open";
|
|
7044
|
-
/** Media player exposes a seek-to-position surface. */
|
|
7045
|
-
DeviceFeature["MediaPlayerSeek"] = "media-player-seek";
|
|
7046
|
-
/** Media player exposes a volume-level setter. */
|
|
7047
|
-
DeviceFeature["MediaPlayerVolume"] = "media-player-volume";
|
|
7048
|
-
/** Media player exposes a mute toggle distinct from volume=0. */
|
|
7049
|
-
DeviceFeature["MediaPlayerMute"] = "media-player-mute";
|
|
7050
|
-
/** Media player exposes a shuffle toggle. */
|
|
7051
|
-
DeviceFeature["MediaPlayerShuffle"] = "media-player-shuffle";
|
|
7052
|
-
/** Media player exposes a repeat mode (off / all / one). */
|
|
7053
|
-
DeviceFeature["MediaPlayerRepeat"] = "media-player-repeat";
|
|
7054
|
-
/** Media player exposes a source / input selector. */
|
|
7055
|
-
DeviceFeature["MediaPlayerSelectSource"] = "media-player-select-source";
|
|
7056
|
-
/** Media player exposes a play-arbitrary-media surface (URL / id). */
|
|
7057
|
-
DeviceFeature["MediaPlayerPlayMedia"] = "media-player-play-media";
|
|
7058
|
-
/** Media player exposes next-track. */
|
|
7059
|
-
DeviceFeature["MediaPlayerNext"] = "media-player-next";
|
|
7060
|
-
/** Media player exposes previous-track. */
|
|
7061
|
-
DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
|
|
7062
|
-
/** Media player exposes stop distinct from pause. */
|
|
7063
|
-
DeviceFeature["MediaPlayerStop"] = "media-player-stop";
|
|
7064
|
-
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
7065
|
-
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
7066
|
-
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
7067
|
-
* addition to a textual location. */
|
|
7068
|
-
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
7069
|
-
/** Notifier accepts an inline / URL image attachment. */
|
|
7070
|
-
DeviceFeature["NotifierImage"] = "notifier-image";
|
|
7071
|
-
/** Notifier accepts a priority hint (high/normal/low). */
|
|
7072
|
-
DeviceFeature["NotifierPriority"] = "notifier-priority";
|
|
7073
|
-
/** Notifier accepts a free-form `data` payload for platform-specific
|
|
7074
|
-
* fields. */
|
|
7075
|
-
DeviceFeature["NotifierData"] = "notifier-data";
|
|
7076
|
-
/** Notifier supports interactive action buttons / callbacks. */
|
|
7077
|
-
DeviceFeature["NotifierActions"] = "notifier-actions";
|
|
7078
|
-
/** Notifier supports per-call recipient targeting (multi-user). */
|
|
7079
|
-
DeviceFeature["NotifierRecipients"] = "notifier-recipients";
|
|
7080
|
-
/** Script runner accepts a variables map on each run invocation. */
|
|
7081
|
-
DeviceFeature["ScriptVariables"] = "script-variables";
|
|
7082
|
-
/** Automation `trigger` accepts a skipCondition flag — fires the
|
|
7083
|
-
* automation's actions while bypassing its condition block. */
|
|
7084
|
-
DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
|
|
7085
|
-
return DeviceFeature;
|
|
7086
|
-
}({});
|
|
7087
|
-
/**
|
|
7088
|
-
* Semantic role a device plays within its parent. Populated by driver
|
|
7089
|
-
* addons when creating accessory devices (Reolink siren/floodlight/
|
|
7090
|
-
* PIR/chime/autotrack/doorbell, ONVIF relay outputs, …). Used by the
|
|
7091
|
-
* admin UI to pick icons, labels, and widgets — a `Switch` with
|
|
7092
|
-
* `role: Floodlight` renders as a bulb with a brightness slider,
|
|
7093
|
-
* whereas a `Switch` with `role: Siren` renders as a klaxon.
|
|
7094
|
-
*
|
|
7095
|
-
* Undefined for top-level devices (cameras, NVRs, hubs). Persisted in
|
|
7096
|
-
* sqlite as a nullable TEXT column — old rows keep working unchanged.
|
|
7097
|
-
*/
|
|
7098
|
-
var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
7099
|
-
DeviceRole["Siren"] = "siren";
|
|
7100
|
-
DeviceRole["Floodlight"] = "floodlight";
|
|
7101
|
-
DeviceRole["Spotlight"] = "spotlight";
|
|
7102
|
-
DeviceRole["PirSensor"] = "pir-sensor";
|
|
7103
|
-
DeviceRole["Chime"] = "chime";
|
|
7104
|
-
DeviceRole["Autotrack"] = "autotrack";
|
|
7105
|
-
DeviceRole["Nightvision"] = "nightvision";
|
|
7106
|
-
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
7107
|
-
DeviceRole["Doorbell"] = "doorbell";
|
|
7108
|
-
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
7109
|
-
* real Switch device for UI rendering / export adapters. */
|
|
7110
|
-
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
7111
|
-
/** Generic motion / occupancy / moving event source. Distinct from
|
|
7112
|
-
* the camera accessory PirSensor role: that one is a camera child;
|
|
7113
|
-
* this is a standalone HA / 3rd-party motion sensor. */
|
|
7114
|
-
DeviceRole["MotionSensor"] = "motion-sensor";
|
|
7115
|
-
DeviceRole["ContactSensor"] = "contact-sensor";
|
|
7116
|
-
DeviceRole["LeakSensor"] = "leak-sensor";
|
|
7117
|
-
DeviceRole["SmokeSensor"] = "smoke-sensor";
|
|
7118
|
-
DeviceRole["COSensor"] = "co-sensor";
|
|
7119
|
-
DeviceRole["GasSensor"] = "gas-sensor";
|
|
7120
|
-
DeviceRole["TamperSensor"] = "tamper-sensor";
|
|
7121
|
-
DeviceRole["VibrationSensor"] = "vibration-sensor";
|
|
7122
|
-
DeviceRole["ConnectivitySensor"] = "connectivity-sensor";
|
|
7123
|
-
DeviceRole["SoundSensor"] = "sound-sensor";
|
|
7124
|
-
/** Fallback for `binary_sensor` without a known `device_class`. */
|
|
7125
|
-
DeviceRole["BinarySensor"] = "binary-sensor";
|
|
7126
|
-
DeviceRole["TemperatureSensor"] = "temperature-sensor";
|
|
7127
|
-
DeviceRole["HumiditySensor"] = "humidity-sensor";
|
|
7128
|
-
DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
|
|
7129
|
-
DeviceRole["PressureSensor"] = "pressure-sensor";
|
|
7130
|
-
DeviceRole["PowerSensor"] = "power-sensor";
|
|
7131
|
-
DeviceRole["EnergySensor"] = "energy-sensor";
|
|
7132
|
-
DeviceRole["VoltageSensor"] = "voltage-sensor";
|
|
7133
|
-
DeviceRole["CurrentSensor"] = "current-sensor";
|
|
7134
|
-
DeviceRole["AirQualitySensor"] = "air-quality-sensor";
|
|
7135
|
-
/** Battery level (numeric % via `sensor` OR low-bool via
|
|
7136
|
-
* `binary_sensor` — the cap distinguishes via the value type). */
|
|
7137
|
-
DeviceRole["BatterySensor"] = "battery-sensor";
|
|
7138
|
-
/** Fallback for `sensor` numeric without a known `device_class`. */
|
|
7139
|
-
DeviceRole["NumericSensor"] = "numeric-sensor";
|
|
7140
|
-
/** String / enum state (HA `sensor` with `state_class: enum` or
|
|
7141
|
-
* `attributes.options`). */
|
|
7142
|
-
DeviceRole["EnumSensor"] = "enum-sensor";
|
|
7143
|
-
/** Date / timestamp state (HA `sensor` with `device_class: timestamp`
|
|
7144
|
-
* or `date`). The slice carries the raw ISO string verbatim (hosted on
|
|
7145
|
-
* the `enum-sensor` cap); the UI renders it locale-formatted. */
|
|
7146
|
-
DeviceRole["DateTimeSensor"] = "datetime-sensor";
|
|
7147
|
-
/** Last-resort fallback when nothing else matches. */
|
|
7148
|
-
DeviceRole["GenericSensor"] = "generic-sensor";
|
|
7149
|
-
DeviceRole["NumericControl"] = "numeric-control";
|
|
7150
|
-
DeviceRole["SelectControl"] = "select-control";
|
|
7151
|
-
DeviceRole["TextControl"] = "text-control";
|
|
7152
|
-
DeviceRole["DateTimeControl"] = "datetime-control";
|
|
7153
|
-
/** Mobile push notifier (HA `notify.mobile_app_*`) — supports
|
|
7154
|
-
* rich features (image, priority, channel routing). */
|
|
7155
|
-
DeviceRole["MobilePushNotifier"] = "mobile-push-notifier";
|
|
7156
|
-
/** Chat / messaging service (HA `notify.telegram_*`,
|
|
7157
|
-
* `notify.discord_*`, etc.). */
|
|
7158
|
-
DeviceRole["MessagingNotifier"] = "messaging-notifier";
|
|
7159
|
-
/** Email-based delivery (HA `notify.smtp`, etc.). */
|
|
7160
|
-
DeviceRole["EmailNotifier"] = "email-notifier";
|
|
7161
|
-
/** Fallback when the notifier service name doesn't match a known
|
|
7162
|
-
* pattern. */
|
|
7163
|
-
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
7164
|
-
return DeviceRole;
|
|
7165
|
-
}({});
|
|
7190
|
+
"Engine starting": "engine",
|
|
7191
|
+
Idling: "engine",
|
|
7192
|
+
"Accelerating, revving, vroom": "engine",
|
|
7193
|
+
"Light engine (high frequency)": "engine",
|
|
7194
|
+
"Medium engine (mid frequency)": "engine",
|
|
7195
|
+
"Heavy engine (low frequency)": "engine",
|
|
7196
|
+
"Lawn mower": "engine",
|
|
7197
|
+
Chainsaw: "engine",
|
|
7198
|
+
Hammer: "tools",
|
|
7199
|
+
Jackhammer: "tools",
|
|
7200
|
+
Sawing: "tools",
|
|
7201
|
+
"Power tool": "tools",
|
|
7202
|
+
Drill: "tools",
|
|
7203
|
+
Sanding: "tools",
|
|
7204
|
+
Silence: "silence"
|
|
7205
|
+
},
|
|
7206
|
+
preserveOriginal: false
|
|
7207
|
+
};
|
|
7208
|
+
var APPLE_SA_TO_MACRO = {
|
|
7209
|
+
mapping: {
|
|
7210
|
+
speech: "speech",
|
|
7211
|
+
child_speech: "speech",
|
|
7212
|
+
conversation: "speech",
|
|
7213
|
+
whispering: "speech",
|
|
7214
|
+
singing: "speech",
|
|
7215
|
+
humming: "speech",
|
|
7216
|
+
shout: "scream",
|
|
7217
|
+
yell: "scream",
|
|
7218
|
+
screaming: "scream",
|
|
7219
|
+
crying: "crying",
|
|
7220
|
+
baby_crying: "crying",
|
|
7221
|
+
sobbing: "crying",
|
|
7222
|
+
laughter: "laughter",
|
|
7223
|
+
baby_laughter: "laughter",
|
|
7224
|
+
giggling: "laughter",
|
|
7225
|
+
music: "music",
|
|
7226
|
+
guitar: "music",
|
|
7227
|
+
piano: "music",
|
|
7228
|
+
drums: "music",
|
|
7229
|
+
dog_bark: "dog",
|
|
7230
|
+
dog_bow_wow: "dog",
|
|
7231
|
+
dog_growling: "dog",
|
|
7232
|
+
dog_howl: "dog",
|
|
7233
|
+
cat_meow: "cat",
|
|
7234
|
+
cat_purr: "cat",
|
|
7235
|
+
cat_hiss: "cat",
|
|
7236
|
+
bird: "bird",
|
|
7237
|
+
bird_chirp: "bird",
|
|
7238
|
+
bird_squawk: "bird",
|
|
7239
|
+
animal: "animal",
|
|
7240
|
+
horse: "animal",
|
|
7241
|
+
cow_moo: "animal",
|
|
7242
|
+
insect: "animal",
|
|
7243
|
+
alarm: "alarm",
|
|
7244
|
+
smoke_alarm: "alarm",
|
|
7245
|
+
fire_alarm: "alarm",
|
|
7246
|
+
car_alarm: "alarm",
|
|
7247
|
+
siren: "siren",
|
|
7248
|
+
police_siren: "siren",
|
|
7249
|
+
ambulance_siren: "siren",
|
|
7250
|
+
doorbell: "doorbell",
|
|
7251
|
+
door_knock: "doorbell",
|
|
7252
|
+
knocking: "doorbell",
|
|
7253
|
+
glass_breaking: "glass_breaking",
|
|
7254
|
+
glass_shatter: "glass_breaking",
|
|
7255
|
+
gunshot: "gunshot",
|
|
7256
|
+
explosion: "gunshot",
|
|
7257
|
+
fireworks: "gunshot",
|
|
7258
|
+
car: "vehicle",
|
|
7259
|
+
truck: "vehicle",
|
|
7260
|
+
motorcycle: "vehicle",
|
|
7261
|
+
car_horn: "vehicle",
|
|
7262
|
+
vehicle_horn: "vehicle",
|
|
7263
|
+
traffic: "vehicle",
|
|
7264
|
+
fire: "fire",
|
|
7265
|
+
fire_crackle: "fire",
|
|
7266
|
+
water: "water",
|
|
7267
|
+
rain: "water",
|
|
7268
|
+
ocean: "water",
|
|
7269
|
+
splash: "water",
|
|
7270
|
+
wind: "wind",
|
|
7271
|
+
thunder: "wind",
|
|
7272
|
+
thunderstorm: "wind",
|
|
7273
|
+
door: "door",
|
|
7274
|
+
door_slam: "door",
|
|
7275
|
+
sliding_door: "door",
|
|
7276
|
+
footsteps: "footsteps",
|
|
7277
|
+
walking: "footsteps",
|
|
7278
|
+
running: "footsteps",
|
|
7279
|
+
crowd: "crowd",
|
|
7280
|
+
chatter: "crowd",
|
|
7281
|
+
cheering: "crowd",
|
|
7282
|
+
applause: "crowd",
|
|
7283
|
+
telephone_ring: "telephone",
|
|
7284
|
+
ringtone: "telephone",
|
|
7285
|
+
engine: "engine",
|
|
7286
|
+
engine_starting: "engine",
|
|
7287
|
+
lawn_mower: "engine",
|
|
7288
|
+
chainsaw: "engine",
|
|
7289
|
+
hammer: "tools",
|
|
7290
|
+
jackhammer: "tools",
|
|
7291
|
+
drill: "tools",
|
|
7292
|
+
power_tool: "tools",
|
|
7293
|
+
silence: "silence"
|
|
7294
|
+
},
|
|
7295
|
+
preserveOriginal: false
|
|
7296
|
+
};
|
|
7297
|
+
var _macroLookup = /* @__PURE__ */ new Map();
|
|
7298
|
+
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7299
|
+
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7166
7300
|
/**
|
|
7167
7301
|
* Accessory device helpers — shared across drivers.
|
|
7168
7302
|
*
|
|
@@ -7616,78 +7750,6 @@ var airQualitySensorCapability = {
|
|
|
7616
7750
|
runtimeState: AirQualitySensorStatusSchema
|
|
7617
7751
|
};
|
|
7618
7752
|
/**
|
|
7619
|
-
* Generic types for capability definitions.
|
|
7620
|
-
*
|
|
7621
|
-
* A capability is defined with Zod schemas for methods, events, and settings.
|
|
7622
|
-
* TypeScript types are inferred via z.infer<> — zero duplication.
|
|
7623
|
-
*
|
|
7624
|
-
* Pattern:
|
|
7625
|
-
* 1. Define Zod schemas for data, methods, settings
|
|
7626
|
-
* 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
|
|
7627
|
-
* 3. Export type IProvider = InferProvider<typeof capabilityDef>
|
|
7628
|
-
* 4. Addon implements IProvider
|
|
7629
|
-
* 5. Registry auto-mounts tRPC router from definition.methods
|
|
7630
|
-
*/
|
|
7631
|
-
/**
|
|
7632
|
-
* Output schema shared by the contribution + live methods.
|
|
7633
|
-
*
|
|
7634
|
-
* Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
|
|
7635
|
-
* tabs[]) without importing from `../interfaces/config-ui.js` — a
|
|
7636
|
-
* concrete-but-lenient Zod object keeps tRPC output inference happy
|
|
7637
|
-
* (using `z.unknown()` here collapses unrelated router branches to
|
|
7638
|
-
* `unknown` when the generator re-inlines the huge AppRouter type).
|
|
7639
|
-
*
|
|
7640
|
-
* `.passthrough()` on sections/fields accepts whatever FormBuilder
|
|
7641
|
-
* extensions the caller adds (showWhen, displayScale, …) without
|
|
7642
|
-
* rebuilding every time a new field kind is introduced.
|
|
7643
|
-
*/
|
|
7644
|
-
var ContributionSectionSchema = object({
|
|
7645
|
-
id: string(),
|
|
7646
|
-
title: string(),
|
|
7647
|
-
description: string().optional(),
|
|
7648
|
-
style: _enum(["card", "accordion"]).optional(),
|
|
7649
|
-
defaultCollapsed: boolean().optional(),
|
|
7650
|
-
columns: union([
|
|
7651
|
-
literal(1),
|
|
7652
|
-
literal(2),
|
|
7653
|
-
literal(3),
|
|
7654
|
-
literal(4)
|
|
7655
|
-
]).optional(),
|
|
7656
|
-
tab: string().optional(),
|
|
7657
|
-
location: _enum(["settings", "top-tab"]).optional(),
|
|
7658
|
-
order: number().optional(),
|
|
7659
|
-
fields: array(any())
|
|
7660
|
-
});
|
|
7661
|
-
object({
|
|
7662
|
-
tabs: array(object({
|
|
7663
|
-
id: string(),
|
|
7664
|
-
label: string(),
|
|
7665
|
-
icon: string(),
|
|
7666
|
-
order: number().optional()
|
|
7667
|
-
})).optional(),
|
|
7668
|
-
sections: array(ContributionSectionSchema)
|
|
7669
|
-
}).nullable();
|
|
7670
|
-
object({ deviceId: number() }), object({ deviceId: number() }), object({
|
|
7671
|
-
deviceId: number(),
|
|
7672
|
-
patch: record(string(), unknown())
|
|
7673
|
-
}), object({ success: literal(true) });
|
|
7674
|
-
object({ deviceId: number() }), unknown().nullable();
|
|
7675
|
-
/** Shorthand to define a method schema */
|
|
7676
|
-
function method(input, output, options) {
|
|
7677
|
-
return {
|
|
7678
|
-
input,
|
|
7679
|
-
output,
|
|
7680
|
-
kind: options?.kind ?? "query",
|
|
7681
|
-
auth: options?.auth ?? "protected",
|
|
7682
|
-
...options?.access !== void 0 ? { access: options.access } : {},
|
|
7683
|
-
timeoutMs: options?.timeoutMs
|
|
7684
|
-
};
|
|
7685
|
-
}
|
|
7686
|
-
/** Shorthand to define an event schema */
|
|
7687
|
-
function event(data) {
|
|
7688
|
-
return { data };
|
|
7689
|
-
}
|
|
7690
|
-
/**
|
|
7691
7753
|
* Alarm-panel cap. Models HA `alarm_control_panel.*` on
|
|
7692
7754
|
* `DeviceType.AlarmPanel`. State follows HA's canonical lifecycle
|
|
7693
7755
|
* across disarmed / armed_(home|away|night|vacation|custom_bypass) /
|
|
@@ -14159,9 +14221,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
14159
14221
|
limit: number().optional(),
|
|
14160
14222
|
tags: record(string(), string()).optional()
|
|
14161
14223
|
}), array(LogEntrySchema).readonly());
|
|
14162
|
-
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
14163
|
-
var VersionOutputSchema = object({ version: string() });
|
|
14164
|
-
method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
|
|
14165
14224
|
/**
|
|
14166
14225
|
* Zod schemas for persisted record types.
|
|
14167
14226
|
*
|
|
@@ -16462,7 +16521,7 @@ method(object({
|
|
|
16462
16521
|
}), _void(), {
|
|
16463
16522
|
kind: "mutation",
|
|
16464
16523
|
auth: "admin"
|
|
16465
|
-
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
|
|
16524
|
+
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
|
|
16466
16525
|
deviceId: number(),
|
|
16467
16526
|
values: record(string(), unknown())
|
|
16468
16527
|
}), object({ success: literal(true) }), {
|
|
@@ -17187,7 +17246,20 @@ var DiskSpaceInfoSchema = object({
|
|
|
17187
17246
|
var PidResourceStatsSchema = object({
|
|
17188
17247
|
pid: number(),
|
|
17189
17248
|
cpu: number(),
|
|
17190
|
-
memory: number()
|
|
17249
|
+
memory: number(),
|
|
17250
|
+
/**
|
|
17251
|
+
* Private (anonymous) resident bytes — the per-process V8 heap + native
|
|
17252
|
+
* allocations NOT shared with other processes (Linux RssAnon). This is the
|
|
17253
|
+
* "real" per-runner cost; summing it across runners is meaningful, unlike
|
|
17254
|
+
* `memory` (RSS), which double-counts the shared mmap'd framework code.
|
|
17255
|
+
* Undefined where /proc is unavailable (e.g. macOS).
|
|
17256
|
+
*/
|
|
17257
|
+
privateBytes: number().optional(),
|
|
17258
|
+
/**
|
|
17259
|
+
* Shared file-backed resident bytes (Linux RssFile) — mmap'd framework/lib
|
|
17260
|
+
* code shared copy-on-write across runners. Undefined on macOS.
|
|
17261
|
+
*/
|
|
17262
|
+
sharedBytes: number().optional()
|
|
17191
17263
|
});
|
|
17192
17264
|
var AddonInstanceSchema = object({
|
|
17193
17265
|
addonId: string(),
|
|
@@ -17236,6 +17308,17 @@ var KillProcessResultSchema = object({
|
|
|
17236
17308
|
reason: string().optional(),
|
|
17237
17309
|
signal: _enum(["SIGTERM", "SIGKILL"]).optional()
|
|
17238
17310
|
});
|
|
17311
|
+
var DumpHeapSnapshotInputSchema = object({
|
|
17312
|
+
/** The addon whose runner should dump a heap snapshot. */
|
|
17313
|
+
addonId: string() });
|
|
17314
|
+
var DumpHeapSnapshotResultSchema = object({
|
|
17315
|
+
success: boolean(),
|
|
17316
|
+
/** Path of the written .heapsnapshot inside the runner's container/host. */
|
|
17317
|
+
path: string().optional(),
|
|
17318
|
+
/** Process pid that was signalled. */
|
|
17319
|
+
pid: number().optional(),
|
|
17320
|
+
reason: string().optional()
|
|
17321
|
+
});
|
|
17239
17322
|
var SystemMetricsSchema = object({
|
|
17240
17323
|
cpuPercent: number(),
|
|
17241
17324
|
memoryPercent: number(),
|
|
@@ -17249,6 +17332,9 @@ var SystemMetricsSchema = object({
|
|
|
17249
17332
|
method(_void(), SystemResourceSnapshotSchema), method(_void(), SystemResourceSnapshotSchema.nullable()), method(_void(), SystemMetricsSchema), method(object({ dirPath: string() }), DiskSpaceInfoSchema), method(_void(), MetricsGpuInfoSchema.nullable()), method(_void(), number().nullable()), method(object({ pids: array(number()) }), array(PidResourceStatsSchema)), method(_void(), array(AddonInstanceSchema).readonly()), method(object({ addonId: string() }), PidResourceStatsSchema.nullable()), method(_void(), array(NodeProcessSchema).readonly()), method(KillProcessInputSchema, KillProcessResultSchema, {
|
|
17250
17333
|
kind: "mutation",
|
|
17251
17334
|
auth: "admin"
|
|
17335
|
+
}), method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
|
|
17336
|
+
kind: "mutation",
|
|
17337
|
+
auth: "admin"
|
|
17252
17338
|
});
|
|
17253
17339
|
var PtzPresetSchema = object({
|
|
17254
17340
|
id: string(),
|
|
@@ -17615,63 +17701,6 @@ method(object({
|
|
|
17615
17701
|
auth: "admin"
|
|
17616
17702
|
});
|
|
17617
17703
|
/**
|
|
17618
|
-
* device-ops — device-scoped cap that unifies the per-IDevice operations
|
|
17619
|
-
* previously routed through the `.device-ops` Moleculer bridge service.
|
|
17620
|
-
*
|
|
17621
|
-
* Each worker that hosts live `IDevice` instances auto-registers a native
|
|
17622
|
-
* provider for this cap (per device) backed by its local
|
|
17623
|
-
* `DeviceRegistry`. Hub-side callers reach it transparently through
|
|
17624
|
-
* `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
|
|
17625
|
-
* `deviceId` + `nodeId` and dispatches through the standard cap-router,
|
|
17626
|
-
* so there's no parallel bridge path anymore.
|
|
17627
|
-
*
|
|
17628
|
-
* The surface is intentionally small — every method corresponds to a
|
|
17629
|
-
* single action on the live `IDevice` (or `ICameraDevice` for
|
|
17630
|
-
* `getStreamSources`). Richer orchestration (enable/disable with
|
|
17631
|
-
* integration plumbing, bulk updates) stays in the `device-manager` cap;
|
|
17632
|
-
* `device-ops` is the per-device primitive the device-manager routes to.
|
|
17633
|
-
*/
|
|
17634
|
-
var StreamSourceEntrySchema$1 = object({
|
|
17635
|
-
id: string(),
|
|
17636
|
-
label: string(),
|
|
17637
|
-
protocol: _enum([
|
|
17638
|
-
"rtsp",
|
|
17639
|
-
"rtmp",
|
|
17640
|
-
"annexb",
|
|
17641
|
-
"http-mjpeg",
|
|
17642
|
-
"webrtc",
|
|
17643
|
-
"custom"
|
|
17644
|
-
]),
|
|
17645
|
-
url: string().optional(),
|
|
17646
|
-
resolution: object({
|
|
17647
|
-
width: number(),
|
|
17648
|
-
height: number()
|
|
17649
|
-
}).optional(),
|
|
17650
|
-
fps: number().optional(),
|
|
17651
|
-
bitrate: number().optional(),
|
|
17652
|
-
codec: string().optional(),
|
|
17653
|
-
profileHint: CamProfileSchema.optional(),
|
|
17654
|
-
sdp: string().optional()
|
|
17655
|
-
});
|
|
17656
|
-
var ConfigEntrySchema$1 = object({
|
|
17657
|
-
key: string(),
|
|
17658
|
-
value: unknown()
|
|
17659
|
-
});
|
|
17660
|
-
var RawStateResultSchema = object({
|
|
17661
|
-
/** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
|
|
17662
|
-
source: string(),
|
|
17663
|
-
/** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
|
|
17664
|
-
data: record(string(), unknown())
|
|
17665
|
-
});
|
|
17666
|
-
method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema$1)), method(object({
|
|
17667
|
-
deviceId: number(),
|
|
17668
|
-
values: record(string(), unknown())
|
|
17669
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
17670
|
-
deviceId: number(),
|
|
17671
|
-
action: string().min(1),
|
|
17672
|
-
input: unknown()
|
|
17673
|
-
}), unknown(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
17674
|
-
/**
|
|
17675
17704
|
* camera-credentials — device-scoped cap exposing the camera's network
|
|
17676
17705
|
* + auth surface in a vendor-neutral shape.
|
|
17677
17706
|
*
|
|
@@ -21367,6 +21396,12 @@ Object.freeze({
|
|
|
21367
21396
|
addonId: null,
|
|
21368
21397
|
access: "view"
|
|
21369
21398
|
},
|
|
21399
|
+
"metricsProvider.dumpHeapSnapshot": {
|
|
21400
|
+
capName: "metrics-provider",
|
|
21401
|
+
capScope: "system",
|
|
21402
|
+
addonId: null,
|
|
21403
|
+
access: "create"
|
|
21404
|
+
},
|
|
21370
21405
|
"metricsProvider.getAddonStats": {
|
|
21371
21406
|
capName: "metrics-provider",
|
|
21372
21407
|
capScope: "system",
|