@camstack/addon-provider-homematic 1.2.203 → 1.2.205
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/dist/_stub.js +2 -2
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-DjEdBUbH.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-BBYiqZ5h.mjs} +5 -5
- package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Civ5HlCQ.mjs +26 -0
- package/dist/addon-provider-homematic.css +1 -1
- package/dist/addon.js +2467 -224
- package/dist/addon.mjs +2467 -224
- package/dist/{hostInit-C5XIF453.mjs → hostInit-nT-RhOBP.mjs} +4 -4
- package/dist/remoteEntry.js +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-BL0O2-to.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-BI01xl_h.mjs} +1 -1
- package/dist/widgets/_stub.js +1 -1
- package/dist/widgets/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-Cq-Hf-_G.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-B0ssCAy7.mjs} +3 -3
- package/dist/widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-De1hiEmR.mjs +26 -0
- package/dist/widgets/{hostInit-DzuijAl4.mjs → hostInit-phYEFIYx.mjs} +3 -3
- package/dist/widgets/remoteEntry.js +1 -1
- package/package.json +4 -4
- package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-B48ZmMNz.mjs +0 -26
- package/dist/widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Cy-JR-hp.mjs +0 -26
package/dist/addon.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { networkInterfaces } from "node:os";
|
|
|
9
9
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
10
10
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
11
11
|
//#endregion
|
|
12
|
-
//#region ../types/dist/event-category-
|
|
12
|
+
//#region ../types/dist/event-category-Hwx_JSCU.mjs
|
|
13
13
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
14
14
|
EventCategory["SystemBoot"] = "system.boot";
|
|
15
15
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -531,6 +531,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
531
531
|
EventCategory["RunningStarted"] = "running.started";
|
|
532
532
|
/** Mirrors `runningStateCapability.events.onFinished`. */
|
|
533
533
|
EventCategory["RunningFinished"] = "running.finished";
|
|
534
|
+
/** Mirrors `workloadCapability.events.onStarted` — a workload reached running (#585). */
|
|
535
|
+
EventCategory["WorkloadStarted"] = "workload.started";
|
|
536
|
+
/** Mirrors `workloadCapability.events.onStopped` — a running workload stopped cleanly. */
|
|
537
|
+
EventCategory["WorkloadStopped"] = "workload.stopped";
|
|
538
|
+
/** Mirrors `workloadCapability.events.onCrashed` — a workload stopped without a request. */
|
|
539
|
+
EventCategory["WorkloadCrashed"] = "workload.crashed";
|
|
540
|
+
/** Mirrors `workloadCapability.events.onRecovered` — a crashed workload runs again. */
|
|
541
|
+
EventCategory["WorkloadRecovered"] = "workload.recovered";
|
|
534
542
|
/** Mirrors `deviceRunsCapability.events.onRunOpened` - a durable run record opened. */
|
|
535
543
|
EventCategory["DeviceRunOpened"] = "device-run.opened";
|
|
536
544
|
/** Mirrors `deviceRunsCapability.events.onRunClosed` - a durable run record closed. */
|
|
@@ -833,7 +841,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
833
841
|
return EventCategory;
|
|
834
842
|
}({});
|
|
835
843
|
//#endregion
|
|
836
|
-
//#region ../types/dist/composed-stable-id-
|
|
844
|
+
//#region ../types/dist/composed-stable-id-BBL71oUQ.mjs
|
|
837
845
|
/**
|
|
838
846
|
import { errMsg } from '@camstack/types'
|
|
839
847
|
* Extract a human-readable message from an unknown error value.
|
|
@@ -965,6 +973,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
965
973
|
* and the storage as branches of one bus. One read-only `energy-system` cap carries
|
|
966
974
|
* every value; the storage is a field of it, never the `battery` cap (#513, #522). */
|
|
967
975
|
DeviceType["EnergySystem"] = "energy-system";
|
|
976
|
+
/** Something that RUNS on a machine, or the machine itself (#585): a VM, an app
|
|
977
|
+
* container, an LXC, an app, or a host. The kind is the ROLE (D1033, D1056), never
|
|
978
|
+
* a field; one `workload` cap carries the state, the controls and the resources. */
|
|
979
|
+
DeviceType["Workload"] = "workload";
|
|
968
980
|
return DeviceType;
|
|
969
981
|
}({});
|
|
970
982
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
@@ -1185,6 +1197,11 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
1185
1197
|
* `light` type: the provider owns the type, and a light implies brightness
|
|
1186
1198
|
* or colour this relay lacks. */
|
|
1187
1199
|
DeviceRole["SwitchLight"] = "switch-light";
|
|
1200
|
+
/** One port of a network switch that powers the device behind it (PoE): on /
|
|
1201
|
+
* off feeds or cuts that power. Its link is `network-link`, its draw
|
|
1202
|
+
* `power-meter`. Restarting the powered device through the port is that
|
|
1203
|
+
* device's `power-source` cap, never a reboot of the port. */
|
|
1204
|
+
DeviceRole["PoePort"] = "poe-port";
|
|
1188
1205
|
/** Air conditioner / split unit: cooling, fan speed, louvres. */
|
|
1189
1206
|
DeviceRole["ClimateAc"] = "climate-ac";
|
|
1190
1207
|
/** Room thermostat: a setpoint and a room temperature. The default. */
|
|
@@ -1265,6 +1282,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
1265
1282
|
/** Emits a pulse train (infrared or RF) on request — the `ir-transmitter`
|
|
1266
1283
|
* cap. A `DeviceType.Generic` device. */
|
|
1267
1284
|
DeviceRole["IrTransmitter"] = "ir-transmitter";
|
|
1285
|
+
/** A virtual machine on a hypervisor. */
|
|
1286
|
+
DeviceRole["Vm"] = "vm";
|
|
1287
|
+
/** An application container (Docker, Podman). */
|
|
1288
|
+
DeviceRole["AppContainer"] = "app-container";
|
|
1289
|
+
/** A system container (LXC). */
|
|
1290
|
+
DeviceRole["Lxc"] = "lxc";
|
|
1291
|
+
/** An application or service running on a host. */
|
|
1292
|
+
DeviceRole["App"] = "app";
|
|
1293
|
+
/** A machine that runs workloads or is an appliance with its own OS: a
|
|
1294
|
+
* server, a hypervisor, a gateway console, a CCU. */
|
|
1295
|
+
DeviceRole["Host"] = "host";
|
|
1268
1296
|
return DeviceRole;
|
|
1269
1297
|
}({});
|
|
1270
1298
|
/**
|
|
@@ -1848,8 +1876,8 @@ var _emoji$1 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
|
|
|
1848
1876
|
function emoji() {
|
|
1849
1877
|
return new RegExp(_emoji$1, "u");
|
|
1850
1878
|
}
|
|
1851
|
-
var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
|
|
1852
|
-
var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
|
|
1879
|
+
var ipv4$1 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
|
|
1880
|
+
var ipv6$1 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
|
|
1853
1881
|
var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
|
|
1854
1882
|
var cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
|
|
1855
1883
|
var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
|
|
@@ -2523,12 +2551,12 @@ var $ZodISODuration = /*@__PURE__*/ $constructor("$ZodISODuration", (inst, def)
|
|
|
2523
2551
|
$ZodStringFormat.init(inst, def);
|
|
2524
2552
|
});
|
|
2525
2553
|
var $ZodIPv4 = /*@__PURE__*/ $constructor("$ZodIPv4", (inst, def) => {
|
|
2526
|
-
def.pattern ?? (def.pattern = ipv4);
|
|
2554
|
+
def.pattern ?? (def.pattern = ipv4$1);
|
|
2527
2555
|
$ZodStringFormat.init(inst, def);
|
|
2528
2556
|
inst._zod.bag.format = `ipv4`;
|
|
2529
2557
|
});
|
|
2530
2558
|
var $ZodIPv6 = /*@__PURE__*/ $constructor("$ZodIPv6", (inst, def) => {
|
|
2531
|
-
def.pattern ?? (def.pattern = ipv6);
|
|
2559
|
+
def.pattern ?? (def.pattern = ipv6$1);
|
|
2532
2560
|
$ZodStringFormat.init(inst, def);
|
|
2533
2561
|
inst._zod.bag.format = `ipv6`;
|
|
2534
2562
|
inst._zod.check = (payload) => {
|
|
@@ -5444,10 +5472,16 @@ var ZodIPv4 = /*@__PURE__*/ $constructor("ZodIPv4", (inst, def) => {
|
|
|
5444
5472
|
$ZodIPv4.init(inst, def);
|
|
5445
5473
|
ZodStringFormat.init(inst, def);
|
|
5446
5474
|
});
|
|
5475
|
+
function ipv4(params) {
|
|
5476
|
+
return /* @__PURE__ */ _ipv4(ZodIPv4, params);
|
|
5477
|
+
}
|
|
5447
5478
|
var ZodIPv6 = /*@__PURE__*/ $constructor("ZodIPv6", (inst, def) => {
|
|
5448
5479
|
$ZodIPv6.init(inst, def);
|
|
5449
5480
|
ZodStringFormat.init(inst, def);
|
|
5450
5481
|
});
|
|
5482
|
+
function ipv6(params) {
|
|
5483
|
+
return /* @__PURE__ */ _ipv6(ZodIPv6, params);
|
|
5484
|
+
}
|
|
5451
5485
|
var ZodCIDRv4 = /*@__PURE__*/ $constructor("ZodCIDRv4", (inst, def) => {
|
|
5452
5486
|
$ZodCIDRv4.init(inst, def);
|
|
5453
5487
|
ZodStringFormat.init(inst, def);
|
|
@@ -6085,7 +6119,7 @@ var ZodIssueCode = {
|
|
|
6085
6119
|
var ZodFirstPartyTypeKind;
|
|
6086
6120
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6087
6121
|
//#endregion
|
|
6088
|
-
//#region ../types/dist/sleep-
|
|
6122
|
+
//#region ../types/dist/sleep-D6Pih0Qt.mjs
|
|
6089
6123
|
/**
|
|
6090
6124
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6091
6125
|
* window to float samples (D455).
|
|
@@ -7377,7 +7411,7 @@ var RecordIntegrationInstances = class {
|
|
|
7377
7411
|
kindOfBody(body) {
|
|
7378
7412
|
if (this.hooks.kindOf !== void 0) {
|
|
7379
7413
|
const id = this.hooks.kindOf(body);
|
|
7380
|
-
if (!this.hooks.description.kinds.some((declared) => declared.id === id)) throw new Error(`record kind '${this.kind.name}': kindOf returned '${id}', which describe().kinds does not declare
|
|
7414
|
+
if (!this.hooks.description.kinds.some((declared) => declared.id === id)) throw new Error(`record kind '${this.kind.name}': kindOf returned '${id}', which describe().kinds does not declare`);
|
|
7381
7415
|
return id;
|
|
7382
7416
|
}
|
|
7383
7417
|
const only = this.hooks.description.kinds[0];
|
|
@@ -7407,8 +7441,15 @@ var RecordIntegrationInstances = class {
|
|
|
7407
7441
|
field: link.field,
|
|
7408
7442
|
to: link.to
|
|
7409
7443
|
})) };
|
|
7444
|
+
const wired = this.hooks.test !== void 0;
|
|
7445
|
+
const stated = this.hooks.description;
|
|
7410
7446
|
return {
|
|
7411
|
-
...
|
|
7447
|
+
...stated,
|
|
7448
|
+
...stated.canTest && !wired ? { canTest: false } : {},
|
|
7449
|
+
...stated.kinds === void 0 ? {} : { kinds: stated.kinds.map((kind) => kind.canTest === true && !wired ? {
|
|
7450
|
+
...kind,
|
|
7451
|
+
canTest: false
|
|
7452
|
+
} : kind) },
|
|
7412
7453
|
...links,
|
|
7413
7454
|
...this.hooks.mintId === void 0 ? {} : { mintsId: true }
|
|
7414
7455
|
};
|
|
@@ -10183,6 +10224,18 @@ var RuleFireOriginSchema = object({
|
|
|
10183
10224
|
cameraId: number$1().int()
|
|
10184
10225
|
})).optional()
|
|
10185
10226
|
});
|
|
10227
|
+
/** WHO an exporter acts for: the ecosystem and the principal it reported, never invented. */
|
|
10228
|
+
var OnBehalfSchema = object({
|
|
10229
|
+
source: _enum([
|
|
10230
|
+
"homeassistant",
|
|
10231
|
+
"homekit",
|
|
10232
|
+
"alexa",
|
|
10233
|
+
"google",
|
|
10234
|
+
"matter"
|
|
10235
|
+
]),
|
|
10236
|
+
principalId: string(),
|
|
10237
|
+
principalName: string().optional()
|
|
10238
|
+
});
|
|
10186
10239
|
discriminatedUnion("kind", [
|
|
10187
10240
|
object({
|
|
10188
10241
|
kind: literal("action"),
|
|
@@ -10199,7 +10252,8 @@ discriminatedUnion("kind", [
|
|
|
10199
10252
|
object({
|
|
10200
10253
|
kind: literal("rule"),
|
|
10201
10254
|
fire: RuleFireOriginSchema
|
|
10202
|
-
})
|
|
10255
|
+
}),
|
|
10256
|
+
OnBehalfSchema.extend({ kind: literal("on-behalf") })
|
|
10203
10257
|
]);
|
|
10204
10258
|
/**
|
|
10205
10259
|
* One recorded device transition (D1022): a status field of a device went from
|
|
@@ -10235,7 +10289,9 @@ var TransitionActorSchema = discriminatedUnion("kind", [
|
|
|
10235
10289
|
object({
|
|
10236
10290
|
kind: literal("addon"),
|
|
10237
10291
|
addonId: string(),
|
|
10238
|
-
nodeId: string().optional()
|
|
10292
|
+
nodeId: string().optional(),
|
|
10293
|
+
/** The ecosystem principal an exporter relayed, when it reported one. */
|
|
10294
|
+
onBehalf: OnBehalfSchema.optional()
|
|
10239
10295
|
}),
|
|
10240
10296
|
object({
|
|
10241
10297
|
kind: literal("action"),
|
|
@@ -10765,6 +10821,10 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
10765
10821
|
effect: {
|
|
10766
10822
|
field: "on",
|
|
10767
10823
|
value: true
|
|
10824
|
+
},
|
|
10825
|
+
offeredWhen: {
|
|
10826
|
+
method: "getOptions",
|
|
10827
|
+
field: "supportsSetState"
|
|
10768
10828
|
}
|
|
10769
10829
|
},
|
|
10770
10830
|
{
|
|
@@ -10783,6 +10843,10 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
10783
10843
|
effect: {
|
|
10784
10844
|
field: "on",
|
|
10785
10845
|
value: false
|
|
10846
|
+
},
|
|
10847
|
+
offeredWhen: {
|
|
10848
|
+
method: "getOptions",
|
|
10849
|
+
field: "supportsSetState"
|
|
10786
10850
|
}
|
|
10787
10851
|
},
|
|
10788
10852
|
{
|
|
@@ -10796,9 +10860,14 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
10796
10860
|
en: "Toggle {device}",
|
|
10797
10861
|
it: "Commuta {device}"
|
|
10798
10862
|
},
|
|
10799
|
-
icon: "toggle-right"
|
|
10863
|
+
icon: "toggle-right",
|
|
10864
|
+
offeredWhen: {
|
|
10865
|
+
method: "getOptions",
|
|
10866
|
+
field: "supportsSetState"
|
|
10867
|
+
}
|
|
10800
10868
|
}
|
|
10801
10869
|
],
|
|
10870
|
+
notOperatorFacing: { powerCycle: "a power cycle is the forced restart of the device the switch powers (power-source), never a step of its own" },
|
|
10802
10871
|
state: [{
|
|
10803
10872
|
kind: "boolean",
|
|
10804
10873
|
field: "on",
|
|
@@ -11057,6 +11126,47 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
11057
11126
|
"switch.off": { icon: "plug" }
|
|
11058
11127
|
},
|
|
11059
11128
|
state: { on: { icon: "plug-zap" } }
|
|
11129
|
+
},
|
|
11130
|
+
[DeviceRole.PoePort]: {
|
|
11131
|
+
actions: {
|
|
11132
|
+
"switch.on": {
|
|
11133
|
+
label: {
|
|
11134
|
+
en: "Power on",
|
|
11135
|
+
it: "Alimenta"
|
|
11136
|
+
},
|
|
11137
|
+
phrase: {
|
|
11138
|
+
en: "Power on {device}",
|
|
11139
|
+
it: "Alimenta {device}"
|
|
11140
|
+
},
|
|
11141
|
+
icon: "plug-zap"
|
|
11142
|
+
},
|
|
11143
|
+
"switch.off": {
|
|
11144
|
+
label: {
|
|
11145
|
+
en: "Power off",
|
|
11146
|
+
it: "Togli alimentazione"
|
|
11147
|
+
},
|
|
11148
|
+
phrase: {
|
|
11149
|
+
en: "Power off {device}",
|
|
11150
|
+
it: "Togli alimentazione a {device}"
|
|
11151
|
+
},
|
|
11152
|
+
icon: "unplug"
|
|
11153
|
+
}
|
|
11154
|
+
},
|
|
11155
|
+
state: { on: {
|
|
11156
|
+
label: {
|
|
11157
|
+
en: "Powered",
|
|
11158
|
+
it: "Alimentata"
|
|
11159
|
+
},
|
|
11160
|
+
whenTrue: {
|
|
11161
|
+
en: "When {device} is powered",
|
|
11162
|
+
it: "Quando {device} viene alimentata"
|
|
11163
|
+
},
|
|
11164
|
+
whenFalse: {
|
|
11165
|
+
en: "When {device} loses power",
|
|
11166
|
+
it: "Quando {device} perde l’alimentazione"
|
|
11167
|
+
},
|
|
11168
|
+
icon: "plug-zap"
|
|
11169
|
+
} }
|
|
11060
11170
|
}
|
|
11061
11171
|
}
|
|
11062
11172
|
}
|
|
@@ -11776,7 +11886,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
11776
11886
|
en: "Power on {device}",
|
|
11777
11887
|
it: "Dai corrente a {device}"
|
|
11778
11888
|
},
|
|
11779
|
-
icon: "power"
|
|
11889
|
+
icon: "power",
|
|
11890
|
+
offeredWhen: {
|
|
11891
|
+
method: "getStatus",
|
|
11892
|
+
field: "switchSettable"
|
|
11893
|
+
}
|
|
11780
11894
|
},
|
|
11781
11895
|
{
|
|
11782
11896
|
id: "powerSource.off",
|
|
@@ -11789,7 +11903,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
11789
11903
|
en: "Cut the power of {device}",
|
|
11790
11904
|
it: "Togli la corrente a {device}"
|
|
11791
11905
|
},
|
|
11792
|
-
icon: "power-off"
|
|
11906
|
+
icon: "power-off",
|
|
11907
|
+
offeredWhen: {
|
|
11908
|
+
method: "getStatus",
|
|
11909
|
+
field: "switchSettable"
|
|
11910
|
+
}
|
|
11793
11911
|
},
|
|
11794
11912
|
{
|
|
11795
11913
|
id: "powerSource.forceRestart",
|
|
@@ -13553,6 +13671,91 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
13553
13671
|
}],
|
|
13554
13672
|
events: { onMotionTriggerChanged: { notOperatorFacing: "the `enabled` state trigger phrases both edges of this change" } }
|
|
13555
13673
|
},
|
|
13674
|
+
"siren": {
|
|
13675
|
+
scope: "device",
|
|
13676
|
+
noun: {
|
|
13677
|
+
en: "Siren",
|
|
13678
|
+
it: "Sirena"
|
|
13679
|
+
},
|
|
13680
|
+
actions: [
|
|
13681
|
+
{
|
|
13682
|
+
id: "siren.trigger",
|
|
13683
|
+
method: "trigger",
|
|
13684
|
+
label: {
|
|
13685
|
+
en: "Sound the siren",
|
|
13686
|
+
it: "Fai suonare la sirena"
|
|
13687
|
+
},
|
|
13688
|
+
phrase: {
|
|
13689
|
+
en: "Sound {device}",
|
|
13690
|
+
it: "Fai suonare {device}"
|
|
13691
|
+
},
|
|
13692
|
+
icon: "siren",
|
|
13693
|
+
args: {}
|
|
13694
|
+
},
|
|
13695
|
+
{
|
|
13696
|
+
id: "siren.triggerPlays",
|
|
13697
|
+
method: "trigger",
|
|
13698
|
+
label: {
|
|
13699
|
+
en: "Sound the siren N times",
|
|
13700
|
+
it: "Fai suonare la sirena N volte"
|
|
13701
|
+
},
|
|
13702
|
+
phrase: {
|
|
13703
|
+
en: "Sound {device} {plays} times",
|
|
13704
|
+
it: "Fai suonare {device} {plays} volte"
|
|
13705
|
+
},
|
|
13706
|
+
icon: "siren",
|
|
13707
|
+
openArgs: [{
|
|
13708
|
+
key: "plays",
|
|
13709
|
+
label: {
|
|
13710
|
+
en: "Plays",
|
|
13711
|
+
it: "Riproduzioni"
|
|
13712
|
+
},
|
|
13713
|
+
offer: {
|
|
13714
|
+
kind: "dynamic",
|
|
13715
|
+
from: "method",
|
|
13716
|
+
method: "getPlayChoices",
|
|
13717
|
+
valueKind: "number"
|
|
13718
|
+
}
|
|
13719
|
+
}]
|
|
13720
|
+
},
|
|
13721
|
+
{
|
|
13722
|
+
id: "siren.stop",
|
|
13723
|
+
method: "stop",
|
|
13724
|
+
label: {
|
|
13725
|
+
en: "Silence the siren",
|
|
13726
|
+
it: "Zittisci la sirena"
|
|
13727
|
+
},
|
|
13728
|
+
phrase: {
|
|
13729
|
+
en: "Silence {device}",
|
|
13730
|
+
it: "Zittisci {device}"
|
|
13731
|
+
},
|
|
13732
|
+
icon: "siren",
|
|
13733
|
+
args: {},
|
|
13734
|
+
effect: {
|
|
13735
|
+
field: "active",
|
|
13736
|
+
value: false
|
|
13737
|
+
}
|
|
13738
|
+
}
|
|
13739
|
+
],
|
|
13740
|
+
state: [{
|
|
13741
|
+
kind: "boolean",
|
|
13742
|
+
field: "active",
|
|
13743
|
+
label: {
|
|
13744
|
+
en: "Siren sounding",
|
|
13745
|
+
it: "Sirena in funzione"
|
|
13746
|
+
},
|
|
13747
|
+
whenTrue: {
|
|
13748
|
+
en: "When {device} starts sounding",
|
|
13749
|
+
it: "Quando {device} inizia a suonare"
|
|
13750
|
+
},
|
|
13751
|
+
whenFalse: {
|
|
13752
|
+
en: "When {device} falls silent",
|
|
13753
|
+
it: "Quando {device} smette di suonare"
|
|
13754
|
+
},
|
|
13755
|
+
icon: "siren"
|
|
13756
|
+
}],
|
|
13757
|
+
events: { onSirenChanged: { notOperatorFacing: "the `active` state trigger phrases both edges of this change" } }
|
|
13758
|
+
},
|
|
13556
13759
|
"vacuum-control": {
|
|
13557
13760
|
scope: "device",
|
|
13558
13761
|
noun: {
|
|
@@ -16128,6 +16331,374 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
16128
16331
|
icon: "loader"
|
|
16129
16332
|
}]
|
|
16130
16333
|
},
|
|
16334
|
+
"workload": {
|
|
16335
|
+
scope: "device",
|
|
16336
|
+
noun: {
|
|
16337
|
+
en: "Workload",
|
|
16338
|
+
it: "Carico di lavoro"
|
|
16339
|
+
},
|
|
16340
|
+
actions: [
|
|
16341
|
+
{
|
|
16342
|
+
id: "workload.start",
|
|
16343
|
+
method: "start",
|
|
16344
|
+
label: {
|
|
16345
|
+
en: "Start",
|
|
16346
|
+
it: "Avvia"
|
|
16347
|
+
},
|
|
16348
|
+
phrase: {
|
|
16349
|
+
en: "Start {device}",
|
|
16350
|
+
it: "Avvia {device}"
|
|
16351
|
+
},
|
|
16352
|
+
icon: "play",
|
|
16353
|
+
effect: {
|
|
16354
|
+
field: "state",
|
|
16355
|
+
value: "running"
|
|
16356
|
+
}
|
|
16357
|
+
},
|
|
16358
|
+
{
|
|
16359
|
+
id: "workload.stop",
|
|
16360
|
+
method: "stop",
|
|
16361
|
+
label: {
|
|
16362
|
+
en: "Stop",
|
|
16363
|
+
it: "Arresta"
|
|
16364
|
+
},
|
|
16365
|
+
phrase: {
|
|
16366
|
+
en: "Stop {device}",
|
|
16367
|
+
it: "Arresta {device}"
|
|
16368
|
+
},
|
|
16369
|
+
icon: "square",
|
|
16370
|
+
effect: {
|
|
16371
|
+
field: "state",
|
|
16372
|
+
value: "stopped"
|
|
16373
|
+
}
|
|
16374
|
+
},
|
|
16375
|
+
{
|
|
16376
|
+
id: "workload.restart",
|
|
16377
|
+
method: "restart",
|
|
16378
|
+
label: {
|
|
16379
|
+
en: "Restart",
|
|
16380
|
+
it: "Riavvia"
|
|
16381
|
+
},
|
|
16382
|
+
phrase: {
|
|
16383
|
+
en: "Restart {device}",
|
|
16384
|
+
it: "Riavvia {device}"
|
|
16385
|
+
},
|
|
16386
|
+
icon: "rotate-ccw"
|
|
16387
|
+
},
|
|
16388
|
+
{
|
|
16389
|
+
id: "workload.pause",
|
|
16390
|
+
method: "pause",
|
|
16391
|
+
label: {
|
|
16392
|
+
en: "Pause",
|
|
16393
|
+
it: "Metti in pausa"
|
|
16394
|
+
},
|
|
16395
|
+
phrase: {
|
|
16396
|
+
en: "Pause {device}",
|
|
16397
|
+
it: "Metti in pausa {device}"
|
|
16398
|
+
},
|
|
16399
|
+
icon: "pause",
|
|
16400
|
+
effect: {
|
|
16401
|
+
field: "state",
|
|
16402
|
+
value: "paused"
|
|
16403
|
+
}
|
|
16404
|
+
},
|
|
16405
|
+
{
|
|
16406
|
+
id: "workload.resume",
|
|
16407
|
+
method: "resume",
|
|
16408
|
+
label: {
|
|
16409
|
+
en: "Resume",
|
|
16410
|
+
it: "Riprendi"
|
|
16411
|
+
},
|
|
16412
|
+
phrase: {
|
|
16413
|
+
en: "Resume {device}",
|
|
16414
|
+
it: "Riprendi {device}"
|
|
16415
|
+
},
|
|
16416
|
+
icon: "circle-play",
|
|
16417
|
+
effect: {
|
|
16418
|
+
field: "state",
|
|
16419
|
+
value: "running"
|
|
16420
|
+
}
|
|
16421
|
+
},
|
|
16422
|
+
{
|
|
16423
|
+
id: "workload.forceStop",
|
|
16424
|
+
method: "forceStop",
|
|
16425
|
+
label: {
|
|
16426
|
+
en: "Force stop",
|
|
16427
|
+
it: "Arresto forzato"
|
|
16428
|
+
},
|
|
16429
|
+
phrase: {
|
|
16430
|
+
en: "Force {device} to stop",
|
|
16431
|
+
it: "Forza l’arresto di {device}"
|
|
16432
|
+
},
|
|
16433
|
+
icon: "octagon-x",
|
|
16434
|
+
effect: {
|
|
16435
|
+
field: "state",
|
|
16436
|
+
value: "stopped"
|
|
16437
|
+
}
|
|
16438
|
+
}
|
|
16439
|
+
],
|
|
16440
|
+
state: [
|
|
16441
|
+
{
|
|
16442
|
+
kind: "enum",
|
|
16443
|
+
field: "state",
|
|
16444
|
+
label: {
|
|
16445
|
+
en: "State",
|
|
16446
|
+
it: "Stato"
|
|
16447
|
+
},
|
|
16448
|
+
values: [
|
|
16449
|
+
{
|
|
16450
|
+
value: "running",
|
|
16451
|
+
label: {
|
|
16452
|
+
en: "Running",
|
|
16453
|
+
it: "In esecuzione"
|
|
16454
|
+
},
|
|
16455
|
+
phrase: {
|
|
16456
|
+
en: "When {device} is running",
|
|
16457
|
+
it: "Quando {device} è in esecuzione"
|
|
16458
|
+
}
|
|
16459
|
+
},
|
|
16460
|
+
{
|
|
16461
|
+
value: "paused",
|
|
16462
|
+
label: {
|
|
16463
|
+
en: "Paused",
|
|
16464
|
+
it: "In pausa"
|
|
16465
|
+
}
|
|
16466
|
+
},
|
|
16467
|
+
{
|
|
16468
|
+
value: "stopped",
|
|
16469
|
+
label: {
|
|
16470
|
+
en: "Stopped",
|
|
16471
|
+
it: "Arrestato"
|
|
16472
|
+
},
|
|
16473
|
+
phrase: {
|
|
16474
|
+
en: "When {device} is stopped",
|
|
16475
|
+
it: "Quando {device} è arrestato"
|
|
16476
|
+
}
|
|
16477
|
+
},
|
|
16478
|
+
{
|
|
16479
|
+
value: "starting",
|
|
16480
|
+
label: {
|
|
16481
|
+
en: "Starting",
|
|
16482
|
+
it: "In avvio"
|
|
16483
|
+
}
|
|
16484
|
+
},
|
|
16485
|
+
{
|
|
16486
|
+
value: "stopping",
|
|
16487
|
+
label: {
|
|
16488
|
+
en: "Stopping",
|
|
16489
|
+
it: "In arresto"
|
|
16490
|
+
}
|
|
16491
|
+
},
|
|
16492
|
+
{
|
|
16493
|
+
value: "crashed",
|
|
16494
|
+
label: {
|
|
16495
|
+
en: "Crashed",
|
|
16496
|
+
it: "Arrestato in modo anomalo"
|
|
16497
|
+
},
|
|
16498
|
+
phrase: {
|
|
16499
|
+
en: "When {device} has crashed",
|
|
16500
|
+
it: "Quando {device} è arrestato in modo anomalo"
|
|
16501
|
+
}
|
|
16502
|
+
}
|
|
16503
|
+
],
|
|
16504
|
+
icon: "activity"
|
|
16505
|
+
},
|
|
16506
|
+
{
|
|
16507
|
+
kind: "numeric",
|
|
16508
|
+
field: "resources.cpuPercent",
|
|
16509
|
+
quantity: {
|
|
16510
|
+
en: "the CPU use",
|
|
16511
|
+
it: "l'uso della CPU"
|
|
16512
|
+
},
|
|
16513
|
+
label: {
|
|
16514
|
+
en: "CPU",
|
|
16515
|
+
it: "CPU"
|
|
16516
|
+
},
|
|
16517
|
+
unit: "%",
|
|
16518
|
+
icon: "cpu"
|
|
16519
|
+
},
|
|
16520
|
+
{
|
|
16521
|
+
kind: "numeric",
|
|
16522
|
+
field: "resources.memoryPercent",
|
|
16523
|
+
quantity: {
|
|
16524
|
+
en: "the memory use",
|
|
16525
|
+
it: "l'uso della memoria"
|
|
16526
|
+
},
|
|
16527
|
+
label: {
|
|
16528
|
+
en: "Memory",
|
|
16529
|
+
it: "Memoria"
|
|
16530
|
+
},
|
|
16531
|
+
unit: "%",
|
|
16532
|
+
icon: "memory-stick"
|
|
16533
|
+
},
|
|
16534
|
+
{
|
|
16535
|
+
kind: "numeric",
|
|
16536
|
+
field: "resources.temperature",
|
|
16537
|
+
quantity: {
|
|
16538
|
+
en: "the temperature",
|
|
16539
|
+
it: "la temperatura"
|
|
16540
|
+
},
|
|
16541
|
+
label: {
|
|
16542
|
+
en: "Temperature",
|
|
16543
|
+
it: "Temperatura"
|
|
16544
|
+
},
|
|
16545
|
+
unit: "°C",
|
|
16546
|
+
icon: "thermometer"
|
|
16547
|
+
}
|
|
16548
|
+
],
|
|
16549
|
+
events: {
|
|
16550
|
+
onStarted: {
|
|
16551
|
+
category: EventCategory.WorkloadStarted,
|
|
16552
|
+
label: {
|
|
16553
|
+
en: "Started",
|
|
16554
|
+
it: "Avviato"
|
|
16555
|
+
},
|
|
16556
|
+
phrase: {
|
|
16557
|
+
en: "When {device} starts",
|
|
16558
|
+
it: "Quando {device} si avvia"
|
|
16559
|
+
},
|
|
16560
|
+
icon: "play"
|
|
16561
|
+
},
|
|
16562
|
+
onStopped: {
|
|
16563
|
+
category: EventCategory.WorkloadStopped,
|
|
16564
|
+
label: {
|
|
16565
|
+
en: "Stopped",
|
|
16566
|
+
it: "Arrestato"
|
|
16567
|
+
},
|
|
16568
|
+
phrase: {
|
|
16569
|
+
en: "When {device} stops",
|
|
16570
|
+
it: "Quando {device} si arresta"
|
|
16571
|
+
},
|
|
16572
|
+
icon: "square"
|
|
16573
|
+
},
|
|
16574
|
+
onCrashed: {
|
|
16575
|
+
category: EventCategory.WorkloadCrashed,
|
|
16576
|
+
label: {
|
|
16577
|
+
en: "Crashed",
|
|
16578
|
+
it: "Arrestato in modo anomalo"
|
|
16579
|
+
},
|
|
16580
|
+
phrase: {
|
|
16581
|
+
en: "When {device} stops without being asked",
|
|
16582
|
+
it: "Quando {device} si arresta senza che sia stato richiesto"
|
|
16583
|
+
},
|
|
16584
|
+
icon: "triangle-alert"
|
|
16585
|
+
},
|
|
16586
|
+
onRecovered: {
|
|
16587
|
+
category: EventCategory.WorkloadRecovered,
|
|
16588
|
+
label: {
|
|
16589
|
+
en: "Recovered",
|
|
16590
|
+
it: "Ripristinato"
|
|
16591
|
+
},
|
|
16592
|
+
phrase: {
|
|
16593
|
+
en: "When {device} runs again after a crash",
|
|
16594
|
+
it: "Quando {device} riparte dopo un arresto anomalo"
|
|
16595
|
+
},
|
|
16596
|
+
icon: "heart-pulse"
|
|
16597
|
+
}
|
|
16598
|
+
},
|
|
16599
|
+
overrides: { byRole: {
|
|
16600
|
+
[DeviceRole.Vm]: {
|
|
16601
|
+
actions: { "workload.start": { icon: "monitor" } },
|
|
16602
|
+
state: { state: { icon: "monitor" } }
|
|
16603
|
+
},
|
|
16604
|
+
[DeviceRole.AppContainer]: {
|
|
16605
|
+
actions: { "workload.start": { icon: "container" } },
|
|
16606
|
+
state: { state: { icon: "container" } }
|
|
16607
|
+
},
|
|
16608
|
+
[DeviceRole.Lxc]: {
|
|
16609
|
+
actions: { "workload.start": { icon: "box" } },
|
|
16610
|
+
state: { state: { icon: "box" } }
|
|
16611
|
+
},
|
|
16612
|
+
[DeviceRole.App]: {
|
|
16613
|
+
actions: { "workload.start": { icon: "app-window" } },
|
|
16614
|
+
state: { state: { icon: "app-window" } }
|
|
16615
|
+
},
|
|
16616
|
+
[DeviceRole.Host]: {
|
|
16617
|
+
actions: {
|
|
16618
|
+
"workload.start": {
|
|
16619
|
+
label: {
|
|
16620
|
+
en: "Power on",
|
|
16621
|
+
it: "Accendi"
|
|
16622
|
+
},
|
|
16623
|
+
phrase: {
|
|
16624
|
+
en: "Power on {device}",
|
|
16625
|
+
it: "Accendi {device}"
|
|
16626
|
+
},
|
|
16627
|
+
icon: "power"
|
|
16628
|
+
},
|
|
16629
|
+
"workload.stop": {
|
|
16630
|
+
label: {
|
|
16631
|
+
en: "Shut down",
|
|
16632
|
+
it: "Spegni"
|
|
16633
|
+
},
|
|
16634
|
+
phrase: {
|
|
16635
|
+
en: "Shut down {device}",
|
|
16636
|
+
it: "Spegni {device}"
|
|
16637
|
+
},
|
|
16638
|
+
icon: "power-off"
|
|
16639
|
+
},
|
|
16640
|
+
"workload.restart": {
|
|
16641
|
+
label: {
|
|
16642
|
+
en: "Reboot",
|
|
16643
|
+
it: "Riavvia"
|
|
16644
|
+
},
|
|
16645
|
+
phrase: {
|
|
16646
|
+
en: "Reboot {device}",
|
|
16647
|
+
it: "Riavvia {device}"
|
|
16648
|
+
},
|
|
16649
|
+
icon: "refresh-cw"
|
|
16650
|
+
}
|
|
16651
|
+
},
|
|
16652
|
+
state: { state: { icon: "server" } },
|
|
16653
|
+
events: {
|
|
16654
|
+
onStarted: {
|
|
16655
|
+
label: {
|
|
16656
|
+
en: "Came online",
|
|
16657
|
+
it: "Tornato in linea"
|
|
16658
|
+
},
|
|
16659
|
+
phrase: {
|
|
16660
|
+
en: "When {device} comes online",
|
|
16661
|
+
it: "Quando {device} torna in linea"
|
|
16662
|
+
},
|
|
16663
|
+
icon: "server"
|
|
16664
|
+
},
|
|
16665
|
+
onStopped: {
|
|
16666
|
+
label: {
|
|
16667
|
+
en: "Shut down",
|
|
16668
|
+
it: "Spento"
|
|
16669
|
+
},
|
|
16670
|
+
phrase: {
|
|
16671
|
+
en: "When {device} shuts down",
|
|
16672
|
+
it: "Quando {device} si spegne"
|
|
16673
|
+
},
|
|
16674
|
+
icon: "server-off"
|
|
16675
|
+
},
|
|
16676
|
+
onCrashed: {
|
|
16677
|
+
label: {
|
|
16678
|
+
en: "Went down",
|
|
16679
|
+
it: "Caduto"
|
|
16680
|
+
},
|
|
16681
|
+
phrase: {
|
|
16682
|
+
en: "When {device} goes down unexpectedly",
|
|
16683
|
+
it: "Quando {device} cade inaspettatamente"
|
|
16684
|
+
},
|
|
16685
|
+
icon: "server-crash"
|
|
16686
|
+
},
|
|
16687
|
+
onRecovered: {
|
|
16688
|
+
label: {
|
|
16689
|
+
en: "Came online",
|
|
16690
|
+
it: "Tornato in linea"
|
|
16691
|
+
},
|
|
16692
|
+
phrase: {
|
|
16693
|
+
en: "When {device} comes back online after going down",
|
|
16694
|
+
it: "Quando {device} torna in linea dopo essere caduto"
|
|
16695
|
+
},
|
|
16696
|
+
icon: "server"
|
|
16697
|
+
}
|
|
16698
|
+
}
|
|
16699
|
+
}
|
|
16700
|
+
} }
|
|
16701
|
+
},
|
|
16131
16702
|
"accessories": {
|
|
16132
16703
|
scope: "device",
|
|
16133
16704
|
noun: {
|
|
@@ -19794,6 +20365,15 @@ var PipelineStepInputSchema = lazy(() => object({
|
|
|
19794
20365
|
}));
|
|
19795
20366
|
/** Typed bridge to the recursive `FrameResult` graph; validation is structural. */
|
|
19796
20367
|
var PipelineRunResultBridge = custom();
|
|
20368
|
+
/**
|
|
20369
|
+
* Whether a switch can be set (D1058), schema-free so the addon runner can import it from
|
|
20370
|
+
* `@camstack/types/addon` without loading the capability schema graph (D28).
|
|
20371
|
+
*/
|
|
20372
|
+
/** The read that decides whether a switch is offered on/off (`offeredWhen` of its actions). */
|
|
20373
|
+
var SWITCH_SETTABLE_GATE = {
|
|
20374
|
+
method: "getOptions",
|
|
20375
|
+
field: "supportsSetState"
|
|
20376
|
+
};
|
|
19797
20377
|
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
19798
20378
|
var VersionOutputSchema = object({ version: string() });
|
|
19799
20379
|
method(_void(), StaticDirOutputSchema, { auth: "admin" }), method(_void(), VersionOutputSchema, { auth: "admin" }), NOT_A_DEVICE.UI_PLUMBING;
|
|
@@ -19989,6 +20569,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
19989
20569
|
"script-runner",
|
|
19990
20570
|
"server-management",
|
|
19991
20571
|
"settings-store",
|
|
20572
|
+
"siren",
|
|
19992
20573
|
"smoke",
|
|
19993
20574
|
"smtp-provider",
|
|
19994
20575
|
"snapshot",
|
|
@@ -20028,6 +20609,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
20028
20609
|
"weather",
|
|
20029
20610
|
"weather-station",
|
|
20030
20611
|
"webrtc-session",
|
|
20612
|
+
"workload",
|
|
20031
20613
|
"zone-analytics",
|
|
20032
20614
|
"zone-rules",
|
|
20033
20615
|
"zones"
|
|
@@ -21330,6 +21912,14 @@ Object.freeze({
|
|
|
21330
21912
|
"path": "ssid",
|
|
21331
21913
|
"valueType": "string"
|
|
21332
21914
|
},
|
|
21915
|
+
{
|
|
21916
|
+
"path": "speedKbps",
|
|
21917
|
+
"valueType": "number"
|
|
21918
|
+
},
|
|
21919
|
+
{
|
|
21920
|
+
"path": "linkUp",
|
|
21921
|
+
"valueType": "boolean"
|
|
21922
|
+
},
|
|
21333
21923
|
{
|
|
21334
21924
|
"path": "lastUpdated",
|
|
21335
21925
|
"valueType": "number"
|
|
@@ -21713,6 +22303,32 @@ Object.freeze({
|
|
|
21713
22303
|
"valueType": "string"
|
|
21714
22304
|
}
|
|
21715
22305
|
],
|
|
22306
|
+
"siren": [
|
|
22307
|
+
{
|
|
22308
|
+
"path": "active",
|
|
22309
|
+
"valueType": "boolean"
|
|
22310
|
+
},
|
|
22311
|
+
{
|
|
22312
|
+
"path": "activeUntil",
|
|
22313
|
+
"valueType": "number"
|
|
22314
|
+
},
|
|
22315
|
+
{
|
|
22316
|
+
"path": "durationSeconds",
|
|
22317
|
+
"valueType": "number"
|
|
22318
|
+
},
|
|
22319
|
+
{
|
|
22320
|
+
"path": "plays",
|
|
22321
|
+
"valueType": "number"
|
|
22322
|
+
},
|
|
22323
|
+
{
|
|
22324
|
+
"path": "activeUntilEstimated",
|
|
22325
|
+
"valueType": "boolean"
|
|
22326
|
+
},
|
|
22327
|
+
{
|
|
22328
|
+
"path": "lastTriggeredAt",
|
|
22329
|
+
"valueType": "number"
|
|
22330
|
+
}
|
|
22331
|
+
],
|
|
21716
22332
|
"smoke": [{
|
|
21717
22333
|
"path": "detected",
|
|
21718
22334
|
"valueType": "boolean"
|
|
@@ -22110,6 +22726,92 @@ Object.freeze({
|
|
|
22110
22726
|
"valueType": "number"
|
|
22111
22727
|
}
|
|
22112
22728
|
],
|
|
22729
|
+
"workload": [
|
|
22730
|
+
{
|
|
22731
|
+
"path": "state",
|
|
22732
|
+
"valueType": "enum",
|
|
22733
|
+
"enumValues": [
|
|
22734
|
+
"running",
|
|
22735
|
+
"paused",
|
|
22736
|
+
"stopped",
|
|
22737
|
+
"starting",
|
|
22738
|
+
"stopping",
|
|
22739
|
+
"crashed"
|
|
22740
|
+
]
|
|
22741
|
+
},
|
|
22742
|
+
{
|
|
22743
|
+
"path": "since",
|
|
22744
|
+
"valueType": "number"
|
|
22745
|
+
},
|
|
22746
|
+
{
|
|
22747
|
+
"path": "hostDeviceId",
|
|
22748
|
+
"valueType": "number"
|
|
22749
|
+
},
|
|
22750
|
+
{
|
|
22751
|
+
"path": "image",
|
|
22752
|
+
"valueType": "string"
|
|
22753
|
+
},
|
|
22754
|
+
{
|
|
22755
|
+
"path": "os",
|
|
22756
|
+
"valueType": "string"
|
|
22757
|
+
},
|
|
22758
|
+
{
|
|
22759
|
+
"path": "version",
|
|
22760
|
+
"valueType": "string"
|
|
22761
|
+
},
|
|
22762
|
+
{
|
|
22763
|
+
"path": "autostart",
|
|
22764
|
+
"valueType": "boolean"
|
|
22765
|
+
},
|
|
22766
|
+
{
|
|
22767
|
+
"path": "resources.cpuPercent",
|
|
22768
|
+
"valueType": "number"
|
|
22769
|
+
},
|
|
22770
|
+
{
|
|
22771
|
+
"path": "resources.memoryUsedBytes",
|
|
22772
|
+
"valueType": "number"
|
|
22773
|
+
},
|
|
22774
|
+
{
|
|
22775
|
+
"path": "resources.memoryPercent",
|
|
22776
|
+
"valueType": "number"
|
|
22777
|
+
},
|
|
22778
|
+
{
|
|
22779
|
+
"path": "resources.memoryLimitBytes",
|
|
22780
|
+
"valueType": "number"
|
|
22781
|
+
},
|
|
22782
|
+
{
|
|
22783
|
+
"path": "resources.vcpus",
|
|
22784
|
+
"valueType": "number"
|
|
22785
|
+
},
|
|
22786
|
+
{
|
|
22787
|
+
"path": "resources.diskUsedBytes",
|
|
22788
|
+
"valueType": "number"
|
|
22789
|
+
},
|
|
22790
|
+
{
|
|
22791
|
+
"path": "resources.diskTotalBytes",
|
|
22792
|
+
"valueType": "number"
|
|
22793
|
+
},
|
|
22794
|
+
{
|
|
22795
|
+
"path": "resources.netRxKbps",
|
|
22796
|
+
"valueType": "number"
|
|
22797
|
+
},
|
|
22798
|
+
{
|
|
22799
|
+
"path": "resources.netTxKbps",
|
|
22800
|
+
"valueType": "number"
|
|
22801
|
+
},
|
|
22802
|
+
{
|
|
22803
|
+
"path": "resources.load1",
|
|
22804
|
+
"valueType": "number"
|
|
22805
|
+
},
|
|
22806
|
+
{
|
|
22807
|
+
"path": "resources.temperature",
|
|
22808
|
+
"valueType": "number"
|
|
22809
|
+
},
|
|
22810
|
+
{
|
|
22811
|
+
"path": "updateAvailable",
|
|
22812
|
+
"valueType": "boolean"
|
|
22813
|
+
}
|
|
22814
|
+
],
|
|
22113
22815
|
"zone-analytics": [
|
|
22114
22816
|
{
|
|
22115
22817
|
"path": "ts",
|
|
@@ -22202,7 +22904,7 @@ Object.freeze({
|
|
|
22202
22904
|
}
|
|
22203
22905
|
});
|
|
22204
22906
|
//#endregion
|
|
22205
|
-
//#region ../types/dist/implemented-methods-
|
|
22907
|
+
//#region ../types/dist/implemented-methods-u7ddjc-_.mjs
|
|
22206
22908
|
/**
|
|
22207
22909
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
22208
22910
|
*
|
|
@@ -23123,63 +23825,99 @@ var HelperMemberSchema = object({
|
|
|
23123
23825
|
cap: string().min(1),
|
|
23124
23826
|
fieldPath: string().min(1)
|
|
23125
23827
|
});
|
|
23828
|
+
/** A group, a statistic, or an integral (D944). The composer runs all three. */
|
|
23829
|
+
var GroupHelperSpecSchema = object({
|
|
23830
|
+
kind: literal("group"),
|
|
23831
|
+
templateId: GroupTemplateIdSchema,
|
|
23832
|
+
aggregate: AggregateReducerSchema,
|
|
23833
|
+
members: array(HelperMemberSchema).min(1).max(64),
|
|
23834
|
+
/** Actuator groups only. Readings leave this unset. */
|
|
23835
|
+
active: ActiveCriterionSchema.optional()
|
|
23836
|
+
});
|
|
23837
|
+
var statisticHelperObject = object({
|
|
23838
|
+
kind: literal("statistic"),
|
|
23839
|
+
stat: _enum(STATISTIC_STATS),
|
|
23840
|
+
window: StatisticWindowSchema,
|
|
23841
|
+
source: HelperMemberSchema
|
|
23842
|
+
});
|
|
23843
|
+
var integralHelperObject = object({
|
|
23844
|
+
kind: literal("integral"),
|
|
23845
|
+
reset: _enum(RESET_PERIODS),
|
|
23846
|
+
output: _enum(["energy", "meter"]),
|
|
23847
|
+
source: HelperMemberSchema
|
|
23848
|
+
});
|
|
23849
|
+
var thresholdHelperObject = object({
|
|
23850
|
+
kind: literal("threshold"),
|
|
23851
|
+
source: HelperMemberSchema,
|
|
23852
|
+
high: number$1(),
|
|
23853
|
+
low: number$1(),
|
|
23854
|
+
onForMs: number$1().int().nonnegative(),
|
|
23855
|
+
offForMs: number$1().int().nonnegative()
|
|
23856
|
+
});
|
|
23857
|
+
var arithmeticHelperObject = object({
|
|
23858
|
+
kind: literal("arithmetic"),
|
|
23859
|
+
op: _enum([
|
|
23860
|
+
"sum",
|
|
23861
|
+
"difference",
|
|
23862
|
+
"ratio"
|
|
23863
|
+
]),
|
|
23864
|
+
inputs: array(HelperMemberSchema).min(2).max(64)
|
|
23865
|
+
});
|
|
23866
|
+
var expressionHelperObject = object({
|
|
23867
|
+
kind: literal("expression"),
|
|
23868
|
+
expr: string().min(1),
|
|
23869
|
+
inputs: array(object({
|
|
23870
|
+
name: string().min(1),
|
|
23871
|
+
member: HelperMemberSchema
|
|
23872
|
+
})).min(1).max(64),
|
|
23873
|
+
output: _enum(["number", "boolean"])
|
|
23874
|
+
});
|
|
23875
|
+
var derivativeHelperObject = object({
|
|
23876
|
+
kind: literal("derivative"),
|
|
23877
|
+
window: RollingWindowSchema,
|
|
23878
|
+
per: _enum([
|
|
23879
|
+
"second",
|
|
23880
|
+
"minute",
|
|
23881
|
+
"hour"
|
|
23882
|
+
]),
|
|
23883
|
+
source: HelperMemberSchema
|
|
23884
|
+
});
|
|
23885
|
+
/** The stream profiles a camera grid can publish. */
|
|
23886
|
+
var GRID_PROFILES = [
|
|
23887
|
+
"high",
|
|
23888
|
+
"mid",
|
|
23889
|
+
"low"
|
|
23890
|
+
];
|
|
23891
|
+
/** A rectangle in normalized [0,1] coordinates of whatever contains it. */
|
|
23892
|
+
var GridRectSchema = object({
|
|
23893
|
+
x: number$1().min(0).max(1),
|
|
23894
|
+
y: number$1().min(0).max(1),
|
|
23895
|
+
width: number$1().gt(0).max(1),
|
|
23896
|
+
height: number$1().gt(0).max(1)
|
|
23897
|
+
});
|
|
23898
|
+
var GridCellSpecSchema = object({
|
|
23899
|
+
source: CompositionSourceRefSchema,
|
|
23900
|
+
region: GridRectSchema,
|
|
23901
|
+
cell: GridRectSchema
|
|
23902
|
+
});
|
|
23126
23903
|
var HelperSpecSchema = discriminatedUnion("kind", [
|
|
23127
23904
|
object({
|
|
23128
|
-
kind: literal("
|
|
23129
|
-
|
|
23130
|
-
|
|
23131
|
-
|
|
23132
|
-
/** Actuator groups only. Readings leave this unset. */
|
|
23133
|
-
active: ActiveCriterionSchema.optional()
|
|
23134
|
-
}),
|
|
23135
|
-
object({
|
|
23136
|
-
kind: literal("statistic"),
|
|
23137
|
-
stat: _enum(STATISTIC_STATS),
|
|
23138
|
-
window: StatisticWindowSchema,
|
|
23139
|
-
source: HelperMemberSchema
|
|
23140
|
-
}),
|
|
23141
|
-
object({
|
|
23142
|
-
kind: literal("integral"),
|
|
23143
|
-
reset: _enum(RESET_PERIODS),
|
|
23144
|
-
output: _enum(["energy", "meter"]),
|
|
23145
|
-
source: HelperMemberSchema
|
|
23146
|
-
}),
|
|
23147
|
-
object({
|
|
23148
|
-
kind: literal("threshold"),
|
|
23149
|
-
source: HelperMemberSchema,
|
|
23150
|
-
high: number$1(),
|
|
23151
|
-
low: number$1(),
|
|
23152
|
-
onForMs: number$1().int().nonnegative(),
|
|
23153
|
-
offForMs: number$1().int().nonnegative()
|
|
23154
|
-
}),
|
|
23155
|
-
object({
|
|
23156
|
-
kind: literal("arithmetic"),
|
|
23157
|
-
op: _enum([
|
|
23158
|
-
"sum",
|
|
23159
|
-
"difference",
|
|
23160
|
-
"ratio"
|
|
23161
|
-
]),
|
|
23162
|
-
inputs: array(HelperMemberSchema).min(2).max(64)
|
|
23905
|
+
kind: literal("grid"),
|
|
23906
|
+
fps: number$1().int().min(1).max(60),
|
|
23907
|
+
publishedProfiles: array(_enum(GRID_PROFILES)).max(3),
|
|
23908
|
+
cells: array(GridCellSpecSchema).max(16)
|
|
23163
23909
|
}),
|
|
23164
23910
|
object({
|
|
23165
|
-
kind: literal("
|
|
23166
|
-
|
|
23167
|
-
inputs: array(object({
|
|
23168
|
-
name: string().min(1),
|
|
23169
|
-
member: HelperMemberSchema
|
|
23170
|
-
})).min(1).max(64),
|
|
23171
|
-
output: _enum(["number", "boolean"])
|
|
23911
|
+
kind: literal("terminal"),
|
|
23912
|
+
terminalId: string().uuid()
|
|
23172
23913
|
}),
|
|
23173
|
-
|
|
23174
|
-
|
|
23175
|
-
|
|
23176
|
-
|
|
23177
|
-
|
|
23178
|
-
|
|
23179
|
-
|
|
23180
|
-
]),
|
|
23181
|
-
source: HelperMemberSchema
|
|
23182
|
-
})
|
|
23914
|
+
GroupHelperSpecSchema,
|
|
23915
|
+
statisticHelperObject,
|
|
23916
|
+
integralHelperObject,
|
|
23917
|
+
thresholdHelperObject,
|
|
23918
|
+
arithmeticHelperObject,
|
|
23919
|
+
expressionHelperObject,
|
|
23920
|
+
derivativeHelperObject
|
|
23183
23921
|
]);
|
|
23184
23922
|
/** Longest snippet a `code` source may carry (slice 4). */
|
|
23185
23923
|
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
@@ -54852,9 +55590,10 @@ var GridProfileOfferSchema = object({
|
|
|
54852
55590
|
published: boolean()
|
|
54853
55591
|
});
|
|
54854
55592
|
var GridLayoutViewSchema = object({
|
|
54855
|
-
/** The
|
|
54856
|
-
|
|
55593
|
+
/** The grid block (planning#580) whose camera this is. */
|
|
55594
|
+
blockId: string(),
|
|
54857
55595
|
deviceId: number$1().int().nonnegative(),
|
|
55596
|
+
/** The device row's name — the only name a grid has; it is renamed on the block or the device. */
|
|
54858
55597
|
name: string(),
|
|
54859
55598
|
/**
|
|
54860
55599
|
* NO canvas size. A grid's resolution is not authored: each profile derives
|
|
@@ -54870,7 +55609,6 @@ var GridLayoutViewSchema = object({
|
|
|
54870
55609
|
});
|
|
54871
55610
|
var GridLayoutPatchSchema = object({
|
|
54872
55611
|
deviceId: number$1().int().nonnegative(),
|
|
54873
|
-
name: string().min(1).max(160).optional(),
|
|
54874
55612
|
fps: number$1().int().min(1).max(60).optional(),
|
|
54875
55613
|
/** Which profiles to publish. See `GridProfileOffer.published`. */
|
|
54876
55614
|
publishedProfiles: array(_enum([
|
|
@@ -58600,7 +59338,7 @@ var mediaPlayerCapability = {
|
|
|
58600
59338
|
]
|
|
58601
59339
|
}
|
|
58602
59340
|
};
|
|
58603
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Climate, DeviceType.EventEmitter, DeviceType.Climate, DeviceType.Climate, DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Camera, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Gateway, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.PetFeeder, DeviceType.MediaPlayer, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation;
|
|
59341
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Climate, DeviceType.EventEmitter, DeviceType.Climate, DeviceType.Climate, DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, DeviceType.Camera, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Fan, DeviceType.Lock, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Gateway, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.PetFeeder, DeviceType.MediaPlayer, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation, DeviceType.WeatherStation;
|
|
58604
59342
|
var NUMBER = {
|
|
58605
59343
|
kind: "fixed",
|
|
58606
59344
|
result: ["number"]
|
|
@@ -59050,7 +59788,7 @@ new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
|
|
|
59050
59788
|
DeviceType.Camera;
|
|
59051
59789
|
/**
|
|
59052
59790
|
* The series a device card trends, per cap (`history.primary` + `history.priority`):
|
|
59053
|
-
*
|
|
59791
|
+
* 7 caps. The card shows the primary of the enabled cap with the highest priority.
|
|
59054
59792
|
*/
|
|
59055
59793
|
var HISTORY_PRIMARY = {
|
|
59056
59794
|
"climate-control": {
|
|
@@ -59076,6 +59814,10 @@ var HISTORY_PRIMARY = {
|
|
|
59076
59814
|
"weather-station": {
|
|
59077
59815
|
field: "temperature",
|
|
59078
59816
|
priority: 60
|
|
59817
|
+
},
|
|
59818
|
+
"workload": {
|
|
59819
|
+
field: "resources.cpuPercent",
|
|
59820
|
+
priority: 40
|
|
59079
59821
|
}
|
|
59080
59822
|
};
|
|
59081
59823
|
DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
|
|
@@ -59086,6 +59828,8 @@ var PowerSourceRefusalReasonSchema = _enum([
|
|
|
59086
59828
|
"switch-unknown",
|
|
59087
59829
|
"restart-in-progress",
|
|
59088
59830
|
"switch-call-failed",
|
|
59831
|
+
"switch-options-unreadable",
|
|
59832
|
+
"not-settable",
|
|
59089
59833
|
"switch-is-actuator"
|
|
59090
59834
|
]);
|
|
59091
59835
|
var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
|
|
@@ -59102,6 +59846,14 @@ var PowerSourceInfoSchema = object({
|
|
|
59102
59846
|
/** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
|
|
59103
59847
|
switchOn: boolean().nullable(),
|
|
59104
59848
|
switchOnline: boolean().nullable(),
|
|
59849
|
+
/**
|
|
59850
|
+
* Whether the linked switch can be set (`switch.getOptions().supportsSetState`; a provider
|
|
59851
|
+
* without the method is a plain switch, `true`). `null` = not known: no link, the switch is
|
|
59852
|
+
* missing, or the read FAILED. Absent = a provider that predates the field. Only `false`
|
|
59853
|
+
* withdraws power on / off (`offeredWhen` of `powerSource.on` / `.off`, the device hero) —
|
|
59854
|
+
* unknown keeps them (D315, D1058).
|
|
59855
|
+
*/
|
|
59856
|
+
switchSettable: boolean().nullable().optional(),
|
|
59105
59857
|
restartInProgress: boolean(),
|
|
59106
59858
|
offSeconds: number$1().int()
|
|
59107
59859
|
});
|
|
@@ -59159,6 +59911,11 @@ var powerSourceCustomize = {
|
|
|
59159
59911
|
}]
|
|
59160
59912
|
};
|
|
59161
59913
|
var deviceInput$2 = object({ deviceId: number$1().int().nonnegative() });
|
|
59914
|
+
/** The read that decides whether power on / off are offered (`offeredWhen`, D1058). */
|
|
59915
|
+
var POWER_SOURCE_SETTABLE_GATE = {
|
|
59916
|
+
method: "getStatus",
|
|
59917
|
+
field: "switchSettable"
|
|
59918
|
+
};
|
|
59162
59919
|
var powerSourceCapability = {
|
|
59163
59920
|
name: "power-source",
|
|
59164
59921
|
scope: "device",
|
|
@@ -59173,7 +59930,8 @@ var powerSourceCapability = {
|
|
|
59173
59930
|
id: "powerSource.on",
|
|
59174
59931
|
label: t("Power on", "Dai corrente"),
|
|
59175
59932
|
phrase: t("Power on {device}", "Dai corrente a {device}"),
|
|
59176
|
-
icon: "power"
|
|
59933
|
+
icon: "power",
|
|
59934
|
+
offeredWhen: POWER_SOURCE_SETTABLE_GATE
|
|
59177
59935
|
}]
|
|
59178
59936
|
}),
|
|
59179
59937
|
powerOff: systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
|
|
@@ -59183,7 +59941,8 @@ var powerSourceCapability = {
|
|
|
59183
59941
|
id: "powerSource.off",
|
|
59184
59942
|
label: t("Power off", "Togli corrente"),
|
|
59185
59943
|
phrase: t("Cut the power of {device}", "Togli la corrente a {device}"),
|
|
59186
|
-
icon: "power-off"
|
|
59944
|
+
icon: "power-off",
|
|
59945
|
+
offeredWhen: POWER_SOURCE_SETTABLE_GATE
|
|
59187
59946
|
}]
|
|
59188
59947
|
}),
|
|
59189
59948
|
forceRestart: systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
|
|
@@ -60896,6 +61655,205 @@ var SiteZoneSchema = object({
|
|
|
60896
61655
|
* the ones that most want grouping. */
|
|
60897
61656
|
locationKeys: array(string())
|
|
60898
61657
|
});
|
|
61658
|
+
/**
|
|
61659
|
+
* Provider-declared device identifiers (D1059, planning#590).
|
|
61660
|
+
*
|
|
61661
|
+
* What a device IS, as its owning provider read it from the hardware: the keys a
|
|
61662
|
+
* later step matches across integrations to tell that two devices are the same
|
|
61663
|
+
* physical object. Separate from `DeviceMetadata` on purpose — metadata is a
|
|
61664
|
+
* free-form blob the operator can edit, identifiers are typed, normalised and
|
|
61665
|
+
* written ONLY by the provider that owns the device (`device-manager.
|
|
61666
|
+
* setIdentifiers`, owner-checked on the transport's caller stamp).
|
|
61667
|
+
*
|
|
61668
|
+
* | Key | Stored form | Strength |
|
|
61669
|
+
* | -------------- | ----------------------------------- | -------- |
|
|
61670
|
+
* | `mac` | `aa:bb:cc:dd:ee:ff`, several | strong |
|
|
61671
|
+
* | `serial` | `<manufacturer>:<serial>` | strong |
|
|
61672
|
+
* | `machine-uuid` | SMBIOS / VM / container uuid | strong |
|
|
61673
|
+
* | `vendor-uid` | `<vendor>:<id>` | strong |
|
|
61674
|
+
* | `hostname` | lower-case, no domain | weak |
|
|
61675
|
+
* | `ip` | IPv4 / IPv6 | weak |
|
|
61676
|
+
*
|
|
61677
|
+
* Strength is a property of the KEY, derived by {@link identifierStrength} —
|
|
61678
|
+
* never stored, so it cannot drift from the table above. A weak key never links
|
|
61679
|
+
* two devices on its own.
|
|
61680
|
+
*
|
|
61681
|
+
* The schema refuses a value that is not in its stored form, so whatever is
|
|
61682
|
+
* persisted is already normalised. Build a declaration with
|
|
61683
|
+
* {@link normaliseIdentifiers}, which turns the raw values a driver read into
|
|
61684
|
+
* that form and names every value it refused.
|
|
61685
|
+
*/
|
|
61686
|
+
var DEVICE_IDENTIFIER_KEYS = [
|
|
61687
|
+
"mac",
|
|
61688
|
+
"serial",
|
|
61689
|
+
"machine-uuid",
|
|
61690
|
+
"vendor-uid",
|
|
61691
|
+
"hostname",
|
|
61692
|
+
"ip"
|
|
61693
|
+
];
|
|
61694
|
+
var DeviceIdentifierKeySchema = _enum(DEVICE_IDENTIFIER_KEYS);
|
|
61695
|
+
/** `read` — the provider read it from the device; `derived` — computed from something else it read. */
|
|
61696
|
+
var DeviceIdentifierOriginSchema = _enum(["read", "derived"]);
|
|
61697
|
+
var MAC_PATTERN = /^[0-9a-f]{2}(?::[0-9a-f]{2}){5}$/;
|
|
61698
|
+
/** `<prefix>:<value>` — prefix a lower-case slug, value lower-case and non-blank. */
|
|
61699
|
+
var PREFIXED_PATTERN = /^[a-z0-9][a-z0-9._-]*:[^\sA-Z]+$/;
|
|
61700
|
+
var MACHINE_UUID_PATTERN = /^[0-9a-f][0-9a-f-]{7,}$/;
|
|
61701
|
+
var HOSTNAME_PATTERN = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
|
|
61702
|
+
function entrySchema(value) {
|
|
61703
|
+
return object({
|
|
61704
|
+
value,
|
|
61705
|
+
origin: DeviceIdentifierOriginSchema,
|
|
61706
|
+
/** Epoch ms of the FIRST read that produced this value (and origin). A later
|
|
61707
|
+
* read of the same value does not move it — see {@link mergeIdentifiers}. */
|
|
61708
|
+
readAt: number$1().int().nonnegative()
|
|
61709
|
+
}).strict();
|
|
61710
|
+
}
|
|
61711
|
+
var MacEntrySchema = entrySchema(string().regex(MAC_PATTERN));
|
|
61712
|
+
var SerialEntrySchema = entrySchema(string().regex(PREFIXED_PATTERN));
|
|
61713
|
+
var MachineUuidEntrySchema = entrySchema(string().regex(MACHINE_UUID_PATTERN));
|
|
61714
|
+
var VendorUidEntrySchema = entrySchema(string().regex(PREFIXED_PATTERN));
|
|
61715
|
+
var HostnameEntrySchema = entrySchema(string().regex(HOSTNAME_PATTERN));
|
|
61716
|
+
var IpEntrySchema = entrySchema(union([ipv4(), ipv6()]));
|
|
61717
|
+
object({
|
|
61718
|
+
value: string().min(1),
|
|
61719
|
+
origin: DeviceIdentifierOriginSchema,
|
|
61720
|
+
readAt: number$1().int().nonnegative()
|
|
61721
|
+
}).strict();
|
|
61722
|
+
/** The typed declaration. Every key optional; `mac` the only one that holds several. */
|
|
61723
|
+
var DeviceIdentifiersSchema = object({
|
|
61724
|
+
mac: array(MacEntrySchema).min(1).readonly().optional(),
|
|
61725
|
+
serial: SerialEntrySchema.optional(),
|
|
61726
|
+
"machine-uuid": MachineUuidEntrySchema.optional(),
|
|
61727
|
+
"vendor-uid": VendorUidEntrySchema.optional(),
|
|
61728
|
+
hostname: HostnameEntrySchema.optional(),
|
|
61729
|
+
ip: IpEntrySchema.optional()
|
|
61730
|
+
}).strict();
|
|
61731
|
+
/** True when the declaration carries no key at all. */
|
|
61732
|
+
function isEmptyIdentifiers(identifiers) {
|
|
61733
|
+
return DEVICE_IDENTIFIER_KEYS.every((key) => identifiers[key] === void 0);
|
|
61734
|
+
}
|
|
61735
|
+
/** Values devices report when they do not know: never an identity. */
|
|
61736
|
+
var PLACEHOLDER_PATTERN = /^(?:unknown|none|n\/?a|null|undefined|default|0+|-+)$/i;
|
|
61737
|
+
var NULL_MACS = new Set(["00:00:00:00:00:00", "ff:ff:ff:ff:ff:ff"]);
|
|
61738
|
+
function rejected(reason) {
|
|
61739
|
+
return {
|
|
61740
|
+
ok: false,
|
|
61741
|
+
reason
|
|
61742
|
+
};
|
|
61743
|
+
}
|
|
61744
|
+
/** `AA-BB-CC-DD-EE-FF`, `aabb.ccdd.eeff`, `AABBCCDDEEFF` → `aa:bb:cc:dd:ee:ff`. */
|
|
61745
|
+
function normaliseMac(raw) {
|
|
61746
|
+
const hex = raw.trim().toLowerCase().replace(/[\s:.-]/g, "");
|
|
61747
|
+
if (!/^[0-9a-f]{12}$/.test(hex)) return rejected("not a 48-bit MAC");
|
|
61748
|
+
const mac = (hex.match(/../g) ?? []).join(":");
|
|
61749
|
+
if (NULL_MACS.has(mac)) return rejected("placeholder MAC");
|
|
61750
|
+
return {
|
|
61751
|
+
ok: true,
|
|
61752
|
+
value: mac
|
|
61753
|
+
};
|
|
61754
|
+
}
|
|
61755
|
+
function slug$2(raw) {
|
|
61756
|
+
return raw.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^[-._]+|[-._]+$/g, "");
|
|
61757
|
+
}
|
|
61758
|
+
function normalisePrefixed(prefixRaw, valueRaw, what) {
|
|
61759
|
+
const prefix = slug$2(prefixRaw);
|
|
61760
|
+
if (prefix.length === 0) return rejected(`no ${what}`);
|
|
61761
|
+
const value = valueRaw.trim().toLowerCase().replace(/\s+/g, "");
|
|
61762
|
+
if (value.length === 0) return rejected("blank value");
|
|
61763
|
+
if (PLACEHOLDER_PATTERN.test(value)) return rejected("placeholder value");
|
|
61764
|
+
return {
|
|
61765
|
+
ok: true,
|
|
61766
|
+
value: `${prefix}:${value}`
|
|
61767
|
+
};
|
|
61768
|
+
}
|
|
61769
|
+
function normaliseMachineUuid(raw) {
|
|
61770
|
+
const value = raw.trim().toLowerCase().replace(/^\{|\}$/g, "");
|
|
61771
|
+
if (!MACHINE_UUID_PATTERN.test(value)) return rejected("not a uuid");
|
|
61772
|
+
if (/^[0-]+$/.test(value) || /^[f-]+$/.test(value)) return rejected("placeholder uuid");
|
|
61773
|
+
return {
|
|
61774
|
+
ok: true,
|
|
61775
|
+
value
|
|
61776
|
+
};
|
|
61777
|
+
}
|
|
61778
|
+
function isIp(value) {
|
|
61779
|
+
return union([ipv4(), ipv6()]).safeParse(value).success;
|
|
61780
|
+
}
|
|
61781
|
+
function normaliseHostname(raw) {
|
|
61782
|
+
const full = raw.trim().toLowerCase().replace(/\.$/, "");
|
|
61783
|
+
if (full.length === 0) return rejected("blank hostname");
|
|
61784
|
+
if (isIp(full)) return rejected("an address, not a hostname");
|
|
61785
|
+
const label = full.split(".")[0] ?? "";
|
|
61786
|
+
if (!HOSTNAME_PATTERN.test(label)) return rejected("not a hostname");
|
|
61787
|
+
if (label === "localhost") return rejected("placeholder hostname");
|
|
61788
|
+
return {
|
|
61789
|
+
ok: true,
|
|
61790
|
+
value: label
|
|
61791
|
+
};
|
|
61792
|
+
}
|
|
61793
|
+
function normaliseIp(raw) {
|
|
61794
|
+
const value = raw.trim().toLowerCase().replace(/^\[|\]$/g, "");
|
|
61795
|
+
if (!isIp(value)) return rejected("not an IP address");
|
|
61796
|
+
if (value === "0.0.0.0" || value === "::" || value === "::1" || value.startsWith("127.")) return rejected("loopback or unspecified address");
|
|
61797
|
+
return {
|
|
61798
|
+
ok: true,
|
|
61799
|
+
value
|
|
61800
|
+
};
|
|
61801
|
+
}
|
|
61802
|
+
function isBlank(value) {
|
|
61803
|
+
return value === null || value === void 0 || value.trim().length === 0;
|
|
61804
|
+
}
|
|
61805
|
+
/**
|
|
61806
|
+
* Turn what a driver read into a valid {@link DeviceIdentifiers}: MACs lower-case
|
|
61807
|
+
* with colons and de-duplicated, a hostname without its domain, an IP validated,
|
|
61808
|
+
* a serial prefixed by its manufacturer, a vendor uid by its vendor. A value that
|
|
61809
|
+
* cannot be normalised is left out and listed in `rejected` — the caller logs it
|
|
61810
|
+
* (with `tags: { deviceId }`), it is never dropped in silence.
|
|
61811
|
+
*/
|
|
61812
|
+
function normaliseIdentifiers(raw, options = {}) {
|
|
61813
|
+
const readAt = options.readAt ?? Date.now();
|
|
61814
|
+
const originOf = (key) => options.originByKey?.[key] ?? options.origin ?? "read";
|
|
61815
|
+
const entry = (key, value) => ({
|
|
61816
|
+
value,
|
|
61817
|
+
origin: originOf(key),
|
|
61818
|
+
readAt
|
|
61819
|
+
});
|
|
61820
|
+
const refused = [];
|
|
61821
|
+
const take = (key, input, result) => {
|
|
61822
|
+
if (result.ok) return entry(key, result.value);
|
|
61823
|
+
refused.push({
|
|
61824
|
+
key,
|
|
61825
|
+
value: input,
|
|
61826
|
+
reason: result.reason
|
|
61827
|
+
});
|
|
61828
|
+
};
|
|
61829
|
+
const macInputs = raw.mac === null || raw.mac === void 0 ? [] : [raw.mac].flat();
|
|
61830
|
+
const macs = [];
|
|
61831
|
+
for (const input of macInputs) {
|
|
61832
|
+
if (isBlank(input)) continue;
|
|
61833
|
+
const taken = take("mac", input, normaliseMac(input));
|
|
61834
|
+
if (taken !== void 0 && !macs.some((m) => m.value === taken.value)) macs.push(taken);
|
|
61835
|
+
}
|
|
61836
|
+
const serial = raw.serial === null || raw.serial === void 0 || isBlank(raw.serial.serial) ? void 0 : take("serial", `${raw.serial.manufacturer}:${raw.serial.serial}`, normalisePrefixed(raw.serial.manufacturer, raw.serial.serial, "manufacturer"));
|
|
61837
|
+
const vendorUid = raw.vendorUid === null || raw.vendorUid === void 0 || isBlank(raw.vendorUid.id) ? void 0 : take("vendor-uid", `${raw.vendorUid.vendor}:${raw.vendorUid.id}`, normalisePrefixed(raw.vendorUid.vendor, raw.vendorUid.id, "vendor"));
|
|
61838
|
+
const machineUuid = isBlank(raw.machineUuid) ? void 0 : take("machine-uuid", raw.machineUuid, normaliseMachineUuid(raw.machineUuid));
|
|
61839
|
+
const host = isBlank(raw.host) ? null : raw.host.trim();
|
|
61840
|
+
const hostIsIp = host !== null && isIp(host.toLowerCase().replace(/^\[|\]$/g, ""));
|
|
61841
|
+
const hostnameInput = isBlank(raw.hostname) ? hostIsIp ? null : host : raw.hostname;
|
|
61842
|
+
const ipInput = isBlank(raw.ip) ? hostIsIp ? host : null : raw.ip;
|
|
61843
|
+
const hostname = hostnameInput === null ? void 0 : take("hostname", hostnameInput, normaliseHostname(hostnameInput));
|
|
61844
|
+
const ip = ipInput === null ? void 0 : take("ip", ipInput, normaliseIp(ipInput));
|
|
61845
|
+
return {
|
|
61846
|
+
identifiers: {
|
|
61847
|
+
...macs.length > 0 ? { mac: macs } : {},
|
|
61848
|
+
...serial !== void 0 ? { serial } : {},
|
|
61849
|
+
...machineUuid !== void 0 ? { "machine-uuid": machineUuid } : {},
|
|
61850
|
+
...vendorUid !== void 0 ? { "vendor-uid": vendorUid } : {},
|
|
61851
|
+
...hostname !== void 0 ? { hostname } : {},
|
|
61852
|
+
...ip !== void 0 ? { ip } : {}
|
|
61853
|
+
},
|
|
61854
|
+
rejected: refused
|
|
61855
|
+
};
|
|
61856
|
+
}
|
|
60899
61857
|
var DeviceSearchRequiresSchema = object({
|
|
60900
61858
|
/** Capability names the field wants a value of. Absent when the field wants actions only. */
|
|
60901
61859
|
caps: array(string()).readonly().optional(),
|
|
@@ -61458,6 +62416,10 @@ var DeviceInfoSchema = object({
|
|
|
61458
62416
|
/** Hardware + identity blob (manufacturer / model / firmware / sn /
|
|
61459
62417
|
* uid / mac / …). Populated by drivers; editable via setMetadata. */
|
|
61460
62418
|
metadata: record$1(string(), unknown()).nullable().optional(),
|
|
62419
|
+
/** Provider-declared identifiers (D1059): typed, normalised, written only by
|
|
62420
|
+
* the owning provider via `setIdentifiers`; read-only for the operator.
|
|
62421
|
+
* Absent ⇒ the provider declared none. */
|
|
62422
|
+
identifiers: DeviceIdentifiersSchema.optional(),
|
|
61461
62423
|
/** Optional upstream-system identity + rendering envelope. See
|
|
61462
62424
|
* `SourceInfo` in `packages/types/src/device/source-info.ts`. */
|
|
61463
62425
|
sourceInfo: SourceInfoSchema.optional(),
|
|
@@ -61609,6 +62571,8 @@ var DeviceMetaSchema = object({
|
|
|
61609
62571
|
disabled: boolean(),
|
|
61610
62572
|
parentDeviceId: number$1().nullable(),
|
|
61611
62573
|
metadata: record$1(string(), unknown()).nullable().optional(),
|
|
62574
|
+
/** Provider-declared identifiers (D1059). See `DeviceMeta.identifiers`. */
|
|
62575
|
+
identifiers: DeviceIdentifiersSchema.optional(),
|
|
61612
62576
|
/** Optional upstream-system identity + rendering envelope. See
|
|
61613
62577
|
* `SourceInfo`. Present when the device has been persisted with a
|
|
61614
62578
|
* non-synthetic source identifier (HA entities, vendor MAC, …);
|
|
@@ -61922,6 +62886,14 @@ method(object({
|
|
|
61922
62886
|
}), _void(), {
|
|
61923
62887
|
kind: "mutation",
|
|
61924
62888
|
auth: "admin"
|
|
62889
|
+
}), method(object({
|
|
62890
|
+
deviceId: number$1(),
|
|
62891
|
+
identifiers: DeviceIdentifiersSchema.nullable(),
|
|
62892
|
+
/** Kinds the provider tried to read and could not: their stored value is kept. */
|
|
62893
|
+
unread: array(DeviceIdentifierKeySchema).optional()
|
|
62894
|
+
}), _void(), {
|
|
62895
|
+
kind: "mutation",
|
|
62896
|
+
auth: "admin"
|
|
61925
62897
|
}), method(_void(), array(string())), method(object({ name: string() }), _void(), {
|
|
61926
62898
|
kind: "mutation",
|
|
61927
62899
|
auth: "admin"
|
|
@@ -62524,6 +63496,34 @@ var OrphanListSchema = object({
|
|
|
62524
63496
|
/** More orphans exist than {@link DEVICE_HISTORY_ORPHAN_LIST_MAX}. */
|
|
62525
63497
|
truncated: boolean()
|
|
62526
63498
|
});
|
|
63499
|
+
var DeviceHistoryRangeDeleteRefusalSchema = _enum([
|
|
63500
|
+
"invalid-range",
|
|
63501
|
+
"range-too-large",
|
|
63502
|
+
"series-not-found",
|
|
63503
|
+
"not-a-point-series"
|
|
63504
|
+
]);
|
|
63505
|
+
var RollupRowsSchema = object({
|
|
63506
|
+
"5m": number$1().int(),
|
|
63507
|
+
"1h": number$1().int(),
|
|
63508
|
+
"1d": number$1().int()
|
|
63509
|
+
});
|
|
63510
|
+
/**
|
|
63511
|
+
* What a time-range delete did, or WOULD do (`dryRun`). `rows` is what was
|
|
63512
|
+
* removed: raw points inside the range, and the rollup rows covering it (those
|
|
63513
|
+
* are removed and rebuilt from what remains, so a gap leaves no stale value).
|
|
63514
|
+
* `rewritten` is how many rollup rows were rebuilt from the remaining points;
|
|
63515
|
+
* `null` on a dry run, which cannot know before it has deleted.
|
|
63516
|
+
*/
|
|
63517
|
+
var RangeDeleteResultSchema = discriminatedUnion("ok", [object({
|
|
63518
|
+
ok: literal(true),
|
|
63519
|
+
dryRun: boolean(),
|
|
63520
|
+
seriesId: number$1().int(),
|
|
63521
|
+
rows: TierRowsSchema,
|
|
63522
|
+
rewritten: RollupRowsSchema.nullable()
|
|
63523
|
+
}), object({
|
|
63524
|
+
ok: literal(false),
|
|
63525
|
+
reason: DeviceHistoryRangeDeleteRefusalSchema
|
|
63526
|
+
})]);
|
|
62527
63527
|
var DeviceHistoryStatusSchema = object({
|
|
62528
63528
|
startedAt: number$1(),
|
|
62529
63529
|
/** The store is declared, series loaded and the first reconcile has answered. */
|
|
@@ -62624,6 +63624,16 @@ method(object({ deviceId: number$1().int() }), array(SeriesInfoSchema).readonly(
|
|
|
62624
63624
|
}), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" }), method(object({}), OrphanListSchema, { auth: "admin" }), method(object({ seriesIds: array(number$1().int()).min(1).max(50) }), object({ results: array(OrphanDeleteEntrySchema).readonly() }), {
|
|
62625
63625
|
kind: "mutation",
|
|
62626
63626
|
auth: "admin"
|
|
63627
|
+
}), method(object({
|
|
63628
|
+
deviceId: number$1().int(),
|
|
63629
|
+
key: string().min(1),
|
|
63630
|
+
scope: string(),
|
|
63631
|
+
fromMs: number$1().int().nonnegative(),
|
|
63632
|
+
toMs: number$1().int().nonnegative(),
|
|
63633
|
+
dryRun: boolean()
|
|
63634
|
+
}), RangeDeleteResultSchema, {
|
|
63635
|
+
kind: "mutation",
|
|
63636
|
+
auth: "admin"
|
|
62627
63637
|
});
|
|
62628
63638
|
/**
|
|
62629
63639
|
* `device-removal-hook` — the reliable way an addon learns a device was DELETED,
|
|
@@ -67047,8 +68057,8 @@ var HeroSceneSchema = object({
|
|
|
67047
68057
|
/** 0..1: volume, cover position, cycle progress. */
|
|
67048
68058
|
level: number$1().min(0).max(1).nullable()
|
|
67049
68059
|
});
|
|
67050
|
-
DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
67051
|
-
DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter;
|
|
68060
|
+
DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
68061
|
+
DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.PoePort, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter, DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host;
|
|
67052
68062
|
var HeroRowIdSchema = _enum([
|
|
67053
68063
|
"progress",
|
|
67054
68064
|
"run-for",
|
|
@@ -67277,8 +68287,12 @@ var HeroPowerSupplySlotSchema = object({
|
|
|
67277
68287
|
/** Off asks for a confirmation while the device runs. */
|
|
67278
68288
|
confirmOffWhileRunning: boolean(),
|
|
67279
68289
|
running: boolean().nullable(),
|
|
67280
|
-
|
|
67281
|
-
|
|
68290
|
+
/**
|
|
68291
|
+
* `null` when the linked switch ANSWERED it only reports (a PoE port seen through an
|
|
68292
|
+
* API key): power on / off would always be refused. The restart stays (D1058).
|
|
68293
|
+
*/
|
|
68294
|
+
powerOn: HeroActionSchema.nullable(),
|
|
68295
|
+
powerOff: HeroActionSchema.nullable(),
|
|
67282
68296
|
restart: HeroActionSchema
|
|
67283
68297
|
});
|
|
67284
68298
|
var HeroStateBackdropSchema = object({
|
|
@@ -67440,6 +68454,12 @@ var HeroRowModelSchema = object({
|
|
|
67440
68454
|
/** `null` = the type has no inline control, or the caller may not act on it. */
|
|
67441
68455
|
primary: HeroControlSchema.nullable(),
|
|
67442
68456
|
/**
|
|
68457
|
+
* `true` when the primary exists but the model gates it (the caller may not act): the
|
|
68458
|
+
* row is read-only and a client draws no control, not a fallback. `false` = nothing
|
|
68459
|
+
* covers the type yet. Absent = an older server.
|
|
68460
|
+
*/
|
|
68461
|
+
primaryGated: boolean().optional(),
|
|
68462
|
+
/**
|
|
67443
68463
|
* Beside `primary` when the device offers a timed run: Run while idle, Stop
|
|
67444
68464
|
* while armed. `null` when there is no slot, or the caller may not act.
|
|
67445
68465
|
*/
|
|
@@ -75300,6 +76320,12 @@ var CameraMetricsSchema = object({
|
|
|
75300
76320
|
queueDepth: number$1(),
|
|
75301
76321
|
avgInferenceTimeMs: number$1(),
|
|
75302
76322
|
droppedFrames: number$1(),
|
|
76323
|
+
/**
|
|
76324
|
+
* Native crops this runner could not produce for the camera (the caller was
|
|
76325
|
+
* handed nothing), cumulative since attach. Additive: a runner that predates
|
|
76326
|
+
* it omits the field, which a reader treats as unknown, never zero.
|
|
76327
|
+
*/
|
|
76328
|
+
nativeCropMisses: number$1().optional(),
|
|
75303
76329
|
phase: _enum([
|
|
75304
76330
|
"idle",
|
|
75305
76331
|
"watching",
|
|
@@ -78004,6 +79030,19 @@ var NetworkLinkStatusSchema = object({
|
|
|
78004
79030
|
rssi: number$1().optional().meta(readingMeta("signal-level")),
|
|
78005
79031
|
/** Network name of a wireless link, when the firmware reports it. */
|
|
78006
79032
|
ssid: string().optional(),
|
|
79033
|
+
/**
|
|
79034
|
+
* Negotiated link speed of a wired port, the `bitrate` quantity in its base
|
|
79035
|
+
* unit, kbit/s (a gigabit port is 1 000 000); the display picks the unit.
|
|
79036
|
+
* `null` = the port is down or the speed is not known; absent = the provider
|
|
79037
|
+
* never reports one.
|
|
79038
|
+
*/
|
|
79039
|
+
speedKbps: number$1().nonnegative().nullable().optional().meta(readingMeta("bitrate")),
|
|
79040
|
+
/**
|
|
79041
|
+
* Whether the link is up. `type` names the medium, not its state, so a wired
|
|
79042
|
+
* port that lost its link is `ethernet` + `linkUp: false`. `null` = not known;
|
|
79043
|
+
* absent = the provider never reports it.
|
|
79044
|
+
*/
|
|
79045
|
+
linkUp: boolean().nullable().optional(),
|
|
78007
79046
|
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
78008
79047
|
lastUpdated: number$1().meta(readingMeta("none"))
|
|
78009
79048
|
});
|
|
@@ -80188,7 +81227,32 @@ var NcRuleInputSchema = object({
|
|
|
80188
81227
|
* authored before this field meant. An editor turns it off by writing
|
|
80189
81228
|
* `false`, so it needs no `clear` key.
|
|
80190
81229
|
*/
|
|
80191
|
-
askVerdict: boolean().optional()
|
|
81230
|
+
askVerdict: boolean().optional(),
|
|
81231
|
+
/**
|
|
81232
|
+
* Operator tags (D1054), kept on the rule like a core block's. Absent = no
|
|
81233
|
+
* tags. `.optional()`, never `.default()`: a partial `updateRule` patch that
|
|
81234
|
+
* does not name `tags` keeps the stored ones (the store merges), and an
|
|
81235
|
+
* editor empties them by sending `[]` (the store drops an empty list).
|
|
81236
|
+
* Renamed or removed fleet-wide only through the `tags` cap, which writes
|
|
81237
|
+
* here with `setRuleTags`.
|
|
81238
|
+
*/
|
|
81239
|
+
tags: TagsFieldSchema.optional()
|
|
81240
|
+
});
|
|
81241
|
+
/**
|
|
81242
|
+
* The rule kinds that carry tags (D1054) — each one its own store. Every kind
|
|
81243
|
+
* labels its rules the same way; this names which store a tag write goes to.
|
|
81244
|
+
*/
|
|
81245
|
+
var NcTaggedRuleKindSchema = _enum([
|
|
81246
|
+
"event",
|
|
81247
|
+
"summary",
|
|
81248
|
+
"timelapse",
|
|
81249
|
+
"calendar-events"
|
|
81250
|
+
]);
|
|
81251
|
+
/** One rule's tags, as the `tags` cap reads them across every kind. */
|
|
81252
|
+
var NcRuleTagsEntrySchema = object({
|
|
81253
|
+
kind: NcTaggedRuleKindSchema,
|
|
81254
|
+
ruleId: string(),
|
|
81255
|
+
tags: array(string())
|
|
80192
81256
|
});
|
|
80193
81257
|
/**
|
|
80194
81258
|
* Partial patch for `updateRule` — any subset of the input fields, plus the
|
|
@@ -81205,6 +82269,16 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
81205
82269
|
}), object({ success: literal(true) }), {
|
|
81206
82270
|
kind: "mutation",
|
|
81207
82271
|
auth: "admin"
|
|
82272
|
+
}), method(object({}), object({ rules: array(NcRuleTagsEntrySchema) }), {
|
|
82273
|
+
kind: "query",
|
|
82274
|
+
auth: "admin"
|
|
82275
|
+
}), method(object({
|
|
82276
|
+
kind: NcTaggedRuleKindSchema,
|
|
82277
|
+
ruleId: string(),
|
|
82278
|
+
tags: TagsFieldSchema
|
|
82279
|
+
}), object({ success: literal(true) }), {
|
|
82280
|
+
kind: "mutation",
|
|
82281
|
+
auth: "admin"
|
|
81208
82282
|
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number$1().int()).readonly() }), { auth: "admin" }), method(object({
|
|
81209
82283
|
deviceId: number$1().int(),
|
|
81210
82284
|
muted: boolean()
|
|
@@ -82774,6 +83848,94 @@ var EffectiveSharesSchema = object({
|
|
|
82774
83848
|
nodeWeights: record$1(string(), number$1()),
|
|
82775
83849
|
deviceWeights: record$1(string(), record$1(string(), number$1()))
|
|
82776
83850
|
});
|
|
83851
|
+
var HealthFindingKindSchema = _enum([
|
|
83852
|
+
"motion-without-detections",
|
|
83853
|
+
"detections-under-floor",
|
|
83854
|
+
"inference-too-slow",
|
|
83855
|
+
"frames-shed",
|
|
83856
|
+
"inference-device-unusable"
|
|
83857
|
+
]);
|
|
83858
|
+
var HealthSeveritySchema = _enum([
|
|
83859
|
+
"info",
|
|
83860
|
+
"warning",
|
|
83861
|
+
"critical"
|
|
83862
|
+
]);
|
|
83863
|
+
var HealthSubjectSchema = discriminatedUnion("type", [
|
|
83864
|
+
object({
|
|
83865
|
+
type: literal("camera"),
|
|
83866
|
+
deviceId: number$1()
|
|
83867
|
+
}),
|
|
83868
|
+
object({
|
|
83869
|
+
type: literal("node"),
|
|
83870
|
+
nodeId: string()
|
|
83871
|
+
}),
|
|
83872
|
+
object({
|
|
83873
|
+
type: literal("inference-device"),
|
|
83874
|
+
nodeId: string(),
|
|
83875
|
+
deviceKey: string()
|
|
83876
|
+
})
|
|
83877
|
+
]);
|
|
83878
|
+
var HealthFindingSchema = object({
|
|
83879
|
+
/** Stable across ticks for the same condition on the same subject. */
|
|
83880
|
+
id: string(),
|
|
83881
|
+
kind: HealthFindingKindSchema,
|
|
83882
|
+
severity: HealthSeveritySchema,
|
|
83883
|
+
subject: HealthSubjectSchema,
|
|
83884
|
+
what: string(),
|
|
83885
|
+
/** The numbers behind the sentence; `null` = the value could not be read. */
|
|
83886
|
+
evidence: record$1(string(), number$1().nullable()),
|
|
83887
|
+
action: string()
|
|
83888
|
+
});
|
|
83889
|
+
/** One in-memory source the tick read, and whether it answered. */
|
|
83890
|
+
var HealthSourceStatusSchema = object({
|
|
83891
|
+
source: string(),
|
|
83892
|
+
/** Entries read; `null` = the read failed. */
|
|
83893
|
+
entries: number$1().nullable()
|
|
83894
|
+
});
|
|
83895
|
+
var HealthNodeSummarySchema = object({
|
|
83896
|
+
nodeId: string(),
|
|
83897
|
+
sessionsNow: number$1(),
|
|
83898
|
+
/** `deviceKey` of every inference device the balancer excludes on this node. */
|
|
83899
|
+
unusableDevices: array(string()).readonly(),
|
|
83900
|
+
devices: array(object({
|
|
83901
|
+
deviceKey: string(),
|
|
83902
|
+
sessionsNow: number$1(),
|
|
83903
|
+
usable: boolean()
|
|
83904
|
+
})).readonly()
|
|
83905
|
+
});
|
|
83906
|
+
/**
|
|
83907
|
+
* Per-camera runner-side signals, as per-tick deltas of the runner's cumulative
|
|
83908
|
+
* counters. A camera is listed only when at least one signal is known and
|
|
83909
|
+
* non-zero; `null` = the runner did not report it (unknown, never zero).
|
|
83910
|
+
*/
|
|
83911
|
+
var HealthCameraRunnerSignalsSchema = object({
|
|
83912
|
+
deviceId: number$1(),
|
|
83913
|
+
/** Native crops the runner failed to produce since the previous tick. */
|
|
83914
|
+
nativeCropMissesSincePreviousTick: number$1().nullable()
|
|
83915
|
+
});
|
|
83916
|
+
var HealthDigestSchema = object({
|
|
83917
|
+
generatedAt: number$1(),
|
|
83918
|
+
/** Wall time the tick took to build this digest. */
|
|
83919
|
+
tickMs: number$1(),
|
|
83920
|
+
/** Cameras known to the digest; `null` when a camera source failed to read (the union would be incomplete). */
|
|
83921
|
+
camerasSeen: number$1().nullable(),
|
|
83922
|
+
findings: array(HealthFindingSchema).readonly(),
|
|
83923
|
+
/** Runner-side per-camera deltas worth a look; see {@link HealthCameraRunnerSignalsSchema}. */
|
|
83924
|
+
cameraSignals: array(HealthCameraRunnerSignalsSchema).readonly(),
|
|
83925
|
+
nodes: array(HealthNodeSummarySchema).readonly(),
|
|
83926
|
+
sources: array(HealthSourceStatusSchema).readonly(),
|
|
83927
|
+
/** Signals the digest does not cover yet, and why — never computed by scanning. */
|
|
83928
|
+
notCovered: array(string()).readonly()
|
|
83929
|
+
});
|
|
83930
|
+
var HealthDigestInputSchema = object({
|
|
83931
|
+
/** Newest first; 1 = the latest digest. */
|
|
83932
|
+
history: number$1().int().min(1).max(24).default(1) });
|
|
83933
|
+
var HealthDigestAnswerSchema = object({
|
|
83934
|
+
/** Null until the first tick has run. */
|
|
83935
|
+
latest: HealthDigestSchema.nullable(),
|
|
83936
|
+
/** Older digests, newest first, when `history` > 1. */
|
|
83937
|
+
previous: array(HealthDigestSchema).readonly()
|
|
83938
|
+
});
|
|
82777
83939
|
var CameraPipelineConfigSchema = object({
|
|
82778
83940
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
82779
83941
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -83435,7 +84597,7 @@ method(object({
|
|
|
83435
84597
|
}), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
|
|
83436
84598
|
kind: "mutation",
|
|
83437
84599
|
auth: "admin"
|
|
83438
|
-
}), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
|
|
84600
|
+
}), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(HealthDigestInputSchema, HealthDigestAnswerSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
|
|
83439
84601
|
kind: "mutation",
|
|
83440
84602
|
auth: "admin"
|
|
83441
84603
|
}), method(NodeBenchmarkPlanSchema, NodeBenchmarkPreflightSchema, { auth: "admin" }), method(NodeBenchmarkPlanSchema, discriminatedUnion("kind", [object({
|
|
@@ -86574,7 +87736,18 @@ DeviceType.Camera, method(object({
|
|
|
86574
87736
|
* older than this field keeps working unchanged (D382 — an unstated
|
|
86575
87737
|
* ask is zero).
|
|
86576
87738
|
*/
|
|
86577
|
-
audio: ClipStreamAudioSchema.optional()
|
|
87739
|
+
audio: ClipStreamAudioSchema.optional(),
|
|
87740
|
+
/**
|
|
87741
|
+
* The operator's authorisation to wake a sleeping camera for this
|
|
87742
|
+
* dial — the same {@link ClipWakeSchema} the byte reads carry. Absent
|
|
87743
|
+
* — the default — means a sleeping standalone battery camera is
|
|
87744
|
+
* REFUSED by name before any URL is minted. A caller sets it only
|
|
87745
|
+
* when a viewer itself asked for the clip (the broker's `playClip`);
|
|
87746
|
+
* a prefetch, a reconcile or a retry never does. With it, the
|
|
87747
|
+
* provider wakes the camera and waits under a bound; a camera that
|
|
87748
|
+
* does not come up is refused `wake-timeout`, naming the wait.
|
|
87749
|
+
*/
|
|
87750
|
+
wake: ClipWakeSchema.optional()
|
|
86578
87751
|
}), ClipStreamDialSchema, {
|
|
86579
87752
|
kind: "query",
|
|
86580
87753
|
auth: "protected"
|
|
@@ -86803,7 +87976,8 @@ _enum([
|
|
|
86803
87976
|
"camera-refused",
|
|
86804
87977
|
"fetch-failed",
|
|
86805
87978
|
"too-large-to-transfer",
|
|
86806
|
-
"wake-expired"
|
|
87979
|
+
"wake-expired",
|
|
87980
|
+
"wake-timeout"
|
|
86807
87981
|
]);
|
|
86808
87982
|
/** Candidate download URLs (LAN first, then operator extra hosts). */
|
|
86809
87983
|
var ExportDownloadSchema = object({
|
|
@@ -89022,6 +90196,201 @@ method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), S
|
|
|
89022
90196
|
auth: "admin"
|
|
89023
90197
|
}), NOT_A_DEVICE.CLUSTER;
|
|
89024
90198
|
/**
|
|
90199
|
+
* Timed siren: trigger the siren for a duration and know until when it sounds.
|
|
90200
|
+
*
|
|
90201
|
+
* The plain on/off `switch` of a siren stays as it is (HomeKit / Alexa see a
|
|
90202
|
+
* switch); this cap adds the part a switch cannot say — HOW LONG, and the
|
|
90203
|
+
* moment the siren is expected to fall silent (`activeUntil`, epoch ms), so a
|
|
90204
|
+
* UI can show the activation with a countdown.
|
|
90205
|
+
*
|
|
90206
|
+
* The allowed durations are never hardcoded: `getOptions` answers what the
|
|
90207
|
+
* CAMERA reports (a discrete list or `{min,max,step}`), the default, and the
|
|
90208
|
+
* unit truth — a camera that counts plays rather than seconds says so, with the
|
|
90209
|
+
* seconds-per-play factor used to convert, and whether that factor was read
|
|
90210
|
+
* from the camera or is an estimate.
|
|
90211
|
+
*/
|
|
90212
|
+
/** What the camera counts natively. */
|
|
90213
|
+
var SirenDurationUnit = {
|
|
90214
|
+
Seconds: "seconds",
|
|
90215
|
+
Plays: "plays"
|
|
90216
|
+
};
|
|
90217
|
+
/** Where the numbers of an options answer come from. */
|
|
90218
|
+
var SirenOptionsSource = {
|
|
90219
|
+
/** Read from the camera by this fetch. */
|
|
90220
|
+
Camera: "camera",
|
|
90221
|
+
/** The camera did not answer or does not advertise it; a documented fallback. */
|
|
90222
|
+
Fallback: "fallback"
|
|
90223
|
+
};
|
|
90224
|
+
var SirenDurationRangeSchema = object({
|
|
90225
|
+
min: number$1().positive(),
|
|
90226
|
+
max: number$1().positive(),
|
|
90227
|
+
step: number$1().positive()
|
|
90228
|
+
});
|
|
90229
|
+
var SirenOptionsSchema = object({
|
|
90230
|
+
/** Discrete durations in seconds the operator may pick; `null` when the camera gives a range. */
|
|
90231
|
+
allowedSeconds: array(number$1().positive()).nullable(),
|
|
90232
|
+
/** Continuous range in seconds; `null` when the camera gives a discrete list. */
|
|
90233
|
+
rangeSeconds: SirenDurationRangeSchema.nullable(),
|
|
90234
|
+
/** The camera's default duration, seconds. */
|
|
90235
|
+
defaultSeconds: number$1().positive(),
|
|
90236
|
+
/**
|
|
90237
|
+
* Discrete play counts the operator may pick; `null` when the camera gives a
|
|
90238
|
+
* range or does not count plays. Defaults to `null` so a provider that
|
|
90239
|
+
* predates plays (#589) reads as declaring none.
|
|
90240
|
+
*/
|
|
90241
|
+
allowedPlays: array(number$1().int().positive()).nullable().default(null),
|
|
90242
|
+
/** Continuous range of play counts; `null` when listed or not counted. */
|
|
90243
|
+
rangePlays: SirenDurationRangeSchema.nullable().default(null),
|
|
90244
|
+
/** The camera's default play count; `null` when the camera does not count plays. */
|
|
90245
|
+
defaultPlays: number$1().int().positive().nullable().default(null),
|
|
90246
|
+
/** What the camera counts natively. */
|
|
90247
|
+
unit: _enum([SirenDurationUnit.Seconds, SirenDurationUnit.Plays]),
|
|
90248
|
+
/** Seconds one play lasts, when `unit` is `plays`; `null` for a seconds camera. */
|
|
90249
|
+
secondsPerPlay: number$1().positive().nullable(),
|
|
90250
|
+
/** `camera` when the values were read from it, `fallback` when the camera could not say. */
|
|
90251
|
+
source: _enum([SirenOptionsSource.Camera, SirenOptionsSource.Fallback]),
|
|
90252
|
+
/** Ms epoch of the read that produced this answer. */
|
|
90253
|
+
fetchedAt: number$1()
|
|
90254
|
+
});
|
|
90255
|
+
var SirenStatusSchema = object({
|
|
90256
|
+
/** True while the siren is sounding by a timed trigger or switched on. */
|
|
90257
|
+
active: boolean(),
|
|
90258
|
+
/** Ms epoch the siren is expected to fall silent; `null` when not active or open-ended. */
|
|
90259
|
+
activeUntil: number$1().nullable(),
|
|
90260
|
+
/** Duration of the current / last activation, seconds; `null` when none yet. */
|
|
90261
|
+
durationSeconds: number$1().nullable(),
|
|
90262
|
+
/**
|
|
90263
|
+
* The play count of the current / last activation when it was asked in plays;
|
|
90264
|
+
* `null` when it was asked in seconds (or none yet). The unit that was asked.
|
|
90265
|
+
*/
|
|
90266
|
+
plays: number$1().int().positive().nullable().default(null),
|
|
90267
|
+
/**
|
|
90268
|
+
* True when `activeUntil` comes from a seconds-per-play factor the camera did
|
|
90269
|
+
* not report — the siren may fall silent somewhat earlier or later.
|
|
90270
|
+
*/
|
|
90271
|
+
activeUntilEstimated: boolean().default(false),
|
|
90272
|
+
/** Ms epoch of the last trigger (0 = never). */
|
|
90273
|
+
lastTriggeredAt: number$1()
|
|
90274
|
+
});
|
|
90275
|
+
/** A trigger asks seconds OR plays (#589); neither means the camera default. */
|
|
90276
|
+
var SirenTriggerInputSchema = object({
|
|
90277
|
+
deviceId: number$1().int().nonnegative(),
|
|
90278
|
+
durationSeconds: number$1().positive().optional(),
|
|
90279
|
+
plays: number$1().int().positive().optional()
|
|
90280
|
+
}).refine((input) => input.durationSeconds === void 0 || input.plays === void 0, {
|
|
90281
|
+
message: "a siren trigger takes durationSeconds or plays, not both",
|
|
90282
|
+
path: ["plays"]
|
|
90283
|
+
});
|
|
90284
|
+
var SirenRuntimeStateSchema = SirenStatusSchema.extend({
|
|
90285
|
+
/** Ms epoch of the last successful camera read of the options (0 = never). */
|
|
90286
|
+
lastFetchedAt: number$1() });
|
|
90287
|
+
var sirenCapability = {
|
|
90288
|
+
name: "siren",
|
|
90289
|
+
scope: "device",
|
|
90290
|
+
deviceNative: true,
|
|
90291
|
+
mode: "singleton",
|
|
90292
|
+
deviceTypes: [DeviceType.Siren],
|
|
90293
|
+
methods: {
|
|
90294
|
+
/** The durations the camera allows, read from the camera. */
|
|
90295
|
+
getOptions: method(object({ deviceId: number$1().int().nonnegative() }), SirenOptionsSchema, {
|
|
90296
|
+
kind: "query",
|
|
90297
|
+
auth: "protected"
|
|
90298
|
+
}),
|
|
90299
|
+
/**
|
|
90300
|
+
* The play counts a rule may pick: what `getOptions` declares as a list, or
|
|
90301
|
+
* its range spelled out. Empty for a siren that counts seconds.
|
|
90302
|
+
*/
|
|
90303
|
+
getPlayChoices: method(object({ deviceId: number$1().int().nonnegative() }), array(number$1().int().positive()), {
|
|
90304
|
+
kind: "query",
|
|
90305
|
+
auth: "protected"
|
|
90306
|
+
}),
|
|
90307
|
+
/**
|
|
90308
|
+
* Sound the siren for `durationSeconds` OR `plays` — never both. With
|
|
90309
|
+
* neither the camera default applies. A count on a siren that declares no
|
|
90310
|
+
* plays is refused. Answers the state at the moment of the trigger
|
|
90311
|
+
* (`activeUntil` included).
|
|
90312
|
+
*/
|
|
90313
|
+
trigger: method(SirenTriggerInputSchema, SirenStatusSchema, {
|
|
90314
|
+
kind: "mutation",
|
|
90315
|
+
auth: "protected",
|
|
90316
|
+
actions: [{
|
|
90317
|
+
id: "siren.trigger",
|
|
90318
|
+
label: t("Sound the siren", "Fai suonare la sirena"),
|
|
90319
|
+
phrase: t("Sound {device}", "Fai suonare {device}"),
|
|
90320
|
+
icon: "siren",
|
|
90321
|
+
args: {}
|
|
90322
|
+
}, {
|
|
90323
|
+
id: "siren.triggerPlays",
|
|
90324
|
+
label: t("Sound the siren N times", "Fai suonare la sirena N volte"),
|
|
90325
|
+
phrase: t("Sound {device} {plays} times", "Fai suonare {device} {plays} volte"),
|
|
90326
|
+
icon: "siren",
|
|
90327
|
+
openArgs: [{
|
|
90328
|
+
key: "plays",
|
|
90329
|
+
label: t("Plays", "Riproduzioni"),
|
|
90330
|
+
offer: {
|
|
90331
|
+
kind: "dynamic",
|
|
90332
|
+
from: "method",
|
|
90333
|
+
method: "getPlayChoices",
|
|
90334
|
+
valueKind: "number"
|
|
90335
|
+
}
|
|
90336
|
+
}]
|
|
90337
|
+
}]
|
|
90338
|
+
}),
|
|
90339
|
+
/** Silence the siren now. */
|
|
90340
|
+
stop: method(object({ deviceId: number$1().int().nonnegative() }), SirenStatusSchema, {
|
|
90341
|
+
kind: "mutation",
|
|
90342
|
+
auth: "protected",
|
|
90343
|
+
actions: [{
|
|
90344
|
+
id: "siren.stop",
|
|
90345
|
+
label: t("Silence the siren", "Zittisci la sirena"),
|
|
90346
|
+
phrase: t("Silence {device}", "Zittisci {device}"),
|
|
90347
|
+
icon: "siren",
|
|
90348
|
+
effect: {
|
|
90349
|
+
field: "active",
|
|
90350
|
+
value: false
|
|
90351
|
+
},
|
|
90352
|
+
args: {}
|
|
90353
|
+
}]
|
|
90354
|
+
})
|
|
90355
|
+
},
|
|
90356
|
+
events: { onSirenChanged: {
|
|
90357
|
+
data: object({
|
|
90358
|
+
deviceId: number$1(),
|
|
90359
|
+
active: boolean(),
|
|
90360
|
+
activeUntil: number$1().nullable()
|
|
90361
|
+
}),
|
|
90362
|
+
notOperatorFacing: "the `active` state trigger phrases both edges of this change"
|
|
90363
|
+
} },
|
|
90364
|
+
status: {
|
|
90365
|
+
schema: SirenStatusSchema,
|
|
90366
|
+
kind: "command-driven"
|
|
90367
|
+
},
|
|
90368
|
+
runtimeState: SirenRuntimeStateSchema,
|
|
90369
|
+
/**
|
|
90370
|
+
* Runtime-state durability: **session** — a siren activation is a moment, not a fact to restore after a restart.
|
|
90371
|
+
*
|
|
90372
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
90373
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
90374
|
+
*/
|
|
90375
|
+
durability: "session",
|
|
90376
|
+
/**
|
|
90377
|
+
* History (D850): none — an activation is already recorded by the switch / alarm events.
|
|
90378
|
+
*/
|
|
90379
|
+
history: "none",
|
|
90380
|
+
vocabulary: {
|
|
90381
|
+
noun: t("Siren", "Sirena"),
|
|
90382
|
+
order: 1170,
|
|
90383
|
+
state: [{
|
|
90384
|
+
kind: "boolean",
|
|
90385
|
+
field: "active",
|
|
90386
|
+
label: t("Siren sounding", "Sirena in funzione"),
|
|
90387
|
+
whenTrue: t("When {device} starts sounding", "Quando {device} inizia a suonare"),
|
|
90388
|
+
whenFalse: t("When {device} falls silent", "Quando {device} smette di suonare"),
|
|
90389
|
+
icon: "siren"
|
|
90390
|
+
}]
|
|
90391
|
+
}
|
|
90392
|
+
};
|
|
90393
|
+
/**
|
|
89025
90394
|
* Smoke alarm sensor — boolean "is smoke currently detected" with
|
|
89026
90395
|
* timestamp of the last transition. Drives Home Assistant
|
|
89027
90396
|
* `binary_sensor` entries with `device_class: smoke`.
|
|
@@ -90147,6 +91516,27 @@ var SwitchStatusSchema = object({
|
|
|
90147
91516
|
/** Ms epoch of the last state change. Useful for UI "X minutes ago". */
|
|
90148
91517
|
lastChangedAt: number$1()
|
|
90149
91518
|
});
|
|
91519
|
+
/**
|
|
91520
|
+
* What a switch can do, from its provider (`getOptions`). A provider that writes no
|
|
91521
|
+
* `getOptions` is a plain on/off switch: the defaults are the old contract.
|
|
91522
|
+
*
|
|
91523
|
+
* - `supportsSetState: false` — the switch reports its state but cannot be set (a PoE port seen only
|
|
91524
|
+
* through an API key). Its provider refuses `setState`; these surfaces withdraw on/off once the
|
|
91525
|
+
* device ANSWERED this (`switchRefusesSetState`): the device hero, the automation action picker
|
|
91526
|
+
* (`offeredWhen` on `switch.on` / `switch.off` / `switch.toggle`), the default `toggle`, the
|
|
91527
|
+
* HomeKit, Alexa and Google exporters, and `power-source` on a device the switch powers
|
|
91528
|
+
* (`getStatus().switchSettable`, `offeredWhen` on `powerSource.on` / `.off`, `not-settable`). A
|
|
91529
|
+
* read that failed or is pending changes nothing (D315).
|
|
91530
|
+
* - `supportsPowerCycle: true` — the device behind the switch can cut and restore its own output in
|
|
91531
|
+
* one native call (a PoE port's power cycle). It has no control of its own: a linked
|
|
91532
|
+
* `power-source.forceRestart` uses it instead of off / wait / on.
|
|
91533
|
+
*/
|
|
91534
|
+
var SwitchOptionsSchema = object({
|
|
91535
|
+
supportsSetState: boolean().default(true),
|
|
91536
|
+
supportsPowerCycle: boolean().default(false)
|
|
91537
|
+
});
|
|
91538
|
+
/** The options of a provider that did not answer `getOptions`: a plain on/off switch. */
|
|
91539
|
+
var SWITCH_DEFAULT_OPTIONS = SwitchOptionsSchema.parse({});
|
|
90150
91540
|
var switchCapability = {
|
|
90151
91541
|
name: "switch",
|
|
90152
91542
|
scope: "device",
|
|
@@ -90174,7 +91564,8 @@ var switchCapability = {
|
|
|
90174
91564
|
field: "on",
|
|
90175
91565
|
value: true
|
|
90176
91566
|
},
|
|
90177
|
-
args: { on: true }
|
|
91567
|
+
args: { on: true },
|
|
91568
|
+
offeredWhen: SWITCH_SETTABLE_GATE
|
|
90178
91569
|
}, {
|
|
90179
91570
|
id: "switch.off",
|
|
90180
91571
|
label: t("Turn off", "Spegni"),
|
|
@@ -90184,9 +91575,16 @@ var switchCapability = {
|
|
|
90184
91575
|
field: "on",
|
|
90185
91576
|
value: false
|
|
90186
91577
|
},
|
|
90187
|
-
args: { on: false }
|
|
91578
|
+
args: { on: false },
|
|
91579
|
+
offeredWhen: SWITCH_SETTABLE_GATE
|
|
90188
91580
|
}]
|
|
90189
91581
|
}),
|
|
91582
|
+
getOptions: optionalMethod(object({ deviceId: number$1() }), SwitchOptionsSchema, { auth: "protected" }),
|
|
91583
|
+
powerCycle: optionalMethod(object({ deviceId: number$1() }), _void(), {
|
|
91584
|
+
kind: "mutation",
|
|
91585
|
+
auth: "protected",
|
|
91586
|
+
notOperatorFacing: "a power cycle is the forced restart of the device the switch powers (power-source), never a step of its own"
|
|
91587
|
+
}),
|
|
90190
91588
|
toggle: optionalMethod(object({ deviceId: number$1() }), _void(), {
|
|
90191
91589
|
kind: "mutation",
|
|
90192
91590
|
auth: "protected",
|
|
@@ -90194,7 +91592,8 @@ var switchCapability = {
|
|
|
90194
91592
|
id: "switch.toggle",
|
|
90195
91593
|
label: t("Toggle", "Commuta"),
|
|
90196
91594
|
phrase: t("Toggle {device}", "Commuta {device}"),
|
|
90197
|
-
icon: "toggle-right"
|
|
91595
|
+
icon: "toggle-right",
|
|
91596
|
+
offeredWhen: SWITCH_SETTABLE_GATE
|
|
90198
91597
|
}]
|
|
90199
91598
|
})
|
|
90200
91599
|
},
|
|
@@ -90216,6 +91615,16 @@ var switchCapability = {
|
|
|
90216
91615
|
* not need to re-query the provider after a setState mutation.
|
|
90217
91616
|
*/
|
|
90218
91617
|
runtimeState: SwitchStatusSchema,
|
|
91618
|
+
composedMethods: {
|
|
91619
|
+
getOptions: {
|
|
91620
|
+
kind: "answer",
|
|
91621
|
+
value: SWITCH_DEFAULT_OPTIONS
|
|
91622
|
+
},
|
|
91623
|
+
powerCycle: {
|
|
91624
|
+
kind: "refuse",
|
|
91625
|
+
reason: "a composed switch has no native power cycle"
|
|
91626
|
+
}
|
|
91627
|
+
},
|
|
90219
91628
|
/**
|
|
90220
91629
|
* Runtime-state durability: **restored** — device state an operator reads as authoritative; 55 devices, transition-driven.
|
|
90221
91630
|
*
|
|
@@ -90389,6 +91798,26 @@ var switchCapability = {
|
|
|
90389
91798
|
"switch.off": { icon: "plug" }
|
|
90390
91799
|
},
|
|
90391
91800
|
state: { on: { icon: "plug-zap" } }
|
|
91801
|
+
},
|
|
91802
|
+
[DeviceRole.PoePort]: {
|
|
91803
|
+
actions: {
|
|
91804
|
+
"switch.on": {
|
|
91805
|
+
label: t("Power on", "Alimenta"),
|
|
91806
|
+
phrase: t("Power on {device}", "Alimenta {device}"),
|
|
91807
|
+
icon: "plug-zap"
|
|
91808
|
+
},
|
|
91809
|
+
"switch.off": {
|
|
91810
|
+
label: t("Power off", "Togli alimentazione"),
|
|
91811
|
+
phrase: t("Power off {device}", "Togli alimentazione a {device}"),
|
|
91812
|
+
icon: "unplug"
|
|
91813
|
+
}
|
|
91814
|
+
},
|
|
91815
|
+
state: { on: {
|
|
91816
|
+
label: t("Powered", "Alimentata"),
|
|
91817
|
+
whenTrue: t("When {device} is powered", "Quando {device} viene alimentata"),
|
|
91818
|
+
whenFalse: t("When {device} loses power", "Quando {device} perde l’alimentazione"),
|
|
91819
|
+
icon: "plug-zap"
|
|
91820
|
+
} }
|
|
90392
91821
|
}
|
|
90393
91822
|
}
|
|
90394
91823
|
}
|
|
@@ -90978,10 +92407,11 @@ method(_void(), SystemInfoSchema), method(_void(), HealthStatusSchema), method(_
|
|
|
90978
92407
|
/**
|
|
90979
92408
|
* tags — the registry of tag STYLES and the one place that renames or removes a
|
|
90980
92409
|
* tag everywhere (D1054). A tag itself lives in the `tags` array of the record it
|
|
90981
|
-
* labels (a core block, a scheduler, a template, an action, a device
|
|
92410
|
+
* labels (a core block, a scheduler, a template, an action, a device, a
|
|
92411
|
+
* notification rule); only its
|
|
90982
92412
|
* colour token and icon are registered here. Provided by the core-blocks builtin,
|
|
90983
|
-
* the one place that knows every owner kind; devices
|
|
90984
|
-
* `deviceManager` over `ctx.api`.
|
|
92413
|
+
* the one place that knows every owner kind; devices and notification rules
|
|
92414
|
+
* are reached through `deviceManager` / `notificationRules` over `ctx.api`.
|
|
90985
92415
|
*
|
|
90986
92416
|
* Tags compare trimmed and case-insensitively. `list` is the union of styled tags
|
|
90987
92417
|
* and tags in use; a tag with no style answers a colour derived from its name and
|
|
@@ -90992,7 +92422,21 @@ var TagUsageCountsSchema = object({
|
|
|
90992
92422
|
schedulers: number$1().int().nonnegative(),
|
|
90993
92423
|
templates: number$1().int().nonnegative(),
|
|
90994
92424
|
actions: number$1().int().nonnegative(),
|
|
90995
|
-
devices: number$1().int().nonnegative()
|
|
92425
|
+
devices: number$1().int().nonnegative(),
|
|
92426
|
+
notificationRules: number$1().int().nonnegative()
|
|
92427
|
+
});
|
|
92428
|
+
/**
|
|
92429
|
+
* The counts `list` answers. An owner that could not be read (a forked addon
|
|
92430
|
+
* that is down, redeploying or not installed) is `null` — unknown, never `0`
|
|
92431
|
+
* (D393) — and `list` still answers with the other owners' tags.
|
|
92432
|
+
*/
|
|
92433
|
+
var TagListCountsSchema = object({
|
|
92434
|
+
coreBlocks: number$1().int().nonnegative().nullable(),
|
|
92435
|
+
schedulers: number$1().int().nonnegative().nullable(),
|
|
92436
|
+
templates: number$1().int().nonnegative().nullable(),
|
|
92437
|
+
actions: number$1().int().nonnegative().nullable(),
|
|
92438
|
+
devices: number$1().int().nonnegative().nullable(),
|
|
92439
|
+
notificationRules: number$1().int().nonnegative().nullable()
|
|
90996
92440
|
});
|
|
90997
92441
|
var TagEntrySchema = object({
|
|
90998
92442
|
name: TagNameSchema,
|
|
@@ -91000,7 +92444,8 @@ var TagEntrySchema = object({
|
|
|
91000
92444
|
icon: IconKeySchema,
|
|
91001
92445
|
/** `false` when the operator never chose a style: colour and icon are the derived defaults. */
|
|
91002
92446
|
styled: boolean(),
|
|
91003
|
-
|
|
92447
|
+
/** Per owner kind; `null` = that owner could not be read on this call. */
|
|
92448
|
+
counts: TagListCountsSchema
|
|
91004
92449
|
});
|
|
91005
92450
|
method(object({}), array(TagEntrySchema), { auth: "protected" }), method(object({
|
|
91006
92451
|
name: TagNameSchema,
|
|
@@ -91541,7 +92986,6 @@ method(object({ kind: TemplateKindSchema.optional() }), array(TemplateRecordSche
|
|
|
91541
92986
|
});
|
|
91542
92987
|
/** Profile-exported FormBuilder schema. Shape is ConfigUISchema at the UI. */
|
|
91543
92988
|
var ProfileSettingsSchemaBridge = unknown().nullable();
|
|
91544
|
-
var ProfileSettingsBagSchema = record$1(string(), unknown());
|
|
91545
92989
|
/**
|
|
91546
92990
|
* A live terminal session hosted by the provider addon. Output and input do
|
|
91547
92991
|
* NOT flow through the capability — they use the addon data plane
|
|
@@ -91560,7 +93004,11 @@ var TerminalSessionInfoSchema = object({
|
|
|
91560
93004
|
cols: number$1().int().positive(),
|
|
91561
93005
|
rows: number$1().int().positive(),
|
|
91562
93006
|
/** ms-epoch the session's pty was spawned. */
|
|
91563
|
-
startedAt: number$1()
|
|
93007
|
+
startedAt: number$1(),
|
|
93008
|
+
/** User id of the admin who opened it; `unattributed` when the caller was not passed. */
|
|
93009
|
+
openedBy: string().optional(),
|
|
93010
|
+
/** ms-epoch of the last pty input or output — what the idle timeout measures. */
|
|
93011
|
+
lastActivityAt: number$1().optional()
|
|
91564
93012
|
});
|
|
91565
93013
|
/**
|
|
91566
93014
|
* A profile the operator may open — a pre-declared, allowlisted program
|
|
@@ -91580,39 +93028,6 @@ var TerminalProfileInfoSchema = object({
|
|
|
91580
93028
|
/** ConfigUISchema for instance knobs, or null when the profile has none. */
|
|
91581
93029
|
settingsSchema: ProfileSettingsSchemaBridge.optional()
|
|
91582
93030
|
});
|
|
91583
|
-
/**
|
|
91584
|
-
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
91585
|
-
* an instance declares a camera.
|
|
91586
|
-
*/
|
|
91587
|
-
var TerminalInstanceInfoSchema = object({
|
|
91588
|
-
instanceId: string(),
|
|
91589
|
-
cameraStableId: string(),
|
|
91590
|
-
nodeId: string(),
|
|
91591
|
-
/**
|
|
91592
|
-
* False while the node the instance is bound to is not in the cluster
|
|
91593
|
-
* topology (forgotten, renamed, re-paired). The instance is kept; the
|
|
91594
|
-
* operator re-points it on the Terminal page.
|
|
91595
|
-
*/
|
|
91596
|
-
nodeInCluster: boolean(),
|
|
91597
|
-
profileId: string(),
|
|
91598
|
-
profileLabel: string(),
|
|
91599
|
-
name: string(),
|
|
91600
|
-
enabled: boolean(),
|
|
91601
|
-
executable: string(),
|
|
91602
|
-
args: array(string()).readonly(),
|
|
91603
|
-
cwd: string(),
|
|
91604
|
-
environment: array(string()).readonly(),
|
|
91605
|
-
profileSettings: ProfileSettingsBagSchema
|
|
91606
|
-
});
|
|
91607
|
-
var TerminalLegacyCameraSchema = object({
|
|
91608
|
-
stableId: string(),
|
|
91609
|
-
nodeId: string(),
|
|
91610
|
-
profileId: string(),
|
|
91611
|
-
profileLabel: string(),
|
|
91612
|
-
name: string(),
|
|
91613
|
-
/** Only legacy monitor cameras can retain their historic stable identity. */
|
|
91614
|
-
adoptable: boolean()
|
|
91615
|
-
});
|
|
91616
93031
|
var TerminalOutputEventSchema = discriminatedUnion("kind", [object({
|
|
91617
93032
|
seq: number$1().int().positive(),
|
|
91618
93033
|
kind: literal("data"),
|
|
@@ -91640,13 +93055,7 @@ var TerminalOutputBatchSchema = object({
|
|
|
91640
93055
|
snapshot: string().optional(),
|
|
91641
93056
|
events: array(TerminalOutputEventSchema).readonly()
|
|
91642
93057
|
});
|
|
91643
|
-
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(
|
|
91644
|
-
stableId: string().min(1),
|
|
91645
|
-
name: string().trim().min(1).max(160).optional()
|
|
91646
|
-
}), TerminalInstanceInfoSchema, {
|
|
91647
|
-
kind: "mutation",
|
|
91648
|
-
auth: "admin"
|
|
91649
|
-
}), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(_void(), ServerShellStatusSchema, { auth: "admin" }), method(object({
|
|
93058
|
+
method(_void(), array(TerminalProfileInfoSchema).readonly(), { auth: "admin" }), method(_void(), array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }), method(_void(), ServerShellStatusSchema, { auth: "admin" }), method(object({
|
|
91650
93059
|
profileId: string(),
|
|
91651
93060
|
cols: number$1().int().positive(),
|
|
91652
93061
|
rows: number$1().int().positive(),
|
|
@@ -94364,6 +95773,427 @@ DeviceType.Camera, method(object({ deviceId: number$1().int().nonnegative() }),
|
|
|
94364
95773
|
deviceId: number$1().int().nonnegative(),
|
|
94365
95774
|
sessionId: string()
|
|
94366
95775
|
}), WebrtcSessionDebugSchema, { kind: "query" });
|
|
95776
|
+
var WorkloadStateSchema = _enum([
|
|
95777
|
+
"running",
|
|
95778
|
+
"paused",
|
|
95779
|
+
"stopped",
|
|
95780
|
+
"starting",
|
|
95781
|
+
"stopping",
|
|
95782
|
+
"crashed"
|
|
95783
|
+
]);
|
|
95784
|
+
/** The five kinds of workload, as roles of the `workload` device type (D1033). */
|
|
95785
|
+
var WORKLOAD_ROLES = [
|
|
95786
|
+
DeviceRole.Vm,
|
|
95787
|
+
DeviceRole.AppContainer,
|
|
95788
|
+
DeviceRole.Lxc,
|
|
95789
|
+
DeviceRole.App,
|
|
95790
|
+
DeviceRole.Host
|
|
95791
|
+
];
|
|
95792
|
+
/**
|
|
95793
|
+
* What the workload uses. Every value is `null` when not reported (D393). A host
|
|
95794
|
+
* fills `load1` and `temperature`; its uptime is `since` while it runs.
|
|
95795
|
+
*/
|
|
95796
|
+
var WorkloadResourcesSchema = object({
|
|
95797
|
+
/** CPU use, percent of the CPUs it may use (0–100). */
|
|
95798
|
+
cpuPercent: number$1().nullable().meta(readingMeta("percentage", { precision: 1 })),
|
|
95799
|
+
memoryUsedBytes: number$1().nullable().meta(readingMeta("information")),
|
|
95800
|
+
/**
|
|
95801
|
+
* Memory use, percent of `memoryLimitBytes`, for a source that reports a share
|
|
95802
|
+
* and not bytes (a Docker container's stats). Absent or `null` = not reported.
|
|
95803
|
+
*/
|
|
95804
|
+
memoryPercent: number$1().nullable().optional().meta(readingMeta("percentage", { precision: 1 })),
|
|
95805
|
+
/** The memory it may use: the limit of a container, the RAM of a VM or host. */
|
|
95806
|
+
memoryLimitBytes: number$1().nullable().meta(readingMeta("information")),
|
|
95807
|
+
vcpus: number$1().nullable().meta(readingMeta("count")),
|
|
95808
|
+
diskUsedBytes: number$1().nullable().meta(readingMeta("information")),
|
|
95809
|
+
diskTotalBytes: number$1().nullable().meta(readingMeta("information")),
|
|
95810
|
+
/** Network received, kbit/s. */
|
|
95811
|
+
netRxKbps: number$1().nullable().meta(readingMeta("bitrate")),
|
|
95812
|
+
/** Network sent, kbit/s. */
|
|
95813
|
+
netTxKbps: number$1().nullable().meta(readingMeta("bitrate")),
|
|
95814
|
+
/** One-minute load average (a host). */
|
|
95815
|
+
load1: number$1().nullable().meta(readingMeta("index", { precision: 2 })),
|
|
95816
|
+
/** CPU / board temperature (a host). */
|
|
95817
|
+
temperature: number$1().nullable().meta(readingMeta("temperature", { precision: 1 }))
|
|
95818
|
+
});
|
|
95819
|
+
var WorkloadPortProtocolSchema = _enum(["tcp", "udp"]);
|
|
95820
|
+
/** One published port: the workload's own port and where the host exposes it. */
|
|
95821
|
+
var WorkloadPortSchema = object({
|
|
95822
|
+
port: number$1().int().meta(readingMeta("none")),
|
|
95823
|
+
/** The host port it is published on; null = not published. */
|
|
95824
|
+
hostPort: number$1().int().nullable().meta(readingMeta("none")),
|
|
95825
|
+
/** The host address it is bound to; null = every address. */
|
|
95826
|
+
hostIp: string().nullable(),
|
|
95827
|
+
protocol: WorkloadPortProtocolSchema
|
|
95828
|
+
});
|
|
95829
|
+
var WorkloadStatusSchema = object({
|
|
95830
|
+
/** null = unknown, never stopped (D393). */
|
|
95831
|
+
state: WorkloadStateSchema.nullable().meta({ label: "State" }),
|
|
95832
|
+
/** Epoch ms the current state began (uptime while running); null when unknown. */
|
|
95833
|
+
since: number$1().nullable().meta(readingMeta("none")),
|
|
95834
|
+
/** The `host` device this runs on, when the provider has adopted it. */
|
|
95835
|
+
hostDeviceId: number$1().int().nullable().meta(readingMeta("device")),
|
|
95836
|
+
/** The image a container runs (`nginx:1.27`). */
|
|
95837
|
+
image: string().nullable(),
|
|
95838
|
+
/** The operating system (a VM, an LXC, a host). */
|
|
95839
|
+
os: string().nullable(),
|
|
95840
|
+
/** The version or firmware it runs. */
|
|
95841
|
+
version: string().nullable(),
|
|
95842
|
+
/** Starts with its host; null when the platform does not say. */
|
|
95843
|
+
autostart: boolean().nullable(),
|
|
95844
|
+
resources: WorkloadResourcesSchema,
|
|
95845
|
+
ports: array(WorkloadPortSchema),
|
|
95846
|
+
/** The addresses it is reachable on (IPs or host names). */
|
|
95847
|
+
addresses: array(string()),
|
|
95848
|
+
/** A newer image / version exists. Installing it stays the `update` cap. */
|
|
95849
|
+
updateAvailable: boolean().nullable(),
|
|
95850
|
+
lastFetchedAt: number$1()
|
|
95851
|
+
});
|
|
95852
|
+
/**
|
|
95853
|
+
* What this device can do, probed by its provider (D14 honesty): a flag is
|
|
95854
|
+
* `true` only when the platform really serves it for THIS device.
|
|
95855
|
+
*/
|
|
95856
|
+
var WorkloadOptionsSchema = object({
|
|
95857
|
+
supportsStart: boolean(),
|
|
95858
|
+
supportsStop: boolean(),
|
|
95859
|
+
supportsRestart: boolean(),
|
|
95860
|
+
/** Pause AND resume. */
|
|
95861
|
+
supportsPause: boolean(),
|
|
95862
|
+
supportsForceStop: boolean(),
|
|
95863
|
+
hasResources: boolean(),
|
|
95864
|
+
hasPorts: boolean(),
|
|
95865
|
+
hasAddresses: boolean(),
|
|
95866
|
+
hasAutostart: boolean(),
|
|
95867
|
+
hasUpdateCheck: boolean()
|
|
95868
|
+
});
|
|
95869
|
+
var WorkloadDeviceInputSchema = object({ deviceId: number$1().int().nonnegative() });
|
|
95870
|
+
var WorkloadTransitionEventDataSchema = object({
|
|
95871
|
+
deviceId: number$1(),
|
|
95872
|
+
state: WorkloadStateSchema,
|
|
95873
|
+
previous: WorkloadStateSchema,
|
|
95874
|
+
since: number$1().nullable()
|
|
95875
|
+
});
|
|
95876
|
+
EventCategory.WorkloadStarted, EventCategory.WorkloadStopped, EventCategory.WorkloadCrashed, EventCategory.WorkloadRecovered;
|
|
95877
|
+
var workloadCapability = {
|
|
95878
|
+
name: "workload",
|
|
95879
|
+
scope: "device",
|
|
95880
|
+
deviceNative: true,
|
|
95881
|
+
mode: "singleton",
|
|
95882
|
+
deviceTypes: [DeviceType.Workload],
|
|
95883
|
+
deviceRoles: { [DeviceType.Workload]: WORKLOAD_ROLES },
|
|
95884
|
+
/**
|
|
95885
|
+
* On / off is the state (#462): stopped or crashed is off, anything else on.
|
|
95886
|
+
* The owner registers `switch` through `registerPowerSwitch`; there is no
|
|
95887
|
+
* second on/off state. A device whose provider serves no start / stop gets no
|
|
95888
|
+
* switch.
|
|
95889
|
+
*/
|
|
95890
|
+
power: {
|
|
95891
|
+
kind: "methods",
|
|
95892
|
+
field: "state",
|
|
95893
|
+
offValues: ["stopped", "crashed"],
|
|
95894
|
+
on: "start",
|
|
95895
|
+
off: "stop"
|
|
95896
|
+
},
|
|
95897
|
+
methods: {
|
|
95898
|
+
start: optionalMethod(WorkloadDeviceInputSchema, _void(), {
|
|
95899
|
+
kind: "mutation",
|
|
95900
|
+
auth: "protected",
|
|
95901
|
+
actions: [{
|
|
95902
|
+
id: "workload.start",
|
|
95903
|
+
label: t("Start", "Avvia"),
|
|
95904
|
+
phrase: t("Start {device}", "Avvia {device}"),
|
|
95905
|
+
icon: "play",
|
|
95906
|
+
effect: {
|
|
95907
|
+
field: "state",
|
|
95908
|
+
value: "running"
|
|
95909
|
+
}
|
|
95910
|
+
}]
|
|
95911
|
+
}),
|
|
95912
|
+
stop: optionalMethod(WorkloadDeviceInputSchema, _void(), {
|
|
95913
|
+
kind: "mutation",
|
|
95914
|
+
auth: "protected",
|
|
95915
|
+
actions: [{
|
|
95916
|
+
id: "workload.stop",
|
|
95917
|
+
label: t("Stop", "Arresta"),
|
|
95918
|
+
phrase: t("Stop {device}", "Arresta {device}"),
|
|
95919
|
+
icon: "square",
|
|
95920
|
+
effect: {
|
|
95921
|
+
field: "state",
|
|
95922
|
+
value: "stopped"
|
|
95923
|
+
}
|
|
95924
|
+
}]
|
|
95925
|
+
}),
|
|
95926
|
+
restart: optionalMethod(WorkloadDeviceInputSchema, _void(), {
|
|
95927
|
+
kind: "mutation",
|
|
95928
|
+
auth: "protected",
|
|
95929
|
+
actions: [{
|
|
95930
|
+
id: "workload.restart",
|
|
95931
|
+
label: t("Restart", "Riavvia"),
|
|
95932
|
+
phrase: t("Restart {device}", "Riavvia {device}"),
|
|
95933
|
+
icon: "rotate-ccw"
|
|
95934
|
+
}]
|
|
95935
|
+
}),
|
|
95936
|
+
pause: optionalMethod(WorkloadDeviceInputSchema, _void(), {
|
|
95937
|
+
kind: "mutation",
|
|
95938
|
+
auth: "protected",
|
|
95939
|
+
actions: [{
|
|
95940
|
+
id: "workload.pause",
|
|
95941
|
+
label: t("Pause", "Metti in pausa"),
|
|
95942
|
+
phrase: t("Pause {device}", "Metti in pausa {device}"),
|
|
95943
|
+
icon: "pause",
|
|
95944
|
+
effect: {
|
|
95945
|
+
field: "state",
|
|
95946
|
+
value: "paused"
|
|
95947
|
+
}
|
|
95948
|
+
}]
|
|
95949
|
+
}),
|
|
95950
|
+
resume: optionalMethod(WorkloadDeviceInputSchema, _void(), {
|
|
95951
|
+
kind: "mutation",
|
|
95952
|
+
auth: "protected",
|
|
95953
|
+
actions: [{
|
|
95954
|
+
id: "workload.resume",
|
|
95955
|
+
label: t("Resume", "Riprendi"),
|
|
95956
|
+
phrase: t("Resume {device}", "Riprendi {device}"),
|
|
95957
|
+
icon: "circle-play",
|
|
95958
|
+
effect: {
|
|
95959
|
+
field: "state",
|
|
95960
|
+
value: "running"
|
|
95961
|
+
}
|
|
95962
|
+
}]
|
|
95963
|
+
}),
|
|
95964
|
+
forceStop: optionalMethod(WorkloadDeviceInputSchema, _void(), {
|
|
95965
|
+
kind: "mutation",
|
|
95966
|
+
auth: "admin",
|
|
95967
|
+
actions: [{
|
|
95968
|
+
id: "workload.forceStop",
|
|
95969
|
+
label: t("Force stop", "Arresto forzato"),
|
|
95970
|
+
phrase: t("Force {device} to stop", "Forza l’arresto di {device}"),
|
|
95971
|
+
icon: "octagon-x",
|
|
95972
|
+
effect: {
|
|
95973
|
+
field: "state",
|
|
95974
|
+
value: "stopped"
|
|
95975
|
+
}
|
|
95976
|
+
}]
|
|
95977
|
+
}),
|
|
95978
|
+
/** What THIS device can do, probed — the UI is derived from it. */
|
|
95979
|
+
getOptions: method(WorkloadDeviceInputSchema, WorkloadOptionsSchema, { auth: "protected" })
|
|
95980
|
+
},
|
|
95981
|
+
events: {
|
|
95982
|
+
onStarted: {
|
|
95983
|
+
data: WorkloadTransitionEventDataSchema,
|
|
95984
|
+
trigger: {
|
|
95985
|
+
category: EventCategory.WorkloadStarted,
|
|
95986
|
+
label: t("Started", "Avviato"),
|
|
95987
|
+
phrase: t("When {device} starts", "Quando {device} si avvia"),
|
|
95988
|
+
icon: "play"
|
|
95989
|
+
}
|
|
95990
|
+
},
|
|
95991
|
+
onStopped: {
|
|
95992
|
+
data: WorkloadTransitionEventDataSchema,
|
|
95993
|
+
trigger: {
|
|
95994
|
+
category: EventCategory.WorkloadStopped,
|
|
95995
|
+
label: t("Stopped", "Arrestato"),
|
|
95996
|
+
phrase: t("When {device} stops", "Quando {device} si arresta"),
|
|
95997
|
+
icon: "square"
|
|
95998
|
+
}
|
|
95999
|
+
},
|
|
96000
|
+
onCrashed: {
|
|
96001
|
+
data: WorkloadTransitionEventDataSchema,
|
|
96002
|
+
trigger: {
|
|
96003
|
+
category: EventCategory.WorkloadCrashed,
|
|
96004
|
+
label: t("Crashed", "Arrestato in modo anomalo"),
|
|
96005
|
+
phrase: t("When {device} stops without being asked", "Quando {device} si arresta senza che sia stato richiesto"),
|
|
96006
|
+
icon: "triangle-alert"
|
|
96007
|
+
}
|
|
96008
|
+
},
|
|
96009
|
+
onRecovered: {
|
|
96010
|
+
data: WorkloadTransitionEventDataSchema,
|
|
96011
|
+
trigger: {
|
|
96012
|
+
category: EventCategory.WorkloadRecovered,
|
|
96013
|
+
label: t("Recovered", "Ripristinato"),
|
|
96014
|
+
phrase: t("When {device} runs again after a crash", "Quando {device} riparte dopo un arresto anomalo"),
|
|
96015
|
+
icon: "heart-pulse"
|
|
96016
|
+
}
|
|
96017
|
+
}
|
|
96018
|
+
},
|
|
96019
|
+
status: {
|
|
96020
|
+
schema: WorkloadStatusSchema,
|
|
96021
|
+
kind: "poll"
|
|
96022
|
+
},
|
|
96023
|
+
runtimeState: WorkloadStatusSchema,
|
|
96024
|
+
/**
|
|
96025
|
+
* Runtime-state durability: **session** — the provider answers on its next
|
|
96026
|
+
* poll; the series are recorded, so a restart that clears the slice loses
|
|
96027
|
+
* nothing a reader needs. The events are judged from the first state seen.
|
|
96028
|
+
*/
|
|
96029
|
+
durability: "session",
|
|
96030
|
+
/**
|
|
96031
|
+
* History (D850): the state as an enum, CPU / memory / network as gauges, so
|
|
96032
|
+
* the charts need no per-metric child device.
|
|
96033
|
+
*/
|
|
96034
|
+
history: {
|
|
96035
|
+
primary: "resources.cpuPercent",
|
|
96036
|
+
priority: 40,
|
|
96037
|
+
fields: {
|
|
96038
|
+
state: { kind: "enum" },
|
|
96039
|
+
"resources.cpuPercent": {
|
|
96040
|
+
kind: "gauge",
|
|
96041
|
+
unit: "%",
|
|
96042
|
+
deadband: 2,
|
|
96043
|
+
displayName: "CPU"
|
|
96044
|
+
},
|
|
96045
|
+
"resources.memoryUsedBytes": {
|
|
96046
|
+
kind: "gauge",
|
|
96047
|
+
unit: "bytes",
|
|
96048
|
+
displayName: "Memory used"
|
|
96049
|
+
},
|
|
96050
|
+
"resources.memoryPercent": {
|
|
96051
|
+
kind: "gauge",
|
|
96052
|
+
unit: "%",
|
|
96053
|
+
deadband: 2,
|
|
96054
|
+
displayName: "Memory"
|
|
96055
|
+
},
|
|
96056
|
+
"resources.netRxKbps": {
|
|
96057
|
+
group: "network",
|
|
96058
|
+
kind: "gauge",
|
|
96059
|
+
unit: "kbps",
|
|
96060
|
+
displayName: "Network received"
|
|
96061
|
+
},
|
|
96062
|
+
"resources.netTxKbps": {
|
|
96063
|
+
group: "network",
|
|
96064
|
+
kind: "gauge",
|
|
96065
|
+
unit: "kbps",
|
|
96066
|
+
displayName: "Network sent"
|
|
96067
|
+
}
|
|
96068
|
+
}
|
|
96069
|
+
},
|
|
96070
|
+
volatileStateFields: ["lastFetchedAt"],
|
|
96071
|
+
vocabulary: {
|
|
96072
|
+
noun: t("Workload", "Carico di lavoro"),
|
|
96073
|
+
order: 2400,
|
|
96074
|
+
state: [
|
|
96075
|
+
{
|
|
96076
|
+
kind: "enum",
|
|
96077
|
+
field: "state",
|
|
96078
|
+
label: t("State", "Stato"),
|
|
96079
|
+
values: [
|
|
96080
|
+
{
|
|
96081
|
+
value: "running",
|
|
96082
|
+
label: t("Running", "In esecuzione"),
|
|
96083
|
+
phrase: t("When {device} is running", "Quando {device} è in esecuzione")
|
|
96084
|
+
},
|
|
96085
|
+
{
|
|
96086
|
+
value: "paused",
|
|
96087
|
+
label: t("Paused", "In pausa")
|
|
96088
|
+
},
|
|
96089
|
+
{
|
|
96090
|
+
value: "stopped",
|
|
96091
|
+
label: t("Stopped", "Arrestato"),
|
|
96092
|
+
phrase: t("When {device} is stopped", "Quando {device} è arrestato")
|
|
96093
|
+
},
|
|
96094
|
+
{
|
|
96095
|
+
value: "starting",
|
|
96096
|
+
label: t("Starting", "In avvio")
|
|
96097
|
+
},
|
|
96098
|
+
{
|
|
96099
|
+
value: "stopping",
|
|
96100
|
+
label: t("Stopping", "In arresto")
|
|
96101
|
+
},
|
|
96102
|
+
{
|
|
96103
|
+
value: "crashed",
|
|
96104
|
+
label: t("Crashed", "Arrestato in modo anomalo"),
|
|
96105
|
+
phrase: t("When {device} has crashed", "Quando {device} è arrestato in modo anomalo")
|
|
96106
|
+
}
|
|
96107
|
+
],
|
|
96108
|
+
icon: "activity"
|
|
96109
|
+
},
|
|
96110
|
+
{
|
|
96111
|
+
kind: "numeric",
|
|
96112
|
+
field: "resources.cpuPercent",
|
|
96113
|
+
quantity: t("the CPU use", "l'uso della CPU"),
|
|
96114
|
+
label: t("CPU", "CPU"),
|
|
96115
|
+
unit: "%",
|
|
96116
|
+
icon: "cpu"
|
|
96117
|
+
},
|
|
96118
|
+
{
|
|
96119
|
+
kind: "numeric",
|
|
96120
|
+
field: "resources.memoryPercent",
|
|
96121
|
+
quantity: t("the memory use", "l'uso della memoria"),
|
|
96122
|
+
label: t("Memory", "Memoria"),
|
|
96123
|
+
unit: "%",
|
|
96124
|
+
icon: "memory-stick"
|
|
96125
|
+
},
|
|
96126
|
+
{
|
|
96127
|
+
kind: "numeric",
|
|
96128
|
+
field: "resources.temperature",
|
|
96129
|
+
quantity: t("the temperature", "la temperatura"),
|
|
96130
|
+
label: t("Temperature", "Temperatura"),
|
|
96131
|
+
unit: "°C",
|
|
96132
|
+
icon: "thermometer"
|
|
96133
|
+
}
|
|
96134
|
+
],
|
|
96135
|
+
overrides: { byRole: {
|
|
96136
|
+
[DeviceRole.Vm]: {
|
|
96137
|
+
actions: { "workload.start": { icon: "monitor" } },
|
|
96138
|
+
state: { state: { icon: "monitor" } }
|
|
96139
|
+
},
|
|
96140
|
+
[DeviceRole.AppContainer]: {
|
|
96141
|
+
actions: { "workload.start": { icon: "container" } },
|
|
96142
|
+
state: { state: { icon: "container" } }
|
|
96143
|
+
},
|
|
96144
|
+
[DeviceRole.Lxc]: {
|
|
96145
|
+
actions: { "workload.start": { icon: "box" } },
|
|
96146
|
+
state: { state: { icon: "box" } }
|
|
96147
|
+
},
|
|
96148
|
+
[DeviceRole.App]: {
|
|
96149
|
+
actions: { "workload.start": { icon: "app-window" } },
|
|
96150
|
+
state: { state: { icon: "app-window" } }
|
|
96151
|
+
},
|
|
96152
|
+
[DeviceRole.Host]: {
|
|
96153
|
+
actions: {
|
|
96154
|
+
"workload.start": {
|
|
96155
|
+
label: t("Power on", "Accendi"),
|
|
96156
|
+
phrase: t("Power on {device}", "Accendi {device}"),
|
|
96157
|
+
icon: "power"
|
|
96158
|
+
},
|
|
96159
|
+
"workload.stop": {
|
|
96160
|
+
label: t("Shut down", "Spegni"),
|
|
96161
|
+
phrase: t("Shut down {device}", "Spegni {device}"),
|
|
96162
|
+
icon: "power-off"
|
|
96163
|
+
},
|
|
96164
|
+
"workload.restart": {
|
|
96165
|
+
label: t("Reboot", "Riavvia"),
|
|
96166
|
+
phrase: t("Reboot {device}", "Riavvia {device}"),
|
|
96167
|
+
icon: "refresh-cw"
|
|
96168
|
+
}
|
|
96169
|
+
},
|
|
96170
|
+
state: { state: { icon: "server" } },
|
|
96171
|
+
events: {
|
|
96172
|
+
onStarted: {
|
|
96173
|
+
label: t("Came online", "Tornato in linea"),
|
|
96174
|
+
phrase: t("When {device} comes online", "Quando {device} torna in linea"),
|
|
96175
|
+
icon: "server"
|
|
96176
|
+
},
|
|
96177
|
+
onStopped: {
|
|
96178
|
+
label: t("Shut down", "Spento"),
|
|
96179
|
+
phrase: t("When {device} shuts down", "Quando {device} si spegne"),
|
|
96180
|
+
icon: "server-off"
|
|
96181
|
+
},
|
|
96182
|
+
onCrashed: {
|
|
96183
|
+
label: t("Went down", "Caduto"),
|
|
96184
|
+
phrase: t("When {device} goes down unexpectedly", "Quando {device} cade inaspettatamente"),
|
|
96185
|
+
icon: "server-crash"
|
|
96186
|
+
},
|
|
96187
|
+
onRecovered: {
|
|
96188
|
+
label: t("Came online", "Tornato in linea"),
|
|
96189
|
+
phrase: t("When {device} comes back online after going down", "Quando {device} torna in linea dopo essere caduto"),
|
|
96190
|
+
icon: "server"
|
|
96191
|
+
}
|
|
96192
|
+
}
|
|
96193
|
+
}
|
|
96194
|
+
} }
|
|
96195
|
+
}
|
|
96196
|
+
};
|
|
94367
96197
|
/**
|
|
94368
96198
|
* Per-zone occupancy aggregation produced by the analytics frame
|
|
94369
96199
|
* processor on every inference result. Covers the full combinatorial
|
|
@@ -95532,6 +97362,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
95532
97362
|
runningState: runningStateCapability,
|
|
95533
97363
|
sceneMonitor: sceneMonitorCapability,
|
|
95534
97364
|
scriptRunner: scriptRunnerCapability,
|
|
97365
|
+
siren: sirenCapability,
|
|
95535
97366
|
smoke: smokeCapability,
|
|
95536
97367
|
streamCatalog: streamCatalogCapability,
|
|
95537
97368
|
streamParams: streamParamsCapability,
|
|
@@ -95547,11 +97378,65 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
95547
97378
|
waterHeater: waterHeaterCapability,
|
|
95548
97379
|
weather: weatherCapability,
|
|
95549
97380
|
weatherStation: weatherStationCapability,
|
|
97381
|
+
workload: workloadCapability,
|
|
95550
97382
|
zoneAnalytics: zoneAnalyticsCapability,
|
|
95551
97383
|
zoneRules: zoneRulesCapability,
|
|
95552
97384
|
zones: zonesCapability
|
|
95553
97385
|
};
|
|
95554
97386
|
/**
|
|
97387
|
+
* Normalise `raw` and declare it: every kind it carries replaces the stored one,
|
|
97388
|
+
* every kind it lacks is removed, except the kinds in `options.unread` (a failed
|
|
97389
|
+
* read keeps what was stored) — pass everything the provider read in one call.
|
|
97390
|
+
*/
|
|
97391
|
+
async function declareDeviceIdentifiers(deps, raw, options = {}) {
|
|
97392
|
+
const { deviceId, logger, writer } = deps;
|
|
97393
|
+
const { unread, ...normaliseOptions } = options;
|
|
97394
|
+
const { identifiers, rejected } = normaliseIdentifiers(raw, normaliseOptions);
|
|
97395
|
+
for (const r of rejected) logger.warn("identifier refused — not declared", {
|
|
97396
|
+
tags: { deviceId },
|
|
97397
|
+
meta: {
|
|
97398
|
+
key: r.key,
|
|
97399
|
+
value: r.value,
|
|
97400
|
+
reason: r.reason
|
|
97401
|
+
}
|
|
97402
|
+
});
|
|
97403
|
+
const unreadKinds = new Set(unread ?? []);
|
|
97404
|
+
if (isEmptyIdentifiers(identifiers) && DEVICE_IDENTIFIER_KEYS.every((key) => unreadKinds.has(key))) {
|
|
97405
|
+
logger.debug("no identifier read — nothing declared", { tags: { deviceId } });
|
|
97406
|
+
return {
|
|
97407
|
+
outcome: "nothing-to-declare",
|
|
97408
|
+
identifiers
|
|
97409
|
+
};
|
|
97410
|
+
}
|
|
97411
|
+
if (writer === void 0) {
|
|
97412
|
+
logger.warn("identifiers not declared — device-manager unreachable", { tags: { deviceId } });
|
|
97413
|
+
return {
|
|
97414
|
+
outcome: "unavailable",
|
|
97415
|
+
identifiers
|
|
97416
|
+
};
|
|
97417
|
+
}
|
|
97418
|
+
try {
|
|
97419
|
+
await writer.mutate({
|
|
97420
|
+
deviceId,
|
|
97421
|
+
identifiers,
|
|
97422
|
+
...unread !== void 0 && unread.length > 0 ? { unread } : {}
|
|
97423
|
+
});
|
|
97424
|
+
return {
|
|
97425
|
+
outcome: "declared",
|
|
97426
|
+
identifiers
|
|
97427
|
+
};
|
|
97428
|
+
} catch (err) {
|
|
97429
|
+
logger.warn("identifiers not declared — setIdentifiers failed", {
|
|
97430
|
+
tags: { deviceId },
|
|
97431
|
+
meta: { error: errMsg(err) }
|
|
97432
|
+
});
|
|
97433
|
+
return {
|
|
97434
|
+
outcome: "failed",
|
|
97435
|
+
identifiers
|
|
97436
|
+
};
|
|
97437
|
+
}
|
|
97438
|
+
}
|
|
97439
|
+
/**
|
|
95555
97440
|
* The edge between two readings, or `null` for no edge.
|
|
95556
97441
|
*
|
|
95557
97442
|
* - `null`/cold → `true` is a START (a fault already open at boot is one);
|
|
@@ -95603,6 +97488,8 @@ var BaseDevice = class {
|
|
|
95603
97488
|
id;
|
|
95604
97489
|
stableId;
|
|
95605
97490
|
type;
|
|
97491
|
+
/** True when another process owns the base slices (`options.deviceStatus: 'external'`). */
|
|
97492
|
+
statusIsExternal;
|
|
95606
97493
|
name;
|
|
95607
97494
|
parentDeviceId;
|
|
95608
97495
|
role;
|
|
@@ -95751,21 +97638,26 @@ var BaseDevice = class {
|
|
|
95751
97638
|
};
|
|
95752
97639
|
this.runtimeState = DeviceRuntimeState.fromInitial(initial, writer, onWriteFailed);
|
|
95753
97640
|
ctx.bindRuntimeState?.(this.runtimeState);
|
|
95754
|
-
|
|
95755
|
-
|
|
95756
|
-
|
|
95757
|
-
|
|
95758
|
-
|
|
95759
|
-
|
|
95760
|
-
|
|
95761
|
-
|
|
95762
|
-
|
|
95763
|
-
|
|
95764
|
-
|
|
95765
|
-
|
|
95766
|
-
|
|
95767
|
-
|
|
95768
|
-
|
|
97641
|
+
this.statusIsExternal = options.deviceStatus === "external";
|
|
97642
|
+
if (!this.statusIsExternal) ctx.registerNativeCap?.(deviceStatusCapability, {});
|
|
97643
|
+
if (!this.statusIsExternal) {
|
|
97644
|
+
const seed = {
|
|
97645
|
+
online: true,
|
|
97646
|
+
lastChangedAt: Date.now()
|
|
97647
|
+
};
|
|
97648
|
+
this.runtimeState.setCapState("device-status", seed);
|
|
97649
|
+
}
|
|
97650
|
+
if (!this.statusIsExternal) {
|
|
97651
|
+
ctx.registerNativeCap?.(featureProbeCapability, {});
|
|
97652
|
+
this.runtimeState.setCapState("feature-probe", {
|
|
97653
|
+
flags: {},
|
|
97654
|
+
deviceType: null,
|
|
97655
|
+
model: null,
|
|
97656
|
+
channelCount: null,
|
|
97657
|
+
lastProbedAt: 0,
|
|
97658
|
+
lastFetchedAt: 0
|
|
97659
|
+
});
|
|
97660
|
+
}
|
|
95769
97661
|
}
|
|
95770
97662
|
deviceActions = /* @__PURE__ */ new Map();
|
|
95771
97663
|
/** Declare a device custom action + its typed handler. Idempotent per name. */
|
|
@@ -95793,7 +97685,7 @@ var BaseDevice = class {
|
|
|
95793
97685
|
* override to gate side effects on the transition.
|
|
95794
97686
|
*/
|
|
95795
97687
|
markOnline(online) {
|
|
95796
|
-
if (this.online === online) return;
|
|
97688
|
+
if (this.statusIsExternal || this.online === online) return;
|
|
95797
97689
|
const next = {
|
|
95798
97690
|
online,
|
|
95799
97691
|
lastChangedAt: Date.now()
|
|
@@ -95863,6 +97755,24 @@ var BaseDevice = class {
|
|
|
95863
97755
|
}));
|
|
95864
97756
|
}
|
|
95865
97757
|
/**
|
|
97758
|
+
* Declare this device's identifiers (D1059): MAC(s), serial, vendor uid,
|
|
97759
|
+
* machine uuid, hostname, IP — what a later step matches across integrations.
|
|
97760
|
+
* Normalises `raw` (`normaliseIdentifiers`), logs every refused value, and
|
|
97761
|
+
* writes the result through `device-manager.setIdentifiers`, which accepts it
|
|
97762
|
+
* only from the provider that owns this device. Each kind it carries replaces
|
|
97763
|
+
* the stored one and each kind it lacks is removed — except the kinds listed in
|
|
97764
|
+
* `options.unread` (reads that FAILED), which keep their stored value. Pass
|
|
97765
|
+
* everything read in one call; a call where every kind is unread writes
|
|
97766
|
+
* nothing. Best-effort: never throws.
|
|
97767
|
+
*/
|
|
97768
|
+
async declareIdentifiers(raw, options) {
|
|
97769
|
+
return declareDeviceIdentifiers({
|
|
97770
|
+
deviceId: this.id,
|
|
97771
|
+
logger: this.ctx.logger,
|
|
97772
|
+
writer: this.ctx.api.deviceManager?.setIdentifiers
|
|
97773
|
+
}, raw, options);
|
|
97774
|
+
}
|
|
97775
|
+
/**
|
|
95866
97776
|
* Re-publish the device's current `features` array to the persisted
|
|
95867
97777
|
* meta blob. Drivers call this after a probe finishes when the live
|
|
95868
97778
|
* `features` getter has gained new flags (e.g. `hasIntercom` flips
|
|
@@ -96067,6 +97977,7 @@ var BaseDevice = class {
|
|
|
96067
97977
|
* `lastProbedAt`) once their probe actually succeeds.
|
|
96068
97978
|
*/
|
|
96069
97979
|
async onProbe() {
|
|
97980
|
+
if (this.statusIsExternal) return;
|
|
96070
97981
|
const base = this.runtimeState.getCapState("feature-probe") ?? {
|
|
96071
97982
|
flags: {},
|
|
96072
97983
|
deviceType: null,
|
|
@@ -96907,7 +98818,7 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
96907
98818
|
}
|
|
96908
98819
|
};
|
|
96909
98820
|
DeviceType.HeatPump;
|
|
96910
|
-
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Camera, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
98821
|
+
DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, DeviceType.Camera, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
96911
98822
|
new Set(Object.values(DeviceType));
|
|
96912
98823
|
/** Parses the raw slice with the cap's own schema; `undefined` when it does not parse. */
|
|
96913
98824
|
function contribution(cap, schema, build) {
|
|
@@ -98963,7 +100874,7 @@ var HEAT_PUMP_FAMILY_CONTRIBUTIONS = { "heat-pump-status": contribution("heat-pu
|
|
|
98963
100874
|
...Object.values(CLIMATE_FAMILY_CONTRIBUTIONS),
|
|
98964
100875
|
...Object.values(HEAT_PUMP_FAMILY_CONTRIBUTIONS)
|
|
98965
100876
|
];
|
|
98966
|
-
DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
100877
|
+
DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
98967
100878
|
/**
|
|
98968
100879
|
* Who looks like what (D1023). One look per {@link DeviceType}, refined by a
|
|
98969
100880
|
* {@link DeviceRole} where the role changes how the device reads (a leak
|
|
@@ -99607,8 +101518,8 @@ lookOf({
|
|
|
99607
101518
|
standby: MUTED
|
|
99608
101519
|
});
|
|
99609
101520
|
DeviceType.Climate;
|
|
99610
|
-
DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
99611
|
-
DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter;
|
|
101521
|
+
DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
101522
|
+
DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.PoePort, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter, DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host;
|
|
99612
101523
|
Object.freeze({
|
|
99613
101524
|
"accessories.getStatus": {
|
|
99614
101525
|
capName: "accessories",
|
|
@@ -101626,6 +103537,13 @@ Object.freeze({
|
|
|
101626
103537
|
access: "delete",
|
|
101627
103538
|
role: "admin"
|
|
101628
103539
|
},
|
|
103540
|
+
"deviceHistory.deleteSeriesRange": {
|
|
103541
|
+
capName: "device-history",
|
|
103542
|
+
capScope: "system",
|
|
103543
|
+
addonId: null,
|
|
103544
|
+
access: "delete",
|
|
103545
|
+
role: "admin"
|
|
103546
|
+
},
|
|
101629
103547
|
"deviceHistory.getDeviceEnabled": {
|
|
101630
103548
|
capName: "device-history",
|
|
101631
103549
|
capScope: "system",
|
|
@@ -102263,6 +104181,13 @@ Object.freeze({
|
|
|
102263
104181
|
access: "create",
|
|
102264
104182
|
role: "admin"
|
|
102265
104183
|
},
|
|
104184
|
+
"deviceManager.setIdentifiers": {
|
|
104185
|
+
capName: "device-manager",
|
|
104186
|
+
capScope: "system",
|
|
104187
|
+
addonId: null,
|
|
104188
|
+
access: "create",
|
|
104189
|
+
role: "admin"
|
|
104190
|
+
},
|
|
102266
104191
|
"deviceManager.setIntegrationId": {
|
|
102267
104192
|
capName: "device-manager",
|
|
102268
104193
|
capScope: "system",
|
|
@@ -105147,6 +107072,13 @@ Object.freeze({
|
|
|
105147
107072
|
access: "view",
|
|
105148
107073
|
role: "admin"
|
|
105149
107074
|
},
|
|
107075
|
+
"notificationRules.listRuleTags": {
|
|
107076
|
+
capName: "notification-rules",
|
|
107077
|
+
capScope: "system",
|
|
107078
|
+
addonId: null,
|
|
107079
|
+
access: "view",
|
|
107080
|
+
role: "admin"
|
|
107081
|
+
},
|
|
105150
107082
|
"notificationRules.listSnoozes": {
|
|
105151
107083
|
capName: "notification-rules",
|
|
105152
107084
|
capScope: "system",
|
|
@@ -105203,6 +107135,13 @@ Object.freeze({
|
|
|
105203
107135
|
access: "create",
|
|
105204
107136
|
role: "admin"
|
|
105205
107137
|
},
|
|
107138
|
+
"notificationRules.setRuleTags": {
|
|
107139
|
+
capName: "notification-rules",
|
|
107140
|
+
capScope: "system",
|
|
107141
|
+
addonId: null,
|
|
107142
|
+
access: "create",
|
|
107143
|
+
role: "admin"
|
|
107144
|
+
},
|
|
105206
107145
|
"notificationRules.testRule": {
|
|
105207
107146
|
capName: "notification-rules",
|
|
105208
107147
|
capScope: "system",
|
|
@@ -106442,6 +108381,13 @@ Object.freeze({
|
|
|
106442
108381
|
access: "view",
|
|
106443
108382
|
role: "admin"
|
|
106444
108383
|
},
|
|
108384
|
+
"pipelineOrchestrator.getHealthDigest": {
|
|
108385
|
+
capName: "pipeline-orchestrator",
|
|
108386
|
+
capScope: "system",
|
|
108387
|
+
addonId: null,
|
|
108388
|
+
access: "view",
|
|
108389
|
+
role: "admin"
|
|
108390
|
+
},
|
|
106445
108391
|
"pipelineOrchestrator.getIngestOwner": {
|
|
106446
108392
|
capName: "pipeline-orchestrator",
|
|
106447
108393
|
capScope: "system",
|
|
@@ -108157,6 +110103,41 @@ Object.freeze({
|
|
|
108157
110103
|
access: "create",
|
|
108158
110104
|
role: "admin"
|
|
108159
110105
|
},
|
|
110106
|
+
"siren.getOptions": {
|
|
110107
|
+
capName: "siren",
|
|
110108
|
+
capScope: "device",
|
|
110109
|
+
addonId: null,
|
|
110110
|
+
access: "view",
|
|
110111
|
+
role: "viewer"
|
|
110112
|
+
},
|
|
110113
|
+
"siren.getPlayChoices": {
|
|
110114
|
+
capName: "siren",
|
|
110115
|
+
capScope: "device",
|
|
110116
|
+
addonId: null,
|
|
110117
|
+
access: "view",
|
|
110118
|
+
role: "viewer"
|
|
110119
|
+
},
|
|
110120
|
+
"siren.getStatus": {
|
|
110121
|
+
capName: "siren",
|
|
110122
|
+
capScope: "device",
|
|
110123
|
+
addonId: null,
|
|
110124
|
+
access: "view",
|
|
110125
|
+
role: "viewer"
|
|
110126
|
+
},
|
|
110127
|
+
"siren.stop": {
|
|
110128
|
+
capName: "siren",
|
|
110129
|
+
capScope: "device",
|
|
110130
|
+
addonId: null,
|
|
110131
|
+
access: "create",
|
|
110132
|
+
role: "viewer"
|
|
110133
|
+
},
|
|
110134
|
+
"siren.trigger": {
|
|
110135
|
+
capName: "siren",
|
|
110136
|
+
capScope: "device",
|
|
110137
|
+
addonId: null,
|
|
110138
|
+
access: "create",
|
|
110139
|
+
role: "viewer"
|
|
110140
|
+
},
|
|
108160
110141
|
"smoke.getStatus": {
|
|
108161
110142
|
capName: "smoke",
|
|
108162
110143
|
capScope: "device",
|
|
@@ -108948,6 +110929,13 @@ Object.freeze({
|
|
|
108948
110929
|
access: "view",
|
|
108949
110930
|
role: "viewer"
|
|
108950
110931
|
},
|
|
110932
|
+
"switch.getOptions": {
|
|
110933
|
+
capName: "switch",
|
|
110934
|
+
capScope: "device",
|
|
110935
|
+
addonId: null,
|
|
110936
|
+
access: "view",
|
|
110937
|
+
role: "viewer"
|
|
110938
|
+
},
|
|
108951
110939
|
"switch.getStatus": {
|
|
108952
110940
|
capName: "switch",
|
|
108953
110941
|
capScope: "device",
|
|
@@ -108955,6 +110943,13 @@ Object.freeze({
|
|
|
108955
110943
|
access: "view",
|
|
108956
110944
|
role: "viewer"
|
|
108957
110945
|
},
|
|
110946
|
+
"switch.powerCycle": {
|
|
110947
|
+
capName: "switch",
|
|
110948
|
+
capScope: "device",
|
|
110949
|
+
addonId: null,
|
|
110950
|
+
access: "create",
|
|
110951
|
+
role: "viewer"
|
|
110952
|
+
},
|
|
108958
110953
|
"switch.setState": {
|
|
108959
110954
|
capName: "switch",
|
|
108960
110955
|
capScope: "device",
|
|
@@ -109158,13 +111153,6 @@ Object.freeze({
|
|
|
109158
111153
|
access: "create",
|
|
109159
111154
|
role: "admin"
|
|
109160
111155
|
},
|
|
109161
|
-
"terminalSession.adoptLegacyMonitor": {
|
|
109162
|
-
capName: "terminal-session",
|
|
109163
|
-
capScope: "system",
|
|
109164
|
-
addonId: null,
|
|
109165
|
-
access: "create",
|
|
109166
|
-
role: "admin"
|
|
109167
|
-
},
|
|
109168
111156
|
"terminalSession.close": {
|
|
109169
111157
|
capName: "terminal-session",
|
|
109170
111158
|
capScope: "system",
|
|
@@ -109172,13 +111160,6 @@ Object.freeze({
|
|
|
109172
111160
|
access: "create",
|
|
109173
111161
|
role: "admin"
|
|
109174
111162
|
},
|
|
109175
|
-
"terminalSession.listLegacyCameras": {
|
|
109176
|
-
capName: "terminal-session",
|
|
109177
|
-
capScope: "system",
|
|
109178
|
-
addonId: null,
|
|
109179
|
-
access: "view",
|
|
109180
|
-
role: "admin"
|
|
109181
|
-
},
|
|
109182
111163
|
"terminalSession.listProfiles": {
|
|
109183
111164
|
capName: "terminal-session",
|
|
109184
111165
|
capScope: "system",
|
|
@@ -110040,6 +112021,62 @@ Object.freeze({
|
|
|
110040
112021
|
access: "view",
|
|
110041
112022
|
role: "viewer"
|
|
110042
112023
|
},
|
|
112024
|
+
"workload.forceStop": {
|
|
112025
|
+
capName: "workload",
|
|
112026
|
+
capScope: "device",
|
|
112027
|
+
addonId: null,
|
|
112028
|
+
access: "create",
|
|
112029
|
+
role: "admin"
|
|
112030
|
+
},
|
|
112031
|
+
"workload.getOptions": {
|
|
112032
|
+
capName: "workload",
|
|
112033
|
+
capScope: "device",
|
|
112034
|
+
addonId: null,
|
|
112035
|
+
access: "view",
|
|
112036
|
+
role: "viewer"
|
|
112037
|
+
},
|
|
112038
|
+
"workload.getStatus": {
|
|
112039
|
+
capName: "workload",
|
|
112040
|
+
capScope: "device",
|
|
112041
|
+
addonId: null,
|
|
112042
|
+
access: "view",
|
|
112043
|
+
role: "viewer"
|
|
112044
|
+
},
|
|
112045
|
+
"workload.pause": {
|
|
112046
|
+
capName: "workload",
|
|
112047
|
+
capScope: "device",
|
|
112048
|
+
addonId: null,
|
|
112049
|
+
access: "create",
|
|
112050
|
+
role: "viewer"
|
|
112051
|
+
},
|
|
112052
|
+
"workload.restart": {
|
|
112053
|
+
capName: "workload",
|
|
112054
|
+
capScope: "device",
|
|
112055
|
+
addonId: null,
|
|
112056
|
+
access: "create",
|
|
112057
|
+
role: "viewer"
|
|
112058
|
+
},
|
|
112059
|
+
"workload.resume": {
|
|
112060
|
+
capName: "workload",
|
|
112061
|
+
capScope: "device",
|
|
112062
|
+
addonId: null,
|
|
112063
|
+
access: "create",
|
|
112064
|
+
role: "viewer"
|
|
112065
|
+
},
|
|
112066
|
+
"workload.start": {
|
|
112067
|
+
capName: "workload",
|
|
112068
|
+
capScope: "device",
|
|
112069
|
+
addonId: null,
|
|
112070
|
+
access: "create",
|
|
112071
|
+
role: "viewer"
|
|
112072
|
+
},
|
|
112073
|
+
"workload.stop": {
|
|
112074
|
+
capName: "workload",
|
|
112075
|
+
capScope: "device",
|
|
112076
|
+
addonId: null,
|
|
112077
|
+
access: "create",
|
|
112078
|
+
role: "viewer"
|
|
112079
|
+
},
|
|
110043
112080
|
"zoneAnalytics.getCameraHistory": {
|
|
110044
112081
|
capName: "zone-analytics",
|
|
110045
112082
|
capScope: "device",
|
|
@@ -110176,8 +112213,8 @@ function offered(received) {
|
|
|
110176
112213
|
};
|
|
110177
112214
|
}
|
|
110178
112215
|
offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
|
|
110179
|
-
DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
110180
|
-
DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter;
|
|
112216
|
+
DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Workload, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
|
|
112217
|
+
DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.PoePort, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter, DeviceRole.Vm, DeviceRole.AppContainer, DeviceRole.Lxc, DeviceRole.App, DeviceRole.Host;
|
|
110181
112218
|
new Set(Object.values(DeviceType));
|
|
110182
112219
|
new Set(Object.values(DeviceRole));
|
|
110183
112220
|
var PowerSwitchRefusedError = class extends Error {
|
|
@@ -110808,6 +112845,11 @@ Object.freeze({
|
|
|
110808
112845
|
form: "single",
|
|
110809
112846
|
optional: false
|
|
110810
112847
|
}],
|
|
112848
|
+
"deviceHistory.deleteSeriesRange": [{
|
|
112849
|
+
name: "deviceId",
|
|
112850
|
+
form: "single",
|
|
112851
|
+
optional: false
|
|
112852
|
+
}],
|
|
110811
112853
|
"deviceHistory.getDeviceEnabled": [{
|
|
110812
112854
|
name: "deviceId",
|
|
110813
112855
|
form: "single",
|
|
@@ -111017,6 +113059,11 @@ Object.freeze({
|
|
|
111017
113059
|
form: "single",
|
|
111018
113060
|
optional: false
|
|
111019
113061
|
}],
|
|
113062
|
+
"deviceManager.setIdentifiers": [{
|
|
113063
|
+
name: "deviceId",
|
|
113064
|
+
form: "single",
|
|
113065
|
+
optional: false
|
|
113066
|
+
}],
|
|
111020
113067
|
"deviceManager.setIntegrationId": [{
|
|
111021
113068
|
name: "deviceId",
|
|
111022
113069
|
form: "single",
|
|
@@ -113006,6 +115053,31 @@ Object.freeze({
|
|
|
113006
115053
|
form: "single",
|
|
113007
115054
|
optional: false
|
|
113008
115055
|
}],
|
|
115056
|
+
"siren.getOptions": [{
|
|
115057
|
+
name: "deviceId",
|
|
115058
|
+
form: "single",
|
|
115059
|
+
optional: false
|
|
115060
|
+
}],
|
|
115061
|
+
"siren.getPlayChoices": [{
|
|
115062
|
+
name: "deviceId",
|
|
115063
|
+
form: "single",
|
|
115064
|
+
optional: false
|
|
115065
|
+
}],
|
|
115066
|
+
"siren.getStatus": [{
|
|
115067
|
+
name: "deviceId",
|
|
115068
|
+
form: "single",
|
|
115069
|
+
optional: false
|
|
115070
|
+
}],
|
|
115071
|
+
"siren.stop": [{
|
|
115072
|
+
name: "deviceId",
|
|
115073
|
+
form: "single",
|
|
115074
|
+
optional: false
|
|
115075
|
+
}],
|
|
115076
|
+
"siren.trigger": [{
|
|
115077
|
+
name: "deviceId",
|
|
115078
|
+
form: "single",
|
|
115079
|
+
optional: false
|
|
115080
|
+
}],
|
|
113009
115081
|
"smoke.getStatus": [{
|
|
113010
115082
|
name: "deviceId",
|
|
113011
115083
|
form: "single",
|
|
@@ -113173,11 +115245,21 @@ Object.freeze({
|
|
|
113173
115245
|
form: "single",
|
|
113174
115246
|
optional: false
|
|
113175
115247
|
}],
|
|
115248
|
+
"switch.getOptions": [{
|
|
115249
|
+
name: "deviceId",
|
|
115250
|
+
form: "single",
|
|
115251
|
+
optional: false
|
|
115252
|
+
}],
|
|
113176
115253
|
"switch.getStatus": [{
|
|
113177
115254
|
name: "deviceId",
|
|
113178
115255
|
form: "single",
|
|
113179
115256
|
optional: false
|
|
113180
115257
|
}],
|
|
115258
|
+
"switch.powerCycle": [{
|
|
115259
|
+
name: "deviceId",
|
|
115260
|
+
form: "single",
|
|
115261
|
+
optional: false
|
|
115262
|
+
}],
|
|
113181
115263
|
"switch.setState": [{
|
|
113182
115264
|
name: "deviceId",
|
|
113183
115265
|
form: "single",
|
|
@@ -113418,6 +115500,46 @@ Object.freeze({
|
|
|
113418
115500
|
form: "single",
|
|
113419
115501
|
optional: false
|
|
113420
115502
|
}],
|
|
115503
|
+
"workload.forceStop": [{
|
|
115504
|
+
name: "deviceId",
|
|
115505
|
+
form: "single",
|
|
115506
|
+
optional: false
|
|
115507
|
+
}],
|
|
115508
|
+
"workload.getOptions": [{
|
|
115509
|
+
name: "deviceId",
|
|
115510
|
+
form: "single",
|
|
115511
|
+
optional: false
|
|
115512
|
+
}],
|
|
115513
|
+
"workload.getStatus": [{
|
|
115514
|
+
name: "deviceId",
|
|
115515
|
+
form: "single",
|
|
115516
|
+
optional: false
|
|
115517
|
+
}],
|
|
115518
|
+
"workload.pause": [{
|
|
115519
|
+
name: "deviceId",
|
|
115520
|
+
form: "single",
|
|
115521
|
+
optional: false
|
|
115522
|
+
}],
|
|
115523
|
+
"workload.restart": [{
|
|
115524
|
+
name: "deviceId",
|
|
115525
|
+
form: "single",
|
|
115526
|
+
optional: false
|
|
115527
|
+
}],
|
|
115528
|
+
"workload.resume": [{
|
|
115529
|
+
name: "deviceId",
|
|
115530
|
+
form: "single",
|
|
115531
|
+
optional: false
|
|
115532
|
+
}],
|
|
115533
|
+
"workload.start": [{
|
|
115534
|
+
name: "deviceId",
|
|
115535
|
+
form: "single",
|
|
115536
|
+
optional: false
|
|
115537
|
+
}],
|
|
115538
|
+
"workload.stop": [{
|
|
115539
|
+
name: "deviceId",
|
|
115540
|
+
form: "single",
|
|
115541
|
+
optional: false
|
|
115542
|
+
}],
|
|
113421
115543
|
"zoneAnalytics.getCameraHistory": [{
|
|
113422
115544
|
name: "deviceId",
|
|
113423
115545
|
form: "single",
|
|
@@ -114634,6 +116756,8 @@ var TimelapseRuleInputSchema = object({
|
|
|
114634
116756
|
/** Canonical notification priority ordinal (1..5); per-target overridable. */
|
|
114635
116757
|
priority: PriorityField.default(3),
|
|
114636
116758
|
/** Per-target settings keyed by target id (D1032) — absent = every target follows the rule. */
|
|
116759
|
+
/** Operator labels (D1054) — optional and NEVER defaulted: an absent key leaves the stored tags alone; `[]` clears them. Admin-only. */
|
|
116760
|
+
tags: TagsFieldSchema.optional(),
|
|
114637
116761
|
targetOverrides: NcTargetOverridesSchema.optional()
|
|
114638
116762
|
});
|
|
114639
116763
|
object({
|
|
@@ -114652,6 +116776,8 @@ object({
|
|
|
114652
116776
|
reportClasses: ReportClassesField.optional(),
|
|
114653
116777
|
priority: PriorityField.optional(),
|
|
114654
116778
|
/** Per-target settings keyed by target id (D1032) — absent = every target follows the rule. */
|
|
116779
|
+
/** Absent = keep the stored tags; `[]` clears them (D1054). Never defaulted. */
|
|
116780
|
+
tags: TagsFieldSchema.optional(),
|
|
114655
116781
|
targetOverrides: NcTargetOverridesSchema.optional()
|
|
114656
116782
|
});
|
|
114657
116783
|
TimelapseRuleInputSchema.extend({
|
|
@@ -134111,6 +136237,25 @@ var UnsupportedError = class extends BaseHomematicError {};
|
|
|
134111
136237
|
var ValidationError = class extends BaseHomematicError {};
|
|
134112
136238
|
var NoConnectionError = class extends BaseHomematicError {};
|
|
134113
136239
|
var CircuitBreakerOpenError = class extends BaseHomematicError {};
|
|
136240
|
+
var LoginBackoffError = class extends BaseHomematicError {
|
|
136241
|
+
/** When the next real login attempt may go out (epoch ms). */
|
|
136242
|
+
retryAt;
|
|
136243
|
+
/** Consecutive failed logins so far. */
|
|
136244
|
+
failures;
|
|
136245
|
+
constructor(retryAt, failures) {
|
|
136246
|
+
super(`login backing off after ${failures} consecutive failure(s); next attempt at ${new Date(retryAt).toISOString()}`);
|
|
136247
|
+
this.retryAt = retryAt;
|
|
136248
|
+
this.failures = failures;
|
|
136249
|
+
}
|
|
136250
|
+
};
|
|
136251
|
+
var BackendUnavailableError = class extends BaseHomematicError {
|
|
136252
|
+
/** The HTTP status code the CCU answered. */
|
|
136253
|
+
status;
|
|
136254
|
+
constructor(status, message) {
|
|
136255
|
+
super(message);
|
|
136256
|
+
this.status = status;
|
|
136257
|
+
}
|
|
136258
|
+
};
|
|
134114
136259
|
var AuthFailureError = class extends BaseHomematicError {};
|
|
134115
136260
|
var InternalBackendError = class extends BaseHomematicError {};
|
|
134116
136261
|
var CommandSupersededError = class extends BaseHomematicError {};
|
|
@@ -135122,8 +137267,22 @@ var JsonRpcMethod = {
|
|
|
135122
137267
|
SESSION_RENEW: "Session.renew",
|
|
135123
137268
|
SYSTEM_LIST_METHODS: "system.listMethods"
|
|
135124
137269
|
};
|
|
135125
|
-
|
|
137270
|
+
var SESSION_BYPASS_METHODS = /* @__PURE__ */ new Set([
|
|
137271
|
+
JsonRpcMethod.SESSION_LOGIN,
|
|
137272
|
+
JsonRpcMethod.SESSION_LOGOUT,
|
|
137273
|
+
JsonRpcMethod.SESSION_RENEW
|
|
137274
|
+
]);
|
|
135126
137275
|
var DEFAULT_MAX_CONCURRENT = 3;
|
|
137276
|
+
var DEFAULT_RETRY_DELAYS_MS = [
|
|
137277
|
+
500,
|
|
137278
|
+
1e3,
|
|
137279
|
+
2e3
|
|
137280
|
+
];
|
|
137281
|
+
function delay(ms) {
|
|
137282
|
+
return new Promise((resolve) => {
|
|
137283
|
+
setTimeout(resolve, ms);
|
|
137284
|
+
});
|
|
137285
|
+
}
|
|
135127
137286
|
function stringifyParams(params) {
|
|
135128
137287
|
const out = {};
|
|
135129
137288
|
for (const [key, value] of Object.entries(params)) if (value !== null && typeof value === "object") out[key] = JSON.stringify(value);
|
|
@@ -135154,11 +137313,13 @@ var JsonRpcClient = class {
|
|
|
135154
137313
|
timeoutMs;
|
|
135155
137314
|
dispatcher;
|
|
135156
137315
|
semaphore;
|
|
137316
|
+
retryDelaysMs;
|
|
135157
137317
|
constructor(options) {
|
|
135158
137318
|
const base = options.url.replace(/\/+$/, "");
|
|
135159
137319
|
this.endpoint = `${base}${JSON_RPC_PATH$2}`;
|
|
135160
137320
|
this.timeoutMs = options.timeoutMs ?? TIMEOUTS.rpc;
|
|
135161
137321
|
this.semaphore = new Semaphore(options.maxConcurrent ?? DEFAULT_MAX_CONCURRENT);
|
|
137322
|
+
this.retryDelaysMs = options.retryDelaysMs ?? DEFAULT_RETRY_DELAYS_MS;
|
|
135162
137323
|
if (options.tls?.rejectUnauthorized === false) this.dispatcher = new import_undici.Agent({ connect: { rejectUnauthorized: false } });
|
|
135163
137324
|
else this.dispatcher = void 0;
|
|
135164
137325
|
}
|
|
@@ -135176,6 +137337,16 @@ var JsonRpcClient = class {
|
|
|
135176
137337
|
id: 0
|
|
135177
137338
|
};
|
|
135178
137339
|
const body = Buffer.from(JSON.stringify(envelope), "utf-8");
|
|
137340
|
+
const delays = SESSION_BYPASS_METHODS.has(method) ? [] : this.retryDelaysMs;
|
|
137341
|
+
for (let attempt = 0;; attempt += 1) try {
|
|
137342
|
+
return await this.sendGuarded(body);
|
|
137343
|
+
} catch (err) {
|
|
137344
|
+
const wait = delays[attempt];
|
|
137345
|
+
if (!(err instanceof BackendUnavailableError) || wait === void 0) throw err;
|
|
137346
|
+
await delay(wait);
|
|
137347
|
+
}
|
|
137348
|
+
}
|
|
137349
|
+
async sendGuarded(body) {
|
|
135179
137350
|
await this.semaphore.acquire();
|
|
135180
137351
|
try {
|
|
135181
137352
|
return await this.send(body);
|
|
@@ -135187,6 +137358,7 @@ var JsonRpcClient = class {
|
|
|
135187
137358
|
const controller = new AbortController();
|
|
135188
137359
|
const timer = setTimeout(() => controller.abort(), this.timeoutMs);
|
|
135189
137360
|
let raw;
|
|
137361
|
+
let status;
|
|
135190
137362
|
try {
|
|
135191
137363
|
const init = {
|
|
135192
137364
|
method: "POST",
|
|
@@ -135198,13 +137370,16 @@ var JsonRpcClient = class {
|
|
|
135198
137370
|
signal: controller.signal
|
|
135199
137371
|
};
|
|
135200
137372
|
if (this.dispatcher) init.dispatcher = this.dispatcher;
|
|
135201
|
-
const
|
|
137373
|
+
const response = await (0, import_undici.fetch)(this.endpoint, init);
|
|
137374
|
+
status = response.status;
|
|
137375
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
135202
137376
|
raw = Buffer.from(arrayBuffer);
|
|
135203
137377
|
} catch (err) {
|
|
135204
137378
|
throw mapTransportError(err);
|
|
135205
137379
|
} finally {
|
|
135206
137380
|
clearTimeout(timer);
|
|
135207
137381
|
}
|
|
137382
|
+
if (status >= 500) throw new BackendUnavailableError(status, `JSON-RPC endpoint answered HTTP ${status}`);
|
|
135208
137383
|
if (raw.length === 0) throw new ClientError("JSON-RPC response had an empty body");
|
|
135209
137384
|
let parsed;
|
|
135210
137385
|
try {
|
|
@@ -135222,14 +137397,8 @@ var JsonRpcClient = class {
|
|
|
135222
137397
|
};
|
|
135223
137398
|
var DEFAULT_SESSION_AGE_SECONDS = 90;
|
|
135224
137399
|
var INITIAL_BACKOFF_MS = 1e3;
|
|
135225
|
-
var MAX_BACKOFF_MS =
|
|
137400
|
+
var MAX_BACKOFF_MS = 3e5;
|
|
135226
137401
|
var BACKOFF_FACTOR = 2;
|
|
135227
|
-
var MAX_CONSECUTIVE_FAILURES = 10;
|
|
135228
|
-
function delay(ms) {
|
|
135229
|
-
return new Promise((resolve) => {
|
|
135230
|
-
setTimeout(resolve, ms);
|
|
135231
|
-
});
|
|
135232
|
-
}
|
|
135233
137402
|
var SessionManager = class {
|
|
135234
137403
|
client;
|
|
135235
137404
|
username;
|
|
@@ -135239,6 +137408,9 @@ var SessionManager = class {
|
|
|
135239
137408
|
currentSessionId;
|
|
135240
137409
|
lastRefresh = 0;
|
|
135241
137410
|
consecutiveFailures = 0;
|
|
137411
|
+
nextAttemptAt = 0;
|
|
137412
|
+
inFlightLogin;
|
|
137413
|
+
inFlightEnsure;
|
|
135242
137414
|
constructor(options) {
|
|
135243
137415
|
this.client = options.client;
|
|
135244
137416
|
this.username = options.username;
|
|
@@ -135252,65 +137424,127 @@ var SessionManager = class {
|
|
|
135252
137424
|
}
|
|
135253
137425
|
/**
|
|
135254
137426
|
* Log in with username/password (no session id), store the resulting session
|
|
135255
|
-
* id, and return it.
|
|
135256
|
-
*
|
|
135257
|
-
*
|
|
135258
|
-
|
|
135259
|
-
|
|
135260
|
-
|
|
135261
|
-
if (this.consecutiveFailures
|
|
135262
|
-
|
|
135263
|
-
|
|
135264
|
-
|
|
135265
|
-
|
|
135266
|
-
|
|
135267
|
-
|
|
135268
|
-
|
|
135269
|
-
|
|
135270
|
-
|
|
135271
|
-
|
|
135272
|
-
|
|
135273
|
-
|
|
135274
|
-
|
|
135275
|
-
|
|
135276
|
-
}
|
|
137427
|
+
* id, and return it. Inside an open backoff window it throws
|
|
137428
|
+
* {@link LoginBackoffError} without contacting the CCU. Concurrent calls
|
|
137429
|
+
* share one request.
|
|
137430
|
+
*/
|
|
137431
|
+
login() {
|
|
137432
|
+
if (this.inFlightLogin !== void 0) return this.inFlightLogin;
|
|
137433
|
+
if (this.consecutiveFailures > 0 && this.now() < this.nextAttemptAt) return Promise.reject(new LoginBackoffError(this.nextAttemptAt, this.consecutiveFailures));
|
|
137434
|
+
const attempt = this.sendLogin().finally(() => {
|
|
137435
|
+
this.inFlightLogin = void 0;
|
|
137436
|
+
});
|
|
137437
|
+
this.inFlightLogin = attempt;
|
|
137438
|
+
return attempt;
|
|
137439
|
+
}
|
|
137440
|
+
/** Close the backoff window: the next login goes out at once (the CCU answered again). */
|
|
137441
|
+
resetBackoff() {
|
|
137442
|
+
this.consecutiveFailures = 0;
|
|
137443
|
+
this.nextAttemptAt = 0;
|
|
137444
|
+
}
|
|
137445
|
+
/** Force a renew on the next {@link ensureSession} (the CCU may have restarted). */
|
|
137446
|
+
markStale() {
|
|
137447
|
+
this.lastRefresh = Number.NEGATIVE_INFINITY;
|
|
135277
137448
|
}
|
|
135278
137449
|
/**
|
|
135279
137450
|
* Renew the current session if it is older than the session-age window. If it
|
|
135280
|
-
* was refreshed recently this is a no-op.
|
|
135281
|
-
*
|
|
137451
|
+
* was refreshed recently this is a no-op. A renew that does not answer `true`
|
|
137452
|
+
* or is refused drops the session and logs in again; a renew that fails for
|
|
137453
|
+
* another reason (CCU unreachable) drops the session and rethrows, so the
|
|
137454
|
+
* next call logs in instead of reusing an id the CCU may have forgotten.
|
|
135282
137455
|
*/
|
|
135283
137456
|
async renew() {
|
|
135284
|
-
|
|
137457
|
+
const id = this.currentSessionId;
|
|
137458
|
+
if (id === void 0) {
|
|
135285
137459
|
await this.login();
|
|
135286
137460
|
return;
|
|
135287
137461
|
}
|
|
135288
137462
|
if (this.now() - this.lastRefresh < this.sessionAgeMs) return;
|
|
137463
|
+
let result;
|
|
135289
137464
|
try {
|
|
135290
|
-
|
|
137465
|
+
result = await this.client.post(JsonRpcMethod.SESSION_RENEW, void 0, { sessionId: id });
|
|
135291
137466
|
} catch (err) {
|
|
137467
|
+
this.dropSession(id);
|
|
135292
137468
|
if (err instanceof AuthFailureError) {
|
|
135293
|
-
await this.
|
|
137469
|
+
await this.client.post(JsonRpcMethod.SESSION_LOGOUT, void 0, { sessionId: id }).catch(() => void 0);
|
|
135294
137470
|
await this.login();
|
|
135295
137471
|
return;
|
|
135296
137472
|
}
|
|
135297
137473
|
throw err;
|
|
135298
137474
|
}
|
|
137475
|
+
if (result === true) {
|
|
137476
|
+
this.lastRefresh = this.now();
|
|
137477
|
+
return;
|
|
137478
|
+
}
|
|
137479
|
+
this.dropSession(id);
|
|
137480
|
+
await this.login();
|
|
135299
137481
|
}
|
|
135300
|
-
/**
|
|
137482
|
+
/**
|
|
137483
|
+
* Log out the current session (best-effort) and clear it. No-op if none. A
|
|
137484
|
+
* login still in flight is awaited first, so its session is logged out too.
|
|
137485
|
+
*/
|
|
135301
137486
|
async logout() {
|
|
137487
|
+
if (this.inFlightLogin !== void 0) await this.inFlightLogin.catch(() => void 0);
|
|
135302
137488
|
const id = this.currentSessionId;
|
|
135303
137489
|
if (id === void 0) return;
|
|
135304
137490
|
this.currentSessionId = void 0;
|
|
135305
137491
|
await this.client.post(JsonRpcMethod.SESSION_LOGOUT, void 0, { sessionId: id });
|
|
135306
137492
|
}
|
|
135307
|
-
/** Ensure a usable session exists: login if none, else renew. Returns the id. */
|
|
135308
|
-
|
|
137493
|
+
/** Ensure a usable session exists: login if none, else renew. Returns the id. Concurrent calls share one pass. */
|
|
137494
|
+
ensureSession() {
|
|
137495
|
+
if (this.inFlightEnsure !== void 0) return this.inFlightEnsure;
|
|
137496
|
+
const pass = this.runEnsure().finally(() => {
|
|
137497
|
+
this.inFlightEnsure = void 0;
|
|
137498
|
+
});
|
|
137499
|
+
this.inFlightEnsure = pass;
|
|
137500
|
+
return pass;
|
|
137501
|
+
}
|
|
137502
|
+
/**
|
|
137503
|
+
* A client that sends through this session: a call carrying a session id that
|
|
137504
|
+
* the CCU refuses as `access denied` drops that session, logs in again and is
|
|
137505
|
+
* retried once with the new id. Calls without a session id pass through.
|
|
137506
|
+
*/
|
|
137507
|
+
boundClient() {
|
|
137508
|
+
return { post: async (method, params, opts) => {
|
|
137509
|
+
const sid = opts?.sessionId;
|
|
137510
|
+
if (sid === void 0) return this.client.post(method, params, opts);
|
|
137511
|
+
try {
|
|
137512
|
+
return await this.client.post(method, params, opts);
|
|
137513
|
+
} catch (err) {
|
|
137514
|
+
if (!(err instanceof AuthFailureError)) throw err;
|
|
137515
|
+
this.dropSession(sid);
|
|
137516
|
+
const fresh = await this.ensureSession();
|
|
137517
|
+
return this.client.post(method, params, { sessionId: fresh });
|
|
137518
|
+
}
|
|
137519
|
+
} };
|
|
137520
|
+
}
|
|
137521
|
+
async runEnsure() {
|
|
135309
137522
|
if (this.currentSessionId === void 0) return this.login();
|
|
135310
137523
|
await this.renew();
|
|
135311
137524
|
if (this.currentSessionId === void 0) return this.login();
|
|
135312
137525
|
return this.currentSessionId;
|
|
135313
137526
|
}
|
|
137527
|
+
async sendLogin() {
|
|
137528
|
+
try {
|
|
137529
|
+
const result = await this.client.post(JsonRpcMethod.SESSION_LOGIN, {
|
|
137530
|
+
username: this.username,
|
|
137531
|
+
password: this.password
|
|
137532
|
+
});
|
|
137533
|
+
const id = String(result);
|
|
137534
|
+
this.currentSessionId = id;
|
|
137535
|
+
this.lastRefresh = this.now();
|
|
137536
|
+
this.resetBackoff();
|
|
137537
|
+
return id;
|
|
137538
|
+
} catch (err) {
|
|
137539
|
+
this.consecutiveFailures += 1;
|
|
137540
|
+
this.nextAttemptAt = this.now() + this.backoffDelayMs();
|
|
137541
|
+
throw err;
|
|
137542
|
+
}
|
|
137543
|
+
}
|
|
137544
|
+
/** Forget `id` if it is still the current session (a newer one stays). */
|
|
137545
|
+
dropSession(id) {
|
|
137546
|
+
if (this.currentSessionId === id) this.currentSessionId = void 0;
|
|
137547
|
+
}
|
|
135314
137548
|
backoffDelayMs() {
|
|
135315
137549
|
const exp = INITIAL_BACKOFF_MS * BACKOFF_FACTOR ** (this.consecutiveFailures - 1);
|
|
135316
137550
|
return Math.min(exp, MAX_BACKOFF_MS);
|
|
@@ -137786,7 +140020,7 @@ var HubFetcher = class {
|
|
|
137786
140020
|
this.client = options.client;
|
|
137787
140021
|
this.getSessionId = options.getSessionId;
|
|
137788
140022
|
}
|
|
137789
|
-
sid() {
|
|
140023
|
+
async sid() {
|
|
137790
140024
|
return this.getSessionId();
|
|
137791
140025
|
}
|
|
137792
140026
|
/**
|
|
@@ -137795,14 +140029,14 @@ var HubFetcher = class {
|
|
|
137795
140029
|
* tolerated (such a variable is treated as read-only).
|
|
137796
140030
|
*/
|
|
137797
140031
|
async fetchSystemVariables() {
|
|
137798
|
-
const sid = this.sid();
|
|
140032
|
+
const sid = await this.sid();
|
|
137799
140033
|
const entries = asRecordArray2(await this.client.post(JsonRpcMethod.SYSVAR_GET_ALL, void 0, sidOpts(sid)));
|
|
137800
140034
|
const descriptions = await this.fetchSysVarDescriptions();
|
|
137801
140035
|
return entries.map((entry) => this.toSystemVariable(entry, descriptions));
|
|
137802
140036
|
}
|
|
137803
140037
|
/** Read a single system variable's raw value by name. */
|
|
137804
140038
|
async getSystemVariable(name2) {
|
|
137805
|
-
const sid = this.sid();
|
|
140039
|
+
const sid = await this.sid();
|
|
137806
140040
|
const raw = await this.client.post(JsonRpcMethod.SYSVAR_GET_VALUE_BY_NAME, { name: name2 }, sidOpts(sid));
|
|
137807
140041
|
if (typeof raw === "string" || typeof raw === "number" || typeof raw === "boolean") return raw;
|
|
137808
140042
|
if (raw === null || raw === void 0) return null;
|
|
@@ -137814,7 +140048,7 @@ var HubFetcher = class {
|
|
|
137814
140048
|
* `SET_SYSTEM_VARIABLE`. A null value is rejected.
|
|
137815
140049
|
*/
|
|
137816
140050
|
async setSystemVariable(name2, value) {
|
|
137817
|
-
const sid = this.sid();
|
|
140051
|
+
const sid = await this.sid();
|
|
137818
140052
|
if (value === null) throw new ValidationError(`Cannot set system variable "${name2}" to null`);
|
|
137819
140053
|
if (typeof value === "boolean") {
|
|
137820
140054
|
await this.client.post(JsonRpcMethod.SYSVAR_SET_BOOL, {
|
|
@@ -137837,7 +140071,7 @@ var HubFetcher = class {
|
|
|
137837
140071
|
}
|
|
137838
140072
|
/** Fetch all programs, coercing flags to booleans. */
|
|
137839
140073
|
async fetchPrograms() {
|
|
137840
|
-
const sid = this.sid();
|
|
140074
|
+
const sid = await this.sid();
|
|
137841
140075
|
return asRecordArray2(await this.client.post(JsonRpcMethod.PROGRAM_GET_ALL, void 0, sidOpts(sid))).map((entry) => {
|
|
137842
140076
|
const lastExecuteTime = entry.lastExecuteTime;
|
|
137843
140077
|
return {
|
|
@@ -137851,12 +140085,12 @@ var HubFetcher = class {
|
|
|
137851
140085
|
}
|
|
137852
140086
|
/** Execute a program by id. */
|
|
137853
140087
|
async runProgram(id) {
|
|
137854
|
-
const sid = this.sid();
|
|
140088
|
+
const sid = await this.sid();
|
|
137855
140089
|
await this.client.post(JsonRpcMethod.PROGRAM_EXECUTE, { id }, sidOpts(sid));
|
|
137856
140090
|
}
|
|
137857
140091
|
/** Enable/disable a program via the ReGa `SET_PROGRAM_STATE` script. */
|
|
137858
140092
|
async setProgramActive(id, active) {
|
|
137859
|
-
const sid = this.sid();
|
|
140093
|
+
const sid = await this.sid();
|
|
137860
140094
|
await runScript(this.client, sid, SET_PROGRAM_STATE, {
|
|
137861
140095
|
id,
|
|
137862
140096
|
state: active ? 1 : 0
|
|
@@ -137867,7 +140101,7 @@ var HubFetcher = class {
|
|
|
137867
140101
|
* channel address, decoding the latin1 `UriEncode`d names. Tolerates empty.
|
|
137868
140102
|
*/
|
|
137869
140103
|
async fetchRoomsFunctions() {
|
|
137870
|
-
const sid = this.sid();
|
|
140104
|
+
const sid = await this.sid();
|
|
137871
140105
|
const parsed = await runScript(this.client, sid, GET_ROOMS_FUNCTIONS);
|
|
137872
140106
|
return {
|
|
137873
140107
|
rooms: toDecodedMap(isRecord5(parsed) ? parsed.rooms : void 0),
|
|
@@ -137876,7 +140110,7 @@ var HubFetcher = class {
|
|
|
137876
140110
|
}
|
|
137877
140111
|
/** Build the `SYSVAR_DESCRIPTIONS` map: sysvar id → description text. */
|
|
137878
140112
|
async fetchSysVarDescriptions() {
|
|
137879
|
-
const sid = this.sid();
|
|
140113
|
+
const sid = await this.sid();
|
|
137880
140114
|
const out = /* @__PURE__ */ new Map();
|
|
137881
140115
|
try {
|
|
137882
140116
|
const parsed = await runScript(this.client, sid, SYSVAR_DESCRIPTIONS);
|
|
@@ -138512,10 +140746,14 @@ var CentralUnit = class {
|
|
|
138512
140746
|
*/
|
|
138513
140747
|
getHubFetcher() {
|
|
138514
140748
|
if (this.jsonClient === void 0) return void 0;
|
|
138515
|
-
const
|
|
140749
|
+
const session = this.session;
|
|
140750
|
+
if (session === void 0) return new HubFetcher({
|
|
140751
|
+
client: this.jsonClient,
|
|
140752
|
+
getSessionId: () => void 0
|
|
140753
|
+
});
|
|
138516
140754
|
return new HubFetcher({
|
|
138517
|
-
client,
|
|
138518
|
-
getSessionId: () =>
|
|
140755
|
+
client: session.boundClient(),
|
|
140756
|
+
getSessionId: () => session.ensureSession()
|
|
138519
140757
|
});
|
|
138520
140758
|
}
|
|
138521
140759
|
/**
|
|
@@ -138526,7 +140764,7 @@ var CentralUnit = class {
|
|
|
138526
140764
|
*/
|
|
138527
140765
|
getManagement() {
|
|
138528
140766
|
return new CcuManagement({
|
|
138529
|
-
json: this.jsonClient,
|
|
140767
|
+
json: this.session !== void 0 ? this.session.boundClient() : this.jsonClient,
|
|
138530
140768
|
webUi: this.webUi,
|
|
138531
140769
|
getSessionId: () => this.session !== void 0 ? this.session.ensureSession() : Promise.resolve(void 0),
|
|
138532
140770
|
interfaceClient: (iface) => {
|
|
@@ -138716,13 +140954,14 @@ var CentralUnit = class {
|
|
|
138716
140954
|
this.webUi = this.options.webUiClient;
|
|
138717
140955
|
} else {
|
|
138718
140956
|
const scheme = this.tls ? "https" : "http";
|
|
138719
|
-
const client = new JsonRpcClient({ url: `${scheme}://${this.host}` });
|
|
140957
|
+
const client = new JsonRpcClient({ url: this.options.jsonRpcUrl ?? `${scheme}://${this.host}` });
|
|
138720
140958
|
this.jsonClient = client;
|
|
138721
140959
|
this.webUi = this.options.webUiClient ?? new WebUiHttpClient({ url: `${scheme}://${this.host}` });
|
|
138722
140960
|
this.session = new SessionManager({
|
|
138723
140961
|
client,
|
|
138724
140962
|
username: this.credentials.username,
|
|
138725
|
-
password: this.credentials.password
|
|
140963
|
+
password: this.credentials.password,
|
|
140964
|
+
now: this.now
|
|
138726
140965
|
});
|
|
138727
140966
|
}
|
|
138728
140967
|
}
|
|
@@ -138872,8 +141111,9 @@ var CentralUnit = class {
|
|
|
138872
141111
|
async fetchDetails() {
|
|
138873
141112
|
if (this.jsonClient === void 0) return void 0;
|
|
138874
141113
|
try {
|
|
138875
|
-
|
|
138876
|
-
|
|
141114
|
+
if (this.session === void 0) return await mergeDetails(this.jsonClient);
|
|
141115
|
+
const sessionId = await this.session.ensureSession();
|
|
141116
|
+
return await mergeDetails(this.session.boundClient(), sessionId);
|
|
138877
141117
|
} catch {
|
|
138878
141118
|
return;
|
|
138879
141119
|
}
|
|
@@ -139011,6 +141251,8 @@ var CentralUnit = class {
|
|
|
139011
141251
|
} catch {}
|
|
139012
141252
|
await runtime.client.initProxy();
|
|
139013
141253
|
runtime.pingPong.reset();
|
|
141254
|
+
this.session?.resetBackoff();
|
|
141255
|
+
this.session?.markStale();
|
|
139014
141256
|
}
|
|
139015
141257
|
async reloadData(interfaceId2) {
|
|
139016
141258
|
const runtime = this.runtimes.get(interfaceId2);
|
|
@@ -145110,6 +147352,7 @@ var HomematicGatewayDevice = class extends BaseDevice {
|
|
|
145110
147352
|
const patch = gatewayMetadataPatch({ host: session.getConnection().host });
|
|
145111
147353
|
const key = JSON.stringify(patch);
|
|
145112
147354
|
if (key === this.lastMetadataKey) return;
|
|
147355
|
+
await this.declareIdentifiers({ host: session.getConnection().host });
|
|
145113
147356
|
const action = this.ctx.api.deviceManager?.setMetadata;
|
|
145114
147357
|
if (action === void 0) return;
|
|
145115
147358
|
try {
|