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