@camstack/addon-export-hap 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/export-hap.addon.js +715 -680
- package/dist/export-hap.addon.mjs +715 -680
- package/package.json +1 -1
package/dist/export-hap.addon.js
CHANGED
|
@@ -4664,63 +4664,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4664
4664
|
return inst;
|
|
4665
4665
|
}
|
|
4666
4666
|
//#endregion
|
|
4667
|
-
//#region ../types/dist/
|
|
4668
|
-
/**
|
|
4669
|
-
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
4670
|
-
* every declared capability + widget of every installed plugin, on every
|
|
4671
|
-
* node. Produced by the backend `WiringHealthService` and surfaced via
|
|
4672
|
-
* `GET /health/wiring`, the tRPC `health.wiring` query, and the boot-gate.
|
|
4673
|
-
*
|
|
4674
|
-
* Unlike `/health` (process liveness), this reflects whether each cap/widget
|
|
4675
|
-
* is actually *reachable* over the real cap-dispatch path. See spec
|
|
4676
|
-
* `docs/superpowers/specs/2026-05-23-deep-healthcheck-design.md`.
|
|
4677
|
-
*/
|
|
4678
|
-
/** What kind of target a probe addressed. */
|
|
4679
|
-
var wiringProbeKindSchema = _enum([
|
|
4680
|
-
"singleton",
|
|
4681
|
-
"device",
|
|
4682
|
-
"widget"
|
|
4683
|
-
]);
|
|
4684
|
-
/** Result of probing a single (cap|widget [, device]) target. */
|
|
4685
|
-
var wiringProbeResultSchema = object({
|
|
4686
|
-
capName: string(),
|
|
4687
|
-
kind: wiringProbeKindSchema,
|
|
4688
|
-
deviceId: number().optional(),
|
|
4689
|
-
reachable: boolean(),
|
|
4690
|
-
latencyMs: number(),
|
|
4691
|
-
error: string().optional()
|
|
4692
|
-
});
|
|
4693
|
-
/** Per-addon roll-up of cap + widget probe results. */
|
|
4694
|
-
var wiringAddonHealthSchema = object({
|
|
4695
|
-
addonId: string(),
|
|
4696
|
-
caps: array(wiringProbeResultSchema).readonly(),
|
|
4697
|
-
widgets: array(wiringProbeResultSchema).readonly()
|
|
4698
|
-
});
|
|
4699
|
-
/** Per-node roll-up. */
|
|
4700
|
-
var wiringNodeHealthSchema = object({
|
|
4701
|
-
nodeId: string(),
|
|
4702
|
-
addons: array(wiringAddonHealthSchema).readonly()
|
|
4703
|
-
});
|
|
4704
|
-
object({
|
|
4705
|
-
/** True only when every probed target is reachable. */
|
|
4706
|
-
ok: boolean(),
|
|
4707
|
-
/** True when at least one target is unreachable. */
|
|
4708
|
-
degraded: boolean(),
|
|
4709
|
-
checkedAt: string(),
|
|
4710
|
-
nodes: array(wiringNodeHealthSchema).readonly(),
|
|
4711
|
-
summary: object({
|
|
4712
|
-
total: number(),
|
|
4713
|
-
reachable: number(),
|
|
4714
|
-
unreachable: number()
|
|
4715
|
-
})
|
|
4716
|
-
});
|
|
4717
|
-
var MODEL_FORMATS = [
|
|
4718
|
-
"onnx",
|
|
4719
|
-
"coreml",
|
|
4720
|
-
"openvino",
|
|
4721
|
-
"tflite",
|
|
4722
|
-
"pt"
|
|
4723
|
-
];
|
|
4667
|
+
//#region ../types/dist/sleep-D7JeS58T.mjs
|
|
4724
4668
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4725
4669
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4726
4670
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -6043,7 +5987,7 @@ var ProfileSlotSchema = object({
|
|
|
6043
5987
|
* Zod schema for StreamSourceEntry — the canonical stream descriptor
|
|
6044
5988
|
* exposed by ICameraDevice.getStreamSources() and consumed by the broker.
|
|
6045
5989
|
*/
|
|
6046
|
-
var StreamSourceEntrySchema = object({
|
|
5990
|
+
var StreamSourceEntrySchema$1 = object({
|
|
6047
5991
|
id: string(),
|
|
6048
5992
|
label: string(),
|
|
6049
5993
|
protocol: _enum([
|
|
@@ -6265,121 +6209,583 @@ var ProfileRtspEntrySchema = object({
|
|
|
6265
6209
|
codec: string().optional(),
|
|
6266
6210
|
resolution: CamStreamResolutionSchema.optional()
|
|
6267
6211
|
});
|
|
6212
|
+
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
6213
|
+
DeviceType["Camera"] = "camera";
|
|
6214
|
+
DeviceType["Hub"] = "hub";
|
|
6215
|
+
DeviceType["Light"] = "light";
|
|
6216
|
+
DeviceType["Siren"] = "siren";
|
|
6217
|
+
DeviceType["Switch"] = "switch";
|
|
6218
|
+
DeviceType["Sensor"] = "sensor";
|
|
6219
|
+
DeviceType["Thermostat"] = "thermostat";
|
|
6220
|
+
DeviceType["Button"] = "button";
|
|
6221
|
+
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
6222
|
+
* event vocabulary verbatim (no normalization). Installed with the
|
|
6223
|
+
* `event-emitter` cap. Sources: HA `event.*` entities (structured) and
|
|
6224
|
+
* HA bus events (e.g. `zha_event`, generic). */
|
|
6225
|
+
DeviceType["EventEmitter"] = "event-emitter";
|
|
6226
|
+
/** Firmware/software update entity — current vs available version,
|
|
6227
|
+
* updatable flag, update state, and an install action. Installed with
|
|
6228
|
+
* the `update` cap. Sources: Homematic firmware-update channels (and
|
|
6229
|
+
* reusable by other providers, e.g. HA `update.*` entities). */
|
|
6230
|
+
DeviceType["Update"] = "update";
|
|
6231
|
+
DeviceType["Generic"] = "generic";
|
|
6232
|
+
/** Generic notification delivery target (HA `notify.<service>`, future
|
|
6233
|
+
* Telegram / Discord / ntfy / SMTP, …). One device per delivery
|
|
6234
|
+
* endpoint; the `notifier` cap defines the send surface. */
|
|
6235
|
+
DeviceType["Notifier"] = "notifier";
|
|
6236
|
+
/** Pre-recorded action sequence with optional parameters
|
|
6237
|
+
* (HA `script.*`). Runnable via `script-runner` cap. */
|
|
6238
|
+
DeviceType["Script"] = "script";
|
|
6239
|
+
/** Automation rule (HA `automation.*`) — enable/disable + manual
|
|
6240
|
+
* trigger surface exposed via `automation-control` cap. */
|
|
6241
|
+
DeviceType["Automation"] = "automation";
|
|
6242
|
+
/** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
|
|
6243
|
+
DeviceType["Lock"] = "lock";
|
|
6244
|
+
/** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
|
|
6245
|
+
* `valve.*`). `cover` cap with sub-roles for variant. */
|
|
6246
|
+
DeviceType["Cover"] = "cover";
|
|
6247
|
+
/** Pipe / water / gas valve with open/close/stop and optional
|
|
6248
|
+
* position (HA `valve.*`). `valve` cap — a cover-sibling actuator
|
|
6249
|
+
* modelled on the same open/closed lifecycle. */
|
|
6250
|
+
DeviceType["Valve"] = "valve";
|
|
6251
|
+
/** Humidifier / dehumidifier with on/off + target humidity + mode
|
|
6252
|
+
* (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
|
|
6253
|
+
* modelled on the same target / mode lifecycle. */
|
|
6254
|
+
DeviceType["Humidifier"] = "humidifier";
|
|
6255
|
+
/** Water heater / boiler with target temperature + operation mode +
|
|
6256
|
+
* away mode (HA `water_heater.*`). `water-heater` cap — a
|
|
6257
|
+
* climate-family actuator. */
|
|
6258
|
+
DeviceType["WaterHeater"] = "water-heater";
|
|
6259
|
+
/** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
|
|
6260
|
+
DeviceType["Fan"] = "fan";
|
|
6261
|
+
/** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
|
|
6262
|
+
* the camera surface — those use `Camera`. `media-player` cap. */
|
|
6263
|
+
DeviceType["MediaPlayer"] = "media-player";
|
|
6264
|
+
/** Security panel / alarm system (HA `alarm_control_panel.*`).
|
|
6265
|
+
* `alarm-panel` cap. */
|
|
6266
|
+
DeviceType["AlarmPanel"] = "alarm-panel";
|
|
6267
|
+
/** Generic user-settable input (HA `number` / `input_number` / `select`
|
|
6268
|
+
* / `input_select` / `text` / `input_text` / `input_datetime`).
|
|
6269
|
+
* Sub-type via `DeviceRole`: NumericControl / SelectControl /
|
|
6270
|
+
* TextControl / DateTimeControl. */
|
|
6271
|
+
DeviceType["Control"] = "control";
|
|
6272
|
+
/** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
|
|
6273
|
+
* `presence` cap. */
|
|
6274
|
+
DeviceType["Presence"] = "presence";
|
|
6275
|
+
/** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
|
|
6276
|
+
* `weather` cap. */
|
|
6277
|
+
DeviceType["Weather"] = "weather";
|
|
6278
|
+
/** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
|
|
6279
|
+
DeviceType["Vacuum"] = "vacuum";
|
|
6280
|
+
/** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
|
|
6281
|
+
* `lawn-mower-control` cap. */
|
|
6282
|
+
DeviceType["LawnMower"] = "lawn-mower";
|
|
6283
|
+
/** Physical HA device group — parent container for entity-children
|
|
6284
|
+
* adopted from a single HA device entry. Not renderable as a
|
|
6285
|
+
* standalone device; exists only to anchor child entities. */
|
|
6286
|
+
DeviceType["Container"] = "container";
|
|
6287
|
+
/** Single still-image entity (HA `image.*`). Read-only display of an
|
|
6288
|
+
* `entity_picture` signed URL the browser loads directly. `image` cap. */
|
|
6289
|
+
DeviceType["Image"] = "image";
|
|
6290
|
+
return DeviceType;
|
|
6291
|
+
}({});
|
|
6292
|
+
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
6293
|
+
DeviceFeature["BatteryOperated"] = "battery-operated";
|
|
6294
|
+
DeviceFeature["Rebootable"] = "rebootable";
|
|
6295
|
+
/**
|
|
6296
|
+
* Device supports an on-demand re-sync of its derived spec with its
|
|
6297
|
+
* upstream source — drives the generic Re-sync button. The owning
|
|
6298
|
+
* provider implements the action via the `device-adoption.resync` cap.
|
|
6299
|
+
*/
|
|
6300
|
+
DeviceFeature["Resyncable"] = "resyncable";
|
|
6301
|
+
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
6302
|
+
DeviceFeature["DoorbellButton"] = "doorbell-button";
|
|
6303
|
+
DeviceFeature["TwoWayAudio"] = "two-way-audio";
|
|
6304
|
+
DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
|
|
6305
|
+
/**
|
|
6306
|
+
* Camera supports the on-firmware autotrack subsystem (subject-
|
|
6307
|
+
* following). Distinct from `PanTiltZoom` because not every PTZ
|
|
6308
|
+
* camera ships autotrack — the admin UI uses this flag to gate
|
|
6309
|
+
* the autotrack toggle / settings card without re-deriving from
|
|
6310
|
+
* the cap registry. Mirrors `ptz-autotrack` cap registration:
|
|
6311
|
+
* driver sets this feature when probe confirms the firmware
|
|
6312
|
+
* surface, and registers the cap in the same code path.
|
|
6313
|
+
*/
|
|
6314
|
+
DeviceFeature["PtzAutotrack"] = "ptz-autotrack";
|
|
6315
|
+
/**
|
|
6316
|
+
* Accessory exposes a "trigger on motion" toggle — the parent camera's
|
|
6317
|
+
* motion detection automatically activates this device. Mirrors
|
|
6318
|
+
* `motion-trigger` cap registration: drivers set this feature in the
|
|
6319
|
+
* same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
|
|
6320
|
+
*
|
|
6321
|
+
* Used by admin UI (gate the in-hero `MotionTriggerToggle` against a
|
|
6322
|
+
* fast scalar without binding fetch), notifier rules, and `listAll`
|
|
6323
|
+
* filters that want "all devices with on-motion behaviour".
|
|
6324
|
+
*/
|
|
6325
|
+
DeviceFeature["MotionTrigger"] = "motion-trigger";
|
|
6326
|
+
/** Light supports rgb-triplet color via `color` cap. */
|
|
6327
|
+
DeviceFeature["LightColorRgb"] = "light-color-rgb";
|
|
6328
|
+
/** Light supports HSV color via `color` cap. */
|
|
6329
|
+
DeviceFeature["LightColorHsv"] = "light-color-hsv";
|
|
6330
|
+
/** Light supports color-temperature (mired) via `color` cap. */
|
|
6331
|
+
DeviceFeature["LightColorMired"] = "light-color-mired";
|
|
6332
|
+
/** Thermostat supports a `heat_cool` dual setpoint (targetLow +
|
|
6333
|
+
* targetHigh). Gates the range slider UI. */
|
|
6334
|
+
DeviceFeature["ClimateDualSetpoint"] = "climate-dual-setpoint";
|
|
6335
|
+
/** Thermostat exposes target humidity and/or current humidity
|
|
6336
|
+
* readings. Gates the humidity controls. */
|
|
6337
|
+
DeviceFeature["ClimateHumidity"] = "climate-humidity";
|
|
6338
|
+
/** Thermostat exposes a fan-mode selector. */
|
|
6339
|
+
DeviceFeature["ClimateFanMode"] = "climate-fan-mode";
|
|
6340
|
+
/** Thermostat exposes preset modes (eco / away / sleep / vendor). */
|
|
6341
|
+
DeviceFeature["ClimatePreset"] = "climate-preset";
|
|
6342
|
+
/** Cover exposes intermediate position control (0..100). Gates the
|
|
6343
|
+
* position slider UI. */
|
|
6344
|
+
DeviceFeature["CoverPositionable"] = "cover-positionable";
|
|
6345
|
+
/** Cover exposes slat-tilt control. Gates the tilt slider UI. */
|
|
6346
|
+
DeviceFeature["CoverTilt"] = "cover-tilt";
|
|
6347
|
+
/** Valve exposes intermediate position control (0..100). Gates the
|
|
6348
|
+
* position slider / drag surface UI. */
|
|
6349
|
+
DeviceFeature["ValvePositionable"] = "valve-positionable";
|
|
6350
|
+
/** Fan exposes a speed-percentage setter. Gates the speed slider UI. */
|
|
6351
|
+
DeviceFeature["FanSpeed"] = "fan-speed";
|
|
6352
|
+
/** Fan exposes a preset mode selector. */
|
|
6353
|
+
DeviceFeature["FanPreset"] = "fan-preset";
|
|
6354
|
+
/** Fan exposes blade direction (forward/reverse) — typical of
|
|
6355
|
+
* ceiling fans. */
|
|
6356
|
+
DeviceFeature["FanDirection"] = "fan-direction";
|
|
6357
|
+
/** Fan exposes an oscillation toggle. */
|
|
6358
|
+
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
6359
|
+
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
6360
|
+
* field on the UI lock-controls panel. */
|
|
6361
|
+
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
6362
|
+
/** Lock supports a latch-release ("open door") action distinct from
|
|
6363
|
+
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
6364
|
+
* `supported_features`. Gates the Open Door button in the UI. */
|
|
6365
|
+
DeviceFeature["LockOpen"] = "lock-open";
|
|
6366
|
+
/** Media player exposes a seek-to-position surface. */
|
|
6367
|
+
DeviceFeature["MediaPlayerSeek"] = "media-player-seek";
|
|
6368
|
+
/** Media player exposes a volume-level setter. */
|
|
6369
|
+
DeviceFeature["MediaPlayerVolume"] = "media-player-volume";
|
|
6370
|
+
/** Media player exposes a mute toggle distinct from volume=0. */
|
|
6371
|
+
DeviceFeature["MediaPlayerMute"] = "media-player-mute";
|
|
6372
|
+
/** Media player exposes a shuffle toggle. */
|
|
6373
|
+
DeviceFeature["MediaPlayerShuffle"] = "media-player-shuffle";
|
|
6374
|
+
/** Media player exposes a repeat mode (off / all / one). */
|
|
6375
|
+
DeviceFeature["MediaPlayerRepeat"] = "media-player-repeat";
|
|
6376
|
+
/** Media player exposes a source / input selector. */
|
|
6377
|
+
DeviceFeature["MediaPlayerSelectSource"] = "media-player-select-source";
|
|
6378
|
+
/** Media player exposes a play-arbitrary-media surface (URL / id). */
|
|
6379
|
+
DeviceFeature["MediaPlayerPlayMedia"] = "media-player-play-media";
|
|
6380
|
+
/** Media player exposes next-track. */
|
|
6381
|
+
DeviceFeature["MediaPlayerNext"] = "media-player-next";
|
|
6382
|
+
/** Media player exposes previous-track. */
|
|
6383
|
+
DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
|
|
6384
|
+
/** Media player exposes stop distinct from pause. */
|
|
6385
|
+
DeviceFeature["MediaPlayerStop"] = "media-player-stop";
|
|
6386
|
+
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
6387
|
+
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
6388
|
+
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
6389
|
+
* addition to a textual location. */
|
|
6390
|
+
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
6391
|
+
/** Notifier accepts an inline / URL image attachment. */
|
|
6392
|
+
DeviceFeature["NotifierImage"] = "notifier-image";
|
|
6393
|
+
/** Notifier accepts a priority hint (high/normal/low). */
|
|
6394
|
+
DeviceFeature["NotifierPriority"] = "notifier-priority";
|
|
6395
|
+
/** Notifier accepts a free-form `data` payload for platform-specific
|
|
6396
|
+
* fields. */
|
|
6397
|
+
DeviceFeature["NotifierData"] = "notifier-data";
|
|
6398
|
+
/** Notifier supports interactive action buttons / callbacks. */
|
|
6399
|
+
DeviceFeature["NotifierActions"] = "notifier-actions";
|
|
6400
|
+
/** Notifier supports per-call recipient targeting (multi-user). */
|
|
6401
|
+
DeviceFeature["NotifierRecipients"] = "notifier-recipients";
|
|
6402
|
+
/** Script runner accepts a variables map on each run invocation. */
|
|
6403
|
+
DeviceFeature["ScriptVariables"] = "script-variables";
|
|
6404
|
+
/** Automation `trigger` accepts a skipCondition flag — fires the
|
|
6405
|
+
* automation's actions while bypassing its condition block. */
|
|
6406
|
+
DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
|
|
6407
|
+
return DeviceFeature;
|
|
6408
|
+
}({});
|
|
6268
6409
|
/**
|
|
6269
|
-
*
|
|
6270
|
-
*
|
|
6271
|
-
*
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
|
|
6276
|
-
kind: literal("timeOfDay"),
|
|
6277
|
-
start: string().regex(HHMM),
|
|
6278
|
-
end: string().regex(HHMM),
|
|
6279
|
-
/** Restrict to these weekdays; omit = every day. */
|
|
6280
|
-
days: array(RecordingWeekdaySchema).optional()
|
|
6281
|
-
})]);
|
|
6282
|
-
var RecordingModeSchema = _enum([
|
|
6283
|
-
"continuous",
|
|
6284
|
-
"onMotion",
|
|
6285
|
-
"onAudioThreshold"
|
|
6286
|
-
]);
|
|
6287
|
-
/**
|
|
6288
|
-
* First-class, authoritative per-camera storage mode — the netta choice the UI
|
|
6289
|
-
* reads directly (never inferred from `rules`):
|
|
6290
|
-
* - `off` — not recording.
|
|
6291
|
-
* - `events` — record only around triggers (motion / audio threshold),
|
|
6292
|
-
* with pre/post-buffer.
|
|
6293
|
-
* - `continuous` — record 24/7 within the schedule.
|
|
6410
|
+
* Semantic role a device plays within its parent. Populated by driver
|
|
6411
|
+
* addons when creating accessory devices (Reolink siren/floodlight/
|
|
6412
|
+
* PIR/chime/autotrack/doorbell, ONVIF relay outputs, …). Used by the
|
|
6413
|
+
* admin UI to pick icons, labels, and widgets — a `Switch` with
|
|
6414
|
+
* `role: Floodlight` renders as a bulb with a brightness slider,
|
|
6415
|
+
* whereas a `Switch` with `role: Siren` renders as a klaxon.
|
|
6294
6416
|
*
|
|
6295
|
-
*
|
|
6296
|
-
*
|
|
6417
|
+
* Undefined for top-level devices (cameras, NVRs, hubs). Persisted in
|
|
6418
|
+
* sqlite as a nullable TEXT column — old rows keep working unchanged.
|
|
6297
6419
|
*/
|
|
6298
|
-
var
|
|
6299
|
-
"
|
|
6300
|
-
"
|
|
6301
|
-
"
|
|
6302
|
-
]
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6420
|
+
var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
6421
|
+
DeviceRole["Siren"] = "siren";
|
|
6422
|
+
DeviceRole["Floodlight"] = "floodlight";
|
|
6423
|
+
DeviceRole["Spotlight"] = "spotlight";
|
|
6424
|
+
DeviceRole["PirSensor"] = "pir-sensor";
|
|
6425
|
+
DeviceRole["Chime"] = "chime";
|
|
6426
|
+
DeviceRole["Autotrack"] = "autotrack";
|
|
6427
|
+
DeviceRole["Nightvision"] = "nightvision";
|
|
6428
|
+
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
6429
|
+
DeviceRole["Doorbell"] = "doorbell";
|
|
6430
|
+
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
6431
|
+
* real Switch device for UI rendering / export adapters. */
|
|
6432
|
+
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
6433
|
+
/** Generic motion / occupancy / moving event source. Distinct from
|
|
6434
|
+
* the camera accessory PirSensor role: that one is a camera child;
|
|
6435
|
+
* this is a standalone HA / 3rd-party motion sensor. */
|
|
6436
|
+
DeviceRole["MotionSensor"] = "motion-sensor";
|
|
6437
|
+
DeviceRole["ContactSensor"] = "contact-sensor";
|
|
6438
|
+
DeviceRole["LeakSensor"] = "leak-sensor";
|
|
6439
|
+
DeviceRole["SmokeSensor"] = "smoke-sensor";
|
|
6440
|
+
DeviceRole["COSensor"] = "co-sensor";
|
|
6441
|
+
DeviceRole["GasSensor"] = "gas-sensor";
|
|
6442
|
+
DeviceRole["TamperSensor"] = "tamper-sensor";
|
|
6443
|
+
DeviceRole["VibrationSensor"] = "vibration-sensor";
|
|
6444
|
+
DeviceRole["ConnectivitySensor"] = "connectivity-sensor";
|
|
6445
|
+
DeviceRole["SoundSensor"] = "sound-sensor";
|
|
6446
|
+
/** Fallback for `binary_sensor` without a known `device_class`. */
|
|
6447
|
+
DeviceRole["BinarySensor"] = "binary-sensor";
|
|
6448
|
+
DeviceRole["TemperatureSensor"] = "temperature-sensor";
|
|
6449
|
+
DeviceRole["HumiditySensor"] = "humidity-sensor";
|
|
6450
|
+
DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
|
|
6451
|
+
DeviceRole["PressureSensor"] = "pressure-sensor";
|
|
6452
|
+
DeviceRole["PowerSensor"] = "power-sensor";
|
|
6453
|
+
DeviceRole["EnergySensor"] = "energy-sensor";
|
|
6454
|
+
DeviceRole["VoltageSensor"] = "voltage-sensor";
|
|
6455
|
+
DeviceRole["CurrentSensor"] = "current-sensor";
|
|
6456
|
+
DeviceRole["AirQualitySensor"] = "air-quality-sensor";
|
|
6457
|
+
/** Battery level (numeric % via `sensor` OR low-bool via
|
|
6458
|
+
* `binary_sensor` — the cap distinguishes via the value type). */
|
|
6459
|
+
DeviceRole["BatterySensor"] = "battery-sensor";
|
|
6460
|
+
/** Fallback for `sensor` numeric without a known `device_class`. */
|
|
6461
|
+
DeviceRole["NumericSensor"] = "numeric-sensor";
|
|
6462
|
+
/** String / enum state (HA `sensor` with `state_class: enum` or
|
|
6463
|
+
* `attributes.options`). */
|
|
6464
|
+
DeviceRole["EnumSensor"] = "enum-sensor";
|
|
6465
|
+
/** Date / timestamp state (HA `sensor` with `device_class: timestamp`
|
|
6466
|
+
* or `date`). The slice carries the raw ISO string verbatim (hosted on
|
|
6467
|
+
* the `enum-sensor` cap); the UI renders it locale-formatted. */
|
|
6468
|
+
DeviceRole["DateTimeSensor"] = "datetime-sensor";
|
|
6469
|
+
/** Last-resort fallback when nothing else matches. */
|
|
6470
|
+
DeviceRole["GenericSensor"] = "generic-sensor";
|
|
6471
|
+
DeviceRole["NumericControl"] = "numeric-control";
|
|
6472
|
+
DeviceRole["SelectControl"] = "select-control";
|
|
6473
|
+
DeviceRole["TextControl"] = "text-control";
|
|
6474
|
+
DeviceRole["DateTimeControl"] = "datetime-control";
|
|
6475
|
+
/** Mobile push notifier (HA `notify.mobile_app_*`) — supports
|
|
6476
|
+
* rich features (image, priority, channel routing). */
|
|
6477
|
+
DeviceRole["MobilePushNotifier"] = "mobile-push-notifier";
|
|
6478
|
+
/** Chat / messaging service (HA `notify.telegram_*`,
|
|
6479
|
+
* `notify.discord_*`, etc.). */
|
|
6480
|
+
DeviceRole["MessagingNotifier"] = "messaging-notifier";
|
|
6481
|
+
/** Email-based delivery (HA `notify.smtp`, etc.). */
|
|
6482
|
+
DeviceRole["EmailNotifier"] = "email-notifier";
|
|
6483
|
+
/** Fallback when the notifier service name doesn't match a known
|
|
6484
|
+
* pattern. */
|
|
6485
|
+
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
6486
|
+
return DeviceRole;
|
|
6487
|
+
}({});
|
|
6308
6488
|
/**
|
|
6309
|
-
*
|
|
6489
|
+
* Generic types for capability definitions.
|
|
6310
6490
|
*
|
|
6311
|
-
*
|
|
6312
|
-
*
|
|
6313
|
-
* covering band, not by a band value.
|
|
6314
|
-
*/
|
|
6315
|
-
var RecordingBandModeSchema = _enum(["continuous", "events"]);
|
|
6316
|
-
/**
|
|
6317
|
-
* Triggers for an `events`-mode band. Identical shape to
|
|
6318
|
-
* `RecordingTriggersSchema` — reuse that schema as the band trigger type so the
|
|
6319
|
-
* two never drift.
|
|
6320
|
-
*/
|
|
6321
|
-
var RecordingBandTriggersSchema = RecordingTriggersSchema;
|
|
6322
|
-
/**
|
|
6323
|
-
* A single mode-per-band window — the canonical recorder band shape, the
|
|
6324
|
-
* single source of truth re-used by `addon-pipeline/recorder`.
|
|
6491
|
+
* A capability is defined with Zod schemas for methods, events, and settings.
|
|
6492
|
+
* TypeScript types are inferred via z.infer<> — zero duplication.
|
|
6325
6493
|
*
|
|
6326
|
-
*
|
|
6327
|
-
*
|
|
6328
|
-
*
|
|
6494
|
+
* Pattern:
|
|
6495
|
+
* 1. Define Zod schemas for data, methods, settings
|
|
6496
|
+
* 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
|
|
6497
|
+
* 3. Export type IProvider = InferProvider<typeof capabilityDef>
|
|
6498
|
+
* 4. Addon implements IProvider
|
|
6499
|
+
* 5. Registry auto-mounts tRPC router from definition.methods
|
|
6329
6500
|
*/
|
|
6330
|
-
var RecordingBandSchema = object({
|
|
6331
|
-
days: array(RecordingWeekdaySchema),
|
|
6332
|
-
start: string().regex(HHMM),
|
|
6333
|
-
end: string().regex(HHMM),
|
|
6334
|
-
mode: RecordingBandModeSchema,
|
|
6335
|
-
triggers: RecordingBandTriggersSchema.optional(),
|
|
6336
|
-
preBufferSec: number().min(0).optional(),
|
|
6337
|
-
postBufferSec: number().min(0).optional()
|
|
6338
|
-
});
|
|
6339
|
-
var RecordingRuleSchema = object({
|
|
6340
|
-
schedule: RecordingScheduleSchema,
|
|
6341
|
-
mode: RecordingModeSchema,
|
|
6342
|
-
/** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
|
|
6343
|
-
preBufferSec: number().min(0).default(0),
|
|
6344
|
-
/** Keep recording until this many seconds after the last trigger. */
|
|
6345
|
-
postBufferSec: number().min(0).default(0),
|
|
6346
|
-
/** Each new trigger restarts the post-buffer window. */
|
|
6347
|
-
resetTimeoutOnNewEvent: boolean().default(true),
|
|
6348
|
-
/** onAudioThreshold only — dBFS level that counts as a trigger. */
|
|
6349
|
-
thresholdDbfs: number().optional()
|
|
6350
|
-
});
|
|
6351
6501
|
/**
|
|
6352
|
-
*
|
|
6353
|
-
*
|
|
6354
|
-
*
|
|
6355
|
-
*
|
|
6356
|
-
*
|
|
6357
|
-
*
|
|
6502
|
+
* Output schema shared by the contribution + live methods.
|
|
6503
|
+
*
|
|
6504
|
+
* Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
|
|
6505
|
+
* tabs[]) without importing from `../interfaces/config-ui.js` — a
|
|
6506
|
+
* concrete-but-lenient Zod object keeps tRPC output inference happy
|
|
6507
|
+
* (using `z.unknown()` here collapses unrelated router branches to
|
|
6508
|
+
* `unknown` when the generator re-inlines the huge AppRouter type).
|
|
6509
|
+
*
|
|
6510
|
+
* `.passthrough()` on sections/fields accepts whatever FormBuilder
|
|
6511
|
+
* extensions the caller adds (showWhen, displayScale, …) without
|
|
6512
|
+
* rebuilding every time a new field kind is introduced.
|
|
6358
6513
|
*/
|
|
6359
|
-
var
|
|
6360
|
-
|
|
6361
|
-
|
|
6514
|
+
var ContributionSectionSchema = object({
|
|
6515
|
+
id: string(),
|
|
6516
|
+
title: string(),
|
|
6517
|
+
description: string().optional(),
|
|
6518
|
+
style: _enum(["card", "accordion"]).optional(),
|
|
6519
|
+
defaultCollapsed: boolean().optional(),
|
|
6520
|
+
columns: union([
|
|
6521
|
+
literal(1),
|
|
6522
|
+
literal(2),
|
|
6523
|
+
literal(3),
|
|
6524
|
+
literal(4)
|
|
6525
|
+
]).optional(),
|
|
6526
|
+
tab: string().optional(),
|
|
6527
|
+
location: _enum(["settings", "top-tab"]).optional(),
|
|
6528
|
+
order: number().optional(),
|
|
6529
|
+
fields: array(any())
|
|
6362
6530
|
});
|
|
6531
|
+
object({
|
|
6532
|
+
tabs: array(object({
|
|
6533
|
+
id: string(),
|
|
6534
|
+
label: string(),
|
|
6535
|
+
icon: string(),
|
|
6536
|
+
order: number().optional()
|
|
6537
|
+
})).optional(),
|
|
6538
|
+
sections: array(ContributionSectionSchema)
|
|
6539
|
+
}).nullable();
|
|
6540
|
+
object({ deviceId: number() }), object({ deviceId: number() }), object({
|
|
6541
|
+
deviceId: number(),
|
|
6542
|
+
patch: record(string(), unknown())
|
|
6543
|
+
}), object({ success: literal(true) });
|
|
6544
|
+
object({ deviceId: number() }), unknown().nullable();
|
|
6545
|
+
/** Shorthand to define a method schema */
|
|
6546
|
+
function method(input, output, options) {
|
|
6547
|
+
return {
|
|
6548
|
+
input,
|
|
6549
|
+
output,
|
|
6550
|
+
kind: options?.kind ?? "query",
|
|
6551
|
+
auth: options?.auth ?? "protected",
|
|
6552
|
+
...options?.access !== void 0 ? { access: options.access } : {},
|
|
6553
|
+
timeoutMs: options?.timeoutMs
|
|
6554
|
+
};
|
|
6555
|
+
}
|
|
6556
|
+
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
6557
|
+
var VersionOutputSchema = object({ version: string() });
|
|
6558
|
+
method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
|
|
6363
6559
|
/**
|
|
6364
|
-
*
|
|
6560
|
+
* device-ops — device-scoped cap that unifies the per-IDevice operations
|
|
6561
|
+
* previously routed through the `.device-ops` Moleculer bridge service.
|
|
6365
6562
|
*
|
|
6366
|
-
*
|
|
6367
|
-
*
|
|
6368
|
-
*
|
|
6369
|
-
*
|
|
6563
|
+
* Each worker that hosts live `IDevice` instances auto-registers a native
|
|
6564
|
+
* provider for this cap (per device) backed by its local
|
|
6565
|
+
* `DeviceRegistry`. Hub-side callers reach it transparently through
|
|
6566
|
+
* `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
|
|
6567
|
+
* `deviceId` + `nodeId` and dispatches through the standard cap-router,
|
|
6568
|
+
* so there's no parallel bridge path anymore.
|
|
6569
|
+
*
|
|
6570
|
+
* The surface is intentionally small — every method corresponds to a
|
|
6571
|
+
* single action on the live `IDevice` (or `ICameraDevice` for
|
|
6572
|
+
* `getStreamSources`). Richer orchestration (enable/disable with
|
|
6573
|
+
* integration plumbing, bulk updates) stays in the `device-manager` cap;
|
|
6574
|
+
* `device-ops` is the per-device primitive the device-manager routes to.
|
|
6370
6575
|
*/
|
|
6371
|
-
var
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6576
|
+
var StreamSourceEntrySchema = object({
|
|
6577
|
+
id: string(),
|
|
6578
|
+
label: string(),
|
|
6579
|
+
protocol: _enum([
|
|
6580
|
+
"rtsp",
|
|
6581
|
+
"rtmp",
|
|
6582
|
+
"annexb",
|
|
6583
|
+
"http-mjpeg",
|
|
6584
|
+
"webrtc",
|
|
6585
|
+
"custom"
|
|
6586
|
+
]),
|
|
6587
|
+
url: string().optional(),
|
|
6588
|
+
resolution: object({
|
|
6589
|
+
width: number(),
|
|
6590
|
+
height: number()
|
|
6591
|
+
}).optional(),
|
|
6592
|
+
fps: number().optional(),
|
|
6593
|
+
bitrate: number().optional(),
|
|
6594
|
+
codec: string().optional(),
|
|
6595
|
+
profileHint: CamProfileSchema.optional(),
|
|
6596
|
+
sdp: string().optional()
|
|
6597
|
+
});
|
|
6598
|
+
var ConfigEntrySchema$1 = object({
|
|
6599
|
+
key: string(),
|
|
6600
|
+
value: unknown()
|
|
6601
|
+
});
|
|
6602
|
+
var RawStateResultSchema = object({
|
|
6603
|
+
/** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
|
|
6604
|
+
source: string(),
|
|
6605
|
+
/** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
|
|
6606
|
+
data: record(string(), unknown())
|
|
6607
|
+
});
|
|
6608
|
+
method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(object({ deviceId: number() }), array(ConfigEntrySchema$1)), method(object({
|
|
6609
|
+
deviceId: number(),
|
|
6610
|
+
values: record(string(), unknown())
|
|
6611
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
6612
|
+
deviceId: number(),
|
|
6613
|
+
action: string().min(1),
|
|
6614
|
+
input: unknown()
|
|
6615
|
+
}), unknown(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
6616
|
+
//#endregion
|
|
6617
|
+
//#region ../types/dist/index.mjs
|
|
6618
|
+
/**
|
|
6619
|
+
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
6620
|
+
* every declared capability + widget of every installed plugin, on every
|
|
6621
|
+
* node. Produced by the backend `WiringHealthService` and surfaced via
|
|
6622
|
+
* `GET /health/wiring`, the tRPC `health.wiring` query, and the boot-gate.
|
|
6623
|
+
*
|
|
6624
|
+
* Unlike `/health` (process liveness), this reflects whether each cap/widget
|
|
6625
|
+
* is actually *reachable* over the real cap-dispatch path. See spec
|
|
6626
|
+
* `docs/superpowers/specs/2026-05-23-deep-healthcheck-design.md`.
|
|
6627
|
+
*/
|
|
6628
|
+
/** What kind of target a probe addressed. */
|
|
6629
|
+
var wiringProbeKindSchema = _enum([
|
|
6630
|
+
"singleton",
|
|
6631
|
+
"device",
|
|
6632
|
+
"widget"
|
|
6633
|
+
]);
|
|
6634
|
+
/** Result of probing a single (cap|widget [, device]) target. */
|
|
6635
|
+
var wiringProbeResultSchema = object({
|
|
6636
|
+
capName: string(),
|
|
6637
|
+
kind: wiringProbeKindSchema,
|
|
6638
|
+
deviceId: number().optional(),
|
|
6639
|
+
reachable: boolean(),
|
|
6640
|
+
latencyMs: number(),
|
|
6641
|
+
error: string().optional()
|
|
6642
|
+
});
|
|
6643
|
+
/** Per-addon roll-up of cap + widget probe results. */
|
|
6644
|
+
var wiringAddonHealthSchema = object({
|
|
6645
|
+
addonId: string(),
|
|
6646
|
+
caps: array(wiringProbeResultSchema).readonly(),
|
|
6647
|
+
widgets: array(wiringProbeResultSchema).readonly()
|
|
6648
|
+
});
|
|
6649
|
+
/** Per-node roll-up. */
|
|
6650
|
+
var wiringNodeHealthSchema = object({
|
|
6651
|
+
nodeId: string(),
|
|
6652
|
+
addons: array(wiringAddonHealthSchema).readonly()
|
|
6653
|
+
});
|
|
6654
|
+
object({
|
|
6655
|
+
/** True only when every probed target is reachable. */
|
|
6656
|
+
ok: boolean(),
|
|
6657
|
+
/** True when at least one target is unreachable. */
|
|
6658
|
+
degraded: boolean(),
|
|
6659
|
+
checkedAt: string(),
|
|
6660
|
+
nodes: array(wiringNodeHealthSchema).readonly(),
|
|
6661
|
+
summary: object({
|
|
6662
|
+
total: number(),
|
|
6663
|
+
reachable: number(),
|
|
6664
|
+
unreachable: number()
|
|
6665
|
+
})
|
|
6666
|
+
});
|
|
6667
|
+
var MODEL_FORMATS = [
|
|
6668
|
+
"onnx",
|
|
6669
|
+
"coreml",
|
|
6670
|
+
"openvino",
|
|
6671
|
+
"tflite",
|
|
6672
|
+
"pt"
|
|
6673
|
+
];
|
|
6674
|
+
/**
|
|
6675
|
+
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
6676
|
+
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
6677
|
+
* `Weekday` exported from `interfaces/timezones.ts`.
|
|
6678
|
+
*/
|
|
6679
|
+
var RecordingWeekdaySchema = number().int().min(0).max(6);
|
|
6680
|
+
var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
6681
|
+
var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
|
|
6682
|
+
kind: literal("timeOfDay"),
|
|
6683
|
+
start: string().regex(HHMM),
|
|
6684
|
+
end: string().regex(HHMM),
|
|
6685
|
+
/** Restrict to these weekdays; omit = every day. */
|
|
6686
|
+
days: array(RecordingWeekdaySchema).optional()
|
|
6687
|
+
})]);
|
|
6688
|
+
var RecordingModeSchema = _enum([
|
|
6689
|
+
"continuous",
|
|
6690
|
+
"onMotion",
|
|
6691
|
+
"onAudioThreshold"
|
|
6692
|
+
]);
|
|
6693
|
+
/**
|
|
6694
|
+
* First-class, authoritative per-camera storage mode — the netta choice the UI
|
|
6695
|
+
* reads directly (never inferred from `rules`):
|
|
6696
|
+
* - `off` — not recording.
|
|
6697
|
+
* - `events` — record only around triggers (motion / audio threshold),
|
|
6698
|
+
* with pre/post-buffer.
|
|
6699
|
+
* - `continuous` — record 24/7 within the schedule.
|
|
6700
|
+
*
|
|
6701
|
+
* `mode` compiles one-way to the internal `rules[]` consumed by the policy
|
|
6702
|
+
* engine (see `compileRules`); `rules[]` is never authored directly anymore.
|
|
6703
|
+
*/
|
|
6704
|
+
var RecordingStorageModeSchema = _enum([
|
|
6705
|
+
"off",
|
|
6706
|
+
"events",
|
|
6707
|
+
"continuous"
|
|
6708
|
+
]);
|
|
6709
|
+
/** Which detectors trigger an `events`-mode recording. */
|
|
6710
|
+
var RecordingTriggersSchema = object({
|
|
6711
|
+
motion: boolean().optional(),
|
|
6712
|
+
audioThresholdDbfs: number().optional()
|
|
6713
|
+
});
|
|
6714
|
+
/**
|
|
6715
|
+
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
6716
|
+
*
|
|
6717
|
+
* Distinct from `RecordingStorageModeSchema` (which carries `off`): a band is
|
|
6718
|
+
* only ever `continuous` or `events`; "off" is expressed by the absence of a
|
|
6719
|
+
* covering band, not by a band value.
|
|
6720
|
+
*/
|
|
6721
|
+
var RecordingBandModeSchema = _enum(["continuous", "events"]);
|
|
6722
|
+
/**
|
|
6723
|
+
* Triggers for an `events`-mode band. Identical shape to
|
|
6724
|
+
* `RecordingTriggersSchema` — reuse that schema as the band trigger type so the
|
|
6725
|
+
* two never drift.
|
|
6726
|
+
*/
|
|
6727
|
+
var RecordingBandTriggersSchema = RecordingTriggersSchema;
|
|
6728
|
+
/**
|
|
6729
|
+
* A single mode-per-band window — the canonical recorder band shape, the
|
|
6730
|
+
* single source of truth re-used by `addon-pipeline/recorder`.
|
|
6731
|
+
*
|
|
6732
|
+
* `days` lists the weekdays the band covers (empty = every day, matching the
|
|
6733
|
+
* band engine's `applies` rule). `start`/`end` are `HH:MM`; an `end <= start`
|
|
6734
|
+
* span wraps past midnight (handled by the band engine).
|
|
6735
|
+
*/
|
|
6736
|
+
var RecordingBandSchema = object({
|
|
6737
|
+
days: array(RecordingWeekdaySchema),
|
|
6738
|
+
start: string().regex(HHMM),
|
|
6739
|
+
end: string().regex(HHMM),
|
|
6740
|
+
mode: RecordingBandModeSchema,
|
|
6741
|
+
triggers: RecordingBandTriggersSchema.optional(),
|
|
6742
|
+
preBufferSec: number().min(0).optional(),
|
|
6743
|
+
postBufferSec: number().min(0).optional()
|
|
6744
|
+
});
|
|
6745
|
+
var RecordingRuleSchema = object({
|
|
6746
|
+
schedule: RecordingScheduleSchema,
|
|
6747
|
+
mode: RecordingModeSchema,
|
|
6748
|
+
/** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
|
|
6749
|
+
preBufferSec: number().min(0).default(0),
|
|
6750
|
+
/** Keep recording until this many seconds after the last trigger. */
|
|
6751
|
+
postBufferSec: number().min(0).default(0),
|
|
6752
|
+
/** Each new trigger restarts the post-buffer window. */
|
|
6753
|
+
resetTimeoutOnNewEvent: boolean().default(true),
|
|
6754
|
+
/** onAudioThreshold only — dBFS level that counts as a trigger. */
|
|
6755
|
+
thresholdDbfs: number().optional()
|
|
6756
|
+
});
|
|
6757
|
+
/**
|
|
6758
|
+
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
6759
|
+
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
6760
|
+
* live per-camera: `maxAgeDays` and `maxSizeGb`. The disk-occupancy threshold
|
|
6761
|
+
* (when the volume is too full to keep recording) is NOT a per-camera concern —
|
|
6762
|
+
* it belongs to the StorageLocation (`StorageLocation.config.minFreePercent`),
|
|
6763
|
+
* shared by every camera writing to that volume.
|
|
6764
|
+
*/
|
|
6765
|
+
var RecordingRetentionSchema = object({
|
|
6766
|
+
maxAgeDays: number().min(0).optional(),
|
|
6767
|
+
maxSizeGb: number().min(0).optional()
|
|
6768
|
+
});
|
|
6769
|
+
/**
|
|
6770
|
+
* The full per-camera recording intent — the wire shape of a RecordingTarget.
|
|
6771
|
+
*
|
|
6772
|
+
* `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
|
|
6773
|
+
* are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
|
|
6774
|
+
* only for transition + migration (`migrateRulesToMode`); the policy engine
|
|
6775
|
+
* consumes the compiled output of `compileRules(config)`, never `rules` directly.
|
|
6776
|
+
*/
|
|
6777
|
+
var RecordingConfigSchema = object({
|
|
6778
|
+
enabled: boolean(),
|
|
6779
|
+
/** Authoritative storage mode. Absent on legacy targets → derived once via
|
|
6780
|
+
* `migrateRulesToMode`, then persisted. */
|
|
6781
|
+
mode: RecordingStorageModeSchema.optional(),
|
|
6782
|
+
profiles: array(CamProfileSchema).optional(),
|
|
6783
|
+
segmentSeconds: number().int().positive().optional(),
|
|
6784
|
+
/** Shared recording time-bands for `events` & `continuous` — record only when
|
|
6785
|
+
* the wall-clock falls inside one of these windows. Omit or empty = always.
|
|
6786
|
+
* `continuous` compiles to one rule per band; `events` to band × trigger. */
|
|
6787
|
+
schedules: array(RecordingScheduleSchema).optional(),
|
|
6788
|
+
/** Legacy single-band predecessor of `schedules`. Read-compat only — it is
|
|
6383
6789
|
* normalized into `schedules` on read and never written going forward. (Not
|
|
6384
6790
|
* tagged `@deprecated`: the normalization paths must read it cast-free.) */
|
|
6385
6791
|
schedule: RecordingScheduleSchema.optional(),
|
|
@@ -6817,396 +7223,120 @@ var YAMNET_TO_MACRO = {
|
|
|
6817
7223
|
"Hubbub, speech noise, speech babble": "crowd",
|
|
6818
7224
|
Telephone: "telephone",
|
|
6819
7225
|
"Telephone bell ringing": "telephone",
|
|
6820
|
-
Ringtone: "telephone",
|
|
6821
|
-
"Telephone dialing, DTMF": "telephone",
|
|
6822
|
-
"Busy signal": "telephone",
|
|
6823
|
-
Engine: "engine",
|
|
6824
|
-
"Engine starting": "engine",
|
|
6825
|
-
Idling: "engine",
|
|
6826
|
-
"Accelerating, revving, vroom": "engine",
|
|
6827
|
-
"Light engine (high frequency)": "engine",
|
|
6828
|
-
"Medium engine (mid frequency)": "engine",
|
|
6829
|
-
"Heavy engine (low frequency)": "engine",
|
|
6830
|
-
"Lawn mower": "engine",
|
|
6831
|
-
Chainsaw: "engine",
|
|
6832
|
-
Hammer: "tools",
|
|
6833
|
-
Jackhammer: "tools",
|
|
6834
|
-
Sawing: "tools",
|
|
6835
|
-
"Power tool": "tools",
|
|
6836
|
-
Drill: "tools",
|
|
6837
|
-
Sanding: "tools",
|
|
6838
|
-
Silence: "silence"
|
|
6839
|
-
},
|
|
6840
|
-
preserveOriginal: false
|
|
6841
|
-
};
|
|
6842
|
-
var APPLE_SA_TO_MACRO = {
|
|
6843
|
-
mapping: {
|
|
6844
|
-
speech: "speech",
|
|
6845
|
-
child_speech: "speech",
|
|
6846
|
-
conversation: "speech",
|
|
6847
|
-
whispering: "speech",
|
|
6848
|
-
singing: "speech",
|
|
6849
|
-
humming: "speech",
|
|
6850
|
-
shout: "scream",
|
|
6851
|
-
yell: "scream",
|
|
6852
|
-
screaming: "scream",
|
|
6853
|
-
crying: "crying",
|
|
6854
|
-
baby_crying: "crying",
|
|
6855
|
-
sobbing: "crying",
|
|
6856
|
-
laughter: "laughter",
|
|
6857
|
-
baby_laughter: "laughter",
|
|
6858
|
-
giggling: "laughter",
|
|
6859
|
-
music: "music",
|
|
6860
|
-
guitar: "music",
|
|
6861
|
-
piano: "music",
|
|
6862
|
-
drums: "music",
|
|
6863
|
-
dog_bark: "dog",
|
|
6864
|
-
dog_bow_wow: "dog",
|
|
6865
|
-
dog_growling: "dog",
|
|
6866
|
-
dog_howl: "dog",
|
|
6867
|
-
cat_meow: "cat",
|
|
6868
|
-
cat_purr: "cat",
|
|
6869
|
-
cat_hiss: "cat",
|
|
6870
|
-
bird: "bird",
|
|
6871
|
-
bird_chirp: "bird",
|
|
6872
|
-
bird_squawk: "bird",
|
|
6873
|
-
animal: "animal",
|
|
6874
|
-
horse: "animal",
|
|
6875
|
-
cow_moo: "animal",
|
|
6876
|
-
insect: "animal",
|
|
6877
|
-
alarm: "alarm",
|
|
6878
|
-
smoke_alarm: "alarm",
|
|
6879
|
-
fire_alarm: "alarm",
|
|
6880
|
-
car_alarm: "alarm",
|
|
6881
|
-
siren: "siren",
|
|
6882
|
-
police_siren: "siren",
|
|
6883
|
-
ambulance_siren: "siren",
|
|
6884
|
-
doorbell: "doorbell",
|
|
6885
|
-
door_knock: "doorbell",
|
|
6886
|
-
knocking: "doorbell",
|
|
6887
|
-
glass_breaking: "glass_breaking",
|
|
6888
|
-
glass_shatter: "glass_breaking",
|
|
6889
|
-
gunshot: "gunshot",
|
|
6890
|
-
explosion: "gunshot",
|
|
6891
|
-
fireworks: "gunshot",
|
|
6892
|
-
car: "vehicle",
|
|
6893
|
-
truck: "vehicle",
|
|
6894
|
-
motorcycle: "vehicle",
|
|
6895
|
-
car_horn: "vehicle",
|
|
6896
|
-
vehicle_horn: "vehicle",
|
|
6897
|
-
traffic: "vehicle",
|
|
6898
|
-
fire: "fire",
|
|
6899
|
-
fire_crackle: "fire",
|
|
6900
|
-
water: "water",
|
|
6901
|
-
rain: "water",
|
|
6902
|
-
ocean: "water",
|
|
6903
|
-
splash: "water",
|
|
6904
|
-
wind: "wind",
|
|
6905
|
-
thunder: "wind",
|
|
6906
|
-
thunderstorm: "wind",
|
|
6907
|
-
door: "door",
|
|
6908
|
-
door_slam: "door",
|
|
6909
|
-
sliding_door: "door",
|
|
6910
|
-
footsteps: "footsteps",
|
|
6911
|
-
walking: "footsteps",
|
|
6912
|
-
running: "footsteps",
|
|
6913
|
-
crowd: "crowd",
|
|
6914
|
-
chatter: "crowd",
|
|
6915
|
-
cheering: "crowd",
|
|
6916
|
-
applause: "crowd",
|
|
6917
|
-
telephone_ring: "telephone",
|
|
6918
|
-
ringtone: "telephone",
|
|
6919
|
-
engine: "engine",
|
|
6920
|
-
engine_starting: "engine",
|
|
6921
|
-
lawn_mower: "engine",
|
|
6922
|
-
chainsaw: "engine",
|
|
6923
|
-
hammer: "tools",
|
|
6924
|
-
jackhammer: "tools",
|
|
6925
|
-
drill: "tools",
|
|
6926
|
-
power_tool: "tools",
|
|
6927
|
-
silence: "silence"
|
|
6928
|
-
},
|
|
6929
|
-
preserveOriginal: false
|
|
6930
|
-
};
|
|
6931
|
-
var _macroLookup = /* @__PURE__ */ new Map();
|
|
6932
|
-
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
6933
|
-
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
6934
|
-
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
6935
|
-
DeviceType["Camera"] = "camera";
|
|
6936
|
-
DeviceType["Hub"] = "hub";
|
|
6937
|
-
DeviceType["Light"] = "light";
|
|
6938
|
-
DeviceType["Siren"] = "siren";
|
|
6939
|
-
DeviceType["Switch"] = "switch";
|
|
6940
|
-
DeviceType["Sensor"] = "sensor";
|
|
6941
|
-
DeviceType["Thermostat"] = "thermostat";
|
|
6942
|
-
DeviceType["Button"] = "button";
|
|
6943
|
-
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
6944
|
-
* event vocabulary verbatim (no normalization). Installed with the
|
|
6945
|
-
* `event-emitter` cap. Sources: HA `event.*` entities (structured) and
|
|
6946
|
-
* HA bus events (e.g. `zha_event`, generic). */
|
|
6947
|
-
DeviceType["EventEmitter"] = "event-emitter";
|
|
6948
|
-
/** Firmware/software update entity — current vs available version,
|
|
6949
|
-
* updatable flag, update state, and an install action. Installed with
|
|
6950
|
-
* the `update` cap. Sources: Homematic firmware-update channels (and
|
|
6951
|
-
* reusable by other providers, e.g. HA `update.*` entities). */
|
|
6952
|
-
DeviceType["Update"] = "update";
|
|
6953
|
-
DeviceType["Generic"] = "generic";
|
|
6954
|
-
/** Generic notification delivery target (HA `notify.<service>`, future
|
|
6955
|
-
* Telegram / Discord / ntfy / SMTP, …). One device per delivery
|
|
6956
|
-
* endpoint; the `notifier` cap defines the send surface. */
|
|
6957
|
-
DeviceType["Notifier"] = "notifier";
|
|
6958
|
-
/** Pre-recorded action sequence with optional parameters
|
|
6959
|
-
* (HA `script.*`). Runnable via `script-runner` cap. */
|
|
6960
|
-
DeviceType["Script"] = "script";
|
|
6961
|
-
/** Automation rule (HA `automation.*`) — enable/disable + manual
|
|
6962
|
-
* trigger surface exposed via `automation-control` cap. */
|
|
6963
|
-
DeviceType["Automation"] = "automation";
|
|
6964
|
-
/** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
|
|
6965
|
-
DeviceType["Lock"] = "lock";
|
|
6966
|
-
/** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
|
|
6967
|
-
* `valve.*`). `cover` cap with sub-roles for variant. */
|
|
6968
|
-
DeviceType["Cover"] = "cover";
|
|
6969
|
-
/** Pipe / water / gas valve with open/close/stop and optional
|
|
6970
|
-
* position (HA `valve.*`). `valve` cap — a cover-sibling actuator
|
|
6971
|
-
* modelled on the same open/closed lifecycle. */
|
|
6972
|
-
DeviceType["Valve"] = "valve";
|
|
6973
|
-
/** Humidifier / dehumidifier with on/off + target humidity + mode
|
|
6974
|
-
* (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
|
|
6975
|
-
* modelled on the same target / mode lifecycle. */
|
|
6976
|
-
DeviceType["Humidifier"] = "humidifier";
|
|
6977
|
-
/** Water heater / boiler with target temperature + operation mode +
|
|
6978
|
-
* away mode (HA `water_heater.*`). `water-heater` cap — a
|
|
6979
|
-
* climate-family actuator. */
|
|
6980
|
-
DeviceType["WaterHeater"] = "water-heater";
|
|
6981
|
-
/** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
|
|
6982
|
-
DeviceType["Fan"] = "fan";
|
|
6983
|
-
/** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
|
|
6984
|
-
* the camera surface — those use `Camera`. `media-player` cap. */
|
|
6985
|
-
DeviceType["MediaPlayer"] = "media-player";
|
|
6986
|
-
/** Security panel / alarm system (HA `alarm_control_panel.*`).
|
|
6987
|
-
* `alarm-panel` cap. */
|
|
6988
|
-
DeviceType["AlarmPanel"] = "alarm-panel";
|
|
6989
|
-
/** Generic user-settable input (HA `number` / `input_number` / `select`
|
|
6990
|
-
* / `input_select` / `text` / `input_text` / `input_datetime`).
|
|
6991
|
-
* Sub-type via `DeviceRole`: NumericControl / SelectControl /
|
|
6992
|
-
* TextControl / DateTimeControl. */
|
|
6993
|
-
DeviceType["Control"] = "control";
|
|
6994
|
-
/** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
|
|
6995
|
-
* `presence` cap. */
|
|
6996
|
-
DeviceType["Presence"] = "presence";
|
|
6997
|
-
/** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
|
|
6998
|
-
* `weather` cap. */
|
|
6999
|
-
DeviceType["Weather"] = "weather";
|
|
7000
|
-
/** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
|
|
7001
|
-
DeviceType["Vacuum"] = "vacuum";
|
|
7002
|
-
/** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
|
|
7003
|
-
* `lawn-mower-control` cap. */
|
|
7004
|
-
DeviceType["LawnMower"] = "lawn-mower";
|
|
7005
|
-
/** Physical HA device group — parent container for entity-children
|
|
7006
|
-
* adopted from a single HA device entry. Not renderable as a
|
|
7007
|
-
* standalone device; exists only to anchor child entities. */
|
|
7008
|
-
DeviceType["Container"] = "container";
|
|
7009
|
-
/** Single still-image entity (HA `image.*`). Read-only display of an
|
|
7010
|
-
* `entity_picture` signed URL the browser loads directly. `image` cap. */
|
|
7011
|
-
DeviceType["Image"] = "image";
|
|
7012
|
-
return DeviceType;
|
|
7013
|
-
}({});
|
|
7014
|
-
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
7015
|
-
DeviceFeature["BatteryOperated"] = "battery-operated";
|
|
7016
|
-
DeviceFeature["Rebootable"] = "rebootable";
|
|
7017
|
-
/**
|
|
7018
|
-
* Device supports an on-demand re-sync of its derived spec with its
|
|
7019
|
-
* upstream source — drives the generic Re-sync button. The owning
|
|
7020
|
-
* provider implements the action via the `device-adoption.resync` cap.
|
|
7021
|
-
*/
|
|
7022
|
-
DeviceFeature["Resyncable"] = "resyncable";
|
|
7023
|
-
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
7024
|
-
DeviceFeature["DoorbellButton"] = "doorbell-button";
|
|
7025
|
-
DeviceFeature["TwoWayAudio"] = "two-way-audio";
|
|
7026
|
-
DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
|
|
7027
|
-
/**
|
|
7028
|
-
* Camera supports the on-firmware autotrack subsystem (subject-
|
|
7029
|
-
* following). Distinct from `PanTiltZoom` because not every PTZ
|
|
7030
|
-
* camera ships autotrack — the admin UI uses this flag to gate
|
|
7031
|
-
* the autotrack toggle / settings card without re-deriving from
|
|
7032
|
-
* the cap registry. Mirrors `ptz-autotrack` cap registration:
|
|
7033
|
-
* driver sets this feature when probe confirms the firmware
|
|
7034
|
-
* surface, and registers the cap in the same code path.
|
|
7035
|
-
*/
|
|
7036
|
-
DeviceFeature["PtzAutotrack"] = "ptz-autotrack";
|
|
7037
|
-
/**
|
|
7038
|
-
* Accessory exposes a "trigger on motion" toggle — the parent camera's
|
|
7039
|
-
* motion detection automatically activates this device. Mirrors
|
|
7040
|
-
* `motion-trigger` cap registration: drivers set this feature in the
|
|
7041
|
-
* same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
|
|
7042
|
-
*
|
|
7043
|
-
* Used by admin UI (gate the in-hero `MotionTriggerToggle` against a
|
|
7044
|
-
* fast scalar without binding fetch), notifier rules, and `listAll`
|
|
7045
|
-
* filters that want "all devices with on-motion behaviour".
|
|
7046
|
-
*/
|
|
7047
|
-
DeviceFeature["MotionTrigger"] = "motion-trigger";
|
|
7048
|
-
/** Light supports rgb-triplet color via `color` cap. */
|
|
7049
|
-
DeviceFeature["LightColorRgb"] = "light-color-rgb";
|
|
7050
|
-
/** Light supports HSV color via `color` cap. */
|
|
7051
|
-
DeviceFeature["LightColorHsv"] = "light-color-hsv";
|
|
7052
|
-
/** Light supports color-temperature (mired) via `color` cap. */
|
|
7053
|
-
DeviceFeature["LightColorMired"] = "light-color-mired";
|
|
7054
|
-
/** Thermostat supports a `heat_cool` dual setpoint (targetLow +
|
|
7055
|
-
* targetHigh). Gates the range slider UI. */
|
|
7056
|
-
DeviceFeature["ClimateDualSetpoint"] = "climate-dual-setpoint";
|
|
7057
|
-
/** Thermostat exposes target humidity and/or current humidity
|
|
7058
|
-
* readings. Gates the humidity controls. */
|
|
7059
|
-
DeviceFeature["ClimateHumidity"] = "climate-humidity";
|
|
7060
|
-
/** Thermostat exposes a fan-mode selector. */
|
|
7061
|
-
DeviceFeature["ClimateFanMode"] = "climate-fan-mode";
|
|
7062
|
-
/** Thermostat exposes preset modes (eco / away / sleep / vendor). */
|
|
7063
|
-
DeviceFeature["ClimatePreset"] = "climate-preset";
|
|
7064
|
-
/** Cover exposes intermediate position control (0..100). Gates the
|
|
7065
|
-
* position slider UI. */
|
|
7066
|
-
DeviceFeature["CoverPositionable"] = "cover-positionable";
|
|
7067
|
-
/** Cover exposes slat-tilt control. Gates the tilt slider UI. */
|
|
7068
|
-
DeviceFeature["CoverTilt"] = "cover-tilt";
|
|
7069
|
-
/** Valve exposes intermediate position control (0..100). Gates the
|
|
7070
|
-
* position slider / drag surface UI. */
|
|
7071
|
-
DeviceFeature["ValvePositionable"] = "valve-positionable";
|
|
7072
|
-
/** Fan exposes a speed-percentage setter. Gates the speed slider UI. */
|
|
7073
|
-
DeviceFeature["FanSpeed"] = "fan-speed";
|
|
7074
|
-
/** Fan exposes a preset mode selector. */
|
|
7075
|
-
DeviceFeature["FanPreset"] = "fan-preset";
|
|
7076
|
-
/** Fan exposes blade direction (forward/reverse) — typical of
|
|
7077
|
-
* ceiling fans. */
|
|
7078
|
-
DeviceFeature["FanDirection"] = "fan-direction";
|
|
7079
|
-
/** Fan exposes an oscillation toggle. */
|
|
7080
|
-
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
7081
|
-
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
7082
|
-
* field on the UI lock-controls panel. */
|
|
7083
|
-
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
7084
|
-
/** Lock supports a latch-release ("open door") action distinct from
|
|
7085
|
-
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
7086
|
-
* `supported_features`. Gates the Open Door button in the UI. */
|
|
7087
|
-
DeviceFeature["LockOpen"] = "lock-open";
|
|
7088
|
-
/** Media player exposes a seek-to-position surface. */
|
|
7089
|
-
DeviceFeature["MediaPlayerSeek"] = "media-player-seek";
|
|
7090
|
-
/** Media player exposes a volume-level setter. */
|
|
7091
|
-
DeviceFeature["MediaPlayerVolume"] = "media-player-volume";
|
|
7092
|
-
/** Media player exposes a mute toggle distinct from volume=0. */
|
|
7093
|
-
DeviceFeature["MediaPlayerMute"] = "media-player-mute";
|
|
7094
|
-
/** Media player exposes a shuffle toggle. */
|
|
7095
|
-
DeviceFeature["MediaPlayerShuffle"] = "media-player-shuffle";
|
|
7096
|
-
/** Media player exposes a repeat mode (off / all / one). */
|
|
7097
|
-
DeviceFeature["MediaPlayerRepeat"] = "media-player-repeat";
|
|
7098
|
-
/** Media player exposes a source / input selector. */
|
|
7099
|
-
DeviceFeature["MediaPlayerSelectSource"] = "media-player-select-source";
|
|
7100
|
-
/** Media player exposes a play-arbitrary-media surface (URL / id). */
|
|
7101
|
-
DeviceFeature["MediaPlayerPlayMedia"] = "media-player-play-media";
|
|
7102
|
-
/** Media player exposes next-track. */
|
|
7103
|
-
DeviceFeature["MediaPlayerNext"] = "media-player-next";
|
|
7104
|
-
/** Media player exposes previous-track. */
|
|
7105
|
-
DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
|
|
7106
|
-
/** Media player exposes stop distinct from pause. */
|
|
7107
|
-
DeviceFeature["MediaPlayerStop"] = "media-player-stop";
|
|
7108
|
-
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
7109
|
-
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
7110
|
-
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
7111
|
-
* addition to a textual location. */
|
|
7112
|
-
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
7113
|
-
/** Notifier accepts an inline / URL image attachment. */
|
|
7114
|
-
DeviceFeature["NotifierImage"] = "notifier-image";
|
|
7115
|
-
/** Notifier accepts a priority hint (high/normal/low). */
|
|
7116
|
-
DeviceFeature["NotifierPriority"] = "notifier-priority";
|
|
7117
|
-
/** Notifier accepts a free-form `data` payload for platform-specific
|
|
7118
|
-
* fields. */
|
|
7119
|
-
DeviceFeature["NotifierData"] = "notifier-data";
|
|
7120
|
-
/** Notifier supports interactive action buttons / callbacks. */
|
|
7121
|
-
DeviceFeature["NotifierActions"] = "notifier-actions";
|
|
7122
|
-
/** Notifier supports per-call recipient targeting (multi-user). */
|
|
7123
|
-
DeviceFeature["NotifierRecipients"] = "notifier-recipients";
|
|
7124
|
-
/** Script runner accepts a variables map on each run invocation. */
|
|
7125
|
-
DeviceFeature["ScriptVariables"] = "script-variables";
|
|
7126
|
-
/** Automation `trigger` accepts a skipCondition flag — fires the
|
|
7127
|
-
* automation's actions while bypassing its condition block. */
|
|
7128
|
-
DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
|
|
7129
|
-
return DeviceFeature;
|
|
7130
|
-
}({});
|
|
7131
|
-
/**
|
|
7132
|
-
* Semantic role a device plays within its parent. Populated by driver
|
|
7133
|
-
* addons when creating accessory devices (Reolink siren/floodlight/
|
|
7134
|
-
* PIR/chime/autotrack/doorbell, ONVIF relay outputs, …). Used by the
|
|
7135
|
-
* admin UI to pick icons, labels, and widgets — a `Switch` with
|
|
7136
|
-
* `role: Floodlight` renders as a bulb with a brightness slider,
|
|
7137
|
-
* whereas a `Switch` with `role: Siren` renders as a klaxon.
|
|
7138
|
-
*
|
|
7139
|
-
* Undefined for top-level devices (cameras, NVRs, hubs). Persisted in
|
|
7140
|
-
* sqlite as a nullable TEXT column — old rows keep working unchanged.
|
|
7141
|
-
*/
|
|
7142
|
-
var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
7143
|
-
DeviceRole["Siren"] = "siren";
|
|
7144
|
-
DeviceRole["Floodlight"] = "floodlight";
|
|
7145
|
-
DeviceRole["Spotlight"] = "spotlight";
|
|
7146
|
-
DeviceRole["PirSensor"] = "pir-sensor";
|
|
7147
|
-
DeviceRole["Chime"] = "chime";
|
|
7148
|
-
DeviceRole["Autotrack"] = "autotrack";
|
|
7149
|
-
DeviceRole["Nightvision"] = "nightvision";
|
|
7150
|
-
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
7151
|
-
DeviceRole["Doorbell"] = "doorbell";
|
|
7152
|
-
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
7153
|
-
* real Switch device for UI rendering / export adapters. */
|
|
7154
|
-
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
7155
|
-
/** Generic motion / occupancy / moving event source. Distinct from
|
|
7156
|
-
* the camera accessory PirSensor role: that one is a camera child;
|
|
7157
|
-
* this is a standalone HA / 3rd-party motion sensor. */
|
|
7158
|
-
DeviceRole["MotionSensor"] = "motion-sensor";
|
|
7159
|
-
DeviceRole["ContactSensor"] = "contact-sensor";
|
|
7160
|
-
DeviceRole["LeakSensor"] = "leak-sensor";
|
|
7161
|
-
DeviceRole["SmokeSensor"] = "smoke-sensor";
|
|
7162
|
-
DeviceRole["COSensor"] = "co-sensor";
|
|
7163
|
-
DeviceRole["GasSensor"] = "gas-sensor";
|
|
7164
|
-
DeviceRole["TamperSensor"] = "tamper-sensor";
|
|
7165
|
-
DeviceRole["VibrationSensor"] = "vibration-sensor";
|
|
7166
|
-
DeviceRole["ConnectivitySensor"] = "connectivity-sensor";
|
|
7167
|
-
DeviceRole["SoundSensor"] = "sound-sensor";
|
|
7168
|
-
/** Fallback for `binary_sensor` without a known `device_class`. */
|
|
7169
|
-
DeviceRole["BinarySensor"] = "binary-sensor";
|
|
7170
|
-
DeviceRole["TemperatureSensor"] = "temperature-sensor";
|
|
7171
|
-
DeviceRole["HumiditySensor"] = "humidity-sensor";
|
|
7172
|
-
DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
|
|
7173
|
-
DeviceRole["PressureSensor"] = "pressure-sensor";
|
|
7174
|
-
DeviceRole["PowerSensor"] = "power-sensor";
|
|
7175
|
-
DeviceRole["EnergySensor"] = "energy-sensor";
|
|
7176
|
-
DeviceRole["VoltageSensor"] = "voltage-sensor";
|
|
7177
|
-
DeviceRole["CurrentSensor"] = "current-sensor";
|
|
7178
|
-
DeviceRole["AirQualitySensor"] = "air-quality-sensor";
|
|
7179
|
-
/** Battery level (numeric % via `sensor` OR low-bool via
|
|
7180
|
-
* `binary_sensor` — the cap distinguishes via the value type). */
|
|
7181
|
-
DeviceRole["BatterySensor"] = "battery-sensor";
|
|
7182
|
-
/** Fallback for `sensor` numeric without a known `device_class`. */
|
|
7183
|
-
DeviceRole["NumericSensor"] = "numeric-sensor";
|
|
7184
|
-
/** String / enum state (HA `sensor` with `state_class: enum` or
|
|
7185
|
-
* `attributes.options`). */
|
|
7186
|
-
DeviceRole["EnumSensor"] = "enum-sensor";
|
|
7187
|
-
/** Date / timestamp state (HA `sensor` with `device_class: timestamp`
|
|
7188
|
-
* or `date`). The slice carries the raw ISO string verbatim (hosted on
|
|
7189
|
-
* the `enum-sensor` cap); the UI renders it locale-formatted. */
|
|
7190
|
-
DeviceRole["DateTimeSensor"] = "datetime-sensor";
|
|
7191
|
-
/** Last-resort fallback when nothing else matches. */
|
|
7192
|
-
DeviceRole["GenericSensor"] = "generic-sensor";
|
|
7193
|
-
DeviceRole["NumericControl"] = "numeric-control";
|
|
7194
|
-
DeviceRole["SelectControl"] = "select-control";
|
|
7195
|
-
DeviceRole["TextControl"] = "text-control";
|
|
7196
|
-
DeviceRole["DateTimeControl"] = "datetime-control";
|
|
7197
|
-
/** Mobile push notifier (HA `notify.mobile_app_*`) — supports
|
|
7198
|
-
* rich features (image, priority, channel routing). */
|
|
7199
|
-
DeviceRole["MobilePushNotifier"] = "mobile-push-notifier";
|
|
7200
|
-
/** Chat / messaging service (HA `notify.telegram_*`,
|
|
7201
|
-
* `notify.discord_*`, etc.). */
|
|
7202
|
-
DeviceRole["MessagingNotifier"] = "messaging-notifier";
|
|
7203
|
-
/** Email-based delivery (HA `notify.smtp`, etc.). */
|
|
7204
|
-
DeviceRole["EmailNotifier"] = "email-notifier";
|
|
7205
|
-
/** Fallback when the notifier service name doesn't match a known
|
|
7206
|
-
* pattern. */
|
|
7207
|
-
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
7208
|
-
return DeviceRole;
|
|
7209
|
-
}({});
|
|
7226
|
+
Ringtone: "telephone",
|
|
7227
|
+
"Telephone dialing, DTMF": "telephone",
|
|
7228
|
+
"Busy signal": "telephone",
|
|
7229
|
+
Engine: "engine",
|
|
7230
|
+
"Engine starting": "engine",
|
|
7231
|
+
Idling: "engine",
|
|
7232
|
+
"Accelerating, revving, vroom": "engine",
|
|
7233
|
+
"Light engine (high frequency)": "engine",
|
|
7234
|
+
"Medium engine (mid frequency)": "engine",
|
|
7235
|
+
"Heavy engine (low frequency)": "engine",
|
|
7236
|
+
"Lawn mower": "engine",
|
|
7237
|
+
Chainsaw: "engine",
|
|
7238
|
+
Hammer: "tools",
|
|
7239
|
+
Jackhammer: "tools",
|
|
7240
|
+
Sawing: "tools",
|
|
7241
|
+
"Power tool": "tools",
|
|
7242
|
+
Drill: "tools",
|
|
7243
|
+
Sanding: "tools",
|
|
7244
|
+
Silence: "silence"
|
|
7245
|
+
},
|
|
7246
|
+
preserveOriginal: false
|
|
7247
|
+
};
|
|
7248
|
+
var APPLE_SA_TO_MACRO = {
|
|
7249
|
+
mapping: {
|
|
7250
|
+
speech: "speech",
|
|
7251
|
+
child_speech: "speech",
|
|
7252
|
+
conversation: "speech",
|
|
7253
|
+
whispering: "speech",
|
|
7254
|
+
singing: "speech",
|
|
7255
|
+
humming: "speech",
|
|
7256
|
+
shout: "scream",
|
|
7257
|
+
yell: "scream",
|
|
7258
|
+
screaming: "scream",
|
|
7259
|
+
crying: "crying",
|
|
7260
|
+
baby_crying: "crying",
|
|
7261
|
+
sobbing: "crying",
|
|
7262
|
+
laughter: "laughter",
|
|
7263
|
+
baby_laughter: "laughter",
|
|
7264
|
+
giggling: "laughter",
|
|
7265
|
+
music: "music",
|
|
7266
|
+
guitar: "music",
|
|
7267
|
+
piano: "music",
|
|
7268
|
+
drums: "music",
|
|
7269
|
+
dog_bark: "dog",
|
|
7270
|
+
dog_bow_wow: "dog",
|
|
7271
|
+
dog_growling: "dog",
|
|
7272
|
+
dog_howl: "dog",
|
|
7273
|
+
cat_meow: "cat",
|
|
7274
|
+
cat_purr: "cat",
|
|
7275
|
+
cat_hiss: "cat",
|
|
7276
|
+
bird: "bird",
|
|
7277
|
+
bird_chirp: "bird",
|
|
7278
|
+
bird_squawk: "bird",
|
|
7279
|
+
animal: "animal",
|
|
7280
|
+
horse: "animal",
|
|
7281
|
+
cow_moo: "animal",
|
|
7282
|
+
insect: "animal",
|
|
7283
|
+
alarm: "alarm",
|
|
7284
|
+
smoke_alarm: "alarm",
|
|
7285
|
+
fire_alarm: "alarm",
|
|
7286
|
+
car_alarm: "alarm",
|
|
7287
|
+
siren: "siren",
|
|
7288
|
+
police_siren: "siren",
|
|
7289
|
+
ambulance_siren: "siren",
|
|
7290
|
+
doorbell: "doorbell",
|
|
7291
|
+
door_knock: "doorbell",
|
|
7292
|
+
knocking: "doorbell",
|
|
7293
|
+
glass_breaking: "glass_breaking",
|
|
7294
|
+
glass_shatter: "glass_breaking",
|
|
7295
|
+
gunshot: "gunshot",
|
|
7296
|
+
explosion: "gunshot",
|
|
7297
|
+
fireworks: "gunshot",
|
|
7298
|
+
car: "vehicle",
|
|
7299
|
+
truck: "vehicle",
|
|
7300
|
+
motorcycle: "vehicle",
|
|
7301
|
+
car_horn: "vehicle",
|
|
7302
|
+
vehicle_horn: "vehicle",
|
|
7303
|
+
traffic: "vehicle",
|
|
7304
|
+
fire: "fire",
|
|
7305
|
+
fire_crackle: "fire",
|
|
7306
|
+
water: "water",
|
|
7307
|
+
rain: "water",
|
|
7308
|
+
ocean: "water",
|
|
7309
|
+
splash: "water",
|
|
7310
|
+
wind: "wind",
|
|
7311
|
+
thunder: "wind",
|
|
7312
|
+
thunderstorm: "wind",
|
|
7313
|
+
door: "door",
|
|
7314
|
+
door_slam: "door",
|
|
7315
|
+
sliding_door: "door",
|
|
7316
|
+
footsteps: "footsteps",
|
|
7317
|
+
walking: "footsteps",
|
|
7318
|
+
running: "footsteps",
|
|
7319
|
+
crowd: "crowd",
|
|
7320
|
+
chatter: "crowd",
|
|
7321
|
+
cheering: "crowd",
|
|
7322
|
+
applause: "crowd",
|
|
7323
|
+
telephone_ring: "telephone",
|
|
7324
|
+
ringtone: "telephone",
|
|
7325
|
+
engine: "engine",
|
|
7326
|
+
engine_starting: "engine",
|
|
7327
|
+
lawn_mower: "engine",
|
|
7328
|
+
chainsaw: "engine",
|
|
7329
|
+
hammer: "tools",
|
|
7330
|
+
jackhammer: "tools",
|
|
7331
|
+
drill: "tools",
|
|
7332
|
+
power_tool: "tools",
|
|
7333
|
+
silence: "silence"
|
|
7334
|
+
},
|
|
7335
|
+
preserveOriginal: false
|
|
7336
|
+
};
|
|
7337
|
+
var _macroLookup = /* @__PURE__ */ new Map();
|
|
7338
|
+
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7339
|
+
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7210
7340
|
/**
|
|
7211
7341
|
* Accessory device helpers — shared across drivers.
|
|
7212
7342
|
*
|
|
@@ -7366,74 +7496,6 @@ object({
|
|
|
7366
7496
|
});
|
|
7367
7497
|
DeviceType.Sensor;
|
|
7368
7498
|
/**
|
|
7369
|
-
* Generic types for capability definitions.
|
|
7370
|
-
*
|
|
7371
|
-
* A capability is defined with Zod schemas for methods, events, and settings.
|
|
7372
|
-
* TypeScript types are inferred via z.infer<> — zero duplication.
|
|
7373
|
-
*
|
|
7374
|
-
* Pattern:
|
|
7375
|
-
* 1. Define Zod schemas for data, methods, settings
|
|
7376
|
-
* 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
|
|
7377
|
-
* 3. Export type IProvider = InferProvider<typeof capabilityDef>
|
|
7378
|
-
* 4. Addon implements IProvider
|
|
7379
|
-
* 5. Registry auto-mounts tRPC router from definition.methods
|
|
7380
|
-
*/
|
|
7381
|
-
/**
|
|
7382
|
-
* Output schema shared by the contribution + live methods.
|
|
7383
|
-
*
|
|
7384
|
-
* Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
|
|
7385
|
-
* tabs[]) without importing from `../interfaces/config-ui.js` — a
|
|
7386
|
-
* concrete-but-lenient Zod object keeps tRPC output inference happy
|
|
7387
|
-
* (using `z.unknown()` here collapses unrelated router branches to
|
|
7388
|
-
* `unknown` when the generator re-inlines the huge AppRouter type).
|
|
7389
|
-
*
|
|
7390
|
-
* `.passthrough()` on sections/fields accepts whatever FormBuilder
|
|
7391
|
-
* extensions the caller adds (showWhen, displayScale, …) without
|
|
7392
|
-
* rebuilding every time a new field kind is introduced.
|
|
7393
|
-
*/
|
|
7394
|
-
var ContributionSectionSchema = object({
|
|
7395
|
-
id: string(),
|
|
7396
|
-
title: string(),
|
|
7397
|
-
description: string().optional(),
|
|
7398
|
-
style: _enum(["card", "accordion"]).optional(),
|
|
7399
|
-
defaultCollapsed: boolean().optional(),
|
|
7400
|
-
columns: union([
|
|
7401
|
-
literal(1),
|
|
7402
|
-
literal(2),
|
|
7403
|
-
literal(3),
|
|
7404
|
-
literal(4)
|
|
7405
|
-
]).optional(),
|
|
7406
|
-
tab: string().optional(),
|
|
7407
|
-
location: _enum(["settings", "top-tab"]).optional(),
|
|
7408
|
-
order: number().optional(),
|
|
7409
|
-
fields: array(any())
|
|
7410
|
-
});
|
|
7411
|
-
object({
|
|
7412
|
-
tabs: array(object({
|
|
7413
|
-
id: string(),
|
|
7414
|
-
label: string(),
|
|
7415
|
-
icon: string(),
|
|
7416
|
-
order: number().optional()
|
|
7417
|
-
})).optional(),
|
|
7418
|
-
sections: array(ContributionSectionSchema)
|
|
7419
|
-
}).nullable();
|
|
7420
|
-
object({ deviceId: number() }), object({ deviceId: number() }), object({
|
|
7421
|
-
deviceId: number(),
|
|
7422
|
-
patch: record(string(), unknown())
|
|
7423
|
-
}), object({ success: literal(true) });
|
|
7424
|
-
object({ deviceId: number() }), unknown().nullable();
|
|
7425
|
-
/** Shorthand to define a method schema */
|
|
7426
|
-
function method(input, output, options) {
|
|
7427
|
-
return {
|
|
7428
|
-
input,
|
|
7429
|
-
output,
|
|
7430
|
-
kind: options?.kind ?? "query",
|
|
7431
|
-
auth: options?.auth ?? "protected",
|
|
7432
|
-
...options?.access !== void 0 ? { access: options.access } : {},
|
|
7433
|
-
timeoutMs: options?.timeoutMs
|
|
7434
|
-
};
|
|
7435
|
-
}
|
|
7436
|
-
/**
|
|
7437
7499
|
* Alarm-panel cap. Models HA `alarm_control_panel.*` on
|
|
7438
7500
|
* `DeviceType.AlarmPanel`. State follows HA's canonical lifecycle
|
|
7439
7501
|
* across disarmed / armed_(home|away|night|vacation|custom_bypass) /
|
|
@@ -11435,9 +11497,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
11435
11497
|
limit: number().optional(),
|
|
11436
11498
|
tags: record(string(), string()).optional()
|
|
11437
11499
|
}), array(LogEntrySchema).readonly());
|
|
11438
|
-
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
11439
|
-
var VersionOutputSchema = object({ version: string() });
|
|
11440
|
-
method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
|
|
11441
11500
|
/**
|
|
11442
11501
|
* Zod schemas for persisted record types.
|
|
11443
11502
|
*
|
|
@@ -13763,7 +13822,7 @@ method(object({
|
|
|
13763
13822
|
}), _void(), {
|
|
13764
13823
|
kind: "mutation",
|
|
13765
13824
|
auth: "admin"
|
|
13766
|
-
}), 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({
|
|
13825
|
+
}), 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({
|
|
13767
13826
|
deviceId: number(),
|
|
13768
13827
|
values: record(string(), unknown())
|
|
13769
13828
|
}), object({ success: literal(true) }), {
|
|
@@ -14445,7 +14504,20 @@ var DiskSpaceInfoSchema = object({
|
|
|
14445
14504
|
var PidResourceStatsSchema = object({
|
|
14446
14505
|
pid: number(),
|
|
14447
14506
|
cpu: number(),
|
|
14448
|
-
memory: number()
|
|
14507
|
+
memory: number(),
|
|
14508
|
+
/**
|
|
14509
|
+
* Private (anonymous) resident bytes — the per-process V8 heap + native
|
|
14510
|
+
* allocations NOT shared with other processes (Linux RssAnon). This is the
|
|
14511
|
+
* "real" per-runner cost; summing it across runners is meaningful, unlike
|
|
14512
|
+
* `memory` (RSS), which double-counts the shared mmap'd framework code.
|
|
14513
|
+
* Undefined where /proc is unavailable (e.g. macOS).
|
|
14514
|
+
*/
|
|
14515
|
+
privateBytes: number().optional(),
|
|
14516
|
+
/**
|
|
14517
|
+
* Shared file-backed resident bytes (Linux RssFile) — mmap'd framework/lib
|
|
14518
|
+
* code shared copy-on-write across runners. Undefined on macOS.
|
|
14519
|
+
*/
|
|
14520
|
+
sharedBytes: number().optional()
|
|
14449
14521
|
});
|
|
14450
14522
|
var AddonInstanceSchema = object({
|
|
14451
14523
|
addonId: string(),
|
|
@@ -14494,6 +14566,17 @@ var KillProcessResultSchema = object({
|
|
|
14494
14566
|
reason: string().optional(),
|
|
14495
14567
|
signal: _enum(["SIGTERM", "SIGKILL"]).optional()
|
|
14496
14568
|
});
|
|
14569
|
+
var DumpHeapSnapshotInputSchema = object({
|
|
14570
|
+
/** The addon whose runner should dump a heap snapshot. */
|
|
14571
|
+
addonId: string() });
|
|
14572
|
+
var DumpHeapSnapshotResultSchema = object({
|
|
14573
|
+
success: boolean(),
|
|
14574
|
+
/** Path of the written .heapsnapshot inside the runner's container/host. */
|
|
14575
|
+
path: string().optional(),
|
|
14576
|
+
/** Process pid that was signalled. */
|
|
14577
|
+
pid: number().optional(),
|
|
14578
|
+
reason: string().optional()
|
|
14579
|
+
});
|
|
14497
14580
|
var SystemMetricsSchema = object({
|
|
14498
14581
|
cpuPercent: number(),
|
|
14499
14582
|
memoryPercent: number(),
|
|
@@ -14507,6 +14590,9 @@ var SystemMetricsSchema = object({
|
|
|
14507
14590
|
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, {
|
|
14508
14591
|
kind: "mutation",
|
|
14509
14592
|
auth: "admin"
|
|
14593
|
+
}), method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
|
|
14594
|
+
kind: "mutation",
|
|
14595
|
+
auth: "admin"
|
|
14510
14596
|
});
|
|
14511
14597
|
var PtzPresetSchema = object({
|
|
14512
14598
|
id: string(),
|
|
@@ -14873,63 +14959,6 @@ method(object({
|
|
|
14873
14959
|
auth: "admin"
|
|
14874
14960
|
});
|
|
14875
14961
|
/**
|
|
14876
|
-
* device-ops — device-scoped cap that unifies the per-IDevice operations
|
|
14877
|
-
* previously routed through the `.device-ops` Moleculer bridge service.
|
|
14878
|
-
*
|
|
14879
|
-
* Each worker that hosts live `IDevice` instances auto-registers a native
|
|
14880
|
-
* provider for this cap (per device) backed by its local
|
|
14881
|
-
* `DeviceRegistry`. Hub-side callers reach it transparently through
|
|
14882
|
-
* `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
|
|
14883
|
-
* `deviceId` + `nodeId` and dispatches through the standard cap-router,
|
|
14884
|
-
* so there's no parallel bridge path anymore.
|
|
14885
|
-
*
|
|
14886
|
-
* The surface is intentionally small — every method corresponds to a
|
|
14887
|
-
* single action on the live `IDevice` (or `ICameraDevice` for
|
|
14888
|
-
* `getStreamSources`). Richer orchestration (enable/disable with
|
|
14889
|
-
* integration plumbing, bulk updates) stays in the `device-manager` cap;
|
|
14890
|
-
* `device-ops` is the per-device primitive the device-manager routes to.
|
|
14891
|
-
*/
|
|
14892
|
-
var StreamSourceEntrySchema$1 = object({
|
|
14893
|
-
id: string(),
|
|
14894
|
-
label: string(),
|
|
14895
|
-
protocol: _enum([
|
|
14896
|
-
"rtsp",
|
|
14897
|
-
"rtmp",
|
|
14898
|
-
"annexb",
|
|
14899
|
-
"http-mjpeg",
|
|
14900
|
-
"webrtc",
|
|
14901
|
-
"custom"
|
|
14902
|
-
]),
|
|
14903
|
-
url: string().optional(),
|
|
14904
|
-
resolution: object({
|
|
14905
|
-
width: number(),
|
|
14906
|
-
height: number()
|
|
14907
|
-
}).optional(),
|
|
14908
|
-
fps: number().optional(),
|
|
14909
|
-
bitrate: number().optional(),
|
|
14910
|
-
codec: string().optional(),
|
|
14911
|
-
profileHint: CamProfileSchema.optional(),
|
|
14912
|
-
sdp: string().optional()
|
|
14913
|
-
});
|
|
14914
|
-
var ConfigEntrySchema$1 = object({
|
|
14915
|
-
key: string(),
|
|
14916
|
-
value: unknown()
|
|
14917
|
-
});
|
|
14918
|
-
var RawStateResultSchema = object({
|
|
14919
|
-
/** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
|
|
14920
|
-
source: string(),
|
|
14921
|
-
/** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
|
|
14922
|
-
data: record(string(), unknown())
|
|
14923
|
-
});
|
|
14924
|
-
method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema$1)), method(object({
|
|
14925
|
-
deviceId: number(),
|
|
14926
|
-
values: record(string(), unknown())
|
|
14927
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
14928
|
-
deviceId: number(),
|
|
14929
|
-
action: string().min(1),
|
|
14930
|
-
input: unknown()
|
|
14931
|
-
}), unknown(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
14932
|
-
/**
|
|
14933
14962
|
* camera-credentials — device-scoped cap exposing the camera's network
|
|
14934
14963
|
* + auth surface in a vendor-neutral shape.
|
|
14935
14964
|
*
|
|
@@ -18612,6 +18641,12 @@ Object.freeze({
|
|
|
18612
18641
|
addonId: null,
|
|
18613
18642
|
access: "view"
|
|
18614
18643
|
},
|
|
18644
|
+
"metricsProvider.dumpHeapSnapshot": {
|
|
18645
|
+
capName: "metrics-provider",
|
|
18646
|
+
capScope: "system",
|
|
18647
|
+
addonId: null,
|
|
18648
|
+
access: "create"
|
|
18649
|
+
},
|
|
18615
18650
|
"metricsProvider.getAddonStats": {
|
|
18616
18651
|
capName: "metrics-provider",
|
|
18617
18652
|
capScope: "system",
|