@camstack/addon-export-alexa 1.2.169 → 1.2.170
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 +585 -12
- package/dist/export-alexa.addon.mjs +585 -12
- package/package.json +4 -2
|
@@ -5,7 +5,7 @@ import "node:fs";
|
|
|
5
5
|
import "node:path";
|
|
6
6
|
import "node:child_process";
|
|
7
7
|
import "node:zlib";
|
|
8
|
-
//#region ../types/dist/event-category-
|
|
8
|
+
//#region ../types/dist/event-category-CT-hz5Rb.mjs
|
|
9
9
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
10
10
|
EventCategory["SystemBoot"] = "system.boot";
|
|
11
11
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -331,6 +331,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
331
331
|
/** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
|
|
332
332
|
EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
|
|
333
333
|
/**
|
|
334
|
+
* A camera's package LLM confirm has failed closed three times in a row
|
|
335
|
+
* (D931, 2026-10-26). One edge per camera until
|
|
336
|
+
* {@link PipelinePackageLlmAnswered}.
|
|
337
|
+
*/
|
|
338
|
+
EventCategory["PipelinePackageLlmSilent"] = "pipeline.package-llm-silent";
|
|
339
|
+
/** The recovery edge of {@link PipelinePackageLlmSilent}: a confirm returned yes or no. */
|
|
340
|
+
EventCategory["PipelinePackageLlmAnswered"] = "pipeline.package-llm-answered";
|
|
341
|
+
/**
|
|
334
342
|
* Per-camera pipeline config was mutated by the orchestrator
|
|
335
343
|
* (a settings change via `setAgentInferenceDevices` /
|
|
336
344
|
* `setCameraStepToggle` / `setCameraStepSettings`). Orchestrator
|
|
@@ -5440,7 +5448,7 @@ var ZodIssueCode = {
|
|
|
5440
5448
|
var ZodFirstPartyTypeKind;
|
|
5441
5449
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5442
5450
|
//#endregion
|
|
5443
|
-
//#region ../types/dist/sleep-
|
|
5451
|
+
//#region ../types/dist/sleep-bykKrTgu.mjs
|
|
5444
5452
|
/**
|
|
5445
5453
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5446
5454
|
* window to float samples (D455).
|
|
@@ -7966,6 +7974,53 @@ var READING_QUANTITIES = [
|
|
|
7966
7974
|
];
|
|
7967
7975
|
var ReadingQuantitySchema = _enum(READING_QUANTITIES);
|
|
7968
7976
|
new Set(READING_QUANTITIES);
|
|
7977
|
+
/**
|
|
7978
|
+
* Stored unit symbol for a quantity. `none` means the number is dimensionless
|
|
7979
|
+
* (or an index / ratio / count). `device` means the cap has no single unit.
|
|
7980
|
+
*/
|
|
7981
|
+
var QUANTITY_BASE = {
|
|
7982
|
+
temperature: "°C",
|
|
7983
|
+
pressure: "hPa",
|
|
7984
|
+
speed: "m/s",
|
|
7985
|
+
precipitation: "mm",
|
|
7986
|
+
"precipitation-rate": "mm/h",
|
|
7987
|
+
length: "m",
|
|
7988
|
+
area: "m²",
|
|
7989
|
+
illuminance: "lx",
|
|
7990
|
+
irradiance: "W/m²",
|
|
7991
|
+
power: "W",
|
|
7992
|
+
energy: "kWh",
|
|
7993
|
+
voltage: "V",
|
|
7994
|
+
current: "A",
|
|
7995
|
+
"apparent-power": "VA",
|
|
7996
|
+
humidity: "%",
|
|
7997
|
+
percentage: "%",
|
|
7998
|
+
"concentration-volume": "ppm",
|
|
7999
|
+
"concentration-mass": "µg/m³",
|
|
8000
|
+
"concentration-ppb": "ppb",
|
|
8001
|
+
volume: "L",
|
|
8002
|
+
duration: "s",
|
|
8003
|
+
"duration-ms": "ms",
|
|
8004
|
+
information: "B",
|
|
8005
|
+
"sound-level": "dBFS",
|
|
8006
|
+
"signal-level": "dBm",
|
|
8007
|
+
"colour-temperature": "mired",
|
|
8008
|
+
angle: "°",
|
|
8009
|
+
bitrate: "kbps",
|
|
8010
|
+
rate: "fps",
|
|
8011
|
+
mass: "kg",
|
|
8012
|
+
index: "none",
|
|
8013
|
+
ratio: "none",
|
|
8014
|
+
count: "none",
|
|
8015
|
+
none: "none",
|
|
8016
|
+
device: "device"
|
|
8017
|
+
};
|
|
8018
|
+
/** The stored unit, or `undefined` when the quantity has no unit symbol. */
|
|
8019
|
+
function baseUnitOf(quantity) {
|
|
8020
|
+
const symbol = QUANTITY_BASE[quantity];
|
|
8021
|
+
if (symbol === "none" || symbol === "device") return void 0;
|
|
8022
|
+
return symbol;
|
|
8023
|
+
}
|
|
7969
8024
|
function readingMeta(quantity, extras) {
|
|
7970
8025
|
return {
|
|
7971
8026
|
quantity,
|
|
@@ -8537,6 +8592,8 @@ var CAP_NAMES = Object.freeze([
|
|
|
8537
8592
|
"filesystem-browse",
|
|
8538
8593
|
"flood",
|
|
8539
8594
|
"gas",
|
|
8595
|
+
"group-commands",
|
|
8596
|
+
"group-status",
|
|
8540
8597
|
"heating-valve",
|
|
8541
8598
|
"humidifier",
|
|
8542
8599
|
"humidity-sensor",
|
|
@@ -9355,6 +9412,20 @@ Object.freeze({
|
|
|
9355
9412
|
"path": "detected",
|
|
9356
9413
|
"valueType": "boolean"
|
|
9357
9414
|
}],
|
|
9415
|
+
"group-status": [
|
|
9416
|
+
{
|
|
9417
|
+
"path": "included",
|
|
9418
|
+
"valueType": "number"
|
|
9419
|
+
},
|
|
9420
|
+
{
|
|
9421
|
+
"path": "excluded",
|
|
9422
|
+
"valueType": "number"
|
|
9423
|
+
},
|
|
9424
|
+
{
|
|
9425
|
+
"path": "total",
|
|
9426
|
+
"valueType": "number"
|
|
9427
|
+
}
|
|
9428
|
+
],
|
|
9358
9429
|
"heating-valve": [{
|
|
9359
9430
|
"path": "position",
|
|
9360
9431
|
"valueType": "number"
|
|
@@ -10696,7 +10767,7 @@ function errMsg(err) {
|
|
|
10696
10767
|
return String(err);
|
|
10697
10768
|
}
|
|
10698
10769
|
//#endregion
|
|
10699
|
-
//#region ../types/dist/composition-
|
|
10770
|
+
//#region ../types/dist/composition-OhpuespA.mjs
|
|
10700
10771
|
/**
|
|
10701
10772
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
10702
10773
|
*
|
|
@@ -11451,15 +11522,74 @@ function validateExpressionSource(src) {
|
|
|
11451
11522
|
}
|
|
11452
11523
|
return null;
|
|
11453
11524
|
}
|
|
11454
|
-
/**
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11525
|
+
/**
|
|
11526
|
+
* A composition source identity: `(addonId, stableId)`, never a numeric device
|
|
11527
|
+
* id. Split out so helper schemas can name it without a cycle through
|
|
11528
|
+
* `composition.ts` (D659).
|
|
11529
|
+
*/
|
|
11458
11530
|
var CompositionSourceRefSchema = object({
|
|
11459
11531
|
/** The owning addon; `stableId` is unique only within it. */
|
|
11460
11532
|
addonId: string().min(1),
|
|
11461
11533
|
stableId: string().min(1)
|
|
11462
11534
|
});
|
|
11535
|
+
var GROUP_TEMPLATE_IDS = [
|
|
11536
|
+
"temperature",
|
|
11537
|
+
"humidity",
|
|
11538
|
+
"pressure",
|
|
11539
|
+
"illuminance",
|
|
11540
|
+
"power",
|
|
11541
|
+
"energy",
|
|
11542
|
+
"battery",
|
|
11543
|
+
"numeric",
|
|
11544
|
+
"motion",
|
|
11545
|
+
"contact",
|
|
11546
|
+
"leak",
|
|
11547
|
+
"smoke",
|
|
11548
|
+
"occupancy",
|
|
11549
|
+
"binary",
|
|
11550
|
+
"switch",
|
|
11551
|
+
"light"
|
|
11552
|
+
];
|
|
11553
|
+
var NUMERIC_AGGREGATES = [
|
|
11554
|
+
"mean",
|
|
11555
|
+
"median",
|
|
11556
|
+
"min",
|
|
11557
|
+
"max",
|
|
11558
|
+
"sum"
|
|
11559
|
+
];
|
|
11560
|
+
var BINARY_AGGREGATES = ["any", "all"];
|
|
11561
|
+
/** How an actuator group decides it is on. Unknown members never count as off. */
|
|
11562
|
+
var ACTIVE_CRITERIA = ["at-least-one", "all"];
|
|
11563
|
+
var AGGREGATE_REDUCERS = [
|
|
11564
|
+
"mean",
|
|
11565
|
+
"median",
|
|
11566
|
+
"min",
|
|
11567
|
+
"max",
|
|
11568
|
+
"sum",
|
|
11569
|
+
"any",
|
|
11570
|
+
"all"
|
|
11571
|
+
];
|
|
11572
|
+
var GroupTemplateIdSchema = _enum(GROUP_TEMPLATE_IDS);
|
|
11573
|
+
var AggregateReducerSchema = _enum(AGGREGATE_REDUCERS);
|
|
11574
|
+
var ActiveCriterionSchema = _enum(ACTIVE_CRITERIA);
|
|
11575
|
+
/** One member. The field is stored so occupancy can name motion or binary. */
|
|
11576
|
+
var HelperMemberSchema = object({
|
|
11577
|
+
source: CompositionSourceRefSchema,
|
|
11578
|
+
cap: string().min(1),
|
|
11579
|
+
fieldPath: string().min(1)
|
|
11580
|
+
});
|
|
11581
|
+
var HelperSpecSchema = discriminatedUnion("kind", [object({
|
|
11582
|
+
kind: literal("group"),
|
|
11583
|
+
templateId: GroupTemplateIdSchema,
|
|
11584
|
+
aggregate: AggregateReducerSchema,
|
|
11585
|
+
members: array(HelperMemberSchema).min(1).max(64),
|
|
11586
|
+
/** Actuator groups only. Readings leave this unset. */
|
|
11587
|
+
active: ActiveCriterionSchema.optional()
|
|
11588
|
+
})]);
|
|
11589
|
+
/** A composed device's stableId is this prefix plus the block id. */
|
|
11590
|
+
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
11591
|
+
/** Longest snippet a `code` source may carry (slice 4). */
|
|
11592
|
+
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
11463
11593
|
/** One field of one capability of one source device. */
|
|
11464
11594
|
var CompositionFieldReadSchema = object({
|
|
11465
11595
|
source: CompositionSourceRefSchema,
|
|
@@ -11503,7 +11633,33 @@ var CompositionCodeSourceSchema = object({
|
|
|
11503
11633
|
var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
11504
11634
|
CompositionFromSourceSchema,
|
|
11505
11635
|
CompositionExpressionSourceSchema,
|
|
11506
|
-
CompositionCodeSourceSchema
|
|
11636
|
+
CompositionCodeSourceSchema,
|
|
11637
|
+
object({
|
|
11638
|
+
kind: literal("aggregate"),
|
|
11639
|
+
reducer: _enum([
|
|
11640
|
+
"mean",
|
|
11641
|
+
"median",
|
|
11642
|
+
"min",
|
|
11643
|
+
"max",
|
|
11644
|
+
"sum",
|
|
11645
|
+
"any",
|
|
11646
|
+
"all"
|
|
11647
|
+
]),
|
|
11648
|
+
reads: array(CompositionFieldReadSchema).min(1).max(64),
|
|
11649
|
+
/** `value` is the reading; the others are the member counts. */
|
|
11650
|
+
publish: _enum([
|
|
11651
|
+
"value",
|
|
11652
|
+
"included",
|
|
11653
|
+
"excluded",
|
|
11654
|
+
"total"
|
|
11655
|
+
]),
|
|
11656
|
+
/** What a `value` publish does when nobody is included. Counts ignore this. */
|
|
11657
|
+
empty: _enum([
|
|
11658
|
+
"null",
|
|
11659
|
+
"omit",
|
|
11660
|
+
"offline"
|
|
11661
|
+
])
|
|
11662
|
+
})
|
|
11507
11663
|
]);
|
|
11508
11664
|
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
11509
11665
|
kind: literal("forward"),
|
|
@@ -11549,7 +11705,13 @@ var CompositionSchema = object({
|
|
|
11549
11705
|
kind: literal("existing"),
|
|
11550
11706
|
device: CompositionSourceRefSchema
|
|
11551
11707
|
})]),
|
|
11552
|
-
features: array(CompositionFeatureSchema).min(1).max(16)
|
|
11708
|
+
features: array(CompositionFeatureSchema).min(1).max(16),
|
|
11709
|
+
/**
|
|
11710
|
+
* Present when the block is a helper template. Absent on a free
|
|
11711
|
+
* composition (the room example, device 4603). The editor reads this,
|
|
11712
|
+
* never the compiled features.
|
|
11713
|
+
*/
|
|
11714
|
+
helper: HelperSpecSchema.optional()
|
|
11553
11715
|
}).superRefine((composition, ctx) => {
|
|
11554
11716
|
const seen = /* @__PURE__ */ new Set();
|
|
11555
11717
|
composition.features.forEach((feature, index) => {
|
|
@@ -17958,7 +18120,10 @@ var CompositionProblemSchema = object({
|
|
|
17958
18120
|
"target-missing",
|
|
17959
18121
|
"target-unreadable",
|
|
17960
18122
|
"not-replaceable",
|
|
17961
|
-
"native-capability-replace"
|
|
18123
|
+
"native-capability-replace",
|
|
18124
|
+
"mixed-quantity",
|
|
18125
|
+
"helper-mismatch",
|
|
18126
|
+
"member-constraint"
|
|
17962
18127
|
]),
|
|
17963
18128
|
path: string(),
|
|
17964
18129
|
message: string()
|
|
@@ -17979,7 +18144,8 @@ var CompositionUnavailableModeSchema = _enum([
|
|
|
17979
18144
|
"null",
|
|
17980
18145
|
"offline",
|
|
17981
18146
|
"unknown",
|
|
17982
|
-
"release"
|
|
18147
|
+
"release",
|
|
18148
|
+
"omit"
|
|
17983
18149
|
]);
|
|
17984
18150
|
/**
|
|
17985
18151
|
* `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
|
|
@@ -18193,6 +18359,275 @@ Object.freeze({
|
|
|
18193
18359
|
result: ["number", "null"]
|
|
18194
18360
|
}
|
|
18195
18361
|
});
|
|
18362
|
+
/**
|
|
18363
|
+
* One catalog row per base reading a group helper can build (D944 §3).
|
|
18364
|
+
* Data, not a form default written into the block.
|
|
18365
|
+
*/
|
|
18366
|
+
var NOW = {
|
|
18367
|
+
fieldPath: "lastFetchedAt",
|
|
18368
|
+
expr: "now"
|
|
18369
|
+
};
|
|
18370
|
+
var CHANGED = {
|
|
18371
|
+
fieldPath: "lastChangedAt",
|
|
18372
|
+
expr: "now"
|
|
18373
|
+
};
|
|
18374
|
+
function numeric(input) {
|
|
18375
|
+
return {
|
|
18376
|
+
...input,
|
|
18377
|
+
family: "numeric",
|
|
18378
|
+
deviceType: DeviceType.Sensor,
|
|
18379
|
+
memberDeviceType: DeviceType.Sensor,
|
|
18380
|
+
commandCaps: [],
|
|
18381
|
+
baseUnit: baseUnitOf(input.quantity),
|
|
18382
|
+
aggregates: NUMERIC_AGGREGATES,
|
|
18383
|
+
accept: [{
|
|
18384
|
+
cap: input.outputCap,
|
|
18385
|
+
fieldPath: input.outputField
|
|
18386
|
+
}]
|
|
18387
|
+
};
|
|
18388
|
+
}
|
|
18389
|
+
function binary(input) {
|
|
18390
|
+
return {
|
|
18391
|
+
...input,
|
|
18392
|
+
family: "binary",
|
|
18393
|
+
deviceType: DeviceType.Sensor,
|
|
18394
|
+
memberDeviceType: DeviceType.Sensor,
|
|
18395
|
+
commandCaps: [],
|
|
18396
|
+
quantity: "none",
|
|
18397
|
+
baseUnit: void 0,
|
|
18398
|
+
aggregates: BINARY_AGGREGATES,
|
|
18399
|
+
empty: "offline"
|
|
18400
|
+
};
|
|
18401
|
+
}
|
|
18402
|
+
var GROUP_TEMPLATES = [
|
|
18403
|
+
numeric({
|
|
18404
|
+
id: "temperature",
|
|
18405
|
+
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
18406
|
+
role: DeviceRole.TemperatureSensor,
|
|
18407
|
+
outputCap: "temperature-sensor",
|
|
18408
|
+
outputField: "celsius",
|
|
18409
|
+
quantity: "temperature",
|
|
18410
|
+
defaultAggregate: "mean",
|
|
18411
|
+
empty: "null",
|
|
18412
|
+
companions: [NOW]
|
|
18413
|
+
}),
|
|
18414
|
+
numeric({
|
|
18415
|
+
id: "humidity",
|
|
18416
|
+
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18417
|
+
role: DeviceRole.HumiditySensor,
|
|
18418
|
+
outputCap: "humidity-sensor",
|
|
18419
|
+
outputField: "percent",
|
|
18420
|
+
quantity: "humidity",
|
|
18421
|
+
defaultAggregate: "mean",
|
|
18422
|
+
empty: "null",
|
|
18423
|
+
companions: [NOW]
|
|
18424
|
+
}),
|
|
18425
|
+
numeric({
|
|
18426
|
+
id: "pressure",
|
|
18427
|
+
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
18428
|
+
role: DeviceRole.PressureSensor,
|
|
18429
|
+
outputCap: "pressure-sensor",
|
|
18430
|
+
outputField: "hpa",
|
|
18431
|
+
quantity: "pressure",
|
|
18432
|
+
defaultAggregate: "mean",
|
|
18433
|
+
empty: "null",
|
|
18434
|
+
companions: [NOW]
|
|
18435
|
+
}),
|
|
18436
|
+
numeric({
|
|
18437
|
+
id: "illuminance",
|
|
18438
|
+
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
18439
|
+
role: DeviceRole.AmbientLightSensor,
|
|
18440
|
+
outputCap: "ambient-light-sensor",
|
|
18441
|
+
outputField: "lux",
|
|
18442
|
+
quantity: "illuminance",
|
|
18443
|
+
defaultAggregate: "mean",
|
|
18444
|
+
empty: "null",
|
|
18445
|
+
companions: [NOW]
|
|
18446
|
+
}),
|
|
18447
|
+
numeric({
|
|
18448
|
+
id: "power",
|
|
18449
|
+
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
18450
|
+
role: DeviceRole.PowerSensor,
|
|
18451
|
+
outputCap: "power-meter",
|
|
18452
|
+
outputField: "watts",
|
|
18453
|
+
quantity: "power",
|
|
18454
|
+
defaultAggregate: "sum",
|
|
18455
|
+
empty: "omit",
|
|
18456
|
+
companions: [NOW]
|
|
18457
|
+
}),
|
|
18458
|
+
numeric({
|
|
18459
|
+
id: "energy",
|
|
18460
|
+
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
18461
|
+
role: DeviceRole.EnergySensor,
|
|
18462
|
+
outputCap: "power-meter",
|
|
18463
|
+
outputField: "kwhTotal",
|
|
18464
|
+
quantity: "energy",
|
|
18465
|
+
defaultAggregate: "sum",
|
|
18466
|
+
empty: "omit",
|
|
18467
|
+
companions: [NOW]
|
|
18468
|
+
}),
|
|
18469
|
+
numeric({
|
|
18470
|
+
id: "battery",
|
|
18471
|
+
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18472
|
+
role: DeviceRole.BatterySensor,
|
|
18473
|
+
outputCap: "battery",
|
|
18474
|
+
outputField: "percentage",
|
|
18475
|
+
quantity: "percentage",
|
|
18476
|
+
defaultAggregate: "mean",
|
|
18477
|
+
empty: "null",
|
|
18478
|
+
companions: [
|
|
18479
|
+
{
|
|
18480
|
+
fieldPath: "charging",
|
|
18481
|
+
expr: "\"unknown\""
|
|
18482
|
+
},
|
|
18483
|
+
{
|
|
18484
|
+
fieldPath: "sleeping",
|
|
18485
|
+
expr: "false"
|
|
18486
|
+
},
|
|
18487
|
+
{
|
|
18488
|
+
fieldPath: "lastUpdated",
|
|
18489
|
+
expr: "now"
|
|
18490
|
+
}
|
|
18491
|
+
]
|
|
18492
|
+
}),
|
|
18493
|
+
numeric({
|
|
18494
|
+
id: "numeric",
|
|
18495
|
+
summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
|
|
18496
|
+
role: DeviceRole.NumericSensor,
|
|
18497
|
+
outputCap: "numeric-sensor",
|
|
18498
|
+
outputField: "value",
|
|
18499
|
+
quantity: "device",
|
|
18500
|
+
defaultAggregate: "mean",
|
|
18501
|
+
empty: "null",
|
|
18502
|
+
companions: [NOW]
|
|
18503
|
+
}),
|
|
18504
|
+
binary({
|
|
18505
|
+
id: "motion",
|
|
18506
|
+
summary: "Any or all motion. Offline and unknown members are left out, never read as off. Nobody reporting takes the device offline.",
|
|
18507
|
+
role: DeviceRole.MotionSensor,
|
|
18508
|
+
outputCap: "motion",
|
|
18509
|
+
outputField: "detected",
|
|
18510
|
+
defaultAggregate: "any",
|
|
18511
|
+
accept: [{
|
|
18512
|
+
cap: "motion",
|
|
18513
|
+
fieldPath: "detected"
|
|
18514
|
+
}],
|
|
18515
|
+
companions: [{
|
|
18516
|
+
fieldPath: "lastDetectedAt",
|
|
18517
|
+
expr: "null"
|
|
18518
|
+
}, {
|
|
18519
|
+
fieldPath: "autoClearAfterMs",
|
|
18520
|
+
expr: "null"
|
|
18521
|
+
}]
|
|
18522
|
+
}),
|
|
18523
|
+
binary({
|
|
18524
|
+
id: "contact",
|
|
18525
|
+
summary: "Any or all open contacts. Offline and unknown members are left out, never read as closed.",
|
|
18526
|
+
role: DeviceRole.ContactSensor,
|
|
18527
|
+
outputCap: "contact",
|
|
18528
|
+
outputField: "entryOpen",
|
|
18529
|
+
defaultAggregate: "any",
|
|
18530
|
+
accept: [{
|
|
18531
|
+
cap: "contact",
|
|
18532
|
+
fieldPath: "entryOpen"
|
|
18533
|
+
}],
|
|
18534
|
+
companions: [CHANGED]
|
|
18535
|
+
}),
|
|
18536
|
+
binary({
|
|
18537
|
+
id: "leak",
|
|
18538
|
+
summary: "Any or all leak detections. Offline and unknown members are left out, never read as dry.",
|
|
18539
|
+
role: DeviceRole.LeakSensor,
|
|
18540
|
+
outputCap: "flood",
|
|
18541
|
+
outputField: "flooded",
|
|
18542
|
+
defaultAggregate: "any",
|
|
18543
|
+
accept: [{
|
|
18544
|
+
cap: "flood",
|
|
18545
|
+
fieldPath: "flooded"
|
|
18546
|
+
}],
|
|
18547
|
+
companions: [CHANGED]
|
|
18548
|
+
}),
|
|
18549
|
+
binary({
|
|
18550
|
+
id: "smoke",
|
|
18551
|
+
summary: "Any or all smoke detections. Offline and unknown members are left out, never read as clear.",
|
|
18552
|
+
role: DeviceRole.SmokeSensor,
|
|
18553
|
+
outputCap: "smoke",
|
|
18554
|
+
outputField: "detected",
|
|
18555
|
+
defaultAggregate: "any",
|
|
18556
|
+
accept: [{
|
|
18557
|
+
cap: "smoke",
|
|
18558
|
+
fieldPath: "detected"
|
|
18559
|
+
}],
|
|
18560
|
+
companions: [CHANGED]
|
|
18561
|
+
}),
|
|
18562
|
+
binary({
|
|
18563
|
+
id: "occupancy",
|
|
18564
|
+
summary: "Any or all of motion or binary sensors, published as a binary. Presence zones are not aggregated. Nobody reporting is offline, not off.",
|
|
18565
|
+
role: DeviceRole.BinarySensor,
|
|
18566
|
+
outputCap: "binary",
|
|
18567
|
+
outputField: "on",
|
|
18568
|
+
defaultAggregate: "any",
|
|
18569
|
+
accept: [{
|
|
18570
|
+
cap: "motion",
|
|
18571
|
+
fieldPath: "detected"
|
|
18572
|
+
}, {
|
|
18573
|
+
cap: "binary",
|
|
18574
|
+
fieldPath: "on"
|
|
18575
|
+
}],
|
|
18576
|
+
companions: [CHANGED]
|
|
18577
|
+
}),
|
|
18578
|
+
binary({
|
|
18579
|
+
id: "binary",
|
|
18580
|
+
summary: "Any or all generic binary sensors. Offline and unknown members are left out, never read as off.",
|
|
18581
|
+
role: DeviceRole.BinarySensor,
|
|
18582
|
+
outputCap: "binary",
|
|
18583
|
+
outputField: "on",
|
|
18584
|
+
defaultAggregate: "any",
|
|
18585
|
+
accept: [{
|
|
18586
|
+
cap: "binary",
|
|
18587
|
+
fieldPath: "on"
|
|
18588
|
+
}],
|
|
18589
|
+
companions: [CHANGED]
|
|
18590
|
+
}),
|
|
18591
|
+
actuator({
|
|
18592
|
+
id: "switch",
|
|
18593
|
+
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.",
|
|
18594
|
+
deviceType: DeviceType.Switch,
|
|
18595
|
+
outputCap: "switch",
|
|
18596
|
+
commandCaps: ["switch"]
|
|
18597
|
+
}),
|
|
18598
|
+
actuator({
|
|
18599
|
+
id: "light",
|
|
18600
|
+
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.",
|
|
18601
|
+
deviceType: DeviceType.Light,
|
|
18602
|
+
outputCap: "switch",
|
|
18603
|
+
commandCaps: [
|
|
18604
|
+
"switch",
|
|
18605
|
+
"brightness",
|
|
18606
|
+
"color"
|
|
18607
|
+
]
|
|
18608
|
+
})
|
|
18609
|
+
];
|
|
18610
|
+
function actuator(input) {
|
|
18611
|
+
return {
|
|
18612
|
+
...input,
|
|
18613
|
+
family: "actuator",
|
|
18614
|
+
role: void 0,
|
|
18615
|
+
memberDeviceType: input.deviceType,
|
|
18616
|
+
outputField: "on",
|
|
18617
|
+
quantity: "none",
|
|
18618
|
+
baseUnit: void 0,
|
|
18619
|
+
aggregates: BINARY_AGGREGATES,
|
|
18620
|
+
defaultAggregate: "any",
|
|
18621
|
+
empty: "offline",
|
|
18622
|
+
accept: [{
|
|
18623
|
+
cap: "switch",
|
|
18624
|
+
fieldPath: "on"
|
|
18625
|
+
}],
|
|
18626
|
+
companions: [CHANGED]
|
|
18627
|
+
};
|
|
18628
|
+
}
|
|
18629
|
+
new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
|
|
18630
|
+
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
18196
18631
|
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
18197
18632
|
/**
|
|
18198
18633
|
* What a composition may BUILD on a device type (G2, D676): the caps a new
|
|
@@ -44784,6 +45219,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
44784
45219
|
"detection-blind",
|
|
44785
45220
|
"motion-noisy",
|
|
44786
45221
|
"motion-calm",
|
|
45222
|
+
"package-llm-silent",
|
|
45223
|
+
"package-llm-answered",
|
|
44787
45224
|
"recording-stalled",
|
|
44788
45225
|
"recording-healthy",
|
|
44789
45226
|
"recording-degraded",
|
|
@@ -55814,6 +56251,28 @@ var PackageVersionInfoSchema = object({
|
|
|
55814
56251
|
deprecated: string().optional(),
|
|
55815
56252
|
distTags: array(string()).readonly()
|
|
55816
56253
|
});
|
|
56254
|
+
/**
|
|
56255
|
+
* One published document. `ok` is markdown from the registry. `missing` means
|
|
56256
|
+
* the registry answered and the file was not there. `error` is a registry or
|
|
56257
|
+
* tarball failure — never an empty string standing in for either.
|
|
56258
|
+
*/
|
|
56259
|
+
var PackageDocBodySchema = discriminatedUnion("status", [
|
|
56260
|
+
object({
|
|
56261
|
+
status: literal("ok"),
|
|
56262
|
+
markdown: string()
|
|
56263
|
+
}),
|
|
56264
|
+
object({ status: literal("missing") }),
|
|
56265
|
+
object({
|
|
56266
|
+
status: literal("error"),
|
|
56267
|
+
message: string()
|
|
56268
|
+
})
|
|
56269
|
+
]);
|
|
56270
|
+
var PackageDocsSchema = object({
|
|
56271
|
+
name: string(),
|
|
56272
|
+
version: string(),
|
|
56273
|
+
readme: PackageDocBodySchema,
|
|
56274
|
+
changelog: PackageDocBodySchema
|
|
56275
|
+
});
|
|
55817
56276
|
var SearchResultSchema = object({
|
|
55818
56277
|
name: string(),
|
|
55819
56278
|
version: string(),
|
|
@@ -56032,7 +56491,10 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56032
56491
|
}), object({ success: literal(true) }), {
|
|
56033
56492
|
kind: "mutation",
|
|
56034
56493
|
auth: "admin"
|
|
56035
|
-
}), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
|
|
56494
|
+
}), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
|
|
56495
|
+
name: string().min(1),
|
|
56496
|
+
version: string().min(1).optional()
|
|
56497
|
+
}), PackageDocsSchema, { auth: "admin" }), method(object({ addonId: string() }), RestartAddonResultSchema, {
|
|
56036
56498
|
kind: "mutation",
|
|
56037
56499
|
auth: "admin"
|
|
56038
56500
|
}), method(object({ packageName: string() }), object({ success: literal(true) }), {
|
|
@@ -58078,6 +58540,36 @@ object({
|
|
|
58078
58540
|
lastChangedAt: number()
|
|
58079
58541
|
});
|
|
58080
58542
|
DeviceType.Sensor;
|
|
58543
|
+
object({
|
|
58544
|
+
/** One row per member that has been commanded. A later command replaces that member's row. */
|
|
58545
|
+
results: array(object({
|
|
58546
|
+
deviceId: number().int().nonnegative(),
|
|
58547
|
+
cap: string().min(1),
|
|
58548
|
+
method: string().min(1),
|
|
58549
|
+
ok: boolean(),
|
|
58550
|
+
error: string().optional(),
|
|
58551
|
+
/** Ms epoch of the attempt. */
|
|
58552
|
+
at: number()
|
|
58553
|
+
})) });
|
|
58554
|
+
DeviceType.Switch, DeviceType.Light;
|
|
58555
|
+
object({
|
|
58556
|
+
/** Members whose current value entered the aggregate. */
|
|
58557
|
+
included: number().int().nonnegative().meta(readingMeta("count", {
|
|
58558
|
+
precision: 0,
|
|
58559
|
+
label: "Reporting"
|
|
58560
|
+
})),
|
|
58561
|
+
/** Members left out: offline, unknown, or not a finite reading (D393). */
|
|
58562
|
+
excluded: number().int().nonnegative().meta(readingMeta("count", {
|
|
58563
|
+
precision: 0,
|
|
58564
|
+
label: "Excluded"
|
|
58565
|
+
})),
|
|
58566
|
+
/** `included` + `excluded`. */
|
|
58567
|
+
total: number().int().nonnegative().meta(readingMeta("count", {
|
|
58568
|
+
precision: 0,
|
|
58569
|
+
label: "Members"
|
|
58570
|
+
}))
|
|
58571
|
+
});
|
|
58572
|
+
DeviceType.Sensor, DeviceType.Switch, DeviceType.Light;
|
|
58081
58573
|
object({
|
|
58082
58574
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
58083
58575
|
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
@@ -65276,6 +65768,13 @@ Object.freeze({
|
|
|
65276
65768
|
access: "view",
|
|
65277
65769
|
role: "admin"
|
|
65278
65770
|
},
|
|
65771
|
+
"addons.getPackageDocs": {
|
|
65772
|
+
capName: "addons",
|
|
65773
|
+
capScope: "system",
|
|
65774
|
+
addonId: null,
|
|
65775
|
+
access: "view",
|
|
65776
|
+
role: "admin"
|
|
65777
|
+
},
|
|
65279
65778
|
"addons.getVersions": {
|
|
65280
65779
|
capName: "addons",
|
|
65281
65780
|
capScope: "system",
|
|
@@ -68384,6 +68883,20 @@ Object.freeze({
|
|
|
68384
68883
|
access: "view",
|
|
68385
68884
|
role: "viewer"
|
|
68386
68885
|
},
|
|
68886
|
+
"groupCommands.getStatus": {
|
|
68887
|
+
capName: "group-commands",
|
|
68888
|
+
capScope: "device",
|
|
68889
|
+
addonId: null,
|
|
68890
|
+
access: "view",
|
|
68891
|
+
role: "viewer"
|
|
68892
|
+
},
|
|
68893
|
+
"groupStatus.getStatus": {
|
|
68894
|
+
capName: "group-status",
|
|
68895
|
+
capScope: "device",
|
|
68896
|
+
addonId: null,
|
|
68897
|
+
access: "view",
|
|
68898
|
+
role: "viewer"
|
|
68899
|
+
},
|
|
68387
68900
|
"heatingValve.getStatus": {
|
|
68388
68901
|
capName: "heating-valve",
|
|
68389
68902
|
capScope: "device",
|
|
@@ -78206,6 +78719,37 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
78206
78719
|
icon: "flame"
|
|
78207
78720
|
}]
|
|
78208
78721
|
},
|
|
78722
|
+
"group-commands": {
|
|
78723
|
+
scope: "device",
|
|
78724
|
+
noun: t("Group command", "Comando di gruppo")
|
|
78725
|
+
},
|
|
78726
|
+
"group-status": {
|
|
78727
|
+
scope: "device",
|
|
78728
|
+
noun: t("Group", "Gruppo"),
|
|
78729
|
+
state: [
|
|
78730
|
+
{
|
|
78731
|
+
kind: "numeric",
|
|
78732
|
+
field: "included",
|
|
78733
|
+
quantity: t("the members reporting", "i membri che rispondono"),
|
|
78734
|
+
label: t("Reporting", "Rispondono"),
|
|
78735
|
+
icon: "users"
|
|
78736
|
+
},
|
|
78737
|
+
{
|
|
78738
|
+
kind: "numeric",
|
|
78739
|
+
field: "excluded",
|
|
78740
|
+
quantity: t("the members left out", "i membri esclusi"),
|
|
78741
|
+
label: t("Excluded", "Esclusi"),
|
|
78742
|
+
icon: "users"
|
|
78743
|
+
},
|
|
78744
|
+
{
|
|
78745
|
+
kind: "numeric",
|
|
78746
|
+
field: "total",
|
|
78747
|
+
quantity: t("the member count", "il numero di membri"),
|
|
78748
|
+
label: t("Members", "Membri"),
|
|
78749
|
+
icon: "sigma"
|
|
78750
|
+
}
|
|
78751
|
+
]
|
|
78752
|
+
},
|
|
78209
78753
|
"humidity-sensor": {
|
|
78210
78754
|
scope: "device",
|
|
78211
78755
|
noun: t("Humidity", "Umidità"),
|
|
@@ -79671,6 +80215,16 @@ Object.freeze({
|
|
|
79671
80215
|
form: "single",
|
|
79672
80216
|
optional: false
|
|
79673
80217
|
}],
|
|
80218
|
+
"groupCommands.getStatus": [{
|
|
80219
|
+
name: "deviceId",
|
|
80220
|
+
form: "single",
|
|
80221
|
+
optional: false
|
|
80222
|
+
}],
|
|
80223
|
+
"groupStatus.getStatus": [{
|
|
80224
|
+
name: "deviceId",
|
|
80225
|
+
form: "single",
|
|
80226
|
+
optional: false
|
|
80227
|
+
}],
|
|
79674
80228
|
"heatingValve.getStatus": [{
|
|
79675
80229
|
name: "deviceId",
|
|
79676
80230
|
form: "single",
|
|
@@ -81655,6 +82209,8 @@ new Map(Object.entries({
|
|
|
81655
82209
|
"detection-blind": "device-events",
|
|
81656
82210
|
"motion-noisy": "device-events",
|
|
81657
82211
|
"motion-calm": "device-events",
|
|
82212
|
+
"package-llm-silent": "device-events",
|
|
82213
|
+
"package-llm-answered": "device-events",
|
|
81658
82214
|
"recording-stalled": "device-events",
|
|
81659
82215
|
"recording-healthy": "device-events",
|
|
81660
82216
|
"recording-degraded": "device-events",
|
|
@@ -81738,6 +82294,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
81738
82294
|
label: "Motion without a subject",
|
|
81739
82295
|
kinds: ["motion-noisy", "motion-calm"]
|
|
81740
82296
|
},
|
|
82297
|
+
{
|
|
82298
|
+
id: "package-llm",
|
|
82299
|
+
family: "device-events",
|
|
82300
|
+
label: "Package confirm",
|
|
82301
|
+
kinds: ["package-llm-silent", "package-llm-answered"]
|
|
82302
|
+
},
|
|
81741
82303
|
{
|
|
81742
82304
|
id: "recording",
|
|
81743
82305
|
family: "device-events",
|
|
@@ -81919,6 +82481,8 @@ var DEVICE_EVENTS = [
|
|
|
81919
82481
|
"detection-blind",
|
|
81920
82482
|
"motion-noisy",
|
|
81921
82483
|
"motion-calm",
|
|
82484
|
+
"package-llm-silent",
|
|
82485
|
+
"package-llm-answered",
|
|
81922
82486
|
"recording-stalled",
|
|
81923
82487
|
"recording-healthy",
|
|
81924
82488
|
"recording-degraded",
|
|
@@ -82187,6 +82751,15 @@ new Map([
|
|
|
82187
82751
|
snapshotLabel: "Cameras with constant motion now",
|
|
82188
82752
|
snapshotSection: null
|
|
82189
82753
|
},
|
|
82754
|
+
{
|
|
82755
|
+
id: "package-llm-confirm",
|
|
82756
|
+
family: "device-events",
|
|
82757
|
+
label: "Package confirm (not answering / answering again)",
|
|
82758
|
+
bad: ["package-llm-silent"],
|
|
82759
|
+
recovery: ["package-llm-answered"],
|
|
82760
|
+
snapshotLabel: "Cameras whose package confirm is not answering",
|
|
82761
|
+
snapshotSection: null
|
|
82762
|
+
},
|
|
82190
82763
|
{
|
|
82191
82764
|
id: "recording-health",
|
|
82192
82765
|
family: "device-events",
|