@camstack/addon-provider-homeassistant 1.2.82 → 1.2.84
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/addon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-CcOZqeLH.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let node_zlib = require("node:zlib");
|
|
5
5
|
//#region src/ha-device-source.ts
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-
|
|
1
|
+
import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-CqiUtzgT.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
|
|
4
4
|
//#region src/ha-device-source.ts
|
|
@@ -21112,6 +21112,14 @@ var AgentPipelineSettingsSchema = object({
|
|
|
21112
21112
|
/** Node is eligible to be the ingest / source-owner (serve the restream). */
|
|
21113
21113
|
ingest: boolean().optional(),
|
|
21114
21114
|
/**
|
|
21115
|
+
* This node's decode RAM budget, MB. Wins over the cluster
|
|
21116
|
+
* `nodeDecodeBudgetMb`; absent, the runner derives a share of the node's
|
|
21117
|
+
* own RAM unless the operator moved the cluster value (D365).
|
|
21118
|
+
*/
|
|
21119
|
+
decodeBudgetMb: number().int().min(1024).max(65536).optional(),
|
|
21120
|
+
/** This node's live decode-worker cap. Wins over the cluster `maxLiveDecodeWorkers`. */
|
|
21121
|
+
maxLiveDecodeWorkers: number().int().min(1).max(32).optional(),
|
|
21122
|
+
/**
|
|
21115
21123
|
* Operator override for the LAN host a cross-node decoder dials to reach
|
|
21116
21124
|
* THIS node's restream (Cluster UI). Absent → auto-detect: a remote runner
|
|
21117
21125
|
* falls back to its `CAMSTACK_HUB_URL`-derived host (the Moleculer address
|
|
@@ -21573,6 +21581,13 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
|
21573
21581
|
}), object({ success: literal(true) }), {
|
|
21574
21582
|
kind: "mutation",
|
|
21575
21583
|
auth: "admin"
|
|
21584
|
+
}), method(object({
|
|
21585
|
+
agentNodeId: string(),
|
|
21586
|
+
decodeBudgetMb: number().int().min(1024).max(65536).nullable().optional(),
|
|
21587
|
+
maxLiveDecodeWorkers: number().int().min(1).max(32).nullable().optional()
|
|
21588
|
+
}), object({ success: literal(true) }), {
|
|
21589
|
+
kind: "mutation",
|
|
21590
|
+
auth: "admin"
|
|
21576
21591
|
}), method(object({
|
|
21577
21592
|
agentNodeId: string(),
|
|
21578
21593
|
reachableHost: string().nullable()
|
|
@@ -33580,7 +33595,15 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
33580
33595
|
if (!Class) throw new Error(`no device class registered for type "${saved.type}"`);
|
|
33581
33596
|
if (saved.parentDeviceId !== null && !restored.has(saved.parentDeviceId)) throw new Error(`parent device ${saved.parentDeviceId} not restored`);
|
|
33582
33597
|
await this.healSavedConfig(saved, savedDevices);
|
|
33583
|
-
|
|
33598
|
+
try {
|
|
33599
|
+
await this.ctx.kernel.devices.create(saved.stableId, Class, {}, saved.parentDeviceId);
|
|
33600
|
+
} catch (err) {
|
|
33601
|
+
if (!(await this.ctx.kernel.devices.getAll()).some((device) => device.stableId === saved.stableId)) throw err;
|
|
33602
|
+
this.ctx.logger.debug("Restore row came to life during its own dial — kept", { tags: {
|
|
33603
|
+
deviceId: saved.id,
|
|
33604
|
+
stableId: saved.stableId
|
|
33605
|
+
} });
|
|
33606
|
+
}
|
|
33584
33607
|
restored.add(saved.id);
|
|
33585
33608
|
};
|
|
33586
33609
|
const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
|
|
@@ -37613,6 +37636,12 @@ Object.freeze({
|
|
|
37613
37636
|
addonId: null,
|
|
37614
37637
|
access: "create"
|
|
37615
37638
|
},
|
|
37639
|
+
"pipelineOrchestrator.setAgentDecodeLimits": {
|
|
37640
|
+
capName: "pipeline-orchestrator",
|
|
37641
|
+
capScope: "system",
|
|
37642
|
+
addonId: null,
|
|
37643
|
+
access: "create"
|
|
37644
|
+
},
|
|
37616
37645
|
"pipelineOrchestrator.setAgentDetectWeight": {
|
|
37617
37646
|
capName: "pipeline-orchestrator",
|
|
37618
37647
|
capScope: "system",
|
|
@@ -21112,6 +21112,14 @@ var AgentPipelineSettingsSchema = object({
|
|
|
21112
21112
|
/** Node is eligible to be the ingest / source-owner (serve the restream). */
|
|
21113
21113
|
ingest: boolean().optional(),
|
|
21114
21114
|
/**
|
|
21115
|
+
* This node's decode RAM budget, MB. Wins over the cluster
|
|
21116
|
+
* `nodeDecodeBudgetMb`; absent, the runner derives a share of the node's
|
|
21117
|
+
* own RAM unless the operator moved the cluster value (D365).
|
|
21118
|
+
*/
|
|
21119
|
+
decodeBudgetMb: number().int().min(1024).max(65536).optional(),
|
|
21120
|
+
/** This node's live decode-worker cap. Wins over the cluster `maxLiveDecodeWorkers`. */
|
|
21121
|
+
maxLiveDecodeWorkers: number().int().min(1).max(32).optional(),
|
|
21122
|
+
/**
|
|
21115
21123
|
* Operator override for the LAN host a cross-node decoder dials to reach
|
|
21116
21124
|
* THIS node's restream (Cluster UI). Absent → auto-detect: a remote runner
|
|
21117
21125
|
* falls back to its `CAMSTACK_HUB_URL`-derived host (the Moleculer address
|
|
@@ -21573,6 +21581,13 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
|
21573
21581
|
}), object({ success: literal(true) }), {
|
|
21574
21582
|
kind: "mutation",
|
|
21575
21583
|
auth: "admin"
|
|
21584
|
+
}), method(object({
|
|
21585
|
+
agentNodeId: string(),
|
|
21586
|
+
decodeBudgetMb: number().int().min(1024).max(65536).nullable().optional(),
|
|
21587
|
+
maxLiveDecodeWorkers: number().int().min(1).max(32).nullable().optional()
|
|
21588
|
+
}), object({ success: literal(true) }), {
|
|
21589
|
+
kind: "mutation",
|
|
21590
|
+
auth: "admin"
|
|
21576
21591
|
}), method(object({
|
|
21577
21592
|
agentNodeId: string(),
|
|
21578
21593
|
reachableHost: string().nullable()
|
|
@@ -33580,7 +33595,15 @@ var BaseDeviceProvider = class extends BaseAddon {
|
|
|
33580
33595
|
if (!Class) throw new Error(`no device class registered for type "${saved.type}"`);
|
|
33581
33596
|
if (saved.parentDeviceId !== null && !restored.has(saved.parentDeviceId)) throw new Error(`parent device ${saved.parentDeviceId} not restored`);
|
|
33582
33597
|
await this.healSavedConfig(saved, savedDevices);
|
|
33583
|
-
|
|
33598
|
+
try {
|
|
33599
|
+
await this.ctx.kernel.devices.create(saved.stableId, Class, {}, saved.parentDeviceId);
|
|
33600
|
+
} catch (err) {
|
|
33601
|
+
if (!(await this.ctx.kernel.devices.getAll()).some((device) => device.stableId === saved.stableId)) throw err;
|
|
33602
|
+
this.ctx.logger.debug("Restore row came to life during its own dial — kept", { tags: {
|
|
33603
|
+
deviceId: saved.id,
|
|
33604
|
+
stableId: saved.stableId
|
|
33605
|
+
} });
|
|
33606
|
+
}
|
|
33584
33607
|
restored.add(saved.id);
|
|
33585
33608
|
};
|
|
33586
33609
|
const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
|
|
@@ -37613,6 +37636,12 @@ Object.freeze({
|
|
|
37613
37636
|
addonId: null,
|
|
37614
37637
|
access: "create"
|
|
37615
37638
|
},
|
|
37639
|
+
"pipelineOrchestrator.setAgentDecodeLimits": {
|
|
37640
|
+
capName: "pipeline-orchestrator",
|
|
37641
|
+
capScope: "system",
|
|
37642
|
+
addonId: null,
|
|
37643
|
+
access: "create"
|
|
37644
|
+
},
|
|
37616
37645
|
"pipelineOrchestrator.setAgentDetectWeight": {
|
|
37617
37646
|
capName: "pipeline-orchestrator",
|
|
37618
37647
|
capScope: "system",
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
//#endregion
|
|
6
|
-
const require_dist = require("../dist-
|
|
6
|
+
const require_dist = require("../dist-CcOZqeLH.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
//#region src/ha-export/topics.ts
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-
|
|
1
|
+
import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-CqiUtzgT.mjs";
|
|
2
2
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
3
3
|
//#region src/ha-export/topics.ts
|
|
4
4
|
/**
|