@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.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";
|
|
@@ -6031,7 +5975,7 @@ var ProfileSlotSchema = object({
|
|
|
6031
5975
|
* Zod schema for StreamSourceEntry — the canonical stream descriptor
|
|
6032
5976
|
* exposed by ICameraDevice.getStreamSources() and consumed by the broker.
|
|
6033
5977
|
*/
|
|
6034
|
-
var StreamSourceEntrySchema = object({
|
|
5978
|
+
var StreamSourceEntrySchema$1 = object({
|
|
6035
5979
|
id: string(),
|
|
6036
5980
|
label: string(),
|
|
6037
5981
|
protocol: _enum([
|
|
@@ -6253,6 +6197,484 @@ var ProfileRtspEntrySchema = object({
|
|
|
6253
6197
|
codec: string().optional(),
|
|
6254
6198
|
resolution: CamStreamResolutionSchema.optional()
|
|
6255
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
|
+
];
|
|
6256
6678
|
/**
|
|
6257
6679
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
6258
6680
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -6600,16 +7022,6 @@ var EncodeProfileSchema = object({
|
|
|
6600
7022
|
*/
|
|
6601
7023
|
outputArgs: array(string()).optional()
|
|
6602
7024
|
});
|
|
6603
|
-
/**
|
|
6604
|
-
import { errMsg } from '@camstack/types'
|
|
6605
|
-
* Extract a human-readable message from an unknown error value.
|
|
6606
|
-
* Replaces the ubiquitous `errMsg(err)` pattern.
|
|
6607
|
-
*/
|
|
6608
|
-
function errMsg(err) {
|
|
6609
|
-
if (err instanceof Error) return err.message;
|
|
6610
|
-
if (typeof err === "string") return err;
|
|
6611
|
-
return String(err);
|
|
6612
|
-
}
|
|
6613
7025
|
var YAMNET_TO_MACRO = {
|
|
6614
7026
|
mapping: {
|
|
6615
7027
|
Speech: "speech",
|
|
@@ -6875,282 +7287,6 @@ var APPLE_SA_TO_MACRO = {
|
|
|
6875
7287
|
var _macroLookup = /* @__PURE__ */ new Map();
|
|
6876
7288
|
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
6877
7289
|
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
6878
|
-
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
6879
|
-
DeviceType["Camera"] = "camera";
|
|
6880
|
-
DeviceType["Hub"] = "hub";
|
|
6881
|
-
DeviceType["Light"] = "light";
|
|
6882
|
-
DeviceType["Siren"] = "siren";
|
|
6883
|
-
DeviceType["Switch"] = "switch";
|
|
6884
|
-
DeviceType["Sensor"] = "sensor";
|
|
6885
|
-
DeviceType["Thermostat"] = "thermostat";
|
|
6886
|
-
DeviceType["Button"] = "button";
|
|
6887
|
-
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
6888
|
-
* event vocabulary verbatim (no normalization). Installed with the
|
|
6889
|
-
* `event-emitter` cap. Sources: HA `event.*` entities (structured) and
|
|
6890
|
-
* HA bus events (e.g. `zha_event`, generic). */
|
|
6891
|
-
DeviceType["EventEmitter"] = "event-emitter";
|
|
6892
|
-
/** Firmware/software update entity — current vs available version,
|
|
6893
|
-
* updatable flag, update state, and an install action. Installed with
|
|
6894
|
-
* the `update` cap. Sources: Homematic firmware-update channels (and
|
|
6895
|
-
* reusable by other providers, e.g. HA `update.*` entities). */
|
|
6896
|
-
DeviceType["Update"] = "update";
|
|
6897
|
-
DeviceType["Generic"] = "generic";
|
|
6898
|
-
/** Generic notification delivery target (HA `notify.<service>`, future
|
|
6899
|
-
* Telegram / Discord / ntfy / SMTP, …). One device per delivery
|
|
6900
|
-
* endpoint; the `notifier` cap defines the send surface. */
|
|
6901
|
-
DeviceType["Notifier"] = "notifier";
|
|
6902
|
-
/** Pre-recorded action sequence with optional parameters
|
|
6903
|
-
* (HA `script.*`). Runnable via `script-runner` cap. */
|
|
6904
|
-
DeviceType["Script"] = "script";
|
|
6905
|
-
/** Automation rule (HA `automation.*`) — enable/disable + manual
|
|
6906
|
-
* trigger surface exposed via `automation-control` cap. */
|
|
6907
|
-
DeviceType["Automation"] = "automation";
|
|
6908
|
-
/** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
|
|
6909
|
-
DeviceType["Lock"] = "lock";
|
|
6910
|
-
/** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
|
|
6911
|
-
* `valve.*`). `cover` cap with sub-roles for variant. */
|
|
6912
|
-
DeviceType["Cover"] = "cover";
|
|
6913
|
-
/** Pipe / water / gas valve with open/close/stop and optional
|
|
6914
|
-
* position (HA `valve.*`). `valve` cap — a cover-sibling actuator
|
|
6915
|
-
* modelled on the same open/closed lifecycle. */
|
|
6916
|
-
DeviceType["Valve"] = "valve";
|
|
6917
|
-
/** Humidifier / dehumidifier with on/off + target humidity + mode
|
|
6918
|
-
* (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
|
|
6919
|
-
* modelled on the same target / mode lifecycle. */
|
|
6920
|
-
DeviceType["Humidifier"] = "humidifier";
|
|
6921
|
-
/** Water heater / boiler with target temperature + operation mode +
|
|
6922
|
-
* away mode (HA `water_heater.*`). `water-heater` cap — a
|
|
6923
|
-
* climate-family actuator. */
|
|
6924
|
-
DeviceType["WaterHeater"] = "water-heater";
|
|
6925
|
-
/** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
|
|
6926
|
-
DeviceType["Fan"] = "fan";
|
|
6927
|
-
/** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
|
|
6928
|
-
* the camera surface — those use `Camera`. `media-player` cap. */
|
|
6929
|
-
DeviceType["MediaPlayer"] = "media-player";
|
|
6930
|
-
/** Security panel / alarm system (HA `alarm_control_panel.*`).
|
|
6931
|
-
* `alarm-panel` cap. */
|
|
6932
|
-
DeviceType["AlarmPanel"] = "alarm-panel";
|
|
6933
|
-
/** Generic user-settable input (HA `number` / `input_number` / `select`
|
|
6934
|
-
* / `input_select` / `text` / `input_text` / `input_datetime`).
|
|
6935
|
-
* Sub-type via `DeviceRole`: NumericControl / SelectControl /
|
|
6936
|
-
* TextControl / DateTimeControl. */
|
|
6937
|
-
DeviceType["Control"] = "control";
|
|
6938
|
-
/** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
|
|
6939
|
-
* `presence` cap. */
|
|
6940
|
-
DeviceType["Presence"] = "presence";
|
|
6941
|
-
/** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
|
|
6942
|
-
* `weather` cap. */
|
|
6943
|
-
DeviceType["Weather"] = "weather";
|
|
6944
|
-
/** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
|
|
6945
|
-
DeviceType["Vacuum"] = "vacuum";
|
|
6946
|
-
/** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
|
|
6947
|
-
* `lawn-mower-control` cap. */
|
|
6948
|
-
DeviceType["LawnMower"] = "lawn-mower";
|
|
6949
|
-
/** Physical HA device group — parent container for entity-children
|
|
6950
|
-
* adopted from a single HA device entry. Not renderable as a
|
|
6951
|
-
* standalone device; exists only to anchor child entities. */
|
|
6952
|
-
DeviceType["Container"] = "container";
|
|
6953
|
-
/** Single still-image entity (HA `image.*`). Read-only display of an
|
|
6954
|
-
* `entity_picture` signed URL the browser loads directly. `image` cap. */
|
|
6955
|
-
DeviceType["Image"] = "image";
|
|
6956
|
-
return DeviceType;
|
|
6957
|
-
}({});
|
|
6958
|
-
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
6959
|
-
DeviceFeature["BatteryOperated"] = "battery-operated";
|
|
6960
|
-
DeviceFeature["Rebootable"] = "rebootable";
|
|
6961
|
-
/**
|
|
6962
|
-
* Device supports an on-demand re-sync of its derived spec with its
|
|
6963
|
-
* upstream source — drives the generic Re-sync button. The owning
|
|
6964
|
-
* provider implements the action via the `device-adoption.resync` cap.
|
|
6965
|
-
*/
|
|
6966
|
-
DeviceFeature["Resyncable"] = "resyncable";
|
|
6967
|
-
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
6968
|
-
DeviceFeature["DoorbellButton"] = "doorbell-button";
|
|
6969
|
-
DeviceFeature["TwoWayAudio"] = "two-way-audio";
|
|
6970
|
-
DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
|
|
6971
|
-
/**
|
|
6972
|
-
* Camera supports the on-firmware autotrack subsystem (subject-
|
|
6973
|
-
* following). Distinct from `PanTiltZoom` because not every PTZ
|
|
6974
|
-
* camera ships autotrack — the admin UI uses this flag to gate
|
|
6975
|
-
* the autotrack toggle / settings card without re-deriving from
|
|
6976
|
-
* the cap registry. Mirrors `ptz-autotrack` cap registration:
|
|
6977
|
-
* driver sets this feature when probe confirms the firmware
|
|
6978
|
-
* surface, and registers the cap in the same code path.
|
|
6979
|
-
*/
|
|
6980
|
-
DeviceFeature["PtzAutotrack"] = "ptz-autotrack";
|
|
6981
|
-
/**
|
|
6982
|
-
* Accessory exposes a "trigger on motion" toggle — the parent camera's
|
|
6983
|
-
* motion detection automatically activates this device. Mirrors
|
|
6984
|
-
* `motion-trigger` cap registration: drivers set this feature in the
|
|
6985
|
-
* same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
|
|
6986
|
-
*
|
|
6987
|
-
* Used by admin UI (gate the in-hero `MotionTriggerToggle` against a
|
|
6988
|
-
* fast scalar without binding fetch), notifier rules, and `listAll`
|
|
6989
|
-
* filters that want "all devices with on-motion behaviour".
|
|
6990
|
-
*/
|
|
6991
|
-
DeviceFeature["MotionTrigger"] = "motion-trigger";
|
|
6992
|
-
/** Light supports rgb-triplet color via `color` cap. */
|
|
6993
|
-
DeviceFeature["LightColorRgb"] = "light-color-rgb";
|
|
6994
|
-
/** Light supports HSV color via `color` cap. */
|
|
6995
|
-
DeviceFeature["LightColorHsv"] = "light-color-hsv";
|
|
6996
|
-
/** Light supports color-temperature (mired) via `color` cap. */
|
|
6997
|
-
DeviceFeature["LightColorMired"] = "light-color-mired";
|
|
6998
|
-
/** Thermostat supports a `heat_cool` dual setpoint (targetLow +
|
|
6999
|
-
* targetHigh). Gates the range slider UI. */
|
|
7000
|
-
DeviceFeature["ClimateDualSetpoint"] = "climate-dual-setpoint";
|
|
7001
|
-
/** Thermostat exposes target humidity and/or current humidity
|
|
7002
|
-
* readings. Gates the humidity controls. */
|
|
7003
|
-
DeviceFeature["ClimateHumidity"] = "climate-humidity";
|
|
7004
|
-
/** Thermostat exposes a fan-mode selector. */
|
|
7005
|
-
DeviceFeature["ClimateFanMode"] = "climate-fan-mode";
|
|
7006
|
-
/** Thermostat exposes preset modes (eco / away / sleep / vendor). */
|
|
7007
|
-
DeviceFeature["ClimatePreset"] = "climate-preset";
|
|
7008
|
-
/** Cover exposes intermediate position control (0..100). Gates the
|
|
7009
|
-
* position slider UI. */
|
|
7010
|
-
DeviceFeature["CoverPositionable"] = "cover-positionable";
|
|
7011
|
-
/** Cover exposes slat-tilt control. Gates the tilt slider UI. */
|
|
7012
|
-
DeviceFeature["CoverTilt"] = "cover-tilt";
|
|
7013
|
-
/** Valve exposes intermediate position control (0..100). Gates the
|
|
7014
|
-
* position slider / drag surface UI. */
|
|
7015
|
-
DeviceFeature["ValvePositionable"] = "valve-positionable";
|
|
7016
|
-
/** Fan exposes a speed-percentage setter. Gates the speed slider UI. */
|
|
7017
|
-
DeviceFeature["FanSpeed"] = "fan-speed";
|
|
7018
|
-
/** Fan exposes a preset mode selector. */
|
|
7019
|
-
DeviceFeature["FanPreset"] = "fan-preset";
|
|
7020
|
-
/** Fan exposes blade direction (forward/reverse) — typical of
|
|
7021
|
-
* ceiling fans. */
|
|
7022
|
-
DeviceFeature["FanDirection"] = "fan-direction";
|
|
7023
|
-
/** Fan exposes an oscillation toggle. */
|
|
7024
|
-
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
7025
|
-
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
7026
|
-
* field on the UI lock-controls panel. */
|
|
7027
|
-
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
7028
|
-
/** Lock supports a latch-release ("open door") action distinct from
|
|
7029
|
-
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
7030
|
-
* `supported_features`. Gates the Open Door button in the UI. */
|
|
7031
|
-
DeviceFeature["LockOpen"] = "lock-open";
|
|
7032
|
-
/** Media player exposes a seek-to-position surface. */
|
|
7033
|
-
DeviceFeature["MediaPlayerSeek"] = "media-player-seek";
|
|
7034
|
-
/** Media player exposes a volume-level setter. */
|
|
7035
|
-
DeviceFeature["MediaPlayerVolume"] = "media-player-volume";
|
|
7036
|
-
/** Media player exposes a mute toggle distinct from volume=0. */
|
|
7037
|
-
DeviceFeature["MediaPlayerMute"] = "media-player-mute";
|
|
7038
|
-
/** Media player exposes a shuffle toggle. */
|
|
7039
|
-
DeviceFeature["MediaPlayerShuffle"] = "media-player-shuffle";
|
|
7040
|
-
/** Media player exposes a repeat mode (off / all / one). */
|
|
7041
|
-
DeviceFeature["MediaPlayerRepeat"] = "media-player-repeat";
|
|
7042
|
-
/** Media player exposes a source / input selector. */
|
|
7043
|
-
DeviceFeature["MediaPlayerSelectSource"] = "media-player-select-source";
|
|
7044
|
-
/** Media player exposes a play-arbitrary-media surface (URL / id). */
|
|
7045
|
-
DeviceFeature["MediaPlayerPlayMedia"] = "media-player-play-media";
|
|
7046
|
-
/** Media player exposes next-track. */
|
|
7047
|
-
DeviceFeature["MediaPlayerNext"] = "media-player-next";
|
|
7048
|
-
/** Media player exposes previous-track. */
|
|
7049
|
-
DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
|
|
7050
|
-
/** Media player exposes stop distinct from pause. */
|
|
7051
|
-
DeviceFeature["MediaPlayerStop"] = "media-player-stop";
|
|
7052
|
-
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
7053
|
-
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
7054
|
-
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
7055
|
-
* addition to a textual location. */
|
|
7056
|
-
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
7057
|
-
/** Notifier accepts an inline / URL image attachment. */
|
|
7058
|
-
DeviceFeature["NotifierImage"] = "notifier-image";
|
|
7059
|
-
/** Notifier accepts a priority hint (high/normal/low). */
|
|
7060
|
-
DeviceFeature["NotifierPriority"] = "notifier-priority";
|
|
7061
|
-
/** Notifier accepts a free-form `data` payload for platform-specific
|
|
7062
|
-
* fields. */
|
|
7063
|
-
DeviceFeature["NotifierData"] = "notifier-data";
|
|
7064
|
-
/** Notifier supports interactive action buttons / callbacks. */
|
|
7065
|
-
DeviceFeature["NotifierActions"] = "notifier-actions";
|
|
7066
|
-
/** Notifier supports per-call recipient targeting (multi-user). */
|
|
7067
|
-
DeviceFeature["NotifierRecipients"] = "notifier-recipients";
|
|
7068
|
-
/** Script runner accepts a variables map on each run invocation. */
|
|
7069
|
-
DeviceFeature["ScriptVariables"] = "script-variables";
|
|
7070
|
-
/** Automation `trigger` accepts a skipCondition flag — fires the
|
|
7071
|
-
* automation's actions while bypassing its condition block. */
|
|
7072
|
-
DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
|
|
7073
|
-
return DeviceFeature;
|
|
7074
|
-
}({});
|
|
7075
|
-
/**
|
|
7076
|
-
* Semantic role a device plays within its parent. Populated by driver
|
|
7077
|
-
* addons when creating accessory devices (Reolink siren/floodlight/
|
|
7078
|
-
* PIR/chime/autotrack/doorbell, ONVIF relay outputs, …). Used by the
|
|
7079
|
-
* admin UI to pick icons, labels, and widgets — a `Switch` with
|
|
7080
|
-
* `role: Floodlight` renders as a bulb with a brightness slider,
|
|
7081
|
-
* whereas a `Switch` with `role: Siren` renders as a klaxon.
|
|
7082
|
-
*
|
|
7083
|
-
* Undefined for top-level devices (cameras, NVRs, hubs). Persisted in
|
|
7084
|
-
* sqlite as a nullable TEXT column — old rows keep working unchanged.
|
|
7085
|
-
*/
|
|
7086
|
-
var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
7087
|
-
DeviceRole["Siren"] = "siren";
|
|
7088
|
-
DeviceRole["Floodlight"] = "floodlight";
|
|
7089
|
-
DeviceRole["Spotlight"] = "spotlight";
|
|
7090
|
-
DeviceRole["PirSensor"] = "pir-sensor";
|
|
7091
|
-
DeviceRole["Chime"] = "chime";
|
|
7092
|
-
DeviceRole["Autotrack"] = "autotrack";
|
|
7093
|
-
DeviceRole["Nightvision"] = "nightvision";
|
|
7094
|
-
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
7095
|
-
DeviceRole["Doorbell"] = "doorbell";
|
|
7096
|
-
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
7097
|
-
* real Switch device for UI rendering / export adapters. */
|
|
7098
|
-
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
7099
|
-
/** Generic motion / occupancy / moving event source. Distinct from
|
|
7100
|
-
* the camera accessory PirSensor role: that one is a camera child;
|
|
7101
|
-
* this is a standalone HA / 3rd-party motion sensor. */
|
|
7102
|
-
DeviceRole["MotionSensor"] = "motion-sensor";
|
|
7103
|
-
DeviceRole["ContactSensor"] = "contact-sensor";
|
|
7104
|
-
DeviceRole["LeakSensor"] = "leak-sensor";
|
|
7105
|
-
DeviceRole["SmokeSensor"] = "smoke-sensor";
|
|
7106
|
-
DeviceRole["COSensor"] = "co-sensor";
|
|
7107
|
-
DeviceRole["GasSensor"] = "gas-sensor";
|
|
7108
|
-
DeviceRole["TamperSensor"] = "tamper-sensor";
|
|
7109
|
-
DeviceRole["VibrationSensor"] = "vibration-sensor";
|
|
7110
|
-
DeviceRole["ConnectivitySensor"] = "connectivity-sensor";
|
|
7111
|
-
DeviceRole["SoundSensor"] = "sound-sensor";
|
|
7112
|
-
/** Fallback for `binary_sensor` without a known `device_class`. */
|
|
7113
|
-
DeviceRole["BinarySensor"] = "binary-sensor";
|
|
7114
|
-
DeviceRole["TemperatureSensor"] = "temperature-sensor";
|
|
7115
|
-
DeviceRole["HumiditySensor"] = "humidity-sensor";
|
|
7116
|
-
DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
|
|
7117
|
-
DeviceRole["PressureSensor"] = "pressure-sensor";
|
|
7118
|
-
DeviceRole["PowerSensor"] = "power-sensor";
|
|
7119
|
-
DeviceRole["EnergySensor"] = "energy-sensor";
|
|
7120
|
-
DeviceRole["VoltageSensor"] = "voltage-sensor";
|
|
7121
|
-
DeviceRole["CurrentSensor"] = "current-sensor";
|
|
7122
|
-
DeviceRole["AirQualitySensor"] = "air-quality-sensor";
|
|
7123
|
-
/** Battery level (numeric % via `sensor` OR low-bool via
|
|
7124
|
-
* `binary_sensor` — the cap distinguishes via the value type). */
|
|
7125
|
-
DeviceRole["BatterySensor"] = "battery-sensor";
|
|
7126
|
-
/** Fallback for `sensor` numeric without a known `device_class`. */
|
|
7127
|
-
DeviceRole["NumericSensor"] = "numeric-sensor";
|
|
7128
|
-
/** String / enum state (HA `sensor` with `state_class: enum` or
|
|
7129
|
-
* `attributes.options`). */
|
|
7130
|
-
DeviceRole["EnumSensor"] = "enum-sensor";
|
|
7131
|
-
/** Date / timestamp state (HA `sensor` with `device_class: timestamp`
|
|
7132
|
-
* or `date`). The slice carries the raw ISO string verbatim (hosted on
|
|
7133
|
-
* the `enum-sensor` cap); the UI renders it locale-formatted. */
|
|
7134
|
-
DeviceRole["DateTimeSensor"] = "datetime-sensor";
|
|
7135
|
-
/** Last-resort fallback when nothing else matches. */
|
|
7136
|
-
DeviceRole["GenericSensor"] = "generic-sensor";
|
|
7137
|
-
DeviceRole["NumericControl"] = "numeric-control";
|
|
7138
|
-
DeviceRole["SelectControl"] = "select-control";
|
|
7139
|
-
DeviceRole["TextControl"] = "text-control";
|
|
7140
|
-
DeviceRole["DateTimeControl"] = "datetime-control";
|
|
7141
|
-
/** Mobile push notifier (HA `notify.mobile_app_*`) — supports
|
|
7142
|
-
* rich features (image, priority, channel routing). */
|
|
7143
|
-
DeviceRole["MobilePushNotifier"] = "mobile-push-notifier";
|
|
7144
|
-
/** Chat / messaging service (HA `notify.telegram_*`,
|
|
7145
|
-
* `notify.discord_*`, etc.). */
|
|
7146
|
-
DeviceRole["MessagingNotifier"] = "messaging-notifier";
|
|
7147
|
-
/** Email-based delivery (HA `notify.smtp`, etc.). */
|
|
7148
|
-
DeviceRole["EmailNotifier"] = "email-notifier";
|
|
7149
|
-
/** Fallback when the notifier service name doesn't match a known
|
|
7150
|
-
* pattern. */
|
|
7151
|
-
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
7152
|
-
return DeviceRole;
|
|
7153
|
-
}({});
|
|
7154
7290
|
/**
|
|
7155
7291
|
* Accessory device helpers — shared across drivers.
|
|
7156
7292
|
*
|
|
@@ -7604,78 +7740,6 @@ var airQualitySensorCapability = {
|
|
|
7604
7740
|
runtimeState: AirQualitySensorStatusSchema
|
|
7605
7741
|
};
|
|
7606
7742
|
/**
|
|
7607
|
-
* Generic types for capability definitions.
|
|
7608
|
-
*
|
|
7609
|
-
* A capability is defined with Zod schemas for methods, events, and settings.
|
|
7610
|
-
* TypeScript types are inferred via z.infer<> — zero duplication.
|
|
7611
|
-
*
|
|
7612
|
-
* Pattern:
|
|
7613
|
-
* 1. Define Zod schemas for data, methods, settings
|
|
7614
|
-
* 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
|
|
7615
|
-
* 3. Export type IProvider = InferProvider<typeof capabilityDef>
|
|
7616
|
-
* 4. Addon implements IProvider
|
|
7617
|
-
* 5. Registry auto-mounts tRPC router from definition.methods
|
|
7618
|
-
*/
|
|
7619
|
-
/**
|
|
7620
|
-
* Output schema shared by the contribution + live methods.
|
|
7621
|
-
*
|
|
7622
|
-
* Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
|
|
7623
|
-
* tabs[]) without importing from `../interfaces/config-ui.js` — a
|
|
7624
|
-
* concrete-but-lenient Zod object keeps tRPC output inference happy
|
|
7625
|
-
* (using `z.unknown()` here collapses unrelated router branches to
|
|
7626
|
-
* `unknown` when the generator re-inlines the huge AppRouter type).
|
|
7627
|
-
*
|
|
7628
|
-
* `.passthrough()` on sections/fields accepts whatever FormBuilder
|
|
7629
|
-
* extensions the caller adds (showWhen, displayScale, …) without
|
|
7630
|
-
* rebuilding every time a new field kind is introduced.
|
|
7631
|
-
*/
|
|
7632
|
-
var ContributionSectionSchema = object({
|
|
7633
|
-
id: string(),
|
|
7634
|
-
title: string(),
|
|
7635
|
-
description: string().optional(),
|
|
7636
|
-
style: _enum(["card", "accordion"]).optional(),
|
|
7637
|
-
defaultCollapsed: boolean().optional(),
|
|
7638
|
-
columns: union([
|
|
7639
|
-
literal(1),
|
|
7640
|
-
literal(2),
|
|
7641
|
-
literal(3),
|
|
7642
|
-
literal(4)
|
|
7643
|
-
]).optional(),
|
|
7644
|
-
tab: string().optional(),
|
|
7645
|
-
location: _enum(["settings", "top-tab"]).optional(),
|
|
7646
|
-
order: number().optional(),
|
|
7647
|
-
fields: array(any())
|
|
7648
|
-
});
|
|
7649
|
-
object({
|
|
7650
|
-
tabs: array(object({
|
|
7651
|
-
id: string(),
|
|
7652
|
-
label: string(),
|
|
7653
|
-
icon: string(),
|
|
7654
|
-
order: number().optional()
|
|
7655
|
-
})).optional(),
|
|
7656
|
-
sections: array(ContributionSectionSchema)
|
|
7657
|
-
}).nullable();
|
|
7658
|
-
object({ deviceId: number() }), object({ deviceId: number() }), object({
|
|
7659
|
-
deviceId: number(),
|
|
7660
|
-
patch: record(string(), unknown())
|
|
7661
|
-
}), object({ success: literal(true) });
|
|
7662
|
-
object({ deviceId: number() }), unknown().nullable();
|
|
7663
|
-
/** Shorthand to define a method schema */
|
|
7664
|
-
function method(input, output, options) {
|
|
7665
|
-
return {
|
|
7666
|
-
input,
|
|
7667
|
-
output,
|
|
7668
|
-
kind: options?.kind ?? "query",
|
|
7669
|
-
auth: options?.auth ?? "protected",
|
|
7670
|
-
...options?.access !== void 0 ? { access: options.access } : {},
|
|
7671
|
-
timeoutMs: options?.timeoutMs
|
|
7672
|
-
};
|
|
7673
|
-
}
|
|
7674
|
-
/** Shorthand to define an event schema */
|
|
7675
|
-
function event(data) {
|
|
7676
|
-
return { data };
|
|
7677
|
-
}
|
|
7678
|
-
/**
|
|
7679
7743
|
* Alarm-panel cap. Models HA `alarm_control_panel.*` on
|
|
7680
7744
|
* `DeviceType.AlarmPanel`. State follows HA's canonical lifecycle
|
|
7681
7745
|
* across disarmed / armed_(home|away|night|vacation|custom_bypass) /
|
|
@@ -14147,9 +14211,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
14147
14211
|
limit: number().optional(),
|
|
14148
14212
|
tags: record(string(), string()).optional()
|
|
14149
14213
|
}), array(LogEntrySchema).readonly());
|
|
14150
|
-
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
14151
|
-
var VersionOutputSchema = object({ version: string() });
|
|
14152
|
-
method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
|
|
14153
14214
|
/**
|
|
14154
14215
|
* Zod schemas for persisted record types.
|
|
14155
14216
|
*
|
|
@@ -16516,7 +16577,7 @@ method(object({
|
|
|
16516
16577
|
}), _void(), {
|
|
16517
16578
|
kind: "mutation",
|
|
16518
16579
|
auth: "admin"
|
|
16519
|
-
}), 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({
|
|
16520
16581
|
deviceId: number(),
|
|
16521
16582
|
values: record(string(), unknown())
|
|
16522
16583
|
}), object({ success: literal(true) }), {
|
|
@@ -17198,7 +17259,20 @@ var DiskSpaceInfoSchema = object({
|
|
|
17198
17259
|
var PidResourceStatsSchema = object({
|
|
17199
17260
|
pid: number(),
|
|
17200
17261
|
cpu: number(),
|
|
17201
|
-
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()
|
|
17202
17276
|
});
|
|
17203
17277
|
var AddonInstanceSchema = object({
|
|
17204
17278
|
addonId: string(),
|
|
@@ -17247,6 +17321,17 @@ var KillProcessResultSchema = object({
|
|
|
17247
17321
|
reason: string().optional(),
|
|
17248
17322
|
signal: _enum(["SIGTERM", "SIGKILL"]).optional()
|
|
17249
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
|
+
});
|
|
17250
17335
|
var SystemMetricsSchema = object({
|
|
17251
17336
|
cpuPercent: number(),
|
|
17252
17337
|
memoryPercent: number(),
|
|
@@ -17260,6 +17345,9 @@ var SystemMetricsSchema = object({
|
|
|
17260
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, {
|
|
17261
17346
|
kind: "mutation",
|
|
17262
17347
|
auth: "admin"
|
|
17348
|
+
}), method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
|
|
17349
|
+
kind: "mutation",
|
|
17350
|
+
auth: "admin"
|
|
17263
17351
|
});
|
|
17264
17352
|
var PtzPresetSchema = object({
|
|
17265
17353
|
id: string(),
|
|
@@ -17626,63 +17714,6 @@ method(object({
|
|
|
17626
17714
|
auth: "admin"
|
|
17627
17715
|
});
|
|
17628
17716
|
/**
|
|
17629
|
-
* device-ops — device-scoped cap that unifies the per-IDevice operations
|
|
17630
|
-
* previously routed through the `.device-ops` Moleculer bridge service.
|
|
17631
|
-
*
|
|
17632
|
-
* Each worker that hosts live `IDevice` instances auto-registers a native
|
|
17633
|
-
* provider for this cap (per device) backed by its local
|
|
17634
|
-
* `DeviceRegistry`. Hub-side callers reach it transparently through
|
|
17635
|
-
* `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
|
|
17636
|
-
* `deviceId` + `nodeId` and dispatches through the standard cap-router,
|
|
17637
|
-
* so there's no parallel bridge path anymore.
|
|
17638
|
-
*
|
|
17639
|
-
* The surface is intentionally small — every method corresponds to a
|
|
17640
|
-
* single action on the live `IDevice` (or `ICameraDevice` for
|
|
17641
|
-
* `getStreamSources`). Richer orchestration (enable/disable with
|
|
17642
|
-
* integration plumbing, bulk updates) stays in the `device-manager` cap;
|
|
17643
|
-
* `device-ops` is the per-device primitive the device-manager routes to.
|
|
17644
|
-
*/
|
|
17645
|
-
var StreamSourceEntrySchema$1 = object({
|
|
17646
|
-
id: string(),
|
|
17647
|
-
label: string(),
|
|
17648
|
-
protocol: _enum([
|
|
17649
|
-
"rtsp",
|
|
17650
|
-
"rtmp",
|
|
17651
|
-
"annexb",
|
|
17652
|
-
"http-mjpeg",
|
|
17653
|
-
"webrtc",
|
|
17654
|
-
"custom"
|
|
17655
|
-
]),
|
|
17656
|
-
url: string().optional(),
|
|
17657
|
-
resolution: object({
|
|
17658
|
-
width: number(),
|
|
17659
|
-
height: number()
|
|
17660
|
-
}).optional(),
|
|
17661
|
-
fps: number().optional(),
|
|
17662
|
-
bitrate: number().optional(),
|
|
17663
|
-
codec: string().optional(),
|
|
17664
|
-
profileHint: CamProfileSchema.optional(),
|
|
17665
|
-
sdp: string().optional()
|
|
17666
|
-
});
|
|
17667
|
-
var ConfigEntrySchema$1 = object({
|
|
17668
|
-
key: string(),
|
|
17669
|
-
value: unknown()
|
|
17670
|
-
});
|
|
17671
|
-
var RawStateResultSchema = object({
|
|
17672
|
-
/** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
|
|
17673
|
-
source: string(),
|
|
17674
|
-
/** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
|
|
17675
|
-
data: record(string(), unknown())
|
|
17676
|
-
});
|
|
17677
|
-
method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema$1)), method(object({
|
|
17678
|
-
deviceId: number(),
|
|
17679
|
-
values: record(string(), unknown())
|
|
17680
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
17681
|
-
deviceId: number(),
|
|
17682
|
-
action: string().min(1),
|
|
17683
|
-
input: unknown()
|
|
17684
|
-
}), unknown(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
17685
|
-
/**
|
|
17686
17717
|
* camera-credentials — device-scoped cap exposing the camera's network
|
|
17687
17718
|
* + auth surface in a vendor-neutral shape.
|
|
17688
17719
|
*
|
|
@@ -21365,6 +21396,12 @@ Object.freeze({
|
|
|
21365
21396
|
addonId: null,
|
|
21366
21397
|
access: "view"
|
|
21367
21398
|
},
|
|
21399
|
+
"metricsProvider.dumpHeapSnapshot": {
|
|
21400
|
+
capName: "metrics-provider",
|
|
21401
|
+
capScope: "system",
|
|
21402
|
+
addonId: null,
|
|
21403
|
+
access: "create"
|
|
21404
|
+
},
|
|
21368
21405
|
"metricsProvider.getAddonStats": {
|
|
21369
21406
|
capName: "metrics-provider",
|
|
21370
21407
|
capScope: "system",
|
|
@@ -49539,4 +49576,4 @@ var HomematicProviderAddon = class extends BaseDeviceProvider {
|
|
|
49539
49576
|
}
|
|
49540
49577
|
};
|
|
49541
49578
|
//#endregion
|
|
49542
|
-
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 };
|