@camstack/addon-provider-homeassistant 1.2.626 → 1.2.628
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 +22 -0
- package/dist/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/{dist-B7nW5y58.mjs → dist-BNRaAIW1.mjs} +602 -16
- package/dist/{dist-1tLY30OG.js → dist-CAyJy-Ek.js} +602 -16
- package/dist/ha-export/ha-export.addon.js +9 -1
- package/dist/ha-export/ha-export.addon.mjs +9 -1
- package/package.json +4 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("node:crypto");
|
|
2
|
-
//#region ../types/dist/event-category-
|
|
2
|
+
//#region ../types/dist/event-category-CT-hz5Rb.mjs
|
|
3
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
5
5
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -325,6 +325,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
325
325
|
/** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
|
|
326
326
|
EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
|
|
327
327
|
/**
|
|
328
|
+
* A camera's package LLM confirm has failed closed three times in a row
|
|
329
|
+
* (D931, 2026-10-26). One edge per camera until
|
|
330
|
+
* {@link PipelinePackageLlmAnswered}.
|
|
331
|
+
*/
|
|
332
|
+
EventCategory["PipelinePackageLlmSilent"] = "pipeline.package-llm-silent";
|
|
333
|
+
/** The recovery edge of {@link PipelinePackageLlmSilent}: a confirm returned yes or no. */
|
|
334
|
+
EventCategory["PipelinePackageLlmAnswered"] = "pipeline.package-llm-answered";
|
|
335
|
+
/**
|
|
328
336
|
* Per-camera pipeline config was mutated by the orchestrator
|
|
329
337
|
* (a settings change via `setAgentInferenceDevices` /
|
|
330
338
|
* `setCameraStepToggle` / `setCameraStepSettings`). Orchestrator
|
|
@@ -5567,7 +5575,7 @@ var ZodIssueCode = {
|
|
|
5567
5575
|
var ZodFirstPartyTypeKind;
|
|
5568
5576
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5569
5577
|
//#endregion
|
|
5570
|
-
//#region ../types/dist/sleep-
|
|
5578
|
+
//#region ../types/dist/sleep-bykKrTgu.mjs
|
|
5571
5579
|
/**
|
|
5572
5580
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5573
5581
|
* window to float samples (D455).
|
|
@@ -9010,6 +9018,8 @@ var CAP_NAMES = Object.freeze([
|
|
|
9010
9018
|
"filesystem-browse",
|
|
9011
9019
|
"flood",
|
|
9012
9020
|
"gas",
|
|
9021
|
+
"group-commands",
|
|
9022
|
+
"group-status",
|
|
9013
9023
|
"heating-valve",
|
|
9014
9024
|
"humidifier",
|
|
9015
9025
|
"humidity-sensor",
|
|
@@ -9828,6 +9838,20 @@ Object.freeze({
|
|
|
9828
9838
|
"path": "detected",
|
|
9829
9839
|
"valueType": "boolean"
|
|
9830
9840
|
}],
|
|
9841
|
+
"group-status": [
|
|
9842
|
+
{
|
|
9843
|
+
"path": "included",
|
|
9844
|
+
"valueType": "number"
|
|
9845
|
+
},
|
|
9846
|
+
{
|
|
9847
|
+
"path": "excluded",
|
|
9848
|
+
"valueType": "number"
|
|
9849
|
+
},
|
|
9850
|
+
{
|
|
9851
|
+
"path": "total",
|
|
9852
|
+
"valueType": "number"
|
|
9853
|
+
}
|
|
9854
|
+
],
|
|
9831
9855
|
"heating-valve": [{
|
|
9832
9856
|
"path": "position",
|
|
9833
9857
|
"valueType": "number"
|
|
@@ -11169,7 +11193,7 @@ function errMsg(err) {
|
|
|
11169
11193
|
return String(err);
|
|
11170
11194
|
}
|
|
11171
11195
|
//#endregion
|
|
11172
|
-
//#region ../types/dist/composition-
|
|
11196
|
+
//#region ../types/dist/composition-OhpuespA.mjs
|
|
11173
11197
|
/**
|
|
11174
11198
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
11175
11199
|
*
|
|
@@ -11924,15 +11948,74 @@ function validateExpressionSource(src) {
|
|
|
11924
11948
|
}
|
|
11925
11949
|
return null;
|
|
11926
11950
|
}
|
|
11927
|
-
/**
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
11951
|
+
/**
|
|
11952
|
+
* A composition source identity: `(addonId, stableId)`, never a numeric device
|
|
11953
|
+
* id. Split out so helper schemas can name it without a cycle through
|
|
11954
|
+
* `composition.ts` (D659).
|
|
11955
|
+
*/
|
|
11931
11956
|
var CompositionSourceRefSchema = object({
|
|
11932
11957
|
/** The owning addon; `stableId` is unique only within it. */
|
|
11933
11958
|
addonId: string().min(1),
|
|
11934
11959
|
stableId: string().min(1)
|
|
11935
11960
|
});
|
|
11961
|
+
var GROUP_TEMPLATE_IDS = [
|
|
11962
|
+
"temperature",
|
|
11963
|
+
"humidity",
|
|
11964
|
+
"pressure",
|
|
11965
|
+
"illuminance",
|
|
11966
|
+
"power",
|
|
11967
|
+
"energy",
|
|
11968
|
+
"battery",
|
|
11969
|
+
"numeric",
|
|
11970
|
+
"motion",
|
|
11971
|
+
"contact",
|
|
11972
|
+
"leak",
|
|
11973
|
+
"smoke",
|
|
11974
|
+
"occupancy",
|
|
11975
|
+
"binary",
|
|
11976
|
+
"switch",
|
|
11977
|
+
"light"
|
|
11978
|
+
];
|
|
11979
|
+
var NUMERIC_AGGREGATES = [
|
|
11980
|
+
"mean",
|
|
11981
|
+
"median",
|
|
11982
|
+
"min",
|
|
11983
|
+
"max",
|
|
11984
|
+
"sum"
|
|
11985
|
+
];
|
|
11986
|
+
var BINARY_AGGREGATES = ["any", "all"];
|
|
11987
|
+
/** How an actuator group decides it is on. Unknown members never count as off. */
|
|
11988
|
+
var ACTIVE_CRITERIA = ["at-least-one", "all"];
|
|
11989
|
+
var AGGREGATE_REDUCERS = [
|
|
11990
|
+
"mean",
|
|
11991
|
+
"median",
|
|
11992
|
+
"min",
|
|
11993
|
+
"max",
|
|
11994
|
+
"sum",
|
|
11995
|
+
"any",
|
|
11996
|
+
"all"
|
|
11997
|
+
];
|
|
11998
|
+
var GroupTemplateIdSchema = _enum(GROUP_TEMPLATE_IDS);
|
|
11999
|
+
var AggregateReducerSchema = _enum(AGGREGATE_REDUCERS);
|
|
12000
|
+
var ActiveCriterionSchema = _enum(ACTIVE_CRITERIA);
|
|
12001
|
+
/** One member. The field is stored so occupancy can name motion or binary. */
|
|
12002
|
+
var HelperMemberSchema = object({
|
|
12003
|
+
source: CompositionSourceRefSchema,
|
|
12004
|
+
cap: string().min(1),
|
|
12005
|
+
fieldPath: string().min(1)
|
|
12006
|
+
});
|
|
12007
|
+
var HelperSpecSchema = discriminatedUnion("kind", [object({
|
|
12008
|
+
kind: literal("group"),
|
|
12009
|
+
templateId: GroupTemplateIdSchema,
|
|
12010
|
+
aggregate: AggregateReducerSchema,
|
|
12011
|
+
members: array(HelperMemberSchema).min(1).max(64),
|
|
12012
|
+
/** Actuator groups only. Readings leave this unset. */
|
|
12013
|
+
active: ActiveCriterionSchema.optional()
|
|
12014
|
+
})]);
|
|
12015
|
+
/** A composed device's stableId is this prefix plus the block id. */
|
|
12016
|
+
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
12017
|
+
/** Longest snippet a `code` source may carry (slice 4). */
|
|
12018
|
+
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
11936
12019
|
/** One field of one capability of one source device. */
|
|
11937
12020
|
var CompositionFieldReadSchema = object({
|
|
11938
12021
|
source: CompositionSourceRefSchema,
|
|
@@ -11976,7 +12059,33 @@ var CompositionCodeSourceSchema = object({
|
|
|
11976
12059
|
var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
11977
12060
|
CompositionFromSourceSchema,
|
|
11978
12061
|
CompositionExpressionSourceSchema,
|
|
11979
|
-
CompositionCodeSourceSchema
|
|
12062
|
+
CompositionCodeSourceSchema,
|
|
12063
|
+
object({
|
|
12064
|
+
kind: literal("aggregate"),
|
|
12065
|
+
reducer: _enum([
|
|
12066
|
+
"mean",
|
|
12067
|
+
"median",
|
|
12068
|
+
"min",
|
|
12069
|
+
"max",
|
|
12070
|
+
"sum",
|
|
12071
|
+
"any",
|
|
12072
|
+
"all"
|
|
12073
|
+
]),
|
|
12074
|
+
reads: array(CompositionFieldReadSchema).min(1).max(64),
|
|
12075
|
+
/** `value` is the reading; the others are the member counts. */
|
|
12076
|
+
publish: _enum([
|
|
12077
|
+
"value",
|
|
12078
|
+
"included",
|
|
12079
|
+
"excluded",
|
|
12080
|
+
"total"
|
|
12081
|
+
]),
|
|
12082
|
+
/** What a `value` publish does when nobody is included. Counts ignore this. */
|
|
12083
|
+
empty: _enum([
|
|
12084
|
+
"null",
|
|
12085
|
+
"omit",
|
|
12086
|
+
"offline"
|
|
12087
|
+
])
|
|
12088
|
+
})
|
|
11980
12089
|
]);
|
|
11981
12090
|
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
11982
12091
|
kind: literal("forward"),
|
|
@@ -12022,7 +12131,13 @@ var CompositionSchema = object({
|
|
|
12022
12131
|
kind: literal("existing"),
|
|
12023
12132
|
device: CompositionSourceRefSchema
|
|
12024
12133
|
})]),
|
|
12025
|
-
features: array(CompositionFeatureSchema).min(1).max(16)
|
|
12134
|
+
features: array(CompositionFeatureSchema).min(1).max(16),
|
|
12135
|
+
/**
|
|
12136
|
+
* Present when the block is a helper template. Absent on a free
|
|
12137
|
+
* composition (the room example, device 4603). The editor reads this,
|
|
12138
|
+
* never the compiled features.
|
|
12139
|
+
*/
|
|
12140
|
+
helper: HelperSpecSchema.optional()
|
|
12026
12141
|
}).superRefine((composition, ctx) => {
|
|
12027
12142
|
const seen = /* @__PURE__ */ new Set();
|
|
12028
12143
|
composition.features.forEach((feature, index) => {
|
|
@@ -18443,7 +18558,10 @@ var CompositionProblemSchema = object({
|
|
|
18443
18558
|
"target-missing",
|
|
18444
18559
|
"target-unreadable",
|
|
18445
18560
|
"not-replaceable",
|
|
18446
|
-
"native-capability-replace"
|
|
18561
|
+
"native-capability-replace",
|
|
18562
|
+
"mixed-quantity",
|
|
18563
|
+
"helper-mismatch",
|
|
18564
|
+
"member-constraint"
|
|
18447
18565
|
]),
|
|
18448
18566
|
path: string(),
|
|
18449
18567
|
message: string()
|
|
@@ -18464,7 +18582,8 @@ var CompositionUnavailableModeSchema = _enum([
|
|
|
18464
18582
|
"null",
|
|
18465
18583
|
"offline",
|
|
18466
18584
|
"unknown",
|
|
18467
|
-
"release"
|
|
18585
|
+
"release",
|
|
18586
|
+
"omit"
|
|
18468
18587
|
]);
|
|
18469
18588
|
/**
|
|
18470
18589
|
* `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
|
|
@@ -18678,6 +18797,275 @@ Object.freeze({
|
|
|
18678
18797
|
result: ["number", "null"]
|
|
18679
18798
|
}
|
|
18680
18799
|
});
|
|
18800
|
+
/**
|
|
18801
|
+
* One catalog row per base reading a group helper can build (D944 §3).
|
|
18802
|
+
* Data, not a form default written into the block.
|
|
18803
|
+
*/
|
|
18804
|
+
var NOW = {
|
|
18805
|
+
fieldPath: "lastFetchedAt",
|
|
18806
|
+
expr: "now"
|
|
18807
|
+
};
|
|
18808
|
+
var CHANGED = {
|
|
18809
|
+
fieldPath: "lastChangedAt",
|
|
18810
|
+
expr: "now"
|
|
18811
|
+
};
|
|
18812
|
+
function numeric(input) {
|
|
18813
|
+
return {
|
|
18814
|
+
...input,
|
|
18815
|
+
family: "numeric",
|
|
18816
|
+
deviceType: DeviceType.Sensor,
|
|
18817
|
+
memberDeviceType: DeviceType.Sensor,
|
|
18818
|
+
commandCaps: [],
|
|
18819
|
+
baseUnit: baseUnitOf(input.quantity),
|
|
18820
|
+
aggregates: NUMERIC_AGGREGATES,
|
|
18821
|
+
accept: [{
|
|
18822
|
+
cap: input.outputCap,
|
|
18823
|
+
fieldPath: input.outputField
|
|
18824
|
+
}]
|
|
18825
|
+
};
|
|
18826
|
+
}
|
|
18827
|
+
function binary(input) {
|
|
18828
|
+
return {
|
|
18829
|
+
...input,
|
|
18830
|
+
family: "binary",
|
|
18831
|
+
deviceType: DeviceType.Sensor,
|
|
18832
|
+
memberDeviceType: DeviceType.Sensor,
|
|
18833
|
+
commandCaps: [],
|
|
18834
|
+
quantity: "none",
|
|
18835
|
+
baseUnit: void 0,
|
|
18836
|
+
aggregates: BINARY_AGGREGATES,
|
|
18837
|
+
empty: "offline"
|
|
18838
|
+
};
|
|
18839
|
+
}
|
|
18840
|
+
var GROUP_TEMPLATES = [
|
|
18841
|
+
numeric({
|
|
18842
|
+
id: "temperature",
|
|
18843
|
+
summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
|
|
18844
|
+
role: DeviceRole.TemperatureSensor,
|
|
18845
|
+
outputCap: "temperature-sensor",
|
|
18846
|
+
outputField: "celsius",
|
|
18847
|
+
quantity: "temperature",
|
|
18848
|
+
defaultAggregate: "mean",
|
|
18849
|
+
empty: "null",
|
|
18850
|
+
companions: [NOW]
|
|
18851
|
+
}),
|
|
18852
|
+
numeric({
|
|
18853
|
+
id: "humidity",
|
|
18854
|
+
summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18855
|
+
role: DeviceRole.HumiditySensor,
|
|
18856
|
+
outputCap: "humidity-sensor",
|
|
18857
|
+
outputField: "percent",
|
|
18858
|
+
quantity: "humidity",
|
|
18859
|
+
defaultAggregate: "mean",
|
|
18860
|
+
empty: "null",
|
|
18861
|
+
companions: [NOW]
|
|
18862
|
+
}),
|
|
18863
|
+
numeric({
|
|
18864
|
+
id: "pressure",
|
|
18865
|
+
summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
|
|
18866
|
+
role: DeviceRole.PressureSensor,
|
|
18867
|
+
outputCap: "pressure-sensor",
|
|
18868
|
+
outputField: "hpa",
|
|
18869
|
+
quantity: "pressure",
|
|
18870
|
+
defaultAggregate: "mean",
|
|
18871
|
+
empty: "null",
|
|
18872
|
+
companions: [NOW]
|
|
18873
|
+
}),
|
|
18874
|
+
numeric({
|
|
18875
|
+
id: "illuminance",
|
|
18876
|
+
summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
|
|
18877
|
+
role: DeviceRole.AmbientLightSensor,
|
|
18878
|
+
outputCap: "ambient-light-sensor",
|
|
18879
|
+
outputField: "lux",
|
|
18880
|
+
quantity: "illuminance",
|
|
18881
|
+
defaultAggregate: "mean",
|
|
18882
|
+
empty: "null",
|
|
18883
|
+
companions: [NOW]
|
|
18884
|
+
}),
|
|
18885
|
+
numeric({
|
|
18886
|
+
id: "power",
|
|
18887
|
+
summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
|
|
18888
|
+
role: DeviceRole.PowerSensor,
|
|
18889
|
+
outputCap: "power-meter",
|
|
18890
|
+
outputField: "watts",
|
|
18891
|
+
quantity: "power",
|
|
18892
|
+
defaultAggregate: "sum",
|
|
18893
|
+
empty: "omit",
|
|
18894
|
+
companions: [NOW]
|
|
18895
|
+
}),
|
|
18896
|
+
numeric({
|
|
18897
|
+
id: "energy",
|
|
18898
|
+
summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
|
|
18899
|
+
role: DeviceRole.EnergySensor,
|
|
18900
|
+
outputCap: "power-meter",
|
|
18901
|
+
outputField: "kwhTotal",
|
|
18902
|
+
quantity: "energy",
|
|
18903
|
+
defaultAggregate: "sum",
|
|
18904
|
+
empty: "omit",
|
|
18905
|
+
companions: [NOW]
|
|
18906
|
+
}),
|
|
18907
|
+
numeric({
|
|
18908
|
+
id: "battery",
|
|
18909
|
+
summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
|
|
18910
|
+
role: DeviceRole.BatterySensor,
|
|
18911
|
+
outputCap: "battery",
|
|
18912
|
+
outputField: "percentage",
|
|
18913
|
+
quantity: "percentage",
|
|
18914
|
+
defaultAggregate: "mean",
|
|
18915
|
+
empty: "null",
|
|
18916
|
+
companions: [
|
|
18917
|
+
{
|
|
18918
|
+
fieldPath: "charging",
|
|
18919
|
+
expr: "\"unknown\""
|
|
18920
|
+
},
|
|
18921
|
+
{
|
|
18922
|
+
fieldPath: "sleeping",
|
|
18923
|
+
expr: "false"
|
|
18924
|
+
},
|
|
18925
|
+
{
|
|
18926
|
+
fieldPath: "lastUpdated",
|
|
18927
|
+
expr: "now"
|
|
18928
|
+
}
|
|
18929
|
+
]
|
|
18930
|
+
}),
|
|
18931
|
+
numeric({
|
|
18932
|
+
id: "numeric",
|
|
18933
|
+
summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
|
|
18934
|
+
role: DeviceRole.NumericSensor,
|
|
18935
|
+
outputCap: "numeric-sensor",
|
|
18936
|
+
outputField: "value",
|
|
18937
|
+
quantity: "device",
|
|
18938
|
+
defaultAggregate: "mean",
|
|
18939
|
+
empty: "null",
|
|
18940
|
+
companions: [NOW]
|
|
18941
|
+
}),
|
|
18942
|
+
binary({
|
|
18943
|
+
id: "motion",
|
|
18944
|
+
summary: "Any or all motion. Offline and unknown members are left out, never read as off. Nobody reporting takes the device offline.",
|
|
18945
|
+
role: DeviceRole.MotionSensor,
|
|
18946
|
+
outputCap: "motion",
|
|
18947
|
+
outputField: "detected",
|
|
18948
|
+
defaultAggregate: "any",
|
|
18949
|
+
accept: [{
|
|
18950
|
+
cap: "motion",
|
|
18951
|
+
fieldPath: "detected"
|
|
18952
|
+
}],
|
|
18953
|
+
companions: [{
|
|
18954
|
+
fieldPath: "lastDetectedAt",
|
|
18955
|
+
expr: "null"
|
|
18956
|
+
}, {
|
|
18957
|
+
fieldPath: "autoClearAfterMs",
|
|
18958
|
+
expr: "null"
|
|
18959
|
+
}]
|
|
18960
|
+
}),
|
|
18961
|
+
binary({
|
|
18962
|
+
id: "contact",
|
|
18963
|
+
summary: "Any or all open contacts. Offline and unknown members are left out, never read as closed.",
|
|
18964
|
+
role: DeviceRole.ContactSensor,
|
|
18965
|
+
outputCap: "contact",
|
|
18966
|
+
outputField: "entryOpen",
|
|
18967
|
+
defaultAggregate: "any",
|
|
18968
|
+
accept: [{
|
|
18969
|
+
cap: "contact",
|
|
18970
|
+
fieldPath: "entryOpen"
|
|
18971
|
+
}],
|
|
18972
|
+
companions: [CHANGED]
|
|
18973
|
+
}),
|
|
18974
|
+
binary({
|
|
18975
|
+
id: "leak",
|
|
18976
|
+
summary: "Any or all leak detections. Offline and unknown members are left out, never read as dry.",
|
|
18977
|
+
role: DeviceRole.LeakSensor,
|
|
18978
|
+
outputCap: "flood",
|
|
18979
|
+
outputField: "flooded",
|
|
18980
|
+
defaultAggregate: "any",
|
|
18981
|
+
accept: [{
|
|
18982
|
+
cap: "flood",
|
|
18983
|
+
fieldPath: "flooded"
|
|
18984
|
+
}],
|
|
18985
|
+
companions: [CHANGED]
|
|
18986
|
+
}),
|
|
18987
|
+
binary({
|
|
18988
|
+
id: "smoke",
|
|
18989
|
+
summary: "Any or all smoke detections. Offline and unknown members are left out, never read as clear.",
|
|
18990
|
+
role: DeviceRole.SmokeSensor,
|
|
18991
|
+
outputCap: "smoke",
|
|
18992
|
+
outputField: "detected",
|
|
18993
|
+
defaultAggregate: "any",
|
|
18994
|
+
accept: [{
|
|
18995
|
+
cap: "smoke",
|
|
18996
|
+
fieldPath: "detected"
|
|
18997
|
+
}],
|
|
18998
|
+
companions: [CHANGED]
|
|
18999
|
+
}),
|
|
19000
|
+
binary({
|
|
19001
|
+
id: "occupancy",
|
|
19002
|
+
summary: "Any or all of motion or binary sensors, published as a binary. Presence zones are not aggregated. Nobody reporting is offline, not off.",
|
|
19003
|
+
role: DeviceRole.BinarySensor,
|
|
19004
|
+
outputCap: "binary",
|
|
19005
|
+
outputField: "on",
|
|
19006
|
+
defaultAggregate: "any",
|
|
19007
|
+
accept: [{
|
|
19008
|
+
cap: "motion",
|
|
19009
|
+
fieldPath: "detected"
|
|
19010
|
+
}, {
|
|
19011
|
+
cap: "binary",
|
|
19012
|
+
fieldPath: "on"
|
|
19013
|
+
}],
|
|
19014
|
+
companions: [CHANGED]
|
|
19015
|
+
}),
|
|
19016
|
+
binary({
|
|
19017
|
+
id: "binary",
|
|
19018
|
+
summary: "Any or all generic binary sensors. Offline and unknown members are left out, never read as off.",
|
|
19019
|
+
role: DeviceRole.BinarySensor,
|
|
19020
|
+
outputCap: "binary",
|
|
19021
|
+
outputField: "on",
|
|
19022
|
+
defaultAggregate: "any",
|
|
19023
|
+
accept: [{
|
|
19024
|
+
cap: "binary",
|
|
19025
|
+
fieldPath: "on"
|
|
19026
|
+
}],
|
|
19027
|
+
companions: [CHANGED]
|
|
19028
|
+
}),
|
|
19029
|
+
actuator({
|
|
19030
|
+
id: "switch",
|
|
19031
|
+
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.",
|
|
19032
|
+
deviceType: DeviceType.Switch,
|
|
19033
|
+
outputCap: "switch",
|
|
19034
|
+
commandCaps: ["switch"]
|
|
19035
|
+
}),
|
|
19036
|
+
actuator({
|
|
19037
|
+
id: "light",
|
|
19038
|
+
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.",
|
|
19039
|
+
deviceType: DeviceType.Light,
|
|
19040
|
+
outputCap: "switch",
|
|
19041
|
+
commandCaps: [
|
|
19042
|
+
"switch",
|
|
19043
|
+
"brightness",
|
|
19044
|
+
"color"
|
|
19045
|
+
]
|
|
19046
|
+
})
|
|
19047
|
+
];
|
|
19048
|
+
function actuator(input) {
|
|
19049
|
+
return {
|
|
19050
|
+
...input,
|
|
19051
|
+
family: "actuator",
|
|
19052
|
+
role: void 0,
|
|
19053
|
+
memberDeviceType: input.deviceType,
|
|
19054
|
+
outputField: "on",
|
|
19055
|
+
quantity: "none",
|
|
19056
|
+
baseUnit: void 0,
|
|
19057
|
+
aggregates: BINARY_AGGREGATES,
|
|
19058
|
+
defaultAggregate: "any",
|
|
19059
|
+
empty: "offline",
|
|
19060
|
+
accept: [{
|
|
19061
|
+
cap: "switch",
|
|
19062
|
+
fieldPath: "on"
|
|
19063
|
+
}],
|
|
19064
|
+
companions: [CHANGED]
|
|
19065
|
+
};
|
|
19066
|
+
}
|
|
19067
|
+
new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
|
|
19068
|
+
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
18681
19069
|
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
18682
19070
|
/**
|
|
18683
19071
|
* What a composition may BUILD on a device type (G2, D676): the caps a new
|
|
@@ -45765,6 +46153,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
45765
46153
|
"detection-blind",
|
|
45766
46154
|
"motion-noisy",
|
|
45767
46155
|
"motion-calm",
|
|
46156
|
+
"package-llm-silent",
|
|
46157
|
+
"package-llm-answered",
|
|
45768
46158
|
"recording-stalled",
|
|
45769
46159
|
"recording-healthy",
|
|
45770
46160
|
"recording-degraded",
|
|
@@ -56944,6 +57334,28 @@ var PackageVersionInfoSchema = object({
|
|
|
56944
57334
|
deprecated: string().optional(),
|
|
56945
57335
|
distTags: array(string()).readonly()
|
|
56946
57336
|
});
|
|
57337
|
+
/**
|
|
57338
|
+
* One published document. `ok` is markdown from the registry. `missing` means
|
|
57339
|
+
* the registry answered and the file was not there. `error` is a registry or
|
|
57340
|
+
* tarball failure — never an empty string standing in for either.
|
|
57341
|
+
*/
|
|
57342
|
+
var PackageDocBodySchema = discriminatedUnion("status", [
|
|
57343
|
+
object({
|
|
57344
|
+
status: literal("ok"),
|
|
57345
|
+
markdown: string()
|
|
57346
|
+
}),
|
|
57347
|
+
object({ status: literal("missing") }),
|
|
57348
|
+
object({
|
|
57349
|
+
status: literal("error"),
|
|
57350
|
+
message: string()
|
|
57351
|
+
})
|
|
57352
|
+
]);
|
|
57353
|
+
var PackageDocsSchema = object({
|
|
57354
|
+
name: string(),
|
|
57355
|
+
version: string(),
|
|
57356
|
+
readme: PackageDocBodySchema,
|
|
57357
|
+
changelog: PackageDocBodySchema
|
|
57358
|
+
});
|
|
56947
57359
|
var SearchResultSchema = object({
|
|
56948
57360
|
name: string(),
|
|
56949
57361
|
version: string(),
|
|
@@ -57162,7 +57574,10 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
57162
57574
|
}), object({ success: literal(true) }), {
|
|
57163
57575
|
kind: "mutation",
|
|
57164
57576
|
auth: "admin"
|
|
57165
|
-
}), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
|
|
57577
|
+
}), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
|
|
57578
|
+
name: string().min(1),
|
|
57579
|
+
version: string().min(1).optional()
|
|
57580
|
+
}), PackageDocsSchema, { auth: "admin" }), method(object({ addonId: string() }), RestartAddonResultSchema, {
|
|
57166
57581
|
kind: "mutation",
|
|
57167
57582
|
auth: "admin"
|
|
57168
57583
|
}), method(object({ packageName: string() }), object({ success: literal(true) }), {
|
|
@@ -60532,6 +60947,88 @@ var gasCapability = {
|
|
|
60532
60947
|
* whether persisting is worth a SQLite commit. */
|
|
60533
60948
|
volatileStateFields: ["lastChangedAt"]
|
|
60534
60949
|
};
|
|
60950
|
+
var GroupCommandsSchema = object({
|
|
60951
|
+
/** One row per member that has been commanded. A later command replaces that member's row. */
|
|
60952
|
+
results: array(object({
|
|
60953
|
+
deviceId: number().int().nonnegative(),
|
|
60954
|
+
cap: string().min(1),
|
|
60955
|
+
method: string().min(1),
|
|
60956
|
+
ok: boolean(),
|
|
60957
|
+
error: string().optional(),
|
|
60958
|
+
/** Ms epoch of the attempt. */
|
|
60959
|
+
at: number()
|
|
60960
|
+
})) });
|
|
60961
|
+
var groupCommandsCapability = {
|
|
60962
|
+
name: "group-commands",
|
|
60963
|
+
scope: "device",
|
|
60964
|
+
deviceNative: true,
|
|
60965
|
+
mode: "singleton",
|
|
60966
|
+
deviceTypes: [DeviceType.Switch, DeviceType.Light],
|
|
60967
|
+
methods: {},
|
|
60968
|
+
status: {
|
|
60969
|
+
schema: GroupCommandsSchema,
|
|
60970
|
+
kind: "push"
|
|
60971
|
+
},
|
|
60972
|
+
runtimeState: GroupCommandsSchema,
|
|
60973
|
+
/**
|
|
60974
|
+
* Runtime-state durability: **session** — the last attempt. A restored
|
|
60975
|
+
* failure would outlive the command that caused it.
|
|
60976
|
+
*
|
|
60977
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
60978
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
60979
|
+
*/
|
|
60980
|
+
durability: "session",
|
|
60981
|
+
history: "none"
|
|
60982
|
+
};
|
|
60983
|
+
/**
|
|
60984
|
+
* How many members of a helper group answered (D944). Counts are integers,
|
|
60985
|
+
* not measurements: zero included is a real count, never a stand-in reading.
|
|
60986
|
+
* The reading itself stays on the output capability. History is none — the
|
|
60987
|
+
* series that later statistics read is the output cap's own history block.
|
|
60988
|
+
*/
|
|
60989
|
+
var GroupStatusSchema = object({
|
|
60990
|
+
/** Members whose current value entered the aggregate. */
|
|
60991
|
+
included: number().int().nonnegative().meta(readingMeta("count", {
|
|
60992
|
+
precision: 0,
|
|
60993
|
+
label: "Reporting"
|
|
60994
|
+
})),
|
|
60995
|
+
/** Members left out: offline, unknown, or not a finite reading (D393). */
|
|
60996
|
+
excluded: number().int().nonnegative().meta(readingMeta("count", {
|
|
60997
|
+
precision: 0,
|
|
60998
|
+
label: "Excluded"
|
|
60999
|
+
})),
|
|
61000
|
+
/** `included` + `excluded`. */
|
|
61001
|
+
total: number().int().nonnegative().meta(readingMeta("count", {
|
|
61002
|
+
precision: 0,
|
|
61003
|
+
label: "Members"
|
|
61004
|
+
}))
|
|
61005
|
+
});
|
|
61006
|
+
var groupStatusCapability = {
|
|
61007
|
+
name: "group-status",
|
|
61008
|
+
scope: "device",
|
|
61009
|
+
deviceNative: true,
|
|
61010
|
+
mode: "singleton",
|
|
61011
|
+
deviceTypes: [
|
|
61012
|
+
DeviceType.Sensor,
|
|
61013
|
+
DeviceType.Switch,
|
|
61014
|
+
DeviceType.Light
|
|
61015
|
+
],
|
|
61016
|
+
methods: {},
|
|
61017
|
+
status: {
|
|
61018
|
+
schema: GroupStatusSchema,
|
|
61019
|
+
kind: "push"
|
|
61020
|
+
},
|
|
61021
|
+
runtimeState: GroupStatusSchema,
|
|
61022
|
+
/**
|
|
61023
|
+
* Runtime-state durability: **session** — recomputed from members on the
|
|
61024
|
+
* next source event; a restored count would outlive the readings it named.
|
|
61025
|
+
*
|
|
61026
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
61027
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
61028
|
+
*/
|
|
61029
|
+
durability: "session",
|
|
61030
|
+
history: "none"
|
|
61031
|
+
};
|
|
60535
61032
|
var HeatingValveStatusSchema = object({
|
|
60536
61033
|
/** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
|
|
60537
61034
|
position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
|
|
@@ -62301,12 +62798,18 @@ var motionCapability = {
|
|
|
62301
62798
|
methods: {
|
|
62302
62799
|
/**
|
|
62303
62800
|
* Pull the current motion state synchronously. Convenience shortcut
|
|
62304
|
-
* for consumers that don't need the full status object
|
|
62305
|
-
*
|
|
62306
|
-
* `getStatus` once the auto-injected status surface lands in every
|
|
62307
|
-
* consumer.
|
|
62801
|
+
* for consumers that don't need the full status object. A composed
|
|
62802
|
+
* group answers from its slice (D944): unknown throws, it is not off.
|
|
62308
62803
|
*/
|
|
62309
62804
|
isDetected: method(object({ deviceId: number() }), boolean()) },
|
|
62805
|
+
/**
|
|
62806
|
+
* A composed motion group serves `isDetected` from `detected` (D944).
|
|
62807
|
+
* Without this the cap stays uncomposable (`has-commands`).
|
|
62808
|
+
*/
|
|
62809
|
+
composedMethods: { isDetected: {
|
|
62810
|
+
kind: "slice",
|
|
62811
|
+
field: "detected"
|
|
62812
|
+
} },
|
|
62310
62813
|
events: {
|
|
62311
62814
|
/**
|
|
62312
62815
|
* Fires every time the runner transitions a camera between
|
|
@@ -70557,6 +71060,8 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
70557
71060
|
featureProbe: featureProbeCapability,
|
|
70558
71061
|
flood: floodCapability,
|
|
70559
71062
|
gas: gasCapability,
|
|
71063
|
+
groupCommands: groupCommandsCapability,
|
|
71064
|
+
groupStatus: groupStatusCapability,
|
|
70560
71065
|
heatingValve: heatingValveCapability,
|
|
70561
71066
|
humidifier: humidifierCapability,
|
|
70562
71067
|
humiditySensor: humiditySensorCapability,
|
|
@@ -71933,6 +72438,13 @@ Object.freeze({
|
|
|
71933
72438
|
access: "view",
|
|
71934
72439
|
role: "admin"
|
|
71935
72440
|
},
|
|
72441
|
+
"addons.getPackageDocs": {
|
|
72442
|
+
capName: "addons",
|
|
72443
|
+
capScope: "system",
|
|
72444
|
+
addonId: null,
|
|
72445
|
+
access: "view",
|
|
72446
|
+
role: "admin"
|
|
72447
|
+
},
|
|
71936
72448
|
"addons.getVersions": {
|
|
71937
72449
|
capName: "addons",
|
|
71938
72450
|
capScope: "system",
|
|
@@ -75041,6 +75553,20 @@ Object.freeze({
|
|
|
75041
75553
|
access: "view",
|
|
75042
75554
|
role: "viewer"
|
|
75043
75555
|
},
|
|
75556
|
+
"groupCommands.getStatus": {
|
|
75557
|
+
capName: "group-commands",
|
|
75558
|
+
capScope: "device",
|
|
75559
|
+
addonId: null,
|
|
75560
|
+
access: "view",
|
|
75561
|
+
role: "viewer"
|
|
75562
|
+
},
|
|
75563
|
+
"groupStatus.getStatus": {
|
|
75564
|
+
capName: "group-status",
|
|
75565
|
+
capScope: "device",
|
|
75566
|
+
addonId: null,
|
|
75567
|
+
access: "view",
|
|
75568
|
+
role: "viewer"
|
|
75569
|
+
},
|
|
75044
75570
|
"heatingValve.getStatus": {
|
|
75045
75571
|
capName: "heating-valve",
|
|
75046
75572
|
capScope: "device",
|
|
@@ -84863,6 +85389,37 @@ var SENSOR_CAP_VOCABULARY = {
|
|
|
84863
85389
|
icon: "flame"
|
|
84864
85390
|
}]
|
|
84865
85391
|
},
|
|
85392
|
+
"group-commands": {
|
|
85393
|
+
scope: "device",
|
|
85394
|
+
noun: t("Group command", "Comando di gruppo")
|
|
85395
|
+
},
|
|
85396
|
+
"group-status": {
|
|
85397
|
+
scope: "device",
|
|
85398
|
+
noun: t("Group", "Gruppo"),
|
|
85399
|
+
state: [
|
|
85400
|
+
{
|
|
85401
|
+
kind: "numeric",
|
|
85402
|
+
field: "included",
|
|
85403
|
+
quantity: t("the members reporting", "i membri che rispondono"),
|
|
85404
|
+
label: t("Reporting", "Rispondono"),
|
|
85405
|
+
icon: "users"
|
|
85406
|
+
},
|
|
85407
|
+
{
|
|
85408
|
+
kind: "numeric",
|
|
85409
|
+
field: "excluded",
|
|
85410
|
+
quantity: t("the members left out", "i membri esclusi"),
|
|
85411
|
+
label: t("Excluded", "Esclusi"),
|
|
85412
|
+
icon: "users"
|
|
85413
|
+
},
|
|
85414
|
+
{
|
|
85415
|
+
kind: "numeric",
|
|
85416
|
+
field: "total",
|
|
85417
|
+
quantity: t("the member count", "il numero di membri"),
|
|
85418
|
+
label: t("Members", "Membri"),
|
|
85419
|
+
icon: "sigma"
|
|
85420
|
+
}
|
|
85421
|
+
]
|
|
85422
|
+
},
|
|
84866
85423
|
"humidity-sensor": {
|
|
84867
85424
|
scope: "device",
|
|
84868
85425
|
noun: t("Humidity", "Umidità"),
|
|
@@ -86328,6 +86885,16 @@ Object.freeze({
|
|
|
86328
86885
|
form: "single",
|
|
86329
86886
|
optional: false
|
|
86330
86887
|
}],
|
|
86888
|
+
"groupCommands.getStatus": [{
|
|
86889
|
+
name: "deviceId",
|
|
86890
|
+
form: "single",
|
|
86891
|
+
optional: false
|
|
86892
|
+
}],
|
|
86893
|
+
"groupStatus.getStatus": [{
|
|
86894
|
+
name: "deviceId",
|
|
86895
|
+
form: "single",
|
|
86896
|
+
optional: false
|
|
86897
|
+
}],
|
|
86331
86898
|
"heatingValve.getStatus": [{
|
|
86332
86899
|
name: "deviceId",
|
|
86333
86900
|
form: "single",
|
|
@@ -88519,6 +89086,8 @@ new Map(Object.entries({
|
|
|
88519
89086
|
"detection-blind": "device-events",
|
|
88520
89087
|
"motion-noisy": "device-events",
|
|
88521
89088
|
"motion-calm": "device-events",
|
|
89089
|
+
"package-llm-silent": "device-events",
|
|
89090
|
+
"package-llm-answered": "device-events",
|
|
88522
89091
|
"recording-stalled": "device-events",
|
|
88523
89092
|
"recording-healthy": "device-events",
|
|
88524
89093
|
"recording-degraded": "device-events",
|
|
@@ -88602,6 +89171,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
88602
89171
|
label: "Motion without a subject",
|
|
88603
89172
|
kinds: ["motion-noisy", "motion-calm"]
|
|
88604
89173
|
},
|
|
89174
|
+
{
|
|
89175
|
+
id: "package-llm",
|
|
89176
|
+
family: "device-events",
|
|
89177
|
+
label: "Package confirm",
|
|
89178
|
+
kinds: ["package-llm-silent", "package-llm-answered"]
|
|
89179
|
+
},
|
|
88605
89180
|
{
|
|
88606
89181
|
id: "recording",
|
|
88607
89182
|
family: "device-events",
|
|
@@ -88783,6 +89358,8 @@ var DEVICE_EVENTS = [
|
|
|
88783
89358
|
"detection-blind",
|
|
88784
89359
|
"motion-noisy",
|
|
88785
89360
|
"motion-calm",
|
|
89361
|
+
"package-llm-silent",
|
|
89362
|
+
"package-llm-answered",
|
|
88786
89363
|
"recording-stalled",
|
|
88787
89364
|
"recording-healthy",
|
|
88788
89365
|
"recording-degraded",
|
|
@@ -89051,6 +89628,15 @@ new Map([
|
|
|
89051
89628
|
snapshotLabel: "Cameras with constant motion now",
|
|
89052
89629
|
snapshotSection: null
|
|
89053
89630
|
},
|
|
89631
|
+
{
|
|
89632
|
+
id: "package-llm-confirm",
|
|
89633
|
+
family: "device-events",
|
|
89634
|
+
label: "Package confirm (not answering / answering again)",
|
|
89635
|
+
bad: ["package-llm-silent"],
|
|
89636
|
+
recovery: ["package-llm-answered"],
|
|
89637
|
+
snapshotLabel: "Cameras whose package confirm is not answering",
|
|
89638
|
+
snapshotSection: null
|
|
89639
|
+
},
|
|
89054
89640
|
{
|
|
89055
89641
|
id: "recording-health",
|
|
89056
89642
|
family: "device-events",
|