@camstack/addon-provider-dreame 0.2.156 → 0.2.157
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 +18 -0
- package/dist/addon.js +602 -16
- package/dist/addon.mjs +602 -16
- package/package.json +4 -2
package/dist/addon.js
CHANGED
|
@@ -44,7 +44,7 @@ let net = require("net");
|
|
|
44
44
|
net = __toESM(net, 1);
|
|
45
45
|
let zlib = require("zlib");
|
|
46
46
|
zlib = __toESM(zlib, 1);
|
|
47
|
-
//#region ../types/dist/event-category-
|
|
47
|
+
//#region ../types/dist/event-category-CT-hz5Rb.mjs
|
|
48
48
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
49
49
|
EventCategory["SystemBoot"] = "system.boot";
|
|
50
50
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -370,6 +370,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
370
370
|
/** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
|
|
371
371
|
EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
|
|
372
372
|
/**
|
|
373
|
+
* A camera's package LLM confirm has failed closed three times in a row
|
|
374
|
+
* (D931, 2026-10-26). One edge per camera until
|
|
375
|
+
* {@link PipelinePackageLlmAnswered}.
|
|
376
|
+
*/
|
|
377
|
+
EventCategory["PipelinePackageLlmSilent"] = "pipeline.package-llm-silent";
|
|
378
|
+
/** The recovery edge of {@link PipelinePackageLlmSilent}: a confirm returned yes or no. */
|
|
379
|
+
EventCategory["PipelinePackageLlmAnswered"] = "pipeline.package-llm-answered";
|
|
380
|
+
/**
|
|
373
381
|
* Per-camera pipeline config was mutated by the orchestrator
|
|
374
382
|
* (a settings change via `setAgentInferenceDevices` /
|
|
375
383
|
* `setCameraStepToggle` / `setCameraStepSettings`). Orchestrator
|
|
@@ -5479,7 +5487,7 @@ var ZodIssueCode$1 = {
|
|
|
5479
5487
|
var ZodFirstPartyTypeKind$1;
|
|
5480
5488
|
ZodFirstPartyTypeKind$1 || (ZodFirstPartyTypeKind$1 = {});
|
|
5481
5489
|
//#endregion
|
|
5482
|
-
//#region ../types/dist/sleep-
|
|
5490
|
+
//#region ../types/dist/sleep-bykKrTgu.mjs
|
|
5483
5491
|
/**
|
|
5484
5492
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5485
5493
|
* window to float samples (D455).
|
|
@@ -8672,6 +8680,8 @@ var CAP_NAMES = Object.freeze([
|
|
|
8672
8680
|
"filesystem-browse",
|
|
8673
8681
|
"flood",
|
|
8674
8682
|
"gas",
|
|
8683
|
+
"group-commands",
|
|
8684
|
+
"group-status",
|
|
8675
8685
|
"heating-valve",
|
|
8676
8686
|
"humidifier",
|
|
8677
8687
|
"humidity-sensor",
|
|
@@ -9490,6 +9500,20 @@ Object.freeze({
|
|
|
9490
9500
|
"path": "detected",
|
|
9491
9501
|
"valueType": "boolean"
|
|
9492
9502
|
}],
|
|
9503
|
+
"group-status": [
|
|
9504
|
+
{
|
|
9505
|
+
"path": "included",
|
|
9506
|
+
"valueType": "number"
|
|
9507
|
+
},
|
|
9508
|
+
{
|
|
9509
|
+
"path": "excluded",
|
|
9510
|
+
"valueType": "number"
|
|
9511
|
+
},
|
|
9512
|
+
{
|
|
9513
|
+
"path": "total",
|
|
9514
|
+
"valueType": "number"
|
|
9515
|
+
}
|
|
9516
|
+
],
|
|
9493
9517
|
"heating-valve": [{
|
|
9494
9518
|
"path": "position",
|
|
9495
9519
|
"valueType": "number"
|
|
@@ -10845,7 +10869,7 @@ function errMsg(err) {
|
|
|
10845
10869
|
return String(err);
|
|
10846
10870
|
}
|
|
10847
10871
|
//#endregion
|
|
10848
|
-
//#region ../types/dist/composition-
|
|
10872
|
+
//#region ../types/dist/composition-OhpuespA.mjs
|
|
10849
10873
|
/**
|
|
10850
10874
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
10851
10875
|
*
|
|
@@ -11600,15 +11624,74 @@ function validateExpressionSource(src) {
|
|
|
11600
11624
|
}
|
|
11601
11625
|
return null;
|
|
11602
11626
|
}
|
|
11603
|
-
/**
|
|
11604
|
-
|
|
11605
|
-
|
|
11606
|
-
|
|
11627
|
+
/**
|
|
11628
|
+
* A composition source identity: `(addonId, stableId)`, never a numeric device
|
|
11629
|
+
* id. Split out so helper schemas can name it without a cycle through
|
|
11630
|
+
* `composition.ts` (D659).
|
|
11631
|
+
*/
|
|
11607
11632
|
var CompositionSourceRefSchema = object({
|
|
11608
11633
|
/** The owning addon; `stableId` is unique only within it. */
|
|
11609
11634
|
addonId: string().min(1),
|
|
11610
11635
|
stableId: string().min(1)
|
|
11611
11636
|
});
|
|
11637
|
+
var GROUP_TEMPLATE_IDS = [
|
|
11638
|
+
"temperature",
|
|
11639
|
+
"humidity",
|
|
11640
|
+
"pressure",
|
|
11641
|
+
"illuminance",
|
|
11642
|
+
"power",
|
|
11643
|
+
"energy",
|
|
11644
|
+
"battery",
|
|
11645
|
+
"numeric",
|
|
11646
|
+
"motion",
|
|
11647
|
+
"contact",
|
|
11648
|
+
"leak",
|
|
11649
|
+
"smoke",
|
|
11650
|
+
"occupancy",
|
|
11651
|
+
"binary",
|
|
11652
|
+
"switch",
|
|
11653
|
+
"light"
|
|
11654
|
+
];
|
|
11655
|
+
var NUMERIC_AGGREGATES = [
|
|
11656
|
+
"mean",
|
|
11657
|
+
"median",
|
|
11658
|
+
"min",
|
|
11659
|
+
"max",
|
|
11660
|
+
"sum"
|
|
11661
|
+
];
|
|
11662
|
+
var BINARY_AGGREGATES = ["any", "all"];
|
|
11663
|
+
/** How an actuator group decides it is on. Unknown members never count as off. */
|
|
11664
|
+
var ACTIVE_CRITERIA = ["at-least-one", "all"];
|
|
11665
|
+
var AGGREGATE_REDUCERS = [
|
|
11666
|
+
"mean",
|
|
11667
|
+
"median",
|
|
11668
|
+
"min",
|
|
11669
|
+
"max",
|
|
11670
|
+
"sum",
|
|
11671
|
+
"any",
|
|
11672
|
+
"all"
|
|
11673
|
+
];
|
|
11674
|
+
var GroupTemplateIdSchema = _enum(GROUP_TEMPLATE_IDS);
|
|
11675
|
+
var AggregateReducerSchema = _enum(AGGREGATE_REDUCERS);
|
|
11676
|
+
var ActiveCriterionSchema = _enum(ACTIVE_CRITERIA);
|
|
11677
|
+
/** One member. The field is stored so occupancy can name motion or binary. */
|
|
11678
|
+
var HelperMemberSchema = object({
|
|
11679
|
+
source: CompositionSourceRefSchema,
|
|
11680
|
+
cap: string().min(1),
|
|
11681
|
+
fieldPath: string().min(1)
|
|
11682
|
+
});
|
|
11683
|
+
var HelperSpecSchema = discriminatedUnion("kind", [object({
|
|
11684
|
+
kind: literal("group"),
|
|
11685
|
+
templateId: GroupTemplateIdSchema,
|
|
11686
|
+
aggregate: AggregateReducerSchema,
|
|
11687
|
+
members: array(HelperMemberSchema).min(1).max(64),
|
|
11688
|
+
/** Actuator groups only. Readings leave this unset. */
|
|
11689
|
+
active: ActiveCriterionSchema.optional()
|
|
11690
|
+
})]);
|
|
11691
|
+
/** A composed device's stableId is this prefix plus the block id. */
|
|
11692
|
+
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
11693
|
+
/** Longest snippet a `code` source may carry (slice 4). */
|
|
11694
|
+
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
11612
11695
|
/** One field of one capability of one source device. */
|
|
11613
11696
|
var CompositionFieldReadSchema = object({
|
|
11614
11697
|
source: CompositionSourceRefSchema,
|
|
@@ -11652,7 +11735,33 @@ var CompositionCodeSourceSchema = object({
|
|
|
11652
11735
|
var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
11653
11736
|
CompositionFromSourceSchema,
|
|
11654
11737
|
CompositionExpressionSourceSchema,
|
|
11655
|
-
CompositionCodeSourceSchema
|
|
11738
|
+
CompositionCodeSourceSchema,
|
|
11739
|
+
object({
|
|
11740
|
+
kind: literal("aggregate"),
|
|
11741
|
+
reducer: _enum([
|
|
11742
|
+
"mean",
|
|
11743
|
+
"median",
|
|
11744
|
+
"min",
|
|
11745
|
+
"max",
|
|
11746
|
+
"sum",
|
|
11747
|
+
"any",
|
|
11748
|
+
"all"
|
|
11749
|
+
]),
|
|
11750
|
+
reads: array(CompositionFieldReadSchema).min(1).max(64),
|
|
11751
|
+
/** `value` is the reading; the others are the member counts. */
|
|
11752
|
+
publish: _enum([
|
|
11753
|
+
"value",
|
|
11754
|
+
"included",
|
|
11755
|
+
"excluded",
|
|
11756
|
+
"total"
|
|
11757
|
+
]),
|
|
11758
|
+
/** What a `value` publish does when nobody is included. Counts ignore this. */
|
|
11759
|
+
empty: _enum([
|
|
11760
|
+
"null",
|
|
11761
|
+
"omit",
|
|
11762
|
+
"offline"
|
|
11763
|
+
])
|
|
11764
|
+
})
|
|
11656
11765
|
]);
|
|
11657
11766
|
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
11658
11767
|
kind: literal("forward"),
|
|
@@ -11698,7 +11807,13 @@ var CompositionSchema = object({
|
|
|
11698
11807
|
kind: literal("existing"),
|
|
11699
11808
|
device: CompositionSourceRefSchema
|
|
11700
11809
|
})]),
|
|
11701
|
-
features: array(CompositionFeatureSchema).min(1).max(16)
|
|
11810
|
+
features: array(CompositionFeatureSchema).min(1).max(16),
|
|
11811
|
+
/**
|
|
11812
|
+
* Present when the block is a helper template. Absent on a free
|
|
11813
|
+
* composition (the room example, device 4603). The editor reads this,
|
|
11814
|
+
* never the compiled features.
|
|
11815
|
+
*/
|
|
11816
|
+
helper: HelperSpecSchema.optional()
|
|
11702
11817
|
}).superRefine((composition, ctx) => {
|
|
11703
11818
|
const seen = /* @__PURE__ */ new Set();
|
|
11704
11819
|
composition.features.forEach((feature, index) => {
|
|
@@ -17907,7 +18022,10 @@ var CompositionProblemSchema = object({
|
|
|
17907
18022
|
"target-missing",
|
|
17908
18023
|
"target-unreadable",
|
|
17909
18024
|
"not-replaceable",
|
|
17910
|
-
"native-capability-replace"
|
|
18025
|
+
"native-capability-replace",
|
|
18026
|
+
"mixed-quantity",
|
|
18027
|
+
"helper-mismatch",
|
|
18028
|
+
"member-constraint"
|
|
17911
18029
|
]),
|
|
17912
18030
|
path: string(),
|
|
17913
18031
|
message: string()
|
|
@@ -17928,7 +18046,8 @@ var CompositionUnavailableModeSchema = _enum([
|
|
|
17928
18046
|
"null",
|
|
17929
18047
|
"offline",
|
|
17930
18048
|
"unknown",
|
|
17931
|
-
"release"
|
|
18049
|
+
"release",
|
|
18050
|
+
"omit"
|
|
17932
18051
|
]);
|
|
17933
18052
|
/**
|
|
17934
18053
|
* `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
|
|
@@ -18142,6 +18261,275 @@ Object.freeze({
|
|
|
18142
18261
|
result: ["number", "null"]
|
|
18143
18262
|
}
|
|
18144
18263
|
});
|
|
18264
|
+
/**
|
|
18265
|
+
* One catalog row per base reading a group helper can build (D944 §3).
|
|
18266
|
+
* Data, not a form default written into the block.
|
|
18267
|
+
*/
|
|
18268
|
+
var NOW = {
|
|
18269
|
+
fieldPath: "lastFetchedAt",
|
|
18270
|
+
expr: "now"
|
|
18271
|
+
};
|
|
18272
|
+
var CHANGED = {
|
|
18273
|
+
fieldPath: "lastChangedAt",
|
|
18274
|
+
expr: "now"
|
|
18275
|
+
};
|
|
18276
|
+
function numeric(input) {
|
|
18277
|
+
return {
|
|
18278
|
+
...input,
|
|
18279
|
+
family: "numeric",
|
|
18280
|
+
deviceType: DeviceType.Sensor,
|
|
18281
|
+
memberDeviceType: DeviceType.Sensor,
|
|
18282
|
+
commandCaps: [],
|
|
18283
|
+
baseUnit: baseUnitOf(input.quantity),
|
|
18284
|
+
aggregates: NUMERIC_AGGREGATES,
|
|
18285
|
+
accept: [{
|
|
18286
|
+
cap: input.outputCap,
|
|
18287
|
+
fieldPath: input.outputField
|
|
18288
|
+
}]
|
|
18289
|
+
};
|
|
18290
|
+
}
|
|
18291
|
+
function binary(input) {
|
|
18292
|
+
return {
|
|
18293
|
+
...input,
|
|
18294
|
+
family: "binary",
|
|
18295
|
+
deviceType: DeviceType.Sensor,
|
|
18296
|
+
memberDeviceType: DeviceType.Sensor,
|
|
18297
|
+
commandCaps: [],
|
|
18298
|
+
quantity: "none",
|
|
18299
|
+
baseUnit: void 0,
|
|
18300
|
+
aggregates: BINARY_AGGREGATES,
|
|
18301
|
+
empty: "offline"
|
|
18302
|
+
};
|
|
18303
|
+
}
|
|
18304
|
+
var GROUP_TEMPLATES = [
|
|
18305
|
+
numeric({
|
|
18306
|
+
id: "temperature",
|
|
18307
|
+
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
18308
|
+
role: DeviceRole.TemperatureSensor,
|
|
18309
|
+
outputCap: "temperature-sensor",
|
|
18310
|
+
outputField: "celsius",
|
|
18311
|
+
quantity: "temperature",
|
|
18312
|
+
defaultAggregate: "mean",
|
|
18313
|
+
empty: "null",
|
|
18314
|
+
companions: [NOW]
|
|
18315
|
+
}),
|
|
18316
|
+
numeric({
|
|
18317
|
+
id: "humidity",
|
|
18318
|
+
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18319
|
+
role: DeviceRole.HumiditySensor,
|
|
18320
|
+
outputCap: "humidity-sensor",
|
|
18321
|
+
outputField: "percent",
|
|
18322
|
+
quantity: "humidity",
|
|
18323
|
+
defaultAggregate: "mean",
|
|
18324
|
+
empty: "null",
|
|
18325
|
+
companions: [NOW]
|
|
18326
|
+
}),
|
|
18327
|
+
numeric({
|
|
18328
|
+
id: "pressure",
|
|
18329
|
+
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
18330
|
+
role: DeviceRole.PressureSensor,
|
|
18331
|
+
outputCap: "pressure-sensor",
|
|
18332
|
+
outputField: "hpa",
|
|
18333
|
+
quantity: "pressure",
|
|
18334
|
+
defaultAggregate: "mean",
|
|
18335
|
+
empty: "null",
|
|
18336
|
+
companions: [NOW]
|
|
18337
|
+
}),
|
|
18338
|
+
numeric({
|
|
18339
|
+
id: "illuminance",
|
|
18340
|
+
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
18341
|
+
role: DeviceRole.AmbientLightSensor,
|
|
18342
|
+
outputCap: "ambient-light-sensor",
|
|
18343
|
+
outputField: "lux",
|
|
18344
|
+
quantity: "illuminance",
|
|
18345
|
+
defaultAggregate: "mean",
|
|
18346
|
+
empty: "null",
|
|
18347
|
+
companions: [NOW]
|
|
18348
|
+
}),
|
|
18349
|
+
numeric({
|
|
18350
|
+
id: "power",
|
|
18351
|
+
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
18352
|
+
role: DeviceRole.PowerSensor,
|
|
18353
|
+
outputCap: "power-meter",
|
|
18354
|
+
outputField: "watts",
|
|
18355
|
+
quantity: "power",
|
|
18356
|
+
defaultAggregate: "sum",
|
|
18357
|
+
empty: "omit",
|
|
18358
|
+
companions: [NOW]
|
|
18359
|
+
}),
|
|
18360
|
+
numeric({
|
|
18361
|
+
id: "energy",
|
|
18362
|
+
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
18363
|
+
role: DeviceRole.EnergySensor,
|
|
18364
|
+
outputCap: "power-meter",
|
|
18365
|
+
outputField: "kwhTotal",
|
|
18366
|
+
quantity: "energy",
|
|
18367
|
+
defaultAggregate: "sum",
|
|
18368
|
+
empty: "omit",
|
|
18369
|
+
companions: [NOW]
|
|
18370
|
+
}),
|
|
18371
|
+
numeric({
|
|
18372
|
+
id: "battery",
|
|
18373
|
+
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18374
|
+
role: DeviceRole.BatterySensor,
|
|
18375
|
+
outputCap: "battery",
|
|
18376
|
+
outputField: "percentage",
|
|
18377
|
+
quantity: "percentage",
|
|
18378
|
+
defaultAggregate: "mean",
|
|
18379
|
+
empty: "null",
|
|
18380
|
+
companions: [
|
|
18381
|
+
{
|
|
18382
|
+
fieldPath: "charging",
|
|
18383
|
+
expr: "\"unknown\""
|
|
18384
|
+
},
|
|
18385
|
+
{
|
|
18386
|
+
fieldPath: "sleeping",
|
|
18387
|
+
expr: "false"
|
|
18388
|
+
},
|
|
18389
|
+
{
|
|
18390
|
+
fieldPath: "lastUpdated",
|
|
18391
|
+
expr: "now"
|
|
18392
|
+
}
|
|
18393
|
+
]
|
|
18394
|
+
}),
|
|
18395
|
+
numeric({
|
|
18396
|
+
id: "numeric",
|
|
18397
|
+
summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
|
|
18398
|
+
role: DeviceRole.NumericSensor,
|
|
18399
|
+
outputCap: "numeric-sensor",
|
|
18400
|
+
outputField: "value",
|
|
18401
|
+
quantity: "device",
|
|
18402
|
+
defaultAggregate: "mean",
|
|
18403
|
+
empty: "null",
|
|
18404
|
+
companions: [NOW]
|
|
18405
|
+
}),
|
|
18406
|
+
binary({
|
|
18407
|
+
id: "motion",
|
|
18408
|
+
summary: "Any or all motion. Offline and unknown members are left out, never read as off. Nobody reporting takes the device offline.",
|
|
18409
|
+
role: DeviceRole.MotionSensor,
|
|
18410
|
+
outputCap: "motion",
|
|
18411
|
+
outputField: "detected",
|
|
18412
|
+
defaultAggregate: "any",
|
|
18413
|
+
accept: [{
|
|
18414
|
+
cap: "motion",
|
|
18415
|
+
fieldPath: "detected"
|
|
18416
|
+
}],
|
|
18417
|
+
companions: [{
|
|
18418
|
+
fieldPath: "lastDetectedAt",
|
|
18419
|
+
expr: "null"
|
|
18420
|
+
}, {
|
|
18421
|
+
fieldPath: "autoClearAfterMs",
|
|
18422
|
+
expr: "null"
|
|
18423
|
+
}]
|
|
18424
|
+
}),
|
|
18425
|
+
binary({
|
|
18426
|
+
id: "contact",
|
|
18427
|
+
summary: "Any or all open contacts. Offline and unknown members are left out, never read as closed.",
|
|
18428
|
+
role: DeviceRole.ContactSensor,
|
|
18429
|
+
outputCap: "contact",
|
|
18430
|
+
outputField: "entryOpen",
|
|
18431
|
+
defaultAggregate: "any",
|
|
18432
|
+
accept: [{
|
|
18433
|
+
cap: "contact",
|
|
18434
|
+
fieldPath: "entryOpen"
|
|
18435
|
+
}],
|
|
18436
|
+
companions: [CHANGED]
|
|
18437
|
+
}),
|
|
18438
|
+
binary({
|
|
18439
|
+
id: "leak",
|
|
18440
|
+
summary: "Any or all leak detections. Offline and unknown members are left out, never read as dry.",
|
|
18441
|
+
role: DeviceRole.LeakSensor,
|
|
18442
|
+
outputCap: "flood",
|
|
18443
|
+
outputField: "flooded",
|
|
18444
|
+
defaultAggregate: "any",
|
|
18445
|
+
accept: [{
|
|
18446
|
+
cap: "flood",
|
|
18447
|
+
fieldPath: "flooded"
|
|
18448
|
+
}],
|
|
18449
|
+
companions: [CHANGED]
|
|
18450
|
+
}),
|
|
18451
|
+
binary({
|
|
18452
|
+
id: "smoke",
|
|
18453
|
+
summary: "Any or all smoke detections. Offline and unknown members are left out, never read as clear.",
|
|
18454
|
+
role: DeviceRole.SmokeSensor,
|
|
18455
|
+
outputCap: "smoke",
|
|
18456
|
+
outputField: "detected",
|
|
18457
|
+
defaultAggregate: "any",
|
|
18458
|
+
accept: [{
|
|
18459
|
+
cap: "smoke",
|
|
18460
|
+
fieldPath: "detected"
|
|
18461
|
+
}],
|
|
18462
|
+
companions: [CHANGED]
|
|
18463
|
+
}),
|
|
18464
|
+
binary({
|
|
18465
|
+
id: "occupancy",
|
|
18466
|
+
summary: "Any or all of motion or binary sensors, published as a binary. Presence zones are not aggregated. Nobody reporting is offline, not off.",
|
|
18467
|
+
role: DeviceRole.BinarySensor,
|
|
18468
|
+
outputCap: "binary",
|
|
18469
|
+
outputField: "on",
|
|
18470
|
+
defaultAggregate: "any",
|
|
18471
|
+
accept: [{
|
|
18472
|
+
cap: "motion",
|
|
18473
|
+
fieldPath: "detected"
|
|
18474
|
+
}, {
|
|
18475
|
+
cap: "binary",
|
|
18476
|
+
fieldPath: "on"
|
|
18477
|
+
}],
|
|
18478
|
+
companions: [CHANGED]
|
|
18479
|
+
}),
|
|
18480
|
+
binary({
|
|
18481
|
+
id: "binary",
|
|
18482
|
+
summary: "Any or all generic binary sensors. Offline and unknown members are left out, never read as off.",
|
|
18483
|
+
role: DeviceRole.BinarySensor,
|
|
18484
|
+
outputCap: "binary",
|
|
18485
|
+
outputField: "on",
|
|
18486
|
+
defaultAggregate: "any",
|
|
18487
|
+
accept: [{
|
|
18488
|
+
cap: "binary",
|
|
18489
|
+
fieldPath: "on"
|
|
18490
|
+
}],
|
|
18491
|
+
companions: [CHANGED]
|
|
18492
|
+
}),
|
|
18493
|
+
actuator({
|
|
18494
|
+
id: "switch",
|
|
18495
|
+
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.",
|
|
18496
|
+
deviceType: DeviceType.Switch,
|
|
18497
|
+
outputCap: "switch",
|
|
18498
|
+
commandCaps: ["switch"]
|
|
18499
|
+
}),
|
|
18500
|
+
actuator({
|
|
18501
|
+
id: "light",
|
|
18502
|
+
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.",
|
|
18503
|
+
deviceType: DeviceType.Light,
|
|
18504
|
+
outputCap: "switch",
|
|
18505
|
+
commandCaps: [
|
|
18506
|
+
"switch",
|
|
18507
|
+
"brightness",
|
|
18508
|
+
"color"
|
|
18509
|
+
]
|
|
18510
|
+
})
|
|
18511
|
+
];
|
|
18512
|
+
function actuator(input) {
|
|
18513
|
+
return {
|
|
18514
|
+
...input,
|
|
18515
|
+
family: "actuator",
|
|
18516
|
+
role: void 0,
|
|
18517
|
+
memberDeviceType: input.deviceType,
|
|
18518
|
+
outputField: "on",
|
|
18519
|
+
quantity: "none",
|
|
18520
|
+
baseUnit: void 0,
|
|
18521
|
+
aggregates: BINARY_AGGREGATES,
|
|
18522
|
+
defaultAggregate: "any",
|
|
18523
|
+
empty: "offline",
|
|
18524
|
+
accept: [{
|
|
18525
|
+
cap: "switch",
|
|
18526
|
+
fieldPath: "on"
|
|
18527
|
+
}],
|
|
18528
|
+
companions: [CHANGED]
|
|
18529
|
+
};
|
|
18530
|
+
}
|
|
18531
|
+
new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
|
|
18532
|
+
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
18145
18533
|
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
18146
18534
|
/**
|
|
18147
18535
|
* What a composition may BUILD on a device type (G2, D676): the caps a new
|
|
@@ -45047,6 +45435,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
45047
45435
|
"detection-blind",
|
|
45048
45436
|
"motion-noisy",
|
|
45049
45437
|
"motion-calm",
|
|
45438
|
+
"package-llm-silent",
|
|
45439
|
+
"package-llm-answered",
|
|
45050
45440
|
"recording-stalled",
|
|
45051
45441
|
"recording-healthy",
|
|
45052
45442
|
"recording-degraded",
|
|
@@ -56138,6 +56528,28 @@ var PackageVersionInfoSchema = object({
|
|
|
56138
56528
|
deprecated: string().optional(),
|
|
56139
56529
|
distTags: array(string()).readonly()
|
|
56140
56530
|
});
|
|
56531
|
+
/**
|
|
56532
|
+
* One published document. `ok` is markdown from the registry. `missing` means
|
|
56533
|
+
* the registry answered and the file was not there. `error` is a registry or
|
|
56534
|
+
* tarball failure — never an empty string standing in for either.
|
|
56535
|
+
*/
|
|
56536
|
+
var PackageDocBodySchema = discriminatedUnion("status", [
|
|
56537
|
+
object({
|
|
56538
|
+
status: literal("ok"),
|
|
56539
|
+
markdown: string()
|
|
56540
|
+
}),
|
|
56541
|
+
object({ status: literal("missing") }),
|
|
56542
|
+
object({
|
|
56543
|
+
status: literal("error"),
|
|
56544
|
+
message: string()
|
|
56545
|
+
})
|
|
56546
|
+
]);
|
|
56547
|
+
var PackageDocsSchema = object({
|
|
56548
|
+
name: string(),
|
|
56549
|
+
version: string(),
|
|
56550
|
+
readme: PackageDocBodySchema,
|
|
56551
|
+
changelog: PackageDocBodySchema
|
|
56552
|
+
});
|
|
56141
56553
|
var SearchResultSchema = object({
|
|
56142
56554
|
name: string(),
|
|
56143
56555
|
version: string(),
|
|
@@ -56356,7 +56768,10 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
56356
56768
|
}), object({ success: literal(true) }), {
|
|
56357
56769
|
kind: "mutation",
|
|
56358
56770
|
auth: "admin"
|
|
56359
|
-
}), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
|
|
56771
|
+
}), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
|
|
56772
|
+
name: string().min(1),
|
|
56773
|
+
version: string().min(1).optional()
|
|
56774
|
+
}), PackageDocsSchema, { auth: "admin" }), method(object({ addonId: string() }), RestartAddonResultSchema, {
|
|
56360
56775
|
kind: "mutation",
|
|
56361
56776
|
auth: "admin"
|
|
56362
56777
|
}), method(object({ packageName: string() }), object({ success: literal(true) }), {
|
|
@@ -59704,6 +60119,88 @@ var gasCapability = {
|
|
|
59704
60119
|
* whether persisting is worth a SQLite commit. */
|
|
59705
60120
|
volatileStateFields: ["lastChangedAt"]
|
|
59706
60121
|
};
|
|
60122
|
+
var GroupCommandsSchema = object({
|
|
60123
|
+
/** One row per member that has been commanded. A later command replaces that member's row. */
|
|
60124
|
+
results: array(object({
|
|
60125
|
+
deviceId: number().int().nonnegative(),
|
|
60126
|
+
cap: string().min(1),
|
|
60127
|
+
method: string().min(1),
|
|
60128
|
+
ok: boolean(),
|
|
60129
|
+
error: string().optional(),
|
|
60130
|
+
/** Ms epoch of the attempt. */
|
|
60131
|
+
at: number()
|
|
60132
|
+
})) });
|
|
60133
|
+
var groupCommandsCapability = {
|
|
60134
|
+
name: "group-commands",
|
|
60135
|
+
scope: "device",
|
|
60136
|
+
deviceNative: true,
|
|
60137
|
+
mode: "singleton",
|
|
60138
|
+
deviceTypes: [DeviceType.Switch, DeviceType.Light],
|
|
60139
|
+
methods: {},
|
|
60140
|
+
status: {
|
|
60141
|
+
schema: GroupCommandsSchema,
|
|
60142
|
+
kind: "push"
|
|
60143
|
+
},
|
|
60144
|
+
runtimeState: GroupCommandsSchema,
|
|
60145
|
+
/**
|
|
60146
|
+
* Runtime-state durability: **session** — the last attempt. A restored
|
|
60147
|
+
* failure would outlive the command that caused it.
|
|
60148
|
+
*
|
|
60149
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
60150
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
60151
|
+
*/
|
|
60152
|
+
durability: "session",
|
|
60153
|
+
history: "none"
|
|
60154
|
+
};
|
|
60155
|
+
/**
|
|
60156
|
+
* How many members of a helper group answered (D944). Counts are integers,
|
|
60157
|
+
* not measurements: zero included is a real count, never a stand-in reading.
|
|
60158
|
+
* The reading itself stays on the output capability. History is none — the
|
|
60159
|
+
* series that later statistics read is the output cap's own history block.
|
|
60160
|
+
*/
|
|
60161
|
+
var GroupStatusSchema = object({
|
|
60162
|
+
/** Members whose current value entered the aggregate. */
|
|
60163
|
+
included: number().int().nonnegative().meta(readingMeta("count", {
|
|
60164
|
+
precision: 0,
|
|
60165
|
+
label: "Reporting"
|
|
60166
|
+
})),
|
|
60167
|
+
/** Members left out: offline, unknown, or not a finite reading (D393). */
|
|
60168
|
+
excluded: number().int().nonnegative().meta(readingMeta("count", {
|
|
60169
|
+
precision: 0,
|
|
60170
|
+
label: "Excluded"
|
|
60171
|
+
})),
|
|
60172
|
+
/** `included` + `excluded`. */
|
|
60173
|
+
total: number().int().nonnegative().meta(readingMeta("count", {
|
|
60174
|
+
precision: 0,
|
|
60175
|
+
label: "Members"
|
|
60176
|
+
}))
|
|
60177
|
+
});
|
|
60178
|
+
var groupStatusCapability = {
|
|
60179
|
+
name: "group-status",
|
|
60180
|
+
scope: "device",
|
|
60181
|
+
deviceNative: true,
|
|
60182
|
+
mode: "singleton",
|
|
60183
|
+
deviceTypes: [
|
|
60184
|
+
DeviceType.Sensor,
|
|
60185
|
+
DeviceType.Switch,
|
|
60186
|
+
DeviceType.Light
|
|
60187
|
+
],
|
|
60188
|
+
methods: {},
|
|
60189
|
+
status: {
|
|
60190
|
+
schema: GroupStatusSchema,
|
|
60191
|
+
kind: "push"
|
|
60192
|
+
},
|
|
60193
|
+
runtimeState: GroupStatusSchema,
|
|
60194
|
+
/**
|
|
60195
|
+
* Runtime-state durability: **session** — recomputed from members on the
|
|
60196
|
+
* next source event; a restored count would outlive the readings it named.
|
|
60197
|
+
*
|
|
60198
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
60199
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
60200
|
+
*/
|
|
60201
|
+
durability: "session",
|
|
60202
|
+
history: "none"
|
|
60203
|
+
};
|
|
59707
60204
|
var HeatingValveStatusSchema = object({
|
|
59708
60205
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
59709
60206
|
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
@@ -61473,12 +61970,18 @@ var motionCapability = {
|
|
|
61473
61970
|
methods: {
|
|
61474
61971
|
/**
|
|
61475
61972
|
* Pull the current motion state synchronously. Convenience shortcut
|
|
61476
|
-
* for consumers that don't need the full status object
|
|
61477
|
-
*
|
|
61478
|
-
* `getStatus` once the auto-injected status surface lands in every
|
|
61479
|
-
* consumer.
|
|
61973
|
+
* for consumers that don't need the full status object. A composed
|
|
61974
|
+
* group answers from its slice (D944): unknown throws, it is not off.
|
|
61480
61975
|
*/
|
|
61481
61976
|
isDetected: method(object({ deviceId: number() }), boolean()) },
|
|
61977
|
+
/**
|
|
61978
|
+
* A composed motion group serves `isDetected` from `detected` (D944).
|
|
61979
|
+
* Without this the cap stays uncomposable (`has-commands`).
|
|
61980
|
+
*/
|
|
61981
|
+
composedMethods: { isDetected: {
|
|
61982
|
+
kind: "slice",
|
|
61983
|
+
field: "detected"
|
|
61984
|
+
} },
|
|
61482
61985
|
events: {
|
|
61483
61986
|
/**
|
|
61484
61987
|
* Fires every time the runner transitions a camera between
|
|
@@ -69870,6 +70373,8 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
69870
70373
|
featureProbe: featureProbeCapability,
|
|
69871
70374
|
flood: floodCapability,
|
|
69872
70375
|
gas: gasCapability,
|
|
70376
|
+
groupCommands: groupCommandsCapability,
|
|
70377
|
+
groupStatus: groupStatusCapability,
|
|
69873
70378
|
heatingValve: heatingValveCapability,
|
|
69874
70379
|
humidifier: humidifierCapability,
|
|
69875
70380
|
humiditySensor: humiditySensorCapability,
|
|
@@ -71262,6 +71767,13 @@ Object.freeze({
|
|
|
71262
71767
|
access: "view",
|
|
71263
71768
|
role: "admin"
|
|
71264
71769
|
},
|
|
71770
|
+
"addons.getPackageDocs": {
|
|
71771
|
+
capName: "addons",
|
|
71772
|
+
capScope: "system",
|
|
71773
|
+
addonId: null,
|
|
71774
|
+
access: "view",
|
|
71775
|
+
role: "admin"
|
|
71776
|
+
},
|
|
71265
71777
|
"addons.getVersions": {
|
|
71266
71778
|
capName: "addons",
|
|
71267
71779
|
capScope: "system",
|
|
@@ -74370,6 +74882,20 @@ Object.freeze({
|
|
|
74370
74882
|
access: "view",
|
|
74371
74883
|
role: "viewer"
|
|
74372
74884
|
},
|
|
74885
|
+
"groupCommands.getStatus": {
|
|
74886
|
+
capName: "group-commands",
|
|
74887
|
+
capScope: "device",
|
|
74888
|
+
addonId: null,
|
|
74889
|
+
access: "view",
|
|
74890
|
+
role: "viewer"
|
|
74891
|
+
},
|
|
74892
|
+
"groupStatus.getStatus": {
|
|
74893
|
+
capName: "group-status",
|
|
74894
|
+
capScope: "device",
|
|
74895
|
+
addonId: null,
|
|
74896
|
+
access: "view",
|
|
74897
|
+
role: "viewer"
|
|
74898
|
+
},
|
|
74373
74899
|
"heatingValve.getStatus": {
|
|
74374
74900
|
capName: "heating-valve",
|
|
74375
74901
|
capScope: "device",
|
|
@@ -84192,6 +84718,37 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
84192
84718
|
icon: "flame"
|
|
84193
84719
|
}]
|
|
84194
84720
|
},
|
|
84721
|
+
"group-commands": {
|
|
84722
|
+
scope: "device",
|
|
84723
|
+
noun: t("Group command", "Comando di gruppo")
|
|
84724
|
+
},
|
|
84725
|
+
"group-status": {
|
|
84726
|
+
scope: "device",
|
|
84727
|
+
noun: t("Group", "Gruppo"),
|
|
84728
|
+
state: [
|
|
84729
|
+
{
|
|
84730
|
+
kind: "numeric",
|
|
84731
|
+
field: "included",
|
|
84732
|
+
quantity: t("the members reporting", "i membri che rispondono"),
|
|
84733
|
+
label: t("Reporting", "Rispondono"),
|
|
84734
|
+
icon: "users"
|
|
84735
|
+
},
|
|
84736
|
+
{
|
|
84737
|
+
kind: "numeric",
|
|
84738
|
+
field: "excluded",
|
|
84739
|
+
quantity: t("the members left out", "i membri esclusi"),
|
|
84740
|
+
label: t("Excluded", "Esclusi"),
|
|
84741
|
+
icon: "users"
|
|
84742
|
+
},
|
|
84743
|
+
{
|
|
84744
|
+
kind: "numeric",
|
|
84745
|
+
field: "total",
|
|
84746
|
+
quantity: t("the member count", "il numero di membri"),
|
|
84747
|
+
label: t("Members", "Membri"),
|
|
84748
|
+
icon: "sigma"
|
|
84749
|
+
}
|
|
84750
|
+
]
|
|
84751
|
+
},
|
|
84195
84752
|
"humidity-sensor": {
|
|
84196
84753
|
scope: "device",
|
|
84197
84754
|
noun: t("Humidity", "Umidità"),
|
|
@@ -85657,6 +86214,16 @@ Object.freeze({
|
|
|
85657
86214
|
form: "single",
|
|
85658
86215
|
optional: false
|
|
85659
86216
|
}],
|
|
86217
|
+
"groupCommands.getStatus": [{
|
|
86218
|
+
name: "deviceId",
|
|
86219
|
+
form: "single",
|
|
86220
|
+
optional: false
|
|
86221
|
+
}],
|
|
86222
|
+
"groupStatus.getStatus": [{
|
|
86223
|
+
name: "deviceId",
|
|
86224
|
+
form: "single",
|
|
86225
|
+
optional: false
|
|
86226
|
+
}],
|
|
85660
86227
|
"heatingValve.getStatus": [{
|
|
85661
86228
|
name: "deviceId",
|
|
85662
86229
|
form: "single",
|
|
@@ -87641,6 +88208,8 @@ new Map(Object.entries({
|
|
|
87641
88208
|
"detection-blind": "device-events",
|
|
87642
88209
|
"motion-noisy": "device-events",
|
|
87643
88210
|
"motion-calm": "device-events",
|
|
88211
|
+
"package-llm-silent": "device-events",
|
|
88212
|
+
"package-llm-answered": "device-events",
|
|
87644
88213
|
"recording-stalled": "device-events",
|
|
87645
88214
|
"recording-healthy": "device-events",
|
|
87646
88215
|
"recording-degraded": "device-events",
|
|
@@ -87724,6 +88293,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
87724
88293
|
label: "Motion without a subject",
|
|
87725
88294
|
kinds: ["motion-noisy", "motion-calm"]
|
|
87726
88295
|
},
|
|
88296
|
+
{
|
|
88297
|
+
id: "package-llm",
|
|
88298
|
+
family: "device-events",
|
|
88299
|
+
label: "Package confirm",
|
|
88300
|
+
kinds: ["package-llm-silent", "package-llm-answered"]
|
|
88301
|
+
},
|
|
87727
88302
|
{
|
|
87728
88303
|
id: "recording",
|
|
87729
88304
|
family: "device-events",
|
|
@@ -87905,6 +88480,8 @@ var DEVICE_EVENTS = [
|
|
|
87905
88480
|
"detection-blind",
|
|
87906
88481
|
"motion-noisy",
|
|
87907
88482
|
"motion-calm",
|
|
88483
|
+
"package-llm-silent",
|
|
88484
|
+
"package-llm-answered",
|
|
87908
88485
|
"recording-stalled",
|
|
87909
88486
|
"recording-healthy",
|
|
87910
88487
|
"recording-degraded",
|
|
@@ -88173,6 +88750,15 @@ new Map([
|
|
|
88173
88750
|
snapshotLabel: "Cameras with constant motion now",
|
|
88174
88751
|
snapshotSection: null
|
|
88175
88752
|
},
|
|
88753
|
+
{
|
|
88754
|
+
id: "package-llm-confirm",
|
|
88755
|
+
family: "device-events",
|
|
88756
|
+
label: "Package confirm (not answering / answering again)",
|
|
88757
|
+
bad: ["package-llm-silent"],
|
|
88758
|
+
recovery: ["package-llm-answered"],
|
|
88759
|
+
snapshotLabel: "Cameras whose package confirm is not answering",
|
|
88760
|
+
snapshotSection: null
|
|
88761
|
+
},
|
|
88176
88762
|
{
|
|
88177
88763
|
id: "recording-health",
|
|
88178
88764
|
family: "device-events",
|