@camstack/system 1.2.474 → 1.2.475
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/dist/{agent-https-DRwEbLL7.js → agent-https-BsqT0qni.js} +8 -8
- package/dist/{agent-https-CbczsyM0.mjs → agent-https-wA8gGLc1.mjs} +8 -8
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/dist/builtins/calendars/calendars.addon.js +1 -1
- package/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/composer/composer.addon.js +2 -2
- package/dist/builtins/composer/composer.addon.mjs +2 -2
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- package/dist/builtins/device-history/device-history.addon.js +1 -1
- package/dist/builtins/device-history/device-history.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/keychain/index.js +3 -3
- package/dist/builtins/keychain/index.mjs +3 -3
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/dist/builtins/local-network/local-network.addon.js +2 -2
- package/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/record-entries/index.js +1 -1
- package/dist/builtins/record-entries/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/index.js +1 -1
- package/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +8 -8
- package/dist/builtins/system-config/system-config.addon.mjs +8 -8
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{composition-sources-CsBIIit3.mjs → composition-sources-CiFkyAcf.mjs} +1 -1
- package/dist/{composition-sources-CJv3W669.js → composition-sources-DeUSUid6.js} +1 -1
- package/dist/{constants-C0hrXcEr.js → constants-3Wj5OyEk.js} +1 -1
- package/dist/{constants-Dy8CaDeT.mjs → constants-DZJAkne8.mjs} +1 -1
- package/dist/{device-ca-CHdsePe5.mjs → device-ca-DiV5xcMz.mjs} +14 -13
- package/dist/{device-ca-Dg3rSU48.js → device-ca-ftrfVdc0.js} +14 -13
- package/dist/{dist-Sn-HiZ4e.js → dist-BtDdPdZ7.js} +412 -20
- package/dist/{dist-BugavoVR.mjs → dist-DygMs3Qc.mjs} +412 -20
- package/dist/file-host-worker.js +1 -1
- package/dist/file-host-worker.mjs +1 -1
- package/dist/{hub-mdns-ciao-DkncLbg9.js → hub-mdns-ciao-B1VcdfT1.js} +4 -4
- package/dist/{hub-mdns-ciao-BDvqGIw4.mjs → hub-mdns-ciao-Bc9PnWu3.mjs} +4 -4
- package/dist/index.js +7 -7
- package/dist/index.mjs +7 -7
- package/dist/{lib-8oZrELLm.js → lib-C3U1yluo.js} +1 -1
- package/dist/{lib-DK38ompL.mjs → lib-DFZblCIu.mjs} +1 -1
- package/dist/{restore-archive-CFBm30Gk.mjs → restore-archive-D_Pwryre.mjs} +1 -1
- package/dist/{restore-archive-gYKzaJ4Y.js → restore-archive-TDkQfmLO.js} +1 -1
- package/dist/tls/cert-utc-time.d.ts +1 -0
- package/dist/{wal-maintenance-DyMUz_Hy.js → wal-maintenance-D3UwIKX5.js} +0 -0
- package/dist/{wal-maintenance-BnhkcEkI.mjs → wal-maintenance-rLv4uOmp.mjs} +0 -0
- package/dist/{x509.es-DK__ETIe.mjs → x509.es-BRiJgOvu.mjs} +24 -1
- package/dist/{x509.es-C4cOo48M.js → x509.es-WtnRNyYS.js} +29 -0
- package/package.json +1 -1
|
@@ -5484,7 +5484,7 @@ function errMsg(err) {
|
|
|
5484
5484
|
return String(err);
|
|
5485
5485
|
}
|
|
5486
5486
|
//#endregion
|
|
5487
|
-
//#region ../types/dist/composition-
|
|
5487
|
+
//#region ../types/dist/composition-BJ8iAZb3.mjs
|
|
5488
5488
|
var AUDIO_ENCODER_BY_CODEC = {
|
|
5489
5489
|
opus: "libopus",
|
|
5490
5490
|
aac: "aac",
|
|
@@ -5936,7 +5936,7 @@ portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac
|
|
|
5936
5936
|
* ONE table for everyone who asks "is this device HIGH?": the
|
|
5937
5937
|
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
5938
5938
|
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
5939
|
-
* the sources of a
|
|
5939
|
+
* the sources of a pulse (`compilePulseOverride`, D936).
|
|
5940
5940
|
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
5941
5941
|
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
5942
5942
|
*
|
|
@@ -60151,20 +60151,68 @@ var BatteryStatusSchema = zod.z.object({
|
|
|
60151
60151
|
*/
|
|
60152
60152
|
binary: zod.z.boolean().optional()
|
|
60153
60153
|
});
|
|
60154
|
+
var BATTERY_DEVICE_TYPES = [
|
|
60155
|
+
DeviceType.Camera,
|
|
60156
|
+
DeviceType.Sensor,
|
|
60157
|
+
DeviceType.Button,
|
|
60158
|
+
DeviceType.Switch,
|
|
60159
|
+
DeviceType.PetFeeder,
|
|
60160
|
+
DeviceType.Container,
|
|
60161
|
+
DeviceType.Thermostat
|
|
60162
|
+
];
|
|
60163
|
+
/** Generic Customize target for the percentage reading (D936). */
|
|
60164
|
+
var batteryCustomize = {
|
|
60165
|
+
version: 1,
|
|
60166
|
+
targets: [{
|
|
60167
|
+
id: "percentage",
|
|
60168
|
+
cardinality: "scalar",
|
|
60169
|
+
vocabulary: {
|
|
60170
|
+
cap: "battery",
|
|
60171
|
+
stateField: "percentage"
|
|
60172
|
+
},
|
|
60173
|
+
deviceTypes: BATTERY_DEVICE_TYPES,
|
|
60174
|
+
apply: "add-or-replace",
|
|
60175
|
+
path: "percentage",
|
|
60176
|
+
sources: [{
|
|
60177
|
+
kind: "field",
|
|
60178
|
+
valueKinds: ["number", "string"],
|
|
60179
|
+
transforms: [{ kind: "identity" }, {
|
|
60180
|
+
kind: "linear",
|
|
60181
|
+
defaultScale: 1,
|
|
60182
|
+
defaultOffset: 0,
|
|
60183
|
+
clampMin: 0,
|
|
60184
|
+
clampMax: 100
|
|
60185
|
+
}]
|
|
60186
|
+
}],
|
|
60187
|
+
companions: [
|
|
60188
|
+
{
|
|
60189
|
+
kind: "constant",
|
|
60190
|
+
path: "charging",
|
|
60191
|
+
value: "unknown",
|
|
60192
|
+
when: "add"
|
|
60193
|
+
},
|
|
60194
|
+
{
|
|
60195
|
+
kind: "constant",
|
|
60196
|
+
path: "sleeping",
|
|
60197
|
+
value: false,
|
|
60198
|
+
when: "add"
|
|
60199
|
+
},
|
|
60200
|
+
{
|
|
60201
|
+
kind: "clock",
|
|
60202
|
+
path: "lastUpdated",
|
|
60203
|
+
when: "add"
|
|
60204
|
+
}
|
|
60205
|
+
],
|
|
60206
|
+
sourceReport: { status: "assignment-status" },
|
|
60207
|
+
advancedExpression: true
|
|
60208
|
+
}]
|
|
60209
|
+
};
|
|
60154
60210
|
var batteryCapability = {
|
|
60155
60211
|
name: "battery",
|
|
60156
60212
|
scope: "device",
|
|
60157
60213
|
deviceNative: true,
|
|
60158
60214
|
mode: "singleton",
|
|
60159
|
-
deviceTypes:
|
|
60160
|
-
DeviceType.Camera,
|
|
60161
|
-
DeviceType.Sensor,
|
|
60162
|
-
DeviceType.Button,
|
|
60163
|
-
DeviceType.Switch,
|
|
60164
|
-
DeviceType.PetFeeder,
|
|
60165
|
-
DeviceType.Container,
|
|
60166
|
-
DeviceType.Thermostat
|
|
60167
|
-
],
|
|
60215
|
+
deviceTypes: BATTERY_DEVICE_TYPES,
|
|
60168
60216
|
methods: {
|
|
60169
60217
|
/**
|
|
60170
60218
|
* Explicitly wake the camera from low-power sleep ahead of a
|
|
@@ -60248,6 +60296,7 @@ onStatusChanged: { data: zod.z.object({
|
|
|
60248
60296
|
kind: "gauge",
|
|
60249
60297
|
unit: "%"
|
|
60250
60298
|
} } },
|
|
60299
|
+
customize: batteryCustomize,
|
|
60251
60300
|
/** Clock fields: written, but excluded from the compare that decides
|
|
60252
60301
|
* whether persisting is worth a SQLite commit. */
|
|
60253
60302
|
volatileStateFields: ["lastUpdated"]
|
|
@@ -61313,6 +61362,106 @@ var ConsumablesStatusSchema = zod.z.object({
|
|
|
61313
61362
|
items: zod.z.array(ConsumableItemSchema),
|
|
61314
61363
|
lastChangedAt: zod.z.number()
|
|
61315
61364
|
});
|
|
61365
|
+
/** Synthesize seed for a link-built status (no native provider).
|
|
61366
|
+
*
|
|
61367
|
+
* ⚠ NO LIVE CALLER since 2026-08-08 (device-links deleted; see
|
|
61368
|
+
* `CapabilityStatusSchema.empty`). The wiring guidance below was written for
|
|
61369
|
+
* exactly the case the operator is asking about again — a Dreame's HA
|
|
61370
|
+
* consumable-life sensors — so it is kept for that conversation, not because
|
|
61371
|
+
* anything reads it today. */
|
|
61372
|
+
var EMPTY_STATUS = {
|
|
61373
|
+
items: [],
|
|
61374
|
+
lastChangedAt: 0
|
|
61375
|
+
};
|
|
61376
|
+
/** Seed for a NEW link-built consumable item. `key`/`label` are overwritten
|
|
61377
|
+
* with the link's `itemKey` (see `status.itemArray`), so the placeholder
|
|
61378
|
+
* empty strings never survive into a validated item. Link-built items are
|
|
61379
|
+
* not resettable — there is no native provider to receive `reset()`.
|
|
61380
|
+
*
|
|
61381
|
+
* Wiring guidance (HA vacuum consumable-life sensors):
|
|
61382
|
+
* - a percent-remaining source (`numeric-sensor`, unit '%') → `level` via
|
|
61383
|
+
* `identity` (or `linear` scale 1 offset 0 clamp [0,100] to be safe);
|
|
61384
|
+
* - an hours-remaining source (e.g. Dreame 'Main Brush Time Left', unit 'h')
|
|
61385
|
+
* → `level` via `linear` with scale = 100 / max-hours for that item
|
|
61386
|
+
* (e.g. main brush 300 h → scale 0.3333) + clamp [0,100];
|
|
61387
|
+
* - a discrete source (`enum-sensor`, e.g. mop pad 'installed') → `status`
|
|
61388
|
+
* via `enum-map` (e.g. { installed: 'ok', missing: 'replace' }).
|
|
61389
|
+
* A numeric→'replace' THRESHOLD (level < 10 → 'replace') is NOT expressible
|
|
61390
|
+
* with the current transform kinds — leave `status` null (valid) until the
|
|
61391
|
+
* expression transform lands. */
|
|
61392
|
+
/** Generic Customize target for one consumable item (D936). Native rows stay read-only. */
|
|
61393
|
+
var consumablesCustomize = {
|
|
61394
|
+
version: 1,
|
|
61395
|
+
targets: [{
|
|
61396
|
+
id: "items",
|
|
61397
|
+
cardinality: "keyedArray",
|
|
61398
|
+
vocabulary: { cap: "consumables" },
|
|
61399
|
+
deviceTypes: Object.values(DeviceType),
|
|
61400
|
+
apply: "add",
|
|
61401
|
+
path: "items",
|
|
61402
|
+
keyField: "key",
|
|
61403
|
+
labelField: "label",
|
|
61404
|
+
itemSchema: ConsumableItemSchema,
|
|
61405
|
+
nativeItems: "read-only",
|
|
61406
|
+
sourceReport: { status: "assignment-status" },
|
|
61407
|
+
fields: [
|
|
61408
|
+
{
|
|
61409
|
+
path: "level",
|
|
61410
|
+
sources: [{
|
|
61411
|
+
kind: "numeric",
|
|
61412
|
+
transforms: [{ kind: "identity" }, {
|
|
61413
|
+
kind: "linear",
|
|
61414
|
+
defaultScale: 1,
|
|
61415
|
+
defaultOffset: 0,
|
|
61416
|
+
clampMin: 0,
|
|
61417
|
+
clampMax: 100
|
|
61418
|
+
}]
|
|
61419
|
+
}]
|
|
61420
|
+
},
|
|
61421
|
+
{
|
|
61422
|
+
path: "remaining.value",
|
|
61423
|
+
sources: [{
|
|
61424
|
+
kind: "numeric",
|
|
61425
|
+
transforms: [{ kind: "identity" }]
|
|
61426
|
+
}],
|
|
61427
|
+
literals: [{
|
|
61428
|
+
path: "remaining.unit",
|
|
61429
|
+
values: [...ConsumableRemainingUnitSchema.options]
|
|
61430
|
+
}]
|
|
61431
|
+
},
|
|
61432
|
+
{
|
|
61433
|
+
path: "status",
|
|
61434
|
+
sources: [{
|
|
61435
|
+
kind: "enum",
|
|
61436
|
+
transforms: [{
|
|
61437
|
+
kind: "enum-map",
|
|
61438
|
+
outputValues: [...ConsumableStatusSchema.options],
|
|
61439
|
+
unmapped: null
|
|
61440
|
+
}]
|
|
61441
|
+
}]
|
|
61442
|
+
}
|
|
61443
|
+
],
|
|
61444
|
+
traits: [{
|
|
61445
|
+
path: "kind",
|
|
61446
|
+
values: [...ConsumableKindSchema.options],
|
|
61447
|
+
defaultValue: "wear"
|
|
61448
|
+
}, {
|
|
61449
|
+
path: "form",
|
|
61450
|
+
values: [...ConsumableFormSchema.options],
|
|
61451
|
+
defaultValue: "part"
|
|
61452
|
+
}],
|
|
61453
|
+
companions: [{
|
|
61454
|
+
kind: "clock",
|
|
61455
|
+
path: "lastChangedAt",
|
|
61456
|
+
when: "add"
|
|
61457
|
+
}, {
|
|
61458
|
+
kind: "clock",
|
|
61459
|
+
path: "lastFetchedAt",
|
|
61460
|
+
when: "add"
|
|
61461
|
+
}],
|
|
61462
|
+
advancedExpression: true
|
|
61463
|
+
}]
|
|
61464
|
+
};
|
|
61316
61465
|
var consumablesCapability = {
|
|
61317
61466
|
name: "consumables",
|
|
61318
61467
|
scope: "device",
|
|
@@ -61350,10 +61499,7 @@ reset: method(zod.z.object({
|
|
|
61350
61499
|
status: {
|
|
61351
61500
|
schema: ConsumablesStatusSchema,
|
|
61352
61501
|
kind: "push",
|
|
61353
|
-
empty:
|
|
61354
|
-
items: [],
|
|
61355
|
-
lastChangedAt: 0
|
|
61356
|
-
},
|
|
61502
|
+
empty: EMPTY_STATUS,
|
|
61357
61503
|
itemArray: {
|
|
61358
61504
|
path: "items",
|
|
61359
61505
|
keyField: "key",
|
|
@@ -61389,6 +61535,7 @@ reset: method(zod.z.object({
|
|
|
61389
61535
|
* brush's remaining life and a dishwasher's salt are each recorded the moment
|
|
61390
61536
|
* their provider reports them; an item that appears later gets its series.
|
|
61391
61537
|
*/
|
|
61538
|
+
customize: consumablesCustomize,
|
|
61392
61539
|
history: {
|
|
61393
61540
|
fields: {},
|
|
61394
61541
|
items: {
|
|
@@ -62177,6 +62324,36 @@ var dishwasherCapability = {
|
|
|
62177
62324
|
powerOn: { kind: "boolean" }
|
|
62178
62325
|
} }
|
|
62179
62326
|
};
|
|
62327
|
+
/** Pulse override: a rising edge advances `lastPressedAt` and the press count. */
|
|
62328
|
+
var doorbellCustomize = {
|
|
62329
|
+
version: 1,
|
|
62330
|
+
targets: [{
|
|
62331
|
+
id: "pressed",
|
|
62332
|
+
cardinality: "event",
|
|
62333
|
+
shape: "pulse",
|
|
62334
|
+
vocabulary: {
|
|
62335
|
+
cap: "doorbell",
|
|
62336
|
+
eventName: "onPressed"
|
|
62337
|
+
},
|
|
62338
|
+
deviceTypes: [DeviceType.Camera],
|
|
62339
|
+
apply: "add",
|
|
62340
|
+
applyAuthority: { kind: "composition-claim" },
|
|
62341
|
+
eventName: "onPressed",
|
|
62342
|
+
edges: ["rising"],
|
|
62343
|
+
timestampPath: "lastPressedAt",
|
|
62344
|
+
counterPath: "pressCountSinceStart",
|
|
62345
|
+
highWater: "composer-advance",
|
|
62346
|
+
combine: "any",
|
|
62347
|
+
debounce: {
|
|
62348
|
+
kind: "rising-edge",
|
|
62349
|
+
defaultDebounceMs: 2e3,
|
|
62350
|
+
changedAtRequired: true
|
|
62351
|
+
},
|
|
62352
|
+
sources: [{ kind: "binary" }, { kind: "switch" }],
|
|
62353
|
+
sourceReport: { status: "assignment-status" },
|
|
62354
|
+
advancedExpression: true
|
|
62355
|
+
}]
|
|
62356
|
+
};
|
|
62180
62357
|
var DoorbellStatusSchema = zod.z.object({
|
|
62181
62358
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
62182
62359
|
lastPressedAt: zod.z.number().nullable(),
|
|
@@ -62243,7 +62420,8 @@ onPressed: {
|
|
|
62243
62420
|
/**
|
|
62244
62421
|
* History (D850): none — `pressCountSinceStart` resets with the addon, so it is not a monotonic meter; presses live in the events ledger.
|
|
62245
62422
|
*/
|
|
62246
|
-
history: "none"
|
|
62423
|
+
history: "none",
|
|
62424
|
+
customize: doorbellCustomize
|
|
62247
62425
|
};
|
|
62248
62426
|
/**
|
|
62249
62427
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
@@ -64949,6 +65127,38 @@ authKey: zod.z.string().optional() }), zod.z.object({
|
|
|
64949
65127
|
}), { kind: "mutation" })
|
|
64950
65128
|
}
|
|
64951
65129
|
};
|
|
65130
|
+
/** Span override: start on a rising edge, end on a fall or this timeout. */
|
|
65131
|
+
var motionCustomize = {
|
|
65132
|
+
version: 1,
|
|
65133
|
+
targets: [{
|
|
65134
|
+
id: "detected",
|
|
65135
|
+
cardinality: "event",
|
|
65136
|
+
shape: "span",
|
|
65137
|
+
vocabulary: {
|
|
65138
|
+
cap: "motion",
|
|
65139
|
+
eventName: "onMotionChanged"
|
|
65140
|
+
},
|
|
65141
|
+
deviceTypes: [DeviceType.Camera],
|
|
65142
|
+
apply: "replace",
|
|
65143
|
+
applyAuthority: {
|
|
65144
|
+
kind: "camera-sensors",
|
|
65145
|
+
timeoutField: "motionCooldownMs"
|
|
65146
|
+
},
|
|
65147
|
+
eventName: "onMotionChanged",
|
|
65148
|
+
start: "rising-edge",
|
|
65149
|
+
end: "falling-edge-or-timeout",
|
|
65150
|
+
timeoutMs: 3e4,
|
|
65151
|
+
combine: "any",
|
|
65152
|
+
sourceModes: [
|
|
65153
|
+
"in-addition",
|
|
65154
|
+
"confirm",
|
|
65155
|
+
"replace"
|
|
65156
|
+
],
|
|
65157
|
+
sources: [{ kind: "binary" }, { kind: "switch" }],
|
|
65158
|
+
sourceReport: { status: "assignment-status" },
|
|
65159
|
+
advancedExpression: false
|
|
65160
|
+
}]
|
|
65161
|
+
};
|
|
64952
65162
|
/**
|
|
64953
65163
|
* Hardware / firmware motion sensor cap — binary detected state plus
|
|
64954
65164
|
* a timestamp of the last observation. Distinct from
|
|
@@ -65113,7 +65323,8 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
|
|
|
65113
65323
|
history: { fields: { detected: {
|
|
65114
65324
|
kind: "boolean",
|
|
65115
65325
|
excludeDeviceTypes: [DeviceType.Camera]
|
|
65116
|
-
} } }
|
|
65326
|
+
} } },
|
|
65327
|
+
customize: motionCustomize
|
|
65117
65328
|
};
|
|
65118
65329
|
/**
|
|
65119
65330
|
* Motion-trigger toggle for accessory devices.
|
|
@@ -68202,6 +68413,8 @@ var ptzAutotrackCapability = {
|
|
|
68202
68413
|
*/
|
|
68203
68414
|
history: "none"
|
|
68204
68415
|
};
|
|
68416
|
+
var RUNNING_POWER_START_DELAY_MS = 3e4;
|
|
68417
|
+
var RUNNING_POWER_STOP_DELAY_MS = 18e4;
|
|
68205
68418
|
var RunningStateSourceSchema = zod.z.enum(["native", "assigned"]);
|
|
68206
68419
|
var RunningStateStatusSchema = zod.z.object({
|
|
68207
68420
|
/** null = unknown — never coerced to false (D393). */
|
|
@@ -68210,19 +68423,100 @@ var RunningStateStatusSchema = zod.z.object({
|
|
|
68210
68423
|
since: zod.z.number().nullable(),
|
|
68211
68424
|
source: RunningStateSourceSchema,
|
|
68212
68425
|
phase: zod.z.string().nullable(),
|
|
68213
|
-
|
|
68426
|
+
/** null until a reading has been published (D393). */
|
|
68427
|
+
lastFetchedAt: zod.z.number().nullable()
|
|
68214
68428
|
});
|
|
68215
68429
|
var RunningFlipEventDataSchema = zod.z.object({
|
|
68216
68430
|
deviceId: zod.z.number(),
|
|
68217
68431
|
since: zod.z.number().nullable(),
|
|
68218
68432
|
phase: zod.z.string().nullable()
|
|
68219
68433
|
});
|
|
68434
|
+
var RUNNING_DEVICE_TYPES = Object.values(DeviceType);
|
|
68435
|
+
/** Generic Customize target for the running boolean (D936). */
|
|
68436
|
+
var runningCustomize = {
|
|
68437
|
+
version: 1,
|
|
68438
|
+
targets: [{
|
|
68439
|
+
id: "running",
|
|
68440
|
+
cardinality: "scalar",
|
|
68441
|
+
vocabulary: {
|
|
68442
|
+
cap: "running-state",
|
|
68443
|
+
stateField: "running"
|
|
68444
|
+
},
|
|
68445
|
+
deviceTypes: [
|
|
68446
|
+
DeviceType.Dishwasher,
|
|
68447
|
+
DeviceType.Vacuum,
|
|
68448
|
+
DeviceType.LawnMower,
|
|
68449
|
+
DeviceType.MediaPlayer,
|
|
68450
|
+
DeviceType.WaterHeater,
|
|
68451
|
+
DeviceType.Humidifier,
|
|
68452
|
+
DeviceType.Fan,
|
|
68453
|
+
DeviceType.Climate,
|
|
68454
|
+
DeviceType.Thermostat,
|
|
68455
|
+
DeviceType.PetFeeder
|
|
68456
|
+
],
|
|
68457
|
+
apply: "add-or-replace",
|
|
68458
|
+
path: "running",
|
|
68459
|
+
sources: [
|
|
68460
|
+
{
|
|
68461
|
+
kind: "switch",
|
|
68462
|
+
transforms: [{ kind: "identity" }]
|
|
68463
|
+
},
|
|
68464
|
+
{
|
|
68465
|
+
kind: "binary",
|
|
68466
|
+
transforms: [{ kind: "identity" }, { kind: "invert" }]
|
|
68467
|
+
},
|
|
68468
|
+
{
|
|
68469
|
+
kind: "numeric",
|
|
68470
|
+
requiredUnit: "W",
|
|
68471
|
+
transforms: [{
|
|
68472
|
+
kind: "threshold",
|
|
68473
|
+
comparison: "gte",
|
|
68474
|
+
defaultThreshold: 5,
|
|
68475
|
+
defaultStartDwellMs: RUNNING_POWER_START_DELAY_MS,
|
|
68476
|
+
defaultStopDwellMs: RUNNING_POWER_STOP_DELAY_MS,
|
|
68477
|
+
thresholdUnit: "W"
|
|
68478
|
+
}]
|
|
68479
|
+
}
|
|
68480
|
+
],
|
|
68481
|
+
companions: [
|
|
68482
|
+
{
|
|
68483
|
+
kind: "constant",
|
|
68484
|
+
path: "source",
|
|
68485
|
+
value: "assigned",
|
|
68486
|
+
when: "always"
|
|
68487
|
+
},
|
|
68488
|
+
{
|
|
68489
|
+
kind: "constant",
|
|
68490
|
+
path: "phase",
|
|
68491
|
+
value: null,
|
|
68492
|
+
when: "always"
|
|
68493
|
+
},
|
|
68494
|
+
{
|
|
68495
|
+
kind: "clock",
|
|
68496
|
+
path: "lastFetchedAt",
|
|
68497
|
+
when: "always"
|
|
68498
|
+
},
|
|
68499
|
+
{
|
|
68500
|
+
kind: "transition-time",
|
|
68501
|
+
path: "since",
|
|
68502
|
+
sourceChangedAt: "prefer"
|
|
68503
|
+
}
|
|
68504
|
+
],
|
|
68505
|
+
sourceReport: {
|
|
68506
|
+
status: "assignment-status",
|
|
68507
|
+
runtimeField: "source",
|
|
68508
|
+
nativeValue: "native",
|
|
68509
|
+
assignedValue: "assigned"
|
|
68510
|
+
},
|
|
68511
|
+
advancedExpression: true
|
|
68512
|
+
}]
|
|
68513
|
+
};
|
|
68220
68514
|
var runningStateCapability = {
|
|
68221
68515
|
name: "running-state",
|
|
68222
68516
|
scope: "device",
|
|
68223
68517
|
deviceNative: true,
|
|
68224
68518
|
mode: "singleton",
|
|
68225
|
-
deviceTypes:
|
|
68519
|
+
deviceTypes: RUNNING_DEVICE_TYPES,
|
|
68226
68520
|
methods: {},
|
|
68227
68521
|
events: {
|
|
68228
68522
|
onStarted: { data: RunningFlipEventDataSchema },
|
|
@@ -68235,7 +68529,8 @@ var runningStateCapability = {
|
|
|
68235
68529
|
runtimeState: RunningStateStatusSchema,
|
|
68236
68530
|
durability: "restored",
|
|
68237
68531
|
history: { fields: { running: { kind: "boolean" } } },
|
|
68238
|
-
volatileStateFields: ["lastFetchedAt"]
|
|
68532
|
+
volatileStateFields: ["lastFetchedAt"],
|
|
68533
|
+
customize: runningCustomize
|
|
68239
68534
|
};
|
|
68240
68535
|
/**
|
|
68241
68536
|
* reboot — device-scoped capability for "soft" device reboots (firmware
|
|
@@ -92966,6 +93261,103 @@ var HISTORY_ITEM_CATALOG = { "consumables": {
|
|
|
92966
93261
|
}
|
|
92967
93262
|
}
|
|
92968
93263
|
} };
|
|
93264
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, 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.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Camera, DeviceType.Camera, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
93265
|
+
/**
|
|
93266
|
+
* A saved Customize assignment (D936). The schema is the type: callers use
|
|
93267
|
+
* `z.infer`, they do not restate the shape.
|
|
93268
|
+
*/
|
|
93269
|
+
var OverrideSourceSchema = zod.z.object({
|
|
93270
|
+
addonId: zod.z.string().min(1),
|
|
93271
|
+
stableId: zod.z.string().min(1),
|
|
93272
|
+
cap: zod.z.string().min(1),
|
|
93273
|
+
fieldPath: zod.z.string().min(1)
|
|
93274
|
+
});
|
|
93275
|
+
var IdentityTransformDraftSchema = zod.z.object({ kind: zod.z.literal("identity") });
|
|
93276
|
+
var InvertTransformDraftSchema = zod.z.object({ kind: zod.z.literal("invert") });
|
|
93277
|
+
var ThresholdTransformDraftSchema = zod.z.object({
|
|
93278
|
+
kind: zod.z.literal("threshold"),
|
|
93279
|
+
comparison: zod.z.enum(["gte", "lte"]),
|
|
93280
|
+
threshold: zod.z.number(),
|
|
93281
|
+
startDwellMs: zod.z.number().nonnegative(),
|
|
93282
|
+
stopDwellMs: zod.z.number().nonnegative()
|
|
93283
|
+
});
|
|
93284
|
+
var LinearTransformDraftSchema = zod.z.object({
|
|
93285
|
+
kind: zod.z.literal("linear"),
|
|
93286
|
+
scale: zod.z.number(),
|
|
93287
|
+
offset: zod.z.number(),
|
|
93288
|
+
clampMin: zod.z.number().optional(),
|
|
93289
|
+
clampMax: zod.z.number().optional()
|
|
93290
|
+
});
|
|
93291
|
+
var EnumMapTransformDraftSchema = zod.z.object({
|
|
93292
|
+
kind: zod.z.literal("enum-map"),
|
|
93293
|
+
mapping: zod.z.record(zod.z.string(), zod.z.string().nullable())
|
|
93294
|
+
});
|
|
93295
|
+
var NumberBridgeTransformDraftSchema = zod.z.object({ kind: zod.z.literal("number") });
|
|
93296
|
+
var CustomizeTransformDraftSchema = zod.z.discriminatedUnion("kind", [
|
|
93297
|
+
IdentityTransformDraftSchema,
|
|
93298
|
+
InvertTransformDraftSchema,
|
|
93299
|
+
ThresholdTransformDraftSchema,
|
|
93300
|
+
LinearTransformDraftSchema,
|
|
93301
|
+
EnumMapTransformDraftSchema,
|
|
93302
|
+
NumberBridgeTransformDraftSchema
|
|
93303
|
+
]);
|
|
93304
|
+
var ScalarOverrideDraftSchema = zod.z.object({
|
|
93305
|
+
kind: zod.z.literal("scalar"),
|
|
93306
|
+
cap: zod.z.string().min(1),
|
|
93307
|
+
targetId: zod.z.string().min(1),
|
|
93308
|
+
source: OverrideSourceSchema,
|
|
93309
|
+
transform: CustomizeTransformDraftSchema
|
|
93310
|
+
});
|
|
93311
|
+
var KeyedArrayOverrideDraftSchema = zod.z.object({
|
|
93312
|
+
kind: zod.z.literal("keyedArray"),
|
|
93313
|
+
cap: zod.z.string().min(1),
|
|
93314
|
+
targetId: zod.z.string().min(1),
|
|
93315
|
+
key: zod.z.string().min(1),
|
|
93316
|
+
label: zod.z.string().min(1),
|
|
93317
|
+
fieldPath: zod.z.string().min(1),
|
|
93318
|
+
source: OverrideSourceSchema,
|
|
93319
|
+
transform: CustomizeTransformDraftSchema
|
|
93320
|
+
});
|
|
93321
|
+
var PulseOverrideDraftSchema = zod.z.object({
|
|
93322
|
+
kind: zod.z.literal("pulse"),
|
|
93323
|
+
cap: zod.z.string().min(1),
|
|
93324
|
+
targetId: zod.z.string().min(1),
|
|
93325
|
+
enabled: zod.z.boolean(),
|
|
93326
|
+
debounceMs: zod.z.number().nonnegative(),
|
|
93327
|
+
sources: zod.z.array(OverrideSourceSchema).min(1)
|
|
93328
|
+
});
|
|
93329
|
+
var SpanSourceDraftSchema = OverrideSourceSchema.extend({ mode: zod.z.enum([
|
|
93330
|
+
"in-addition",
|
|
93331
|
+
"confirm",
|
|
93332
|
+
"replace"
|
|
93333
|
+
]).optional() });
|
|
93334
|
+
var SpanOverrideDraftSchema = zod.z.object({
|
|
93335
|
+
kind: zod.z.literal("span"),
|
|
93336
|
+
cap: zod.z.string().min(1),
|
|
93337
|
+
targetId: zod.z.string().min(1),
|
|
93338
|
+
timeoutMs: zod.z.number().nonnegative(),
|
|
93339
|
+
cooldownMs: zod.z.number().nonnegative().optional(),
|
|
93340
|
+
sources: zod.z.array(SpanSourceDraftSchema)
|
|
93341
|
+
});
|
|
93342
|
+
zod.z.discriminatedUnion("kind", [
|
|
93343
|
+
ScalarOverrideDraftSchema,
|
|
93344
|
+
KeyedArrayOverrideDraftSchema,
|
|
93345
|
+
PulseOverrideDraftSchema,
|
|
93346
|
+
SpanOverrideDraftSchema
|
|
93347
|
+
]);
|
|
93348
|
+
zod.z.object({
|
|
93349
|
+
targetId: zod.z.string().min(1),
|
|
93350
|
+
configured: zod.z.boolean(),
|
|
93351
|
+
source: zod.z.enum(["native", "assigned"]),
|
|
93352
|
+
state: zod.z.enum([
|
|
93353
|
+
"active",
|
|
93354
|
+
"stale",
|
|
93355
|
+
"released",
|
|
93356
|
+
"unavailable"
|
|
93357
|
+
]),
|
|
93358
|
+
reason: zod.z.string().nullable()
|
|
93359
|
+
});
|
|
93360
|
+
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
92969
93361
|
var G711_SCALE_CORRECTION_DB = {
|
|
92970
93362
|
PCMU: 20 * Math.log10(4),
|
|
92971
93363
|
PCMA: 20 * Math.log10(8)
|