@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
|
@@ -39,7 +39,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
39
39
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
40
40
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
41
41
|
//#endregion
|
|
42
|
-
//#region ../types/dist/event-category-
|
|
42
|
+
//#region ../types/dist/event-category-CT-hz5Rb.mjs
|
|
43
43
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
44
44
|
EventCategory["SystemBoot"] = "system.boot";
|
|
45
45
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -365,6 +365,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
365
365
|
/** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
|
|
366
366
|
EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
|
|
367
367
|
/**
|
|
368
|
+
* A camera's package LLM confirm has failed closed three times in a row
|
|
369
|
+
* (D931, 2026-10-26). One edge per camera until
|
|
370
|
+
* {@link PipelinePackageLlmAnswered}.
|
|
371
|
+
*/
|
|
372
|
+
EventCategory["PipelinePackageLlmSilent"] = "pipeline.package-llm-silent";
|
|
373
|
+
/** The recovery edge of {@link PipelinePackageLlmSilent}: a confirm returned yes or no. */
|
|
374
|
+
EventCategory["PipelinePackageLlmAnswered"] = "pipeline.package-llm-answered";
|
|
375
|
+
/**
|
|
368
376
|
* Per-camera pipeline config was mutated by the orchestrator
|
|
369
377
|
* (a settings change via `setAgentInferenceDevices` /
|
|
370
378
|
* `setCameraStepToggle` / `setCameraStepSettings`). Orchestrator
|
|
@@ -5474,7 +5482,7 @@ var ZodIssueCode = {
|
|
|
5474
5482
|
var ZodFirstPartyTypeKind;
|
|
5475
5483
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5476
5484
|
//#endregion
|
|
5477
|
-
//#region ../types/dist/sleep-
|
|
5485
|
+
//#region ../types/dist/sleep-bykKrTgu.mjs
|
|
5478
5486
|
/**
|
|
5479
5487
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5480
5488
|
* window to float samples (D455).
|
|
@@ -8000,6 +8008,53 @@ var READING_QUANTITIES = [
|
|
|
8000
8008
|
];
|
|
8001
8009
|
var ReadingQuantitySchema = _enum(READING_QUANTITIES);
|
|
8002
8010
|
new Set(READING_QUANTITIES);
|
|
8011
|
+
/**
|
|
8012
|
+
* Stored unit symbol for a quantity. `none` means the number is dimensionless
|
|
8013
|
+
* (or an index / ratio / count). `device` means the cap has no single unit.
|
|
8014
|
+
*/
|
|
8015
|
+
var QUANTITY_BASE = {
|
|
8016
|
+
temperature: "°C",
|
|
8017
|
+
pressure: "hPa",
|
|
8018
|
+
speed: "m/s",
|
|
8019
|
+
precipitation: "mm",
|
|
8020
|
+
"precipitation-rate": "mm/h",
|
|
8021
|
+
length: "m",
|
|
8022
|
+
area: "m²",
|
|
8023
|
+
illuminance: "lx",
|
|
8024
|
+
irradiance: "W/m²",
|
|
8025
|
+
power: "W",
|
|
8026
|
+
energy: "kWh",
|
|
8027
|
+
voltage: "V",
|
|
8028
|
+
current: "A",
|
|
8029
|
+
"apparent-power": "VA",
|
|
8030
|
+
humidity: "%",
|
|
8031
|
+
percentage: "%",
|
|
8032
|
+
"concentration-volume": "ppm",
|
|
8033
|
+
"concentration-mass": "µg/m³",
|
|
8034
|
+
"concentration-ppb": "ppb",
|
|
8035
|
+
volume: "L",
|
|
8036
|
+
duration: "s",
|
|
8037
|
+
"duration-ms": "ms",
|
|
8038
|
+
information: "B",
|
|
8039
|
+
"sound-level": "dBFS",
|
|
8040
|
+
"signal-level": "dBm",
|
|
8041
|
+
"colour-temperature": "mired",
|
|
8042
|
+
angle: "°",
|
|
8043
|
+
bitrate: "kbps",
|
|
8044
|
+
rate: "fps",
|
|
8045
|
+
mass: "kg",
|
|
8046
|
+
index: "none",
|
|
8047
|
+
ratio: "none",
|
|
8048
|
+
count: "none",
|
|
8049
|
+
none: "none",
|
|
8050
|
+
device: "device"
|
|
8051
|
+
};
|
|
8052
|
+
/** The stored unit, or `undefined` when the quantity has no unit symbol. */
|
|
8053
|
+
function baseUnitOf(quantity) {
|
|
8054
|
+
const symbol = QUANTITY_BASE[quantity];
|
|
8055
|
+
if (symbol === "none" || symbol === "device") return void 0;
|
|
8056
|
+
return symbol;
|
|
8057
|
+
}
|
|
8003
8058
|
function readingMeta(quantity, extras) {
|
|
8004
8059
|
return {
|
|
8005
8060
|
quantity,
|
|
@@ -8608,6 +8663,8 @@ var CAP_NAMES = Object.freeze([
|
|
|
8608
8663
|
"filesystem-browse",
|
|
8609
8664
|
"flood",
|
|
8610
8665
|
"gas",
|
|
8666
|
+
"group-commands",
|
|
8667
|
+
"group-status",
|
|
8611
8668
|
"heating-valve",
|
|
8612
8669
|
"humidifier",
|
|
8613
8670
|
"humidity-sensor",
|
|
@@ -9426,6 +9483,20 @@ Object.freeze({
|
|
|
9426
9483
|
"path": "detected",
|
|
9427
9484
|
"valueType": "boolean"
|
|
9428
9485
|
}],
|
|
9486
|
+
"group-status": [
|
|
9487
|
+
{
|
|
9488
|
+
"path": "included",
|
|
9489
|
+
"valueType": "number"
|
|
9490
|
+
},
|
|
9491
|
+
{
|
|
9492
|
+
"path": "excluded",
|
|
9493
|
+
"valueType": "number"
|
|
9494
|
+
},
|
|
9495
|
+
{
|
|
9496
|
+
"path": "total",
|
|
9497
|
+
"valueType": "number"
|
|
9498
|
+
}
|
|
9499
|
+
],
|
|
9429
9500
|
"heating-valve": [{
|
|
9430
9501
|
"path": "position",
|
|
9431
9502
|
"valueType": "number"
|
|
@@ -10414,7 +10485,7 @@ object({
|
|
|
10414
10485
|
params: record(string(), union([string(), number()])).optional()
|
|
10415
10486
|
});
|
|
10416
10487
|
//#endregion
|
|
10417
|
-
//#region ../types/dist/err-msg-
|
|
10488
|
+
//#region ../types/dist/err-msg-DIorGYeC.mjs
|
|
10418
10489
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
10419
10490
|
DeviceType["Camera"] = "camera";
|
|
10420
10491
|
DeviceType["Hub"] = "hub";
|
|
@@ -10508,8 +10579,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
10508
10579
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
10509
10580
|
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
10510
10581
|
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
10511
|
-
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
10582
|
+
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
10583
|
+
* A plug-built dishwasher carries running-state and power instead. */
|
|
10512
10584
|
DeviceType["Dishwasher"] = "dishwasher";
|
|
10585
|
+
/** Washing machine. A plug-built one is running while its power stays
|
|
10586
|
+
* above a threshold. No program cap — that surface is the dishwasher's. */
|
|
10587
|
+
DeviceType["Washer"] = "washer";
|
|
10588
|
+
/** Tumble dryer. Same plug-built running surface as {@link Washer}. */
|
|
10589
|
+
DeviceType["Dryer"] = "dryer";
|
|
10513
10590
|
return DeviceType;
|
|
10514
10591
|
}({});
|
|
10515
10592
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -10767,7 +10844,7 @@ function errMsg$16(err) {
|
|
|
10767
10844
|
return String(err);
|
|
10768
10845
|
}
|
|
10769
10846
|
//#endregion
|
|
10770
|
-
//#region ../types/dist/composition-
|
|
10847
|
+
//#region ../types/dist/composition-B2rw5L29.mjs
|
|
10771
10848
|
var AUDIO_ENCODER_BY_CODEC = {
|
|
10772
10849
|
opus: "libopus",
|
|
10773
10850
|
aac: "aac",
|
|
@@ -12117,15 +12194,102 @@ function validateExpressionSource(src) {
|
|
|
12117
12194
|
}
|
|
12118
12195
|
return null;
|
|
12119
12196
|
}
|
|
12120
|
-
/**
|
|
12121
|
-
|
|
12122
|
-
|
|
12123
|
-
|
|
12197
|
+
/**
|
|
12198
|
+
* One power reading becomes a washer, dryer or dishwasher (D944 helper).
|
|
12199
|
+
*
|
|
12200
|
+
* Standby of the control board is under 5 W; a motor or a heater is far
|
|
12201
|
+
* above that, so 5 W is the line. A door lock or a short pump spike is not
|
|
12202
|
+
* a cycle, so running starts only after 30 s above the line.
|
|
12203
|
+
*
|
|
12204
|
+
* A wash, dry or dishwasher pause (soak, heat-wait, heater off between
|
|
12205
|
+
* bursts) lasts several minutes. Ending the cycle on the first dip would
|
|
12206
|
+
* report "finished" in the middle of the program, so the stop dwell is
|
|
12207
|
+
* 10 minutes on every type. The number is stored per type so one machine
|
|
12208
|
+
* can move later without moving the others.
|
|
12209
|
+
*/
|
|
12210
|
+
var APPLIANCE_TEMPLATE_ID = "appliance";
|
|
12211
|
+
var APPLIANCE_KINDS = [
|
|
12212
|
+
"washer",
|
|
12213
|
+
"dryer",
|
|
12214
|
+
"dishwasher"
|
|
12215
|
+
];
|
|
12216
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
12217
|
+
/**
|
|
12218
|
+
* A composition source identity: `(addonId, stableId)`, never a numeric device
|
|
12219
|
+
* id. Split out so helper schemas can name it without a cycle through
|
|
12220
|
+
* `composition.ts` (D659).
|
|
12221
|
+
*/
|
|
12124
12222
|
var CompositionSourceRefSchema = object({
|
|
12125
12223
|
/** The owning addon; `stableId` is unique only within it. */
|
|
12126
12224
|
addonId: string().min(1),
|
|
12127
12225
|
stableId: string().min(1)
|
|
12128
12226
|
});
|
|
12227
|
+
var GROUP_TEMPLATE_IDS = [
|
|
12228
|
+
"temperature",
|
|
12229
|
+
"humidity",
|
|
12230
|
+
"pressure",
|
|
12231
|
+
"illuminance",
|
|
12232
|
+
"power",
|
|
12233
|
+
"energy",
|
|
12234
|
+
"battery",
|
|
12235
|
+
"numeric",
|
|
12236
|
+
"motion",
|
|
12237
|
+
"contact",
|
|
12238
|
+
"leak",
|
|
12239
|
+
"smoke",
|
|
12240
|
+
"occupancy",
|
|
12241
|
+
"binary",
|
|
12242
|
+
"switch",
|
|
12243
|
+
"light"
|
|
12244
|
+
];
|
|
12245
|
+
var NUMERIC_AGGREGATES = [
|
|
12246
|
+
"mean",
|
|
12247
|
+
"median",
|
|
12248
|
+
"min",
|
|
12249
|
+
"max",
|
|
12250
|
+
"sum"
|
|
12251
|
+
];
|
|
12252
|
+
var BINARY_AGGREGATES = ["any", "all"];
|
|
12253
|
+
/** How an actuator group decides it is on. Unknown members never count as off. */
|
|
12254
|
+
var ACTIVE_CRITERIA = ["at-least-one", "all"];
|
|
12255
|
+
var AGGREGATE_REDUCERS = [
|
|
12256
|
+
"mean",
|
|
12257
|
+
"median",
|
|
12258
|
+
"min",
|
|
12259
|
+
"max",
|
|
12260
|
+
"sum",
|
|
12261
|
+
"any",
|
|
12262
|
+
"all"
|
|
12263
|
+
];
|
|
12264
|
+
var GroupTemplateIdSchema = _enum(GROUP_TEMPLATE_IDS);
|
|
12265
|
+
var AggregateReducerSchema = _enum(AGGREGATE_REDUCERS);
|
|
12266
|
+
var ActiveCriterionSchema = _enum(ACTIVE_CRITERIA);
|
|
12267
|
+
/** One member. The field is stored so occupancy can name motion or binary. */
|
|
12268
|
+
var HelperMemberSchema = object({
|
|
12269
|
+
source: CompositionSourceRefSchema,
|
|
12270
|
+
cap: string().min(1),
|
|
12271
|
+
fieldPath: string().min(1)
|
|
12272
|
+
});
|
|
12273
|
+
var HelperSpecSchema = discriminatedUnion("kind", [object({
|
|
12274
|
+
kind: literal("group"),
|
|
12275
|
+
templateId: GroupTemplateIdSchema,
|
|
12276
|
+
aggregate: AggregateReducerSchema,
|
|
12277
|
+
members: array(HelperMemberSchema).min(1).max(64),
|
|
12278
|
+
/** Actuator groups only. Readings leave this unset. */
|
|
12279
|
+
active: ActiveCriterionSchema.optional()
|
|
12280
|
+
}), object({
|
|
12281
|
+
kind: literal("appliance"),
|
|
12282
|
+
templateId: literal(APPLIANCE_TEMPLATE_ID),
|
|
12283
|
+
appliance: _enum(APPLIANCE_KINDS),
|
|
12284
|
+
thresholdWatts: number().positive(),
|
|
12285
|
+
startDwellMs: number().int().nonnegative(),
|
|
12286
|
+
stopDwellMs: number().int().nonnegative(),
|
|
12287
|
+
member: HelperMemberSchema
|
|
12288
|
+
})]);
|
|
12289
|
+
/** A composed device's stableId is this prefix plus the block id. */
|
|
12290
|
+
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
12291
|
+
/** Longest snippet a `code` source may carry (slice 4). */
|
|
12292
|
+
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
12129
12293
|
/** One field of one capability of one source device. */
|
|
12130
12294
|
var CompositionFieldReadSchema = object({
|
|
12131
12295
|
source: CompositionSourceRefSchema,
|
|
@@ -12169,7 +12333,33 @@ var CompositionCodeSourceSchema = object({
|
|
|
12169
12333
|
var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
12170
12334
|
CompositionFromSourceSchema,
|
|
12171
12335
|
CompositionExpressionSourceSchema,
|
|
12172
|
-
CompositionCodeSourceSchema
|
|
12336
|
+
CompositionCodeSourceSchema,
|
|
12337
|
+
object({
|
|
12338
|
+
kind: literal("aggregate"),
|
|
12339
|
+
reducer: _enum([
|
|
12340
|
+
"mean",
|
|
12341
|
+
"median",
|
|
12342
|
+
"min",
|
|
12343
|
+
"max",
|
|
12344
|
+
"sum",
|
|
12345
|
+
"any",
|
|
12346
|
+
"all"
|
|
12347
|
+
]),
|
|
12348
|
+
reads: array(CompositionFieldReadSchema).min(1).max(64),
|
|
12349
|
+
/** `value` is the reading; the others are the member counts. */
|
|
12350
|
+
publish: _enum([
|
|
12351
|
+
"value",
|
|
12352
|
+
"included",
|
|
12353
|
+
"excluded",
|
|
12354
|
+
"total"
|
|
12355
|
+
]),
|
|
12356
|
+
/** What a `value` publish does when nobody is included. Counts ignore this. */
|
|
12357
|
+
empty: _enum([
|
|
12358
|
+
"null",
|
|
12359
|
+
"omit",
|
|
12360
|
+
"offline"
|
|
12361
|
+
])
|
|
12362
|
+
})
|
|
12173
12363
|
]);
|
|
12174
12364
|
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
12175
12365
|
kind: literal("forward"),
|
|
@@ -12215,7 +12405,13 @@ var CompositionSchema = object({
|
|
|
12215
12405
|
kind: literal("existing"),
|
|
12216
12406
|
device: CompositionSourceRefSchema
|
|
12217
12407
|
})]),
|
|
12218
|
-
features: array(CompositionFeatureSchema).min(1).max(16)
|
|
12408
|
+
features: array(CompositionFeatureSchema).min(1).max(16),
|
|
12409
|
+
/**
|
|
12410
|
+
* Present when the block is a helper template. Absent on a free
|
|
12411
|
+
* composition (the room example, device 4603). The editor reads this,
|
|
12412
|
+
* never the compiled features.
|
|
12413
|
+
*/
|
|
12414
|
+
helper: HelperSpecSchema.optional()
|
|
12219
12415
|
}).superRefine((composition, ctx) => {
|
|
12220
12416
|
const seen = /* @__PURE__ */ new Set();
|
|
12221
12417
|
composition.features.forEach((feature, index) => {
|
|
@@ -18542,7 +18738,10 @@ var CompositionProblemSchema = object({
|
|
|
18542
18738
|
"target-missing",
|
|
18543
18739
|
"target-unreadable",
|
|
18544
18740
|
"not-replaceable",
|
|
18545
|
-
"native-capability-replace"
|
|
18741
|
+
"native-capability-replace",
|
|
18742
|
+
"mixed-quantity",
|
|
18743
|
+
"helper-mismatch",
|
|
18744
|
+
"member-constraint"
|
|
18546
18745
|
]),
|
|
18547
18746
|
path: string(),
|
|
18548
18747
|
message: string()
|
|
@@ -18563,7 +18762,8 @@ var CompositionUnavailableModeSchema = _enum([
|
|
|
18563
18762
|
"null",
|
|
18564
18763
|
"offline",
|
|
18565
18764
|
"unknown",
|
|
18566
|
-
"release"
|
|
18765
|
+
"release",
|
|
18766
|
+
"omit"
|
|
18567
18767
|
]);
|
|
18568
18768
|
/**
|
|
18569
18769
|
* `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
|
|
@@ -18777,6 +18977,275 @@ Object.freeze({
|
|
|
18777
18977
|
result: ["number", "null"]
|
|
18778
18978
|
}
|
|
18779
18979
|
});
|
|
18980
|
+
/**
|
|
18981
|
+
* One catalog row per base reading a group helper can build (D944 §3).
|
|
18982
|
+
* Data, not a form default written into the block.
|
|
18983
|
+
*/
|
|
18984
|
+
var NOW = {
|
|
18985
|
+
fieldPath: "lastFetchedAt",
|
|
18986
|
+
expr: "now"
|
|
18987
|
+
};
|
|
18988
|
+
var CHANGED = {
|
|
18989
|
+
fieldPath: "lastChangedAt",
|
|
18990
|
+
expr: "now"
|
|
18991
|
+
};
|
|
18992
|
+
function numeric(input) {
|
|
18993
|
+
return {
|
|
18994
|
+
...input,
|
|
18995
|
+
family: "numeric",
|
|
18996
|
+
deviceType: DeviceType.Sensor,
|
|
18997
|
+
memberDeviceType: DeviceType.Sensor,
|
|
18998
|
+
commandCaps: [],
|
|
18999
|
+
baseUnit: baseUnitOf(input.quantity),
|
|
19000
|
+
aggregates: NUMERIC_AGGREGATES,
|
|
19001
|
+
accept: [{
|
|
19002
|
+
cap: input.outputCap,
|
|
19003
|
+
fieldPath: input.outputField
|
|
19004
|
+
}]
|
|
19005
|
+
};
|
|
19006
|
+
}
|
|
19007
|
+
function binary(input) {
|
|
19008
|
+
return {
|
|
19009
|
+
...input,
|
|
19010
|
+
family: "binary",
|
|
19011
|
+
deviceType: DeviceType.Sensor,
|
|
19012
|
+
memberDeviceType: DeviceType.Sensor,
|
|
19013
|
+
commandCaps: [],
|
|
19014
|
+
quantity: "none",
|
|
19015
|
+
baseUnit: void 0,
|
|
19016
|
+
aggregates: BINARY_AGGREGATES,
|
|
19017
|
+
empty: "offline"
|
|
19018
|
+
};
|
|
19019
|
+
}
|
|
19020
|
+
var GROUP_TEMPLATES = [
|
|
19021
|
+
numeric({
|
|
19022
|
+
id: "temperature",
|
|
19023
|
+
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
19024
|
+
role: DeviceRole.TemperatureSensor,
|
|
19025
|
+
outputCap: "temperature-sensor",
|
|
19026
|
+
outputField: "celsius",
|
|
19027
|
+
quantity: "temperature",
|
|
19028
|
+
defaultAggregate: "mean",
|
|
19029
|
+
empty: "null",
|
|
19030
|
+
companions: [NOW]
|
|
19031
|
+
}),
|
|
19032
|
+
numeric({
|
|
19033
|
+
id: "humidity",
|
|
19034
|
+
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
19035
|
+
role: DeviceRole.HumiditySensor,
|
|
19036
|
+
outputCap: "humidity-sensor",
|
|
19037
|
+
outputField: "percent",
|
|
19038
|
+
quantity: "humidity",
|
|
19039
|
+
defaultAggregate: "mean",
|
|
19040
|
+
empty: "null",
|
|
19041
|
+
companions: [NOW]
|
|
19042
|
+
}),
|
|
19043
|
+
numeric({
|
|
19044
|
+
id: "pressure",
|
|
19045
|
+
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
19046
|
+
role: DeviceRole.PressureSensor,
|
|
19047
|
+
outputCap: "pressure-sensor",
|
|
19048
|
+
outputField: "hpa",
|
|
19049
|
+
quantity: "pressure",
|
|
19050
|
+
defaultAggregate: "mean",
|
|
19051
|
+
empty: "null",
|
|
19052
|
+
companions: [NOW]
|
|
19053
|
+
}),
|
|
19054
|
+
numeric({
|
|
19055
|
+
id: "illuminance",
|
|
19056
|
+
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
19057
|
+
role: DeviceRole.AmbientLightSensor,
|
|
19058
|
+
outputCap: "ambient-light-sensor",
|
|
19059
|
+
outputField: "lux",
|
|
19060
|
+
quantity: "illuminance",
|
|
19061
|
+
defaultAggregate: "mean",
|
|
19062
|
+
empty: "null",
|
|
19063
|
+
companions: [NOW]
|
|
19064
|
+
}),
|
|
19065
|
+
numeric({
|
|
19066
|
+
id: "power",
|
|
19067
|
+
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
19068
|
+
role: DeviceRole.PowerSensor,
|
|
19069
|
+
outputCap: "power-meter",
|
|
19070
|
+
outputField: "watts",
|
|
19071
|
+
quantity: "power",
|
|
19072
|
+
defaultAggregate: "sum",
|
|
19073
|
+
empty: "omit",
|
|
19074
|
+
companions: [NOW]
|
|
19075
|
+
}),
|
|
19076
|
+
numeric({
|
|
19077
|
+
id: "energy",
|
|
19078
|
+
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
19079
|
+
role: DeviceRole.EnergySensor,
|
|
19080
|
+
outputCap: "power-meter",
|
|
19081
|
+
outputField: "kwhTotal",
|
|
19082
|
+
quantity: "energy",
|
|
19083
|
+
defaultAggregate: "sum",
|
|
19084
|
+
empty: "omit",
|
|
19085
|
+
companions: [NOW]
|
|
19086
|
+
}),
|
|
19087
|
+
numeric({
|
|
19088
|
+
id: "battery",
|
|
19089
|
+
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
19090
|
+
role: DeviceRole.BatterySensor,
|
|
19091
|
+
outputCap: "battery",
|
|
19092
|
+
outputField: "percentage",
|
|
19093
|
+
quantity: "percentage",
|
|
19094
|
+
defaultAggregate: "mean",
|
|
19095
|
+
empty: "null",
|
|
19096
|
+
companions: [
|
|
19097
|
+
{
|
|
19098
|
+
fieldPath: "charging",
|
|
19099
|
+
expr: "\"unknown\""
|
|
19100
|
+
},
|
|
19101
|
+
{
|
|
19102
|
+
fieldPath: "sleeping",
|
|
19103
|
+
expr: "false"
|
|
19104
|
+
},
|
|
19105
|
+
{
|
|
19106
|
+
fieldPath: "lastUpdated",
|
|
19107
|
+
expr: "now"
|
|
19108
|
+
}
|
|
19109
|
+
]
|
|
19110
|
+
}),
|
|
19111
|
+
numeric({
|
|
19112
|
+
id: "numeric",
|
|
19113
|
+
summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
|
|
19114
|
+
role: DeviceRole.NumericSensor,
|
|
19115
|
+
outputCap: "numeric-sensor",
|
|
19116
|
+
outputField: "value",
|
|
19117
|
+
quantity: "device",
|
|
19118
|
+
defaultAggregate: "mean",
|
|
19119
|
+
empty: "null",
|
|
19120
|
+
companions: [NOW]
|
|
19121
|
+
}),
|
|
19122
|
+
binary({
|
|
19123
|
+
id: "motion",
|
|
19124
|
+
summary: "Any or all motion. Offline and unknown members are left out, never read as off. Nobody reporting takes the device offline.",
|
|
19125
|
+
role: DeviceRole.MotionSensor,
|
|
19126
|
+
outputCap: "motion",
|
|
19127
|
+
outputField: "detected",
|
|
19128
|
+
defaultAggregate: "any",
|
|
19129
|
+
accept: [{
|
|
19130
|
+
cap: "motion",
|
|
19131
|
+
fieldPath: "detected"
|
|
19132
|
+
}],
|
|
19133
|
+
companions: [{
|
|
19134
|
+
fieldPath: "lastDetectedAt",
|
|
19135
|
+
expr: "null"
|
|
19136
|
+
}, {
|
|
19137
|
+
fieldPath: "autoClearAfterMs",
|
|
19138
|
+
expr: "null"
|
|
19139
|
+
}]
|
|
19140
|
+
}),
|
|
19141
|
+
binary({
|
|
19142
|
+
id: "contact",
|
|
19143
|
+
summary: "Any or all open contacts. Offline and unknown members are left out, never read as closed.",
|
|
19144
|
+
role: DeviceRole.ContactSensor,
|
|
19145
|
+
outputCap: "contact",
|
|
19146
|
+
outputField: "entryOpen",
|
|
19147
|
+
defaultAggregate: "any",
|
|
19148
|
+
accept: [{
|
|
19149
|
+
cap: "contact",
|
|
19150
|
+
fieldPath: "entryOpen"
|
|
19151
|
+
}],
|
|
19152
|
+
companions: [CHANGED]
|
|
19153
|
+
}),
|
|
19154
|
+
binary({
|
|
19155
|
+
id: "leak",
|
|
19156
|
+
summary: "Any or all leak detections. Offline and unknown members are left out, never read as dry.",
|
|
19157
|
+
role: DeviceRole.LeakSensor,
|
|
19158
|
+
outputCap: "flood",
|
|
19159
|
+
outputField: "flooded",
|
|
19160
|
+
defaultAggregate: "any",
|
|
19161
|
+
accept: [{
|
|
19162
|
+
cap: "flood",
|
|
19163
|
+
fieldPath: "flooded"
|
|
19164
|
+
}],
|
|
19165
|
+
companions: [CHANGED]
|
|
19166
|
+
}),
|
|
19167
|
+
binary({
|
|
19168
|
+
id: "smoke",
|
|
19169
|
+
summary: "Any or all smoke detections. Offline and unknown members are left out, never read as clear.",
|
|
19170
|
+
role: DeviceRole.SmokeSensor,
|
|
19171
|
+
outputCap: "smoke",
|
|
19172
|
+
outputField: "detected",
|
|
19173
|
+
defaultAggregate: "any",
|
|
19174
|
+
accept: [{
|
|
19175
|
+
cap: "smoke",
|
|
19176
|
+
fieldPath: "detected"
|
|
19177
|
+
}],
|
|
19178
|
+
companions: [CHANGED]
|
|
19179
|
+
}),
|
|
19180
|
+
binary({
|
|
19181
|
+
id: "occupancy",
|
|
19182
|
+
summary: "Any or all of motion or binary sensors, published as a binary. Presence zones are not aggregated. Nobody reporting is offline, not off.",
|
|
19183
|
+
role: DeviceRole.BinarySensor,
|
|
19184
|
+
outputCap: "binary",
|
|
19185
|
+
outputField: "on",
|
|
19186
|
+
defaultAggregate: "any",
|
|
19187
|
+
accept: [{
|
|
19188
|
+
cap: "motion",
|
|
19189
|
+
fieldPath: "detected"
|
|
19190
|
+
}, {
|
|
19191
|
+
cap: "binary",
|
|
19192
|
+
fieldPath: "on"
|
|
19193
|
+
}],
|
|
19194
|
+
companions: [CHANGED]
|
|
19195
|
+
}),
|
|
19196
|
+
binary({
|
|
19197
|
+
id: "binary",
|
|
19198
|
+
summary: "Any or all generic binary sensors. Offline and unknown members are left out, never read as off.",
|
|
19199
|
+
role: DeviceRole.BinarySensor,
|
|
19200
|
+
outputCap: "binary",
|
|
19201
|
+
outputField: "on",
|
|
19202
|
+
defaultAggregate: "any",
|
|
19203
|
+
accept: [{
|
|
19204
|
+
cap: "binary",
|
|
19205
|
+
fieldPath: "on"
|
|
19206
|
+
}],
|
|
19207
|
+
companions: [CHANGED]
|
|
19208
|
+
}),
|
|
19209
|
+
actuator({
|
|
19210
|
+
id: "switch",
|
|
19211
|
+
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.",
|
|
19212
|
+
deviceType: DeviceType.Switch,
|
|
19213
|
+
outputCap: "switch",
|
|
19214
|
+
commandCaps: ["switch"]
|
|
19215
|
+
}),
|
|
19216
|
+
actuator({
|
|
19217
|
+
id: "light",
|
|
19218
|
+
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.",
|
|
19219
|
+
deviceType: DeviceType.Light,
|
|
19220
|
+
outputCap: "switch",
|
|
19221
|
+
commandCaps: [
|
|
19222
|
+
"switch",
|
|
19223
|
+
"brightness",
|
|
19224
|
+
"color"
|
|
19225
|
+
]
|
|
19226
|
+
})
|
|
19227
|
+
];
|
|
19228
|
+
function actuator(input) {
|
|
19229
|
+
return {
|
|
19230
|
+
...input,
|
|
19231
|
+
family: "actuator",
|
|
19232
|
+
role: void 0,
|
|
19233
|
+
memberDeviceType: input.deviceType,
|
|
19234
|
+
outputField: "on",
|
|
19235
|
+
quantity: "none",
|
|
19236
|
+
baseUnit: void 0,
|
|
19237
|
+
aggregates: BINARY_AGGREGATES,
|
|
19238
|
+
defaultAggregate: "any",
|
|
19239
|
+
empty: "offline",
|
|
19240
|
+
accept: [{
|
|
19241
|
+
cap: "switch",
|
|
19242
|
+
fieldPath: "on"
|
|
19243
|
+
}],
|
|
19244
|
+
companions: [CHANGED]
|
|
19245
|
+
};
|
|
19246
|
+
}
|
|
19247
|
+
new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
|
|
19248
|
+
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
18780
19249
|
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
18781
19250
|
/**
|
|
18782
19251
|
* What a composition may BUILD on a device type (G2, D676): the caps a new
|
|
@@ -45424,6 +45893,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
45424
45893
|
"detection-blind",
|
|
45425
45894
|
"motion-noisy",
|
|
45426
45895
|
"motion-calm",
|
|
45896
|
+
"package-llm-silent",
|
|
45897
|
+
"package-llm-answered",
|
|
45427
45898
|
"recording-stalled",
|
|
45428
45899
|
"recording-healthy",
|
|
45429
45900
|
"recording-degraded",
|
|
@@ -56631,6 +57102,28 @@ var PackageVersionInfoSchema = object({
|
|
|
56631
57102
|
deprecated: string().optional(),
|
|
56632
57103
|
distTags: array(string()).readonly()
|
|
56633
57104
|
});
|
|
57105
|
+
/**
|
|
57106
|
+
* One published document. `ok` is markdown from the registry. `missing` means
|
|
57107
|
+
* the registry answered and the file was not there. `error` is a registry or
|
|
57108
|
+
* tarball failure — never an empty string standing in for either.
|
|
57109
|
+
*/
|
|
57110
|
+
var PackageDocBodySchema = discriminatedUnion("status", [
|
|
57111
|
+
object({
|
|
57112
|
+
status: literal("ok"),
|
|
57113
|
+
markdown: string()
|
|
57114
|
+
}),
|
|
57115
|
+
object({ status: literal("missing") }),
|
|
57116
|
+
object({
|
|
57117
|
+
status: literal("error"),
|
|
57118
|
+
message: string()
|
|
57119
|
+
})
|
|
57120
|
+
]);
|
|
57121
|
+
var PackageDocsSchema = object({
|
|
57122
|
+
name: string(),
|
|
57123
|
+
version: string(),
|
|
57124
|
+
readme: PackageDocBodySchema,
|
|
57125
|
+
changelog: PackageDocBodySchema
|
|
57126
|
+
});
|
|
56634
57127
|
var SearchResultSchema = object({
|
|
56635
57128
|
name: string(),
|
|
56636
57129
|
version: string(),
|
|
@@ -56849,7 +57342,10 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56849
57342
|
}), object({ success: literal(true) }), {
|
|
56850
57343
|
kind: "mutation",
|
|
56851
57344
|
auth: "admin"
|
|
56852
|
-
}), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
|
|
57345
|
+
}), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
|
|
57346
|
+
name: string().min(1),
|
|
57347
|
+
version: string().min(1).optional()
|
|
57348
|
+
}), PackageDocsSchema, { auth: "admin" }), method(object({ addonId: string() }), RestartAddonResultSchema, {
|
|
56853
57349
|
kind: "mutation",
|
|
56854
57350
|
auth: "admin"
|
|
56855
57351
|
}), method(object({ packageName: string() }), object({ success: literal(true) }), {
|
|
@@ -58899,6 +59395,36 @@ object({
|
|
|
58899
59395
|
lastChangedAt: number()
|
|
58900
59396
|
});
|
|
58901
59397
|
DeviceType.Sensor;
|
|
59398
|
+
object({
|
|
59399
|
+
/** One row per member that has been commanded. A later command replaces that member's row. */
|
|
59400
|
+
results: array(object({
|
|
59401
|
+
deviceId: number().int().nonnegative(),
|
|
59402
|
+
cap: string().min(1),
|
|
59403
|
+
method: string().min(1),
|
|
59404
|
+
ok: boolean(),
|
|
59405
|
+
error: string().optional(),
|
|
59406
|
+
/** Ms epoch of the attempt. */
|
|
59407
|
+
at: number()
|
|
59408
|
+
})) });
|
|
59409
|
+
DeviceType.Switch, DeviceType.Light;
|
|
59410
|
+
object({
|
|
59411
|
+
/** Members whose current value entered the aggregate. */
|
|
59412
|
+
included: number().int().nonnegative().meta(readingMeta("count", {
|
|
59413
|
+
precision: 0,
|
|
59414
|
+
label: "Reporting"
|
|
59415
|
+
})),
|
|
59416
|
+
/** Members left out: offline, unknown, or not a finite reading (D393). */
|
|
59417
|
+
excluded: number().int().nonnegative().meta(readingMeta("count", {
|
|
59418
|
+
precision: 0,
|
|
59419
|
+
label: "Excluded"
|
|
59420
|
+
})),
|
|
59421
|
+
/** `included` + `excluded`. */
|
|
59422
|
+
total: number().int().nonnegative().meta(readingMeta("count", {
|
|
59423
|
+
precision: 0,
|
|
59424
|
+
label: "Members"
|
|
59425
|
+
}))
|
|
59426
|
+
});
|
|
59427
|
+
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light;
|
|
58902
59428
|
object({
|
|
58903
59429
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
58904
59430
|
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
@@ -61738,7 +62264,7 @@ object({
|
|
|
61738
62264
|
/** Ms epoch when the slice was last updated. */
|
|
61739
62265
|
lastFetchedAt: number()
|
|
61740
62266
|
});
|
|
61741
|
-
DeviceType.Sensor;
|
|
62267
|
+
DeviceType.Sensor, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
61742
62268
|
/**
|
|
61743
62269
|
* Presence cap. Models HA `person.*` and `device_tracker.*` entities
|
|
61744
62270
|
* on `DeviceType.Presence`. Read-only — no setters: presence is
|
|
@@ -62185,7 +62711,7 @@ object({
|
|
|
62185
62711
|
phase: string().nullable()
|
|
62186
62712
|
});
|
|
62187
62713
|
Object.values(DeviceType);
|
|
62188
|
-
DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
62714
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
62189
62715
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
62190
62716
|
kind: "mutation",
|
|
62191
62717
|
auth: "admin"
|
|
@@ -65938,7 +66464,7 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
|
|
|
65938
66464
|
auth: "admin"
|
|
65939
66465
|
});
|
|
65940
66466
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
65941
|
-
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;
|
|
66467
|
+
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;
|
|
65942
66468
|
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
65943
66469
|
DeviceRole.BinarySensor, DeviceRole.MotionSensor;
|
|
65944
66470
|
new Set(CAP_NAMES);
|
|
@@ -65991,7 +66517,7 @@ var AccessoryKind = {
|
|
|
65991
66517
|
PrivacyMask: DeviceRole.PrivacyMask
|
|
65992
66518
|
};
|
|
65993
66519
|
AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
|
|
65994
|
-
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;
|
|
66520
|
+
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;
|
|
65995
66521
|
new Set(Object.values(DeviceType));
|
|
65996
66522
|
Object.freeze({
|
|
65997
66523
|
"accessories.getStatus": {
|
|
@@ -66099,6 +66625,13 @@ Object.freeze({
|
|
|
66099
66625
|
access: "view",
|
|
66100
66626
|
role: "admin"
|
|
66101
66627
|
},
|
|
66628
|
+
"addons.getPackageDocs": {
|
|
66629
|
+
capName: "addons",
|
|
66630
|
+
capScope: "system",
|
|
66631
|
+
addonId: null,
|
|
66632
|
+
access: "view",
|
|
66633
|
+
role: "admin"
|
|
66634
|
+
},
|
|
66102
66635
|
"addons.getVersions": {
|
|
66103
66636
|
capName: "addons",
|
|
66104
66637
|
capScope: "system",
|
|
@@ -69207,6 +69740,20 @@ Object.freeze({
|
|
|
69207
69740
|
access: "view",
|
|
69208
69741
|
role: "viewer"
|
|
69209
69742
|
},
|
|
69743
|
+
"groupCommands.getStatus": {
|
|
69744
|
+
capName: "group-commands",
|
|
69745
|
+
capScope: "device",
|
|
69746
|
+
addonId: null,
|
|
69747
|
+
access: "view",
|
|
69748
|
+
role: "viewer"
|
|
69749
|
+
},
|
|
69750
|
+
"groupStatus.getStatus": {
|
|
69751
|
+
capName: "group-status",
|
|
69752
|
+
capScope: "device",
|
|
69753
|
+
addonId: null,
|
|
69754
|
+
access: "view",
|
|
69755
|
+
role: "viewer"
|
|
69756
|
+
},
|
|
69210
69757
|
"heatingValve.getStatus": {
|
|
69211
69758
|
capName: "heating-valve",
|
|
69212
69759
|
capScope: "device",
|
|
@@ -78257,7 +78804,39 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
78257
78804
|
phrase: t("When {device} finishes", "Quando {device} finisce"),
|
|
78258
78805
|
icon: "square"
|
|
78259
78806
|
}
|
|
78260
|
-
}
|
|
78807
|
+
},
|
|
78808
|
+
overrides: { byType: {
|
|
78809
|
+
[DeviceType.Washer]: {
|
|
78810
|
+
state: { running: {
|
|
78811
|
+
whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
|
|
78812
|
+
whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
|
|
78813
|
+
} },
|
|
78814
|
+
events: {
|
|
78815
|
+
onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
|
|
78816
|
+
onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
|
|
78817
|
+
}
|
|
78818
|
+
},
|
|
78819
|
+
[DeviceType.Dryer]: {
|
|
78820
|
+
state: { running: {
|
|
78821
|
+
whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
|
|
78822
|
+
whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
|
|
78823
|
+
} },
|
|
78824
|
+
events: {
|
|
78825
|
+
onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
|
|
78826
|
+
onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
|
|
78827
|
+
}
|
|
78828
|
+
},
|
|
78829
|
+
[DeviceType.Dishwasher]: {
|
|
78830
|
+
state: { running: {
|
|
78831
|
+
whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
|
|
78832
|
+
whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
|
|
78833
|
+
} },
|
|
78834
|
+
events: {
|
|
78835
|
+
onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
|
|
78836
|
+
onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
|
|
78837
|
+
}
|
|
78838
|
+
}
|
|
78839
|
+
} }
|
|
78261
78840
|
},
|
|
78262
78841
|
update: {
|
|
78263
78842
|
scope: "device",
|
|
@@ -79029,6 +79608,37 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
79029
79608
|
icon: "flame"
|
|
79030
79609
|
}]
|
|
79031
79610
|
},
|
|
79611
|
+
"group-commands": {
|
|
79612
|
+
scope: "device",
|
|
79613
|
+
noun: t("Group command", "Comando di gruppo")
|
|
79614
|
+
},
|
|
79615
|
+
"group-status": {
|
|
79616
|
+
scope: "device",
|
|
79617
|
+
noun: t("Group", "Gruppo"),
|
|
79618
|
+
state: [
|
|
79619
|
+
{
|
|
79620
|
+
kind: "numeric",
|
|
79621
|
+
field: "included",
|
|
79622
|
+
quantity: t("the members reporting", "i membri che rispondono"),
|
|
79623
|
+
label: t("Reporting", "Rispondono"),
|
|
79624
|
+
icon: "users"
|
|
79625
|
+
},
|
|
79626
|
+
{
|
|
79627
|
+
kind: "numeric",
|
|
79628
|
+
field: "excluded",
|
|
79629
|
+
quantity: t("the members left out", "i membri esclusi"),
|
|
79630
|
+
label: t("Excluded", "Esclusi"),
|
|
79631
|
+
icon: "users"
|
|
79632
|
+
},
|
|
79633
|
+
{
|
|
79634
|
+
kind: "numeric",
|
|
79635
|
+
field: "total",
|
|
79636
|
+
quantity: t("the member count", "il numero di membri"),
|
|
79637
|
+
label: t("Members", "Membri"),
|
|
79638
|
+
icon: "sigma"
|
|
79639
|
+
}
|
|
79640
|
+
]
|
|
79641
|
+
},
|
|
79032
79642
|
"humidity-sensor": {
|
|
79033
79643
|
scope: "device",
|
|
79034
79644
|
noun: t("Humidity", "Umidità"),
|
|
@@ -79526,8 +80136,72 @@ function projectAction(cap, action) {
|
|
|
79526
80136
|
};
|
|
79527
80137
|
}
|
|
79528
80138
|
Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
|
|
79529
|
-
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;
|
|
80139
|
+
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;
|
|
79530
80140
|
DeviceFeature.BatteryOperated;
|
|
80141
|
+
/**
|
|
80142
|
+
* How a washer, dryer or dishwasher leaves CamStack.
|
|
80143
|
+
*
|
|
80144
|
+
* Home Assistant has no laundry domain: the device is offered, and what
|
|
80145
|
+
* travels is its power reading. The others have a laundry type that this
|
|
80146
|
+
* export cannot honour yet, so they are named and withheld.
|
|
80147
|
+
*/
|
|
80148
|
+
var PLUG_APPLIANCE_TYPES = [
|
|
80149
|
+
DeviceType.Washer,
|
|
80150
|
+
DeviceType.Dryer,
|
|
80151
|
+
DeviceType.Dishwasher
|
|
80152
|
+
];
|
|
80153
|
+
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.";
|
|
80154
|
+
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.";
|
|
80155
|
+
var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
|
|
80156
|
+
var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
|
|
80157
|
+
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.";
|
|
80158
|
+
function withheld(reason) {
|
|
80159
|
+
return {
|
|
80160
|
+
[DeviceType.Washer]: {
|
|
80161
|
+
exported: false,
|
|
80162
|
+
reason
|
|
80163
|
+
},
|
|
80164
|
+
[DeviceType.Dryer]: {
|
|
80165
|
+
exported: false,
|
|
80166
|
+
reason
|
|
80167
|
+
},
|
|
80168
|
+
[DeviceType.Dishwasher]: {
|
|
80169
|
+
exported: false,
|
|
80170
|
+
reason
|
|
80171
|
+
}
|
|
80172
|
+
};
|
|
80173
|
+
}
|
|
80174
|
+
function offered(received) {
|
|
80175
|
+
return {
|
|
80176
|
+
[DeviceType.Washer]: {
|
|
80177
|
+
exported: true,
|
|
80178
|
+
as: received
|
|
80179
|
+
},
|
|
80180
|
+
[DeviceType.Dryer]: {
|
|
80181
|
+
exported: true,
|
|
80182
|
+
as: received
|
|
80183
|
+
},
|
|
80184
|
+
[DeviceType.Dishwasher]: {
|
|
80185
|
+
exported: true,
|
|
80186
|
+
as: received
|
|
80187
|
+
}
|
|
80188
|
+
};
|
|
80189
|
+
}
|
|
80190
|
+
var APPLIANCE_EXPORT = {
|
|
80191
|
+
ha: offered(HA_AS),
|
|
80192
|
+
homekit: withheld(HOMEKIT_REASON),
|
|
80193
|
+
alexa: withheld(ALEXA_REASON),
|
|
80194
|
+
google: withheld(GOOGLE_REASON),
|
|
80195
|
+
matter: withheld(MATTER_REASON)
|
|
80196
|
+
};
|
|
80197
|
+
function isPlugApplianceType(deviceType) {
|
|
80198
|
+
return PLUG_APPLIANCE_TYPES.some((type) => type === deviceType);
|
|
80199
|
+
}
|
|
80200
|
+
/** The decision for this ecosystem, or null when the type is not an appliance. */
|
|
80201
|
+
function applianceExport(ecosystem, deviceType) {
|
|
80202
|
+
if (!isPlugApplianceType(deviceType)) return null;
|
|
80203
|
+
return APPLIANCE_EXPORT[ecosystem][deviceType];
|
|
80204
|
+
}
|
|
79531
80205
|
Object.freeze({
|
|
79532
80206
|
"accessories.getStatus": [{
|
|
79533
80207
|
name: "deviceId",
|
|
@@ -80494,6 +81168,16 @@ Object.freeze({
|
|
|
80494
81168
|
form: "single",
|
|
80495
81169
|
optional: false
|
|
80496
81170
|
}],
|
|
81171
|
+
"groupCommands.getStatus": [{
|
|
81172
|
+
name: "deviceId",
|
|
81173
|
+
form: "single",
|
|
81174
|
+
optional: false
|
|
81175
|
+
}],
|
|
81176
|
+
"groupStatus.getStatus": [{
|
|
81177
|
+
name: "deviceId",
|
|
81178
|
+
form: "single",
|
|
81179
|
+
optional: false
|
|
81180
|
+
}],
|
|
80497
81181
|
"heatingValve.getStatus": [{
|
|
80498
81182
|
name: "deviceId",
|
|
80499
81183
|
form: "single",
|
|
@@ -82478,6 +83162,8 @@ new Map(Object.entries({
|
|
|
82478
83162
|
"detection-blind": "device-events",
|
|
82479
83163
|
"motion-noisy": "device-events",
|
|
82480
83164
|
"motion-calm": "device-events",
|
|
83165
|
+
"package-llm-silent": "device-events",
|
|
83166
|
+
"package-llm-answered": "device-events",
|
|
82481
83167
|
"recording-stalled": "device-events",
|
|
82482
83168
|
"recording-healthy": "device-events",
|
|
82483
83169
|
"recording-degraded": "device-events",
|
|
@@ -82561,6 +83247,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
82561
83247
|
label: "Motion without a subject",
|
|
82562
83248
|
kinds: ["motion-noisy", "motion-calm"]
|
|
82563
83249
|
},
|
|
83250
|
+
{
|
|
83251
|
+
id: "package-llm",
|
|
83252
|
+
family: "device-events",
|
|
83253
|
+
label: "Package confirm",
|
|
83254
|
+
kinds: ["package-llm-silent", "package-llm-answered"]
|
|
83255
|
+
},
|
|
82564
83256
|
{
|
|
82565
83257
|
id: "recording",
|
|
82566
83258
|
family: "device-events",
|
|
@@ -82742,6 +83434,8 @@ var DEVICE_EVENTS = [
|
|
|
82742
83434
|
"detection-blind",
|
|
82743
83435
|
"motion-noisy",
|
|
82744
83436
|
"motion-calm",
|
|
83437
|
+
"package-llm-silent",
|
|
83438
|
+
"package-llm-answered",
|
|
82745
83439
|
"recording-stalled",
|
|
82746
83440
|
"recording-healthy",
|
|
82747
83441
|
"recording-degraded",
|
|
@@ -83010,6 +83704,15 @@ new Map([
|
|
|
83010
83704
|
snapshotLabel: "Cameras with constant motion now",
|
|
83011
83705
|
snapshotSection: null
|
|
83012
83706
|
},
|
|
83707
|
+
{
|
|
83708
|
+
id: "package-llm-confirm",
|
|
83709
|
+
family: "device-events",
|
|
83710
|
+
label: "Package confirm (not answering / answering again)",
|
|
83711
|
+
bad: ["package-llm-silent"],
|
|
83712
|
+
recovery: ["package-llm-answered"],
|
|
83713
|
+
snapshotLabel: "Cameras whose package confirm is not answering",
|
|
83714
|
+
snapshotSection: null
|
|
83715
|
+
},
|
|
83013
83716
|
{
|
|
83014
83717
|
id: "recording-health",
|
|
83015
83718
|
family: "device-events",
|
|
@@ -148784,6 +149487,8 @@ var HAP_EXPORTABLE_DEVICE_TYPES = [
|
|
|
148784
149487
|
function pickMapperKind(deviceType) {
|
|
148785
149488
|
if (deviceType === null || deviceType === void 0 || deviceType.length === 0) return "camera";
|
|
148786
149489
|
if (deviceType === DeviceType.Camera) return "camera";
|
|
149490
|
+
const withheld = applianceExport("homekit", deviceType);
|
|
149491
|
+
if (withheld !== null && !withheld.exported) return null;
|
|
148787
149492
|
return HAP_EXPORTABLE_DEVICE_TYPES.find((type) => type === deviceType) === void 0 ? null : "generic";
|
|
148788
149493
|
}
|
|
148789
149494
|
/**
|