@camstack/addon-provider-reolink 1.2.243 → 1.2.245
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 +16 -0
- package/dist/addon.js +1521 -185
- package/dist/addon.mjs +1521 -185
- package/package.json +2 -2
package/dist/addon.mjs
CHANGED
|
@@ -100690,7 +100690,7 @@ function parseBaichuanWebhookObject(mess) {
|
|
|
100690
100690
|
return parsed;
|
|
100691
100691
|
}
|
|
100692
100692
|
//#endregion
|
|
100693
|
-
//#region ../types/dist/event-category-
|
|
100693
|
+
//#region ../types/dist/event-category-7P4A3bYA.mjs
|
|
100694
100694
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
100695
100695
|
EventCategory["SystemBoot"] = "system.boot";
|
|
100696
100696
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -100921,6 +100921,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
100921
100921
|
* dropped) — consumers MUST also gate on the device record's `probed` flag.
|
|
100922
100922
|
*/
|
|
100923
100923
|
EventCategory["DeviceReady"] = "device.ready";
|
|
100924
|
+
/**
|
|
100925
|
+
* An identity link (D1063) became `linked` — auto on strong evidence or
|
|
100926
|
+
* confirmed by the operator — or a confirmed link's evidence came back. Telemetry: the `identity-links` record is the
|
|
100927
|
+
* truth, and core-blocks reconciles its contributions from it as well.
|
|
100928
|
+
* Payload: `IdentityLinkEventPayload`.
|
|
100929
|
+
*/
|
|
100930
|
+
EventCategory["IdentityLinkCreated"] = "identity-link.created";
|
|
100931
|
+
/**
|
|
100932
|
+
* A `linked` identity link stopped acting: its evidence is gone (an auto link
|
|
100933
|
+
* is deleted; an operator-confirmed one stays `linked`, flagged
|
|
100934
|
+
* `evidenceGone`, and no longer acts), a side was removed, or the operator
|
|
100935
|
+
* unlinked it. Payload: `IdentityLinkEventPayload` with `reason`.
|
|
100936
|
+
*/
|
|
100937
|
+
EventCategory["IdentityLinkLost"] = "identity-link.lost";
|
|
100924
100938
|
EventCategory["IntegrationEnabled"] = "integration.enabled";
|
|
100925
100939
|
EventCategory["IntegrationDisabled"] = "integration.disabled";
|
|
100926
100940
|
EventCategory["IntegrationDeleted"] = "integration.deleted";
|
|
@@ -101190,7 +101204,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
101190
101204
|
*/
|
|
101191
101205
|
EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
|
|
101192
101206
|
/**
|
|
101193
|
-
* Emitted by the battery cap provider WHEN `
|
|
101207
|
+
* Emitted by the battery cap provider WHEN `wakeUp` enters the
|
|
101194
101208
|
* "wake in progress" window — between the Baichuan wake-up issue and
|
|
101195
101209
|
* the camera's first dialed-back RTP packet. The stream-broker
|
|
101196
101210
|
* manager subscribes to flip the per-broker placeholder reason to
|
|
@@ -101522,7 +101536,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
101522
101536
|
return EventCategory;
|
|
101523
101537
|
}({});
|
|
101524
101538
|
//#endregion
|
|
101525
|
-
//#region ../types/dist/composed-stable-id-
|
|
101539
|
+
//#region ../types/dist/composed-stable-id-DIeNz933.mjs
|
|
101526
101540
|
/**
|
|
101527
101541
|
import { errMsg } from '@camstack/types'
|
|
101528
101542
|
* Extract a human-readable message from an unknown error value.
|
|
@@ -101661,12 +101675,19 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
|
101661
101675
|
return DeviceType;
|
|
101662
101676
|
}({});
|
|
101663
101677
|
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
101678
|
+
/** The device reports a battery reading (the `battery` cap). Says nothing about sleep. */
|
|
101664
101679
|
DeviceFeature["BatteryOperated"] = "battery-operated";
|
|
101680
|
+
/**
|
|
101681
|
+
* The device goes into low-power sleep and must be WOKEN before it streams
|
|
101682
|
+
* (the `low-power-sleep` cap, `wakeUp`). A battery reading alone is
|
|
101683
|
+
* not this: a battery sensor reports charge and never sleeps (#459, Q2).
|
|
101684
|
+
*/
|
|
101685
|
+
DeviceFeature["Sleeps"] = "sleeps";
|
|
101665
101686
|
DeviceFeature["Rebootable"] = "rebootable";
|
|
101666
101687
|
/**
|
|
101667
101688
|
* Device supports an on-demand re-sync of its derived spec with its
|
|
101668
|
-
* upstream source — drives the generic Re-sync button.
|
|
101669
|
-
*
|
|
101689
|
+
* upstream source — drives the generic Re-sync button. Present when the
|
|
101690
|
+
* device has the `resync` cap bound (#459, Q6).
|
|
101670
101691
|
*/
|
|
101671
101692
|
DeviceFeature["Resyncable"] = "resyncable";
|
|
101672
101693
|
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
@@ -101750,9 +101771,6 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
101750
101771
|
DeviceFeature["FanDirection"] = "fan-direction";
|
|
101751
101772
|
/** Fan exposes an oscillation toggle. */
|
|
101752
101773
|
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
101753
|
-
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
101754
|
-
* field on the UI lock-controls panel. */
|
|
101755
|
-
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
101756
101774
|
/** Lock supports a latch-release ("open door") action distinct from
|
|
101757
101775
|
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
101758
101776
|
* `supported_features`. Gates the Open Door button in the UI. */
|
|
@@ -101783,8 +101801,6 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
101783
101801
|
DeviceFeature["MediaPlayerChannelStep"] = "media-player-channel-step";
|
|
101784
101802
|
/** Media player exposes power on / off. */
|
|
101785
101803
|
DeviceFeature["MediaPlayerPower"] = "media-player-power";
|
|
101786
|
-
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
101787
|
-
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
101788
101804
|
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
101789
101805
|
* addition to a textual location. */
|
|
101790
101806
|
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
@@ -101804,15 +101820,9 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
101804
101820
|
/** Automation `trigger` accepts a skipCondition flag — fires the
|
|
101805
101821
|
* automation's actions while bypassing its condition block. */
|
|
101806
101822
|
DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
|
|
101807
|
-
/** Robot vacuum exposes a live cleaning map (image child). Gates the
|
|
101808
|
-
* map tile in the vacuum UI. */
|
|
101809
|
-
DeviceFeature["VacuumHasMap"] = "vacuum-has-map";
|
|
101810
101823
|
/** Robot vacuum exposes AI obstacle-detection toggles. Gates the AI
|
|
101811
101824
|
* switches group. */
|
|
101812
101825
|
DeviceFeature["VacuumHasAi"] = "vacuum-has-ai";
|
|
101813
|
-
/** Robot mower exposes a live mowing map (SVG image child). Gates the
|
|
101814
|
-
* mower map tile. */
|
|
101815
|
-
DeviceFeature["MowerHasMap"] = "mower-has-map";
|
|
101816
101826
|
/** Robot mower exposes targeted mowing (all-area / zones / edges /
|
|
101817
101827
|
* spots) — gates the Mow action + map selectors. */
|
|
101818
101828
|
DeviceFeature["MowerHasTargetedMowing"] = "mower-has-targeted-mowing";
|
|
@@ -101974,6 +101984,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
101974
101984
|
/** A machine that runs workloads or is an appliance with its own OS: a
|
|
101975
101985
|
* server, a hypervisor, a gateway console, a CCU. */
|
|
101976
101986
|
DeviceRole["Host"] = "host";
|
|
101987
|
+
/** An uninterruptible power supply: battery charge, mains status and load. A
|
|
101988
|
+
* `DeviceType.Sensor` device. */
|
|
101989
|
+
DeviceRole["Ups"] = "ups";
|
|
101977
101990
|
return DeviceRole;
|
|
101978
101991
|
}({});
|
|
101979
101992
|
/**
|
|
@@ -106800,7 +106813,7 @@ var ZodIssueCode = {
|
|
|
106800
106813
|
var ZodFirstPartyTypeKind;
|
|
106801
106814
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
106802
106815
|
//#endregion
|
|
106803
|
-
//#region ../types/dist/
|
|
106816
|
+
//#region ../types/dist/runtime-capabilities-qX7BpOYT.mjs
|
|
106804
106817
|
/**
|
|
106805
106818
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
106806
106819
|
* window to float samples (D455).
|
|
@@ -108016,6 +108029,18 @@ function isInstanceEnabled(body) {
|
|
|
108016
108029
|
}
|
|
108017
108030
|
/** The body key of the switch; only {@link RecordIntegrationInstances.setInstanceEnabled} writes it. */
|
|
108018
108031
|
var SWITCH_KEY = "enabled";
|
|
108032
|
+
/**
|
|
108033
|
+
* The "Add device" mode an instance gets when its provider states none, from how the provider's
|
|
108034
|
+
* devices are found: `lan` scans, `account` adopts the account's children, anything else is manual.
|
|
108035
|
+
* The one place this default lives.
|
|
108036
|
+
*/
|
|
108037
|
+
function defaultAddDeviceMode(description) {
|
|
108038
|
+
switch (description.discovery?.mode) {
|
|
108039
|
+
case "lan": return "scan";
|
|
108040
|
+
case "account": return "children";
|
|
108041
|
+
default: return "none";
|
|
108042
|
+
}
|
|
108043
|
+
}
|
|
108019
108044
|
/** The keys of the kind's secret fields that sit at the top level of the body. */
|
|
108020
108045
|
function topLevelSecretKeys(paths) {
|
|
108021
108046
|
return new Set(paths.filter((p) => !p.includes(".") && !p.includes("[") && !p.includes("{")));
|
|
@@ -108118,6 +108143,7 @@ var RecordIntegrationInstances = class {
|
|
|
108118
108143
|
enabled: isInstanceEnabled(record.data),
|
|
108119
108144
|
formValues: shown,
|
|
108120
108145
|
kind,
|
|
108146
|
+
addDevice: this.hooks.addDevice?.(record.data) ?? defaultAddDeviceMode(this.hooks.description),
|
|
108121
108147
|
...health?.status !== void 0 ? { status: health.status } : {},
|
|
108122
108148
|
...health?.lastCheckedAt !== void 0 ? { lastCheckedAt: health.lastCheckedAt } : {}
|
|
108123
108149
|
};
|
|
@@ -111638,6 +111664,10 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
111638
111664
|
it: "Commuta {device}"
|
|
111639
111665
|
},
|
|
111640
111666
|
icon: "toggle-right",
|
|
111667
|
+
sideEffects: [{
|
|
111668
|
+
field: "on",
|
|
111669
|
+
negate: true
|
|
111670
|
+
}],
|
|
111641
111671
|
offeredWhen: {
|
|
111642
111672
|
method: "getOptions",
|
|
111643
111673
|
field: "supportsSetState"
|
|
@@ -112752,7 +112782,15 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
112752
112782
|
effect: {
|
|
112753
112783
|
field: "state",
|
|
112754
112784
|
value: "locked"
|
|
112755
|
-
}
|
|
112785
|
+
},
|
|
112786
|
+
hold: { effects: [{
|
|
112787
|
+
field: "state",
|
|
112788
|
+
value: "locking",
|
|
112789
|
+
when: {
|
|
112790
|
+
field: "state",
|
|
112791
|
+
notIn: ["locked"]
|
|
112792
|
+
}
|
|
112793
|
+
}] }
|
|
112756
112794
|
},
|
|
112757
112795
|
{
|
|
112758
112796
|
id: "lock.unlock",
|
|
@@ -112781,7 +112819,15 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
112781
112819
|
effect: {
|
|
112782
112820
|
field: "state",
|
|
112783
112821
|
value: "unlocked"
|
|
112784
|
-
}
|
|
112822
|
+
},
|
|
112823
|
+
hold: { effects: [{
|
|
112824
|
+
field: "state",
|
|
112825
|
+
value: "unlocking",
|
|
112826
|
+
when: {
|
|
112827
|
+
field: "state",
|
|
112828
|
+
notIn: ["unlocked"]
|
|
112829
|
+
}
|
|
112830
|
+
}] }
|
|
112785
112831
|
},
|
|
112786
112832
|
{
|
|
112787
112833
|
id: "lock.open",
|
|
@@ -113095,6 +113141,14 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
113095
113141
|
step: .5,
|
|
113096
113142
|
unit: "°C"
|
|
113097
113143
|
}
|
|
113144
|
+
}],
|
|
113145
|
+
effect: {
|
|
113146
|
+
field: "targetLow",
|
|
113147
|
+
fromArg: "targetLow"
|
|
113148
|
+
},
|
|
113149
|
+
sideEffects: [{
|
|
113150
|
+
field: "targetHigh",
|
|
113151
|
+
fromArg: "targetHigh"
|
|
113098
113152
|
}]
|
|
113099
113153
|
},
|
|
113100
113154
|
{
|
|
@@ -113151,7 +113205,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
113151
113205
|
from: "status",
|
|
113152
113206
|
field: "availableFanModes"
|
|
113153
113207
|
}
|
|
113154
|
-
}]
|
|
113208
|
+
}],
|
|
113209
|
+
effect: {
|
|
113210
|
+
field: "fanMode",
|
|
113211
|
+
fromArg: "fanMode"
|
|
113212
|
+
}
|
|
113155
113213
|
},
|
|
113156
113214
|
{
|
|
113157
113215
|
id: "climate.preset",
|
|
@@ -113176,7 +113234,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
113176
113234
|
from: "status",
|
|
113177
113235
|
field: "availablePresets"
|
|
113178
113236
|
}
|
|
113179
|
-
}]
|
|
113237
|
+
}],
|
|
113238
|
+
effect: {
|
|
113239
|
+
field: "preset",
|
|
113240
|
+
fromArg: "preset"
|
|
113241
|
+
}
|
|
113180
113242
|
},
|
|
113181
113243
|
{
|
|
113182
113244
|
id: "climate.swingVerticalOn",
|
|
@@ -113409,7 +113471,15 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
113409
113471
|
effect: {
|
|
113410
113472
|
field: "speed",
|
|
113411
113473
|
value: 100
|
|
113412
|
-
}
|
|
113474
|
+
},
|
|
113475
|
+
sideEffects: [{
|
|
113476
|
+
field: "preset",
|
|
113477
|
+
value: "",
|
|
113478
|
+
when: {
|
|
113479
|
+
field: "preset",
|
|
113480
|
+
notIn: [""]
|
|
113481
|
+
}
|
|
113482
|
+
}]
|
|
113413
113483
|
},
|
|
113414
113484
|
{
|
|
113415
113485
|
id: "fan.speed",
|
|
@@ -113440,7 +113510,15 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
113440
113510
|
effect: {
|
|
113441
113511
|
field: "speed",
|
|
113442
113512
|
fromArg: "speed"
|
|
113443
|
-
}
|
|
113513
|
+
},
|
|
113514
|
+
sideEffects: [{
|
|
113515
|
+
field: "preset",
|
|
113516
|
+
value: "",
|
|
113517
|
+
when: {
|
|
113518
|
+
field: "preset",
|
|
113519
|
+
notIn: [""]
|
|
113520
|
+
}
|
|
113521
|
+
}]
|
|
113444
113522
|
},
|
|
113445
113523
|
{
|
|
113446
113524
|
id: "fan.preset",
|
|
@@ -113465,7 +113543,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
113465
113543
|
from: "status",
|
|
113466
113544
|
field: "availablePresets"
|
|
113467
113545
|
}
|
|
113468
|
-
}]
|
|
113546
|
+
}],
|
|
113547
|
+
effect: {
|
|
113548
|
+
field: "preset",
|
|
113549
|
+
fromArg: "preset"
|
|
113550
|
+
}
|
|
113469
113551
|
},
|
|
113470
113552
|
{
|
|
113471
113553
|
id: "fan.forward",
|
|
@@ -114010,7 +114092,15 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
114010
114092
|
effect: {
|
|
114011
114093
|
field: "state",
|
|
114012
114094
|
value: "disarmed"
|
|
114013
|
-
}
|
|
114095
|
+
},
|
|
114096
|
+
hold: { effects: [{
|
|
114097
|
+
field: "state",
|
|
114098
|
+
value: "disarming",
|
|
114099
|
+
when: {
|
|
114100
|
+
field: "state",
|
|
114101
|
+
notIn: ["disarmed"]
|
|
114102
|
+
}
|
|
114103
|
+
}] }
|
|
114014
114104
|
},
|
|
114015
114105
|
{
|
|
114016
114106
|
id: "alarm.arm.home",
|
|
@@ -114040,7 +114130,15 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
114040
114130
|
effect: {
|
|
114041
114131
|
field: "state",
|
|
114042
114132
|
value: "armed_home"
|
|
114043
|
-
}
|
|
114133
|
+
},
|
|
114134
|
+
hold: { effects: [{
|
|
114135
|
+
field: "state",
|
|
114136
|
+
value: "arming",
|
|
114137
|
+
when: {
|
|
114138
|
+
field: "state",
|
|
114139
|
+
notIn: ["armed_home"]
|
|
114140
|
+
}
|
|
114141
|
+
}] }
|
|
114044
114142
|
},
|
|
114045
114143
|
{
|
|
114046
114144
|
id: "alarm.arm.away",
|
|
@@ -114070,7 +114168,15 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
114070
114168
|
effect: {
|
|
114071
114169
|
field: "state",
|
|
114072
114170
|
value: "armed_away"
|
|
114073
|
-
}
|
|
114171
|
+
},
|
|
114172
|
+
hold: { effects: [{
|
|
114173
|
+
field: "state",
|
|
114174
|
+
value: "arming",
|
|
114175
|
+
when: {
|
|
114176
|
+
field: "state",
|
|
114177
|
+
notIn: ["armed_away"]
|
|
114178
|
+
}
|
|
114179
|
+
}] }
|
|
114074
114180
|
},
|
|
114075
114181
|
{
|
|
114076
114182
|
id: "alarm.arm.night",
|
|
@@ -114100,7 +114206,15 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
114100
114206
|
effect: {
|
|
114101
114207
|
field: "state",
|
|
114102
114208
|
value: "armed_night"
|
|
114103
|
-
}
|
|
114209
|
+
},
|
|
114210
|
+
hold: { effects: [{
|
|
114211
|
+
field: "state",
|
|
114212
|
+
value: "arming",
|
|
114213
|
+
when: {
|
|
114214
|
+
field: "state",
|
|
114215
|
+
notIn: ["armed_night"]
|
|
114216
|
+
}
|
|
114217
|
+
}] }
|
|
114104
114218
|
},
|
|
114105
114219
|
{
|
|
114106
114220
|
id: "alarm.arm.vacation",
|
|
@@ -114130,7 +114244,15 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
114130
114244
|
effect: {
|
|
114131
114245
|
field: "state",
|
|
114132
114246
|
value: "armed_vacation"
|
|
114133
|
-
}
|
|
114247
|
+
},
|
|
114248
|
+
hold: { effects: [{
|
|
114249
|
+
field: "state",
|
|
114250
|
+
value: "arming",
|
|
114251
|
+
when: {
|
|
114252
|
+
field: "state",
|
|
114253
|
+
notIn: ["armed_vacation"]
|
|
114254
|
+
}
|
|
114255
|
+
}] }
|
|
114134
114256
|
},
|
|
114135
114257
|
{
|
|
114136
114258
|
id: "alarm.arm.custom_bypass",
|
|
@@ -114160,7 +114282,15 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
114160
114282
|
effect: {
|
|
114161
114283
|
field: "state",
|
|
114162
114284
|
value: "armed_custom_bypass"
|
|
114163
|
-
}
|
|
114285
|
+
},
|
|
114286
|
+
hold: { effects: [{
|
|
114287
|
+
field: "state",
|
|
114288
|
+
value: "arming",
|
|
114289
|
+
when: {
|
|
114290
|
+
field: "state",
|
|
114291
|
+
notIn: ["armed_custom_bypass"]
|
|
114292
|
+
}
|
|
114293
|
+
}] }
|
|
114164
114294
|
}
|
|
114165
114295
|
],
|
|
114166
114296
|
state: [{
|
|
@@ -115302,7 +115432,14 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115302
115432
|
quantity: "mass"
|
|
115303
115433
|
},
|
|
115304
115434
|
optional: true
|
|
115305
|
-
}]
|
|
115435
|
+
}],
|
|
115436
|
+
hold: {
|
|
115437
|
+
effects: [{
|
|
115438
|
+
field: "feeding",
|
|
115439
|
+
value: true
|
|
115440
|
+
}],
|
|
115441
|
+
holdMs: 1e4
|
|
115442
|
+
}
|
|
115306
115443
|
},
|
|
115307
115444
|
{
|
|
115308
115445
|
id: "petFeeder.feedHoppers",
|
|
@@ -115346,7 +115483,14 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115346
115483
|
quantity: "mass"
|
|
115347
115484
|
},
|
|
115348
115485
|
optional: true
|
|
115349
|
-
}]
|
|
115486
|
+
}],
|
|
115487
|
+
hold: {
|
|
115488
|
+
effects: [{
|
|
115489
|
+
field: "feeding",
|
|
115490
|
+
value: true
|
|
115491
|
+
}],
|
|
115492
|
+
holdMs: 1e4
|
|
115493
|
+
}
|
|
115350
115494
|
},
|
|
115351
115495
|
{
|
|
115352
115496
|
id: "petFeeder.cancelFeed",
|
|
@@ -115437,7 +115581,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115437
115581
|
it: "Attiva il blocco bambini di {device}"
|
|
115438
115582
|
},
|
|
115439
115583
|
icon: "lock",
|
|
115440
|
-
args: { on: true }
|
|
115584
|
+
args: { on: true },
|
|
115585
|
+
effect: {
|
|
115586
|
+
field: "childLock",
|
|
115587
|
+
value: true
|
|
115588
|
+
}
|
|
115441
115589
|
},
|
|
115442
115590
|
{
|
|
115443
115591
|
id: "petFeeder.childLockOff",
|
|
@@ -115451,7 +115599,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115451
115599
|
it: "Disattiva il blocco bambini di {device}"
|
|
115452
115600
|
},
|
|
115453
115601
|
icon: "lock-open",
|
|
115454
|
-
args: { on: false }
|
|
115602
|
+
args: { on: false },
|
|
115603
|
+
effect: {
|
|
115604
|
+
field: "childLock",
|
|
115605
|
+
value: false
|
|
115606
|
+
}
|
|
115455
115607
|
},
|
|
115456
115608
|
{
|
|
115457
115609
|
id: "petFeeder.lightOn",
|
|
@@ -115465,7 +115617,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115465
115617
|
it: "Accendi la spia di {device}"
|
|
115466
115618
|
},
|
|
115467
115619
|
icon: "lightbulb",
|
|
115468
|
-
args: { on: true }
|
|
115620
|
+
args: { on: true },
|
|
115621
|
+
effect: {
|
|
115622
|
+
field: "indicatorLight",
|
|
115623
|
+
value: true
|
|
115624
|
+
}
|
|
115469
115625
|
},
|
|
115470
115626
|
{
|
|
115471
115627
|
id: "petFeeder.lightOff",
|
|
@@ -115479,7 +115635,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115479
115635
|
it: "Spegni la spia di {device}"
|
|
115480
115636
|
},
|
|
115481
115637
|
icon: "lightbulb-off",
|
|
115482
|
-
args: { on: false }
|
|
115638
|
+
args: { on: false },
|
|
115639
|
+
effect: {
|
|
115640
|
+
field: "indicatorLight",
|
|
115641
|
+
value: false
|
|
115642
|
+
}
|
|
115483
115643
|
},
|
|
115484
115644
|
{
|
|
115485
115645
|
id: "petFeeder.feedSoundOn",
|
|
@@ -115493,7 +115653,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115493
115653
|
it: "Attiva il suono di erogazione di {device}"
|
|
115494
115654
|
},
|
|
115495
115655
|
icon: "volume-2",
|
|
115496
|
-
args: { on: true }
|
|
115656
|
+
args: { on: true },
|
|
115657
|
+
effect: {
|
|
115658
|
+
field: "feedSound",
|
|
115659
|
+
value: true
|
|
115660
|
+
}
|
|
115497
115661
|
},
|
|
115498
115662
|
{
|
|
115499
115663
|
id: "petFeeder.feedSoundOff",
|
|
@@ -115507,7 +115671,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115507
115671
|
it: "Disattiva il suono di erogazione di {device}"
|
|
115508
115672
|
},
|
|
115509
115673
|
icon: "volume-x",
|
|
115510
|
-
args: { on: false }
|
|
115674
|
+
args: { on: false },
|
|
115675
|
+
effect: {
|
|
115676
|
+
field: "feedSound",
|
|
115677
|
+
value: false
|
|
115678
|
+
}
|
|
115511
115679
|
},
|
|
115512
115680
|
{
|
|
115513
115681
|
id: "petFeeder.volume",
|
|
@@ -115532,7 +115700,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115532
115700
|
min: 0,
|
|
115533
115701
|
step: 1
|
|
115534
115702
|
}
|
|
115535
|
-
}]
|
|
115703
|
+
}],
|
|
115704
|
+
effect: {
|
|
115705
|
+
field: "volume",
|
|
115706
|
+
fromArg: "level"
|
|
115707
|
+
}
|
|
115536
115708
|
}
|
|
115537
115709
|
],
|
|
115538
115710
|
state: [
|
|
@@ -115604,7 +115776,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115604
115776
|
it: "Avvia la pompa di {device}"
|
|
115605
115777
|
},
|
|
115606
115778
|
icon: "play",
|
|
115607
|
-
args: { on: true }
|
|
115779
|
+
args: { on: true },
|
|
115780
|
+
effect: {
|
|
115781
|
+
field: "pumpRunning",
|
|
115782
|
+
value: true
|
|
115783
|
+
}
|
|
115608
115784
|
}, {
|
|
115609
115785
|
id: "petFountain.pumpOff",
|
|
115610
115786
|
method: "setPump",
|
|
@@ -115617,7 +115793,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115617
115793
|
it: "Ferma la pompa di {device}"
|
|
115618
115794
|
},
|
|
115619
115795
|
icon: "square",
|
|
115620
|
-
args: { on: false }
|
|
115796
|
+
args: { on: false },
|
|
115797
|
+
effect: {
|
|
115798
|
+
field: "pumpRunning",
|
|
115799
|
+
value: false
|
|
115800
|
+
}
|
|
115621
115801
|
}],
|
|
115622
115802
|
state: [{
|
|
115623
115803
|
kind: "boolean",
|
|
@@ -115669,7 +115849,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115669
115849
|
it: "Fai lavorare la pompa di {device} a ciclo acceso/spento"
|
|
115670
115850
|
},
|
|
115671
115851
|
icon: "timer",
|
|
115672
|
-
args: { on: true }
|
|
115852
|
+
args: { on: true },
|
|
115853
|
+
effect: {
|
|
115854
|
+
field: "enabled",
|
|
115855
|
+
value: true
|
|
115856
|
+
}
|
|
115673
115857
|
},
|
|
115674
115858
|
{
|
|
115675
115859
|
id: "pumpCycle.off",
|
|
@@ -115683,7 +115867,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115683
115867
|
it: "Fai lavorare la pompa di {device} in continuo"
|
|
115684
115868
|
},
|
|
115685
115869
|
icon: "timer-off",
|
|
115686
|
-
args: { on: false }
|
|
115870
|
+
args: { on: false },
|
|
115871
|
+
effect: {
|
|
115872
|
+
field: "enabled",
|
|
115873
|
+
value: false
|
|
115874
|
+
}
|
|
115687
115875
|
},
|
|
115688
115876
|
{
|
|
115689
115877
|
id: "pumpCycle.onMinutes",
|
|
@@ -115709,7 +115897,12 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115709
115897
|
step: 1,
|
|
115710
115898
|
unit: "min"
|
|
115711
115899
|
}
|
|
115712
|
-
}]
|
|
115900
|
+
}],
|
|
115901
|
+
effect: {
|
|
115902
|
+
field: "onTime",
|
|
115903
|
+
fromArg: "minutes",
|
|
115904
|
+
scale: 60
|
|
115905
|
+
}
|
|
115713
115906
|
},
|
|
115714
115907
|
{
|
|
115715
115908
|
id: "pumpCycle.offMinutes",
|
|
@@ -115735,7 +115928,12 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115735
115928
|
step: 1,
|
|
115736
115929
|
unit: "min"
|
|
115737
115930
|
}
|
|
115738
|
-
}]
|
|
115931
|
+
}],
|
|
115932
|
+
effect: {
|
|
115933
|
+
field: "offTime",
|
|
115934
|
+
fromArg: "minutes",
|
|
115935
|
+
scale: 60
|
|
115936
|
+
}
|
|
115739
115937
|
}
|
|
115740
115938
|
],
|
|
115741
115939
|
state: [{
|
|
@@ -115852,7 +116050,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115852
116050
|
en: "Play on {device}",
|
|
115853
116051
|
it: "Avvia la riproduzione su {device}"
|
|
115854
116052
|
},
|
|
115855
|
-
icon: "play"
|
|
116053
|
+
icon: "play",
|
|
116054
|
+
effect: {
|
|
116055
|
+
field: "state",
|
|
116056
|
+
value: "playing"
|
|
116057
|
+
}
|
|
115856
116058
|
},
|
|
115857
116059
|
{
|
|
115858
116060
|
id: "media.pause",
|
|
@@ -115865,7 +116067,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115865
116067
|
en: "Pause {device}",
|
|
115866
116068
|
it: "Metti in pausa {device}"
|
|
115867
116069
|
},
|
|
115868
|
-
icon: "pause"
|
|
116070
|
+
icon: "pause",
|
|
116071
|
+
effect: {
|
|
116072
|
+
field: "state",
|
|
116073
|
+
value: "paused"
|
|
116074
|
+
}
|
|
115869
116075
|
},
|
|
115870
116076
|
{
|
|
115871
116077
|
id: "media.stop",
|
|
@@ -115931,7 +116137,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115931
116137
|
step: 1,
|
|
115932
116138
|
unit: "%"
|
|
115933
116139
|
}
|
|
115934
|
-
}]
|
|
116140
|
+
}],
|
|
116141
|
+
effect: {
|
|
116142
|
+
field: "volumeLevel",
|
|
116143
|
+
fromArg: "volumeLevel"
|
|
116144
|
+
}
|
|
115935
116145
|
},
|
|
115936
116146
|
{
|
|
115937
116147
|
id: "media.mute",
|
|
@@ -115945,7 +116155,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115945
116155
|
it: "Silenzia {device}"
|
|
115946
116156
|
},
|
|
115947
116157
|
icon: "volume-x",
|
|
115948
|
-
args: { muted: true }
|
|
116158
|
+
args: { muted: true },
|
|
116159
|
+
effect: {
|
|
116160
|
+
field: "isMuted",
|
|
116161
|
+
value: true
|
|
116162
|
+
}
|
|
115949
116163
|
},
|
|
115950
116164
|
{
|
|
115951
116165
|
id: "media.unmute",
|
|
@@ -115959,7 +116173,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115959
116173
|
it: "Riattiva l’audio di {device}"
|
|
115960
116174
|
},
|
|
115961
116175
|
icon: "volume-2",
|
|
115962
|
-
args: { muted: false }
|
|
116176
|
+
args: { muted: false },
|
|
116177
|
+
effect: {
|
|
116178
|
+
field: "isMuted",
|
|
116179
|
+
value: false
|
|
116180
|
+
}
|
|
115963
116181
|
},
|
|
115964
116182
|
{
|
|
115965
116183
|
id: "media.shuffleOn",
|
|
@@ -115973,7 +116191,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115973
116191
|
it: "Attiva la riproduzione casuale su {device}"
|
|
115974
116192
|
},
|
|
115975
116193
|
icon: "shuffle",
|
|
115976
|
-
args: { shuffle: true }
|
|
116194
|
+
args: { shuffle: true },
|
|
116195
|
+
effect: {
|
|
116196
|
+
field: "shuffle",
|
|
116197
|
+
value: true
|
|
116198
|
+
}
|
|
115977
116199
|
},
|
|
115978
116200
|
{
|
|
115979
116201
|
id: "media.shuffleOff",
|
|
@@ -115987,7 +116209,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
115987
116209
|
it: "Disattiva la riproduzione casuale su {device}"
|
|
115988
116210
|
},
|
|
115989
116211
|
icon: "shuffle",
|
|
115990
|
-
args: { shuffle: false }
|
|
116212
|
+
args: { shuffle: false },
|
|
116213
|
+
effect: {
|
|
116214
|
+
field: "shuffle",
|
|
116215
|
+
value: false
|
|
116216
|
+
}
|
|
115991
116217
|
},
|
|
115992
116218
|
{
|
|
115993
116219
|
id: "media.repeat",
|
|
@@ -116033,7 +116259,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
116033
116259
|
}
|
|
116034
116260
|
]
|
|
116035
116261
|
}
|
|
116036
|
-
}]
|
|
116262
|
+
}],
|
|
116263
|
+
effect: {
|
|
116264
|
+
field: "repeat",
|
|
116265
|
+
fromArg: "repeat"
|
|
116266
|
+
}
|
|
116037
116267
|
},
|
|
116038
116268
|
{
|
|
116039
116269
|
id: "media.source",
|
|
@@ -116058,7 +116288,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
116058
116288
|
from: "status",
|
|
116059
116289
|
field: "availableSources"
|
|
116060
116290
|
}
|
|
116061
|
-
}]
|
|
116291
|
+
}],
|
|
116292
|
+
effect: {
|
|
116293
|
+
field: "source",
|
|
116294
|
+
fromArg: "source"
|
|
116295
|
+
}
|
|
116062
116296
|
},
|
|
116063
116297
|
{
|
|
116064
116298
|
id: "media.seek",
|
|
@@ -116598,7 +116832,14 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
116598
116832
|
en: "Run {device}",
|
|
116599
116833
|
it: "Esegui {device}"
|
|
116600
116834
|
},
|
|
116601
|
-
icon: "scroll-text"
|
|
116835
|
+
icon: "scroll-text",
|
|
116836
|
+
hold: {
|
|
116837
|
+
effects: [{
|
|
116838
|
+
field: "isRunning",
|
|
116839
|
+
value: true
|
|
116840
|
+
}],
|
|
116841
|
+
holdMs: 1e4
|
|
116842
|
+
}
|
|
116602
116843
|
}, {
|
|
116603
116844
|
id: "script.stop",
|
|
116604
116845
|
method: "stop",
|
|
@@ -116610,7 +116851,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
116610
116851
|
en: "Stop {device}",
|
|
116611
116852
|
it: "Ferma {device}"
|
|
116612
116853
|
},
|
|
116613
|
-
icon: "square"
|
|
116854
|
+
icon: "square",
|
|
116855
|
+
effect: {
|
|
116856
|
+
field: "isRunning",
|
|
116857
|
+
value: false
|
|
116858
|
+
}
|
|
116614
116859
|
}],
|
|
116615
116860
|
state: [{
|
|
116616
116861
|
kind: "boolean",
|
|
@@ -116648,7 +116893,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
116648
116893
|
en: "Enable {device}",
|
|
116649
116894
|
it: "Abilita {device}"
|
|
116650
116895
|
},
|
|
116651
|
-
icon: "toggle-right"
|
|
116896
|
+
icon: "toggle-right",
|
|
116897
|
+
effect: {
|
|
116898
|
+
field: "enabled",
|
|
116899
|
+
value: true
|
|
116900
|
+
}
|
|
116652
116901
|
},
|
|
116653
116902
|
{
|
|
116654
116903
|
id: "haAutomation.disable",
|
|
@@ -116661,7 +116910,11 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
116661
116910
|
en: "Disable {device}",
|
|
116662
116911
|
it: "Disabilita {device}"
|
|
116663
116912
|
},
|
|
116664
|
-
icon: "toggle-left"
|
|
116913
|
+
icon: "toggle-left",
|
|
116914
|
+
effect: {
|
|
116915
|
+
field: "enabled",
|
|
116916
|
+
value: false
|
|
116917
|
+
}
|
|
116665
116918
|
},
|
|
116666
116919
|
{
|
|
116667
116920
|
id: "haAutomation.trigger",
|
|
@@ -118255,6 +118508,25 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
118255
118508
|
icon: "refresh-cw"
|
|
118256
118509
|
}]
|
|
118257
118510
|
},
|
|
118511
|
+
"resync": {
|
|
118512
|
+
scope: "device",
|
|
118513
|
+
noun: {
|
|
118514
|
+
en: "Re-sync",
|
|
118515
|
+
it: "Risincronizzazione"
|
|
118516
|
+
},
|
|
118517
|
+
notOperatorFacing: { resync: "device adoption — re-aligning a device with its source is an onboarding step, not an automation action" }
|
|
118518
|
+
},
|
|
118519
|
+
"device-state-refresh": {
|
|
118520
|
+
scope: "device",
|
|
118521
|
+
noun: {
|
|
118522
|
+
en: "State refresh",
|
|
118523
|
+
it: "Aggiornamento dello stato"
|
|
118524
|
+
},
|
|
118525
|
+
notOperatorFacing: {
|
|
118526
|
+
refresh: "the core schedules state refreshes itself; an operator never asks for one",
|
|
118527
|
+
resubscribe: "the core schedules state refreshes itself; an operator never asks for one"
|
|
118528
|
+
}
|
|
118529
|
+
},
|
|
118258
118530
|
"recording": {
|
|
118259
118531
|
scope: "device",
|
|
118260
118532
|
noun: {
|
|
@@ -120266,7 +120538,6 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
120266
120538
|
en: "Battery",
|
|
120267
120539
|
it: "Batteria"
|
|
120268
120540
|
},
|
|
120269
|
-
notOperatorFacing: { wakeForStream: "a stream consumer wakes a sleeping camera to watch it; an automation that wants footage asks for the footage" },
|
|
120270
120541
|
state: [
|
|
120271
120542
|
{
|
|
120272
120543
|
kind: "numeric",
|
|
@@ -120376,6 +120647,14 @@ var CAP_VOCABULARY_BY_NAME = {
|
|
|
120376
120647
|
icon: "moon"
|
|
120377
120648
|
}]
|
|
120378
120649
|
},
|
|
120650
|
+
"low-power-sleep": {
|
|
120651
|
+
scope: "device",
|
|
120652
|
+
noun: {
|
|
120653
|
+
en: "Low-power sleep",
|
|
120654
|
+
it: "Sospensione a basso consumo"
|
|
120655
|
+
},
|
|
120656
|
+
notOperatorFacing: { wakeUp: "a stream consumer wakes a sleeping camera to watch it; an automation that wants footage asks for the footage" }
|
|
120657
|
+
},
|
|
120379
120658
|
"network-link": {
|
|
120380
120659
|
scope: "device",
|
|
120381
120660
|
noun: {
|
|
@@ -121236,6 +121515,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
121236
121515
|
"device-removal-hook",
|
|
121237
121516
|
"device-runs",
|
|
121238
121517
|
"device-state",
|
|
121518
|
+
"device-state-refresh",
|
|
121239
121519
|
"device-status",
|
|
121240
121520
|
"device-transitions",
|
|
121241
121521
|
"dishwasher",
|
|
@@ -121281,6 +121561,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
121281
121561
|
"log-channels",
|
|
121282
121562
|
"log-destination",
|
|
121283
121563
|
"login-method",
|
|
121564
|
+
"low-power-sleep",
|
|
121284
121565
|
"media-player",
|
|
121285
121566
|
"mesh-network",
|
|
121286
121567
|
"meter",
|
|
@@ -121334,6 +121615,7 @@ var CAP_NAMES = Object.freeze([
|
|
|
121334
121615
|
"records",
|
|
121335
121616
|
"remote",
|
|
121336
121617
|
"remote-layout-components",
|
|
121618
|
+
"resync",
|
|
121337
121619
|
"running-state",
|
|
121338
121620
|
"scene-monitor",
|
|
121339
121621
|
"schedulers",
|
|
@@ -121437,7 +121719,7 @@ Object.freeze({
|
|
|
121437
121719
|
]
|
|
121438
121720
|
},
|
|
121439
121721
|
{
|
|
121440
|
-
"path": "
|
|
121722
|
+
"path": "codeRequired",
|
|
121441
121723
|
"valueType": "boolean"
|
|
121442
121724
|
}
|
|
121443
121725
|
],
|
|
@@ -122505,7 +122787,24 @@ Object.freeze({
|
|
|
122505
122787
|
"jammed",
|
|
122506
122788
|
"door-open"
|
|
122507
122789
|
]
|
|
122790
|
+
}, {
|
|
122791
|
+
"path": "codeRequired",
|
|
122792
|
+
"valueType": "boolean"
|
|
122508
122793
|
}],
|
|
122794
|
+
"low-power-sleep": [
|
|
122795
|
+
{
|
|
122796
|
+
"path": "sleeping",
|
|
122797
|
+
"valueType": "boolean"
|
|
122798
|
+
},
|
|
122799
|
+
{
|
|
122800
|
+
"path": "lastContactAt",
|
|
122801
|
+
"valueType": "number"
|
|
122802
|
+
},
|
|
122803
|
+
{
|
|
122804
|
+
"path": "lastUpdated",
|
|
122805
|
+
"valueType": "number"
|
|
122806
|
+
}
|
|
122807
|
+
],
|
|
122509
122808
|
"media-player": [
|
|
122510
122809
|
{
|
|
122511
122810
|
"path": "state",
|
|
@@ -122857,6 +123156,10 @@ Object.freeze({
|
|
|
122857
123156
|
"path": "power",
|
|
122858
123157
|
"valueType": "number"
|
|
122859
123158
|
},
|
|
123159
|
+
{
|
|
123160
|
+
"path": "deliveredPower",
|
|
123161
|
+
"valueType": "number"
|
|
123162
|
+
},
|
|
122860
123163
|
{
|
|
122861
123164
|
"path": "energy",
|
|
122862
123165
|
"valueType": "number"
|
|
@@ -123699,7 +124002,7 @@ function sleep(ms) {
|
|
|
123699
124002
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
123700
124003
|
}
|
|
123701
124004
|
//#endregion
|
|
123702
|
-
//#region ../types/dist/implemented-methods-
|
|
124005
|
+
//#region ../types/dist/implemented-methods-wFScvZ40.mjs
|
|
123703
124006
|
/**
|
|
123704
124007
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
123705
124008
|
*
|
|
@@ -124859,6 +125162,8 @@ var CompositionItemEntrySchema = object({
|
|
|
124859
125162
|
*/
|
|
124860
125163
|
reset: CompositionForwardCommandSchema.optional()
|
|
124861
125164
|
});
|
|
125165
|
+
/** Which identity link added a feature (D1063). */
|
|
125166
|
+
var CompositionContributedBySchema = object({ linkId: string().min(1) });
|
|
124862
125167
|
var CompositionFeatureSchema = discriminatedUnion("kind", [object({
|
|
124863
125168
|
kind: literal("fields"),
|
|
124864
125169
|
cap: string().min(1),
|
|
@@ -124870,7 +125175,14 @@ var CompositionFeatureSchema = discriminatedUnion("kind", [object({
|
|
|
124870
125175
|
*/
|
|
124871
125176
|
items: record(string().regex(COMPOSITION_ITEM_KEY_RE), CompositionItemEntrySchema).refine((items) => Object.keys(items).length <= 16, { message: `at most 16 items` }).optional(),
|
|
124872
125177
|
/** Method name → what serves it. Only a BUILT capability takes commands (D967). */
|
|
124873
|
-
commands: record(string().min(1), CompositionCommandTargetSchema).optional()
|
|
125178
|
+
commands: record(string().min(1), CompositionCommandTargetSchema).optional(),
|
|
125179
|
+
/**
|
|
125180
|
+
* Provenance only (D1063): the identity link that added this feature. The
|
|
125181
|
+
* source ref stays in `fields`; `enabled` stays the operator's switch. An
|
|
125182
|
+
* operator edit of the source drops the stamp and the feature becomes the
|
|
125183
|
+
* operator's; a lost link removes only stamped features.
|
|
125184
|
+
*/
|
|
125185
|
+
contributedBy: CompositionContributedBySchema.optional()
|
|
124874
125186
|
}), object({
|
|
124875
125187
|
kind: literal("passthrough"),
|
|
124876
125188
|
cap: string().min(1),
|
|
@@ -127559,7 +127871,7 @@ function ordinalOf(id) {
|
|
|
127559
127871
|
function defaultIntegrationOf(integrations, eligible) {
|
|
127560
127872
|
return [...eligible === void 0 ? integrations : integrations.filter(eligible)].sort((a, b) => ordinalOf(a.id) - ordinalOf(b.id) || (a.id < b.id ? -1 : 1))[0] ?? null;
|
|
127561
127873
|
}
|
|
127562
|
-
function unstamped(device) {
|
|
127874
|
+
function unstamped$1(device) {
|
|
127563
127875
|
return device.integrationId === void 0 || device.integrationId === null || device.integrationId === "";
|
|
127564
127876
|
}
|
|
127565
127877
|
/**
|
|
@@ -127576,8 +127888,8 @@ async function claimDevicesToDefaultIntegration(ports, spec) {
|
|
|
127576
127888
|
const all = await ports.listDevices(spec.addonId);
|
|
127577
127889
|
const byId = new Map(all.map((d) => [d.id, d]));
|
|
127578
127890
|
const reservations = /* @__PURE__ */ new Set();
|
|
127579
|
-
for (const device of all) if (unstamped(device) && await isReservation(ports, device)) reservations.add(device.id);
|
|
127580
|
-
const orphans = all.filter((d) => unstamped(d) && !reservations.has(d.id));
|
|
127891
|
+
for (const device of all) if (unstamped$1(device) && await isReservation(ports, device)) reservations.add(device.id);
|
|
127892
|
+
const orphans = all.filter((d) => unstamped$1(d) && !reservations.has(d.id));
|
|
127581
127893
|
const summaryBase = { reservations: reservations.size };
|
|
127582
127894
|
if (orphans.length === 0) return {
|
|
127583
127895
|
outcome: "already-done",
|
|
@@ -127592,7 +127904,7 @@ async function claimDevicesToDefaultIntegration(ports, spec) {
|
|
|
127592
127904
|
const unresolved = /* @__PURE__ */ new Set();
|
|
127593
127905
|
const failed = /* @__PURE__ */ new Set();
|
|
127594
127906
|
const resolve = (device, seen) => {
|
|
127595
|
-
if (!unstamped(device)) return device.integrationId ?? null;
|
|
127907
|
+
if (!unstamped$1(device)) return device.integrationId ?? null;
|
|
127596
127908
|
const planned = plan.get(device.id);
|
|
127597
127909
|
if (planned !== void 0) return planned;
|
|
127598
127910
|
if (failed.has(device.id)) return null;
|
|
@@ -150889,6 +151201,67 @@ object({
|
|
|
150889
151201
|
/** Namespaces the client listed that no longer exist. */
|
|
150890
151202
|
deleted: array(PreferenceNamespaceSchema)
|
|
150891
151203
|
});
|
|
151204
|
+
/**
|
|
151205
|
+
* The wire shapes of `apiCatalog.*` — the API explorer's data (planning#595).
|
|
151206
|
+
*
|
|
151207
|
+
* One entry per tRPC method the hub serves, capability and core routes alike,
|
|
151208
|
+
* read off the live router by the hub (never a hand-written list).
|
|
151209
|
+
*/
|
|
151210
|
+
var ApiProcedureKindSchema = _enum([
|
|
151211
|
+
"query",
|
|
151212
|
+
"mutation",
|
|
151213
|
+
"subscription"
|
|
151214
|
+
]);
|
|
151215
|
+
/** The gate a method runs behind. */
|
|
151216
|
+
var ApiProcedureTierSchema = _enum([
|
|
151217
|
+
"public",
|
|
151218
|
+
"protected",
|
|
151219
|
+
"admin"
|
|
151220
|
+
]);
|
|
151221
|
+
/** The token scope a capability route is matched against (its `METHOD_ACCESS_MAP` row). */
|
|
151222
|
+
var ApiCatalogScopeSchema = object({
|
|
151223
|
+
capName: string(),
|
|
151224
|
+
capScope: _enum(["device", "system"]),
|
|
151225
|
+
access: _enum([
|
|
151226
|
+
"view",
|
|
151227
|
+
"create",
|
|
151228
|
+
"delete"
|
|
151229
|
+
]),
|
|
151230
|
+
role: string()
|
|
151231
|
+
});
|
|
151232
|
+
var ApiCatalogEntrySchema = object({
|
|
151233
|
+
/** `<router>.<method>` — the tRPC path. */
|
|
151234
|
+
path: string(),
|
|
151235
|
+
router: string(),
|
|
151236
|
+
method: string(),
|
|
151237
|
+
kind: ApiProcedureKindSchema,
|
|
151238
|
+
tier: ApiProcedureTierSchema,
|
|
151239
|
+
source: _enum(["capability", "core"]),
|
|
151240
|
+
/** `null` on a core route: it needs authentication only (plus admin where its tier says so). */
|
|
151241
|
+
scope: ApiCatalogScopeSchema.nullable(),
|
|
151242
|
+
hasInput: boolean()
|
|
151243
|
+
});
|
|
151244
|
+
/**
|
|
151245
|
+
* May the CALLER call a method. The list has no input, so a method reached
|
|
151246
|
+
* only through a device grant is `per-device`: the real call is allowed or
|
|
151247
|
+
* refused on the device its input names.
|
|
151248
|
+
*/
|
|
151249
|
+
var ApiCallableSchema = _enum([
|
|
151250
|
+
"yes",
|
|
151251
|
+
"no",
|
|
151252
|
+
"per-device"
|
|
151253
|
+
]);
|
|
151254
|
+
object({ methods: array(ApiCatalogEntrySchema.extend({ callable: ApiCallableSchema })) });
|
|
151255
|
+
/** A JSON Schema document, as the explorer receives it. */
|
|
151256
|
+
var JsonSchemaDocumentSchema = record(string(), unknown());
|
|
151257
|
+
object({
|
|
151258
|
+
path: string(),
|
|
151259
|
+
hasInput: boolean(),
|
|
151260
|
+
/** The INPUT JSON schema (what the caller sends); `null` without input or when it could not be produced. */
|
|
151261
|
+
schema: JsonSchemaDocumentSchema.nullable(),
|
|
151262
|
+
/** Why no schema could be produced (a non-Zod parser, an unrepresentable type). */
|
|
151263
|
+
error: string().nullable()
|
|
151264
|
+
});
|
|
150892
151265
|
_enum(["new-session", "step-up"]);
|
|
150893
151266
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
150894
151267
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -154634,9 +155007,8 @@ var airQualitySensorCapability = {
|
|
|
154634
155007
|
* Many panels require a PIN code on arm / disarm — the optional
|
|
154635
155008
|
* `code` field on the methods passes it through to the upstream
|
|
154636
155009
|
* service; it's NEVER persisted in the runtime slice or any event
|
|
154637
|
-
* payload.
|
|
154638
|
-
* `
|
|
154639
|
-
* field without a slice fetch.
|
|
155010
|
+
* payload. Whether a code is required is the slice's `codeRequired`
|
|
155011
|
+
* (#459): `null` when the provider cannot tell (D393).
|
|
154640
155012
|
*
|
|
154641
155013
|
* `availableModes` mirrors HA's `supported_features`-derived arm
|
|
154642
155014
|
* mode list — the UI renders only the buttons the panel accepts.
|
|
@@ -154675,9 +155047,13 @@ var AlarmPanelStatusSchema = object({
|
|
|
154675
155047
|
/** Subset of arm modes the panel accepts. UI renders one button per
|
|
154676
155048
|
* mode in this list. */
|
|
154677
155049
|
availableModes: array(AlarmArmModeSchema),
|
|
154678
|
-
/**
|
|
154679
|
-
*
|
|
154680
|
-
requiresCode
|
|
155050
|
+
/**
|
|
155051
|
+
* Whether the panel requires a PIN on arm / disarm (#459; the field was
|
|
155052
|
+
* `requiresCode`, and the `alarm-pin-required` device feature is gone).
|
|
155053
|
+
* `null` = the provider cannot tell (D393), never `false`. A slice restored
|
|
155054
|
+
* from before the rename is upgraded at boot by `restoredFieldRenames`.
|
|
155055
|
+
*/
|
|
155056
|
+
codeRequired: boolean().nullable(),
|
|
154681
155057
|
/** Ms epoch when the slice was last updated. */
|
|
154682
155058
|
lastChangedAt: number$1()
|
|
154683
155059
|
});
|
|
@@ -154720,6 +155096,14 @@ var alarmPanelCapability = {
|
|
|
154720
155096
|
field: "state",
|
|
154721
155097
|
value: "disarmed"
|
|
154722
155098
|
},
|
|
155099
|
+
hold: { effects: [{
|
|
155100
|
+
field: "state",
|
|
155101
|
+
value: "disarming",
|
|
155102
|
+
when: {
|
|
155103
|
+
field: "state",
|
|
155104
|
+
notIn: ["disarmed"]
|
|
155105
|
+
}
|
|
155106
|
+
}] },
|
|
154723
155107
|
openArgs: [{
|
|
154724
155108
|
key: "code",
|
|
154725
155109
|
label: t("PIN code", "Codice PIN"),
|
|
@@ -154734,7 +155118,7 @@ var alarmPanelCapability = {
|
|
|
154734
155118
|
arm: method(object({
|
|
154735
155119
|
deviceId: number$1().int().nonnegative(),
|
|
154736
155120
|
mode: AlarmArmModeSchema,
|
|
154737
|
-
/** Optional PIN code. Required when `
|
|
155121
|
+
/** Optional PIN code. Required when `codeRequired === true`.
|
|
154738
155122
|
* Passed through to the upstream service; never persisted. */
|
|
154739
155123
|
code: string().min(1).optional()
|
|
154740
155124
|
}), _void(), {
|
|
@@ -154750,6 +155134,14 @@ var alarmPanelCapability = {
|
|
|
154750
155134
|
field: "state",
|
|
154751
155135
|
value: "armed_home"
|
|
154752
155136
|
},
|
|
155137
|
+
hold: { effects: [{
|
|
155138
|
+
field: "state",
|
|
155139
|
+
value: "arming",
|
|
155140
|
+
when: {
|
|
155141
|
+
field: "state",
|
|
155142
|
+
notIn: ["armed_home"]
|
|
155143
|
+
}
|
|
155144
|
+
}] },
|
|
154753
155145
|
args: { mode: "home" },
|
|
154754
155146
|
openArgs: [{
|
|
154755
155147
|
key: "code",
|
|
@@ -154770,6 +155162,14 @@ var alarmPanelCapability = {
|
|
|
154770
155162
|
field: "state",
|
|
154771
155163
|
value: "armed_away"
|
|
154772
155164
|
},
|
|
155165
|
+
hold: { effects: [{
|
|
155166
|
+
field: "state",
|
|
155167
|
+
value: "arming",
|
|
155168
|
+
when: {
|
|
155169
|
+
field: "state",
|
|
155170
|
+
notIn: ["armed_away"]
|
|
155171
|
+
}
|
|
155172
|
+
}] },
|
|
154773
155173
|
args: { mode: "away" },
|
|
154774
155174
|
openArgs: [{
|
|
154775
155175
|
key: "code",
|
|
@@ -154790,6 +155190,14 @@ var alarmPanelCapability = {
|
|
|
154790
155190
|
field: "state",
|
|
154791
155191
|
value: "armed_night"
|
|
154792
155192
|
},
|
|
155193
|
+
hold: { effects: [{
|
|
155194
|
+
field: "state",
|
|
155195
|
+
value: "arming",
|
|
155196
|
+
when: {
|
|
155197
|
+
field: "state",
|
|
155198
|
+
notIn: ["armed_night"]
|
|
155199
|
+
}
|
|
155200
|
+
}] },
|
|
154793
155201
|
args: { mode: "night" },
|
|
154794
155202
|
openArgs: [{
|
|
154795
155203
|
key: "code",
|
|
@@ -154810,6 +155218,14 @@ var alarmPanelCapability = {
|
|
|
154810
155218
|
field: "state",
|
|
154811
155219
|
value: "armed_vacation"
|
|
154812
155220
|
},
|
|
155221
|
+
hold: { effects: [{
|
|
155222
|
+
field: "state",
|
|
155223
|
+
value: "arming",
|
|
155224
|
+
when: {
|
|
155225
|
+
field: "state",
|
|
155226
|
+
notIn: ["armed_vacation"]
|
|
155227
|
+
}
|
|
155228
|
+
}] },
|
|
154813
155229
|
args: { mode: "vacation" },
|
|
154814
155230
|
openArgs: [{
|
|
154815
155231
|
key: "code",
|
|
@@ -154830,6 +155246,14 @@ var alarmPanelCapability = {
|
|
|
154830
155246
|
field: "state",
|
|
154831
155247
|
value: "armed_custom_bypass"
|
|
154832
155248
|
},
|
|
155249
|
+
hold: { effects: [{
|
|
155250
|
+
field: "state",
|
|
155251
|
+
value: "arming",
|
|
155252
|
+
when: {
|
|
155253
|
+
field: "state",
|
|
155254
|
+
notIn: ["armed_custom_bypass"]
|
|
155255
|
+
}
|
|
155256
|
+
}] },
|
|
154833
155257
|
args: { mode: "custom_bypass" },
|
|
154834
155258
|
openArgs: [{
|
|
154835
155259
|
key: "code",
|
|
@@ -154851,7 +155275,7 @@ var alarmPanelCapability = {
|
|
|
154851
155275
|
/**
|
|
154852
155276
|
* Runtime-state slice — mirrored by the kernel. UI panel reads the
|
|
154853
155277
|
* full slice; renders an arm button per `availableModes` entry and
|
|
154854
|
-
* a PIN field iff `
|
|
155278
|
+
* a PIN field iff `codeRequired === true`.
|
|
154855
155279
|
*/
|
|
154856
155280
|
runtimeState: AlarmPanelStatusSchema,
|
|
154857
155281
|
/**
|
|
@@ -154862,6 +155286,13 @@ var alarmPanelCapability = {
|
|
|
154862
155286
|
*/
|
|
154863
155287
|
durability: "restored",
|
|
154864
155288
|
/**
|
|
155289
|
+
* A slice persisted before #459 carries `requiresCode`; the boot seed reads it
|
|
155290
|
+
* once into `codeRequired` (`restoredPart`), so no reader meets the old key,
|
|
155291
|
+
* and rewrites the row once without it (`seedMirrorFromRow`) — so this entry
|
|
155292
|
+
* can be dropped after every node has booted once on a release that has it.
|
|
155293
|
+
*/
|
|
155294
|
+
restoredFieldRenames: { requiresCode: "codeRequired" },
|
|
155295
|
+
/**
|
|
154865
155296
|
* History (D850): the panel's lifecycle state as an `enum` series —
|
|
154866
155297
|
* change-only, no floor, so an `arming -> pending -> triggered` sequence of a
|
|
154867
155298
|
* few seconds keeps every step. Who armed it stays in the events ledger.
|
|
@@ -155506,6 +155937,10 @@ var automationControlCapability = {
|
|
|
155506
155937
|
auth: "admin",
|
|
155507
155938
|
actions: [{
|
|
155508
155939
|
id: "haAutomation.enable",
|
|
155940
|
+
effect: {
|
|
155941
|
+
field: "enabled",
|
|
155942
|
+
value: true
|
|
155943
|
+
},
|
|
155509
155944
|
label: t("Enable automation", "Abilita l’automazione"),
|
|
155510
155945
|
phrase: t("Enable {device}", "Abilita {device}"),
|
|
155511
155946
|
icon: "toggle-right"
|
|
@@ -155516,6 +155951,10 @@ var automationControlCapability = {
|
|
|
155516
155951
|
auth: "admin",
|
|
155517
155952
|
actions: [{
|
|
155518
155953
|
id: "haAutomation.disable",
|
|
155954
|
+
effect: {
|
|
155955
|
+
field: "enabled",
|
|
155956
|
+
value: false
|
|
155957
|
+
},
|
|
155519
155958
|
label: t("Disable automation", "Disabilita l’automazione"),
|
|
155520
155959
|
phrase: t("Disable {device}", "Disabilita {device}"),
|
|
155521
155960
|
icon: "toggle-left"
|
|
@@ -156059,9 +156498,9 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
|
|
|
156059
156498
|
auth: "admin"
|
|
156060
156499
|
});
|
|
156061
156500
|
/**
|
|
156062
|
-
* Battery status snapshot. Emitted by providers whose device
|
|
156063
|
-
* battery
|
|
156064
|
-
*
|
|
156501
|
+
* Battery status snapshot. Emitted by providers whose device reports a
|
|
156502
|
+
* battery (`DeviceFeature.BatteryOperated`): battery cameras, sensors,
|
|
156503
|
+
* buttons. Whether the device SLEEPS is `low-power-sleep`, not this cap. Consumers build their own "low
|
|
156065
156504
|
* battery" alerting on top — the cap deliberately does NOT enforce a
|
|
156066
156505
|
* threshold.
|
|
156067
156506
|
*/
|
|
@@ -156218,47 +156657,12 @@ var batteryCapability = {
|
|
|
156218
156657
|
deviceNative: true,
|
|
156219
156658
|
mode: "singleton",
|
|
156220
156659
|
deviceTypes: BATTERY_DEVICE_TYPES,
|
|
156221
|
-
methods: {
|
|
156222
|
-
/**
|
|
156223
|
-
* Explicitly wake the camera from low-power sleep ahead of a
|
|
156224
|
-
* streaming session start. Consumers that initiate a stream
|
|
156225
|
-
* against a sleeping battery cam (HomeKit Secure Video, Alexa
|
|
156226
|
-
* RTCSession, snapshot wrappers) call this with a short timeout
|
|
156227
|
-
* before establishing the media pipeline — the broker's own
|
|
156228
|
-
* passive wake-on-dial works but adds 5–7 seconds to first-frame,
|
|
156229
|
-
* during which the consumer renders a black screen. Pre-waking
|
|
156230
|
-
* compresses that gap.
|
|
156231
|
-
*
|
|
156232
|
-
* Returns `awoke: true` when the firmware acknowledged the wake
|
|
156233
|
-
* before `timeoutMs`. Returns `awoke: false` when it timed out OR
|
|
156234
|
-
* the cap surface is unavailable (no Baichuan / firmware
|
|
156235
|
-
* channel); the caller should still attempt the stream — the
|
|
156236
|
-
* passive broker wake remains as fallback.
|
|
156237
|
-
*/
|
|
156238
|
-
wakeForStream: method(object({
|
|
156239
|
-
deviceId: number$1(),
|
|
156240
|
-
/** Bound on the wait. Sensible range 3000–10000ms. */
|
|
156241
|
-
timeoutMs: number$1().int().min(500).max(3e4).default(8e3)
|
|
156242
|
-
}), object({
|
|
156243
|
-
awoke: boolean(),
|
|
156244
|
-
durationMs: number$1()
|
|
156245
|
-
}), {
|
|
156246
|
-
kind: "mutation",
|
|
156247
|
-
notOperatorFacing: "a stream consumer wakes a sleeping camera to watch it; an automation that wants footage asks for the footage"
|
|
156248
|
-
}) },
|
|
156249
156660
|
/**
|
|
156250
|
-
*
|
|
156251
|
-
*
|
|
156252
|
-
*
|
|
156253
|
-
* … the cap surface is unavailable." (D663).
|
|
156661
|
+
* No methods: waking a sleeping camera is `low-power-sleep.wakeUp`
|
|
156662
|
+
* (#459, Q2). A battery reading says nothing about sleep — a battery sensor
|
|
156663
|
+
* reports charge and never needs waking.
|
|
156254
156664
|
*/
|
|
156255
|
-
|
|
156256
|
-
kind: "answer",
|
|
156257
|
-
value: {
|
|
156258
|
-
awoke: false,
|
|
156259
|
-
durationMs: 0
|
|
156260
|
-
}
|
|
156261
|
-
} },
|
|
156665
|
+
methods: {},
|
|
156262
156666
|
events: {
|
|
156263
156667
|
/**
|
|
156264
156668
|
* Emitted whenever the cached status changes (firmware push OR
|
|
@@ -158361,6 +158765,14 @@ var climateControlCapability = {
|
|
|
158361
158765
|
label: t("Set temperature range", "Imposta l’intervallo di temperatura"),
|
|
158362
158766
|
phrase: t("Keep {device} between {targetLow} and {targetHigh}", "Mantieni {device} tra {targetLow} e {targetHigh}"),
|
|
158363
158767
|
icon: "thermometer",
|
|
158768
|
+
effect: {
|
|
158769
|
+
field: "targetLow",
|
|
158770
|
+
fromArg: "targetLow"
|
|
158771
|
+
},
|
|
158772
|
+
sideEffects: [{
|
|
158773
|
+
field: "targetHigh",
|
|
158774
|
+
fromArg: "targetHigh"
|
|
158775
|
+
}],
|
|
158364
158776
|
openArgs: [{
|
|
158365
158777
|
key: "targetLow",
|
|
158366
158778
|
label: t("Lowest", "Minima"),
|
|
@@ -158419,6 +158831,10 @@ var climateControlCapability = {
|
|
|
158419
158831
|
label: t("Set fan mode", "Imposta la ventilazione"),
|
|
158420
158832
|
phrase: t("Set the fan of {device} to {fanMode}", "Imposta la ventilazione di {device} su {fanMode}"),
|
|
158421
158833
|
icon: "fan",
|
|
158834
|
+
effect: {
|
|
158835
|
+
field: "fanMode",
|
|
158836
|
+
fromArg: "fanMode"
|
|
158837
|
+
},
|
|
158422
158838
|
openArgs: [{
|
|
158423
158839
|
key: "fanMode",
|
|
158424
158840
|
label: t("Fan mode", "Ventilazione"),
|
|
@@ -158441,6 +158857,10 @@ var climateControlCapability = {
|
|
|
158441
158857
|
label: t("Set preset", "Imposta il preset"),
|
|
158442
158858
|
phrase: t("Set {device} to preset {preset}", "Imposta {device} sul preset {preset}"),
|
|
158443
158859
|
icon: "list",
|
|
158860
|
+
effect: {
|
|
158861
|
+
field: "preset",
|
|
158862
|
+
fromArg: "preset"
|
|
158863
|
+
},
|
|
158444
158864
|
openArgs: [{
|
|
158445
158865
|
key: "preset",
|
|
158446
158866
|
label: t("Preset", "Preset"),
|
|
@@ -159028,7 +159448,8 @@ var CompositionProblemSchema = object({
|
|
|
159028
159448
|
"command-source-unknown",
|
|
159029
159449
|
"command-input-unknown",
|
|
159030
159450
|
"command-input-missing",
|
|
159031
|
-
"power-source-is-actuator"
|
|
159451
|
+
"power-source-is-actuator",
|
|
159452
|
+
"link-contribution-removed"
|
|
159032
159453
|
]),
|
|
159033
159454
|
path: string(),
|
|
159034
159455
|
message: string()
|
|
@@ -160455,6 +160876,10 @@ var mediaPlayerCapability = {
|
|
|
160455
160876
|
auth: "protected",
|
|
160456
160877
|
actions: [{
|
|
160457
160878
|
id: "media.play",
|
|
160879
|
+
effect: {
|
|
160880
|
+
field: "state",
|
|
160881
|
+
value: "playing"
|
|
160882
|
+
},
|
|
160458
160883
|
label: t("Play", "Riproduci"),
|
|
160459
160884
|
phrase: t("Play on {device}", "Avvia la riproduzione su {device}"),
|
|
160460
160885
|
icon: "play"
|
|
@@ -160465,6 +160890,10 @@ var mediaPlayerCapability = {
|
|
|
160465
160890
|
auth: "protected",
|
|
160466
160891
|
actions: [{
|
|
160467
160892
|
id: "media.pause",
|
|
160893
|
+
effect: {
|
|
160894
|
+
field: "state",
|
|
160895
|
+
value: "paused"
|
|
160896
|
+
},
|
|
160468
160897
|
label: t("Pause media", "Metti in pausa"),
|
|
160469
160898
|
phrase: t("Pause {device}", "Metti in pausa {device}"),
|
|
160470
160899
|
icon: "pause"
|
|
@@ -160508,6 +160937,10 @@ var mediaPlayerCapability = {
|
|
|
160508
160937
|
auth: "protected",
|
|
160509
160938
|
actions: [{
|
|
160510
160939
|
id: "media.volume",
|
|
160940
|
+
effect: {
|
|
160941
|
+
field: "volumeLevel",
|
|
160942
|
+
fromArg: "volumeLevel"
|
|
160943
|
+
},
|
|
160511
160944
|
label: t("Set volume", "Imposta il volume"),
|
|
160512
160945
|
phrase: t("Set the volume of {device} to {volumeLevel}", "Imposta il volume di {device} al {volumeLevel}"),
|
|
160513
160946
|
icon: "volume-2",
|
|
@@ -160532,12 +160965,20 @@ var mediaPlayerCapability = {
|
|
|
160532
160965
|
auth: "protected",
|
|
160533
160966
|
actions: [{
|
|
160534
160967
|
id: "media.mute",
|
|
160968
|
+
effect: {
|
|
160969
|
+
field: "isMuted",
|
|
160970
|
+
value: true
|
|
160971
|
+
},
|
|
160535
160972
|
label: t("Mute", "Silenzia"),
|
|
160536
160973
|
phrase: t("Mute {device}", "Silenzia {device}"),
|
|
160537
160974
|
icon: "volume-x",
|
|
160538
160975
|
args: { muted: true }
|
|
160539
160976
|
}, {
|
|
160540
160977
|
id: "media.unmute",
|
|
160978
|
+
effect: {
|
|
160979
|
+
field: "isMuted",
|
|
160980
|
+
value: false
|
|
160981
|
+
},
|
|
160541
160982
|
label: t("Unmute", "Riattiva l’audio"),
|
|
160542
160983
|
phrase: t("Unmute {device}", "Riattiva l’audio di {device}"),
|
|
160543
160984
|
icon: "volume-2",
|
|
@@ -160552,12 +160993,20 @@ var mediaPlayerCapability = {
|
|
|
160552
160993
|
auth: "protected",
|
|
160553
160994
|
actions: [{
|
|
160554
160995
|
id: "media.shuffleOn",
|
|
160996
|
+
effect: {
|
|
160997
|
+
field: "shuffle",
|
|
160998
|
+
value: true
|
|
160999
|
+
},
|
|
160555
161000
|
label: t("Shuffle on", "Riproduzione casuale attiva"),
|
|
160556
161001
|
phrase: t("Turn on shuffle on {device}", "Attiva la riproduzione casuale su {device}"),
|
|
160557
161002
|
icon: "shuffle",
|
|
160558
161003
|
args: { shuffle: true }
|
|
160559
161004
|
}, {
|
|
160560
161005
|
id: "media.shuffleOff",
|
|
161006
|
+
effect: {
|
|
161007
|
+
field: "shuffle",
|
|
161008
|
+
value: false
|
|
161009
|
+
},
|
|
160561
161010
|
label: t("Shuffle off", "Riproduzione casuale spenta"),
|
|
160562
161011
|
phrase: t("Turn off shuffle on {device}", "Disattiva la riproduzione casuale su {device}"),
|
|
160563
161012
|
icon: "shuffle",
|
|
@@ -160572,6 +161021,10 @@ var mediaPlayerCapability = {
|
|
|
160572
161021
|
auth: "protected",
|
|
160573
161022
|
actions: [{
|
|
160574
161023
|
id: "media.repeat",
|
|
161024
|
+
effect: {
|
|
161025
|
+
field: "repeat",
|
|
161026
|
+
fromArg: "repeat"
|
|
161027
|
+
},
|
|
160575
161028
|
label: t("Set repeat", "Imposta la ripetizione"),
|
|
160576
161029
|
phrase: t("Set repeat on {device} to {repeat}", "Imposta la ripetizione di {device} su {repeat}"),
|
|
160577
161030
|
icon: "repeat",
|
|
@@ -160606,6 +161059,10 @@ var mediaPlayerCapability = {
|
|
|
160606
161059
|
auth: "protected",
|
|
160607
161060
|
actions: [{
|
|
160608
161061
|
id: "media.source",
|
|
161062
|
+
effect: {
|
|
161063
|
+
field: "source",
|
|
161064
|
+
fromArg: "source"
|
|
161065
|
+
},
|
|
160609
161066
|
label: t("Select source", "Scegli la sorgente"),
|
|
160610
161067
|
phrase: t("Switch {device} to {source}", "Passa {device} alla sorgente {source}"),
|
|
160611
161068
|
icon: "cast",
|
|
@@ -160774,7 +161231,7 @@ var mediaPlayerCapability = {
|
|
|
160774
161231
|
]
|
|
160775
161232
|
}
|
|
160776
161233
|
};
|
|
160777
|
-
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;
|
|
161234
|
+
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.Workload, 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.Workload, 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.Workload, 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.Workload, 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;
|
|
160778
161235
|
var NUMBER = {
|
|
160779
161236
|
kind: "fixed",
|
|
160780
161237
|
result: ["number"]
|
|
@@ -161266,7 +161723,9 @@ var PowerSourceRefusalReasonSchema = _enum([
|
|
|
161266
161723
|
"switch-call-failed",
|
|
161267
161724
|
"switch-options-unreadable",
|
|
161268
161725
|
"not-settable",
|
|
161269
|
-
"switch-is-actuator"
|
|
161726
|
+
"switch-is-actuator",
|
|
161727
|
+
"link-lost",
|
|
161728
|
+
"link-unknown"
|
|
161270
161729
|
]);
|
|
161271
161730
|
var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
|
|
161272
161731
|
accepted: literal(false),
|
|
@@ -163290,6 +163749,142 @@ function normaliseIdentifiers(raw, options = {}) {
|
|
|
163290
163749
|
rejected: refused
|
|
163291
163750
|
};
|
|
163292
163751
|
}
|
|
163752
|
+
/**
|
|
163753
|
+
* Cross-integration identity candidates (planning#593, step 2 of D1059's epic).
|
|
163754
|
+
*
|
|
163755
|
+
* Two devices brought by DIFFERENT integrations that share provider-declared
|
|
163756
|
+
* identifiers ({@link DeviceIdentifiers}) are candidates for being the same
|
|
163757
|
+
* physical object. This module holds the answer's shape; the device-manager
|
|
163758
|
+
* keeps the index that finds the pairs and the ONE rule that grades a match
|
|
163759
|
+
* (`classifyIdentityMatch`, `device-identity-index.ts`).
|
|
163760
|
+
*
|
|
163761
|
+
* The rule (operator, planning#590):
|
|
163762
|
+
*
|
|
163763
|
+
* | Matched keys | Confidence |
|
|
163764
|
+
* | ---------------------------------------------- | ----------- |
|
|
163765
|
+
* | two strong KINDS (e.g. `mac` + `serial`) | `auto` |
|
|
163766
|
+
* | `mac` + `ip` | `auto` |
|
|
163767
|
+
* | exactly one strong kind | `proposal` |
|
|
163768
|
+
* | weak keys only (`hostname`, `ip`) | no candidate|
|
|
163769
|
+
*
|
|
163770
|
+
* Strength counts distinct KINDS, not values: two MACs of one device matching
|
|
163771
|
+
* the other's two MACs are still one kind of evidence, so a proposal. In doubt,
|
|
163772
|
+
* no match.
|
|
163773
|
+
*
|
|
163774
|
+
* Read-only: a candidate is NOT a link. Links are step 3.
|
|
163775
|
+
*/
|
|
163776
|
+
var IdentityConfidenceSchema = _enum(["auto", "proposal"]);
|
|
163777
|
+
/** One identifier both devices declared, with the same normalised value. */
|
|
163778
|
+
var IdentityMatchedKeySchema = object({
|
|
163779
|
+
key: DeviceIdentifierKeySchema,
|
|
163780
|
+
value: string()
|
|
163781
|
+
});
|
|
163782
|
+
/** One side of a pair: the device and the integration that brought it. */
|
|
163783
|
+
var IdentityCandidateDeviceSchema = object({
|
|
163784
|
+
deviceId: number$1().int(),
|
|
163785
|
+
addonId: string(),
|
|
163786
|
+
/** The integration instance (`int_NNNN`) that adopted it; `null` when none was stamped. */
|
|
163787
|
+
integrationId: string().nullable()
|
|
163788
|
+
});
|
|
163789
|
+
/** Two devices of different integrations sharing at least one strong identifier. `a.deviceId < b.deviceId`. */
|
|
163790
|
+
var IdentityCandidatePairSchema = object({
|
|
163791
|
+
a: IdentityCandidateDeviceSchema,
|
|
163792
|
+
b: IdentityCandidateDeviceSchema,
|
|
163793
|
+
/** Every identifier the two share, weak ones included, ordered by key then value. */
|
|
163794
|
+
keys: array(IdentityMatchedKeySchema).readonly(),
|
|
163795
|
+
confidence: IdentityConfidenceSchema
|
|
163796
|
+
});
|
|
163797
|
+
/**
|
|
163798
|
+
* The answer of `device-manager.listIdentityCandidates`.
|
|
163799
|
+
*
|
|
163800
|
+
* - `unknown` — the index has not loaded yet: nothing can be said, and it is
|
|
163801
|
+
* NOT an empty list (D315).
|
|
163802
|
+
* - `answered` — `pairs` holds every candidate. `undeclaredDeviceIds` are the
|
|
163803
|
+
* devices with no identifiers on record: whether they match anything is
|
|
163804
|
+
* UNKNOWN, never "no match" (D393). A device absent from both lists declared
|
|
163805
|
+
* identifiers and matched nobody.
|
|
163806
|
+
*/
|
|
163807
|
+
var IdentityCandidatesSchema = discriminatedUnion("status", [object({
|
|
163808
|
+
status: literal("unknown"),
|
|
163809
|
+
reason: string()
|
|
163810
|
+
}), object({
|
|
163811
|
+
status: literal("answered"),
|
|
163812
|
+
pairs: array(IdentityCandidatePairSchema).readonly(),
|
|
163813
|
+
undeclaredDeviceIds: array(number$1().int()).readonly()
|
|
163814
|
+
})]);
|
|
163815
|
+
var IdentityLinkKindSchema = _enum(["same-device", "poe-power"]);
|
|
163816
|
+
/**
|
|
163817
|
+
* - `proposed` — one strong key matched: waits for the operator;
|
|
163818
|
+
* - `linked` — confirmed by the operator, or auto-linked on strong evidence;
|
|
163819
|
+
* - `dismissed` — the operator said no (or unlinked): sticky, never re-proposed.
|
|
163820
|
+
*/
|
|
163821
|
+
var IdentityLinkStateSchema = _enum([
|
|
163822
|
+
"proposed",
|
|
163823
|
+
"linked",
|
|
163824
|
+
"dismissed"
|
|
163825
|
+
]);
|
|
163826
|
+
/** Who decided the current state: the matcher (`auto`) or the operator. */
|
|
163827
|
+
var IdentityLinkOriginSchema = _enum(["auto", "operator"]);
|
|
163828
|
+
/** One side: the device ref that survives re-registration, plus its current numeric id. */
|
|
163829
|
+
var IdentityLinkSideSchema = object({
|
|
163830
|
+
addonId: string().min(1),
|
|
163831
|
+
stableId: string().min(1),
|
|
163832
|
+
deviceId: number$1().int()
|
|
163833
|
+
});
|
|
163834
|
+
var IdentityLinkSchema = object({
|
|
163835
|
+
kind: IdentityLinkKindSchema,
|
|
163836
|
+
a: IdentityLinkSideSchema,
|
|
163837
|
+
b: IdentityLinkSideSchema,
|
|
163838
|
+
state: IdentityLinkStateSchema,
|
|
163839
|
+
origin: IdentityLinkOriginSchema,
|
|
163840
|
+
/** The identifiers that matched when the link was last evaluated, ordered by key then value. */
|
|
163841
|
+
evidence: array(IdentityMatchedKeySchema).readonly(),
|
|
163842
|
+
/** An operator-confirmed link whose evidence no longer matches: kept, flagged. */
|
|
163843
|
+
evidenceGone: literal(true).optional(),
|
|
163844
|
+
createdAt: number$1().int().nonnegative(),
|
|
163845
|
+
decidedAt: number$1().int().nonnegative().optional()
|
|
163846
|
+
}).extend({ id: string().min(1) });
|
|
163847
|
+
DeviceRole.PoePort;
|
|
163848
|
+
/**
|
|
163849
|
+
* The answer of `device-manager.listIdentityLinks`. `not-loaded` until the
|
|
163850
|
+
* links have been read — never an empty list (D315).
|
|
163851
|
+
*/
|
|
163852
|
+
var IdentityLinksReadSchema = discriminatedUnion("status", [object({
|
|
163853
|
+
status: literal("not-loaded"),
|
|
163854
|
+
reason: string()
|
|
163855
|
+
}), object({
|
|
163856
|
+
status: literal("answered"),
|
|
163857
|
+
links: array(IdentityLinkSchema).readonly()
|
|
163858
|
+
})]);
|
|
163859
|
+
/** Why an operator decision on a link was refused. */
|
|
163860
|
+
var IdentityLinkDecisionRefusalSchema = _enum([
|
|
163861
|
+
"not-loaded",
|
|
163862
|
+
"unknown-link",
|
|
163863
|
+
"wrong-state"
|
|
163864
|
+
]);
|
|
163865
|
+
/** The answer of `confirmIdentityLink` / `dismissIdentityLink` / `unlinkIdentity`. */
|
|
163866
|
+
var IdentityLinkDecisionSchema = discriminatedUnion("ok", [object({
|
|
163867
|
+
ok: literal(true),
|
|
163868
|
+
link: IdentityLinkSchema
|
|
163869
|
+
}), object({
|
|
163870
|
+
ok: literal(false),
|
|
163871
|
+
reason: IdentityLinkDecisionRefusalSchema,
|
|
163872
|
+
message: string()
|
|
163873
|
+
})]);
|
|
163874
|
+
/** Why a link was lost. */
|
|
163875
|
+
var IdentityLinkLostReasonSchema = _enum([
|
|
163876
|
+
"evidence-gone",
|
|
163877
|
+
"device-removed",
|
|
163878
|
+
"operator-unlinked"
|
|
163879
|
+
]);
|
|
163880
|
+
object({
|
|
163881
|
+
linkId: string(),
|
|
163882
|
+
kind: IdentityLinkKindSchema,
|
|
163883
|
+
aDeviceId: number$1().int(),
|
|
163884
|
+
bDeviceId: number$1().int(),
|
|
163885
|
+
origin: IdentityLinkOriginSchema,
|
|
163886
|
+
reason: IdentityLinkLostReasonSchema.optional()
|
|
163887
|
+
});
|
|
163293
163888
|
var DeviceSearchRequiresSchema = object({
|
|
163294
163889
|
/** Capability names the field wants a value of. Absent when the field wants actions only. */
|
|
163295
163890
|
caps: array(string()).readonly().optional(),
|
|
@@ -163856,6 +164451,11 @@ var DeviceInfoSchema = object({
|
|
|
163856
164451
|
* the owning provider via `setIdentifiers`; read-only for the operator.
|
|
163857
164452
|
* Absent ⇒ the provider declared none. */
|
|
163858
164453
|
identifiers: DeviceIdentifiersSchema.optional(),
|
|
164454
|
+
/** The identity of the device at the far end of this device's physical
|
|
164455
|
+
* link (D1059 amended by D1063) — a PoE port's wired client. Written only by
|
|
164456
|
+
* the owning provider via `setAttachedIdentifiers`; it never makes the two
|
|
164457
|
+
* devices the same device. Absent ⇒ none declared. */
|
|
164458
|
+
attachedIdentifiers: DeviceIdentifiersSchema.optional(),
|
|
163859
164459
|
/** Optional upstream-system identity + rendering envelope. See
|
|
163860
164460
|
* `SourceInfo` in `packages/types/src/device/source-info.ts`. */
|
|
163861
164461
|
sourceInfo: SourceInfoSchema.optional(),
|
|
@@ -164009,6 +164609,8 @@ var DeviceMetaSchema = object({
|
|
|
164009
164609
|
metadata: record(string(), unknown()).nullable().optional(),
|
|
164010
164610
|
/** Provider-declared identifiers (D1059). See `DeviceMeta.identifiers`. */
|
|
164011
164611
|
identifiers: DeviceIdentifiersSchema.optional(),
|
|
164612
|
+
/** The far end of the device's physical link (D1063). See `DeviceMeta.attachedIdentifiers`. */
|
|
164613
|
+
attachedIdentifiers: DeviceIdentifiersSchema.optional(),
|
|
164012
164614
|
/** Optional upstream-system identity + rendering envelope. See
|
|
164013
164615
|
* `SourceInfo`. Present when the device has been persisted with a
|
|
164014
164616
|
* non-synthetic source identifier (HA entities, vendor MAC, …);
|
|
@@ -164330,6 +164932,29 @@ method(object({
|
|
|
164330
164932
|
}), _void(), {
|
|
164331
164933
|
kind: "mutation",
|
|
164332
164934
|
auth: "admin"
|
|
164935
|
+
}), method(object({}), IdentityCandidatesSchema, {
|
|
164936
|
+
kind: "query",
|
|
164937
|
+
auth: "admin"
|
|
164938
|
+
}), method(object({
|
|
164939
|
+
deviceId: number$1(),
|
|
164940
|
+
identifiers: DeviceIdentifiersSchema.nullable(),
|
|
164941
|
+
/** Kinds the provider tried to read and could not: their stored value is kept. */
|
|
164942
|
+
unread: array(DeviceIdentifierKeySchema).optional()
|
|
164943
|
+
}), _void(), {
|
|
164944
|
+
kind: "mutation",
|
|
164945
|
+
auth: "admin"
|
|
164946
|
+
}), method(object({ deviceId: number$1().int().optional() }), IdentityLinksReadSchema, {
|
|
164947
|
+
kind: "query",
|
|
164948
|
+
auth: "admin"
|
|
164949
|
+
}), method(object({ linkId: string().min(1) }), IdentityLinkDecisionSchema, {
|
|
164950
|
+
kind: "mutation",
|
|
164951
|
+
auth: "admin"
|
|
164952
|
+
}), method(object({ linkId: string().min(1) }), IdentityLinkDecisionSchema, {
|
|
164953
|
+
kind: "mutation",
|
|
164954
|
+
auth: "admin"
|
|
164955
|
+
}), method(object({ linkId: string().min(1) }), IdentityLinkDecisionSchema, {
|
|
164956
|
+
kind: "mutation",
|
|
164957
|
+
auth: "admin"
|
|
164333
164958
|
}), method(_void(), array(string())), method(object({ name: string() }), _void(), {
|
|
164334
164959
|
kind: "mutation",
|
|
164335
164960
|
auth: "admin"
|
|
@@ -165294,8 +165919,12 @@ var ClaimsListingSchema = discriminatedUnion("state", [object({
|
|
|
165294
165919
|
})]);
|
|
165295
165920
|
method(object({ deviceId: number$1() }), record(string(), record(string(), unknown()))), method(object({
|
|
165296
165921
|
deviceId: number$1(),
|
|
165297
|
-
capName: string()
|
|
165298
|
-
|
|
165922
|
+
capName: string(),
|
|
165923
|
+
/** The slice the device CONFIRMED, without a held command (D1061) — history and automations. */
|
|
165924
|
+
confirmed: boolean().optional()
|
|
165925
|
+
}), record(string(), unknown()).nullable()), method(object({
|
|
165926
|
+
/** The slices the devices CONFIRMED, without held commands (D1061). */
|
|
165927
|
+
confirmed: boolean().optional() }), record(string(), record(string(), record(string(), unknown())))), method(object({
|
|
165299
165928
|
deviceId: number$1(),
|
|
165300
165929
|
capName: string(),
|
|
165301
165930
|
slice: record(string(), unknown())
|
|
@@ -165333,6 +165962,88 @@ method(object({ deviceId: number$1() }), record(string(), record(string(), unkno
|
|
|
165333
165962
|
slice: record(string(), unknown())
|
|
165334
165963
|
}));
|
|
165335
165964
|
/**
|
|
165965
|
+
* Server-driven device state refresh (D1062): the core decides WHEN a device is
|
|
165966
|
+
* re-read, the integration only knows HOW.
|
|
165967
|
+
*
|
|
165968
|
+
* A provider states its policy where it registers the device's
|
|
165969
|
+
* `device-state-refresh` cap (`ctx.registerNativeCap(cap, provider, {
|
|
165970
|
+
* stateRefresh })`). It reaches the hub by the road the command-hold options
|
|
165971
|
+
* take (D1061): written directly in-process, carried on a forked child's cap
|
|
165972
|
+
* descriptors otherwise. Plain data, wire-safe.
|
|
165973
|
+
*/
|
|
165974
|
+
/** Why the core asks for a refresh. */
|
|
165975
|
+
var StateRefreshReasonSchema = _enum([
|
|
165976
|
+
"schedule",
|
|
165977
|
+
"command",
|
|
165978
|
+
"burst"
|
|
165979
|
+
]);
|
|
165980
|
+
/**
|
|
165981
|
+
* What arrives without asking: `none` (everything is read), `partial` (some
|
|
165982
|
+
* fields arrive by push, the rest is read on the schedule), `full` (everything
|
|
165983
|
+
* arrives by push — never read on a schedule).
|
|
165984
|
+
*/
|
|
165985
|
+
var StateRefreshPushSchema = _enum([
|
|
165986
|
+
"none",
|
|
165987
|
+
"partial",
|
|
165988
|
+
"full"
|
|
165989
|
+
]);
|
|
165990
|
+
object({
|
|
165991
|
+
/**
|
|
165992
|
+
* The integration instance the device belongs to. Devices of one instance
|
|
165993
|
+
* share one schedule group: a batching provider is asked once for all of
|
|
165994
|
+
* them, and the heartbeat is judged across them.
|
|
165995
|
+
*/
|
|
165996
|
+
integrationId: string().min(1),
|
|
165997
|
+
/** The fastest interval the integration can afford for its devices. The core polls at it by default. */
|
|
165998
|
+
minIntervalMs: number$1().int().min(1e3),
|
|
165999
|
+
/**
|
|
166000
|
+
* The operator's per-integration setting, when there is one. It can only SLOW
|
|
166001
|
+
* the cadence: the core polls at `max(minIntervalMs, intervalMs)`.
|
|
166002
|
+
*/
|
|
166003
|
+
intervalMs: number$1().int().positive().optional(),
|
|
166004
|
+
/** One `refresh` call can read every device of the integration at once. */
|
|
166005
|
+
batch: boolean(),
|
|
166006
|
+
push: StateRefreshPushSchema,
|
|
166007
|
+
/** Longest silence a push integration may keep before the core re-reads it and asks it to resubscribe. */
|
|
166008
|
+
heartbeatMs: number$1().int().positive().optional(),
|
|
166009
|
+
/**
|
|
166010
|
+
* Bumped by the provider each time its push subscription reconnected on its
|
|
166011
|
+
* own. A change makes the core re-read every device of the integration
|
|
166012
|
+
* (pushes lost while it was down; events may be dropped, D8).
|
|
166013
|
+
*/
|
|
166014
|
+
connectionEpoch: number$1().int().nonnegative().optional()
|
|
166015
|
+
});
|
|
166016
|
+
/**
|
|
166017
|
+
* device-state-refresh — the HOW of a device's state refresh, called by the
|
|
166018
|
+
* core, which owns the WHEN (D1062).
|
|
166019
|
+
*
|
|
166020
|
+
* The provider registers it per device with its policy
|
|
166021
|
+
* (`registerNativeCap(cap, provider, { stateRefresh })`). The hub's scheduler
|
|
166022
|
+
* calls `refresh` on the schedule, after a command and in the burst that
|
|
166023
|
+
* follows it, and `resubscribe` when a push integration fell silent. The
|
|
166024
|
+
* provider re-reads and writes the slices it already writes; nothing is
|
|
166025
|
+
* returned but completion.
|
|
166026
|
+
*/
|
|
166027
|
+
var DeviceStateRefreshInputSchema = object({
|
|
166028
|
+
/** The device the call is routed by (one of `deviceIds`). */
|
|
166029
|
+
deviceId: number$1().int().nonnegative(),
|
|
166030
|
+
/** Every device to re-read: one, or the integration's whole set when the provider batches. */
|
|
166031
|
+
deviceIds: array(number$1().int().nonnegative()).min(1),
|
|
166032
|
+
reason: StateRefreshReasonSchema
|
|
166033
|
+
});
|
|
166034
|
+
var DeviceStateResubscribeInputSchema = object({ deviceId: number$1().int().nonnegative() });
|
|
166035
|
+
var DeviceStateRefreshResultSchema = object({ ok: literal(true) });
|
|
166036
|
+
var NOT_OPERATOR_FACING = "the core schedules state refreshes itself; an operator never asks for one";
|
|
166037
|
+
method(DeviceStateRefreshInputSchema, DeviceStateRefreshResultSchema, {
|
|
166038
|
+
kind: "mutation",
|
|
166039
|
+
auth: "admin",
|
|
166040
|
+
notOperatorFacing: NOT_OPERATOR_FACING
|
|
166041
|
+
}), method(DeviceStateResubscribeInputSchema, DeviceStateRefreshResultSchema, {
|
|
166042
|
+
kind: "mutation",
|
|
166043
|
+
auth: "admin",
|
|
166044
|
+
notOperatorFacing: NOT_OPERATOR_FACING
|
|
166045
|
+
});
|
|
166046
|
+
/**
|
|
165336
166047
|
* Generic device-level status snapshot. Auto-registered by `BaseDevice`
|
|
165337
166048
|
* for every device, regardless of provider — the kernel needs a uniform
|
|
165338
166049
|
* cap-keyed slice for the basic device flags every consumer expects to
|
|
@@ -167762,7 +168473,15 @@ var fanControlCapability = {
|
|
|
167762
168473
|
field: "speed",
|
|
167763
168474
|
value: 100
|
|
167764
168475
|
},
|
|
167765
|
-
args: { speed: 100 }
|
|
168476
|
+
args: { speed: 100 },
|
|
168477
|
+
sideEffects: [{
|
|
168478
|
+
field: "preset",
|
|
168479
|
+
value: "",
|
|
168480
|
+
when: {
|
|
168481
|
+
field: "preset",
|
|
168482
|
+
notIn: [""]
|
|
168483
|
+
}
|
|
168484
|
+
}]
|
|
167766
168485
|
},
|
|
167767
168486
|
{
|
|
167768
168487
|
id: "fan.speed",
|
|
@@ -167773,6 +168492,14 @@ var fanControlCapability = {
|
|
|
167773
168492
|
field: "speed",
|
|
167774
168493
|
fromArg: "speed"
|
|
167775
168494
|
},
|
|
168495
|
+
sideEffects: [{
|
|
168496
|
+
field: "preset",
|
|
168497
|
+
value: "",
|
|
168498
|
+
when: {
|
|
168499
|
+
field: "preset",
|
|
168500
|
+
notIn: [""]
|
|
168501
|
+
}
|
|
168502
|
+
}],
|
|
167776
168503
|
openArgs: [{
|
|
167777
168504
|
key: "speed",
|
|
167778
168505
|
label: t("Speed", "Velocità"),
|
|
@@ -167798,6 +168525,10 @@ var fanControlCapability = {
|
|
|
167798
168525
|
label: t("Set preset", "Imposta il preset"),
|
|
167799
168526
|
phrase: t("Set {device} to preset {preset}", "Imposta {device} sul preset {preset}"),
|
|
167800
168527
|
icon: "list",
|
|
168528
|
+
effect: {
|
|
168529
|
+
field: "preset",
|
|
168530
|
+
fromArg: "preset"
|
|
168531
|
+
},
|
|
167801
168532
|
openArgs: [{
|
|
167802
168533
|
key: "preset",
|
|
167803
168534
|
label: t("Preset", "Preset"),
|
|
@@ -169528,7 +170259,7 @@ var HeroSceneSchema = object({
|
|
|
169528
170259
|
level: number$1().min(0).max(1).nullable()
|
|
169529
170260
|
});
|
|
169530
170261
|
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;
|
|
169531
|
-
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;
|
|
170262
|
+
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, DeviceRole.Ups;
|
|
169532
170263
|
var HeroRowIdSchema = _enum([
|
|
169533
170264
|
"progress",
|
|
169534
170265
|
"run-for",
|
|
@@ -170800,6 +171531,16 @@ var IntegrationInstanceStatusSchema = object({
|
|
|
170800
171531
|
/** A short human word for the state ("Signed in", "Token expired"); shown instead of `state`. */
|
|
170801
171532
|
label: string().optional()
|
|
170802
171533
|
});
|
|
171534
|
+
/**
|
|
171535
|
+
* What "Add device" inside ONE instance offers, decided per instance by its provider. `scan`: the
|
|
171536
|
+
* LAN scan finds devices this instance holds; `children`: only the instance's own children, via
|
|
171537
|
+
* adoption (a scan would offer other hosts, which are new integrations); `none`: manual add only.
|
|
171538
|
+
*/
|
|
171539
|
+
var IntegrationInstanceAddDeviceSchema = _enum([
|
|
171540
|
+
"scan",
|
|
171541
|
+
"children",
|
|
171542
|
+
"none"
|
|
171543
|
+
]);
|
|
170803
171544
|
var IntegrationInstanceSchema = object({
|
|
170804
171545
|
id: IntegrationInstanceIdSchema,
|
|
170805
171546
|
name: string(),
|
|
@@ -170817,7 +171558,9 @@ var IntegrationInstanceSchema = object({
|
|
|
170817
171558
|
formValues: record(string(), unknown()),
|
|
170818
171559
|
status: IntegrationInstanceStatusSchema.optional(),
|
|
170819
171560
|
/** Epoch ms of the last probe of the remote that produced `status`; absent when never checked. */
|
|
170820
|
-
lastCheckedAt: number$1().optional()
|
|
171561
|
+
lastCheckedAt: number$1().optional(),
|
|
171562
|
+
/** What "Add device" inside this instance offers; see {@link IntegrationInstanceAddDeviceSchema}. Absent means the caller derives it from `describe().discovery` with `defaultAddDeviceMode` (lan → scan, account → children, else none). */
|
|
171563
|
+
addDevice: IntegrationInstanceAddDeviceSchema.optional()
|
|
170821
171564
|
});
|
|
170822
171565
|
var IntegrationInstancePatchSchema = object({
|
|
170823
171566
|
id: IntegrationInstanceIdSchema,
|
|
@@ -172902,6 +173645,13 @@ var LockControlStatusSchema = object({
|
|
|
172902
173645
|
"jammed",
|
|
172903
173646
|
"door-open"
|
|
172904
173647
|
]),
|
|
173648
|
+
/**
|
|
173649
|
+
* Whether lock / unlock need a PIN `code` (#459, replaces the
|
|
173650
|
+
* `lock-pin-required` device feature). `null` = the provider cannot tell
|
|
173651
|
+
* (D393) — never `false`. `.optional()` so a restored slice written before
|
|
173652
|
+
* the field still parses; readers treat absent exactly like `null`.
|
|
173653
|
+
*/
|
|
173654
|
+
codeRequired: boolean().nullable().optional(),
|
|
172905
173655
|
/** Ms epoch when the slice was last updated. */
|
|
172906
173656
|
lastChangedAt: number$1()
|
|
172907
173657
|
});
|
|
@@ -172961,6 +173711,14 @@ var lockControlCapability = {
|
|
|
172961
173711
|
field: "state",
|
|
172962
173712
|
value: "locked"
|
|
172963
173713
|
},
|
|
173714
|
+
hold: { effects: [{
|
|
173715
|
+
field: "state",
|
|
173716
|
+
value: "locking",
|
|
173717
|
+
when: {
|
|
173718
|
+
field: "state",
|
|
173719
|
+
notIn: ["locked"]
|
|
173720
|
+
}
|
|
173721
|
+
}] },
|
|
172964
173722
|
openArgs: [{
|
|
172965
173723
|
key: "code",
|
|
172966
173724
|
label: t("PIN code", "Codice PIN"),
|
|
@@ -172994,6 +173752,14 @@ var lockControlCapability = {
|
|
|
172994
173752
|
field: "state",
|
|
172995
173753
|
value: "unlocked"
|
|
172996
173754
|
},
|
|
173755
|
+
hold: { effects: [{
|
|
173756
|
+
field: "state",
|
|
173757
|
+
value: "unlocking",
|
|
173758
|
+
when: {
|
|
173759
|
+
field: "state",
|
|
173760
|
+
notIn: ["unlocked"]
|
|
173761
|
+
}
|
|
173762
|
+
}] },
|
|
172997
173763
|
openArgs: [{
|
|
172998
173764
|
key: "code",
|
|
172999
173765
|
label: t("PIN code", "Codice PIN"),
|
|
@@ -173381,6 +174147,90 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
173381
174147
|
]);
|
|
173382
174148
|
method(_void(), array(LoginMethodContributionSchema).readonly()), NOT_A_DEVICE.IDENTITY;
|
|
173383
174149
|
/**
|
|
174150
|
+
* low-power-sleep — a device that goes into low-power sleep and must be WOKEN
|
|
174151
|
+
* before it streams (#459, Q2). A battery camera (Reolink Argus, a robot's
|
|
174152
|
+
* on-board camera) is one; a battery SENSOR is not: it reports charge on the
|
|
174153
|
+
* `battery` cap and never sleeps. The two meanings used to share
|
|
174154
|
+
* `DeviceFeature.BatteryOperated`; this cap is the one that answers "sleeps",
|
|
174155
|
+
* and `DeviceFeature.Sleeps` is derived from it being bound with
|
|
174156
|
+
* `wakeUp` implemented.
|
|
174157
|
+
*
|
|
174158
|
+
* The state is the sleep inputs (`deriveBatteryPresence`): whether the device
|
|
174159
|
+
* is asleep, and the last time it PROVED it was reachable. Read from this slice
|
|
174160
|
+
* by the stream broker (`readBatterySleepFacts`), the recorder
|
|
174161
|
+
* (`recordingWakeDeps`) and the snapshot builtin. The broker's per-device
|
|
174162
|
+
* mirror is still also fed by `BatteryOnStatusChanged` events.
|
|
174163
|
+
*/
|
|
174164
|
+
var LowPowerSleepStatusSchema = object({
|
|
174165
|
+
/**
|
|
174166
|
+
* True while the firmware is in low-power mode. A provider MUST avoid polling
|
|
174167
|
+
* during sleep — a read wakes the device and drains charge.
|
|
174168
|
+
*/
|
|
174169
|
+
sleeping: boolean().meta({ label: "Sleeping" }),
|
|
174170
|
+
/**
|
|
174171
|
+
* Ms epoch of the last time the device proved it was reachable, from
|
|
174172
|
+
* PASSIVE signals only (a completed round-trip, an observed wake, a push).
|
|
174173
|
+
* Absent = never since this slice was born. The only input that separates
|
|
174174
|
+
* "asleep" from "gone".
|
|
174175
|
+
*/
|
|
174176
|
+
lastContactAt: number$1().optional(),
|
|
174177
|
+
/** Ms epoch of the last observation. */
|
|
174178
|
+
lastUpdated: number$1().meta(readingMeta("none"))
|
|
174179
|
+
});
|
|
174180
|
+
var lowPowerSleepCapability = {
|
|
174181
|
+
name: "low-power-sleep",
|
|
174182
|
+
scope: "device",
|
|
174183
|
+
deviceNative: true,
|
|
174184
|
+
mode: "singleton",
|
|
174185
|
+
deviceTypes: [DeviceType.Camera],
|
|
174186
|
+
methods: {
|
|
174187
|
+
/**
|
|
174188
|
+
* Explicitly wake the device from low-power sleep ahead of a streaming
|
|
174189
|
+
* session start. Consumers that initiate a stream against a sleeping
|
|
174190
|
+
* camera (wake-on-play, the recorder, HomeKit, Alexa, snapshot wrappers)
|
|
174191
|
+
* call this with a short timeout before establishing the media pipeline —
|
|
174192
|
+
* the broker's own passive wake-on-dial works but adds 5–7 seconds to
|
|
174193
|
+
* first-frame. Pre-waking compresses that gap.
|
|
174194
|
+
*
|
|
174195
|
+
* Returns `awoke: true` when the firmware acknowledged the wake before
|
|
174196
|
+
* `timeoutMs`, `awoke: false` when it timed out; the caller should still
|
|
174197
|
+
* attempt the stream — the passive broker wake remains as fallback.
|
|
174198
|
+
*/
|
|
174199
|
+
wakeUp: method(object({
|
|
174200
|
+
deviceId: number$1(),
|
|
174201
|
+
/** Bound on the wait. Sensible range 3000–10000ms. */
|
|
174202
|
+
timeoutMs: number$1().int().min(500).max(3e4).default(8e3)
|
|
174203
|
+
}), object({
|
|
174204
|
+
awoke: boolean(),
|
|
174205
|
+
durationMs: number$1()
|
|
174206
|
+
}), {
|
|
174207
|
+
kind: "mutation",
|
|
174208
|
+
notOperatorFacing: "a stream consumer wakes a sleeping camera to watch it; an automation that wants footage asks for the footage"
|
|
174209
|
+
}) },
|
|
174210
|
+
status: {
|
|
174211
|
+
schema: LowPowerSleepStatusSchema,
|
|
174212
|
+
kind: "push",
|
|
174213
|
+
empty: {
|
|
174214
|
+
sleeping: false,
|
|
174215
|
+
lastUpdated: 0
|
|
174216
|
+
}
|
|
174217
|
+
},
|
|
174218
|
+
runtimeState: LowPowerSleepStatusSchema,
|
|
174219
|
+
/**
|
|
174220
|
+
* Runtime-state durability: **restored** — a sleeping camera may not report
|
|
174221
|
+
* for hours; the restored sleep inputs are the only thing the sleep gate and
|
|
174222
|
+
* the presence derivation have (the same argument as `battery`).
|
|
174223
|
+
*/
|
|
174224
|
+
durability: "restored",
|
|
174225
|
+
/** History (D850): none — battery never recorded a sleep series either. */
|
|
174226
|
+
history: "none",
|
|
174227
|
+
volatileStateFields: ["lastUpdated"],
|
|
174228
|
+
vocabulary: {
|
|
174229
|
+
noun: t("Low-power sleep", "Sospensione a basso consumo"),
|
|
174230
|
+
order: 5245
|
|
174231
|
+
}
|
|
174232
|
+
};
|
|
174233
|
+
/**
|
|
173384
174234
|
* mesh-network — collection cap for mesh-VPN providers.
|
|
173385
174235
|
*
|
|
173386
174236
|
* Different shape from `network-access` (public tunnels):
|
|
@@ -177321,6 +178171,16 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
|
|
|
177321
178171
|
timestamp: number$1()
|
|
177322
178172
|
}), EventCategory.PipelineAnalyticsDetectionEvent, EventCategory.PipelineAnalyticsPackageDelivered, EventCategory.PipelineAnalyticsPackagePickedUp;
|
|
177323
178173
|
/**
|
|
178174
|
+
* A rectangle as a fraction of a frame, `[0, 1]` on both axes — the wire shape
|
|
178175
|
+
* of `NormalizedRect` (which is derived from it).
|
|
178176
|
+
*/
|
|
178177
|
+
var NormalizedRectSchema = object({
|
|
178178
|
+
x: number$1(),
|
|
178179
|
+
y: number$1(),
|
|
178180
|
+
w: number$1(),
|
|
178181
|
+
h: number$1()
|
|
178182
|
+
});
|
|
178183
|
+
/**
|
|
177324
178184
|
* A root model's boxes standing in for one crop-kind step's own inference
|
|
177325
178185
|
* (D730) — see `runPipeline.suppliedRoot`.
|
|
177326
178186
|
*/
|
|
@@ -177713,7 +178573,16 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
177713
178573
|
* reader) run on them through their own crop policy. Boxes are in the
|
|
177714
178574
|
* PIXELS of the image this call carries. Absent ⇒ the root step runs.
|
|
177715
178575
|
*/
|
|
177716
|
-
suppliedRoot: SuppliedRootOutputSchema.optional()
|
|
178576
|
+
suppliedRoot: SuppliedRootOutputSchema.optional(),
|
|
178577
|
+
/**
|
|
178578
|
+
* The motion analyzer's merged subjects (D394) for this camera, fresh,
|
|
178579
|
+
* normalised to the frame (0..1). Feeds the motion-guided root crop
|
|
178580
|
+
* (D1060): the executor picks per frame whether the object-detection
|
|
178581
|
+
* root runs on the full frame or on a crop around them. Honoured only
|
|
178582
|
+
* on the live `frame` plane with a `frameRef`. Absent or empty ⇒ no
|
|
178583
|
+
* motion known ⇒ full frame.
|
|
178584
|
+
*/
|
|
178585
|
+
motionRegions: array(NormalizedRectSchema).optional()
|
|
177717
178586
|
}), PipelineRunResultBridge, { kind: "mutation" }), method(object({
|
|
177718
178587
|
steps: array(PipelineStepInputSchema).min(1),
|
|
177719
178588
|
frames: array(FrameInputSchema).min(1).max(255),
|
|
@@ -178805,7 +179674,15 @@ var RunnerInferenceDeviceSchema = object({
|
|
|
178805
179674
|
* Absent field ⇒ an orchestrator that predates D650: the jumped step keeps
|
|
178806
179675
|
* the elected device's provisioning, as before.
|
|
178807
179676
|
*/
|
|
178808
|
-
steps: record(string(), RunnerJumpStepProvisioningSchema).optional()
|
|
179677
|
+
steps: record(string(), RunnerJumpStepProvisioningSchema).optional(),
|
|
179678
|
+
/**
|
|
179679
|
+
* Steps switched OFF on this device (D1065, `inferenceDevices[key].steps[s]
|
|
179680
|
+
* .enabled === false`). The runner never runs a subtree containing one of
|
|
179681
|
+
* them here: it auto-jumps it to an allowed device, and when none can take
|
|
179682
|
+
* it the subtree is skipped (`disabled-on-device`), never run here anyway.
|
|
179683
|
+
* Absent ⇒ none (an orchestrator that predates D1065).
|
|
179684
|
+
*/
|
|
179685
|
+
disabledSteps: array(string()).readonly().optional()
|
|
178809
179686
|
});
|
|
178810
179687
|
/**
|
|
178811
179688
|
* Camera assignment payload sent by `addon-pipeline-orchestrator` to a
|
|
@@ -184522,6 +185399,14 @@ method(object({ deviceId: number$1().int() }), object({
|
|
|
184522
185399
|
auth: "admin"
|
|
184523
185400
|
}), NOT_A_DEVICE.PIPELINE;
|
|
184524
185401
|
/**
|
|
185402
|
+
* Hold limits a cap's vocabulary may declare on an action (D1061).
|
|
185403
|
+
*
|
|
185404
|
+
* A one-shot command (feed, run a script) has no lasting state to confirm; it
|
|
185405
|
+
* holds its in-progress flag just long enough that a second tap, before the
|
|
185406
|
+
* device reports, is seen as "already running" and refused.
|
|
185407
|
+
*/
|
|
185408
|
+
var ONE_SHOT_HOLD_MS = 1e4;
|
|
185409
|
+
/**
|
|
184525
185410
|
* Feeder connectivity / power status — mirrors the HA petkit device-status
|
|
184526
185411
|
* enum: `normal` (online, mains), `offline` (not reaching PetKit cloud),
|
|
184527
185412
|
* `on_batteries` (running on battery backup). `null` until first reported.
|
|
@@ -184639,6 +185524,13 @@ var petFeederCapability = {
|
|
|
184639
185524
|
label: t("Feed", "Dai da mangiare"),
|
|
184640
185525
|
phrase: t("Dispense {grams} from {device}", "Eroga {grams} da {device}"),
|
|
184641
185526
|
icon: "paw-print",
|
|
185527
|
+
hold: {
|
|
185528
|
+
effects: [{
|
|
185529
|
+
field: "feeding",
|
|
185530
|
+
value: true
|
|
185531
|
+
}],
|
|
185532
|
+
holdMs: ONE_SHOT_HOLD_MS
|
|
185533
|
+
},
|
|
184642
185534
|
openArgs: [{
|
|
184643
185535
|
key: "grams",
|
|
184644
185536
|
label: t("Grams", "Grammi"),
|
|
@@ -184657,6 +185549,13 @@ var petFeederCapability = {
|
|
|
184657
185549
|
label: t("Feed from both hoppers", "Eroga da entrambi i serbatoi"),
|
|
184658
185550
|
phrase: t("Dispense {hopper1} and {hopper2} from {device}", "Eroga {hopper1} e {hopper2} da {device}"),
|
|
184659
185551
|
icon: "paw-print",
|
|
185552
|
+
hold: {
|
|
185553
|
+
effects: [{
|
|
185554
|
+
field: "feeding",
|
|
185555
|
+
value: true
|
|
185556
|
+
}],
|
|
185557
|
+
holdMs: ONE_SHOT_HOLD_MS
|
|
185558
|
+
},
|
|
184660
185559
|
openArgs: [{
|
|
184661
185560
|
key: "hopper1",
|
|
184662
185561
|
label: t("Hopper 1", "Serbatoio 1"),
|
|
@@ -184762,12 +185661,20 @@ var petFeederCapability = {
|
|
|
184762
185661
|
auth: "protected",
|
|
184763
185662
|
actions: [{
|
|
184764
185663
|
id: "petFeeder.childLockOn",
|
|
185664
|
+
effect: {
|
|
185665
|
+
field: "childLock",
|
|
185666
|
+
value: true
|
|
185667
|
+
},
|
|
184765
185668
|
label: t("Child lock on", "Blocco bambini attivo"),
|
|
184766
185669
|
phrase: t("Turn on the child lock of {device}", "Attiva il blocco bambini di {device}"),
|
|
184767
185670
|
icon: "lock",
|
|
184768
185671
|
args: { on: true }
|
|
184769
185672
|
}, {
|
|
184770
185673
|
id: "petFeeder.childLockOff",
|
|
185674
|
+
effect: {
|
|
185675
|
+
field: "childLock",
|
|
185676
|
+
value: false
|
|
185677
|
+
},
|
|
184771
185678
|
label: t("Child lock off", "Blocco bambini spento"),
|
|
184772
185679
|
phrase: t("Turn off the child lock of {device}", "Disattiva il blocco bambini di {device}"),
|
|
184773
185680
|
icon: "lock-open",
|
|
@@ -184783,12 +185690,20 @@ var petFeederCapability = {
|
|
|
184783
185690
|
auth: "protected",
|
|
184784
185691
|
actions: [{
|
|
184785
185692
|
id: "petFeeder.lightOn",
|
|
185693
|
+
effect: {
|
|
185694
|
+
field: "indicatorLight",
|
|
185695
|
+
value: true
|
|
185696
|
+
},
|
|
184786
185697
|
label: t("Indicator light on", "Spia accesa"),
|
|
184787
185698
|
phrase: t("Turn on the indicator light of {device}", "Accendi la spia di {device}"),
|
|
184788
185699
|
icon: "lightbulb",
|
|
184789
185700
|
args: { on: true }
|
|
184790
185701
|
}, {
|
|
184791
185702
|
id: "petFeeder.lightOff",
|
|
185703
|
+
effect: {
|
|
185704
|
+
field: "indicatorLight",
|
|
185705
|
+
value: false
|
|
185706
|
+
},
|
|
184792
185707
|
label: t("Indicator light off", "Spia spenta"),
|
|
184793
185708
|
phrase: t("Turn off the indicator light of {device}", "Spegni la spia di {device}"),
|
|
184794
185709
|
icon: "lightbulb-off",
|
|
@@ -184804,12 +185719,20 @@ var petFeederCapability = {
|
|
|
184804
185719
|
auth: "protected",
|
|
184805
185720
|
actions: [{
|
|
184806
185721
|
id: "petFeeder.feedSoundOn",
|
|
185722
|
+
effect: {
|
|
185723
|
+
field: "feedSound",
|
|
185724
|
+
value: true
|
|
185725
|
+
},
|
|
184807
185726
|
label: t("Feeding sound on", "Suono di erogazione attivo"),
|
|
184808
185727
|
phrase: t("Turn on the feeding sound of {device}", "Attiva il suono di erogazione di {device}"),
|
|
184809
185728
|
icon: "volume-2",
|
|
184810
185729
|
args: { on: true }
|
|
184811
185730
|
}, {
|
|
184812
185731
|
id: "petFeeder.feedSoundOff",
|
|
185732
|
+
effect: {
|
|
185733
|
+
field: "feedSound",
|
|
185734
|
+
value: false
|
|
185735
|
+
},
|
|
184813
185736
|
label: t("Feeding sound off", "Suono di erogazione spento"),
|
|
184814
185737
|
phrase: t("Turn off the feeding sound of {device}", "Disattiva il suono di erogazione di {device}"),
|
|
184815
185738
|
icon: "volume-x",
|
|
@@ -184825,6 +185748,10 @@ var petFeederCapability = {
|
|
|
184825
185748
|
auth: "protected",
|
|
184826
185749
|
actions: [{
|
|
184827
185750
|
id: "petFeeder.volume",
|
|
185751
|
+
effect: {
|
|
185752
|
+
field: "volume",
|
|
185753
|
+
fromArg: "level"
|
|
185754
|
+
},
|
|
184828
185755
|
label: t("Set volume", "Imposta il volume"),
|
|
184829
185756
|
phrase: t("Set the volume of {device} to {level}", "Imposta il volume di {device} a {level}"),
|
|
184830
185757
|
icon: "volume-2",
|
|
@@ -184970,12 +185897,20 @@ setPump: method(object({
|
|
|
184970
185897
|
auth: "protected",
|
|
184971
185898
|
actions: [{
|
|
184972
185899
|
id: "petFountain.pumpOn",
|
|
185900
|
+
effect: {
|
|
185901
|
+
field: "pumpRunning",
|
|
185902
|
+
value: true
|
|
185903
|
+
},
|
|
184973
185904
|
label: t("Pump on", "Pompa accesa"),
|
|
184974
185905
|
phrase: t("Start the pump of {device}", "Avvia la pompa di {device}"),
|
|
184975
185906
|
icon: "play",
|
|
184976
185907
|
args: { on: true }
|
|
184977
185908
|
}, {
|
|
184978
185909
|
id: "petFountain.pumpOff",
|
|
185910
|
+
effect: {
|
|
185911
|
+
field: "pumpRunning",
|
|
185912
|
+
value: false
|
|
185913
|
+
},
|
|
184979
185914
|
label: t("Pump off", "Pompa spenta"),
|
|
184980
185915
|
phrase: t("Stop the pump of {device}", "Ferma la pompa di {device}"),
|
|
184981
185916
|
icon: "square",
|
|
@@ -185522,7 +186457,15 @@ var DeviceStepConfigSchema = object({
|
|
|
185522
186457
|
* at a disabled/absent device on that node at save time. Absent ⇒ the runner
|
|
185523
186458
|
* auto-jumps only when the effective device's format cannot run the step.
|
|
185524
186459
|
*/
|
|
185525
|
-
jumpDeviceKey: string().optional()
|
|
186460
|
+
jumpDeviceKey: string().optional(),
|
|
186461
|
+
/**
|
|
186462
|
+
* DEVICE switch for this step (D1065). `false` = the step is never
|
|
186463
|
+
* provisioned on this accelerator: a detail step jumps to another enabled
|
|
186464
|
+
* device of the node where it is allowed, else it is skipped with reason
|
|
186465
|
+
* `disabled-on-device`; a root is skipped. Absent = inherit (on). Written by
|
|
186466
|
+
* `setDeviceStepEnabled`.
|
|
186467
|
+
*/
|
|
186468
|
+
enabled: boolean().optional()
|
|
185526
186469
|
});
|
|
185527
186470
|
var AgentPipelineSettingsSchema = object({
|
|
185528
186471
|
maxCameras: number$1().int().nonnegative().nullable().default(null),
|
|
@@ -185566,6 +186509,12 @@ var AgentPipelineSettingsSchema = object({
|
|
|
185566
186509
|
*/
|
|
185567
186510
|
stepSettings: record(string(), record(string(), unknown()).readonly()).optional(),
|
|
185568
186511
|
/**
|
|
186512
|
+
* NODE switch per step (D1065): `stepId → enabled`. `false` = the step never
|
|
186513
|
+
* runs on a camera whose pipeline runs on this node (skip reason
|
|
186514
|
+
* `disabled-on-node`). Absent = inherit. Written by `setNodeStepEnabled`.
|
|
186515
|
+
*/
|
|
186516
|
+
stepEnabled: record(string(), boolean()).optional(),
|
|
186517
|
+
/**
|
|
185569
186518
|
* Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
|
|
185570
186519
|
* weight, steps}. Absent / all-disabled ⇒ the node's single default
|
|
185571
186520
|
* accelerator (safe default); two+ enabled ⇒ the dispatcher balances
|
|
@@ -185887,7 +186836,8 @@ var InferenceDeviceExclusionReasonSchema = _enum([
|
|
|
185887
186836
|
"disabled",
|
|
185888
186837
|
"unavailable",
|
|
185889
186838
|
"cannot-host-camera-root",
|
|
185890
|
-
"accelerator-preferred"
|
|
186839
|
+
"accelerator-preferred",
|
|
186840
|
+
"root-switched-off"
|
|
185891
186841
|
]);
|
|
185892
186842
|
var NodeInferenceDeviceSchema = object({
|
|
185893
186843
|
/** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
|
|
@@ -185973,6 +186923,75 @@ var NodeInferenceDevicesSchema = object({
|
|
|
185973
186923
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
185974
186924
|
});
|
|
185975
186925
|
/**
|
|
186926
|
+
* The CLUSTER switch of one pipeline step (D1065):
|
|
186927
|
+
* - `off` — hard off: no camera, node or device can turn it on;
|
|
186928
|
+
* - `on` — on by default; a camera may turn it off (`stepToggles`);
|
|
186929
|
+
* - `opt-in` — off by default; a camera turns it on (`stepToggles`).
|
|
186930
|
+
* Absent = the catalog's `enabledByDefault` (`true` → `on`, `false` → `opt-in`).
|
|
186931
|
+
*/
|
|
186932
|
+
var StepClusterModeSchema = _enum([
|
|
186933
|
+
"off",
|
|
186934
|
+
"on",
|
|
186935
|
+
"opt-in"
|
|
186936
|
+
]);
|
|
186937
|
+
/**
|
|
186938
|
+
* What one step does on one (node, device) — computed by the orchestrator with
|
|
186939
|
+
* the SAME placement function the attach path runs (`pipeline-resolver.ts`),
|
|
186940
|
+
* so a client never re-derives it. Precedence: cluster off > camera toggle
|
|
186941
|
+
* (else the cluster default) > node off > device off / jump.
|
|
186942
|
+
*/
|
|
186943
|
+
var StepSwitchCellSchema = discriminatedUnion("kind", [
|
|
186944
|
+
object({ kind: literal("on") }),
|
|
186945
|
+
object({ kind: literal("off-cluster") }),
|
|
186946
|
+
object({ kind: literal("off-node") }),
|
|
186947
|
+
object({ kind: literal("off-device") }),
|
|
186948
|
+
object({
|
|
186949
|
+
kind: literal("jump"),
|
|
186950
|
+
toDeviceKey: string()
|
|
186951
|
+
}),
|
|
186952
|
+
object({
|
|
186953
|
+
kind: literal("skip"),
|
|
186954
|
+
reason: _enum(["no-compatible-model", "root-not-runnable-on-elected-device"])
|
|
186955
|
+
}),
|
|
186956
|
+
object({ kind: literal("zone-driven") }),
|
|
186957
|
+
object({
|
|
186958
|
+
kind: literal("supplied-by-root"),
|
|
186959
|
+
rootModelId: string()
|
|
186960
|
+
}),
|
|
186961
|
+
object({ kind: literal("opt-in-unused") })
|
|
186962
|
+
]);
|
|
186963
|
+
var StepSwitchDeviceSchema = object({
|
|
186964
|
+
deviceKey: string(),
|
|
186965
|
+
format: _enum(MODEL_FORMATS),
|
|
186966
|
+
/** The device switch as stored (`inferenceDevices[key].steps[step].enabled`); `null` = inherit. */
|
|
186967
|
+
stepEnabled: boolean().nullable(),
|
|
186968
|
+
/** Whether the device is in the node's dispatch roster (enabled, available, not excluded). */
|
|
186969
|
+
eligible: boolean(),
|
|
186970
|
+
cell: StepSwitchCellSchema
|
|
186971
|
+
});
|
|
186972
|
+
var StepSwitchNodeSchema = object({
|
|
186973
|
+
nodeId: string(),
|
|
186974
|
+
/** False when the node's catalog or device probe did not answer — no cells are claimed. */
|
|
186975
|
+
reachable: boolean(),
|
|
186976
|
+
/** The node switch as stored (`stepEnabled[step]`); `null` = inherit. */
|
|
186977
|
+
stepEnabled: boolean().nullable(),
|
|
186978
|
+
devices: array(StepSwitchDeviceSchema).readonly()
|
|
186979
|
+
});
|
|
186980
|
+
var StepSwitchMatrixSchema = object({ steps: array(object({
|
|
186981
|
+
stepId: string(),
|
|
186982
|
+
name: string(),
|
|
186983
|
+
slot: string(),
|
|
186984
|
+
/** The stored cluster mode; `null` = the catalog default applies. */
|
|
186985
|
+
clusterMode: StepClusterModeSchema.nullable(),
|
|
186986
|
+
/** The mode in force (stored, else derived from `enabledByDefault`). */
|
|
186987
|
+
effectiveMode: StepClusterModeSchema,
|
|
186988
|
+
/** Cameras whose `stepToggles[step]` is `true`. */
|
|
186989
|
+
camerasEnabling: number$1().int().nonnegative(),
|
|
186990
|
+
/** Cameras whose `stepToggles[step]` is `false`. */
|
|
186991
|
+
camerasDisabling: number$1().int().nonnegative(),
|
|
186992
|
+
nodes: array(StepSwitchNodeSchema).readonly()
|
|
186993
|
+
})).readonly() });
|
|
186994
|
+
/**
|
|
185976
186995
|
* Pipeline Orchestrator capability — global load balancer + camera dispatcher.
|
|
185977
186996
|
*
|
|
185978
186997
|
* Lives on the hub. Tracks the camera-to-agent assignment map, listens to
|
|
@@ -186143,7 +187162,28 @@ method(object({
|
|
|
186143
187162
|
}), object({ success: literal(true) }), {
|
|
186144
187163
|
kind: "mutation",
|
|
186145
187164
|
auth: "admin"
|
|
186146
|
-
}), method(object({
|
|
187165
|
+
}), method(object({
|
|
187166
|
+
stepId: string(),
|
|
187167
|
+
mode: StepClusterModeSchema.nullable()
|
|
187168
|
+
}), object({ success: literal(true) }), {
|
|
187169
|
+
kind: "mutation",
|
|
187170
|
+
auth: "admin"
|
|
187171
|
+
}), method(object({
|
|
187172
|
+
agentNodeId: string(),
|
|
187173
|
+
stepId: string(),
|
|
187174
|
+
enabled: boolean().nullable()
|
|
187175
|
+
}), object({ success: literal(true) }), {
|
|
187176
|
+
kind: "mutation",
|
|
187177
|
+
auth: "admin"
|
|
187178
|
+
}), method(object({
|
|
187179
|
+
agentNodeId: string(),
|
|
187180
|
+
deviceKey: string(),
|
|
187181
|
+
stepId: string(),
|
|
187182
|
+
enabled: boolean().nullable()
|
|
187183
|
+
}), object({ success: literal(true) }), {
|
|
187184
|
+
kind: "mutation",
|
|
187185
|
+
auth: "admin"
|
|
187186
|
+
}), method(_void(), StepSwitchMatrixSchema), method(object({ nodeId: string() }), NodeInferenceDevicesSchema), method(object({
|
|
186147
187187
|
agentNodeId: string(),
|
|
186148
187188
|
deviceKey: string()
|
|
186149
187189
|
}), object({ success: literal(true) }), {
|
|
@@ -186558,6 +187598,16 @@ var CoralInfoSchema = object({
|
|
|
186558
187598
|
reason: _enum(["driver-missing", "device-not-accessible"])
|
|
186559
187599
|
})).readonly().optional()
|
|
186560
187600
|
});
|
|
187601
|
+
var NvidiaInfoBaseSchema = object({
|
|
187602
|
+
type: literal("nvidia"),
|
|
187603
|
+
name: string(),
|
|
187604
|
+
memoryMB: number$1().optional()
|
|
187605
|
+
});
|
|
187606
|
+
/** An NVIDIA GPU: usable ⇔ the CUDA execution provider exists; otherwise the reason. */
|
|
187607
|
+
var NvidiaInfoSchema = discriminatedUnion("usable", [NvidiaInfoBaseSchema.extend({ usable: literal(true) }), NvidiaInfoBaseSchema.extend({
|
|
187608
|
+
usable: literal(false),
|
|
187609
|
+
reason: _enum(["no-cuda-execution-provider"])
|
|
187610
|
+
})]);
|
|
186561
187611
|
var HardwareInfoSchema = object({
|
|
186562
187612
|
platform: HardwarePlatformSchema,
|
|
186563
187613
|
arch: HardwareArchSchema,
|
|
@@ -186568,6 +187618,7 @@ var HardwareInfoSchema = object({
|
|
|
186568
187618
|
gpu: GpuInfoSchema.nullable(),
|
|
186569
187619
|
npu: NpuInfoSchema.nullable(),
|
|
186570
187620
|
coral: CoralInfoSchema.nullable().optional(),
|
|
187621
|
+
nvidia: NvidiaInfoSchema.nullable().optional(),
|
|
186571
187622
|
/**
|
|
186572
187623
|
* Per-accelerator compute (D930). Omitted by a node that has not probed it.
|
|
186573
187624
|
* `null` fields inside an entry are a failed query, never a zero.
|
|
@@ -186655,8 +187706,14 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
|
|
|
186655
187706
|
* in real-world devices.
|
|
186656
187707
|
*/
|
|
186657
187708
|
var PowerMeterStatusSchema = object({
|
|
186658
|
-
/** Instantaneous power draw (watts). */
|
|
187709
|
+
/** Instantaneous TOTAL power draw of the device (watts), when known. */
|
|
186659
187710
|
power: number$1().optional().meta(readingMeta("power", { label: "Power" })),
|
|
187711
|
+
/**
|
|
187712
|
+
* Power the device passes on to downstream loads (watts), e.g. the PoE a switch delivers to
|
|
187713
|
+
* its ports. When `power` is known it already includes this (the own draw is `netPowerOf`);
|
|
187714
|
+
* a device that reports no total (a UniFi switch) carries this field alone.
|
|
187715
|
+
*/
|
|
187716
|
+
deliveredPower: number$1().optional().meta(readingMeta("power", { label: "Delivered" })),
|
|
186660
187717
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
186661
187718
|
energy: number$1().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
186662
187719
|
/** Voltage (volts). */
|
|
@@ -186691,7 +187748,8 @@ var POWER_METER_DEVICE_TYPES = [
|
|
|
186691
187748
|
DeviceType.Dishwasher,
|
|
186692
187749
|
DeviceType.Vacuum,
|
|
186693
187750
|
DeviceType.LawnMower,
|
|
186694
|
-
DeviceType.PetFeeder
|
|
187751
|
+
DeviceType.PetFeeder,
|
|
187752
|
+
DeviceType.Workload
|
|
186695
187753
|
];
|
|
186696
187754
|
/** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
|
|
186697
187755
|
var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
|
|
@@ -187862,12 +188920,20 @@ var pumpCycleCapability = {
|
|
|
187862
188920
|
auth: "protected",
|
|
187863
188921
|
actions: [{
|
|
187864
188922
|
id: "pumpCycle.on",
|
|
188923
|
+
effect: {
|
|
188924
|
+
field: "enabled",
|
|
188925
|
+
value: true
|
|
188926
|
+
},
|
|
187865
188927
|
label: t("Pump cycle on", "Ciclo pompa attivo"),
|
|
187866
188928
|
phrase: t("Run the pump of {device} on its on/off cycle", "Fai lavorare la pompa di {device} a ciclo acceso/spento"),
|
|
187867
188929
|
icon: "timer",
|
|
187868
188930
|
args: { on: true }
|
|
187869
188931
|
}, {
|
|
187870
188932
|
id: "pumpCycle.off",
|
|
188933
|
+
effect: {
|
|
188934
|
+
field: "enabled",
|
|
188935
|
+
value: false
|
|
188936
|
+
},
|
|
187871
188937
|
label: t("Pump cycle off", "Ciclo pompa spento"),
|
|
187872
188938
|
phrase: t("Run the pump of {device} continuously", "Fai lavorare la pompa di {device} in continuo"),
|
|
187873
188939
|
icon: "timer-off",
|
|
@@ -187886,6 +188952,11 @@ var pumpCycleCapability = {
|
|
|
187886
188952
|
label: t("Set pump run time", "Imposta il tempo di lavoro della pompa"),
|
|
187887
188953
|
phrase: t("Set the pump of {device} to run {minutes} minutes per cycle", "Imposta la pompa di {device} a lavorare {minutes} minuti per ciclo"),
|
|
187888
188954
|
icon: "timer",
|
|
188955
|
+
effect: {
|
|
188956
|
+
field: "onTime",
|
|
188957
|
+
fromArg: "minutes",
|
|
188958
|
+
scale: 60
|
|
188959
|
+
},
|
|
187889
188960
|
openArgs: [{
|
|
187890
188961
|
key: "minutes",
|
|
187891
188962
|
label: t("Minutes", "Minuti"),
|
|
@@ -187910,6 +188981,11 @@ var pumpCycleCapability = {
|
|
|
187910
188981
|
label: t("Set pump rest time", "Imposta il tempo di riposo della pompa"),
|
|
187911
188982
|
phrase: t("Set the pump of {device} to rest {minutes} minutes per cycle", "Imposta la pompa di {device} a riposare {minutes} minuti per ciclo"),
|
|
187912
188983
|
icon: "timer-off",
|
|
188984
|
+
effect: {
|
|
188985
|
+
field: "offTime",
|
|
188986
|
+
fromArg: "minutes",
|
|
188987
|
+
scale: 60
|
|
188988
|
+
},
|
|
187913
188989
|
openArgs: [{
|
|
187914
188990
|
key: "minutes",
|
|
187915
188991
|
label: t("Minutes", "Minuti"),
|
|
@@ -191178,6 +192254,27 @@ var RemoteLayoutComponentSchema = object({
|
|
|
191178
192254
|
});
|
|
191179
192255
|
});
|
|
191180
192256
|
method(object({}), array(RemoteLayoutComponentSchema), { auth: "protected" });
|
|
192257
|
+
/**
|
|
192258
|
+
* resync — a device whose derived spec can be re-aligned on demand with its
|
|
192259
|
+
* upstream source (#459, Q6). Registered by the containers an integration
|
|
192260
|
+
* adopted; `DeviceFeature.Resyncable` (the generic Re-sync button) is derived
|
|
192261
|
+
* from it being bound with `resync` implemented.
|
|
192262
|
+
*
|
|
192263
|
+
* The work itself stays where it is: the owning addon's `device-adoption`
|
|
192264
|
+
* provider, reached through `deviceManager.adoptionResync` (which also owns
|
|
192265
|
+
* the "resync from zero" child purge). A provider answers this method by
|
|
192266
|
+
* asking for exactly that — see `resyncThroughAdoption`.
|
|
192267
|
+
*/
|
|
192268
|
+
var ResyncDeviceInputSchema = object({
|
|
192269
|
+
deviceId: number$1().int().nonnegative(),
|
|
192270
|
+
/** "Resync from zero": purge the accessory children before re-deriving. */
|
|
192271
|
+
resetToSource: boolean().optional()
|
|
192272
|
+
});
|
|
192273
|
+
DeviceType.Container, DeviceType.Workload, DeviceType.WeatherStation, method(ResyncDeviceInputSchema, ResyncResultSchema, {
|
|
192274
|
+
kind: "mutation",
|
|
192275
|
+
auth: "admin",
|
|
192276
|
+
notOperatorFacing: "device adoption — re-aligning a device with its source is an onboarding step, not an automation action"
|
|
192277
|
+
});
|
|
191181
192278
|
var RUNNING_POWER_START_DELAY_MS = 3e4;
|
|
191182
192279
|
var RUNNING_POWER_STOP_DELAY_MS = 18e4;
|
|
191183
192280
|
/**
|
|
@@ -191859,7 +192956,14 @@ var scriptRunnerCapability = {
|
|
|
191859
192956
|
id: "script.run",
|
|
191860
192957
|
label: t("Run script", "Esegui lo script"),
|
|
191861
192958
|
phrase: t("Run {device}", "Esegui {device}"),
|
|
191862
|
-
icon: "scroll-text"
|
|
192959
|
+
icon: "scroll-text",
|
|
192960
|
+
hold: {
|
|
192961
|
+
effects: [{
|
|
192962
|
+
field: "isRunning",
|
|
192963
|
+
value: true
|
|
192964
|
+
}],
|
|
192965
|
+
holdMs: ONE_SHOT_HOLD_MS
|
|
192966
|
+
}
|
|
191863
192967
|
}]
|
|
191864
192968
|
}),
|
|
191865
192969
|
/** Cancel a running script. Provider rejects when the script
|
|
@@ -191869,6 +192973,10 @@ var scriptRunnerCapability = {
|
|
|
191869
192973
|
auth: "admin",
|
|
191870
192974
|
actions: [{
|
|
191871
192975
|
id: "script.stop",
|
|
192976
|
+
effect: {
|
|
192977
|
+
field: "isRunning",
|
|
192978
|
+
value: false
|
|
192979
|
+
},
|
|
191872
192980
|
label: t("Stop script", "Ferma lo script"),
|
|
191873
192981
|
phrase: t("Stop {device}", "Ferma {device}"),
|
|
191874
192982
|
icon: "square"
|
|
@@ -193835,6 +194943,10 @@ var switchCapability = {
|
|
|
193835
194943
|
auth: "protected",
|
|
193836
194944
|
actions: [{
|
|
193837
194945
|
id: "switch.toggle",
|
|
194946
|
+
sideEffects: [{
|
|
194947
|
+
field: "on",
|
|
194948
|
+
negate: true
|
|
194949
|
+
}],
|
|
193838
194950
|
label: t("Toggle", "Commuta"),
|
|
193839
194951
|
phrase: t("Toggle {device}", "Commuta {device}"),
|
|
193840
194952
|
icon: "toggle-right",
|
|
@@ -200189,6 +201301,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
200189
201301
|
irTransmitter: irTransmitterCapability,
|
|
200190
201302
|
lawnMowerControl: lawnMowerControlCapability,
|
|
200191
201303
|
lockControl: lockControlCapability,
|
|
201304
|
+
lowPowerSleep: lowPowerSleepCapability,
|
|
200192
201305
|
mediaPlayer: mediaPlayerCapability,
|
|
200193
201306
|
meter: meterCapability,
|
|
200194
201307
|
motion: motionCapability,
|
|
@@ -200624,6 +201737,20 @@ var BaseDevice = class {
|
|
|
200624
201737
|
}, raw, options);
|
|
200625
201738
|
}
|
|
200626
201739
|
/**
|
|
201740
|
+
* Declare the identity of the device at the FAR END of this device's physical
|
|
201741
|
+
* link (D1063): a PoE port's wired client. Same normalisation, `unread`
|
|
201742
|
+
* rule and owner check as {@link declareIdentifiers}, written through
|
|
201743
|
+
* `device-manager.setAttachedIdentifiers`. It never makes the two devices the
|
|
201744
|
+
* same device. Best-effort: never throws.
|
|
201745
|
+
*/
|
|
201746
|
+
async declareAttachedIdentifiers(raw, options) {
|
|
201747
|
+
return declareDeviceIdentifiers({
|
|
201748
|
+
deviceId: this.id,
|
|
201749
|
+
logger: this.ctx.logger,
|
|
201750
|
+
writer: this.ctx.api.deviceManager?.setAttachedIdentifiers
|
|
201751
|
+
}, raw, options);
|
|
201752
|
+
}
|
|
201753
|
+
/**
|
|
200627
201754
|
* Re-publish the device's current `features` array to the persisted
|
|
200628
201755
|
* meta blob. Drivers call this after a probe finishes when the live
|
|
200629
201756
|
* `features` getter has gained new flags (e.g. `hasIntercom` flips
|
|
@@ -201668,6 +202795,19 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
201668
202795
|
return toDeviceSummary(device, this.addonId);
|
|
201669
202796
|
}
|
|
201670
202797
|
};
|
|
202798
|
+
/**
|
|
202799
|
+
* The `low-power-sleep` slice a provider projects from the `battery` slice it
|
|
202800
|
+
* already keeps: the sleep inputs, nothing else. One fact, one writer — the
|
|
202801
|
+
* provider's battery bookkeeping stays the source until the sleep state gets
|
|
202802
|
+
* its own writer.
|
|
202803
|
+
*/
|
|
202804
|
+
function sleepSliceOfBattery(status) {
|
|
202805
|
+
return {
|
|
202806
|
+
sleeping: status.sleeping,
|
|
202807
|
+
...status.lastContactAt !== void 0 ? { lastContactAt: status.lastContactAt } : {},
|
|
202808
|
+
lastUpdated: status.lastUpdated
|
|
202809
|
+
};
|
|
202810
|
+
}
|
|
201671
202811
|
DeviceType.HeatPump;
|
|
201672
202812
|
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;
|
|
201673
202813
|
new Set(Object.values(DeviceType));
|
|
@@ -201878,8 +203018,8 @@ var ALARM_MODES = [
|
|
|
201878
203018
|
"vacation",
|
|
201879
203019
|
"custom_bypass"
|
|
201880
203020
|
];
|
|
201881
|
-
function alarmControls(state, modes,
|
|
201882
|
-
if (
|
|
203021
|
+
function alarmControls(state, modes, codeRequired) {
|
|
203022
|
+
if (codeRequired) return [];
|
|
201883
203023
|
const disarm = asAction(action("alarm.disarm", t("Disarm", "Disinserisci"), "shield-off", "alarm-panel", "disarm", {}, "primary"));
|
|
201884
203024
|
const arm = (primaryFirst) => modes.map((mode, i) => asAction(action(`alarm.arm.${mode}`, ARM_LABELS[mode], "shield-check", "alarm-panel", "arm", { mode }, primaryFirst && i === 0 ? "primary" : "normal")));
|
|
201885
203025
|
switch (state) {
|
|
@@ -201899,7 +203039,7 @@ var ACCESS_FAMILY_CONTRIBUTIONS = {
|
|
|
201899
203039
|
const modes = slice === void 0 ? ALARM_MODES : slice.availableModes;
|
|
201900
203040
|
return {
|
|
201901
203041
|
reading: reading("alarm-panel", words?.state ?? "unknown", false, words?.title),
|
|
201902
|
-
rows: [row$1("alarm", state === "triggered" ? "shield-alert" : state === "disarmed" ? "shield-off" : "shield-check", joinText([words?.title ?? NOT_REPORTED, since]), alarmControls(state, modes, slice?.
|
|
203042
|
+
rows: [row$1("alarm", state === "triggered" ? "shield-alert" : state === "disarmed" ? "shield-off" : "shield-check", joinText([words?.title ?? NOT_REPORTED, since]), alarmControls(state, modes, slice?.codeRequired !== false))],
|
|
201903
203043
|
...since === null || words === null ? {} : { facts: [fact("since", "clock", since, state === "triggered" ? "danger" : "muted")] },
|
|
201904
203044
|
...words === null ? {} : { tiles: {
|
|
201905
203045
|
left: [{
|
|
@@ -202339,23 +203479,56 @@ var fountainContribution = contribution("pet-fountain", PetFountainStatusSchema,
|
|
|
202339
203479
|
};
|
|
202340
203480
|
});
|
|
202341
203481
|
var minutesOf = (seconds) => Math.max(0, Math.round(seconds / 60));
|
|
203482
|
+
var pumpCycleContribution = contribution("pump-cycle", PumpCycleStatusSchema, (slice) => {
|
|
203483
|
+
const enabled = slice?.enabled ?? null;
|
|
203484
|
+
const cycle = slice?.onTime != null && slice.offTime != null ? t(`${minutesOf(slice.onTime)} min on · ${minutesOf(slice.offTime)} min off`, `${minutesOf(slice.onTime)} min acceso · ${minutesOf(slice.offTime)} min spento`) : null;
|
|
203485
|
+
return { rows: [row$1("pump-cycle", "timer", enabled === null ? unknownText : enabled ? joinText([t("Cycling", "A cicli"), cycle]) : t("Runs continuously", "Sempre attiva"), [{
|
|
203486
|
+
kind: "toggle",
|
|
203487
|
+
id: "pump-cycle.enabled",
|
|
203488
|
+
label: t("Pump cycle", "Ciclo pompa"),
|
|
203489
|
+
on: enabled,
|
|
203490
|
+
turnOn: action("pump-cycle.on", t("Cycle the pump", "Attiva il ciclo"), "timer", "pump-cycle", "setEnabled", { on: true }),
|
|
203491
|
+
turnOff: action("pump-cycle.off", t("Run continuously", "Sempre attiva"), "timer-off", "pump-cycle", "setEnabled", { on: false })
|
|
203492
|
+
}])] };
|
|
203493
|
+
});
|
|
203494
|
+
var WORKLOAD_WORDS = {
|
|
203495
|
+
running: {
|
|
203496
|
+
state: "on",
|
|
203497
|
+
title: t("Running", "In esecuzione")
|
|
203498
|
+
},
|
|
203499
|
+
paused: {
|
|
203500
|
+
state: "standby",
|
|
203501
|
+
title: t("Paused", "In pausa")
|
|
203502
|
+
},
|
|
203503
|
+
stopped: {
|
|
203504
|
+
state: "off",
|
|
203505
|
+
title: t("Stopped", "Fermo")
|
|
203506
|
+
},
|
|
203507
|
+
starting: {
|
|
203508
|
+
state: "running",
|
|
203509
|
+
title: t("Starting", "In avvio")
|
|
203510
|
+
},
|
|
203511
|
+
stopping: {
|
|
203512
|
+
state: "running",
|
|
203513
|
+
title: t("Stopping", "In arresto")
|
|
203514
|
+
},
|
|
203515
|
+
crashed: {
|
|
203516
|
+
state: "alert",
|
|
203517
|
+
title: t("Crashed", "Andato in errore")
|
|
203518
|
+
}
|
|
203519
|
+
};
|
|
202342
203520
|
var DEVICES_FAMILY_CONTRIBUTIONS = {
|
|
202343
203521
|
"fan-control": fanContribution,
|
|
202344
203522
|
"vacuum-control": vacuumContribution,
|
|
202345
203523
|
"lawn-mower-control": mowerContribution,
|
|
202346
203524
|
"pet-feeder": feederContribution,
|
|
202347
203525
|
"pet-fountain": fountainContribution,
|
|
202348
|
-
"pump-cycle":
|
|
202349
|
-
|
|
202350
|
-
const
|
|
202351
|
-
|
|
202352
|
-
|
|
202353
|
-
|
|
202354
|
-
label: t("Pump cycle", "Ciclo pompa"),
|
|
202355
|
-
on: enabled,
|
|
202356
|
-
turnOn: action("pump-cycle.on", t("Cycle the pump", "Attiva il ciclo"), "timer", "pump-cycle", "setEnabled", { on: true }),
|
|
202357
|
-
turnOff: action("pump-cycle.off", t("Run continuously", "Sempre attiva"), "timer-off", "pump-cycle", "setEnabled", { on: false })
|
|
202358
|
-
}])] };
|
|
203526
|
+
"pump-cycle": pumpCycleContribution,
|
|
203527
|
+
workload: contribution("workload", WorkloadStatusSchema, (slice) => {
|
|
203528
|
+
const state = slice?.state ?? null;
|
|
203529
|
+
if (state === null) return { reading: reading("workload", "unknown") };
|
|
203530
|
+
const words = WORKLOAD_WORDS[state];
|
|
203531
|
+
return { reading: reading("workload", words.state, false, words.title) };
|
|
202359
203532
|
})
|
|
202360
203533
|
};
|
|
202361
203534
|
/**
|
|
@@ -204370,7 +205543,7 @@ lookOf({
|
|
|
204370
205543
|
});
|
|
204371
205544
|
DeviceType.Climate;
|
|
204372
205545
|
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;
|
|
204373
|
-
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;
|
|
205546
|
+
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, DeviceRole.Ups;
|
|
204374
205547
|
Object.freeze({
|
|
204375
205548
|
"accessories.getStatus": {
|
|
204376
205549
|
capName: "accessories",
|
|
@@ -205282,13 +206455,6 @@ Object.freeze({
|
|
|
205282
206455
|
access: "view",
|
|
205283
206456
|
role: "viewer"
|
|
205284
206457
|
},
|
|
205285
|
-
"battery.wakeForStream": {
|
|
205286
|
-
capName: "battery",
|
|
205287
|
-
capScope: "device",
|
|
205288
|
-
addonId: null,
|
|
205289
|
-
access: "create",
|
|
205290
|
-
role: "viewer"
|
|
205291
|
-
},
|
|
205292
206458
|
"binary.getStatus": {
|
|
205293
206459
|
capName: "binary",
|
|
205294
206460
|
capScope: "device",
|
|
@@ -206577,6 +207743,13 @@ Object.freeze({
|
|
|
206577
207743
|
access: "create",
|
|
206578
207744
|
role: "admin"
|
|
206579
207745
|
},
|
|
207746
|
+
"deviceManager.confirmIdentityLink": {
|
|
207747
|
+
capName: "device-manager",
|
|
207748
|
+
capScope: "system",
|
|
207749
|
+
addonId: null,
|
|
207750
|
+
access: "create",
|
|
207751
|
+
role: "admin"
|
|
207752
|
+
},
|
|
206580
207753
|
"deviceManager.createDevice": {
|
|
206581
207754
|
capName: "device-manager",
|
|
206582
207755
|
capScope: "system",
|
|
@@ -206626,6 +207799,13 @@ Object.freeze({
|
|
|
206626
207799
|
access: "create",
|
|
206627
207800
|
role: "admin"
|
|
206628
207801
|
},
|
|
207802
|
+
"deviceManager.dismissIdentityLink": {
|
|
207803
|
+
capName: "device-manager",
|
|
207804
|
+
capScope: "system",
|
|
207805
|
+
addonId: null,
|
|
207806
|
+
access: "create",
|
|
207807
|
+
role: "admin"
|
|
207808
|
+
},
|
|
206629
207809
|
"deviceManager.enable": {
|
|
206630
207810
|
capName: "device-manager",
|
|
206631
207811
|
capScope: "system",
|
|
@@ -206815,6 +207995,20 @@ Object.freeze({
|
|
|
206815
207995
|
access: "view",
|
|
206816
207996
|
role: "admin"
|
|
206817
207997
|
},
|
|
207998
|
+
"deviceManager.listIdentityCandidates": {
|
|
207999
|
+
capName: "device-manager",
|
|
208000
|
+
capScope: "system",
|
|
208001
|
+
addonId: null,
|
|
208002
|
+
access: "view",
|
|
208003
|
+
role: "admin"
|
|
208004
|
+
},
|
|
208005
|
+
"deviceManager.listIdentityLinks": {
|
|
208006
|
+
capName: "device-manager",
|
|
208007
|
+
capScope: "system",
|
|
208008
|
+
addonId: null,
|
|
208009
|
+
access: "view",
|
|
208010
|
+
role: "admin"
|
|
208011
|
+
},
|
|
206818
208012
|
"deviceManager.listLocationDescriptions": {
|
|
206819
208013
|
capName: "device-manager",
|
|
206820
208014
|
capScope: "system",
|
|
@@ -207011,6 +208205,13 @@ Object.freeze({
|
|
|
207011
208205
|
access: "create",
|
|
207012
208206
|
role: "admin"
|
|
207013
208207
|
},
|
|
208208
|
+
"deviceManager.setAttachedIdentifiers": {
|
|
208209
|
+
capName: "device-manager",
|
|
208210
|
+
capScope: "system",
|
|
208211
|
+
addonId: null,
|
|
208212
|
+
access: "create",
|
|
208213
|
+
role: "admin"
|
|
208214
|
+
},
|
|
207014
208215
|
"deviceManager.setChildLayout": {
|
|
207015
208216
|
capName: "device-manager",
|
|
207016
208217
|
capScope: "system",
|
|
@@ -207172,6 +208373,13 @@ Object.freeze({
|
|
|
207172
208373
|
access: "create",
|
|
207173
208374
|
role: "admin"
|
|
207174
208375
|
},
|
|
208376
|
+
"deviceManager.unlinkIdentity": {
|
|
208377
|
+
capName: "device-manager",
|
|
208378
|
+
capScope: "system",
|
|
208379
|
+
addonId: null,
|
|
208380
|
+
access: "delete",
|
|
208381
|
+
role: "admin"
|
|
208382
|
+
},
|
|
207175
208383
|
"deviceManager.updateConfig": {
|
|
207176
208384
|
capName: "device-manager",
|
|
207177
208385
|
capScope: "system",
|
|
@@ -207452,6 +208660,20 @@ Object.freeze({
|
|
|
207452
208660
|
access: "create",
|
|
207453
208661
|
role: "admin"
|
|
207454
208662
|
},
|
|
208663
|
+
"deviceStateRefresh.refresh": {
|
|
208664
|
+
capName: "device-state-refresh",
|
|
208665
|
+
capScope: "device",
|
|
208666
|
+
addonId: null,
|
|
208667
|
+
access: "create",
|
|
208668
|
+
role: "admin"
|
|
208669
|
+
},
|
|
208670
|
+
"deviceStateRefresh.resubscribe": {
|
|
208671
|
+
capName: "device-state-refresh",
|
|
208672
|
+
capScope: "device",
|
|
208673
|
+
addonId: null,
|
|
208674
|
+
access: "create",
|
|
208675
|
+
role: "admin"
|
|
208676
|
+
},
|
|
207455
208677
|
"deviceStatus.getStatus": {
|
|
207456
208678
|
capName: "device-status",
|
|
207457
208679
|
capScope: "device",
|
|
@@ -208936,6 +210158,20 @@ Object.freeze({
|
|
|
208936
210158
|
access: "view",
|
|
208937
210159
|
role: "admin"
|
|
208938
210160
|
},
|
|
210161
|
+
"lowPowerSleep.getStatus": {
|
|
210162
|
+
capName: "low-power-sleep",
|
|
210163
|
+
capScope: "device",
|
|
210164
|
+
addonId: null,
|
|
210165
|
+
access: "view",
|
|
210166
|
+
role: "viewer"
|
|
210167
|
+
},
|
|
210168
|
+
"lowPowerSleep.wakeUp": {
|
|
210169
|
+
capName: "low-power-sleep",
|
|
210170
|
+
capScope: "device",
|
|
210171
|
+
addonId: null,
|
|
210172
|
+
access: "create",
|
|
210173
|
+
role: "viewer"
|
|
210174
|
+
},
|
|
208939
210175
|
"mediaPlayer.channelDown": {
|
|
208940
210176
|
capName: "media-player",
|
|
208941
210177
|
capScope: "device",
|
|
@@ -211309,6 +212545,13 @@ Object.freeze({
|
|
|
211309
212545
|
access: "view",
|
|
211310
212546
|
role: "admin"
|
|
211311
212547
|
},
|
|
212548
|
+
"pipelineOrchestrator.getStepSwitches": {
|
|
212549
|
+
capName: "pipeline-orchestrator",
|
|
212550
|
+
capScope: "system",
|
|
212551
|
+
addonId: null,
|
|
212552
|
+
access: "view",
|
|
212553
|
+
role: "admin"
|
|
212554
|
+
},
|
|
211312
212555
|
"pipelineOrchestrator.listAgentSettings": {
|
|
211313
212556
|
capName: "pipeline-orchestrator",
|
|
211314
212557
|
capScope: "system",
|
|
@@ -211463,6 +212706,20 @@ Object.freeze({
|
|
|
211463
212706
|
access: "create",
|
|
211464
212707
|
role: "admin"
|
|
211465
212708
|
},
|
|
212709
|
+
"pipelineOrchestrator.setClusterStepMode": {
|
|
212710
|
+
capName: "pipeline-orchestrator",
|
|
212711
|
+
capScope: "system",
|
|
212712
|
+
addonId: null,
|
|
212713
|
+
access: "create",
|
|
212714
|
+
role: "admin"
|
|
212715
|
+
},
|
|
212716
|
+
"pipelineOrchestrator.setDeviceStepEnabled": {
|
|
212717
|
+
capName: "pipeline-orchestrator",
|
|
212718
|
+
capScope: "system",
|
|
212719
|
+
addonId: null,
|
|
212720
|
+
access: "create",
|
|
212721
|
+
role: "admin"
|
|
212722
|
+
},
|
|
211466
212723
|
"pipelineOrchestrator.setLoadBalancingShares": {
|
|
211467
212724
|
capName: "pipeline-orchestrator",
|
|
211468
212725
|
capScope: "system",
|
|
@@ -211470,6 +212727,13 @@ Object.freeze({
|
|
|
211470
212727
|
access: "create",
|
|
211471
212728
|
role: "admin"
|
|
211472
212729
|
},
|
|
212730
|
+
"pipelineOrchestrator.setNodeStepEnabled": {
|
|
212731
|
+
capName: "pipeline-orchestrator",
|
|
212732
|
+
capScope: "system",
|
|
212733
|
+
addonId: null,
|
|
212734
|
+
access: "create",
|
|
212735
|
+
role: "admin"
|
|
212736
|
+
},
|
|
211473
212737
|
"pipelineOrchestrator.setNodeStepSettings": {
|
|
211474
212738
|
capName: "pipeline-orchestrator",
|
|
211475
212739
|
capScope: "system",
|
|
@@ -212611,6 +213875,13 @@ Object.freeze({
|
|
|
212611
213875
|
access: "view",
|
|
212612
213876
|
role: "admin"
|
|
212613
213877
|
},
|
|
213878
|
+
"resync.resync": {
|
|
213879
|
+
capName: "resync",
|
|
213880
|
+
capScope: "device",
|
|
213881
|
+
addonId: null,
|
|
213882
|
+
access: "create",
|
|
213883
|
+
role: "admin"
|
|
213884
|
+
},
|
|
212614
213885
|
"runningState.getStatus": {
|
|
212615
213886
|
capName: "running-state",
|
|
212616
213887
|
capScope: "device",
|
|
@@ -215006,7 +216277,7 @@ Object.freeze({
|
|
|
215006
216277
|
role: "admin"
|
|
215007
216278
|
}
|
|
215008
216279
|
});
|
|
215009
|
-
DeviceFeature.
|
|
216280
|
+
DeviceFeature.Sleeps;
|
|
215010
216281
|
function bound(cap, methods = [], authority = "reported") {
|
|
215011
216282
|
return {
|
|
215012
216283
|
kind: "cap",
|
|
@@ -215018,11 +216289,11 @@ function bound(cap, methods = [], authority = "reported") {
|
|
|
215018
216289
|
function derived(cap, methods = []) {
|
|
215019
216290
|
return bound(cap, methods, "derived");
|
|
215020
216291
|
}
|
|
215021
|
-
DeviceFeature.BatteryOperated, DeviceFeature.Rebootable, derived("reboot", ["reboot"]), DeviceFeature.Resyncable, DeviceFeature.NativeSnapshot, DeviceFeature.DoorbellButton, derived("doorbell"), DeviceFeature.TwoWayAudio, derived("intercom", [
|
|
216292
|
+
DeviceFeature.BatteryOperated, DeviceFeature.Sleeps, derived("low-power-sleep", ["wakeUp"]), DeviceFeature.Rebootable, derived("reboot", ["reboot"]), DeviceFeature.Resyncable, derived("resync", ["resync"]), DeviceFeature.NativeSnapshot, DeviceFeature.DoorbellButton, derived("doorbell"), DeviceFeature.TwoWayAudio, derived("intercom", [
|
|
215022
216293
|
"startTalkSession",
|
|
215023
216294
|
"pushTalkAudio",
|
|
215024
216295
|
"endTalkSession"
|
|
215025
|
-
]), DeviceFeature.PanTiltZoom, derived("ptz"), DeviceFeature.PtzAutotrack, derived("ptz-autotrack"), DeviceFeature.MotionTrigger, derived("motion-trigger", ["setMotionTrigger"]), DeviceFeature.TimedRun, derived("timed-run", ["runFor"]), DeviceFeature.Switch, DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired, DeviceFeature.ClimateDualSetpoint, DeviceFeature.ClimateHumidity, DeviceFeature.ClimateFanMode, DeviceFeature.ClimatePreset, DeviceFeature.ClimateSwingVertical, DeviceFeature.ClimateSwingHorizontal, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.CoverStoppable, DeviceFeature.ValvePositionable, DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.
|
|
216296
|
+
]), DeviceFeature.PanTiltZoom, derived("ptz"), DeviceFeature.PtzAutotrack, derived("ptz-autotrack"), DeviceFeature.MotionTrigger, derived("motion-trigger", ["setMotionTrigger"]), DeviceFeature.TimedRun, derived("timed-run", ["runFor"]), DeviceFeature.Switch, DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired, DeviceFeature.ClimateDualSetpoint, DeviceFeature.ClimateHumidity, DeviceFeature.ClimateFanMode, DeviceFeature.ClimatePreset, DeviceFeature.ClimateSwingVertical, DeviceFeature.ClimateSwingHorizontal, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.CoverStoppable, DeviceFeature.ValvePositionable, DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.LockOpen, DeviceFeature.MediaPlayerSeek, DeviceFeature.MediaPlayerVolume, DeviceFeature.MediaPlayerMute, DeviceFeature.MediaPlayerShuffle, DeviceFeature.MediaPlayerRepeat, DeviceFeature.MediaPlayerSelectSource, DeviceFeature.MediaPlayerPlayMedia, DeviceFeature.MediaPlayerNext, DeviceFeature.MediaPlayerPrevious, DeviceFeature.MediaPlayerStop, DeviceFeature.MediaPlayerVolumeStep, DeviceFeature.MediaPlayerChannelStep, DeviceFeature.MediaPlayerPower, DeviceFeature.PresenceGps, DeviceFeature.NotifierImage, DeviceFeature.NotifierPriority, DeviceFeature.NotifierData, DeviceFeature.NotifierActions, DeviceFeature.NotifierRecipients, DeviceFeature.ScriptVariables, DeviceFeature.AutomationSkipCondition, DeviceFeature.VacuumHasAi, DeviceFeature.MowerHasTargetedMowing, DeviceFeature.Navigation, derived("navigation"), DeviceFeature.NetworkLink, derived("network-link");
|
|
215026
216297
|
var ALL_FEATURES = Object.values(DeviceFeature);
|
|
215027
216298
|
new Set(ALL_FEATURES);
|
|
215028
216299
|
DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
|
|
@@ -215065,7 +216336,7 @@ function offered(received) {
|
|
|
215065
216336
|
}
|
|
215066
216337
|
offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
|
|
215067
216338
|
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;
|
|
215068
|
-
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;
|
|
216339
|
+
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, DeviceRole.Ups;
|
|
215069
216340
|
new Set(Object.values(DeviceType));
|
|
215070
216341
|
new Set(Object.values(DeviceRole));
|
|
215071
216342
|
var LAST_FETCHED_FIELD = "lastFetchedAt";
|
|
@@ -215370,11 +216641,6 @@ Object.freeze({
|
|
|
215370
216641
|
form: "single",
|
|
215371
216642
|
optional: false
|
|
215372
216643
|
}],
|
|
215373
|
-
"battery.wakeForStream": [{
|
|
215374
|
-
name: "deviceId",
|
|
215375
|
-
form: "single",
|
|
215376
|
-
optional: false
|
|
215377
|
-
}],
|
|
215378
216644
|
"binary.getStatus": [{
|
|
215379
216645
|
name: "deviceId",
|
|
215380
216646
|
form: "single",
|
|
@@ -215854,6 +217120,11 @@ Object.freeze({
|
|
|
215854
217120
|
form: "array",
|
|
215855
217121
|
optional: true
|
|
215856
217122
|
}],
|
|
217123
|
+
"deviceManager.listIdentityLinks": [{
|
|
217124
|
+
name: "deviceId",
|
|
217125
|
+
form: "single",
|
|
217126
|
+
optional: true
|
|
217127
|
+
}],
|
|
215857
217128
|
"deviceManager.loadConfig": [{
|
|
215858
217129
|
name: "deviceId",
|
|
215859
217130
|
form: "single",
|
|
@@ -215904,6 +217175,11 @@ Object.freeze({
|
|
|
215904
217175
|
form: "single",
|
|
215905
217176
|
optional: false
|
|
215906
217177
|
}],
|
|
217178
|
+
"deviceManager.setAttachedIdentifiers": [{
|
|
217179
|
+
name: "deviceId",
|
|
217180
|
+
form: "single",
|
|
217181
|
+
optional: false
|
|
217182
|
+
}],
|
|
215907
217183
|
"deviceManager.setChildLayout": [{
|
|
215908
217184
|
name: "deviceId",
|
|
215909
217185
|
form: "single",
|
|
@@ -216098,6 +217374,20 @@ Object.freeze({
|
|
|
216098
217374
|
form: "single",
|
|
216099
217375
|
optional: false
|
|
216100
217376
|
}],
|
|
217377
|
+
"deviceStateRefresh.refresh": [{
|
|
217378
|
+
name: "deviceId",
|
|
217379
|
+
form: "single",
|
|
217380
|
+
optional: false
|
|
217381
|
+
}, {
|
|
217382
|
+
name: "deviceIds",
|
|
217383
|
+
form: "array",
|
|
217384
|
+
optional: false
|
|
217385
|
+
}],
|
|
217386
|
+
"deviceStateRefresh.resubscribe": [{
|
|
217387
|
+
name: "deviceId",
|
|
217388
|
+
form: "single",
|
|
217389
|
+
optional: false
|
|
217390
|
+
}],
|
|
216101
217391
|
"deviceStatus.getStatus": [{
|
|
216102
217392
|
name: "deviceId",
|
|
216103
217393
|
form: "single",
|
|
@@ -216558,6 +217848,16 @@ Object.freeze({
|
|
|
216558
217848
|
form: "single",
|
|
216559
217849
|
optional: true
|
|
216560
217850
|
}],
|
|
217851
|
+
"lowPowerSleep.getStatus": [{
|
|
217852
|
+
name: "deviceId",
|
|
217853
|
+
form: "single",
|
|
217854
|
+
optional: false
|
|
217855
|
+
}],
|
|
217856
|
+
"lowPowerSleep.wakeUp": [{
|
|
217857
|
+
name: "deviceId",
|
|
217858
|
+
form: "single",
|
|
217859
|
+
optional: false
|
|
217860
|
+
}],
|
|
216561
217861
|
"mediaPlayer.channelDown": [{
|
|
216562
217862
|
name: "deviceId",
|
|
216563
217863
|
form: "single",
|
|
@@ -217843,6 +219143,11 @@ Object.freeze({
|
|
|
217843
219143
|
form: "single",
|
|
217844
219144
|
optional: false
|
|
217845
219145
|
}],
|
|
219146
|
+
"resync.resync": [{
|
|
219147
|
+
name: "deviceId",
|
|
219148
|
+
form: "single",
|
|
219149
|
+
optional: false
|
|
219150
|
+
}],
|
|
217846
219151
|
"runningState.getStatus": [{
|
|
217847
219152
|
name: "deviceId",
|
|
217848
219153
|
form: "single",
|
|
@@ -227002,7 +228307,8 @@ function capDayNightModeToReolink(mode) {
|
|
|
227002
228307
|
* `features = ['native-snapshot','rebootable']` because the `feature-probe`
|
|
227003
228308
|
* slice had never been written.
|
|
227004
228309
|
*
|
|
227005
|
-
* That miss is not cosmetic. `DeviceFeature.BatteryOperated`
|
|
228310
|
+
* That miss is not cosmetic. `DeviceFeature.BatteryOperated` (and, since #459,
|
|
228311
|
+
* `DeviceFeature.Sleeps` beside it) is the gate for:
|
|
227006
228312
|
* - the viewer's battery badge + sleeping overlay (`use-cameras.ts` FEATURE
|
|
227007
228313
|
* map) — without it the camera is drawn as an ordinary awake camera;
|
|
227008
228314
|
* - the snapshot wrapper's sleep gate (`snapshot.addon.ts`
|
|
@@ -227016,10 +228322,19 @@ function capDayNightModeToReolink(mode) {
|
|
|
227016
228322
|
* clears it). This makes the DERIVED answer sticky the same way, for the
|
|
227017
228323
|
* window before any probe has ever succeeded.
|
|
227018
228324
|
*/
|
|
228325
|
+
/**
|
|
228326
|
+
* The ONE Reolink answer to "is this a battery camera that sleeps" (#459, Q2).
|
|
228327
|
+
* The published features (`BatteryOperated` + `Sleeps`) and the registration
|
|
228328
|
+
* of the `battery` and `low-power-sleep` caps both ask it, so a camera that
|
|
228329
|
+
* claims `Sleeps` in the stream catalog is also one the registry can wake.
|
|
228330
|
+
*/
|
|
228331
|
+
function reolinkCameraSleeps(inputs) {
|
|
228332
|
+
return inputs.probe.hasBattery === true || inputs.isBattery;
|
|
228333
|
+
}
|
|
227019
228334
|
function deriveReolinkCameraFeatures(inputs) {
|
|
227020
|
-
const { probe
|
|
228335
|
+
const { probe } = inputs;
|
|
227021
228336
|
const out = [DeviceFeature.NativeSnapshot, DeviceFeature.Rebootable];
|
|
227022
|
-
if (
|
|
228337
|
+
if (reolinkCameraSleeps(inputs)) out.push(DeviceFeature.BatteryOperated, DeviceFeature.Sleeps);
|
|
227023
228338
|
if (probe.hasPtz === true) out.push(DeviceFeature.PanTiltZoom);
|
|
227024
228339
|
if (probe.hasAutotrack === true) out.push(DeviceFeature.PtzAutotrack);
|
|
227025
228340
|
if (probe.hasIntercom === true) out.push(DeviceFeature.TwoWayAudio);
|
|
@@ -228902,7 +230217,7 @@ function applyHubChildSections(sections, snapshot) {
|
|
|
228902
230217
|
* costs when we get them wrong.
|
|
228903
230218
|
*
|
|
228904
230219
|
* `→ awake` (`WAKE_HYSTERESIS_MS`): expensive if wrong. Believing an asleep
|
|
228905
|
-
* camera is awake un-gates every background probe and makes `
|
|
230220
|
+
* camera is awake un-gates every background probe and makes `wakeUp`
|
|
228906
230221
|
* early-out without actually waking. Keep the window >= the library's UDP
|
|
228907
230222
|
* inference cycle (~12 s on battery cams with idle-disconnect) and >= its
|
|
228908
230223
|
* `getIdleDisconnectTimeoutMs` (30 s default).
|
|
@@ -228939,7 +230254,7 @@ function isSummarySourced(source) {
|
|
|
228939
230254
|
* the anti-flap window does not apply to it at all.
|
|
228940
230255
|
* 3. A `confirmed-wake` in the `→ awake` direction is first-hand evidence
|
|
228941
230256
|
* this process produced: gating it with the anti-flap window is what
|
|
228942
|
-
* stranded 3825's mirror on "asleep" while `
|
|
230257
|
+
* stranded 3825's mirror on "asleep" while `wakeUp` answered
|
|
228943
230258
|
* `awoke: true`.
|
|
228944
230259
|
* 4. Everything else is subject to the asymmetric hysteresis.
|
|
228945
230260
|
* 5. A summary flip toward `sleeping` is refused while a first-hand
|
|
@@ -232545,10 +233860,14 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
232545
233860
|
return effectiveProbeFlags(this.hasProbed(), super.getProbeFlags(), this.config?.get("deviceCache"));
|
|
232546
233861
|
}
|
|
232547
233862
|
get features() {
|
|
232548
|
-
return deriveReolinkCameraFeatures(
|
|
233863
|
+
return deriveReolinkCameraFeatures(this.featureInputs());
|
|
233864
|
+
}
|
|
233865
|
+
/** What the features and the battery / sleep registration both read. */
|
|
233866
|
+
featureInputs() {
|
|
233867
|
+
return {
|
|
232549
233868
|
probe: this.getProbeFlags(),
|
|
232550
233869
|
isBattery: this.isBattery
|
|
232551
|
-
}
|
|
233870
|
+
};
|
|
232552
233871
|
}
|
|
232553
233872
|
/** Lazy-connected Baichuan API. Spans the lifetime of every active stream. */
|
|
232554
233873
|
api = null;
|
|
@@ -232686,7 +234005,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
232686
234005
|
lastProactiveWakeAt = 0;
|
|
232687
234006
|
/**
|
|
232688
234007
|
* Minimum gap between two proactive wakes. Demand-driven wakes
|
|
232689
|
-
* (`
|
|
234008
|
+
* (`wakeUp` from the broker, `wakeIfSleeping` behind an
|
|
232690
234009
|
* operator action, the intercom pre-wake) bypass this entirely —
|
|
232691
234010
|
* the operator asked, the operator gets the camera. Only
|
|
232692
234011
|
* self-initiated wakes are rate-limited, so a thumbnail cache miss
|
|
@@ -233553,7 +234872,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
233553
234872
|
* (proactive config buttons such as Auto-configure email push). A
|
|
233554
234873
|
* sleeping battery cam ignores Baichuan config round-trips, so clicking
|
|
233555
234874
|
* "configure" would otherwise silently fail; this drives the same forced
|
|
233556
|
-
* wake `
|
|
234875
|
+
* wake `wakeUp` uses, then lets the caller proceed against a live
|
|
233557
234876
|
* camera. No-op for non-battery or already-awake cams. Best-effort:
|
|
233558
234877
|
* returns whether the camera is (now) reachable/awake.
|
|
233559
234878
|
*/
|
|
@@ -233975,14 +235294,18 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
233975
235294
|
*/
|
|
233976
235295
|
registerBatteryIfSupported() {
|
|
233977
235296
|
if (this.batteryRegistered) return;
|
|
233978
|
-
if (!this.
|
|
235297
|
+
if (!reolinkCameraSleeps(this.featureInputs())) return;
|
|
233979
235298
|
this.batteryRegistered = true;
|
|
233980
|
-
this.ctx.registerNativeCap(batteryCapability, {
|
|
235299
|
+
this.ctx.registerNativeCap(batteryCapability, { getStatus: async ({ deviceId }) => {
|
|
235300
|
+
if (deviceId !== this.id) throw new Error(`ReolinkCamera: deviceId mismatch, expected ${this.id}, got ${deviceId}`);
|
|
235301
|
+
return this.state.battery;
|
|
235302
|
+
} });
|
|
235303
|
+
this.ctx.registerNativeCap(lowPowerSleepCapability, {
|
|
233981
235304
|
getStatus: async ({ deviceId }) => {
|
|
233982
235305
|
if (deviceId !== this.id) throw new Error(`ReolinkCamera: deviceId mismatch, expected ${this.id}, got ${deviceId}`);
|
|
233983
|
-
return this.state.battery;
|
|
235306
|
+
return sleepSliceOfBattery(this.state.battery);
|
|
233984
235307
|
},
|
|
233985
|
-
|
|
235308
|
+
wakeUp: async ({ deviceId, timeoutMs }) => {
|
|
233986
235309
|
if (deviceId !== this.id) throw new Error(`ReolinkCamera: deviceId mismatch, expected ${this.id}, got ${deviceId}`);
|
|
233987
235310
|
const startedAt = Date.now();
|
|
233988
235311
|
if (!this.sleeping) return {
|
|
@@ -233999,7 +235322,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
233999
235322
|
};
|
|
234000
235323
|
}
|
|
234001
235324
|
this.markWakeIssued();
|
|
234002
|
-
this.ctx.logger.info("battery
|
|
235325
|
+
this.ctx.logger.info("battery wakeUp: cam sleeping — issuing wake", {
|
|
234003
235326
|
tags: { deviceId: this.id },
|
|
234004
235327
|
meta: { timeoutMs }
|
|
234005
235328
|
});
|
|
@@ -234012,7 +235335,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
234012
235335
|
attempts: 2
|
|
234013
235336
|
});
|
|
234014
235337
|
await sleep(1500);
|
|
234015
|
-
})(), new Promise((_, rej) => setTimeout(() => rej(/* @__PURE__ */ new Error("
|
|
235338
|
+
})(), new Promise((_, rej) => setTimeout(() => rej(/* @__PURE__ */ new Error("wakeUp timeout")), timeoutMs))]);
|
|
234016
235339
|
const CONFIRM_TIMEOUT_MS = 1e4;
|
|
234017
235340
|
const CONFIRM_POLL_MS = 1e3;
|
|
234018
235341
|
const confirmDeadline = Date.now() + CONFIRM_TIMEOUT_MS;
|
|
@@ -234045,7 +235368,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
234045
235368
|
}
|
|
234046
235369
|
const confirmSource = parent !== null ? "hub-summary" : "sleep-poll";
|
|
234047
235370
|
if (observedAwake && this.commitSleepState(false, confirmSource)) {
|
|
234048
|
-
this.ctx.logger.info("battery
|
|
235371
|
+
this.ctx.logger.info("battery wakeUp: wake confirmed — driving wake transition", {
|
|
234049
235372
|
tags: { deviceId: this.id },
|
|
234050
235373
|
meta: {
|
|
234051
235374
|
confirmMs: Date.now() - startedAt,
|
|
@@ -234054,7 +235377,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
234054
235377
|
});
|
|
234055
235378
|
this.onWakeTransition(confirmSource).catch(() => {});
|
|
234056
235379
|
} else if (!confirmed) {
|
|
234057
|
-
this.ctx.logger.warn("battery
|
|
235380
|
+
this.ctx.logger.warn("battery wakeUp: ACK received but no awake evidence inside the confirm window", {
|
|
234058
235381
|
tags: { deviceId: this.id },
|
|
234059
235382
|
meta: { confirmTimeoutMs: CONFIRM_TIMEOUT_MS }
|
|
234060
235383
|
});
|
|
@@ -234066,7 +235389,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
234066
235389
|
}
|
|
234067
235390
|
if (confirmed && !observedAwake && parent !== null) this.watchHubChildAwake(parent).catch(() => {});
|
|
234068
235391
|
if (this.commitSleepState(false, "confirmed-wake")) {
|
|
234069
|
-
this.ctx.logger.info("battery
|
|
235392
|
+
this.ctx.logger.info("battery wakeUp: answering awake — committing the mirror", {
|
|
234070
235393
|
tags: { deviceId: this.id },
|
|
234071
235394
|
meta: {
|
|
234072
235395
|
confirmedMs: Date.now() - startedAt,
|
|
@@ -234080,7 +235403,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
234080
235403
|
durationMs: Date.now() - startedAt
|
|
234081
235404
|
};
|
|
234082
235405
|
} catch (err) {
|
|
234083
|
-
this.ctx.logger.warn("battery
|
|
235406
|
+
this.ctx.logger.warn("battery wakeUp: wake did not complete in time", {
|
|
234084
235407
|
tags: { deviceId: this.id },
|
|
234085
235408
|
meta: {
|
|
234086
235409
|
timeoutMs,
|
|
@@ -234103,11 +235426,13 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
234103
235426
|
});
|
|
234104
235427
|
this.runtimeState.subscribeCap("battery", (slice) => {
|
|
234105
235428
|
if (!slice) return;
|
|
235429
|
+
this.setCapSlice(lowPowerSleepCapability, sleepSliceOfBattery(slice));
|
|
234106
235430
|
this.ctx.eventBus.emit(createEvent(EventCategory.BatteryOnStatusChanged, this.eventSource(), {
|
|
234107
235431
|
deviceId: this.id,
|
|
234108
235432
|
status: slice
|
|
234109
235433
|
}));
|
|
234110
235434
|
});
|
|
235435
|
+
this.setCapSlice(lowPowerSleepCapability, sleepSliceOfBattery(this.state.battery));
|
|
234111
235436
|
this.refreshBatteryFromApi("register");
|
|
234112
235437
|
}
|
|
234113
235438
|
/**
|
|
@@ -234223,7 +235548,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
234223
235548
|
* `PROACTIVE_WAKE_COOLDOWN_MS` ago — the caller must then serve
|
|
234224
235549
|
* whatever it has cached instead of reaching for the radio.
|
|
234225
235550
|
*
|
|
234226
|
-
* Demand-driven paths never call this: `
|
|
235551
|
+
* Demand-driven paths never call this: `wakeUp` (a consumer
|
|
234227
235552
|
* wants live video), `wakeIfSleeping` (an operator clicked
|
|
234228
235553
|
* something) and the intercom pre-wake all wake unconditionally.
|
|
234229
235554
|
*/
|
|
@@ -234262,7 +235587,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
234262
235587
|
try {
|
|
234263
235588
|
if ((await (await parent.getApi()).getNvrChannelsSummary({ channels: [this.getChannel()] })).devices.find((d) => d.channel === this.getChannel())?.sleeping === false) {
|
|
234264
235589
|
if (this.commitSleepState(false, "hub-summary")) {
|
|
234265
|
-
this.ctx.logger.info("battery
|
|
235590
|
+
this.ctx.logger.info("battery wakeUp: hub child observed awake after the dial", { tags: { deviceId: this.id } });
|
|
234266
235591
|
this.onWakeTransition("hub-summary").catch(() => {});
|
|
234267
235592
|
}
|
|
234268
235593
|
return;
|
|
@@ -240296,6 +241621,7 @@ var ReolinkCamera = class ReolinkCamera extends BaseDevice {
|
|
|
240296
241621
|
this.registerPtzAutotrackIfSupported();
|
|
240297
241622
|
this.registerDoorbellIfSupported();
|
|
240298
241623
|
this.registerIntercomIfSupported();
|
|
241624
|
+
this.registerBatteryIfSupported();
|
|
240299
241625
|
this.ctx.logger.info("Reolink features probed + persisted", {
|
|
240300
241626
|
tags: { deviceId: this.id },
|
|
240301
241627
|
meta: {
|
|
@@ -241412,8 +242738,18 @@ function buildReolinkInstances(records, deps) {
|
|
|
241412
242738
|
* NVR / Home Hub one does, and a create wizard (no id yet) sets up a hub.
|
|
241413
242739
|
*/
|
|
241414
242740
|
function reolinkInstancesProvider(instances, deps) {
|
|
242741
|
+
const base = instances.toProvider();
|
|
242742
|
+
const withAddDevice = async (instance) => ({
|
|
242743
|
+
...instance,
|
|
242744
|
+
addDevice: await integrationIsHub(instances, deps, instance.id) ? "children" : "scan"
|
|
242745
|
+
});
|
|
241415
242746
|
return {
|
|
241416
|
-
...
|
|
242747
|
+
...base,
|
|
242748
|
+
listInstances: async (input) => Promise.all((await base.listInstances(input)).map(withAddDevice)),
|
|
242749
|
+
getInstance: async (input) => {
|
|
242750
|
+
const found = await base.getInstance(input);
|
|
242751
|
+
return found === null ? null : withAddDevice(found);
|
|
242752
|
+
},
|
|
241417
242753
|
instanceFormSchema: async ({ id }) => {
|
|
241418
242754
|
if (id === null) return buildHubInstanceSchema();
|
|
241419
242755
|
const [evidence, body] = await Promise.all([deps.registryEvidenceOf(id), instances.getResolved(id)]);
|