@camstack/addon-provider-homematic 1.0.4 → 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 +1305 -1078
- package/dist/addon.mjs +709 -482
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/addon.mjs
CHANGED
|
@@ -4652,63 +4652,7 @@ function preprocess(fn, schema) {
|
|
|
4652
4652
|
});
|
|
4653
4653
|
}
|
|
4654
4654
|
//#endregion
|
|
4655
|
-
//#region ../types/dist/
|
|
4656
|
-
/**
|
|
4657
|
-
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
4658
|
-
* every declared capability + widget of every installed plugin, on every
|
|
4659
|
-
* node. Produced by the backend `WiringHealthService` and surfaced via
|
|
4660
|
-
* `GET /health/wiring`, the tRPC `health.wiring` query, and the boot-gate.
|
|
4661
|
-
*
|
|
4662
|
-
* Unlike `/health` (process liveness), this reflects whether each cap/widget
|
|
4663
|
-
* is actually *reachable* over the real cap-dispatch path. See spec
|
|
4664
|
-
* `docs/superpowers/specs/2026-05-23-deep-healthcheck-design.md`.
|
|
4665
|
-
*/
|
|
4666
|
-
/** What kind of target a probe addressed. */
|
|
4667
|
-
var wiringProbeKindSchema = _enum([
|
|
4668
|
-
"singleton",
|
|
4669
|
-
"device",
|
|
4670
|
-
"widget"
|
|
4671
|
-
]);
|
|
4672
|
-
/** Result of probing a single (cap|widget [, device]) target. */
|
|
4673
|
-
var wiringProbeResultSchema = object({
|
|
4674
|
-
capName: string(),
|
|
4675
|
-
kind: wiringProbeKindSchema,
|
|
4676
|
-
deviceId: number().optional(),
|
|
4677
|
-
reachable: boolean(),
|
|
4678
|
-
latencyMs: number(),
|
|
4679
|
-
error: string().optional()
|
|
4680
|
-
});
|
|
4681
|
-
/** Per-addon roll-up of cap + widget probe results. */
|
|
4682
|
-
var wiringAddonHealthSchema = object({
|
|
4683
|
-
addonId: string(),
|
|
4684
|
-
caps: array(wiringProbeResultSchema).readonly(),
|
|
4685
|
-
widgets: array(wiringProbeResultSchema).readonly()
|
|
4686
|
-
});
|
|
4687
|
-
/** Per-node roll-up. */
|
|
4688
|
-
var wiringNodeHealthSchema = object({
|
|
4689
|
-
nodeId: string(),
|
|
4690
|
-
addons: array(wiringAddonHealthSchema).readonly()
|
|
4691
|
-
});
|
|
4692
|
-
object({
|
|
4693
|
-
/** True only when every probed target is reachable. */
|
|
4694
|
-
ok: boolean(),
|
|
4695
|
-
/** True when at least one target is unreachable. */
|
|
4696
|
-
degraded: boolean(),
|
|
4697
|
-
checkedAt: string(),
|
|
4698
|
-
nodes: array(wiringNodeHealthSchema).readonly(),
|
|
4699
|
-
summary: object({
|
|
4700
|
-
total: number(),
|
|
4701
|
-
reachable: number(),
|
|
4702
|
-
unreachable: number()
|
|
4703
|
-
})
|
|
4704
|
-
});
|
|
4705
|
-
var MODEL_FORMATS = [
|
|
4706
|
-
"onnx",
|
|
4707
|
-
"coreml",
|
|
4708
|
-
"openvino",
|
|
4709
|
-
"tflite",
|
|
4710
|
-
"pt"
|
|
4711
|
-
];
|
|
4655
|
+
//#region ../types/dist/sleep-D7JeS58T.mjs
|
|
4712
4656
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4713
4657
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4714
4658
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -5006,6 +4950,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
5006
4950
|
*/
|
|
5007
4951
|
EventCategory["PipelineEngineMetricsSnapshot"] = "pipeline.engine-metrics-snapshot";
|
|
5008
4952
|
/**
|
|
4953
|
+
* Per-node detection-engine runtime-provisioning transition. Emitted by
|
|
4954
|
+
* the detection-pipeline provider on every state change of its lazy
|
|
4955
|
+
* engine-provisioning machine (idle → installing → verifying → ready,
|
|
4956
|
+
* or → failed with a `nextRetryAt`). Payload is the
|
|
4957
|
+
* `EngineProvisioningState` snapshot; `event.source.nodeId` carries the
|
|
4958
|
+
* node. The Pipeline page subscribes to drive a live "installing
|
|
4959
|
+
* OpenVINO… / ready" indicator per node without polling
|
|
4960
|
+
* `pipelineExecutor.getEngineProvisioning`. Telemetry-grade (D8): the UI
|
|
4961
|
+
* also reads the cap snapshot on mount / reconnect. Phase 2.
|
|
4962
|
+
*/
|
|
4963
|
+
EventCategory["PipelineEngineProvisioning"] = "pipeline.engine-provisioning";
|
|
4964
|
+
/**
|
|
5009
4965
|
* Cluster topology snapshot. Carries the same payload returned by
|
|
5010
4966
|
* `nodes.topology` (every reachable node + addons + processes).
|
|
5011
4967
|
* Emitted by the hub on any agent / addon lifecycle change
|
|
@@ -6019,7 +5975,7 @@ var ProfileSlotSchema = object({
|
|
|
6019
5975
|
* Zod schema for StreamSourceEntry — the canonical stream descriptor
|
|
6020
5976
|
* exposed by ICameraDevice.getStreamSources() and consumed by the broker.
|
|
6021
5977
|
*/
|
|
6022
|
-
var StreamSourceEntrySchema = object({
|
|
5978
|
+
var StreamSourceEntrySchema$1 = object({
|
|
6023
5979
|
id: string(),
|
|
6024
5980
|
label: string(),
|
|
6025
5981
|
protocol: _enum([
|
|
@@ -6241,6 +6197,484 @@ var ProfileRtspEntrySchema = object({
|
|
|
6241
6197
|
codec: string().optional(),
|
|
6242
6198
|
resolution: CamStreamResolutionSchema.optional()
|
|
6243
6199
|
});
|
|
6200
|
+
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
6201
|
+
DeviceType["Camera"] = "camera";
|
|
6202
|
+
DeviceType["Hub"] = "hub";
|
|
6203
|
+
DeviceType["Light"] = "light";
|
|
6204
|
+
DeviceType["Siren"] = "siren";
|
|
6205
|
+
DeviceType["Switch"] = "switch";
|
|
6206
|
+
DeviceType["Sensor"] = "sensor";
|
|
6207
|
+
DeviceType["Thermostat"] = "thermostat";
|
|
6208
|
+
DeviceType["Button"] = "button";
|
|
6209
|
+
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
6210
|
+
* event vocabulary verbatim (no normalization). Installed with the
|
|
6211
|
+
* `event-emitter` cap. Sources: HA `event.*` entities (structured) and
|
|
6212
|
+
* HA bus events (e.g. `zha_event`, generic). */
|
|
6213
|
+
DeviceType["EventEmitter"] = "event-emitter";
|
|
6214
|
+
/** Firmware/software update entity — current vs available version,
|
|
6215
|
+
* updatable flag, update state, and an install action. Installed with
|
|
6216
|
+
* the `update` cap. Sources: Homematic firmware-update channels (and
|
|
6217
|
+
* reusable by other providers, e.g. HA `update.*` entities). */
|
|
6218
|
+
DeviceType["Update"] = "update";
|
|
6219
|
+
DeviceType["Generic"] = "generic";
|
|
6220
|
+
/** Generic notification delivery target (HA `notify.<service>`, future
|
|
6221
|
+
* Telegram / Discord / ntfy / SMTP, …). One device per delivery
|
|
6222
|
+
* endpoint; the `notifier` cap defines the send surface. */
|
|
6223
|
+
DeviceType["Notifier"] = "notifier";
|
|
6224
|
+
/** Pre-recorded action sequence with optional parameters
|
|
6225
|
+
* (HA `script.*`). Runnable via `script-runner` cap. */
|
|
6226
|
+
DeviceType["Script"] = "script";
|
|
6227
|
+
/** Automation rule (HA `automation.*`) — enable/disable + manual
|
|
6228
|
+
* trigger surface exposed via `automation-control` cap. */
|
|
6229
|
+
DeviceType["Automation"] = "automation";
|
|
6230
|
+
/** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
|
|
6231
|
+
DeviceType["Lock"] = "lock";
|
|
6232
|
+
/** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
|
|
6233
|
+
* `valve.*`). `cover` cap with sub-roles for variant. */
|
|
6234
|
+
DeviceType["Cover"] = "cover";
|
|
6235
|
+
/** Pipe / water / gas valve with open/close/stop and optional
|
|
6236
|
+
* position (HA `valve.*`). `valve` cap — a cover-sibling actuator
|
|
6237
|
+
* modelled on the same open/closed lifecycle. */
|
|
6238
|
+
DeviceType["Valve"] = "valve";
|
|
6239
|
+
/** Humidifier / dehumidifier with on/off + target humidity + mode
|
|
6240
|
+
* (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
|
|
6241
|
+
* modelled on the same target / mode lifecycle. */
|
|
6242
|
+
DeviceType["Humidifier"] = "humidifier";
|
|
6243
|
+
/** Water heater / boiler with target temperature + operation mode +
|
|
6244
|
+
* away mode (HA `water_heater.*`). `water-heater` cap — a
|
|
6245
|
+
* climate-family actuator. */
|
|
6246
|
+
DeviceType["WaterHeater"] = "water-heater";
|
|
6247
|
+
/** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
|
|
6248
|
+
DeviceType["Fan"] = "fan";
|
|
6249
|
+
/** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
|
|
6250
|
+
* the camera surface — those use `Camera`. `media-player` cap. */
|
|
6251
|
+
DeviceType["MediaPlayer"] = "media-player";
|
|
6252
|
+
/** Security panel / alarm system (HA `alarm_control_panel.*`).
|
|
6253
|
+
* `alarm-panel` cap. */
|
|
6254
|
+
DeviceType["AlarmPanel"] = "alarm-panel";
|
|
6255
|
+
/** Generic user-settable input (HA `number` / `input_number` / `select`
|
|
6256
|
+
* / `input_select` / `text` / `input_text` / `input_datetime`).
|
|
6257
|
+
* Sub-type via `DeviceRole`: NumericControl / SelectControl /
|
|
6258
|
+
* TextControl / DateTimeControl. */
|
|
6259
|
+
DeviceType["Control"] = "control";
|
|
6260
|
+
/** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
|
|
6261
|
+
* `presence` cap. */
|
|
6262
|
+
DeviceType["Presence"] = "presence";
|
|
6263
|
+
/** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
|
|
6264
|
+
* `weather` cap. */
|
|
6265
|
+
DeviceType["Weather"] = "weather";
|
|
6266
|
+
/** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
|
|
6267
|
+
DeviceType["Vacuum"] = "vacuum";
|
|
6268
|
+
/** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
|
|
6269
|
+
* `lawn-mower-control` cap. */
|
|
6270
|
+
DeviceType["LawnMower"] = "lawn-mower";
|
|
6271
|
+
/** Physical HA device group — parent container for entity-children
|
|
6272
|
+
* adopted from a single HA device entry. Not renderable as a
|
|
6273
|
+
* standalone device; exists only to anchor child entities. */
|
|
6274
|
+
DeviceType["Container"] = "container";
|
|
6275
|
+
/** Single still-image entity (HA `image.*`). Read-only display of an
|
|
6276
|
+
* `entity_picture` signed URL the browser loads directly. `image` cap. */
|
|
6277
|
+
DeviceType["Image"] = "image";
|
|
6278
|
+
return DeviceType;
|
|
6279
|
+
}({});
|
|
6280
|
+
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
6281
|
+
DeviceFeature["BatteryOperated"] = "battery-operated";
|
|
6282
|
+
DeviceFeature["Rebootable"] = "rebootable";
|
|
6283
|
+
/**
|
|
6284
|
+
* Device supports an on-demand re-sync of its derived spec with its
|
|
6285
|
+
* upstream source — drives the generic Re-sync button. The owning
|
|
6286
|
+
* provider implements the action via the `device-adoption.resync` cap.
|
|
6287
|
+
*/
|
|
6288
|
+
DeviceFeature["Resyncable"] = "resyncable";
|
|
6289
|
+
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
6290
|
+
DeviceFeature["DoorbellButton"] = "doorbell-button";
|
|
6291
|
+
DeviceFeature["TwoWayAudio"] = "two-way-audio";
|
|
6292
|
+
DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
|
|
6293
|
+
/**
|
|
6294
|
+
* Camera supports the on-firmware autotrack subsystem (subject-
|
|
6295
|
+
* following). Distinct from `PanTiltZoom` because not every PTZ
|
|
6296
|
+
* camera ships autotrack — the admin UI uses this flag to gate
|
|
6297
|
+
* the autotrack toggle / settings card without re-deriving from
|
|
6298
|
+
* the cap registry. Mirrors `ptz-autotrack` cap registration:
|
|
6299
|
+
* driver sets this feature when probe confirms the firmware
|
|
6300
|
+
* surface, and registers the cap in the same code path.
|
|
6301
|
+
*/
|
|
6302
|
+
DeviceFeature["PtzAutotrack"] = "ptz-autotrack";
|
|
6303
|
+
/**
|
|
6304
|
+
* Accessory exposes a "trigger on motion" toggle — the parent camera's
|
|
6305
|
+
* motion detection automatically activates this device. Mirrors
|
|
6306
|
+
* `motion-trigger` cap registration: drivers set this feature in the
|
|
6307
|
+
* same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
|
|
6308
|
+
*
|
|
6309
|
+
* Used by admin UI (gate the in-hero `MotionTriggerToggle` against a
|
|
6310
|
+
* fast scalar without binding fetch), notifier rules, and `listAll`
|
|
6311
|
+
* filters that want "all devices with on-motion behaviour".
|
|
6312
|
+
*/
|
|
6313
|
+
DeviceFeature["MotionTrigger"] = "motion-trigger";
|
|
6314
|
+
/** Light supports rgb-triplet color via `color` cap. */
|
|
6315
|
+
DeviceFeature["LightColorRgb"] = "light-color-rgb";
|
|
6316
|
+
/** Light supports HSV color via `color` cap. */
|
|
6317
|
+
DeviceFeature["LightColorHsv"] = "light-color-hsv";
|
|
6318
|
+
/** Light supports color-temperature (mired) via `color` cap. */
|
|
6319
|
+
DeviceFeature["LightColorMired"] = "light-color-mired";
|
|
6320
|
+
/** Thermostat supports a `heat_cool` dual setpoint (targetLow +
|
|
6321
|
+
* targetHigh). Gates the range slider UI. */
|
|
6322
|
+
DeviceFeature["ClimateDualSetpoint"] = "climate-dual-setpoint";
|
|
6323
|
+
/** Thermostat exposes target humidity and/or current humidity
|
|
6324
|
+
* readings. Gates the humidity controls. */
|
|
6325
|
+
DeviceFeature["ClimateHumidity"] = "climate-humidity";
|
|
6326
|
+
/** Thermostat exposes a fan-mode selector. */
|
|
6327
|
+
DeviceFeature["ClimateFanMode"] = "climate-fan-mode";
|
|
6328
|
+
/** Thermostat exposes preset modes (eco / away / sleep / vendor). */
|
|
6329
|
+
DeviceFeature["ClimatePreset"] = "climate-preset";
|
|
6330
|
+
/** Cover exposes intermediate position control (0..100). Gates the
|
|
6331
|
+
* position slider UI. */
|
|
6332
|
+
DeviceFeature["CoverPositionable"] = "cover-positionable";
|
|
6333
|
+
/** Cover exposes slat-tilt control. Gates the tilt slider UI. */
|
|
6334
|
+
DeviceFeature["CoverTilt"] = "cover-tilt";
|
|
6335
|
+
/** Valve exposes intermediate position control (0..100). Gates the
|
|
6336
|
+
* position slider / drag surface UI. */
|
|
6337
|
+
DeviceFeature["ValvePositionable"] = "valve-positionable";
|
|
6338
|
+
/** Fan exposes a speed-percentage setter. Gates the speed slider UI. */
|
|
6339
|
+
DeviceFeature["FanSpeed"] = "fan-speed";
|
|
6340
|
+
/** Fan exposes a preset mode selector. */
|
|
6341
|
+
DeviceFeature["FanPreset"] = "fan-preset";
|
|
6342
|
+
/** Fan exposes blade direction (forward/reverse) — typical of
|
|
6343
|
+
* ceiling fans. */
|
|
6344
|
+
DeviceFeature["FanDirection"] = "fan-direction";
|
|
6345
|
+
/** Fan exposes an oscillation toggle. */
|
|
6346
|
+
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
6347
|
+
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
6348
|
+
* field on the UI lock-controls panel. */
|
|
6349
|
+
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
6350
|
+
/** Lock supports a latch-release ("open door") action distinct from
|
|
6351
|
+
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
6352
|
+
* `supported_features`. Gates the Open Door button in the UI. */
|
|
6353
|
+
DeviceFeature["LockOpen"] = "lock-open";
|
|
6354
|
+
/** Media player exposes a seek-to-position surface. */
|
|
6355
|
+
DeviceFeature["MediaPlayerSeek"] = "media-player-seek";
|
|
6356
|
+
/** Media player exposes a volume-level setter. */
|
|
6357
|
+
DeviceFeature["MediaPlayerVolume"] = "media-player-volume";
|
|
6358
|
+
/** Media player exposes a mute toggle distinct from volume=0. */
|
|
6359
|
+
DeviceFeature["MediaPlayerMute"] = "media-player-mute";
|
|
6360
|
+
/** Media player exposes a shuffle toggle. */
|
|
6361
|
+
DeviceFeature["MediaPlayerShuffle"] = "media-player-shuffle";
|
|
6362
|
+
/** Media player exposes a repeat mode (off / all / one). */
|
|
6363
|
+
DeviceFeature["MediaPlayerRepeat"] = "media-player-repeat";
|
|
6364
|
+
/** Media player exposes a source / input selector. */
|
|
6365
|
+
DeviceFeature["MediaPlayerSelectSource"] = "media-player-select-source";
|
|
6366
|
+
/** Media player exposes a play-arbitrary-media surface (URL / id). */
|
|
6367
|
+
DeviceFeature["MediaPlayerPlayMedia"] = "media-player-play-media";
|
|
6368
|
+
/** Media player exposes next-track. */
|
|
6369
|
+
DeviceFeature["MediaPlayerNext"] = "media-player-next";
|
|
6370
|
+
/** Media player exposes previous-track. */
|
|
6371
|
+
DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
|
|
6372
|
+
/** Media player exposes stop distinct from pause. */
|
|
6373
|
+
DeviceFeature["MediaPlayerStop"] = "media-player-stop";
|
|
6374
|
+
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
6375
|
+
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
6376
|
+
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
6377
|
+
* addition to a textual location. */
|
|
6378
|
+
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
6379
|
+
/** Notifier accepts an inline / URL image attachment. */
|
|
6380
|
+
DeviceFeature["NotifierImage"] = "notifier-image";
|
|
6381
|
+
/** Notifier accepts a priority hint (high/normal/low). */
|
|
6382
|
+
DeviceFeature["NotifierPriority"] = "notifier-priority";
|
|
6383
|
+
/** Notifier accepts a free-form `data` payload for platform-specific
|
|
6384
|
+
* fields. */
|
|
6385
|
+
DeviceFeature["NotifierData"] = "notifier-data";
|
|
6386
|
+
/** Notifier supports interactive action buttons / callbacks. */
|
|
6387
|
+
DeviceFeature["NotifierActions"] = "notifier-actions";
|
|
6388
|
+
/** Notifier supports per-call recipient targeting (multi-user). */
|
|
6389
|
+
DeviceFeature["NotifierRecipients"] = "notifier-recipients";
|
|
6390
|
+
/** Script runner accepts a variables map on each run invocation. */
|
|
6391
|
+
DeviceFeature["ScriptVariables"] = "script-variables";
|
|
6392
|
+
/** Automation `trigger` accepts a skipCondition flag — fires the
|
|
6393
|
+
* automation's actions while bypassing its condition block. */
|
|
6394
|
+
DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
|
|
6395
|
+
return DeviceFeature;
|
|
6396
|
+
}({});
|
|
6397
|
+
/**
|
|
6398
|
+
* Semantic role a device plays within its parent. Populated by driver
|
|
6399
|
+
* addons when creating accessory devices (Reolink siren/floodlight/
|
|
6400
|
+
* PIR/chime/autotrack/doorbell, ONVIF relay outputs, …). Used by the
|
|
6401
|
+
* admin UI to pick icons, labels, and widgets — a `Switch` with
|
|
6402
|
+
* `role: Floodlight` renders as a bulb with a brightness slider,
|
|
6403
|
+
* whereas a `Switch` with `role: Siren` renders as a klaxon.
|
|
6404
|
+
*
|
|
6405
|
+
* Undefined for top-level devices (cameras, NVRs, hubs). Persisted in
|
|
6406
|
+
* sqlite as a nullable TEXT column — old rows keep working unchanged.
|
|
6407
|
+
*/
|
|
6408
|
+
var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
6409
|
+
DeviceRole["Siren"] = "siren";
|
|
6410
|
+
DeviceRole["Floodlight"] = "floodlight";
|
|
6411
|
+
DeviceRole["Spotlight"] = "spotlight";
|
|
6412
|
+
DeviceRole["PirSensor"] = "pir-sensor";
|
|
6413
|
+
DeviceRole["Chime"] = "chime";
|
|
6414
|
+
DeviceRole["Autotrack"] = "autotrack";
|
|
6415
|
+
DeviceRole["Nightvision"] = "nightvision";
|
|
6416
|
+
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
6417
|
+
DeviceRole["Doorbell"] = "doorbell";
|
|
6418
|
+
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
6419
|
+
* real Switch device for UI rendering / export adapters. */
|
|
6420
|
+
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
6421
|
+
/** Generic motion / occupancy / moving event source. Distinct from
|
|
6422
|
+
* the camera accessory PirSensor role: that one is a camera child;
|
|
6423
|
+
* this is a standalone HA / 3rd-party motion sensor. */
|
|
6424
|
+
DeviceRole["MotionSensor"] = "motion-sensor";
|
|
6425
|
+
DeviceRole["ContactSensor"] = "contact-sensor";
|
|
6426
|
+
DeviceRole["LeakSensor"] = "leak-sensor";
|
|
6427
|
+
DeviceRole["SmokeSensor"] = "smoke-sensor";
|
|
6428
|
+
DeviceRole["COSensor"] = "co-sensor";
|
|
6429
|
+
DeviceRole["GasSensor"] = "gas-sensor";
|
|
6430
|
+
DeviceRole["TamperSensor"] = "tamper-sensor";
|
|
6431
|
+
DeviceRole["VibrationSensor"] = "vibration-sensor";
|
|
6432
|
+
DeviceRole["ConnectivitySensor"] = "connectivity-sensor";
|
|
6433
|
+
DeviceRole["SoundSensor"] = "sound-sensor";
|
|
6434
|
+
/** Fallback for `binary_sensor` without a known `device_class`. */
|
|
6435
|
+
DeviceRole["BinarySensor"] = "binary-sensor";
|
|
6436
|
+
DeviceRole["TemperatureSensor"] = "temperature-sensor";
|
|
6437
|
+
DeviceRole["HumiditySensor"] = "humidity-sensor";
|
|
6438
|
+
DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
|
|
6439
|
+
DeviceRole["PressureSensor"] = "pressure-sensor";
|
|
6440
|
+
DeviceRole["PowerSensor"] = "power-sensor";
|
|
6441
|
+
DeviceRole["EnergySensor"] = "energy-sensor";
|
|
6442
|
+
DeviceRole["VoltageSensor"] = "voltage-sensor";
|
|
6443
|
+
DeviceRole["CurrentSensor"] = "current-sensor";
|
|
6444
|
+
DeviceRole["AirQualitySensor"] = "air-quality-sensor";
|
|
6445
|
+
/** Battery level (numeric % via `sensor` OR low-bool via
|
|
6446
|
+
* `binary_sensor` — the cap distinguishes via the value type). */
|
|
6447
|
+
DeviceRole["BatterySensor"] = "battery-sensor";
|
|
6448
|
+
/** Fallback for `sensor` numeric without a known `device_class`. */
|
|
6449
|
+
DeviceRole["NumericSensor"] = "numeric-sensor";
|
|
6450
|
+
/** String / enum state (HA `sensor` with `state_class: enum` or
|
|
6451
|
+
* `attributes.options`). */
|
|
6452
|
+
DeviceRole["EnumSensor"] = "enum-sensor";
|
|
6453
|
+
/** Date / timestamp state (HA `sensor` with `device_class: timestamp`
|
|
6454
|
+
* or `date`). The slice carries the raw ISO string verbatim (hosted on
|
|
6455
|
+
* the `enum-sensor` cap); the UI renders it locale-formatted. */
|
|
6456
|
+
DeviceRole["DateTimeSensor"] = "datetime-sensor";
|
|
6457
|
+
/** Last-resort fallback when nothing else matches. */
|
|
6458
|
+
DeviceRole["GenericSensor"] = "generic-sensor";
|
|
6459
|
+
DeviceRole["NumericControl"] = "numeric-control";
|
|
6460
|
+
DeviceRole["SelectControl"] = "select-control";
|
|
6461
|
+
DeviceRole["TextControl"] = "text-control";
|
|
6462
|
+
DeviceRole["DateTimeControl"] = "datetime-control";
|
|
6463
|
+
/** Mobile push notifier (HA `notify.mobile_app_*`) — supports
|
|
6464
|
+
* rich features (image, priority, channel routing). */
|
|
6465
|
+
DeviceRole["MobilePushNotifier"] = "mobile-push-notifier";
|
|
6466
|
+
/** Chat / messaging service (HA `notify.telegram_*`,
|
|
6467
|
+
* `notify.discord_*`, etc.). */
|
|
6468
|
+
DeviceRole["MessagingNotifier"] = "messaging-notifier";
|
|
6469
|
+
/** Email-based delivery (HA `notify.smtp`, etc.). */
|
|
6470
|
+
DeviceRole["EmailNotifier"] = "email-notifier";
|
|
6471
|
+
/** Fallback when the notifier service name doesn't match a known
|
|
6472
|
+
* pattern. */
|
|
6473
|
+
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
6474
|
+
return DeviceRole;
|
|
6475
|
+
}({});
|
|
6476
|
+
/**
|
|
6477
|
+
* Generic types for capability definitions.
|
|
6478
|
+
*
|
|
6479
|
+
* A capability is defined with Zod schemas for methods, events, and settings.
|
|
6480
|
+
* TypeScript types are inferred via z.infer<> — zero duplication.
|
|
6481
|
+
*
|
|
6482
|
+
* Pattern:
|
|
6483
|
+
* 1. Define Zod schemas for data, methods, settings
|
|
6484
|
+
* 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
|
|
6485
|
+
* 3. Export type IProvider = InferProvider<typeof capabilityDef>
|
|
6486
|
+
* 4. Addon implements IProvider
|
|
6487
|
+
* 5. Registry auto-mounts tRPC router from definition.methods
|
|
6488
|
+
*/
|
|
6489
|
+
/**
|
|
6490
|
+
* Output schema shared by the contribution + live methods.
|
|
6491
|
+
*
|
|
6492
|
+
* Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
|
|
6493
|
+
* tabs[]) without importing from `../interfaces/config-ui.js` — a
|
|
6494
|
+
* concrete-but-lenient Zod object keeps tRPC output inference happy
|
|
6495
|
+
* (using `z.unknown()` here collapses unrelated router branches to
|
|
6496
|
+
* `unknown` when the generator re-inlines the huge AppRouter type).
|
|
6497
|
+
*
|
|
6498
|
+
* `.passthrough()` on sections/fields accepts whatever FormBuilder
|
|
6499
|
+
* extensions the caller adds (showWhen, displayScale, …) without
|
|
6500
|
+
* rebuilding every time a new field kind is introduced.
|
|
6501
|
+
*/
|
|
6502
|
+
var ContributionSectionSchema = object({
|
|
6503
|
+
id: string(),
|
|
6504
|
+
title: string(),
|
|
6505
|
+
description: string().optional(),
|
|
6506
|
+
style: _enum(["card", "accordion"]).optional(),
|
|
6507
|
+
defaultCollapsed: boolean().optional(),
|
|
6508
|
+
columns: union([
|
|
6509
|
+
literal(1),
|
|
6510
|
+
literal(2),
|
|
6511
|
+
literal(3),
|
|
6512
|
+
literal(4)
|
|
6513
|
+
]).optional(),
|
|
6514
|
+
tab: string().optional(),
|
|
6515
|
+
location: _enum(["settings", "top-tab"]).optional(),
|
|
6516
|
+
order: number().optional(),
|
|
6517
|
+
fields: array(any())
|
|
6518
|
+
});
|
|
6519
|
+
object({
|
|
6520
|
+
tabs: array(object({
|
|
6521
|
+
id: string(),
|
|
6522
|
+
label: string(),
|
|
6523
|
+
icon: string(),
|
|
6524
|
+
order: number().optional()
|
|
6525
|
+
})).optional(),
|
|
6526
|
+
sections: array(ContributionSectionSchema)
|
|
6527
|
+
}).nullable();
|
|
6528
|
+
object({ deviceId: number() }), object({ deviceId: number() }), object({
|
|
6529
|
+
deviceId: number(),
|
|
6530
|
+
patch: record(string(), unknown())
|
|
6531
|
+
}), object({ success: literal(true) });
|
|
6532
|
+
object({ deviceId: number() }), unknown().nullable();
|
|
6533
|
+
/** Shorthand to define a method schema */
|
|
6534
|
+
function method(input, output, options) {
|
|
6535
|
+
return {
|
|
6536
|
+
input,
|
|
6537
|
+
output,
|
|
6538
|
+
kind: options?.kind ?? "query",
|
|
6539
|
+
auth: options?.auth ?? "protected",
|
|
6540
|
+
...options?.access !== void 0 ? { access: options.access } : {},
|
|
6541
|
+
timeoutMs: options?.timeoutMs
|
|
6542
|
+
};
|
|
6543
|
+
}
|
|
6544
|
+
/** Shorthand to define an event schema */
|
|
6545
|
+
function event(data) {
|
|
6546
|
+
return { data };
|
|
6547
|
+
}
|
|
6548
|
+
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
6549
|
+
var VersionOutputSchema = object({ version: string() });
|
|
6550
|
+
method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
|
|
6551
|
+
/**
|
|
6552
|
+
* device-ops — device-scoped cap that unifies the per-IDevice operations
|
|
6553
|
+
* previously routed through the `.device-ops` Moleculer bridge service.
|
|
6554
|
+
*
|
|
6555
|
+
* Each worker that hosts live `IDevice` instances auto-registers a native
|
|
6556
|
+
* provider for this cap (per device) backed by its local
|
|
6557
|
+
* `DeviceRegistry`. Hub-side callers reach it transparently through
|
|
6558
|
+
* `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
|
|
6559
|
+
* `deviceId` + `nodeId` and dispatches through the standard cap-router,
|
|
6560
|
+
* so there's no parallel bridge path anymore.
|
|
6561
|
+
*
|
|
6562
|
+
* The surface is intentionally small — every method corresponds to a
|
|
6563
|
+
* single action on the live `IDevice` (or `ICameraDevice` for
|
|
6564
|
+
* `getStreamSources`). Richer orchestration (enable/disable with
|
|
6565
|
+
* integration plumbing, bulk updates) stays in the `device-manager` cap;
|
|
6566
|
+
* `device-ops` is the per-device primitive the device-manager routes to.
|
|
6567
|
+
*/
|
|
6568
|
+
var StreamSourceEntrySchema = object({
|
|
6569
|
+
id: string(),
|
|
6570
|
+
label: string(),
|
|
6571
|
+
protocol: _enum([
|
|
6572
|
+
"rtsp",
|
|
6573
|
+
"rtmp",
|
|
6574
|
+
"annexb",
|
|
6575
|
+
"http-mjpeg",
|
|
6576
|
+
"webrtc",
|
|
6577
|
+
"custom"
|
|
6578
|
+
]),
|
|
6579
|
+
url: string().optional(),
|
|
6580
|
+
resolution: object({
|
|
6581
|
+
width: number(),
|
|
6582
|
+
height: number()
|
|
6583
|
+
}).optional(),
|
|
6584
|
+
fps: number().optional(),
|
|
6585
|
+
bitrate: number().optional(),
|
|
6586
|
+
codec: string().optional(),
|
|
6587
|
+
profileHint: CamProfileSchema.optional(),
|
|
6588
|
+
sdp: string().optional()
|
|
6589
|
+
});
|
|
6590
|
+
var ConfigEntrySchema$1 = object({
|
|
6591
|
+
key: string(),
|
|
6592
|
+
value: unknown()
|
|
6593
|
+
});
|
|
6594
|
+
var RawStateResultSchema = object({
|
|
6595
|
+
/** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
|
|
6596
|
+
source: string(),
|
|
6597
|
+
/** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
|
|
6598
|
+
data: record(string(), unknown())
|
|
6599
|
+
});
|
|
6600
|
+
method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(object({ deviceId: number() }), array(ConfigEntrySchema$1)), method(object({
|
|
6601
|
+
deviceId: number(),
|
|
6602
|
+
values: record(string(), unknown())
|
|
6603
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
6604
|
+
deviceId: number(),
|
|
6605
|
+
action: string().min(1),
|
|
6606
|
+
input: unknown()
|
|
6607
|
+
}), unknown(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
6608
|
+
//#endregion
|
|
6609
|
+
//#region ../types/dist/err-msg-IQTHeDzc.mjs
|
|
6610
|
+
/**
|
|
6611
|
+
import { errMsg } from '@camstack/types'
|
|
6612
|
+
* Extract a human-readable message from an unknown error value.
|
|
6613
|
+
* Replaces the ubiquitous `errMsg(err)` pattern.
|
|
6614
|
+
*/
|
|
6615
|
+
function errMsg(err) {
|
|
6616
|
+
if (err instanceof Error) return err.message;
|
|
6617
|
+
if (typeof err === "string") return err;
|
|
6618
|
+
return String(err);
|
|
6619
|
+
}
|
|
6620
|
+
//#endregion
|
|
6621
|
+
//#region ../types/dist/index.mjs
|
|
6622
|
+
/**
|
|
6623
|
+
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
6624
|
+
* every declared capability + widget of every installed plugin, on every
|
|
6625
|
+
* node. Produced by the backend `WiringHealthService` and surfaced via
|
|
6626
|
+
* `GET /health/wiring`, the tRPC `health.wiring` query, and the boot-gate.
|
|
6627
|
+
*
|
|
6628
|
+
* Unlike `/health` (process liveness), this reflects whether each cap/widget
|
|
6629
|
+
* is actually *reachable* over the real cap-dispatch path. See spec
|
|
6630
|
+
* `docs/superpowers/specs/2026-05-23-deep-healthcheck-design.md`.
|
|
6631
|
+
*/
|
|
6632
|
+
/** What kind of target a probe addressed. */
|
|
6633
|
+
var wiringProbeKindSchema = _enum([
|
|
6634
|
+
"singleton",
|
|
6635
|
+
"device",
|
|
6636
|
+
"widget"
|
|
6637
|
+
]);
|
|
6638
|
+
/** Result of probing a single (cap|widget [, device]) target. */
|
|
6639
|
+
var wiringProbeResultSchema = object({
|
|
6640
|
+
capName: string(),
|
|
6641
|
+
kind: wiringProbeKindSchema,
|
|
6642
|
+
deviceId: number().optional(),
|
|
6643
|
+
reachable: boolean(),
|
|
6644
|
+
latencyMs: number(),
|
|
6645
|
+
error: string().optional()
|
|
6646
|
+
});
|
|
6647
|
+
/** Per-addon roll-up of cap + widget probe results. */
|
|
6648
|
+
var wiringAddonHealthSchema = object({
|
|
6649
|
+
addonId: string(),
|
|
6650
|
+
caps: array(wiringProbeResultSchema).readonly(),
|
|
6651
|
+
widgets: array(wiringProbeResultSchema).readonly()
|
|
6652
|
+
});
|
|
6653
|
+
/** Per-node roll-up. */
|
|
6654
|
+
var wiringNodeHealthSchema = object({
|
|
6655
|
+
nodeId: string(),
|
|
6656
|
+
addons: array(wiringAddonHealthSchema).readonly()
|
|
6657
|
+
});
|
|
6658
|
+
object({
|
|
6659
|
+
/** True only when every probed target is reachable. */
|
|
6660
|
+
ok: boolean(),
|
|
6661
|
+
/** True when at least one target is unreachable. */
|
|
6662
|
+
degraded: boolean(),
|
|
6663
|
+
checkedAt: string(),
|
|
6664
|
+
nodes: array(wiringNodeHealthSchema).readonly(),
|
|
6665
|
+
summary: object({
|
|
6666
|
+
total: number(),
|
|
6667
|
+
reachable: number(),
|
|
6668
|
+
unreachable: number()
|
|
6669
|
+
})
|
|
6670
|
+
});
|
|
6671
|
+
var MODEL_FORMATS = [
|
|
6672
|
+
"onnx",
|
|
6673
|
+
"coreml",
|
|
6674
|
+
"openvino",
|
|
6675
|
+
"tflite",
|
|
6676
|
+
"pt"
|
|
6677
|
+
];
|
|
6244
6678
|
/**
|
|
6245
6679
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
6246
6680
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -6588,16 +7022,6 @@ var EncodeProfileSchema = object({
|
|
|
6588
7022
|
*/
|
|
6589
7023
|
outputArgs: array(string()).optional()
|
|
6590
7024
|
});
|
|
6591
|
-
/**
|
|
6592
|
-
import { errMsg } from '@camstack/types'
|
|
6593
|
-
* Extract a human-readable message from an unknown error value.
|
|
6594
|
-
* Replaces the ubiquitous `errMsg(err)` pattern.
|
|
6595
|
-
*/
|
|
6596
|
-
function errMsg(err) {
|
|
6597
|
-
if (err instanceof Error) return err.message;
|
|
6598
|
-
if (typeof err === "string") return err;
|
|
6599
|
-
return String(err);
|
|
6600
|
-
}
|
|
6601
7025
|
var YAMNET_TO_MACRO = {
|
|
6602
7026
|
mapping: {
|
|
6603
7027
|
Speech: "speech",
|
|
@@ -6863,282 +7287,6 @@ var APPLE_SA_TO_MACRO = {
|
|
|
6863
7287
|
var _macroLookup = /* @__PURE__ */ new Map();
|
|
6864
7288
|
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
6865
7289
|
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
6866
|
-
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
6867
|
-
DeviceType["Camera"] = "camera";
|
|
6868
|
-
DeviceType["Hub"] = "hub";
|
|
6869
|
-
DeviceType["Light"] = "light";
|
|
6870
|
-
DeviceType["Siren"] = "siren";
|
|
6871
|
-
DeviceType["Switch"] = "switch";
|
|
6872
|
-
DeviceType["Sensor"] = "sensor";
|
|
6873
|
-
DeviceType["Thermostat"] = "thermostat";
|
|
6874
|
-
DeviceType["Button"] = "button";
|
|
6875
|
-
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
6876
|
-
* event vocabulary verbatim (no normalization). Installed with the
|
|
6877
|
-
* `event-emitter` cap. Sources: HA `event.*` entities (structured) and
|
|
6878
|
-
* HA bus events (e.g. `zha_event`, generic). */
|
|
6879
|
-
DeviceType["EventEmitter"] = "event-emitter";
|
|
6880
|
-
/** Firmware/software update entity — current vs available version,
|
|
6881
|
-
* updatable flag, update state, and an install action. Installed with
|
|
6882
|
-
* the `update` cap. Sources: Homematic firmware-update channels (and
|
|
6883
|
-
* reusable by other providers, e.g. HA `update.*` entities). */
|
|
6884
|
-
DeviceType["Update"] = "update";
|
|
6885
|
-
DeviceType["Generic"] = "generic";
|
|
6886
|
-
/** Generic notification delivery target (HA `notify.<service>`, future
|
|
6887
|
-
* Telegram / Discord / ntfy / SMTP, …). One device per delivery
|
|
6888
|
-
* endpoint; the `notifier` cap defines the send surface. */
|
|
6889
|
-
DeviceType["Notifier"] = "notifier";
|
|
6890
|
-
/** Pre-recorded action sequence with optional parameters
|
|
6891
|
-
* (HA `script.*`). Runnable via `script-runner` cap. */
|
|
6892
|
-
DeviceType["Script"] = "script";
|
|
6893
|
-
/** Automation rule (HA `automation.*`) — enable/disable + manual
|
|
6894
|
-
* trigger surface exposed via `automation-control` cap. */
|
|
6895
|
-
DeviceType["Automation"] = "automation";
|
|
6896
|
-
/** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
|
|
6897
|
-
DeviceType["Lock"] = "lock";
|
|
6898
|
-
/** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
|
|
6899
|
-
* `valve.*`). `cover` cap with sub-roles for variant. */
|
|
6900
|
-
DeviceType["Cover"] = "cover";
|
|
6901
|
-
/** Pipe / water / gas valve with open/close/stop and optional
|
|
6902
|
-
* position (HA `valve.*`). `valve` cap — a cover-sibling actuator
|
|
6903
|
-
* modelled on the same open/closed lifecycle. */
|
|
6904
|
-
DeviceType["Valve"] = "valve";
|
|
6905
|
-
/** Humidifier / dehumidifier with on/off + target humidity + mode
|
|
6906
|
-
* (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
|
|
6907
|
-
* modelled on the same target / mode lifecycle. */
|
|
6908
|
-
DeviceType["Humidifier"] = "humidifier";
|
|
6909
|
-
/** Water heater / boiler with target temperature + operation mode +
|
|
6910
|
-
* away mode (HA `water_heater.*`). `water-heater` cap — a
|
|
6911
|
-
* climate-family actuator. */
|
|
6912
|
-
DeviceType["WaterHeater"] = "water-heater";
|
|
6913
|
-
/** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
|
|
6914
|
-
DeviceType["Fan"] = "fan";
|
|
6915
|
-
/** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
|
|
6916
|
-
* the camera surface — those use `Camera`. `media-player` cap. */
|
|
6917
|
-
DeviceType["MediaPlayer"] = "media-player";
|
|
6918
|
-
/** Security panel / alarm system (HA `alarm_control_panel.*`).
|
|
6919
|
-
* `alarm-panel` cap. */
|
|
6920
|
-
DeviceType["AlarmPanel"] = "alarm-panel";
|
|
6921
|
-
/** Generic user-settable input (HA `number` / `input_number` / `select`
|
|
6922
|
-
* / `input_select` / `text` / `input_text` / `input_datetime`).
|
|
6923
|
-
* Sub-type via `DeviceRole`: NumericControl / SelectControl /
|
|
6924
|
-
* TextControl / DateTimeControl. */
|
|
6925
|
-
DeviceType["Control"] = "control";
|
|
6926
|
-
/** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
|
|
6927
|
-
* `presence` cap. */
|
|
6928
|
-
DeviceType["Presence"] = "presence";
|
|
6929
|
-
/** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
|
|
6930
|
-
* `weather` cap. */
|
|
6931
|
-
DeviceType["Weather"] = "weather";
|
|
6932
|
-
/** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
|
|
6933
|
-
DeviceType["Vacuum"] = "vacuum";
|
|
6934
|
-
/** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
|
|
6935
|
-
* `lawn-mower-control` cap. */
|
|
6936
|
-
DeviceType["LawnMower"] = "lawn-mower";
|
|
6937
|
-
/** Physical HA device group — parent container for entity-children
|
|
6938
|
-
* adopted from a single HA device entry. Not renderable as a
|
|
6939
|
-
* standalone device; exists only to anchor child entities. */
|
|
6940
|
-
DeviceType["Container"] = "container";
|
|
6941
|
-
/** Single still-image entity (HA `image.*`). Read-only display of an
|
|
6942
|
-
* `entity_picture` signed URL the browser loads directly. `image` cap. */
|
|
6943
|
-
DeviceType["Image"] = "image";
|
|
6944
|
-
return DeviceType;
|
|
6945
|
-
}({});
|
|
6946
|
-
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
6947
|
-
DeviceFeature["BatteryOperated"] = "battery-operated";
|
|
6948
|
-
DeviceFeature["Rebootable"] = "rebootable";
|
|
6949
|
-
/**
|
|
6950
|
-
* Device supports an on-demand re-sync of its derived spec with its
|
|
6951
|
-
* upstream source — drives the generic Re-sync button. The owning
|
|
6952
|
-
* provider implements the action via the `device-adoption.resync` cap.
|
|
6953
|
-
*/
|
|
6954
|
-
DeviceFeature["Resyncable"] = "resyncable";
|
|
6955
|
-
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
6956
|
-
DeviceFeature["DoorbellButton"] = "doorbell-button";
|
|
6957
|
-
DeviceFeature["TwoWayAudio"] = "two-way-audio";
|
|
6958
|
-
DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
|
|
6959
|
-
/**
|
|
6960
|
-
* Camera supports the on-firmware autotrack subsystem (subject-
|
|
6961
|
-
* following). Distinct from `PanTiltZoom` because not every PTZ
|
|
6962
|
-
* camera ships autotrack — the admin UI uses this flag to gate
|
|
6963
|
-
* the autotrack toggle / settings card without re-deriving from
|
|
6964
|
-
* the cap registry. Mirrors `ptz-autotrack` cap registration:
|
|
6965
|
-
* driver sets this feature when probe confirms the firmware
|
|
6966
|
-
* surface, and registers the cap in the same code path.
|
|
6967
|
-
*/
|
|
6968
|
-
DeviceFeature["PtzAutotrack"] = "ptz-autotrack";
|
|
6969
|
-
/**
|
|
6970
|
-
* Accessory exposes a "trigger on motion" toggle — the parent camera's
|
|
6971
|
-
* motion detection automatically activates this device. Mirrors
|
|
6972
|
-
* `motion-trigger` cap registration: drivers set this feature in the
|
|
6973
|
-
* same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
|
|
6974
|
-
*
|
|
6975
|
-
* Used by admin UI (gate the in-hero `MotionTriggerToggle` against a
|
|
6976
|
-
* fast scalar without binding fetch), notifier rules, and `listAll`
|
|
6977
|
-
* filters that want "all devices with on-motion behaviour".
|
|
6978
|
-
*/
|
|
6979
|
-
DeviceFeature["MotionTrigger"] = "motion-trigger";
|
|
6980
|
-
/** Light supports rgb-triplet color via `color` cap. */
|
|
6981
|
-
DeviceFeature["LightColorRgb"] = "light-color-rgb";
|
|
6982
|
-
/** Light supports HSV color via `color` cap. */
|
|
6983
|
-
DeviceFeature["LightColorHsv"] = "light-color-hsv";
|
|
6984
|
-
/** Light supports color-temperature (mired) via `color` cap. */
|
|
6985
|
-
DeviceFeature["LightColorMired"] = "light-color-mired";
|
|
6986
|
-
/** Thermostat supports a `heat_cool` dual setpoint (targetLow +
|
|
6987
|
-
* targetHigh). Gates the range slider UI. */
|
|
6988
|
-
DeviceFeature["ClimateDualSetpoint"] = "climate-dual-setpoint";
|
|
6989
|
-
/** Thermostat exposes target humidity and/or current humidity
|
|
6990
|
-
* readings. Gates the humidity controls. */
|
|
6991
|
-
DeviceFeature["ClimateHumidity"] = "climate-humidity";
|
|
6992
|
-
/** Thermostat exposes a fan-mode selector. */
|
|
6993
|
-
DeviceFeature["ClimateFanMode"] = "climate-fan-mode";
|
|
6994
|
-
/** Thermostat exposes preset modes (eco / away / sleep / vendor). */
|
|
6995
|
-
DeviceFeature["ClimatePreset"] = "climate-preset";
|
|
6996
|
-
/** Cover exposes intermediate position control (0..100). Gates the
|
|
6997
|
-
* position slider UI. */
|
|
6998
|
-
DeviceFeature["CoverPositionable"] = "cover-positionable";
|
|
6999
|
-
/** Cover exposes slat-tilt control. Gates the tilt slider UI. */
|
|
7000
|
-
DeviceFeature["CoverTilt"] = "cover-tilt";
|
|
7001
|
-
/** Valve exposes intermediate position control (0..100). Gates the
|
|
7002
|
-
* position slider / drag surface UI. */
|
|
7003
|
-
DeviceFeature["ValvePositionable"] = "valve-positionable";
|
|
7004
|
-
/** Fan exposes a speed-percentage setter. Gates the speed slider UI. */
|
|
7005
|
-
DeviceFeature["FanSpeed"] = "fan-speed";
|
|
7006
|
-
/** Fan exposes a preset mode selector. */
|
|
7007
|
-
DeviceFeature["FanPreset"] = "fan-preset";
|
|
7008
|
-
/** Fan exposes blade direction (forward/reverse) — typical of
|
|
7009
|
-
* ceiling fans. */
|
|
7010
|
-
DeviceFeature["FanDirection"] = "fan-direction";
|
|
7011
|
-
/** Fan exposes an oscillation toggle. */
|
|
7012
|
-
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
7013
|
-
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
7014
|
-
* field on the UI lock-controls panel. */
|
|
7015
|
-
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
7016
|
-
/** Lock supports a latch-release ("open door") action distinct from
|
|
7017
|
-
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
7018
|
-
* `supported_features`. Gates the Open Door button in the UI. */
|
|
7019
|
-
DeviceFeature["LockOpen"] = "lock-open";
|
|
7020
|
-
/** Media player exposes a seek-to-position surface. */
|
|
7021
|
-
DeviceFeature["MediaPlayerSeek"] = "media-player-seek";
|
|
7022
|
-
/** Media player exposes a volume-level setter. */
|
|
7023
|
-
DeviceFeature["MediaPlayerVolume"] = "media-player-volume";
|
|
7024
|
-
/** Media player exposes a mute toggle distinct from volume=0. */
|
|
7025
|
-
DeviceFeature["MediaPlayerMute"] = "media-player-mute";
|
|
7026
|
-
/** Media player exposes a shuffle toggle. */
|
|
7027
|
-
DeviceFeature["MediaPlayerShuffle"] = "media-player-shuffle";
|
|
7028
|
-
/** Media player exposes a repeat mode (off / all / one). */
|
|
7029
|
-
DeviceFeature["MediaPlayerRepeat"] = "media-player-repeat";
|
|
7030
|
-
/** Media player exposes a source / input selector. */
|
|
7031
|
-
DeviceFeature["MediaPlayerSelectSource"] = "media-player-select-source";
|
|
7032
|
-
/** Media player exposes a play-arbitrary-media surface (URL / id). */
|
|
7033
|
-
DeviceFeature["MediaPlayerPlayMedia"] = "media-player-play-media";
|
|
7034
|
-
/** Media player exposes next-track. */
|
|
7035
|
-
DeviceFeature["MediaPlayerNext"] = "media-player-next";
|
|
7036
|
-
/** Media player exposes previous-track. */
|
|
7037
|
-
DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
|
|
7038
|
-
/** Media player exposes stop distinct from pause. */
|
|
7039
|
-
DeviceFeature["MediaPlayerStop"] = "media-player-stop";
|
|
7040
|
-
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
7041
|
-
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
7042
|
-
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
7043
|
-
* addition to a textual location. */
|
|
7044
|
-
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
7045
|
-
/** Notifier accepts an inline / URL image attachment. */
|
|
7046
|
-
DeviceFeature["NotifierImage"] = "notifier-image";
|
|
7047
|
-
/** Notifier accepts a priority hint (high/normal/low). */
|
|
7048
|
-
DeviceFeature["NotifierPriority"] = "notifier-priority";
|
|
7049
|
-
/** Notifier accepts a free-form `data` payload for platform-specific
|
|
7050
|
-
* fields. */
|
|
7051
|
-
DeviceFeature["NotifierData"] = "notifier-data";
|
|
7052
|
-
/** Notifier supports interactive action buttons / callbacks. */
|
|
7053
|
-
DeviceFeature["NotifierActions"] = "notifier-actions";
|
|
7054
|
-
/** Notifier supports per-call recipient targeting (multi-user). */
|
|
7055
|
-
DeviceFeature["NotifierRecipients"] = "notifier-recipients";
|
|
7056
|
-
/** Script runner accepts a variables map on each run invocation. */
|
|
7057
|
-
DeviceFeature["ScriptVariables"] = "script-variables";
|
|
7058
|
-
/** Automation `trigger` accepts a skipCondition flag — fires the
|
|
7059
|
-
* automation's actions while bypassing its condition block. */
|
|
7060
|
-
DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
|
|
7061
|
-
return DeviceFeature;
|
|
7062
|
-
}({});
|
|
7063
|
-
/**
|
|
7064
|
-
* Semantic role a device plays within its parent. Populated by driver
|
|
7065
|
-
* addons when creating accessory devices (Reolink siren/floodlight/
|
|
7066
|
-
* PIR/chime/autotrack/doorbell, ONVIF relay outputs, …). Used by the
|
|
7067
|
-
* admin UI to pick icons, labels, and widgets — a `Switch` with
|
|
7068
|
-
* `role: Floodlight` renders as a bulb with a brightness slider,
|
|
7069
|
-
* whereas a `Switch` with `role: Siren` renders as a klaxon.
|
|
7070
|
-
*
|
|
7071
|
-
* Undefined for top-level devices (cameras, NVRs, hubs). Persisted in
|
|
7072
|
-
* sqlite as a nullable TEXT column — old rows keep working unchanged.
|
|
7073
|
-
*/
|
|
7074
|
-
var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
7075
|
-
DeviceRole["Siren"] = "siren";
|
|
7076
|
-
DeviceRole["Floodlight"] = "floodlight";
|
|
7077
|
-
DeviceRole["Spotlight"] = "spotlight";
|
|
7078
|
-
DeviceRole["PirSensor"] = "pir-sensor";
|
|
7079
|
-
DeviceRole["Chime"] = "chime";
|
|
7080
|
-
DeviceRole["Autotrack"] = "autotrack";
|
|
7081
|
-
DeviceRole["Nightvision"] = "nightvision";
|
|
7082
|
-
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
7083
|
-
DeviceRole["Doorbell"] = "doorbell";
|
|
7084
|
-
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
7085
|
-
* real Switch device for UI rendering / export adapters. */
|
|
7086
|
-
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
7087
|
-
/** Generic motion / occupancy / moving event source. Distinct from
|
|
7088
|
-
* the camera accessory PirSensor role: that one is a camera child;
|
|
7089
|
-
* this is a standalone HA / 3rd-party motion sensor. */
|
|
7090
|
-
DeviceRole["MotionSensor"] = "motion-sensor";
|
|
7091
|
-
DeviceRole["ContactSensor"] = "contact-sensor";
|
|
7092
|
-
DeviceRole["LeakSensor"] = "leak-sensor";
|
|
7093
|
-
DeviceRole["SmokeSensor"] = "smoke-sensor";
|
|
7094
|
-
DeviceRole["COSensor"] = "co-sensor";
|
|
7095
|
-
DeviceRole["GasSensor"] = "gas-sensor";
|
|
7096
|
-
DeviceRole["TamperSensor"] = "tamper-sensor";
|
|
7097
|
-
DeviceRole["VibrationSensor"] = "vibration-sensor";
|
|
7098
|
-
DeviceRole["ConnectivitySensor"] = "connectivity-sensor";
|
|
7099
|
-
DeviceRole["SoundSensor"] = "sound-sensor";
|
|
7100
|
-
/** Fallback for `binary_sensor` without a known `device_class`. */
|
|
7101
|
-
DeviceRole["BinarySensor"] = "binary-sensor";
|
|
7102
|
-
DeviceRole["TemperatureSensor"] = "temperature-sensor";
|
|
7103
|
-
DeviceRole["HumiditySensor"] = "humidity-sensor";
|
|
7104
|
-
DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
|
|
7105
|
-
DeviceRole["PressureSensor"] = "pressure-sensor";
|
|
7106
|
-
DeviceRole["PowerSensor"] = "power-sensor";
|
|
7107
|
-
DeviceRole["EnergySensor"] = "energy-sensor";
|
|
7108
|
-
DeviceRole["VoltageSensor"] = "voltage-sensor";
|
|
7109
|
-
DeviceRole["CurrentSensor"] = "current-sensor";
|
|
7110
|
-
DeviceRole["AirQualitySensor"] = "air-quality-sensor";
|
|
7111
|
-
/** Battery level (numeric % via `sensor` OR low-bool via
|
|
7112
|
-
* `binary_sensor` — the cap distinguishes via the value type). */
|
|
7113
|
-
DeviceRole["BatterySensor"] = "battery-sensor";
|
|
7114
|
-
/** Fallback for `sensor` numeric without a known `device_class`. */
|
|
7115
|
-
DeviceRole["NumericSensor"] = "numeric-sensor";
|
|
7116
|
-
/** String / enum state (HA `sensor` with `state_class: enum` or
|
|
7117
|
-
* `attributes.options`). */
|
|
7118
|
-
DeviceRole["EnumSensor"] = "enum-sensor";
|
|
7119
|
-
/** Date / timestamp state (HA `sensor` with `device_class: timestamp`
|
|
7120
|
-
* or `date`). The slice carries the raw ISO string verbatim (hosted on
|
|
7121
|
-
* the `enum-sensor` cap); the UI renders it locale-formatted. */
|
|
7122
|
-
DeviceRole["DateTimeSensor"] = "datetime-sensor";
|
|
7123
|
-
/** Last-resort fallback when nothing else matches. */
|
|
7124
|
-
DeviceRole["GenericSensor"] = "generic-sensor";
|
|
7125
|
-
DeviceRole["NumericControl"] = "numeric-control";
|
|
7126
|
-
DeviceRole["SelectControl"] = "select-control";
|
|
7127
|
-
DeviceRole["TextControl"] = "text-control";
|
|
7128
|
-
DeviceRole["DateTimeControl"] = "datetime-control";
|
|
7129
|
-
/** Mobile push notifier (HA `notify.mobile_app_*`) — supports
|
|
7130
|
-
* rich features (image, priority, channel routing). */
|
|
7131
|
-
DeviceRole["MobilePushNotifier"] = "mobile-push-notifier";
|
|
7132
|
-
/** Chat / messaging service (HA `notify.telegram_*`,
|
|
7133
|
-
* `notify.discord_*`, etc.). */
|
|
7134
|
-
DeviceRole["MessagingNotifier"] = "messaging-notifier";
|
|
7135
|
-
/** Email-based delivery (HA `notify.smtp`, etc.). */
|
|
7136
|
-
DeviceRole["EmailNotifier"] = "email-notifier";
|
|
7137
|
-
/** Fallback when the notifier service name doesn't match a known
|
|
7138
|
-
* pattern. */
|
|
7139
|
-
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
7140
|
-
return DeviceRole;
|
|
7141
|
-
}({});
|
|
7142
7290
|
/**
|
|
7143
7291
|
* Accessory device helpers — shared across drivers.
|
|
7144
7292
|
*
|
|
@@ -7592,78 +7740,6 @@ var airQualitySensorCapability = {
|
|
|
7592
7740
|
runtimeState: AirQualitySensorStatusSchema
|
|
7593
7741
|
};
|
|
7594
7742
|
/**
|
|
7595
|
-
* Generic types for capability definitions.
|
|
7596
|
-
*
|
|
7597
|
-
* A capability is defined with Zod schemas for methods, events, and settings.
|
|
7598
|
-
* TypeScript types are inferred via z.infer<> — zero duplication.
|
|
7599
|
-
*
|
|
7600
|
-
* Pattern:
|
|
7601
|
-
* 1. Define Zod schemas for data, methods, settings
|
|
7602
|
-
* 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
|
|
7603
|
-
* 3. Export type IProvider = InferProvider<typeof capabilityDef>
|
|
7604
|
-
* 4. Addon implements IProvider
|
|
7605
|
-
* 5. Registry auto-mounts tRPC router from definition.methods
|
|
7606
|
-
*/
|
|
7607
|
-
/**
|
|
7608
|
-
* Output schema shared by the contribution + live methods.
|
|
7609
|
-
*
|
|
7610
|
-
* Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
|
|
7611
|
-
* tabs[]) without importing from `../interfaces/config-ui.js` — a
|
|
7612
|
-
* concrete-but-lenient Zod object keeps tRPC output inference happy
|
|
7613
|
-
* (using `z.unknown()` here collapses unrelated router branches to
|
|
7614
|
-
* `unknown` when the generator re-inlines the huge AppRouter type).
|
|
7615
|
-
*
|
|
7616
|
-
* `.passthrough()` on sections/fields accepts whatever FormBuilder
|
|
7617
|
-
* extensions the caller adds (showWhen, displayScale, …) without
|
|
7618
|
-
* rebuilding every time a new field kind is introduced.
|
|
7619
|
-
*/
|
|
7620
|
-
var ContributionSectionSchema = object({
|
|
7621
|
-
id: string(),
|
|
7622
|
-
title: string(),
|
|
7623
|
-
description: string().optional(),
|
|
7624
|
-
style: _enum(["card", "accordion"]).optional(),
|
|
7625
|
-
defaultCollapsed: boolean().optional(),
|
|
7626
|
-
columns: union([
|
|
7627
|
-
literal(1),
|
|
7628
|
-
literal(2),
|
|
7629
|
-
literal(3),
|
|
7630
|
-
literal(4)
|
|
7631
|
-
]).optional(),
|
|
7632
|
-
tab: string().optional(),
|
|
7633
|
-
location: _enum(["settings", "top-tab"]).optional(),
|
|
7634
|
-
order: number().optional(),
|
|
7635
|
-
fields: array(any())
|
|
7636
|
-
});
|
|
7637
|
-
object({
|
|
7638
|
-
tabs: array(object({
|
|
7639
|
-
id: string(),
|
|
7640
|
-
label: string(),
|
|
7641
|
-
icon: string(),
|
|
7642
|
-
order: number().optional()
|
|
7643
|
-
})).optional(),
|
|
7644
|
-
sections: array(ContributionSectionSchema)
|
|
7645
|
-
}).nullable();
|
|
7646
|
-
object({ deviceId: number() }), object({ deviceId: number() }), object({
|
|
7647
|
-
deviceId: number(),
|
|
7648
|
-
patch: record(string(), unknown())
|
|
7649
|
-
}), object({ success: literal(true) });
|
|
7650
|
-
object({ deviceId: number() }), unknown().nullable();
|
|
7651
|
-
/** Shorthand to define a method schema */
|
|
7652
|
-
function method(input, output, options) {
|
|
7653
|
-
return {
|
|
7654
|
-
input,
|
|
7655
|
-
output,
|
|
7656
|
-
kind: options?.kind ?? "query",
|
|
7657
|
-
auth: options?.auth ?? "protected",
|
|
7658
|
-
...options?.access !== void 0 ? { access: options.access } : {},
|
|
7659
|
-
timeoutMs: options?.timeoutMs
|
|
7660
|
-
};
|
|
7661
|
-
}
|
|
7662
|
-
/** Shorthand to define an event schema */
|
|
7663
|
-
function event(data) {
|
|
7664
|
-
return { data };
|
|
7665
|
-
}
|
|
7666
|
-
/**
|
|
7667
7743
|
* Alarm-panel cap. Models HA `alarm_control_panel.*` on
|
|
7668
7744
|
* `DeviceType.AlarmPanel`. State follows HA's canonical lifecycle
|
|
7669
7745
|
* across disarmed / armed_(home|away|night|vacation|custom_bypass) /
|
|
@@ -10379,6 +10455,24 @@ var DetectorOutputSchema = object({
|
|
|
10379
10455
|
inferenceMs: number(),
|
|
10380
10456
|
modelId: string()
|
|
10381
10457
|
});
|
|
10458
|
+
var EngineProvisioningSchema = object({
|
|
10459
|
+
runtimeId: _enum([
|
|
10460
|
+
"onnx",
|
|
10461
|
+
"openvino",
|
|
10462
|
+
"coreml"
|
|
10463
|
+
]).nullable(),
|
|
10464
|
+
device: string().nullable(),
|
|
10465
|
+
state: _enum([
|
|
10466
|
+
"idle",
|
|
10467
|
+
"installing",
|
|
10468
|
+
"verifying",
|
|
10469
|
+
"ready",
|
|
10470
|
+
"failed"
|
|
10471
|
+
]),
|
|
10472
|
+
progress: number().optional(),
|
|
10473
|
+
error: string().optional(),
|
|
10474
|
+
nextRetryAt: number().optional()
|
|
10475
|
+
});
|
|
10382
10476
|
var PipelineStepInputSchema = lazy(() => object({
|
|
10383
10477
|
addonId: string(),
|
|
10384
10478
|
modelId: string(),
|
|
@@ -10447,7 +10541,7 @@ var PipelineRunResultBridge = custom();
|
|
|
10447
10541
|
method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(PipelineEngineChoiceSchema, array(PipelineDefaultStepSchema)), method(_void(), PipelineEngineChoiceSchema, {
|
|
10448
10542
|
kind: "mutation",
|
|
10449
10543
|
auth: "admin"
|
|
10450
|
-
}), method(_void(), record(string(), object({
|
|
10544
|
+
}), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
|
|
10451
10545
|
modelId: string(),
|
|
10452
10546
|
settings: record(string(), unknown()).readonly()
|
|
10453
10547
|
}))), method(object({ steps: record(string(), object({
|
|
@@ -14117,9 +14211,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
14117
14211
|
limit: number().optional(),
|
|
14118
14212
|
tags: record(string(), string()).optional()
|
|
14119
14213
|
}), array(LogEntrySchema).readonly());
|
|
14120
|
-
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
14121
|
-
var VersionOutputSchema = object({ version: string() });
|
|
14122
|
-
method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
|
|
14123
14214
|
/**
|
|
14124
14215
|
* Zod schemas for persisted record types.
|
|
14125
14216
|
*
|
|
@@ -15669,7 +15760,10 @@ var AgentAddonConfigSchema = object({
|
|
|
15669
15760
|
modelId: string(),
|
|
15670
15761
|
settings: record(string(), unknown()).readonly()
|
|
15671
15762
|
});
|
|
15672
|
-
var AgentPipelineSettingsSchema = object({
|
|
15763
|
+
var AgentPipelineSettingsSchema = object({
|
|
15764
|
+
addonDefaults: record(string(), AgentAddonConfigSchema).readonly(),
|
|
15765
|
+
maxCameras: number().int().nonnegative().nullable().default(null)
|
|
15766
|
+
});
|
|
15673
15767
|
var CameraPipelineForAgentSchema = object({
|
|
15674
15768
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
15675
15769
|
audio: object({
|
|
@@ -15771,6 +15865,133 @@ var GlobalMetricsSchema = object({
|
|
|
15771
15865
|
* capability providers.
|
|
15772
15866
|
*/
|
|
15773
15867
|
var CapabilityBindingsSchema = record(string(), string());
|
|
15868
|
+
/** Source block — always present; derives from the stream catalog. */
|
|
15869
|
+
var CameraSourceStatusSchema = object({ streams: array(object({
|
|
15870
|
+
camStreamId: string(),
|
|
15871
|
+
codec: string(),
|
|
15872
|
+
width: number(),
|
|
15873
|
+
height: number(),
|
|
15874
|
+
fps: number(),
|
|
15875
|
+
kind: string()
|
|
15876
|
+
})).readonly() });
|
|
15877
|
+
/** Assignment block — always present (orchestrator-local, no remote call). */
|
|
15878
|
+
var CameraAssignmentStatusSchema = object({
|
|
15879
|
+
detectionNodeId: string().nullable(),
|
|
15880
|
+
decoderNodeId: string().nullable(),
|
|
15881
|
+
audioNodeId: string().nullable(),
|
|
15882
|
+
pinned: object({
|
|
15883
|
+
detection: boolean(),
|
|
15884
|
+
decoder: boolean(),
|
|
15885
|
+
audio: boolean()
|
|
15886
|
+
}),
|
|
15887
|
+
reasons: object({
|
|
15888
|
+
detection: string().optional(),
|
|
15889
|
+
decoder: string().optional(),
|
|
15890
|
+
audio: string().optional()
|
|
15891
|
+
})
|
|
15892
|
+
});
|
|
15893
|
+
/** Broker block — null when the broker stage is unreachable or inactive. */
|
|
15894
|
+
var CameraBrokerStatusSchema = object({
|
|
15895
|
+
profiles: array(object({
|
|
15896
|
+
profile: string(),
|
|
15897
|
+
status: string(),
|
|
15898
|
+
codec: string(),
|
|
15899
|
+
width: number(),
|
|
15900
|
+
height: number(),
|
|
15901
|
+
subscribers: number(),
|
|
15902
|
+
inFps: number(),
|
|
15903
|
+
outFps: number()
|
|
15904
|
+
})).readonly(),
|
|
15905
|
+
webrtcSessions: number(),
|
|
15906
|
+
rtspRestream: boolean()
|
|
15907
|
+
});
|
|
15908
|
+
/** Shared-memory ring statistics within the decoder block. */
|
|
15909
|
+
var CameraDecoderShmSchema = object({
|
|
15910
|
+
framesWritten: number(),
|
|
15911
|
+
getFrameHits: number(),
|
|
15912
|
+
getFrameMisses: number(),
|
|
15913
|
+
budgetMb: number()
|
|
15914
|
+
});
|
|
15915
|
+
/** Decoder block — null when the decoder stage is unreachable or inactive. */
|
|
15916
|
+
var CameraDecoderStatusSchema = object({
|
|
15917
|
+
nodeId: string(),
|
|
15918
|
+
formats: array(string()).readonly(),
|
|
15919
|
+
sessionCount: number(),
|
|
15920
|
+
shm: CameraDecoderShmSchema
|
|
15921
|
+
});
|
|
15922
|
+
/** Motion block — null when motion detection is not active for this device. */
|
|
15923
|
+
var CameraMotionStatusSchema = object({
|
|
15924
|
+
enabled: boolean(),
|
|
15925
|
+
fps: number()
|
|
15926
|
+
});
|
|
15927
|
+
/** Detection provisioning sub-block. */
|
|
15928
|
+
var CameraDetectionProvisioningSchema = object({
|
|
15929
|
+
state: _enum([
|
|
15930
|
+
"idle",
|
|
15931
|
+
"installing",
|
|
15932
|
+
"verifying",
|
|
15933
|
+
"ready",
|
|
15934
|
+
"failed"
|
|
15935
|
+
]),
|
|
15936
|
+
error: string().optional()
|
|
15937
|
+
});
|
|
15938
|
+
/** Detection phase — derived from the runner's engine phase. */
|
|
15939
|
+
var CameraDetectionPhaseSchema = _enum([
|
|
15940
|
+
"idle",
|
|
15941
|
+
"watching",
|
|
15942
|
+
"active"
|
|
15943
|
+
]);
|
|
15944
|
+
/** Detection block — null when no detection node is assigned or reachable. */
|
|
15945
|
+
var CameraDetectionStatusSchema = object({
|
|
15946
|
+
nodeId: string(),
|
|
15947
|
+
engine: object({
|
|
15948
|
+
backend: string(),
|
|
15949
|
+
device: string()
|
|
15950
|
+
}),
|
|
15951
|
+
phase: CameraDetectionPhaseSchema,
|
|
15952
|
+
configuredFps: number(),
|
|
15953
|
+
actualFps: number(),
|
|
15954
|
+
queueDepth: number(),
|
|
15955
|
+
avgInferenceMs: number(),
|
|
15956
|
+
provisioning: CameraDetectionProvisioningSchema
|
|
15957
|
+
});
|
|
15958
|
+
/** Audio block — null when no audio node is assigned or reachable. */
|
|
15959
|
+
var CameraAudioStatusSchema = object({
|
|
15960
|
+
nodeId: string(),
|
|
15961
|
+
enabled: boolean()
|
|
15962
|
+
});
|
|
15963
|
+
/** Recording block — null when no recording cap is active for this device. */
|
|
15964
|
+
var CameraRecordingStatusSchema = object({
|
|
15965
|
+
mode: _enum([
|
|
15966
|
+
"off",
|
|
15967
|
+
"continuous",
|
|
15968
|
+
"events"
|
|
15969
|
+
]),
|
|
15970
|
+
active: boolean(),
|
|
15971
|
+
storageBytes: number()
|
|
15972
|
+
});
|
|
15973
|
+
/**
|
|
15974
|
+
* Aggregated per-camera pipeline status — server-composed, single call.
|
|
15975
|
+
*
|
|
15976
|
+
* The `assignment` and `source` blocks are always present.
|
|
15977
|
+
* Every other block is `null` when the stage is inactive or unreachable
|
|
15978
|
+
* during the bounded parallel fan-out in the orchestrator implementation.
|
|
15979
|
+
*
|
|
15980
|
+
* See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
|
|
15981
|
+
*/
|
|
15982
|
+
var CameraStatusSchema = object({
|
|
15983
|
+
deviceId: number(),
|
|
15984
|
+
assignment: CameraAssignmentStatusSchema,
|
|
15985
|
+
source: CameraSourceStatusSchema,
|
|
15986
|
+
broker: CameraBrokerStatusSchema.nullable(),
|
|
15987
|
+
decoder: CameraDecoderStatusSchema.nullable(),
|
|
15988
|
+
motion: CameraMotionStatusSchema.nullable(),
|
|
15989
|
+
detection: CameraDetectionStatusSchema.nullable(),
|
|
15990
|
+
audio: CameraAudioStatusSchema.nullable(),
|
|
15991
|
+
recording: CameraRecordingStatusSchema.nullable(),
|
|
15992
|
+
/** Unix timestamp (ms) when this snapshot was composed server-side. */
|
|
15993
|
+
fetchedAt: number()
|
|
15994
|
+
});
|
|
15774
15995
|
method(object({
|
|
15775
15996
|
deviceId: number(),
|
|
15776
15997
|
agentNodeId: string()
|
|
@@ -15838,6 +16059,12 @@ method(object({
|
|
|
15838
16059
|
}), {
|
|
15839
16060
|
kind: "mutation",
|
|
15840
16061
|
auth: "admin"
|
|
16062
|
+
}), method(object({
|
|
16063
|
+
agentNodeId: string(),
|
|
16064
|
+
maxCameras: number().int().nonnegative().nullable()
|
|
16065
|
+
}), object({ success: literal(true) }), {
|
|
16066
|
+
kind: "mutation",
|
|
16067
|
+
auth: "admin"
|
|
15841
16068
|
}), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
|
|
15842
16069
|
deviceId: number(),
|
|
15843
16070
|
addonId: string(),
|
|
@@ -15863,7 +16090,7 @@ method(object({
|
|
|
15863
16090
|
}), method(object({
|
|
15864
16091
|
deviceId: number(),
|
|
15865
16092
|
agentNodeId: string().optional()
|
|
15866
|
-
}), CameraPipelineConfigSchema), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
|
|
16093
|
+
}), CameraPipelineConfigSchema), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
|
|
15867
16094
|
name: string(),
|
|
15868
16095
|
description: string().optional(),
|
|
15869
16096
|
config: CameraPipelineConfigSchema
|
|
@@ -16350,7 +16577,7 @@ method(object({
|
|
|
16350
16577
|
}), _void(), {
|
|
16351
16578
|
kind: "mutation",
|
|
16352
16579
|
auth: "admin"
|
|
16353
|
-
}), 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({
|
|
16580
|
+
}), 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({
|
|
16354
16581
|
deviceId: number(),
|
|
16355
16582
|
values: record(string(), unknown())
|
|
16356
16583
|
}), object({ success: literal(true) }), {
|
|
@@ -17032,7 +17259,20 @@ var DiskSpaceInfoSchema = object({
|
|
|
17032
17259
|
var PidResourceStatsSchema = object({
|
|
17033
17260
|
pid: number(),
|
|
17034
17261
|
cpu: number(),
|
|
17035
|
-
memory: number()
|
|
17262
|
+
memory: number(),
|
|
17263
|
+
/**
|
|
17264
|
+
* Private (anonymous) resident bytes — the per-process V8 heap + native
|
|
17265
|
+
* allocations NOT shared with other processes (Linux RssAnon). This is the
|
|
17266
|
+
* "real" per-runner cost; summing it across runners is meaningful, unlike
|
|
17267
|
+
* `memory` (RSS), which double-counts the shared mmap'd framework code.
|
|
17268
|
+
* Undefined where /proc is unavailable (e.g. macOS).
|
|
17269
|
+
*/
|
|
17270
|
+
privateBytes: number().optional(),
|
|
17271
|
+
/**
|
|
17272
|
+
* Shared file-backed resident bytes (Linux RssFile) — mmap'd framework/lib
|
|
17273
|
+
* code shared copy-on-write across runners. Undefined on macOS.
|
|
17274
|
+
*/
|
|
17275
|
+
sharedBytes: number().optional()
|
|
17036
17276
|
});
|
|
17037
17277
|
var AddonInstanceSchema = object({
|
|
17038
17278
|
addonId: string(),
|
|
@@ -17081,6 +17321,17 @@ var KillProcessResultSchema = object({
|
|
|
17081
17321
|
reason: string().optional(),
|
|
17082
17322
|
signal: _enum(["SIGTERM", "SIGKILL"]).optional()
|
|
17083
17323
|
});
|
|
17324
|
+
var DumpHeapSnapshotInputSchema = object({
|
|
17325
|
+
/** The addon whose runner should dump a heap snapshot. */
|
|
17326
|
+
addonId: string() });
|
|
17327
|
+
var DumpHeapSnapshotResultSchema = object({
|
|
17328
|
+
success: boolean(),
|
|
17329
|
+
/** Path of the written .heapsnapshot inside the runner's container/host. */
|
|
17330
|
+
path: string().optional(),
|
|
17331
|
+
/** Process pid that was signalled. */
|
|
17332
|
+
pid: number().optional(),
|
|
17333
|
+
reason: string().optional()
|
|
17334
|
+
});
|
|
17084
17335
|
var SystemMetricsSchema = object({
|
|
17085
17336
|
cpuPercent: number(),
|
|
17086
17337
|
memoryPercent: number(),
|
|
@@ -17094,6 +17345,9 @@ var SystemMetricsSchema = object({
|
|
|
17094
17345
|
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, {
|
|
17095
17346
|
kind: "mutation",
|
|
17096
17347
|
auth: "admin"
|
|
17348
|
+
}), method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
|
|
17349
|
+
kind: "mutation",
|
|
17350
|
+
auth: "admin"
|
|
17097
17351
|
});
|
|
17098
17352
|
var PtzPresetSchema = object({
|
|
17099
17353
|
id: string(),
|
|
@@ -17460,63 +17714,6 @@ method(object({
|
|
|
17460
17714
|
auth: "admin"
|
|
17461
17715
|
});
|
|
17462
17716
|
/**
|
|
17463
|
-
* device-ops — device-scoped cap that unifies the per-IDevice operations
|
|
17464
|
-
* previously routed through the `.device-ops` Moleculer bridge service.
|
|
17465
|
-
*
|
|
17466
|
-
* Each worker that hosts live `IDevice` instances auto-registers a native
|
|
17467
|
-
* provider for this cap (per device) backed by its local
|
|
17468
|
-
* `DeviceRegistry`. Hub-side callers reach it transparently through
|
|
17469
|
-
* `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
|
|
17470
|
-
* `deviceId` + `nodeId` and dispatches through the standard cap-router,
|
|
17471
|
-
* so there's no parallel bridge path anymore.
|
|
17472
|
-
*
|
|
17473
|
-
* The surface is intentionally small — every method corresponds to a
|
|
17474
|
-
* single action on the live `IDevice` (or `ICameraDevice` for
|
|
17475
|
-
* `getStreamSources`). Richer orchestration (enable/disable with
|
|
17476
|
-
* integration plumbing, bulk updates) stays in the `device-manager` cap;
|
|
17477
|
-
* `device-ops` is the per-device primitive the device-manager routes to.
|
|
17478
|
-
*/
|
|
17479
|
-
var StreamSourceEntrySchema$1 = object({
|
|
17480
|
-
id: string(),
|
|
17481
|
-
label: string(),
|
|
17482
|
-
protocol: _enum([
|
|
17483
|
-
"rtsp",
|
|
17484
|
-
"rtmp",
|
|
17485
|
-
"annexb",
|
|
17486
|
-
"http-mjpeg",
|
|
17487
|
-
"webrtc",
|
|
17488
|
-
"custom"
|
|
17489
|
-
]),
|
|
17490
|
-
url: string().optional(),
|
|
17491
|
-
resolution: object({
|
|
17492
|
-
width: number(),
|
|
17493
|
-
height: number()
|
|
17494
|
-
}).optional(),
|
|
17495
|
-
fps: number().optional(),
|
|
17496
|
-
bitrate: number().optional(),
|
|
17497
|
-
codec: string().optional(),
|
|
17498
|
-
profileHint: CamProfileSchema.optional(),
|
|
17499
|
-
sdp: string().optional()
|
|
17500
|
-
});
|
|
17501
|
-
var ConfigEntrySchema$1 = object({
|
|
17502
|
-
key: string(),
|
|
17503
|
-
value: unknown()
|
|
17504
|
-
});
|
|
17505
|
-
var RawStateResultSchema = object({
|
|
17506
|
-
/** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
|
|
17507
|
-
source: string(),
|
|
17508
|
-
/** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
|
|
17509
|
-
data: record(string(), unknown())
|
|
17510
|
-
});
|
|
17511
|
-
method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema$1)), method(object({
|
|
17512
|
-
deviceId: number(),
|
|
17513
|
-
values: record(string(), unknown())
|
|
17514
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
17515
|
-
deviceId: number(),
|
|
17516
|
-
action: string().min(1),
|
|
17517
|
-
input: unknown()
|
|
17518
|
-
}), unknown(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
17519
|
-
/**
|
|
17520
17717
|
* camera-credentials — device-scoped cap exposing the camera's network
|
|
17521
17718
|
* + auth surface in a vendor-neutral shape.
|
|
17522
17719
|
*
|
|
@@ -21199,6 +21396,12 @@ Object.freeze({
|
|
|
21199
21396
|
addonId: null,
|
|
21200
21397
|
access: "view"
|
|
21201
21398
|
},
|
|
21399
|
+
"metricsProvider.dumpHeapSnapshot": {
|
|
21400
|
+
capName: "metrics-provider",
|
|
21401
|
+
capScope: "system",
|
|
21402
|
+
addonId: null,
|
|
21403
|
+
access: "create"
|
|
21404
|
+
},
|
|
21202
21405
|
"metricsProvider.getAddonStats": {
|
|
21203
21406
|
capName: "metrics-provider",
|
|
21204
21407
|
capScope: "system",
|
|
@@ -21655,6 +21858,12 @@ Object.freeze({
|
|
|
21655
21858
|
addonId: null,
|
|
21656
21859
|
access: "view"
|
|
21657
21860
|
},
|
|
21861
|
+
"pipelineExecutor.getEngineProvisioning": {
|
|
21862
|
+
capName: "pipeline-executor",
|
|
21863
|
+
capScope: "system",
|
|
21864
|
+
addonId: null,
|
|
21865
|
+
access: "view"
|
|
21866
|
+
},
|
|
21658
21867
|
"pipelineExecutor.getGlobalPipelineConfig": {
|
|
21659
21868
|
capName: "pipeline-executor",
|
|
21660
21869
|
capScope: "system",
|
|
@@ -21859,6 +22068,18 @@ Object.freeze({
|
|
|
21859
22068
|
addonId: null,
|
|
21860
22069
|
access: "view"
|
|
21861
22070
|
},
|
|
22071
|
+
"pipelineOrchestrator.getCameraStatus": {
|
|
22072
|
+
capName: "pipeline-orchestrator",
|
|
22073
|
+
capScope: "system",
|
|
22074
|
+
addonId: null,
|
|
22075
|
+
access: "view"
|
|
22076
|
+
},
|
|
22077
|
+
"pipelineOrchestrator.getCameraStatuses": {
|
|
22078
|
+
capName: "pipeline-orchestrator",
|
|
22079
|
+
capScope: "system",
|
|
22080
|
+
addonId: null,
|
|
22081
|
+
access: "view"
|
|
22082
|
+
},
|
|
21862
22083
|
"pipelineOrchestrator.getCameraStepOverrides": {
|
|
21863
22084
|
capName: "pipeline-orchestrator",
|
|
21864
22085
|
capScope: "system",
|
|
@@ -21943,6 +22164,12 @@ Object.freeze({
|
|
|
21943
22164
|
addonId: null,
|
|
21944
22165
|
access: "create"
|
|
21945
22166
|
},
|
|
22167
|
+
"pipelineOrchestrator.setAgentMaxCameras": {
|
|
22168
|
+
capName: "pipeline-orchestrator",
|
|
22169
|
+
capScope: "system",
|
|
22170
|
+
addonId: null,
|
|
22171
|
+
access: "create"
|
|
22172
|
+
},
|
|
21946
22173
|
"pipelineOrchestrator.setCameraPipelineForAgent": {
|
|
21947
22174
|
capName: "pipeline-orchestrator",
|
|
21948
22175
|
capScope: "system",
|
|
@@ -49349,4 +49576,4 @@ var HomematicProviderAddon = class extends BaseDeviceProvider {
|
|
|
49349
49576
|
}
|
|
49350
49577
|
};
|
|
49351
49578
|
//#endregion
|
|
49352
|
-
export {
|
|
49579
|
+
export { motionCapability as C, createEvent as D, EventCategory as E, HomematicProviderAddon, object as O, lockControlCapability as S, DeviceType as T, toHomematicOptions as _, decodeClimate as a, coverCapability as b, toHmClimateMode as c, mapHmChannel as d, mapHmDeviceChannels as f, homematicConfigSchema as g, homematicAddonConfigSchema as h, registerTemperatureCap as i, string as k, deriveHmEntitySpecs as l, buildConnectionFormSchema as m, registerHumidityCap as n, decodeCover as o, homematicFacades as p, registerPowerMeterCap as r, decodeLock as s, registerAmbientLightCap as t, inferHmDeviceType as u, BaseDevice as v, switchCapability as w, eventEmitterCapability as x, climateControlCapability as y };
|