@riddix/hamh 2.1.0-alpha.554 → 2.1.0-alpha.556
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/backend/cli.js
CHANGED
|
@@ -146521,6 +146521,7 @@ var init_home_assistant_domain = __esm({
|
|
|
146521
146521
|
HomeAssistantDomain2["select"] = "select";
|
|
146522
146522
|
HomeAssistantDomain2["script"] = "script";
|
|
146523
146523
|
HomeAssistantDomain2["sensor"] = "sensor";
|
|
146524
|
+
HomeAssistantDomain2["siren"] = "siren";
|
|
146524
146525
|
HomeAssistantDomain2["switch"] = "switch";
|
|
146525
146526
|
HomeAssistantDomain2["vacuum"] = "vacuum";
|
|
146526
146527
|
HomeAssistantDomain2["valve"] = "valve";
|
|
@@ -147447,6 +147448,7 @@ import { hideBin } from "yargs/helpers";
|
|
|
147447
147448
|
init_esm6();
|
|
147448
147449
|
|
|
147449
147450
|
// src/commands/start/start-handler.ts
|
|
147451
|
+
init_esm();
|
|
147450
147452
|
import * as ws from "ws";
|
|
147451
147453
|
|
|
147452
147454
|
// src/api/web-api.ts
|
|
@@ -148444,14 +148446,17 @@ function deviceImageApi(storageLocation, haRegistry) {
|
|
|
148444
148446
|
}
|
|
148445
148447
|
|
|
148446
148448
|
// src/api/diagnostic-api.ts
|
|
148447
|
-
import
|
|
148449
|
+
import os2 from "node:os";
|
|
148448
148450
|
import express6 from "express";
|
|
148449
148451
|
|
|
148450
148452
|
// src/api/logs-api.ts
|
|
148453
|
+
import os from "node:os";
|
|
148451
148454
|
import express5 from "express";
|
|
148455
|
+
var totalMemMB = Math.round(os.totalmem() / 1024 / 1024);
|
|
148456
|
+
var defaultMaxSize = totalMemMB < 2048 ? 200 : 1e3;
|
|
148452
148457
|
var logBuffer = {
|
|
148453
148458
|
entries: [],
|
|
148454
|
-
maxSize:
|
|
148459
|
+
maxSize: defaultMaxSize
|
|
148455
148460
|
};
|
|
148456
148461
|
function addLogEntry(entry) {
|
|
148457
148462
|
logBuffer.entries.push(entry);
|
|
@@ -148628,13 +148633,13 @@ function diagnosticApi(bridgeService, haClient, haRegistry, version, startTime)
|
|
|
148628
148633
|
version,
|
|
148629
148634
|
uptime: Math.floor((Date.now() - startTime) / 1e3),
|
|
148630
148635
|
system: {
|
|
148631
|
-
platform:
|
|
148632
|
-
arch:
|
|
148636
|
+
platform: os2.platform(),
|
|
148637
|
+
arch: os2.arch(),
|
|
148633
148638
|
nodeVersion: process.version,
|
|
148634
148639
|
environment: detectEnvironment(),
|
|
148635
148640
|
memory: {
|
|
148636
|
-
totalMB: Math.round(
|
|
148637
|
-
freeMB: Math.round(
|
|
148641
|
+
totalMB: Math.round(os2.totalmem() / 1024 / 1024),
|
|
148642
|
+
freeMB: Math.round(os2.freemem() / 1024 / 1024),
|
|
148638
148643
|
heapUsedMB: Math.round(memUsage.heapUsed / 1024 / 1024),
|
|
148639
148644
|
heapTotalMB: Math.round(memUsage.heapTotal / 1024 / 1024),
|
|
148640
148645
|
rssMB: Math.round(memUsage.rss / 1024 / 1024)
|
|
@@ -150032,7 +150037,7 @@ function metricsApi(bridgeService, haClient, haRegistry, startTime) {
|
|
|
150032
150037
|
}
|
|
150033
150038
|
|
|
150034
150039
|
// src/api/network-diagnostic-api.ts
|
|
150035
|
-
import * as
|
|
150040
|
+
import * as os3 from "node:os";
|
|
150036
150041
|
import express13 from "express";
|
|
150037
150042
|
function networkDiagnosticApi(mdnsInterface, mdnsIpv4) {
|
|
150038
150043
|
const router = express13.Router();
|
|
@@ -150043,7 +150048,7 @@ function networkDiagnosticApi(mdnsInterface, mdnsIpv4) {
|
|
|
150043
150048
|
return router;
|
|
150044
150049
|
}
|
|
150045
150050
|
function getNetworkInterfaces() {
|
|
150046
|
-
const raw =
|
|
150051
|
+
const raw = os3.networkInterfaces();
|
|
150047
150052
|
const result = [];
|
|
150048
150053
|
for (const [name, addrs] of Object.entries(raw)) {
|
|
150049
150054
|
if (!addrs) continue;
|
|
@@ -150909,7 +150914,7 @@ function settingsApi(settingsStorage, envAuth) {
|
|
|
150909
150914
|
// src/api/system-api.ts
|
|
150910
150915
|
init_esm();
|
|
150911
150916
|
import { exec } from "node:child_process";
|
|
150912
|
-
import
|
|
150917
|
+
import os4 from "node:os";
|
|
150913
150918
|
import { promisify } from "node:util";
|
|
150914
150919
|
import v8 from "node:v8";
|
|
150915
150920
|
import express15 from "express";
|
|
@@ -150965,22 +150970,22 @@ function systemApi(version) {
|
|
|
150965
150970
|
});
|
|
150966
150971
|
router.get("/info", async (_req, res) => {
|
|
150967
150972
|
try {
|
|
150968
|
-
const totalMem =
|
|
150969
|
-
const freeMem =
|
|
150973
|
+
const totalMem = os4.totalmem();
|
|
150974
|
+
const freeMem = os4.freemem();
|
|
150970
150975
|
const usedMem = totalMem - freeMem;
|
|
150971
150976
|
const storageInfo = await getStorageInfo();
|
|
150972
|
-
const cpus =
|
|
150977
|
+
const cpus = os4.cpus();
|
|
150973
150978
|
const memUsage = process.memoryUsage();
|
|
150974
150979
|
const systemInfo = {
|
|
150975
150980
|
version,
|
|
150976
150981
|
nodeVersion: process.version,
|
|
150977
|
-
hostname:
|
|
150978
|
-
platform:
|
|
150979
|
-
arch:
|
|
150980
|
-
uptime:
|
|
150982
|
+
hostname: os4.hostname(),
|
|
150983
|
+
platform: os4.platform(),
|
|
150984
|
+
arch: os4.arch(),
|
|
150985
|
+
uptime: os4.uptime(),
|
|
150981
150986
|
cpuCount: cpus.length,
|
|
150982
150987
|
cpuModel: cpus[0]?.model || "Unknown",
|
|
150983
|
-
loadAvg:
|
|
150988
|
+
loadAvg: os4.loadavg(),
|
|
150984
150989
|
environment: detectEnvironment2(),
|
|
150985
150990
|
memory: {
|
|
150986
150991
|
total: totalMem,
|
|
@@ -151016,7 +151021,7 @@ function systemApi(version) {
|
|
|
151016
151021
|
}
|
|
151017
151022
|
function getNetworkInterfaces2() {
|
|
151018
151023
|
const interfaces = [];
|
|
151019
|
-
const networkInterfaces3 =
|
|
151024
|
+
const networkInterfaces3 = os4.networkInterfaces();
|
|
151020
151025
|
for (const [name, ifaceList] of Object.entries(networkInterfaces3)) {
|
|
151021
151026
|
if (!ifaceList) continue;
|
|
151022
151027
|
for (const iface of ifaceList) {
|
|
@@ -151045,7 +151050,7 @@ function getNetworkInterfaces2() {
|
|
|
151045
151050
|
async function getStorageInfo() {
|
|
151046
151051
|
try {
|
|
151047
151052
|
const pathToCheck = getDataPath();
|
|
151048
|
-
if (
|
|
151053
|
+
if (os4.platform() === "win32") {
|
|
151049
151054
|
return await getWindowsStorageInfo(pathToCheck);
|
|
151050
151055
|
} else {
|
|
151051
151056
|
return await getUnixStorageInfo(pathToCheck);
|
|
@@ -151635,7 +151640,7 @@ function mdns(env, options) {
|
|
|
151635
151640
|
// src/core/app/storage.ts
|
|
151636
151641
|
init_esm7();
|
|
151637
151642
|
import fs8 from "node:fs";
|
|
151638
|
-
import
|
|
151643
|
+
import os5 from "node:os";
|
|
151639
151644
|
import path8 from "node:path";
|
|
151640
151645
|
|
|
151641
151646
|
// src/core/app/storage/custom-storage.ts
|
|
@@ -151742,7 +151747,7 @@ function storage(environment, options) {
|
|
|
151742
151747
|
storageService.factory = (ns) => new CustomStorage(logger205, path8.resolve(location2, ns));
|
|
151743
151748
|
}
|
|
151744
151749
|
function resolveStorageLocation(storageLocation) {
|
|
151745
|
-
const homedir =
|
|
151750
|
+
const homedir = os5.homedir();
|
|
151746
151751
|
return storageLocation ? path8.resolve(storageLocation.replace(/^~\//, `${homedir}/`)) : path8.join(homedir, ".home-assistant-matter-hub");
|
|
151747
151752
|
}
|
|
151748
151753
|
|
|
@@ -151762,7 +151767,7 @@ function configureDefaultEnvironment(options) {
|
|
|
151762
151767
|
// src/core/app/options.ts
|
|
151763
151768
|
init_esm7();
|
|
151764
151769
|
import { createRequire } from "node:module";
|
|
151765
|
-
import
|
|
151770
|
+
import os6 from "node:os";
|
|
151766
151771
|
import path9 from "node:path";
|
|
151767
151772
|
function resolveAppVersion() {
|
|
151768
151773
|
try {
|
|
@@ -151828,7 +151833,7 @@ var Options = class {
|
|
|
151828
151833
|
}
|
|
151829
151834
|
resolveStorageLocation() {
|
|
151830
151835
|
const storageLocation = notEmpty(this.startOptions.storageLocation);
|
|
151831
|
-
const homedir =
|
|
151836
|
+
const homedir = os6.homedir();
|
|
151832
151837
|
return storageLocation ? path9.resolve(storageLocation.replace(/^~\//, `${homedir}/`)) : path9.join(homedir, ".home-assistant-matter-hub");
|
|
151833
151838
|
}
|
|
151834
151839
|
get bridgeService() {
|
|
@@ -152309,39 +152314,44 @@ var HomeAssistantClient = class extends Service {
|
|
|
152309
152314
|
this.connection?.close();
|
|
152310
152315
|
}
|
|
152311
152316
|
async createConnection(props) {
|
|
152312
|
-
|
|
152313
|
-
|
|
152314
|
-
|
|
152315
|
-
|
|
152316
|
-
|
|
152317
|
-
|
|
152318
|
-
|
|
152319
|
-
|
|
152320
|
-
|
|
152321
|
-
|
|
152322
|
-
|
|
152323
|
-
|
|
152324
|
-
|
|
152325
|
-
|
|
152326
|
-
|
|
152327
|
-
|
|
152328
|
-
|
|
152329
|
-
|
|
152330
|
-
|
|
152331
|
-
|
|
152332
|
-
|
|
152333
|
-
|
|
152334
|
-
|
|
152335
|
-
|
|
152336
|
-
|
|
152337
|
-
|
|
152338
|
-
|
|
152339
|
-
|
|
152340
|
-
|
|
152341
|
-
|
|
152342
|
-
|
|
152317
|
+
const maxConnectAttempts = 60;
|
|
152318
|
+
for (let attempt = 1; attempt <= maxConnectAttempts; attempt++) {
|
|
152319
|
+
try {
|
|
152320
|
+
const connection = await createConnection({
|
|
152321
|
+
auth: createLongLivedTokenAuth(
|
|
152322
|
+
props.url.replace(/\/$/, ""),
|
|
152323
|
+
props.accessToken
|
|
152324
|
+
)
|
|
152325
|
+
});
|
|
152326
|
+
await this.waitForHomeAssistantToBeUpAndRunning(connection);
|
|
152327
|
+
return connection;
|
|
152328
|
+
} catch (reason) {
|
|
152329
|
+
if (reason === ERR_CANNOT_CONNECT) {
|
|
152330
|
+
this.log.warnCtx("Unable to connect to Home Assistant, retrying...", {
|
|
152331
|
+
url: props.url,
|
|
152332
|
+
attempt,
|
|
152333
|
+
maxAttempts: maxConnectAttempts,
|
|
152334
|
+
retryDelayMs: 5e3
|
|
152335
|
+
});
|
|
152336
|
+
await new Promise((resolve6) => setTimeout(resolve6, 5e3));
|
|
152337
|
+
continue;
|
|
152338
|
+
}
|
|
152339
|
+
if (reason === ERR_INVALID_AUTH) {
|
|
152340
|
+
this.log.errorCtx(
|
|
152341
|
+
"Authentication failed",
|
|
152342
|
+
new Error("Invalid authentication credentials"),
|
|
152343
|
+
{ url: props.url }
|
|
152344
|
+
);
|
|
152345
|
+
throw new Error(
|
|
152346
|
+
"Authentication failed while connecting to home assistant"
|
|
152347
|
+
);
|
|
152348
|
+
}
|
|
152349
|
+
throw new Error(`Unable to connect to home assistant: ${reason}`);
|
|
152350
|
+
}
|
|
152343
152351
|
}
|
|
152344
|
-
throw new Error(
|
|
152352
|
+
throw new Error(
|
|
152353
|
+
`Failed to connect to Home Assistant at ${props.url} after ${maxConnectAttempts} attempts (5 minutes)`
|
|
152354
|
+
);
|
|
152345
152355
|
}
|
|
152346
152356
|
async waitForHomeAssistantToBeUpAndRunning(connection) {
|
|
152347
152357
|
this.log.infoCtx("Waiting for Home Assistant to be up and running", {
|
|
@@ -152364,8 +152374,15 @@ var HomeAssistantClient = class extends Service {
|
|
|
152364
152374
|
this.log.debugCtx("Home Assistant state update", { state: state2 });
|
|
152365
152375
|
return state2;
|
|
152366
152376
|
};
|
|
152377
|
+
const maxWaitAttempts = 120;
|
|
152367
152378
|
let state;
|
|
152379
|
+
let waitAttempt = 0;
|
|
152368
152380
|
while (state !== "RUNNING") {
|
|
152381
|
+
if (++waitAttempt > maxWaitAttempts) {
|
|
152382
|
+
throw new Error(
|
|
152383
|
+
`Home Assistant did not reach RUNNING state within 10 minutes (last state: ${state ?? "unknown"})`
|
|
152384
|
+
);
|
|
152385
|
+
}
|
|
152369
152386
|
await new Promise((resolve6) => setTimeout(resolve6, 5e3));
|
|
152370
152387
|
state = await getState();
|
|
152371
152388
|
}
|
|
@@ -152398,8 +152415,10 @@ import { getStates } from "home-assistant-js-websocket";
|
|
|
152398
152415
|
import { fromPairs, keyBy, keys, uniq, values } from "lodash-es";
|
|
152399
152416
|
|
|
152400
152417
|
// src/utils/log-memory.ts
|
|
152418
|
+
import os7 from "node:os";
|
|
152401
152419
|
import v82 from "node:v8";
|
|
152402
152420
|
var HEAP_PRESSURE_THRESHOLD = 0.85;
|
|
152421
|
+
var LOW_MEMORY_THRESHOLD_MB = 512;
|
|
152403
152422
|
function logMemoryUsage(log, context) {
|
|
152404
152423
|
const mem = process.memoryUsage();
|
|
152405
152424
|
const heapUsedMB = Math.round(mem.heapUsed / 1024 / 1024);
|
|
@@ -152413,6 +152432,21 @@ function isHeapUnderPressure() {
|
|
|
152413
152432
|
const stats = v82.getHeapStatistics();
|
|
152414
152433
|
return stats.used_heap_size / stats.heap_size_limit > HEAP_PRESSURE_THRESHOLD;
|
|
152415
152434
|
}
|
|
152435
|
+
function logStartupMemoryGuard(log) {
|
|
152436
|
+
const totalMB = Math.round(os7.totalmem() / 1024 / 1024);
|
|
152437
|
+
const freeMB = Math.round(os7.freemem() / 1024 / 1024);
|
|
152438
|
+
const heapLimitMB = Math.round(
|
|
152439
|
+
v82.getHeapStatistics().heap_size_limit / 1024 / 1024
|
|
152440
|
+
);
|
|
152441
|
+
log.info(
|
|
152442
|
+
`System memory: ${freeMB} MB free / ${totalMB} MB total, heap limit: ${heapLimitMB} MB`
|
|
152443
|
+
);
|
|
152444
|
+
if (freeMB < LOW_MEMORY_THRESHOLD_MB) {
|
|
152445
|
+
log.warn(
|
|
152446
|
+
`Low memory detected (${freeMB} MB free). HAMH typically needs 400-600 MB. Consider reducing the number of entities per bridge, stopping memory-heavy add-ons, or increasing available RAM. See the FAQ section 'The app keeps crashing or restarting' for details.`
|
|
152447
|
+
);
|
|
152448
|
+
}
|
|
152449
|
+
}
|
|
152416
152450
|
|
|
152417
152451
|
// src/services/home-assistant/home-assistant-registry.ts
|
|
152418
152452
|
init_retry();
|
|
@@ -159875,6 +159909,7 @@ var DishwasherDeviceDefinition = MutableEndpoint({
|
|
|
159875
159909
|
behaviors: SupportedBehaviors(DishwasherRequirements.server.mandatory.OperationalState)
|
|
159876
159910
|
});
|
|
159877
159911
|
Object.freeze(DishwasherDeviceDefinition);
|
|
159912
|
+
var DishwasherDevice = DishwasherDeviceDefinition;
|
|
159878
159913
|
|
|
159879
159914
|
// ../../node_modules/.pnpm/@matter+node@0.16.10/node_modules/@matter/node/dist/esm/devices/door-lock-controller.js
|
|
159880
159915
|
init_TimeSynchronizationServer();
|
|
@@ -171376,6 +171411,19 @@ var WindowCoveringServerBase = class _WindowCoveringServerBase extends FeaturedB
|
|
|
171376
171411
|
static DEBOUNCE_INITIAL_MS = 400;
|
|
171377
171412
|
static DEBOUNCE_SUBSEQUENT_MS = 150;
|
|
171378
171413
|
static COMMAND_SEQUENCE_THRESHOLD_MS = 600;
|
|
171414
|
+
async [Symbol.asyncDispose]() {
|
|
171415
|
+
if (this.liftDebounceTimer) {
|
|
171416
|
+
clearTimeout(this.liftDebounceTimer);
|
|
171417
|
+
this.liftDebounceTimer = null;
|
|
171418
|
+
}
|
|
171419
|
+
if (this.tiltDebounceTimer) {
|
|
171420
|
+
clearTimeout(this.tiltDebounceTimer);
|
|
171421
|
+
this.tiltDebounceTimer = null;
|
|
171422
|
+
}
|
|
171423
|
+
this.pendingLiftAction = null;
|
|
171424
|
+
this.pendingTiltAction = null;
|
|
171425
|
+
await super[Symbol.asyncDispose]();
|
|
171426
|
+
}
|
|
171379
171427
|
async initialize() {
|
|
171380
171428
|
if (this.features.lift) {
|
|
171381
171429
|
if (this.state.installedOpenLimitLift == null) {
|
|
@@ -171888,6 +171936,106 @@ function CoverDevice(homeAssistantEntity) {
|
|
|
171888
171936
|
});
|
|
171889
171937
|
}
|
|
171890
171938
|
|
|
171939
|
+
// ../../node_modules/.pnpm/@matter+main@0.16.10/node_modules/@matter/main/dist/esm/forwards/behaviors/operational-state.js
|
|
171940
|
+
init_nodejs();
|
|
171941
|
+
|
|
171942
|
+
// ../../node_modules/.pnpm/@matter+main@0.16.10/node_modules/@matter/main/dist/esm/forwards/clusters/operational-state.js
|
|
171943
|
+
init_nodejs();
|
|
171944
|
+
init_operational_state();
|
|
171945
|
+
|
|
171946
|
+
// src/matter/endpoints/legacy/dishwasher/index.ts
|
|
171947
|
+
init_home_assistant_entity_behavior();
|
|
171948
|
+
var haStateToDishwasherState = {
|
|
171949
|
+
off: OperationalState3.OperationalStateEnum.Stopped,
|
|
171950
|
+
idle: OperationalState3.OperationalStateEnum.Stopped,
|
|
171951
|
+
standby: OperationalState3.OperationalStateEnum.Stopped,
|
|
171952
|
+
on: OperationalState3.OperationalStateEnum.Running,
|
|
171953
|
+
running: OperationalState3.OperationalStateEnum.Running,
|
|
171954
|
+
active: OperationalState3.OperationalStateEnum.Running,
|
|
171955
|
+
drying: OperationalState3.OperationalStateEnum.Running,
|
|
171956
|
+
washing: OperationalState3.OperationalStateEnum.Running,
|
|
171957
|
+
paused: OperationalState3.OperationalStateEnum.Paused,
|
|
171958
|
+
complete: OperationalState3.OperationalStateEnum.Stopped,
|
|
171959
|
+
finished: OperationalState3.OperationalStateEnum.Stopped
|
|
171960
|
+
};
|
|
171961
|
+
var DishwasherOperationalStateServer = class extends OperationalStateServer {
|
|
171962
|
+
async initialize() {
|
|
171963
|
+
this.state.operationalStateList = [
|
|
171964
|
+
{ operationalStateId: OperationalState3.OperationalStateEnum.Stopped },
|
|
171965
|
+
{ operationalStateId: OperationalState3.OperationalStateEnum.Running },
|
|
171966
|
+
{ operationalStateId: OperationalState3.OperationalStateEnum.Paused },
|
|
171967
|
+
{ operationalStateId: OperationalState3.OperationalStateEnum.Error }
|
|
171968
|
+
];
|
|
171969
|
+
this.state.operationalState = OperationalState3.OperationalStateEnum.Stopped;
|
|
171970
|
+
this.state.operationalError = {
|
|
171971
|
+
errorStateId: OperationalState3.ErrorState.NoError
|
|
171972
|
+
};
|
|
171973
|
+
await super.initialize();
|
|
171974
|
+
const homeAssistant = await this.agent.load(HomeAssistantEntityBehavior);
|
|
171975
|
+
this.update(homeAssistant.entity);
|
|
171976
|
+
this.reactTo(homeAssistant.onChange, this.update);
|
|
171977
|
+
}
|
|
171978
|
+
update(entity) {
|
|
171979
|
+
if (!entity.state) {
|
|
171980
|
+
return;
|
|
171981
|
+
}
|
|
171982
|
+
const haState = entity.state.state?.toLowerCase() ?? "off";
|
|
171983
|
+
const newState = haStateToDishwasherState[haState] ?? OperationalState3.OperationalStateEnum.Stopped;
|
|
171984
|
+
applyPatchState(this.state, {
|
|
171985
|
+
operationalState: newState,
|
|
171986
|
+
operationalError: {
|
|
171987
|
+
errorStateId: OperationalState3.ErrorState.NoError
|
|
171988
|
+
}
|
|
171989
|
+
});
|
|
171990
|
+
}
|
|
171991
|
+
pause() {
|
|
171992
|
+
return {
|
|
171993
|
+
commandResponseState: {
|
|
171994
|
+
errorStateId: OperationalState3.ErrorState.CommandInvalidInState
|
|
171995
|
+
}
|
|
171996
|
+
};
|
|
171997
|
+
}
|
|
171998
|
+
stop() {
|
|
171999
|
+
const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
|
|
172000
|
+
homeAssistant.callAction({ action: "homeassistant.turn_off" });
|
|
172001
|
+
return {
|
|
172002
|
+
commandResponseState: {
|
|
172003
|
+
errorStateId: OperationalState3.ErrorState.NoError
|
|
172004
|
+
}
|
|
172005
|
+
};
|
|
172006
|
+
}
|
|
172007
|
+
start() {
|
|
172008
|
+
const homeAssistant = this.agent.get(HomeAssistantEntityBehavior);
|
|
172009
|
+
homeAssistant.callAction({ action: "homeassistant.turn_on" });
|
|
172010
|
+
return {
|
|
172011
|
+
commandResponseState: {
|
|
172012
|
+
errorStateId: OperationalState3.ErrorState.NoError
|
|
172013
|
+
}
|
|
172014
|
+
};
|
|
172015
|
+
}
|
|
172016
|
+
resume() {
|
|
172017
|
+
return this.start();
|
|
172018
|
+
}
|
|
172019
|
+
};
|
|
172020
|
+
var DishwasherOnOffServer = OnOffServer2({
|
|
172021
|
+
turnOn: () => ({
|
|
172022
|
+
action: "homeassistant.turn_on"
|
|
172023
|
+
}),
|
|
172024
|
+
turnOff: () => ({
|
|
172025
|
+
action: "homeassistant.turn_off"
|
|
172026
|
+
})
|
|
172027
|
+
});
|
|
172028
|
+
var DishwasherDeviceType = DishwasherDevice.with(
|
|
172029
|
+
BasicInformationServer2,
|
|
172030
|
+
IdentifyServer2,
|
|
172031
|
+
HomeAssistantEntityBehavior,
|
|
172032
|
+
DishwasherOperationalStateServer,
|
|
172033
|
+
DishwasherOnOffServer
|
|
172034
|
+
);
|
|
172035
|
+
function DishwasherEndpoint(homeAssistantEntity) {
|
|
172036
|
+
return DishwasherDeviceType.set({ homeAssistantEntity });
|
|
172037
|
+
}
|
|
172038
|
+
|
|
171891
172039
|
// src/matter/behaviors/generic-switch-server.ts
|
|
171892
172040
|
init_esm();
|
|
171893
172041
|
init_home_assistant_entity_behavior();
|
|
@@ -172221,6 +172369,12 @@ function consumePendingColorStaging(entityId) {
|
|
|
172221
172369
|
var FeaturedBase8 = ColorControlServer.with("ColorTemperature", "HueSaturation");
|
|
172222
172370
|
var ColorControlServerBase = class extends FeaturedBase8 {
|
|
172223
172371
|
pendingTransitionTime;
|
|
172372
|
+
async [Symbol.asyncDispose]() {
|
|
172373
|
+
const entityId = this.agent.get(HomeAssistantEntityBehavior).entityId;
|
|
172374
|
+
optimisticColorState.delete(entityId);
|
|
172375
|
+
pendingColorStaging.delete(entityId);
|
|
172376
|
+
await super[Symbol.asyncDispose]();
|
|
172377
|
+
}
|
|
172224
172378
|
async initialize() {
|
|
172225
172379
|
if (this.features.colorTemperature) {
|
|
172226
172380
|
const defaultMinMireds = 147;
|
|
@@ -175595,6 +175749,26 @@ function SensorDevice(homeAssistantEntity) {
|
|
|
175595
175749
|
return void 0;
|
|
175596
175750
|
}
|
|
175597
175751
|
|
|
175752
|
+
// src/matter/endpoints/legacy/siren/index.ts
|
|
175753
|
+
init_home_assistant_entity_behavior();
|
|
175754
|
+
var SirenOnOffServer = OnOffServer2({
|
|
175755
|
+
turnOn: () => ({
|
|
175756
|
+
action: "siren.turn_on"
|
|
175757
|
+
}),
|
|
175758
|
+
turnOff: () => ({
|
|
175759
|
+
action: "siren.turn_off"
|
|
175760
|
+
})
|
|
175761
|
+
});
|
|
175762
|
+
var SirenDeviceType = OnOffPlugInUnitDevice.with(
|
|
175763
|
+
BasicInformationServer2,
|
|
175764
|
+
IdentifyServer2,
|
|
175765
|
+
HomeAssistantEntityBehavior,
|
|
175766
|
+
SirenOnOffServer
|
|
175767
|
+
);
|
|
175768
|
+
function SirenDevice(homeAssistantEntity) {
|
|
175769
|
+
return SirenDeviceType.set({ homeAssistantEntity });
|
|
175770
|
+
}
|
|
175771
|
+
|
|
175598
175772
|
// src/matter/endpoints/legacy/switch/dimmable-plugin-unit.ts
|
|
175599
175773
|
init_home_assistant_entity_behavior();
|
|
175600
175774
|
var DimmablePlugInUnitType = DimmablePlugInUnitDevice.with(
|
|
@@ -178190,6 +178364,7 @@ var deviceCtrs = {
|
|
|
178190
178364
|
select: SelectDevice,
|
|
178191
178365
|
input_select: InputSelectDevice,
|
|
178192
178366
|
scene: SceneDevice,
|
|
178367
|
+
siren: SirenDevice,
|
|
178193
178368
|
media_player: MediaPlayerDevice,
|
|
178194
178369
|
humidifier: HumidifierDevice,
|
|
178195
178370
|
vacuum: VacuumDevice,
|
|
@@ -178211,6 +178386,7 @@ var matterDeviceTypeFactories = {
|
|
|
178211
178386
|
}
|
|
178212
178387
|
return SwitchDevice(ha);
|
|
178213
178388
|
},
|
|
178389
|
+
dishwasher: DishwasherEndpoint,
|
|
178214
178390
|
dimmable_plugin_unit: (ha) => DimmablePlugInUnitType.set({ homeAssistantEntity: ha }),
|
|
178215
178391
|
on_off_switch: SwitchDevice,
|
|
178216
178392
|
door_lock: LockDevice,
|
|
@@ -181543,6 +181719,7 @@ async function startHandler(startOptions, webUiDist) {
|
|
|
181543
181719
|
patchLevelControlTlv();
|
|
181544
181720
|
const options = new Options({ ...startOptions, webUiDist });
|
|
181545
181721
|
const rootEnv = configureDefaultEnvironment(options);
|
|
181722
|
+
logStartupMemoryGuard(Logger.get("Startup"));
|
|
181546
181723
|
const appEnvironment = await AppEnvironment.create(rootEnv, options);
|
|
181547
181724
|
registerFinalErrorHandlers();
|
|
181548
181725
|
const bridgeService$ = appEnvironment.load(BridgeService);
|
|
@@ -183562,6 +183739,8 @@ export {
|
|
|
183562
183739
|
@matter/main/dist/esm/clusters.js:
|
|
183563
183740
|
@matter/main/dist/esm/forwards/behaviors/boolean-state.js:
|
|
183564
183741
|
@matter/main/dist/esm/forwards/behaviors/smoke-co-alarm.js:
|
|
183742
|
+
@matter/main/dist/esm/forwards/behaviors/operational-state.js:
|
|
183743
|
+
@matter/main/dist/esm/forwards/clusters/operational-state.js:
|
|
183565
183744
|
@matter/main/dist/esm/forwards/behaviors/color-control.js:
|
|
183566
183745
|
@matter/main/dist/esm/forwards/behaviors/pump-configuration-and-control.js:
|
|
183567
183746
|
@matter/main/dist/esm/forwards/clusters/mode-base.js:
|