@camstack/addon-export-alexa 1.2.169 → 1.2.171
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/export-alexa.addon.js +734 -20
- package/dist/export-alexa.addon.mjs +734 -20
- package/package.json +4 -2
|
@@ -34,7 +34,7 @@ let node_path = require("node:path");
|
|
|
34
34
|
node_path = __toESM(node_path, 1);
|
|
35
35
|
require("node:child_process");
|
|
36
36
|
require("node:zlib");
|
|
37
|
-
//#region ../types/dist/event-category-
|
|
37
|
+
//#region ../types/dist/event-category-CT-hz5Rb.mjs
|
|
38
38
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
39
39
|
EventCategory["SystemBoot"] = "system.boot";
|
|
40
40
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -360,6 +360,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
360
360
|
/** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
|
|
361
361
|
EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
|
|
362
362
|
/**
|
|
363
|
+
* A camera's package LLM confirm has failed closed three times in a row
|
|
364
|
+
* (D931, 2026-10-26). One edge per camera until
|
|
365
|
+
* {@link PipelinePackageLlmAnswered}.
|
|
366
|
+
*/
|
|
367
|
+
EventCategory["PipelinePackageLlmSilent"] = "pipeline.package-llm-silent";
|
|
368
|
+
/** The recovery edge of {@link PipelinePackageLlmSilent}: a confirm returned yes or no. */
|
|
369
|
+
EventCategory["PipelinePackageLlmAnswered"] = "pipeline.package-llm-answered";
|
|
370
|
+
/**
|
|
363
371
|
* Per-camera pipeline config was mutated by the orchestrator
|
|
364
372
|
* (a settings change via `setAgentInferenceDevices` /
|
|
365
373
|
* `setCameraStepToggle` / `setCameraStepSettings`). Orchestrator
|
|
@@ -5469,7 +5477,7 @@ var ZodIssueCode = {
|
|
|
5469
5477
|
var ZodFirstPartyTypeKind;
|
|
5470
5478
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5471
5479
|
//#endregion
|
|
5472
|
-
//#region ../types/dist/sleep-
|
|
5480
|
+
//#region ../types/dist/sleep-bykKrTgu.mjs
|
|
5473
5481
|
/**
|
|
5474
5482
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5475
5483
|
* window to float samples (D455).
|
|
@@ -7995,6 +8003,53 @@ var READING_QUANTITIES = [
|
|
|
7995
8003
|
];
|
|
7996
8004
|
var ReadingQuantitySchema = _enum(READING_QUANTITIES);
|
|
7997
8005
|
new Set(READING_QUANTITIES);
|
|
8006
|
+
/**
|
|
8007
|
+
* Stored unit symbol for a quantity. `none` means the number is dimensionless
|
|
8008
|
+
* (or an index / ratio / count). `device` means the cap has no single unit.
|
|
8009
|
+
*/
|
|
8010
|
+
var QUANTITY_BASE = {
|
|
8011
|
+
temperature: "°C",
|
|
8012
|
+
pressure: "hPa",
|
|
8013
|
+
speed: "m/s",
|
|
8014
|
+
precipitation: "mm",
|
|
8015
|
+
"precipitation-rate": "mm/h",
|
|
8016
|
+
length: "m",
|
|
8017
|
+
area: "m²",
|
|
8018
|
+
illuminance: "lx",
|
|
8019
|
+
irradiance: "W/m²",
|
|
8020
|
+
power: "W",
|
|
8021
|
+
energy: "kWh",
|
|
8022
|
+
voltage: "V",
|
|
8023
|
+
current: "A",
|
|
8024
|
+
"apparent-power": "VA",
|
|
8025
|
+
humidity: "%",
|
|
8026
|
+
percentage: "%",
|
|
8027
|
+
"concentration-volume": "ppm",
|
|
8028
|
+
"concentration-mass": "µg/m³",
|
|
8029
|
+
"concentration-ppb": "ppb",
|
|
8030
|
+
volume: "L",
|
|
8031
|
+
duration: "s",
|
|
8032
|
+
"duration-ms": "ms",
|
|
8033
|
+
information: "B",
|
|
8034
|
+
"sound-level": "dBFS",
|
|
8035
|
+
"signal-level": "dBm",
|
|
8036
|
+
"colour-temperature": "mired",
|
|
8037
|
+
angle: "°",
|
|
8038
|
+
bitrate: "kbps",
|
|
8039
|
+
rate: "fps",
|
|
8040
|
+
mass: "kg",
|
|
8041
|
+
index: "none",
|
|
8042
|
+
ratio: "none",
|
|
8043
|
+
count: "none",
|
|
8044
|
+
none: "none",
|
|
8045
|
+
device: "device"
|
|
8046
|
+
};
|
|
8047
|
+
/** The stored unit, or `undefined` when the quantity has no unit symbol. */
|
|
8048
|
+
function baseUnitOf(quantity) {
|
|
8049
|
+
const symbol = QUANTITY_BASE[quantity];
|
|
8050
|
+
if (symbol === "none" || symbol === "device") return void 0;
|
|
8051
|
+
return symbol;
|
|
8052
|
+
}
|
|
7998
8053
|
function readingMeta(quantity, extras) {
|
|
7999
8054
|
return {
|
|
8000
8055
|
quantity,
|
|
@@ -8566,6 +8621,8 @@ var CAP_NAMES = Object.freeze([
|
|
|
8566
8621
|
"filesystem-browse",
|
|
8567
8622
|
"flood",
|
|
8568
8623
|
"gas",
|
|
8624
|
+
"group-commands",
|
|
8625
|
+
"group-status",
|
|
8569
8626
|
"heating-valve",
|
|
8570
8627
|
"humidifier",
|
|
8571
8628
|
"humidity-sensor",
|
|
@@ -9384,6 +9441,20 @@ Object.freeze({
|
|
|
9384
9441
|
"path": "detected",
|
|
9385
9442
|
"valueType": "boolean"
|
|
9386
9443
|
}],
|
|
9444
|
+
"group-status": [
|
|
9445
|
+
{
|
|
9446
|
+
"path": "included",
|
|
9447
|
+
"valueType": "number"
|
|
9448
|
+
},
|
|
9449
|
+
{
|
|
9450
|
+
"path": "excluded",
|
|
9451
|
+
"valueType": "number"
|
|
9452
|
+
},
|
|
9453
|
+
{
|
|
9454
|
+
"path": "total",
|
|
9455
|
+
"valueType": "number"
|
|
9456
|
+
}
|
|
9457
|
+
],
|
|
9387
9458
|
"heating-valve": [{
|
|
9388
9459
|
"path": "position",
|
|
9389
9460
|
"valueType": "number"
|
|
@@ -10372,7 +10443,7 @@ object({
|
|
|
10372
10443
|
params: record(string(), union([string(), number()])).optional()
|
|
10373
10444
|
});
|
|
10374
10445
|
//#endregion
|
|
10375
|
-
//#region ../types/dist/err-msg-
|
|
10446
|
+
//#region ../types/dist/err-msg-DIorGYeC.mjs
|
|
10376
10447
|
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
10377
10448
|
DeviceType["Camera"] = "camera";
|
|
10378
10449
|
DeviceType["Hub"] = "hub";
|
|
@@ -10466,8 +10537,14 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
10466
10537
|
DeviceType["PetFeeder"] = "pet-feeder";
|
|
10467
10538
|
/** Built-in dishwasher — program lifecycle, door / remote-start gates,
|
|
10468
10539
|
* salt and rinse-aid levels. Installed with the `dishwasher` cap.
|
|
10469
|
-
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
10540
|
+
* Sources: native Bosch Home Connect, reusable by similar integrations.
|
|
10541
|
+
* A plug-built dishwasher carries running-state and power instead. */
|
|
10470
10542
|
DeviceType["Dishwasher"] = "dishwasher";
|
|
10543
|
+
/** Washing machine. A plug-built one is running while its power stays
|
|
10544
|
+
* above a threshold. No program cap — that surface is the dishwasher's. */
|
|
10545
|
+
DeviceType["Washer"] = "washer";
|
|
10546
|
+
/** Tumble dryer. Same plug-built running surface as {@link Washer}. */
|
|
10547
|
+
DeviceType["Dryer"] = "dryer";
|
|
10471
10548
|
return DeviceType;
|
|
10472
10549
|
}({});
|
|
10473
10550
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -10725,7 +10802,7 @@ function errMsg(err) {
|
|
|
10725
10802
|
return String(err);
|
|
10726
10803
|
}
|
|
10727
10804
|
//#endregion
|
|
10728
|
-
//#region ../types/dist/composition-
|
|
10805
|
+
//#region ../types/dist/composition-B2rw5L29.mjs
|
|
10729
10806
|
/**
|
|
10730
10807
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
10731
10808
|
*
|
|
@@ -11480,15 +11557,102 @@ function validateExpressionSource(src) {
|
|
|
11480
11557
|
}
|
|
11481
11558
|
return null;
|
|
11482
11559
|
}
|
|
11483
|
-
/**
|
|
11484
|
-
|
|
11485
|
-
|
|
11486
|
-
|
|
11560
|
+
/**
|
|
11561
|
+
* One power reading becomes a washer, dryer or dishwasher (D944 helper).
|
|
11562
|
+
*
|
|
11563
|
+
* Standby of the control board is under 5 W; a motor or a heater is far
|
|
11564
|
+
* above that, so 5 W is the line. A door lock or a short pump spike is not
|
|
11565
|
+
* a cycle, so running starts only after 30 s above the line.
|
|
11566
|
+
*
|
|
11567
|
+
* A wash, dry or dishwasher pause (soak, heat-wait, heater off between
|
|
11568
|
+
* bursts) lasts several minutes. Ending the cycle on the first dip would
|
|
11569
|
+
* report "finished" in the middle of the program, so the stop dwell is
|
|
11570
|
+
* 10 minutes on every type. The number is stored per type so one machine
|
|
11571
|
+
* can move later without moving the others.
|
|
11572
|
+
*/
|
|
11573
|
+
var APPLIANCE_TEMPLATE_ID = "appliance";
|
|
11574
|
+
var APPLIANCE_KINDS = [
|
|
11575
|
+
"washer",
|
|
11576
|
+
"dryer",
|
|
11577
|
+
"dishwasher"
|
|
11578
|
+
];
|
|
11579
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
11580
|
+
/**
|
|
11581
|
+
* A composition source identity: `(addonId, stableId)`, never a numeric device
|
|
11582
|
+
* id. Split out so helper schemas can name it without a cycle through
|
|
11583
|
+
* `composition.ts` (D659).
|
|
11584
|
+
*/
|
|
11487
11585
|
var CompositionSourceRefSchema = object({
|
|
11488
11586
|
/** The owning addon; `stableId` is unique only within it. */
|
|
11489
11587
|
addonId: string().min(1),
|
|
11490
11588
|
stableId: string().min(1)
|
|
11491
11589
|
});
|
|
11590
|
+
var GROUP_TEMPLATE_IDS = [
|
|
11591
|
+
"temperature",
|
|
11592
|
+
"humidity",
|
|
11593
|
+
"pressure",
|
|
11594
|
+
"illuminance",
|
|
11595
|
+
"power",
|
|
11596
|
+
"energy",
|
|
11597
|
+
"battery",
|
|
11598
|
+
"numeric",
|
|
11599
|
+
"motion",
|
|
11600
|
+
"contact",
|
|
11601
|
+
"leak",
|
|
11602
|
+
"smoke",
|
|
11603
|
+
"occupancy",
|
|
11604
|
+
"binary",
|
|
11605
|
+
"switch",
|
|
11606
|
+
"light"
|
|
11607
|
+
];
|
|
11608
|
+
var NUMERIC_AGGREGATES = [
|
|
11609
|
+
"mean",
|
|
11610
|
+
"median",
|
|
11611
|
+
"min",
|
|
11612
|
+
"max",
|
|
11613
|
+
"sum"
|
|
11614
|
+
];
|
|
11615
|
+
var BINARY_AGGREGATES = ["any", "all"];
|
|
11616
|
+
/** How an actuator group decides it is on. Unknown members never count as off. */
|
|
11617
|
+
var ACTIVE_CRITERIA = ["at-least-one", "all"];
|
|
11618
|
+
var AGGREGATE_REDUCERS = [
|
|
11619
|
+
"mean",
|
|
11620
|
+
"median",
|
|
11621
|
+
"min",
|
|
11622
|
+
"max",
|
|
11623
|
+
"sum",
|
|
11624
|
+
"any",
|
|
11625
|
+
"all"
|
|
11626
|
+
];
|
|
11627
|
+
var GroupTemplateIdSchema = _enum(GROUP_TEMPLATE_IDS);
|
|
11628
|
+
var AggregateReducerSchema = _enum(AGGREGATE_REDUCERS);
|
|
11629
|
+
var ActiveCriterionSchema = _enum(ACTIVE_CRITERIA);
|
|
11630
|
+
/** One member. The field is stored so occupancy can name motion or binary. */
|
|
11631
|
+
var HelperMemberSchema = object({
|
|
11632
|
+
source: CompositionSourceRefSchema,
|
|
11633
|
+
cap: string().min(1),
|
|
11634
|
+
fieldPath: string().min(1)
|
|
11635
|
+
});
|
|
11636
|
+
var HelperSpecSchema = discriminatedUnion("kind", [object({
|
|
11637
|
+
kind: literal("group"),
|
|
11638
|
+
templateId: GroupTemplateIdSchema,
|
|
11639
|
+
aggregate: AggregateReducerSchema,
|
|
11640
|
+
members: array(HelperMemberSchema).min(1).max(64),
|
|
11641
|
+
/** Actuator groups only. Readings leave this unset. */
|
|
11642
|
+
active: ActiveCriterionSchema.optional()
|
|
11643
|
+
}), object({
|
|
11644
|
+
kind: literal("appliance"),
|
|
11645
|
+
templateId: literal(APPLIANCE_TEMPLATE_ID),
|
|
11646
|
+
appliance: _enum(APPLIANCE_KINDS),
|
|
11647
|
+
thresholdWatts: number().positive(),
|
|
11648
|
+
startDwellMs: number().int().nonnegative(),
|
|
11649
|
+
stopDwellMs: number().int().nonnegative(),
|
|
11650
|
+
member: HelperMemberSchema
|
|
11651
|
+
})]);
|
|
11652
|
+
/** A composed device's stableId is this prefix plus the block id. */
|
|
11653
|
+
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
11654
|
+
/** Longest snippet a `code` source may carry (slice 4). */
|
|
11655
|
+
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
11492
11656
|
/** One field of one capability of one source device. */
|
|
11493
11657
|
var CompositionFieldReadSchema = object({
|
|
11494
11658
|
source: CompositionSourceRefSchema,
|
|
@@ -11532,7 +11696,33 @@ var CompositionCodeSourceSchema = object({
|
|
|
11532
11696
|
var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
11533
11697
|
CompositionFromSourceSchema,
|
|
11534
11698
|
CompositionExpressionSourceSchema,
|
|
11535
|
-
CompositionCodeSourceSchema
|
|
11699
|
+
CompositionCodeSourceSchema,
|
|
11700
|
+
object({
|
|
11701
|
+
kind: literal("aggregate"),
|
|
11702
|
+
reducer: _enum([
|
|
11703
|
+
"mean",
|
|
11704
|
+
"median",
|
|
11705
|
+
"min",
|
|
11706
|
+
"max",
|
|
11707
|
+
"sum",
|
|
11708
|
+
"any",
|
|
11709
|
+
"all"
|
|
11710
|
+
]),
|
|
11711
|
+
reads: array(CompositionFieldReadSchema).min(1).max(64),
|
|
11712
|
+
/** `value` is the reading; the others are the member counts. */
|
|
11713
|
+
publish: _enum([
|
|
11714
|
+
"value",
|
|
11715
|
+
"included",
|
|
11716
|
+
"excluded",
|
|
11717
|
+
"total"
|
|
11718
|
+
]),
|
|
11719
|
+
/** What a `value` publish does when nobody is included. Counts ignore this. */
|
|
11720
|
+
empty: _enum([
|
|
11721
|
+
"null",
|
|
11722
|
+
"omit",
|
|
11723
|
+
"offline"
|
|
11724
|
+
])
|
|
11725
|
+
})
|
|
11536
11726
|
]);
|
|
11537
11727
|
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
11538
11728
|
kind: literal("forward"),
|
|
@@ -11578,7 +11768,13 @@ var CompositionSchema = object({
|
|
|
11578
11768
|
kind: literal("existing"),
|
|
11579
11769
|
device: CompositionSourceRefSchema
|
|
11580
11770
|
})]),
|
|
11581
|
-
features: array(CompositionFeatureSchema).min(1).max(16)
|
|
11771
|
+
features: array(CompositionFeatureSchema).min(1).max(16),
|
|
11772
|
+
/**
|
|
11773
|
+
* Present when the block is a helper template. Absent on a free
|
|
11774
|
+
* composition (the room example, device 4603). The editor reads this,
|
|
11775
|
+
* never the compiled features.
|
|
11776
|
+
*/
|
|
11777
|
+
helper: HelperSpecSchema.optional()
|
|
11582
11778
|
}).superRefine((composition, ctx) => {
|
|
11583
11779
|
const seen = /* @__PURE__ */ new Set();
|
|
11584
11780
|
composition.features.forEach((feature, index) => {
|
|
@@ -17987,7 +18183,10 @@ var CompositionProblemSchema = object({
|
|
|
17987
18183
|
"target-missing",
|
|
17988
18184
|
"target-unreadable",
|
|
17989
18185
|
"not-replaceable",
|
|
17990
|
-
"native-capability-replace"
|
|
18186
|
+
"native-capability-replace",
|
|
18187
|
+
"mixed-quantity",
|
|
18188
|
+
"helper-mismatch",
|
|
18189
|
+
"member-constraint"
|
|
17991
18190
|
]),
|
|
17992
18191
|
path: string(),
|
|
17993
18192
|
message: string()
|
|
@@ -18008,7 +18207,8 @@ var CompositionUnavailableModeSchema = _enum([
|
|
|
18008
18207
|
"null",
|
|
18009
18208
|
"offline",
|
|
18010
18209
|
"unknown",
|
|
18011
|
-
"release"
|
|
18210
|
+
"release",
|
|
18211
|
+
"omit"
|
|
18012
18212
|
]);
|
|
18013
18213
|
/**
|
|
18014
18214
|
* `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
|
|
@@ -18222,6 +18422,275 @@ Object.freeze({
|
|
|
18222
18422
|
result: ["number", "null"]
|
|
18223
18423
|
}
|
|
18224
18424
|
});
|
|
18425
|
+
/**
|
|
18426
|
+
* One catalog row per base reading a group helper can build (D944 §3).
|
|
18427
|
+
* Data, not a form default written into the block.
|
|
18428
|
+
*/
|
|
18429
|
+
var NOW = {
|
|
18430
|
+
fieldPath: "lastFetchedAt",
|
|
18431
|
+
expr: "now"
|
|
18432
|
+
};
|
|
18433
|
+
var CHANGED = {
|
|
18434
|
+
fieldPath: "lastChangedAt",
|
|
18435
|
+
expr: "now"
|
|
18436
|
+
};
|
|
18437
|
+
function numeric(input) {
|
|
18438
|
+
return {
|
|
18439
|
+
...input,
|
|
18440
|
+
family: "numeric",
|
|
18441
|
+
deviceType: DeviceType.Sensor,
|
|
18442
|
+
memberDeviceType: DeviceType.Sensor,
|
|
18443
|
+
commandCaps: [],
|
|
18444
|
+
baseUnit: baseUnitOf(input.quantity),
|
|
18445
|
+
aggregates: NUMERIC_AGGREGATES,
|
|
18446
|
+
accept: [{
|
|
18447
|
+
cap: input.outputCap,
|
|
18448
|
+
fieldPath: input.outputField
|
|
18449
|
+
}]
|
|
18450
|
+
};
|
|
18451
|
+
}
|
|
18452
|
+
function binary(input) {
|
|
18453
|
+
return {
|
|
18454
|
+
...input,
|
|
18455
|
+
family: "binary",
|
|
18456
|
+
deviceType: DeviceType.Sensor,
|
|
18457
|
+
memberDeviceType: DeviceType.Sensor,
|
|
18458
|
+
commandCaps: [],
|
|
18459
|
+
quantity: "none",
|
|
18460
|
+
baseUnit: void 0,
|
|
18461
|
+
aggregates: BINARY_AGGREGATES,
|
|
18462
|
+
empty: "offline"
|
|
18463
|
+
};
|
|
18464
|
+
}
|
|
18465
|
+
var GROUP_TEMPLATES = [
|
|
18466
|
+
numeric({
|
|
18467
|
+
id: "temperature",
|
|
18468
|
+
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
18469
|
+
role: DeviceRole.TemperatureSensor,
|
|
18470
|
+
outputCap: "temperature-sensor",
|
|
18471
|
+
outputField: "celsius",
|
|
18472
|
+
quantity: "temperature",
|
|
18473
|
+
defaultAggregate: "mean",
|
|
18474
|
+
empty: "null",
|
|
18475
|
+
companions: [NOW]
|
|
18476
|
+
}),
|
|
18477
|
+
numeric({
|
|
18478
|
+
id: "humidity",
|
|
18479
|
+
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18480
|
+
role: DeviceRole.HumiditySensor,
|
|
18481
|
+
outputCap: "humidity-sensor",
|
|
18482
|
+
outputField: "percent",
|
|
18483
|
+
quantity: "humidity",
|
|
18484
|
+
defaultAggregate: "mean",
|
|
18485
|
+
empty: "null",
|
|
18486
|
+
companions: [NOW]
|
|
18487
|
+
}),
|
|
18488
|
+
numeric({
|
|
18489
|
+
id: "pressure",
|
|
18490
|
+
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
18491
|
+
role: DeviceRole.PressureSensor,
|
|
18492
|
+
outputCap: "pressure-sensor",
|
|
18493
|
+
outputField: "hpa",
|
|
18494
|
+
quantity: "pressure",
|
|
18495
|
+
defaultAggregate: "mean",
|
|
18496
|
+
empty: "null",
|
|
18497
|
+
companions: [NOW]
|
|
18498
|
+
}),
|
|
18499
|
+
numeric({
|
|
18500
|
+
id: "illuminance",
|
|
18501
|
+
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
18502
|
+
role: DeviceRole.AmbientLightSensor,
|
|
18503
|
+
outputCap: "ambient-light-sensor",
|
|
18504
|
+
outputField: "lux",
|
|
18505
|
+
quantity: "illuminance",
|
|
18506
|
+
defaultAggregate: "mean",
|
|
18507
|
+
empty: "null",
|
|
18508
|
+
companions: [NOW]
|
|
18509
|
+
}),
|
|
18510
|
+
numeric({
|
|
18511
|
+
id: "power",
|
|
18512
|
+
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
18513
|
+
role: DeviceRole.PowerSensor,
|
|
18514
|
+
outputCap: "power-meter",
|
|
18515
|
+
outputField: "watts",
|
|
18516
|
+
quantity: "power",
|
|
18517
|
+
defaultAggregate: "sum",
|
|
18518
|
+
empty: "omit",
|
|
18519
|
+
companions: [NOW]
|
|
18520
|
+
}),
|
|
18521
|
+
numeric({
|
|
18522
|
+
id: "energy",
|
|
18523
|
+
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
18524
|
+
role: DeviceRole.EnergySensor,
|
|
18525
|
+
outputCap: "power-meter",
|
|
18526
|
+
outputField: "kwhTotal",
|
|
18527
|
+
quantity: "energy",
|
|
18528
|
+
defaultAggregate: "sum",
|
|
18529
|
+
empty: "omit",
|
|
18530
|
+
companions: [NOW]
|
|
18531
|
+
}),
|
|
18532
|
+
numeric({
|
|
18533
|
+
id: "battery",
|
|
18534
|
+
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18535
|
+
role: DeviceRole.BatterySensor,
|
|
18536
|
+
outputCap: "battery",
|
|
18537
|
+
outputField: "percentage",
|
|
18538
|
+
quantity: "percentage",
|
|
18539
|
+
defaultAggregate: "mean",
|
|
18540
|
+
empty: "null",
|
|
18541
|
+
companions: [
|
|
18542
|
+
{
|
|
18543
|
+
fieldPath: "charging",
|
|
18544
|
+
expr: "\"unknown\""
|
|
18545
|
+
},
|
|
18546
|
+
{
|
|
18547
|
+
fieldPath: "sleeping",
|
|
18548
|
+
expr: "false"
|
|
18549
|
+
},
|
|
18550
|
+
{
|
|
18551
|
+
fieldPath: "lastUpdated",
|
|
18552
|
+
expr: "now"
|
|
18553
|
+
}
|
|
18554
|
+
]
|
|
18555
|
+
}),
|
|
18556
|
+
numeric({
|
|
18557
|
+
id: "numeric",
|
|
18558
|
+
summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
|
|
18559
|
+
role: DeviceRole.NumericSensor,
|
|
18560
|
+
outputCap: "numeric-sensor",
|
|
18561
|
+
outputField: "value",
|
|
18562
|
+
quantity: "device",
|
|
18563
|
+
defaultAggregate: "mean",
|
|
18564
|
+
empty: "null",
|
|
18565
|
+
companions: [NOW]
|
|
18566
|
+
}),
|
|
18567
|
+
binary({
|
|
18568
|
+
id: "motion",
|
|
18569
|
+
summary: "Any or all motion. Offline and unknown members are left out, never read as off. Nobody reporting takes the device offline.",
|
|
18570
|
+
role: DeviceRole.MotionSensor,
|
|
18571
|
+
outputCap: "motion",
|
|
18572
|
+
outputField: "detected",
|
|
18573
|
+
defaultAggregate: "any",
|
|
18574
|
+
accept: [{
|
|
18575
|
+
cap: "motion",
|
|
18576
|
+
fieldPath: "detected"
|
|
18577
|
+
}],
|
|
18578
|
+
companions: [{
|
|
18579
|
+
fieldPath: "lastDetectedAt",
|
|
18580
|
+
expr: "null"
|
|
18581
|
+
}, {
|
|
18582
|
+
fieldPath: "autoClearAfterMs",
|
|
18583
|
+
expr: "null"
|
|
18584
|
+
}]
|
|
18585
|
+
}),
|
|
18586
|
+
binary({
|
|
18587
|
+
id: "contact",
|
|
18588
|
+
summary: "Any or all open contacts. Offline and unknown members are left out, never read as closed.",
|
|
18589
|
+
role: DeviceRole.ContactSensor,
|
|
18590
|
+
outputCap: "contact",
|
|
18591
|
+
outputField: "entryOpen",
|
|
18592
|
+
defaultAggregate: "any",
|
|
18593
|
+
accept: [{
|
|
18594
|
+
cap: "contact",
|
|
18595
|
+
fieldPath: "entryOpen"
|
|
18596
|
+
}],
|
|
18597
|
+
companions: [CHANGED]
|
|
18598
|
+
}),
|
|
18599
|
+
binary({
|
|
18600
|
+
id: "leak",
|
|
18601
|
+
summary: "Any or all leak detections. Offline and unknown members are left out, never read as dry.",
|
|
18602
|
+
role: DeviceRole.LeakSensor,
|
|
18603
|
+
outputCap: "flood",
|
|
18604
|
+
outputField: "flooded",
|
|
18605
|
+
defaultAggregate: "any",
|
|
18606
|
+
accept: [{
|
|
18607
|
+
cap: "flood",
|
|
18608
|
+
fieldPath: "flooded"
|
|
18609
|
+
}],
|
|
18610
|
+
companions: [CHANGED]
|
|
18611
|
+
}),
|
|
18612
|
+
binary({
|
|
18613
|
+
id: "smoke",
|
|
18614
|
+
summary: "Any or all smoke detections. Offline and unknown members are left out, never read as clear.",
|
|
18615
|
+
role: DeviceRole.SmokeSensor,
|
|
18616
|
+
outputCap: "smoke",
|
|
18617
|
+
outputField: "detected",
|
|
18618
|
+
defaultAggregate: "any",
|
|
18619
|
+
accept: [{
|
|
18620
|
+
cap: "smoke",
|
|
18621
|
+
fieldPath: "detected"
|
|
18622
|
+
}],
|
|
18623
|
+
companions: [CHANGED]
|
|
18624
|
+
}),
|
|
18625
|
+
binary({
|
|
18626
|
+
id: "occupancy",
|
|
18627
|
+
summary: "Any or all of motion or binary sensors, published as a binary. Presence zones are not aggregated. Nobody reporting is offline, not off.",
|
|
18628
|
+
role: DeviceRole.BinarySensor,
|
|
18629
|
+
outputCap: "binary",
|
|
18630
|
+
outputField: "on",
|
|
18631
|
+
defaultAggregate: "any",
|
|
18632
|
+
accept: [{
|
|
18633
|
+
cap: "motion",
|
|
18634
|
+
fieldPath: "detected"
|
|
18635
|
+
}, {
|
|
18636
|
+
cap: "binary",
|
|
18637
|
+
fieldPath: "on"
|
|
18638
|
+
}],
|
|
18639
|
+
companions: [CHANGED]
|
|
18640
|
+
}),
|
|
18641
|
+
binary({
|
|
18642
|
+
id: "binary",
|
|
18643
|
+
summary: "Any or all generic binary sensors. Offline and unknown members are left out, never read as off.",
|
|
18644
|
+
role: DeviceRole.BinarySensor,
|
|
18645
|
+
outputCap: "binary",
|
|
18646
|
+
outputField: "on",
|
|
18647
|
+
defaultAggregate: "any",
|
|
18648
|
+
accept: [{
|
|
18649
|
+
cap: "binary",
|
|
18650
|
+
fieldPath: "on"
|
|
18651
|
+
}],
|
|
18652
|
+
companions: [CHANGED]
|
|
18653
|
+
}),
|
|
18654
|
+
actuator({
|
|
18655
|
+
id: "switch",
|
|
18656
|
+
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.",
|
|
18657
|
+
deviceType: DeviceType.Switch,
|
|
18658
|
+
outputCap: "switch",
|
|
18659
|
+
commandCaps: ["switch"]
|
|
18660
|
+
}),
|
|
18661
|
+
actuator({
|
|
18662
|
+
id: "light",
|
|
18663
|
+
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.",
|
|
18664
|
+
deviceType: DeviceType.Light,
|
|
18665
|
+
outputCap: "switch",
|
|
18666
|
+
commandCaps: [
|
|
18667
|
+
"switch",
|
|
18668
|
+
"brightness",
|
|
18669
|
+
"color"
|
|
18670
|
+
]
|
|
18671
|
+
})
|
|
18672
|
+
];
|
|
18673
|
+
function actuator(input) {
|
|
18674
|
+
return {
|
|
18675
|
+
...input,
|
|
18676
|
+
family: "actuator",
|
|
18677
|
+
role: void 0,
|
|
18678
|
+
memberDeviceType: input.deviceType,
|
|
18679
|
+
outputField: "on",
|
|
18680
|
+
quantity: "none",
|
|
18681
|
+
baseUnit: void 0,
|
|
18682
|
+
aggregates: BINARY_AGGREGATES,
|
|
18683
|
+
defaultAggregate: "any",
|
|
18684
|
+
empty: "offline",
|
|
18685
|
+
accept: [{
|
|
18686
|
+
cap: "switch",
|
|
18687
|
+
fieldPath: "on"
|
|
18688
|
+
}],
|
|
18689
|
+
companions: [CHANGED]
|
|
18690
|
+
};
|
|
18691
|
+
}
|
|
18692
|
+
new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
|
|
18693
|
+
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
18225
18694
|
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
18226
18695
|
/**
|
|
18227
18696
|
* What a composition may BUILD on a device type (G2, D676): the caps a new
|
|
@@ -44813,6 +45282,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
44813
45282
|
"detection-blind",
|
|
44814
45283
|
"motion-noisy",
|
|
44815
45284
|
"motion-calm",
|
|
45285
|
+
"package-llm-silent",
|
|
45286
|
+
"package-llm-answered",
|
|
44816
45287
|
"recording-stalled",
|
|
44817
45288
|
"recording-healthy",
|
|
44818
45289
|
"recording-degraded",
|
|
@@ -55843,6 +56314,28 @@ var PackageVersionInfoSchema = object({
|
|
|
55843
56314
|
deprecated: string().optional(),
|
|
55844
56315
|
distTags: array(string()).readonly()
|
|
55845
56316
|
});
|
|
56317
|
+
/**
|
|
56318
|
+
* One published document. `ok` is markdown from the registry. `missing` means
|
|
56319
|
+
* the registry answered and the file was not there. `error` is a registry or
|
|
56320
|
+
* tarball failure — never an empty string standing in for either.
|
|
56321
|
+
*/
|
|
56322
|
+
var PackageDocBodySchema = discriminatedUnion("status", [
|
|
56323
|
+
object({
|
|
56324
|
+
status: literal("ok"),
|
|
56325
|
+
markdown: string()
|
|
56326
|
+
}),
|
|
56327
|
+
object({ status: literal("missing") }),
|
|
56328
|
+
object({
|
|
56329
|
+
status: literal("error"),
|
|
56330
|
+
message: string()
|
|
56331
|
+
})
|
|
56332
|
+
]);
|
|
56333
|
+
var PackageDocsSchema = object({
|
|
56334
|
+
name: string(),
|
|
56335
|
+
version: string(),
|
|
56336
|
+
readme: PackageDocBodySchema,
|
|
56337
|
+
changelog: PackageDocBodySchema
|
|
56338
|
+
});
|
|
55846
56339
|
var SearchResultSchema = object({
|
|
55847
56340
|
name: string(),
|
|
55848
56341
|
version: string(),
|
|
@@ -56061,7 +56554,10 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56061
56554
|
}), object({ success: literal(true) }), {
|
|
56062
56555
|
kind: "mutation",
|
|
56063
56556
|
auth: "admin"
|
|
56064
|
-
}), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
|
|
56557
|
+
}), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
|
|
56558
|
+
name: string().min(1),
|
|
56559
|
+
version: string().min(1).optional()
|
|
56560
|
+
}), PackageDocsSchema, { auth: "admin" }), method(object({ addonId: string() }), RestartAddonResultSchema, {
|
|
56065
56561
|
kind: "mutation",
|
|
56066
56562
|
auth: "admin"
|
|
56067
56563
|
}), method(object({ packageName: string() }), object({ success: literal(true) }), {
|
|
@@ -58107,6 +58603,36 @@ object({
|
|
|
58107
58603
|
lastChangedAt: number()
|
|
58108
58604
|
});
|
|
58109
58605
|
DeviceType.Sensor;
|
|
58606
|
+
object({
|
|
58607
|
+
/** One row per member that has been commanded. A later command replaces that member's row. */
|
|
58608
|
+
results: array(object({
|
|
58609
|
+
deviceId: number().int().nonnegative(),
|
|
58610
|
+
cap: string().min(1),
|
|
58611
|
+
method: string().min(1),
|
|
58612
|
+
ok: boolean(),
|
|
58613
|
+
error: string().optional(),
|
|
58614
|
+
/** Ms epoch of the attempt. */
|
|
58615
|
+
at: number()
|
|
58616
|
+
})) });
|
|
58617
|
+
DeviceType.Switch, DeviceType.Light;
|
|
58618
|
+
object({
|
|
58619
|
+
/** Members whose current value entered the aggregate. */
|
|
58620
|
+
included: number().int().nonnegative().meta(readingMeta("count", {
|
|
58621
|
+
precision: 0,
|
|
58622
|
+
label: "Reporting"
|
|
58623
|
+
})),
|
|
58624
|
+
/** Members left out: offline, unknown, or not a finite reading (D393). */
|
|
58625
|
+
excluded: number().int().nonnegative().meta(readingMeta("count", {
|
|
58626
|
+
precision: 0,
|
|
58627
|
+
label: "Excluded"
|
|
58628
|
+
})),
|
|
58629
|
+
/** `included` + `excluded`. */
|
|
58630
|
+
total: number().int().nonnegative().meta(readingMeta("count", {
|
|
58631
|
+
precision: 0,
|
|
58632
|
+
label: "Members"
|
|
58633
|
+
}))
|
|
58634
|
+
});
|
|
58635
|
+
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light;
|
|
58110
58636
|
object({
|
|
58111
58637
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
58112
58638
|
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
@@ -60946,7 +61472,7 @@ object({
|
|
|
60946
61472
|
/** Ms epoch when the slice was last updated. */
|
|
60947
61473
|
lastFetchedAt: number()
|
|
60948
61474
|
});
|
|
60949
|
-
DeviceType.Sensor;
|
|
61475
|
+
DeviceType.Sensor, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
60950
61476
|
/**
|
|
60951
61477
|
* Presence cap. Models HA `person.*` and `device_tracker.*` entities
|
|
60952
61478
|
* on `DeviceType.Presence`. Read-only — no setters: presence is
|
|
@@ -61393,7 +61919,7 @@ object({
|
|
|
61393
61919
|
phase: string().nullable()
|
|
61394
61920
|
});
|
|
61395
61921
|
Object.values(DeviceType);
|
|
61396
|
-
DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
61922
|
+
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
61397
61923
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
61398
61924
|
kind: "mutation",
|
|
61399
61925
|
auth: "admin"
|
|
@@ -65144,7 +65670,7 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
|
|
|
65144
65670
|
auth: "admin"
|
|
65145
65671
|
});
|
|
65146
65672
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
65147
|
-
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;
|
|
65673
|
+
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;
|
|
65148
65674
|
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
65149
65675
|
DeviceRole.BinarySensor, DeviceRole.MotionSensor;
|
|
65150
65676
|
new Set(CAP_NAMES);
|
|
@@ -65197,7 +65723,7 @@ var AccessoryKind = {
|
|
|
65197
65723
|
PrivacyMask: DeviceRole.PrivacyMask
|
|
65198
65724
|
};
|
|
65199
65725
|
AccessoryKind.Siren, AccessoryKind.Floodlight, AccessoryKind.Spotlight, AccessoryKind.PirSensor, AccessoryKind.Chime, AccessoryKind.Autotrack, AccessoryKind.Nightvision, AccessoryKind.PrivacyMask;
|
|
65200
|
-
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;
|
|
65726
|
+
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;
|
|
65201
65727
|
new Set(Object.values(DeviceType));
|
|
65202
65728
|
Object.freeze({
|
|
65203
65729
|
"accessories.getStatus": {
|
|
@@ -65305,6 +65831,13 @@ Object.freeze({
|
|
|
65305
65831
|
access: "view",
|
|
65306
65832
|
role: "admin"
|
|
65307
65833
|
},
|
|
65834
|
+
"addons.getPackageDocs": {
|
|
65835
|
+
capName: "addons",
|
|
65836
|
+
capScope: "system",
|
|
65837
|
+
addonId: null,
|
|
65838
|
+
access: "view",
|
|
65839
|
+
role: "admin"
|
|
65840
|
+
},
|
|
65308
65841
|
"addons.getVersions": {
|
|
65309
65842
|
capName: "addons",
|
|
65310
65843
|
capScope: "system",
|
|
@@ -68413,6 +68946,20 @@ Object.freeze({
|
|
|
68413
68946
|
access: "view",
|
|
68414
68947
|
role: "viewer"
|
|
68415
68948
|
},
|
|
68949
|
+
"groupCommands.getStatus": {
|
|
68950
|
+
capName: "group-commands",
|
|
68951
|
+
capScope: "device",
|
|
68952
|
+
addonId: null,
|
|
68953
|
+
access: "view",
|
|
68954
|
+
role: "viewer"
|
|
68955
|
+
},
|
|
68956
|
+
"groupStatus.getStatus": {
|
|
68957
|
+
capName: "group-status",
|
|
68958
|
+
capScope: "device",
|
|
68959
|
+
addonId: null,
|
|
68960
|
+
access: "view",
|
|
68961
|
+
role: "viewer"
|
|
68962
|
+
},
|
|
68416
68963
|
"heatingValve.getStatus": {
|
|
68417
68964
|
capName: "heating-valve",
|
|
68418
68965
|
capScope: "device",
|
|
@@ -77463,7 +78010,39 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
77463
78010
|
phrase: t("When {device} finishes", "Quando {device} finisce"),
|
|
77464
78011
|
icon: "square"
|
|
77465
78012
|
}
|
|
77466
|
-
}
|
|
78013
|
+
},
|
|
78014
|
+
overrides: { byType: {
|
|
78015
|
+
[DeviceType.Washer]: {
|
|
78016
|
+
state: { running: {
|
|
78017
|
+
whenTrue: t("When the washing machine starts", "Quando la lavatrice inizia"),
|
|
78018
|
+
whenFalse: t("When the washing machine has finished", "Quando la lavatrice ha finito")
|
|
78019
|
+
} },
|
|
78020
|
+
events: {
|
|
78021
|
+
onStarted: { phrase: t("When the washing machine starts", "Quando la lavatrice inizia") },
|
|
78022
|
+
onFinished: { phrase: t("When the washing machine has finished", "Quando la lavatrice ha finito") }
|
|
78023
|
+
}
|
|
78024
|
+
},
|
|
78025
|
+
[DeviceType.Dryer]: {
|
|
78026
|
+
state: { running: {
|
|
78027
|
+
whenTrue: t("When the dryer starts", "Quando l'asciugatrice inizia"),
|
|
78028
|
+
whenFalse: t("When the dryer has finished", "Quando l'asciugatrice ha finito")
|
|
78029
|
+
} },
|
|
78030
|
+
events: {
|
|
78031
|
+
onStarted: { phrase: t("When the dryer starts", "Quando l'asciugatrice inizia") },
|
|
78032
|
+
onFinished: { phrase: t("When the dryer has finished", "Quando l'asciugatrice ha finito") }
|
|
78033
|
+
}
|
|
78034
|
+
},
|
|
78035
|
+
[DeviceType.Dishwasher]: {
|
|
78036
|
+
state: { running: {
|
|
78037
|
+
whenTrue: t("When the dishwasher starts", "Quando la lavastoviglie inizia"),
|
|
78038
|
+
whenFalse: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito")
|
|
78039
|
+
} },
|
|
78040
|
+
events: {
|
|
78041
|
+
onStarted: { phrase: t("When the dishwasher starts", "Quando la lavastoviglie inizia") },
|
|
78042
|
+
onFinished: { phrase: t("When the dishwasher has finished", "Quando la lavastoviglie ha finito") }
|
|
78043
|
+
}
|
|
78044
|
+
}
|
|
78045
|
+
} }
|
|
77467
78046
|
},
|
|
77468
78047
|
update: {
|
|
77469
78048
|
scope: "device",
|
|
@@ -78235,6 +78814,37 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78235
78814
|
icon: "flame"
|
|
78236
78815
|
}]
|
|
78237
78816
|
},
|
|
78817
|
+
"group-commands": {
|
|
78818
|
+
scope: "device",
|
|
78819
|
+
noun: t("Group command", "Comando di gruppo")
|
|
78820
|
+
},
|
|
78821
|
+
"group-status": {
|
|
78822
|
+
scope: "device",
|
|
78823
|
+
noun: t("Group", "Gruppo"),
|
|
78824
|
+
state: [
|
|
78825
|
+
{
|
|
78826
|
+
kind: "numeric",
|
|
78827
|
+
field: "included",
|
|
78828
|
+
quantity: t("the members reporting", "i membri che rispondono"),
|
|
78829
|
+
label: t("Reporting", "Rispondono"),
|
|
78830
|
+
icon: "users"
|
|
78831
|
+
},
|
|
78832
|
+
{
|
|
78833
|
+
kind: "numeric",
|
|
78834
|
+
field: "excluded",
|
|
78835
|
+
quantity: t("the members left out", "i membri esclusi"),
|
|
78836
|
+
label: t("Excluded", "Esclusi"),
|
|
78837
|
+
icon: "users"
|
|
78838
|
+
},
|
|
78839
|
+
{
|
|
78840
|
+
kind: "numeric",
|
|
78841
|
+
field: "total",
|
|
78842
|
+
quantity: t("the member count", "il numero di membri"),
|
|
78843
|
+
label: t("Members", "Membri"),
|
|
78844
|
+
icon: "sigma"
|
|
78845
|
+
}
|
|
78846
|
+
]
|
|
78847
|
+
},
|
|
78238
78848
|
"humidity-sensor": {
|
|
78239
78849
|
scope: "device",
|
|
78240
78850
|
noun: t("Humidity", "Umidità"),
|
|
@@ -78732,8 +79342,72 @@ function projectAction(cap, action) {
|
|
|
78732
79342
|
};
|
|
78733
79343
|
}
|
|
78734
79344
|
Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
|
|
78735
|
-
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;
|
|
79345
|
+
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;
|
|
78736
79346
|
DeviceFeature.BatteryOperated;
|
|
79347
|
+
/**
|
|
79348
|
+
* How a washer, dryer or dishwasher leaves CamStack.
|
|
79349
|
+
*
|
|
79350
|
+
* Home Assistant has no laundry domain: the device is offered, and what
|
|
79351
|
+
* travels is its power reading. The others have a laundry type that this
|
|
79352
|
+
* export cannot honour yet, so they are named and withheld.
|
|
79353
|
+
*/
|
|
79354
|
+
var PLUG_APPLIANCE_TYPES = [
|
|
79355
|
+
DeviceType.Washer,
|
|
79356
|
+
DeviceType.Dryer,
|
|
79357
|
+
DeviceType.Dishwasher
|
|
79358
|
+
];
|
|
79359
|
+
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.";
|
|
79360
|
+
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.";
|
|
79361
|
+
var ALEXA_REASON = "Alexa has no laundry category in this export, and neither power nor running has an Alexa interface.";
|
|
79362
|
+
var GOOGLE_REASON = "Google WASHER, DRYER and DISHWASHER require RunCycle. A power threshold is not that trait, and this export does not publish RunCycle.";
|
|
79363
|
+
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.";
|
|
79364
|
+
function withheld(reason) {
|
|
79365
|
+
return {
|
|
79366
|
+
[DeviceType.Washer]: {
|
|
79367
|
+
exported: false,
|
|
79368
|
+
reason
|
|
79369
|
+
},
|
|
79370
|
+
[DeviceType.Dryer]: {
|
|
79371
|
+
exported: false,
|
|
79372
|
+
reason
|
|
79373
|
+
},
|
|
79374
|
+
[DeviceType.Dishwasher]: {
|
|
79375
|
+
exported: false,
|
|
79376
|
+
reason
|
|
79377
|
+
}
|
|
79378
|
+
};
|
|
79379
|
+
}
|
|
79380
|
+
function offered(received) {
|
|
79381
|
+
return {
|
|
79382
|
+
[DeviceType.Washer]: {
|
|
79383
|
+
exported: true,
|
|
79384
|
+
as: received
|
|
79385
|
+
},
|
|
79386
|
+
[DeviceType.Dryer]: {
|
|
79387
|
+
exported: true,
|
|
79388
|
+
as: received
|
|
79389
|
+
},
|
|
79390
|
+
[DeviceType.Dishwasher]: {
|
|
79391
|
+
exported: true,
|
|
79392
|
+
as: received
|
|
79393
|
+
}
|
|
79394
|
+
};
|
|
79395
|
+
}
|
|
79396
|
+
var APPLIANCE_EXPORT = {
|
|
79397
|
+
ha: offered(HA_AS),
|
|
79398
|
+
homekit: withheld(HOMEKIT_REASON),
|
|
79399
|
+
alexa: withheld(ALEXA_REASON),
|
|
79400
|
+
google: withheld(GOOGLE_REASON),
|
|
79401
|
+
matter: withheld(MATTER_REASON)
|
|
79402
|
+
};
|
|
79403
|
+
function isPlugApplianceType(deviceType) {
|
|
79404
|
+
return PLUG_APPLIANCE_TYPES.some((type) => type === deviceType);
|
|
79405
|
+
}
|
|
79406
|
+
/** The decision for this ecosystem, or null when the type is not an appliance. */
|
|
79407
|
+
function applianceExport(ecosystem, deviceType) {
|
|
79408
|
+
if (!isPlugApplianceType(deviceType)) return null;
|
|
79409
|
+
return APPLIANCE_EXPORT[ecosystem][deviceType];
|
|
79410
|
+
}
|
|
78737
79411
|
Object.freeze({
|
|
78738
79412
|
"accessories.getStatus": [{
|
|
78739
79413
|
name: "deviceId",
|
|
@@ -79700,6 +80374,16 @@ Object.freeze({
|
|
|
79700
80374
|
form: "single",
|
|
79701
80375
|
optional: false
|
|
79702
80376
|
}],
|
|
80377
|
+
"groupCommands.getStatus": [{
|
|
80378
|
+
name: "deviceId",
|
|
80379
|
+
form: "single",
|
|
80380
|
+
optional: false
|
|
80381
|
+
}],
|
|
80382
|
+
"groupStatus.getStatus": [{
|
|
80383
|
+
name: "deviceId",
|
|
80384
|
+
form: "single",
|
|
80385
|
+
optional: false
|
|
80386
|
+
}],
|
|
79703
80387
|
"heatingValve.getStatus": [{
|
|
79704
80388
|
name: "deviceId",
|
|
79705
80389
|
form: "single",
|
|
@@ -81684,6 +82368,8 @@ new Map(Object.entries({
|
|
|
81684
82368
|
"detection-blind": "device-events",
|
|
81685
82369
|
"motion-noisy": "device-events",
|
|
81686
82370
|
"motion-calm": "device-events",
|
|
82371
|
+
"package-llm-silent": "device-events",
|
|
82372
|
+
"package-llm-answered": "device-events",
|
|
81687
82373
|
"recording-stalled": "device-events",
|
|
81688
82374
|
"recording-healthy": "device-events",
|
|
81689
82375
|
"recording-degraded": "device-events",
|
|
@@ -81767,6 +82453,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
81767
82453
|
label: "Motion without a subject",
|
|
81768
82454
|
kinds: ["motion-noisy", "motion-calm"]
|
|
81769
82455
|
},
|
|
82456
|
+
{
|
|
82457
|
+
id: "package-llm",
|
|
82458
|
+
family: "device-events",
|
|
82459
|
+
label: "Package confirm",
|
|
82460
|
+
kinds: ["package-llm-silent", "package-llm-answered"]
|
|
82461
|
+
},
|
|
81770
82462
|
{
|
|
81771
82463
|
id: "recording",
|
|
81772
82464
|
family: "device-events",
|
|
@@ -81948,6 +82640,8 @@ var DEVICE_EVENTS = [
|
|
|
81948
82640
|
"detection-blind",
|
|
81949
82641
|
"motion-noisy",
|
|
81950
82642
|
"motion-calm",
|
|
82643
|
+
"package-llm-silent",
|
|
82644
|
+
"package-llm-answered",
|
|
81951
82645
|
"recording-stalled",
|
|
81952
82646
|
"recording-healthy",
|
|
81953
82647
|
"recording-degraded",
|
|
@@ -82216,6 +82910,15 @@ new Map([
|
|
|
82216
82910
|
snapshotLabel: "Cameras with constant motion now",
|
|
82217
82911
|
snapshotSection: null
|
|
82218
82912
|
},
|
|
82913
|
+
{
|
|
82914
|
+
id: "package-llm-confirm",
|
|
82915
|
+
family: "device-events",
|
|
82916
|
+
label: "Package confirm (not answering / answering again)",
|
|
82917
|
+
bad: ["package-llm-silent"],
|
|
82918
|
+
recovery: ["package-llm-answered"],
|
|
82919
|
+
snapshotLabel: "Cameras whose package confirm is not answering",
|
|
82920
|
+
snapshotSection: null
|
|
82921
|
+
},
|
|
82219
82922
|
{
|
|
82220
82923
|
id: "recording-health",
|
|
82221
82924
|
family: "device-events",
|
|
@@ -85660,6 +86363,12 @@ function switchCategory(device) {
|
|
|
85660
86363
|
}
|
|
85661
86364
|
//#endregion
|
|
85662
86365
|
//#region src/endpoints/adapters/index.ts
|
|
86366
|
+
/**
|
|
86367
|
+
* The adapter registry (D869): the ONE list Discovery, ReportState,
|
|
86368
|
+
* ChangeReport, the reconcile, the directive router and the validator read.
|
|
86369
|
+
* Adding a cap to Alexa is adding its adapter here — in order: the first
|
|
86370
|
+
* adapter with a category decides the endpoint's display category.
|
|
86371
|
+
*/
|
|
85663
86372
|
var GENERIC_ADAPTERS = [
|
|
85664
86373
|
lockAdapter,
|
|
85665
86374
|
contactAdapter,
|
|
@@ -85746,6 +86455,11 @@ function capabilityKey$2(c) {
|
|
|
85746
86455
|
}
|
|
85747
86456
|
/** What a device becomes, folding every applicable adapter in registry order. */
|
|
85748
86457
|
function planGenericDevice(device) {
|
|
86458
|
+
const withheld = applianceExport("alexa", device.type);
|
|
86459
|
+
if (withheld !== null && !withheld.exported) return {
|
|
86460
|
+
kind: "skip",
|
|
86461
|
+
reasons: [withheld.reason]
|
|
86462
|
+
};
|
|
85749
86463
|
const capabilities = [BASE];
|
|
85750
86464
|
const seen = /* @__PURE__ */ new Set();
|
|
85751
86465
|
const reasons = [];
|