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