@camstack/addon-export-hap 1.2.181 → 1.2.183
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/CHANGELOG.md +12 -0
- package/README.md +19 -0
- package/dist/hap-export.addon.js +725 -20
- package/dist/hap-export.addon.mjs +725 -20
- package/package.json +4 -2
package/dist/hap-export.addon.js
CHANGED
|
@@ -49,7 +49,7 @@ let node_fs_promises = require("node:fs/promises");
|
|
|
49
49
|
node_fs_promises = __toESM(node_fs_promises, 1);
|
|
50
50
|
let node_events = require("node:events");
|
|
51
51
|
let node_dgram = require("node:dgram");
|
|
52
|
-
//#region ../types/dist/event-category-
|
|
52
|
+
//#region ../types/dist/event-category-CT-hz5Rb.mjs
|
|
53
53
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
54
54
|
EventCategory["SystemBoot"] = "system.boot";
|
|
55
55
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -375,6 +375,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
375
375
|
/** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
|
|
376
376
|
EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
|
|
377
377
|
/**
|
|
378
|
+
* A camera's package LLM confirm has failed closed three times in a row
|
|
379
|
+
* (D931, 2026-10-26). One edge per camera until
|
|
380
|
+
* {@link PipelinePackageLlmAnswered}.
|
|
381
|
+
*/
|
|
382
|
+
EventCategory["PipelinePackageLlmSilent"] = "pipeline.package-llm-silent";
|
|
383
|
+
/** The recovery edge of {@link PipelinePackageLlmSilent}: a confirm returned yes or no. */
|
|
384
|
+
EventCategory["PipelinePackageLlmAnswered"] = "pipeline.package-llm-answered";
|
|
385
|
+
/**
|
|
378
386
|
* Per-camera pipeline config was mutated by the orchestrator
|
|
379
387
|
* (a settings change via `setAgentInferenceDevices` /
|
|
380
388
|
* `setCameraStepToggle` / `setCameraStepSettings`). Orchestrator
|
|
@@ -5484,7 +5492,7 @@ var ZodIssueCode = {
|
|
|
5484
5492
|
var ZodFirstPartyTypeKind;
|
|
5485
5493
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5486
5494
|
//#endregion
|
|
5487
|
-
//#region ../types/dist/sleep-
|
|
5495
|
+
//#region ../types/dist/sleep-bykKrTgu.mjs
|
|
5488
5496
|
/**
|
|
5489
5497
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5490
5498
|
* window to float samples (D455).
|
|
@@ -8010,6 +8018,53 @@ var READING_QUANTITIES = [
|
|
|
8010
8018
|
];
|
|
8011
8019
|
var ReadingQuantitySchema = _enum(READING_QUANTITIES);
|
|
8012
8020
|
new Set(READING_QUANTITIES);
|
|
8021
|
+
/**
|
|
8022
|
+
* Stored unit symbol for a quantity. `none` means the number is dimensionless
|
|
8023
|
+
* (or an index / ratio / count). `device` means the cap has no single unit.
|
|
8024
|
+
*/
|
|
8025
|
+
var QUANTITY_BASE = {
|
|
8026
|
+
temperature: "°C",
|
|
8027
|
+
pressure: "hPa",
|
|
8028
|
+
speed: "m/s",
|
|
8029
|
+
precipitation: "mm",
|
|
8030
|
+
"precipitation-rate": "mm/h",
|
|
8031
|
+
length: "m",
|
|
8032
|
+
area: "m²",
|
|
8033
|
+
illuminance: "lx",
|
|
8034
|
+
irradiance: "W/m²",
|
|
8035
|
+
power: "W",
|
|
8036
|
+
energy: "kWh",
|
|
8037
|
+
voltage: "V",
|
|
8038
|
+
current: "A",
|
|
8039
|
+
"apparent-power": "VA",
|
|
8040
|
+
humidity: "%",
|
|
8041
|
+
percentage: "%",
|
|
8042
|
+
"concentration-volume": "ppm",
|
|
8043
|
+
"concentration-mass": "µg/m³",
|
|
8044
|
+
"concentration-ppb": "ppb",
|
|
8045
|
+
volume: "L",
|
|
8046
|
+
duration: "s",
|
|
8047
|
+
"duration-ms": "ms",
|
|
8048
|
+
information: "B",
|
|
8049
|
+
"sound-level": "dBFS",
|
|
8050
|
+
"signal-level": "dBm",
|
|
8051
|
+
"colour-temperature": "mired",
|
|
8052
|
+
angle: "°",
|
|
8053
|
+
bitrate: "kbps",
|
|
8054
|
+
rate: "fps",
|
|
8055
|
+
mass: "kg",
|
|
8056
|
+
index: "none",
|
|
8057
|
+
ratio: "none",
|
|
8058
|
+
count: "none",
|
|
8059
|
+
none: "none",
|
|
8060
|
+
device: "device"
|
|
8061
|
+
};
|
|
8062
|
+
/** The stored unit, or `undefined` when the quantity has no unit symbol. */
|
|
8063
|
+
function baseUnitOf(quantity) {
|
|
8064
|
+
const symbol = QUANTITY_BASE[quantity];
|
|
8065
|
+
if (symbol === "none" || symbol === "device") return void 0;
|
|
8066
|
+
return symbol;
|
|
8067
|
+
}
|
|
8013
8068
|
function readingMeta(quantity, extras) {
|
|
8014
8069
|
return {
|
|
8015
8070
|
quantity,
|
|
@@ -8618,6 +8673,8 @@ var CAP_NAMES = Object.freeze([
|
|
|
8618
8673
|
"filesystem-browse",
|
|
8619
8674
|
"flood",
|
|
8620
8675
|
"gas",
|
|
8676
|
+
"group-commands",
|
|
8677
|
+
"group-status",
|
|
8621
8678
|
"heating-valve",
|
|
8622
8679
|
"humidifier",
|
|
8623
8680
|
"humidity-sensor",
|
|
@@ -9436,6 +9493,20 @@ Object.freeze({
|
|
|
9436
9493
|
"path": "detected",
|
|
9437
9494
|
"valueType": "boolean"
|
|
9438
9495
|
}],
|
|
9496
|
+
"group-status": [
|
|
9497
|
+
{
|
|
9498
|
+
"path": "included",
|
|
9499
|
+
"valueType": "number"
|
|
9500
|
+
},
|
|
9501
|
+
{
|
|
9502
|
+
"path": "excluded",
|
|
9503
|
+
"valueType": "number"
|
|
9504
|
+
},
|
|
9505
|
+
{
|
|
9506
|
+
"path": "total",
|
|
9507
|
+
"valueType": "number"
|
|
9508
|
+
}
|
|
9509
|
+
],
|
|
9439
9510
|
"heating-valve": [{
|
|
9440
9511
|
"path": "position",
|
|
9441
9512
|
"valueType": "number"
|
|
@@ -10424,7 +10495,7 @@ object({
|
|
|
10424
10495
|
params: record(string(), union([string(), number()])).optional()
|
|
10425
10496
|
});
|
|
10426
10497
|
//#endregion
|
|
10427
|
-
//#region ../types/dist/err-msg-
|
|
10498
|
+
//#region ../types/dist/err-msg-DIorGYeC.mjs
|
|
10428
10499
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
10429
10500
|
DeviceType["Camera"] = "camera";
|
|
10430
10501
|
DeviceType["Hub"] = "hub";
|
|
@@ -10518,8 +10589,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
10518
10589
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
10519
10590
|
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
10520
10591
|
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
10521
|
-
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
10592
|
+
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
10593
|
+
* A plug-built dishwasher carries running-state and power instead. */
|
|
10522
10594
|
DeviceType["Dishwasher"] = "dishwasher";
|
|
10595
|
+
/** Washing machine. A plug-built one is running while its power stays
|
|
10596
|
+
* above a threshold. No program cap — that surface is the dishwasher's. */
|
|
10597
|
+
DeviceType["Washer"] = "washer";
|
|
10598
|
+
/** Tumble dryer. Same plug-built running surface as {@link Washer}. */
|
|
10599
|
+
DeviceType["Dryer"] = "dryer";
|
|
10523
10600
|
return DeviceType;
|
|
10524
10601
|
}({});
|
|
10525
10602
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -10777,7 +10854,7 @@ function errMsg$16(err) {
|
|
|
10777
10854
|
return String(err);
|
|
10778
10855
|
}
|
|
10779
10856
|
//#endregion
|
|
10780
|
-
//#region ../types/dist/composition-
|
|
10857
|
+
//#region ../types/dist/composition-B2rw5L29.mjs
|
|
10781
10858
|
var AUDIO_ENCODER_BY_CODEC = {
|
|
10782
10859
|
opus: "libopus",
|
|
10783
10860
|
aac: "aac",
|
|
@@ -12127,15 +12204,102 @@ function validateExpressionSource(src) {
|
|
|
12127
12204
|
}
|
|
12128
12205
|
return null;
|
|
12129
12206
|
}
|
|
12130
|
-
/**
|
|
12131
|
-
|
|
12132
|
-
|
|
12133
|
-
|
|
12207
|
+
/**
|
|
12208
|
+
* One power reading becomes a washer, dryer or dishwasher (D944 helper).
|
|
12209
|
+
*
|
|
12210
|
+
* Standby of the control board is under 5 W; a motor or a heater is far
|
|
12211
|
+
* above that, so 5 W is the line. A door lock or a short pump spike is not
|
|
12212
|
+
* a cycle, so running starts only after 30 s above the line.
|
|
12213
|
+
*
|
|
12214
|
+
* A wash, dry or dishwasher pause (soak, heat-wait, heater off between
|
|
12215
|
+
* bursts) lasts several minutes. Ending the cycle on the first dip would
|
|
12216
|
+
* report "finished" in the middle of the program, so the stop dwell is
|
|
12217
|
+
* 10 minutes on every type. The number is stored per type so one machine
|
|
12218
|
+
* can move later without moving the others.
|
|
12219
|
+
*/
|
|
12220
|
+
var APPLIANCE_TEMPLATE_ID = "appliance";
|
|
12221
|
+
var APPLIANCE_KINDS = [
|
|
12222
|
+
"washer",
|
|
12223
|
+
"dryer",
|
|
12224
|
+
"dishwasher"
|
|
12225
|
+
];
|
|
12226
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
12227
|
+
/**
|
|
12228
|
+
* A composition source identity: `(addonId, stableId)`, never a numeric device
|
|
12229
|
+
* id. Split out so helper schemas can name it without a cycle through
|
|
12230
|
+
* `composition.ts` (D659).
|
|
12231
|
+
*/
|
|
12134
12232
|
var CompositionSourceRefSchema = object({
|
|
12135
12233
|
/** The owning addon; `stableId` is unique only within it. */
|
|
12136
12234
|
addonId: string().min(1),
|
|
12137
12235
|
stableId: string().min(1)
|
|
12138
12236
|
});
|
|
12237
|
+
var GROUP_TEMPLATE_IDS = [
|
|
12238
|
+
"temperature",
|
|
12239
|
+
"humidity",
|
|
12240
|
+
"pressure",
|
|
12241
|
+
"illuminance",
|
|
12242
|
+
"power",
|
|
12243
|
+
"energy",
|
|
12244
|
+
"battery",
|
|
12245
|
+
"numeric",
|
|
12246
|
+
"motion",
|
|
12247
|
+
"contact",
|
|
12248
|
+
"leak",
|
|
12249
|
+
"smoke",
|
|
12250
|
+
"occupancy",
|
|
12251
|
+
"binary",
|
|
12252
|
+
"switch",
|
|
12253
|
+
"light"
|
|
12254
|
+
];
|
|
12255
|
+
var NUMERIC_AGGREGATES = [
|
|
12256
|
+
"mean",
|
|
12257
|
+
"median",
|
|
12258
|
+
"min",
|
|
12259
|
+
"max",
|
|
12260
|
+
"sum"
|
|
12261
|
+
];
|
|
12262
|
+
var BINARY_AGGREGATES = ["any", "all"];
|
|
12263
|
+
/** How an actuator group decides it is on. Unknown members never count as off. */
|
|
12264
|
+
var ACTIVE_CRITERIA = ["at-least-one", "all"];
|
|
12265
|
+
var AGGREGATE_REDUCERS = [
|
|
12266
|
+
"mean",
|
|
12267
|
+
"median",
|
|
12268
|
+
"min",
|
|
12269
|
+
"max",
|
|
12270
|
+
"sum",
|
|
12271
|
+
"any",
|
|
12272
|
+
"all"
|
|
12273
|
+
];
|
|
12274
|
+
var GroupTemplateIdSchema = _enum(GROUP_TEMPLATE_IDS);
|
|
12275
|
+
var AggregateReducerSchema = _enum(AGGREGATE_REDUCERS);
|
|
12276
|
+
var ActiveCriterionSchema = _enum(ACTIVE_CRITERIA);
|
|
12277
|
+
/** One member. The field is stored so occupancy can name motion or binary. */
|
|
12278
|
+
var HelperMemberSchema = object({
|
|
12279
|
+
source: CompositionSourceRefSchema,
|
|
12280
|
+
cap: string().min(1),
|
|
12281
|
+
fieldPath: string().min(1)
|
|
12282
|
+
});
|
|
12283
|
+
var HelperSpecSchema = discriminatedUnion("kind", [object({
|
|
12284
|
+
kind: literal("group"),
|
|
12285
|
+
templateId: GroupTemplateIdSchema,
|
|
12286
|
+
aggregate: AggregateReducerSchema,
|
|
12287
|
+
members: array(HelperMemberSchema).min(1).max(64),
|
|
12288
|
+
/** Actuator groups only. Readings leave this unset. */
|
|
12289
|
+
active: ActiveCriterionSchema.optional()
|
|
12290
|
+
}), object({
|
|
12291
|
+
kind: literal("appliance"),
|
|
12292
|
+
templateId: literal(APPLIANCE_TEMPLATE_ID),
|
|
12293
|
+
appliance: _enum(APPLIANCE_KINDS),
|
|
12294
|
+
thresholdWatts: number().positive(),
|
|
12295
|
+
startDwellMs: number().int().nonnegative(),
|
|
12296
|
+
stopDwellMs: number().int().nonnegative(),
|
|
12297
|
+
member: HelperMemberSchema
|
|
12298
|
+
})]);
|
|
12299
|
+
/** A composed device's stableId is this prefix plus the block id. */
|
|
12300
|
+
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
12301
|
+
/** Longest snippet a `code` source may carry (slice 4). */
|
|
12302
|
+
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
12139
12303
|
/** One field of one capability of one source device. */
|
|
12140
12304
|
var CompositionFieldReadSchema = object({
|
|
12141
12305
|
source: CompositionSourceRefSchema,
|
|
@@ -12179,7 +12343,33 @@ var CompositionCodeSourceSchema = object({
|
|
|
12179
12343
|
var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
12180
12344
|
CompositionFromSourceSchema,
|
|
12181
12345
|
CompositionExpressionSourceSchema,
|
|
12182
|
-
CompositionCodeSourceSchema
|
|
12346
|
+
CompositionCodeSourceSchema,
|
|
12347
|
+
object({
|
|
12348
|
+
kind: literal("aggregate"),
|
|
12349
|
+
reducer: _enum([
|
|
12350
|
+
"mean",
|
|
12351
|
+
"median",
|
|
12352
|
+
"min",
|
|
12353
|
+
"max",
|
|
12354
|
+
"sum",
|
|
12355
|
+
"any",
|
|
12356
|
+
"all"
|
|
12357
|
+
]),
|
|
12358
|
+
reads: array(CompositionFieldReadSchema).min(1).max(64),
|
|
12359
|
+
/** `value` is the reading; the others are the member counts. */
|
|
12360
|
+
publish: _enum([
|
|
12361
|
+
"value",
|
|
12362
|
+
"included",
|
|
12363
|
+
"excluded",
|
|
12364
|
+
"total"
|
|
12365
|
+
]),
|
|
12366
|
+
/** What a `value` publish does when nobody is included. Counts ignore this. */
|
|
12367
|
+
empty: _enum([
|
|
12368
|
+
"null",
|
|
12369
|
+
"omit",
|
|
12370
|
+
"offline"
|
|
12371
|
+
])
|
|
12372
|
+
})
|
|
12183
12373
|
]);
|
|
12184
12374
|
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
12185
12375
|
kind: literal("forward"),
|
|
@@ -12225,7 +12415,13 @@ var CompositionSchema = object({
|
|
|
12225
12415
|
kind: literal("existing"),
|
|
12226
12416
|
device: CompositionSourceRefSchema
|
|
12227
12417
|
})]),
|
|
12228
|
-
features: array(CompositionFeatureSchema).min(1).max(16)
|
|
12418
|
+
features: array(CompositionFeatureSchema).min(1).max(16),
|
|
12419
|
+
/**
|
|
12420
|
+
* Present when the block is a helper template. Absent on a free
|
|
12421
|
+
* composition (the room example, device 4603). The editor reads this,
|
|
12422
|
+
* never the compiled features.
|
|
12423
|
+
*/
|
|
12424
|
+
helper: HelperSpecSchema.optional()
|
|
12229
12425
|
}).superRefine((composition, ctx) => {
|
|
12230
12426
|
const seen = /* @__PURE__ */ new Set();
|
|
12231
12427
|
composition.features.forEach((feature, index) => {
|
|
@@ -18552,7 +18748,10 @@ var CompositionProblemSchema = object({
|
|
|
18552
18748
|
"target-missing",
|
|
18553
18749
|
"target-unreadable",
|
|
18554
18750
|
"not-replaceable",
|
|
18555
|
-
"native-capability-replace"
|
|
18751
|
+
"native-capability-replace",
|
|
18752
|
+
"mixed-quantity",
|
|
18753
|
+
"helper-mismatch",
|
|
18754
|
+
"member-constraint"
|
|
18556
18755
|
]),
|
|
18557
18756
|
path: string(),
|
|
18558
18757
|
message: string()
|
|
@@ -18573,7 +18772,8 @@ var CompositionUnavailableModeSchema = _enum([
|
|
|
18573
18772
|
"null",
|
|
18574
18773
|
"offline",
|
|
18575
18774
|
"unknown",
|
|
18576
|
-
"release"
|
|
18775
|
+
"release",
|
|
18776
|
+
"omit"
|
|
18577
18777
|
]);
|
|
18578
18778
|
/**
|
|
18579
18779
|
* `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
|
|
@@ -18787,6 +18987,275 @@ Object.freeze({
|
|
|
18787
18987
|
result: ["number", "null"]
|
|
18788
18988
|
}
|
|
18789
18989
|
});
|
|
18990
|
+
/**
|
|
18991
|
+
* One catalog row per base reading a group helper can build (D944 §3).
|
|
18992
|
+
* Data, not a form default written into the block.
|
|
18993
|
+
*/
|
|
18994
|
+
var NOW = {
|
|
18995
|
+
fieldPath: "lastFetchedAt",
|
|
18996
|
+
expr: "now"
|
|
18997
|
+
};
|
|
18998
|
+
var CHANGED = {
|
|
18999
|
+
fieldPath: "lastChangedAt",
|
|
19000
|
+
expr: "now"
|
|
19001
|
+
};
|
|
19002
|
+
function numeric(input) {
|
|
19003
|
+
return {
|
|
19004
|
+
...input,
|
|
19005
|
+
family: "numeric",
|
|
19006
|
+
deviceType: DeviceType.Sensor,
|
|
19007
|
+
memberDeviceType: DeviceType.Sensor,
|
|
19008
|
+
commandCaps: [],
|
|
19009
|
+
baseUnit: baseUnitOf(input.quantity),
|
|
19010
|
+
aggregates: NUMERIC_AGGREGATES,
|
|
19011
|
+
accept: [{
|
|
19012
|
+
cap: input.outputCap,
|
|
19013
|
+
fieldPath: input.outputField
|
|
19014
|
+
}]
|
|
19015
|
+
};
|
|
19016
|
+
}
|
|
19017
|
+
function binary(input) {
|
|
19018
|
+
return {
|
|
19019
|
+
...input,
|
|
19020
|
+
family: "binary",
|
|
19021
|
+
deviceType: DeviceType.Sensor,
|
|
19022
|
+
memberDeviceType: DeviceType.Sensor,
|
|
19023
|
+
commandCaps: [],
|
|
19024
|
+
quantity: "none",
|
|
19025
|
+
baseUnit: void 0,
|
|
19026
|
+
aggregates: BINARY_AGGREGATES,
|
|
19027
|
+
empty: "offline"
|
|
19028
|
+
};
|
|
19029
|
+
}
|
|
19030
|
+
var GROUP_TEMPLATES = [
|
|
19031
|
+
numeric({
|
|
19032
|
+
id: "temperature",
|
|
19033
|
+
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
19034
|
+
role: DeviceRole.TemperatureSensor,
|
|
19035
|
+
outputCap: "temperature-sensor",
|
|
19036
|
+
outputField: "celsius",
|
|
19037
|
+
quantity: "temperature",
|
|
19038
|
+
defaultAggregate: "mean",
|
|
19039
|
+
empty: "null",
|
|
19040
|
+
companions: [NOW]
|
|
19041
|
+
}),
|
|
19042
|
+
numeric({
|
|
19043
|
+
id: "humidity",
|
|
19044
|
+
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
19045
|
+
role: DeviceRole.HumiditySensor,
|
|
19046
|
+
outputCap: "humidity-sensor",
|
|
19047
|
+
outputField: "percent",
|
|
19048
|
+
quantity: "humidity",
|
|
19049
|
+
defaultAggregate: "mean",
|
|
19050
|
+
empty: "null",
|
|
19051
|
+
companions: [NOW]
|
|
19052
|
+
}),
|
|
19053
|
+
numeric({
|
|
19054
|
+
id: "pressure",
|
|
19055
|
+
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
19056
|
+
role: DeviceRole.PressureSensor,
|
|
19057
|
+
outputCap: "pressure-sensor",
|
|
19058
|
+
outputField: "hpa",
|
|
19059
|
+
quantity: "pressure",
|
|
19060
|
+
defaultAggregate: "mean",
|
|
19061
|
+
empty: "null",
|
|
19062
|
+
companions: [NOW]
|
|
19063
|
+
}),
|
|
19064
|
+
numeric({
|
|
19065
|
+
id: "illuminance",
|
|
19066
|
+
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
19067
|
+
role: DeviceRole.AmbientLightSensor,
|
|
19068
|
+
outputCap: "ambient-light-sensor",
|
|
19069
|
+
outputField: "lux",
|
|
19070
|
+
quantity: "illuminance",
|
|
19071
|
+
defaultAggregate: "mean",
|
|
19072
|
+
empty: "null",
|
|
19073
|
+
companions: [NOW]
|
|
19074
|
+
}),
|
|
19075
|
+
numeric({
|
|
19076
|
+
id: "power",
|
|
19077
|
+
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
19078
|
+
role: DeviceRole.PowerSensor,
|
|
19079
|
+
outputCap: "power-meter",
|
|
19080
|
+
outputField: "watts",
|
|
19081
|
+
quantity: "power",
|
|
19082
|
+
defaultAggregate: "sum",
|
|
19083
|
+
empty: "omit",
|
|
19084
|
+
companions: [NOW]
|
|
19085
|
+
}),
|
|
19086
|
+
numeric({
|
|
19087
|
+
id: "energy",
|
|
19088
|
+
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
19089
|
+
role: DeviceRole.EnergySensor,
|
|
19090
|
+
outputCap: "power-meter",
|
|
19091
|
+
outputField: "kwhTotal",
|
|
19092
|
+
quantity: "energy",
|
|
19093
|
+
defaultAggregate: "sum",
|
|
19094
|
+
empty: "omit",
|
|
19095
|
+
companions: [NOW]
|
|
19096
|
+
}),
|
|
19097
|
+
numeric({
|
|
19098
|
+
id: "battery",
|
|
19099
|
+
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
19100
|
+
role: DeviceRole.BatterySensor,
|
|
19101
|
+
outputCap: "battery",
|
|
19102
|
+
outputField: "percentage",
|
|
19103
|
+
quantity: "percentage",
|
|
19104
|
+
defaultAggregate: "mean",
|
|
19105
|
+
empty: "null",
|
|
19106
|
+
companions: [
|
|
19107
|
+
{
|
|
19108
|
+
fieldPath: "charging",
|
|
19109
|
+
expr: "\"unknown\""
|
|
19110
|
+
},
|
|
19111
|
+
{
|
|
19112
|
+
fieldPath: "sleeping",
|
|
19113
|
+
expr: "false"
|
|
19114
|
+
},
|
|
19115
|
+
{
|
|
19116
|
+
fieldPath: "lastUpdated",
|
|
19117
|
+
expr: "now"
|
|
19118
|
+
}
|
|
19119
|
+
]
|
|
19120
|
+
}),
|
|
19121
|
+
numeric({
|
|
19122
|
+
id: "numeric",
|
|
19123
|
+
summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
|
|
19124
|
+
role: DeviceRole.NumericSensor,
|
|
19125
|
+
outputCap: "numeric-sensor",
|
|
19126
|
+
outputField: "value",
|
|
19127
|
+
quantity: "device",
|
|
19128
|
+
defaultAggregate: "mean",
|
|
19129
|
+
empty: "null",
|
|
19130
|
+
companions: [NOW]
|
|
19131
|
+
}),
|
|
19132
|
+
binary({
|
|
19133
|
+
id: "motion",
|
|
19134
|
+
summary: "Any or all motion. Offline and unknown members are left out, never read as off. Nobody reporting takes the device offline.",
|
|
19135
|
+
role: DeviceRole.MotionSensor,
|
|
19136
|
+
outputCap: "motion",
|
|
19137
|
+
outputField: "detected",
|
|
19138
|
+
defaultAggregate: "any",
|
|
19139
|
+
accept: [{
|
|
19140
|
+
cap: "motion",
|
|
19141
|
+
fieldPath: "detected"
|
|
19142
|
+
}],
|
|
19143
|
+
companions: [{
|
|
19144
|
+
fieldPath: "lastDetectedAt",
|
|
19145
|
+
expr: "null"
|
|
19146
|
+
}, {
|
|
19147
|
+
fieldPath: "autoClearAfterMs",
|
|
19148
|
+
expr: "null"
|
|
19149
|
+
}]
|
|
19150
|
+
}),
|
|
19151
|
+
binary({
|
|
19152
|
+
id: "contact",
|
|
19153
|
+
summary: "Any or all open contacts. Offline and unknown members are left out, never read as closed.",
|
|
19154
|
+
role: DeviceRole.ContactSensor,
|
|
19155
|
+
outputCap: "contact",
|
|
19156
|
+
outputField: "entryOpen",
|
|
19157
|
+
defaultAggregate: "any",
|
|
19158
|
+
accept: [{
|
|
19159
|
+
cap: "contact",
|
|
19160
|
+
fieldPath: "entryOpen"
|
|
19161
|
+
}],
|
|
19162
|
+
companions: [CHANGED]
|
|
19163
|
+
}),
|
|
19164
|
+
binary({
|
|
19165
|
+
id: "leak",
|
|
19166
|
+
summary: "Any or all leak detections. Offline and unknown members are left out, never read as dry.",
|
|
19167
|
+
role: DeviceRole.LeakSensor,
|
|
19168
|
+
outputCap: "flood",
|
|
19169
|
+
outputField: "flooded",
|
|
19170
|
+
defaultAggregate: "any",
|
|
19171
|
+
accept: [{
|
|
19172
|
+
cap: "flood",
|
|
19173
|
+
fieldPath: "flooded"
|
|
19174
|
+
}],
|
|
19175
|
+
companions: [CHANGED]
|
|
19176
|
+
}),
|
|
19177
|
+
binary({
|
|
19178
|
+
id: "smoke",
|
|
19179
|
+
summary: "Any or all smoke detections. Offline and unknown members are left out, never read as clear.",
|
|
19180
|
+
role: DeviceRole.SmokeSensor,
|
|
19181
|
+
outputCap: "smoke",
|
|
19182
|
+
outputField: "detected",
|
|
19183
|
+
defaultAggregate: "any",
|
|
19184
|
+
accept: [{
|
|
19185
|
+
cap: "smoke",
|
|
19186
|
+
fieldPath: "detected"
|
|
19187
|
+
}],
|
|
19188
|
+
companions: [CHANGED]
|
|
19189
|
+
}),
|
|
19190
|
+
binary({
|
|
19191
|
+
id: "occupancy",
|
|
19192
|
+
summary: "Any or all of motion or binary sensors, published as a binary. Presence zones are not aggregated. Nobody reporting is offline, not off.",
|
|
19193
|
+
role: DeviceRole.BinarySensor,
|
|
19194
|
+
outputCap: "binary",
|
|
19195
|
+
outputField: "on",
|
|
19196
|
+
defaultAggregate: "any",
|
|
19197
|
+
accept: [{
|
|
19198
|
+
cap: "motion",
|
|
19199
|
+
fieldPath: "detected"
|
|
19200
|
+
}, {
|
|
19201
|
+
cap: "binary",
|
|
19202
|
+
fieldPath: "on"
|
|
19203
|
+
}],
|
|
19204
|
+
companions: [CHANGED]
|
|
19205
|
+
}),
|
|
19206
|
+
binary({
|
|
19207
|
+
id: "binary",
|
|
19208
|
+
summary: "Any or all generic binary sensors. Offline and unknown members are left out, never read as off.",
|
|
19209
|
+
role: DeviceRole.BinarySensor,
|
|
19210
|
+
outputCap: "binary",
|
|
19211
|
+
outputField: "on",
|
|
19212
|
+
defaultAggregate: "any",
|
|
19213
|
+
accept: [{
|
|
19214
|
+
cap: "binary",
|
|
19215
|
+
fieldPath: "on"
|
|
19216
|
+
}],
|
|
19217
|
+
companions: [CHANGED]
|
|
19218
|
+
}),
|
|
19219
|
+
actuator({
|
|
19220
|
+
id: "switch",
|
|
19221
|
+
summary: "On when at least one switch is on, or when all of them are. Offline and unknown members are left out of that decision, never read as off, and still receive the command.",
|
|
19222
|
+
deviceType: DeviceType.Switch,
|
|
19223
|
+
outputCap: "switch",
|
|
19224
|
+
commandCaps: ["switch"]
|
|
19225
|
+
}),
|
|
19226
|
+
actuator({
|
|
19227
|
+
id: "light",
|
|
19228
|
+
summary: "On when at least one light is on, or when all of them are. Brightness and colour are offered only when every member has them. A command is not sent to a member that lacks it.",
|
|
19229
|
+
deviceType: DeviceType.Light,
|
|
19230
|
+
outputCap: "switch",
|
|
19231
|
+
commandCaps: [
|
|
19232
|
+
"switch",
|
|
19233
|
+
"brightness",
|
|
19234
|
+
"color"
|
|
19235
|
+
]
|
|
19236
|
+
})
|
|
19237
|
+
];
|
|
19238
|
+
function actuator(input) {
|
|
19239
|
+
return {
|
|
19240
|
+
...input,
|
|
19241
|
+
family: "actuator",
|
|
19242
|
+
role: void 0,
|
|
19243
|
+
memberDeviceType: input.deviceType,
|
|
19244
|
+
outputField: "on",
|
|
19245
|
+
quantity: "none",
|
|
19246
|
+
baseUnit: void 0,
|
|
19247
|
+
aggregates: BINARY_AGGREGATES,
|
|
19248
|
+
defaultAggregate: "any",
|
|
19249
|
+
empty: "offline",
|
|
19250
|
+
accept: [{
|
|
19251
|
+
cap: "switch",
|
|
19252
|
+
fieldPath: "on"
|
|
19253
|
+
}],
|
|
19254
|
+
companions: [CHANGED]
|
|
19255
|
+
};
|
|
19256
|
+
}
|
|
19257
|
+
new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
|
|
19258
|
+
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
18790
19259
|
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
18791
19260
|
/**
|
|
18792
19261
|
* What a composition may BUILD on a device type (G2, D676): the caps a new
|
|
@@ -45434,6 +45903,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
45434
45903
|
"detection-blind",
|
|
45435
45904
|
"motion-noisy",
|
|
45436
45905
|
"motion-calm",
|
|
45906
|
+
"package-llm-silent",
|
|
45907
|
+
"package-llm-answered",
|
|
45437
45908
|
"recording-stalled",
|
|
45438
45909
|
"recording-healthy",
|
|
45439
45910
|
"recording-degraded",
|
|
@@ -56641,6 +57112,28 @@ var PackageVersionInfoSchema = object({
|
|
|
56641
57112
|
deprecated: string().optional(),
|
|
56642
57113
|
distTags: array(string()).readonly()
|
|
56643
57114
|
});
|
|
57115
|
+
/**
|
|
57116
|
+
* One published document. `ok` is markdown from the registry. `missing` means
|
|
57117
|
+
* the registry answered and the file was not there. `error` is a registry or
|
|
57118
|
+
* tarball failure — never an empty string standing in for either.
|
|
57119
|
+
*/
|
|
57120
|
+
var PackageDocBodySchema = discriminatedUnion("status", [
|
|
57121
|
+
object({
|
|
57122
|
+
status: literal("ok"),
|
|
57123
|
+
markdown: string()
|
|
57124
|
+
}),
|
|
57125
|
+
object({ status: literal("missing") }),
|
|
57126
|
+
object({
|
|
57127
|
+
status: literal("error"),
|
|
57128
|
+
message: string()
|
|
57129
|
+
})
|
|
57130
|
+
]);
|
|
57131
|
+
var PackageDocsSchema = object({
|
|
57132
|
+
name: string(),
|
|
57133
|
+
version: string(),
|
|
57134
|
+
readme: PackageDocBodySchema,
|
|
57135
|
+
changelog: PackageDocBodySchema
|
|
57136
|
+
});
|
|
56644
57137
|
var SearchResultSchema = object({
|
|
56645
57138
|
name: string(),
|
|
56646
57139
|
version: string(),
|
|
@@ -56859,7 +57352,10 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56859
57352
|
}), object({ success: literal(true) }), {
|
|
56860
57353
|
kind: "mutation",
|
|
56861
57354
|
auth: "admin"
|
|
56862
|
-
}), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
|
|
57355
|
+
}), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
|
|
57356
|
+
name: string().min(1),
|
|
57357
|
+
version: string().min(1).optional()
|
|
57358
|
+
}), PackageDocsSchema, { auth: "admin" }), method(object({ addonId: string() }), RestartAddonResultSchema, {
|
|
56863
57359
|
kind: "mutation",
|
|
56864
57360
|
auth: "admin"
|
|
56865
57361
|
}), method(object({ packageName: string() }), object({ success: literal(true) }), {
|
|
@@ -58909,6 +59405,36 @@ object({
|
|
|
58909
59405
|
lastChangedAt: number()
|
|
58910
59406
|
});
|
|
58911
59407
|
DeviceType.Sensor;
|
|
59408
|
+
object({
|
|
59409
|
+
/** One row per member that has been commanded. A later command replaces that member's row. */
|
|
59410
|
+
results: array(object({
|
|
59411
|
+
deviceId: number().int().nonnegative(),
|
|
59412
|
+
cap: string().min(1),
|
|
59413
|
+
method: string().min(1),
|
|
59414
|
+
ok: boolean(),
|
|
59415
|
+
error: string().optional(),
|
|
59416
|
+
/** Ms epoch of the attempt. */
|
|
59417
|
+
at: number()
|
|
59418
|
+
})) });
|
|
59419
|
+
DeviceType.Switch, DeviceType.Light;
|
|
59420
|
+
object({
|
|
59421
|
+
/** Members whose current value entered the aggregate. */
|
|
59422
|
+
included: number().int().nonnegative().meta(readingMeta("count", {
|
|
59423
|
+
precision: 0,
|
|
59424
|
+
label: "Reporting"
|
|
59425
|
+
})),
|
|
59426
|
+
/** Members left out: offline, unknown, or not a finite reading (D393). */
|
|
59427
|
+
excluded: number().int().nonnegative().meta(readingMeta("count", {
|
|
59428
|
+
precision: 0,
|
|
59429
|
+
label: "Excluded"
|
|
59430
|
+
})),
|
|
59431
|
+
/** `included` + `excluded`. */
|
|
59432
|
+
total: number().int().nonnegative().meta(readingMeta("count", {
|
|
59433
|
+
precision: 0,
|
|
59434
|
+
label: "Members"
|
|
59435
|
+
}))
|
|
59436
|
+
});
|
|
59437
|
+
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light;
|
|
58912
59438
|
object({
|
|
58913
59439
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
58914
59440
|
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
@@ -61748,7 +62274,7 @@ object({
|
|
|
61748
62274
|
/** Ms epoch when the slice was last updated. */
|
|
61749
62275
|
lastFetchedAt: number()
|
|
61750
62276
|
});
|
|
61751
|
-
DeviceType.Sensor;
|
|
62277
|
+
DeviceType.Sensor, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
61752
62278
|
/**
|
|
61753
62279
|
* Presence cap. Models HA `person.*` and `device_tracker.*` entities
|
|
61754
62280
|
* on `DeviceType.Presence`. Read-only — no setters: presence is
|
|
@@ -62195,7 +62721,7 @@ object({
|
|
|
62195
62721
|
phase: string().nullable()
|
|
62196
62722
|
});
|
|
62197
62723
|
Object.values(DeviceType);
|
|
62198
|
-
DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
62724
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
62199
62725
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
62200
62726
|
kind: "mutation",
|
|
62201
62727
|
auth: "admin"
|
|
@@ -65948,7 +66474,7 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
|
|
|
65948
66474
|
auth: "admin"
|
|
65949
66475
|
});
|
|
65950
66476
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
65951
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Camera, DeviceType.Camera, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
66477
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
65952
66478
|
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
65953
66479
|
DeviceRole.BinarySensor, DeviceRole.MotionSensor;
|
|
65954
66480
|
new Set(CAP_NAMES);
|
|
@@ -66001,7 +66527,7 @@ var AccessoryKind = {
|
|
|
66001
66527
|
PrivacyMask: DeviceRole.PrivacyMask
|
|
66002
66528
|
};
|
|
66003
66529
|
AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
|
|
66004
|
-
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher;
|
|
66530
|
+
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer;
|
|
66005
66531
|
new Set(Object.values(DeviceType));
|
|
66006
66532
|
Object.freeze({
|
|
66007
66533
|
"accessories.getStatus": {
|
|
@@ -66109,6 +66635,13 @@ Object.freeze({
|
|
|
66109
66635
|
access: "view",
|
|
66110
66636
|
role: "admin"
|
|
66111
66637
|
},
|
|
66638
|
+
"addons.getPackageDocs": {
|
|
66639
|
+
capName: "addons",
|
|
66640
|
+
capScope: "system",
|
|
66641
|
+
addonId: null,
|
|
66642
|
+
access: "view",
|
|
66643
|
+
role: "admin"
|
|
66644
|
+
},
|
|
66112
66645
|
"addons.getVersions": {
|
|
66113
66646
|
capName: "addons",
|
|
66114
66647
|
capScope: "system",
|
|
@@ -69217,6 +69750,20 @@ Object.freeze({
|
|
|
69217
69750
|
access: "view",
|
|
69218
69751
|
role: "viewer"
|
|
69219
69752
|
},
|
|
69753
|
+
"groupCommands.getStatus": {
|
|
69754
|
+
capName: "group-commands",
|
|
69755
|
+
capScope: "device",
|
|
69756
|
+
addonId: null,
|
|
69757
|
+
access: "view",
|
|
69758
|
+
role: "viewer"
|
|
69759
|
+
},
|
|
69760
|
+
"groupStatus.getStatus": {
|
|
69761
|
+
capName: "group-status",
|
|
69762
|
+
capScope: "device",
|
|
69763
|
+
addonId: null,
|
|
69764
|
+
access: "view",
|
|
69765
|
+
role: "viewer"
|
|
69766
|
+
},
|
|
69220
69767
|
"heatingValve.getStatus": {
|
|
69221
69768
|
capName: "heating-valve",
|
|
69222
69769
|
capScope: "device",
|
|
@@ -78267,7 +78814,39 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
78267
78814
|
phrase: t("When {device} finishes", "Quando {device} finisce"),
|
|
78268
78815
|
icon: "square"
|
|
78269
78816
|
}
|
|
78270
|
-
}
|
|
78817
|
+
},
|
|
78818
|
+
overrides: { byType: {
|
|
78819
|
+
[DeviceType.Washer]: {
|
|
78820
|
+
state: { running: {
|
|
78821
|
+
whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
|
|
78822
|
+
whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
|
|
78823
|
+
} },
|
|
78824
|
+
events: {
|
|
78825
|
+
onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
|
|
78826
|
+
onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
|
|
78827
|
+
}
|
|
78828
|
+
},
|
|
78829
|
+
[DeviceType.Dryer]: {
|
|
78830
|
+
state: { running: {
|
|
78831
|
+
whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
|
|
78832
|
+
whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
|
|
78833
|
+
} },
|
|
78834
|
+
events: {
|
|
78835
|
+
onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
|
|
78836
|
+
onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
|
|
78837
|
+
}
|
|
78838
|
+
},
|
|
78839
|
+
[DeviceType.Dishwasher]: {
|
|
78840
|
+
state: { running: {
|
|
78841
|
+
whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
|
|
78842
|
+
whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
|
|
78843
|
+
} },
|
|
78844
|
+
events: {
|
|
78845
|
+
onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
|
|
78846
|
+
onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
|
|
78847
|
+
}
|
|
78848
|
+
}
|
|
78849
|
+
} }
|
|
78271
78850
|
},
|
|
78272
78851
|
update: {
|
|
78273
78852
|
scope: "device",
|
|
@@ -79039,6 +79618,37 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79039
79618
|
icon: "flame"
|
|
79040
79619
|
}]
|
|
79041
79620
|
},
|
|
79621
|
+
"group-commands": {
|
|
79622
|
+
scope: "device",
|
|
79623
|
+
noun: t("Group command", "Comando di gruppo")
|
|
79624
|
+
},
|
|
79625
|
+
"group-status": {
|
|
79626
|
+
scope: "device",
|
|
79627
|
+
noun: t("Group", "Gruppo"),
|
|
79628
|
+
state: [
|
|
79629
|
+
{
|
|
79630
|
+
kind: "numeric",
|
|
79631
|
+
field: "included",
|
|
79632
|
+
quantity: t("the members reporting", "i membri che rispondono"),
|
|
79633
|
+
label: t("Reporting", "Rispondono"),
|
|
79634
|
+
icon: "users"
|
|
79635
|
+
},
|
|
79636
|
+
{
|
|
79637
|
+
kind: "numeric",
|
|
79638
|
+
field: "excluded",
|
|
79639
|
+
quantity: t("the members left out", "i membri esclusi"),
|
|
79640
|
+
label: t("Excluded", "Esclusi"),
|
|
79641
|
+
icon: "users"
|
|
79642
|
+
},
|
|
79643
|
+
{
|
|
79644
|
+
kind: "numeric",
|
|
79645
|
+
field: "total",
|
|
79646
|
+
quantity: t("the member count", "il numero di membri"),
|
|
79647
|
+
label: t("Members", "Membri"),
|
|
79648
|
+
icon: "sigma"
|
|
79649
|
+
}
|
|
79650
|
+
]
|
|
79651
|
+
},
|
|
79042
79652
|
"humidity-sensor": {
|
|
79043
79653
|
scope: "device",
|
|
79044
79654
|
noun: t("Humidity", "Umidità"),
|
|
@@ -79536,8 +80146,72 @@ function projectAction(cap, action) {
|
|
|
79536
80146
|
};
|
|
79537
80147
|
}
|
|
79538
80148
|
Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
|
|
79539
|
-
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher;
|
|
80149
|
+
DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer;
|
|
79540
80150
|
DeviceFeature.BatteryOperated;
|
|
80151
|
+
/**
|
|
80152
|
+
* How a washer, dryer or dishwasher leaves CamStack.
|
|
80153
|
+
*
|
|
80154
|
+
* Home Assistant has no laundry domain: the device is offered, and what
|
|
80155
|
+
* travels is its power reading. The others have a laundry type that this
|
|
80156
|
+
* export cannot honour yet, so they are named and withheld.
|
|
80157
|
+
*/
|
|
80158
|
+
var PLUG_APPLIANCE_TYPES = [
|
|
80159
|
+
DeviceType.Washer,
|
|
80160
|
+
DeviceType.Dryer,
|
|
80161
|
+
DeviceType.Dishwasher
|
|
80162
|
+
];
|
|
80163
|
+
var HA_AS = "a power sensor (device_class power). Home Assistant has no laundry domain. running-state stays unexported until a null reading can be published as unavailable.";
|
|
80164
|
+
var HOMEKIT_REASON = "HomeKit has no laundry-appliance service. The export tab would pair an accessory with nothing on it: running-state is withheld until a null reading can be unavailable, and power is not a HomeKit service this export honours.";
|
|
80165
|
+
var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
|
|
80166
|
+
var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
|
|
80167
|
+
var MATTER_REASON = "No Matter export is built. The closest device types are Laundry Washer (0x0073) and Laundry Dryer (0x0074); a power threshold is not the Laundry Washer Mode cluster.";
|
|
80168
|
+
function withheld(reason) {
|
|
80169
|
+
return {
|
|
80170
|
+
[DeviceType.Washer]: {
|
|
80171
|
+
exported: false,
|
|
80172
|
+
reason
|
|
80173
|
+
},
|
|
80174
|
+
[DeviceType.Dryer]: {
|
|
80175
|
+
exported: false,
|
|
80176
|
+
reason
|
|
80177
|
+
},
|
|
80178
|
+
[DeviceType.Dishwasher]: {
|
|
80179
|
+
exported: false,
|
|
80180
|
+
reason
|
|
80181
|
+
}
|
|
80182
|
+
};
|
|
80183
|
+
}
|
|
80184
|
+
function offered(received) {
|
|
80185
|
+
return {
|
|
80186
|
+
[DeviceType.Washer]: {
|
|
80187
|
+
exported: true,
|
|
80188
|
+
as: received
|
|
80189
|
+
},
|
|
80190
|
+
[DeviceType.Dryer]: {
|
|
80191
|
+
exported: true,
|
|
80192
|
+
as: received
|
|
80193
|
+
},
|
|
80194
|
+
[DeviceType.Dishwasher]: {
|
|
80195
|
+
exported: true,
|
|
80196
|
+
as: received
|
|
80197
|
+
}
|
|
80198
|
+
};
|
|
80199
|
+
}
|
|
80200
|
+
var APPLIANCE_EXPORT = {
|
|
80201
|
+
ha: offered(HA_AS),
|
|
80202
|
+
homekit: withheld(HOMEKIT_REASON),
|
|
80203
|
+
alexa: withheld(ALEXA_REASON),
|
|
80204
|
+
google: withheld(GOOGLE_REASON),
|
|
80205
|
+
matter: withheld(MATTER_REASON)
|
|
80206
|
+
};
|
|
80207
|
+
function isPlugApplianceType(deviceType) {
|
|
80208
|
+
return PLUG_APPLIANCE_TYPES.some((type) => type === deviceType);
|
|
80209
|
+
}
|
|
80210
|
+
/** The decision for this ecosystem, or null when the type is not an appliance. */
|
|
80211
|
+
function applianceExport(ecosystem, deviceType) {
|
|
80212
|
+
if (!isPlugApplianceType(deviceType)) return null;
|
|
80213
|
+
return APPLIANCE_EXPORT[ecosystem][deviceType];
|
|
80214
|
+
}
|
|
79541
80215
|
Object.freeze({
|
|
79542
80216
|
"accessories.getStatus": [{
|
|
79543
80217
|
name: "deviceId",
|
|
@@ -80504,6 +81178,16 @@ Object.freeze({
|
|
|
80504
81178
|
form: "single",
|
|
80505
81179
|
optional: false
|
|
80506
81180
|
}],
|
|
81181
|
+
"groupCommands.getStatus": [{
|
|
81182
|
+
name: "deviceId",
|
|
81183
|
+
form: "single",
|
|
81184
|
+
optional: false
|
|
81185
|
+
}],
|
|
81186
|
+
"groupStatus.getStatus": [{
|
|
81187
|
+
name: "deviceId",
|
|
81188
|
+
form: "single",
|
|
81189
|
+
optional: false
|
|
81190
|
+
}],
|
|
80507
81191
|
"heatingValve.getStatus": [{
|
|
80508
81192
|
name: "deviceId",
|
|
80509
81193
|
form: "single",
|
|
@@ -82488,6 +83172,8 @@ new Map(Object.entries({
|
|
|
82488
83172
|
"detection-blind": "device-events",
|
|
82489
83173
|
"motion-noisy": "device-events",
|
|
82490
83174
|
"motion-calm": "device-events",
|
|
83175
|
+
"package-llm-silent": "device-events",
|
|
83176
|
+
"package-llm-answered": "device-events",
|
|
82491
83177
|
"recording-stalled": "device-events",
|
|
82492
83178
|
"recording-healthy": "device-events",
|
|
82493
83179
|
"recording-degraded": "device-events",
|
|
@@ -82571,6 +83257,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
82571
83257
|
label: "Motion without a subject",
|
|
82572
83258
|
kinds: ["motion-noisy", "motion-calm"]
|
|
82573
83259
|
},
|
|
83260
|
+
{
|
|
83261
|
+
id: "package-llm",
|
|
83262
|
+
family: "device-events",
|
|
83263
|
+
label: "Package confirm",
|
|
83264
|
+
kinds: ["package-llm-silent", "package-llm-answered"]
|
|
83265
|
+
},
|
|
82574
83266
|
{
|
|
82575
83267
|
id: "recording",
|
|
82576
83268
|
family: "device-events",
|
|
@@ -82752,6 +83444,8 @@ var DEVICE_EVENTS = [
|
|
|
82752
83444
|
"detection-blind",
|
|
82753
83445
|
"motion-noisy",
|
|
82754
83446
|
"motion-calm",
|
|
83447
|
+
"package-llm-silent",
|
|
83448
|
+
"package-llm-answered",
|
|
82755
83449
|
"recording-stalled",
|
|
82756
83450
|
"recording-healthy",
|
|
82757
83451
|
"recording-degraded",
|
|
@@ -83020,6 +83714,15 @@ new Map([
|
|
|
83020
83714
|
snapshotLabel: "Cameras with constant motion now",
|
|
83021
83715
|
snapshotSection: null
|
|
83022
83716
|
},
|
|
83717
|
+
{
|
|
83718
|
+
id: "package-llm-confirm",
|
|
83719
|
+
family: "device-events",
|
|
83720
|
+
label: "Package confirm (not answering / answering again)",
|
|
83721
|
+
bad: ["package-llm-silent"],
|
|
83722
|
+
recovery: ["package-llm-answered"],
|
|
83723
|
+
snapshotLabel: "Cameras whose package confirm is not answering",
|
|
83724
|
+
snapshotSection: null
|
|
83725
|
+
},
|
|
83023
83726
|
{
|
|
83024
83727
|
id: "recording-health",
|
|
83025
83728
|
family: "device-events",
|
|
@@ -148794,6 +149497,8 @@ var HAP_EXPORTABLE_DEVICE_TYPES = [
|
|
|
148794
149497
|
function pickMapperKind(deviceType) {
|
|
148795
149498
|
if (deviceType === null || deviceType === void 0 || deviceType.length === 0) return "camera";
|
|
148796
149499
|
if (deviceType === DeviceType.Camera) return "camera";
|
|
149500
|
+
const withheld = applianceExport("homekit", deviceType);
|
|
149501
|
+
if (withheld !== null && !withheld.exported) return null;
|
|
148797
149502
|
return HAP_EXPORTABLE_DEVICE_TYPES.find((type) => type === deviceType) === void 0 ? null : "generic";
|
|
148798
149503
|
}
|
|
148799
149504
|
/**
|