@riddix/hamh 2.1.0-alpha.609 → 2.1.0-alpha.611
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
|
@@ -151559,6 +151559,12 @@ var LoggerService = class {
|
|
|
151559
151559
|
this._level = logLevelFromString(options.level ?? "info");
|
|
151560
151560
|
this._jsonOutput = options.jsonOutput ?? false;
|
|
151561
151561
|
Logger.level = this.customLogLevelMapping[this._level] ?? this._level;
|
|
151562
|
+
const protocolLevel = logLevelFromString(options.protocolLevel ?? "info");
|
|
151563
|
+
const resolvedProtocolLevel = this.customLogLevelMapping[protocolLevel] ?? protocolLevel;
|
|
151564
|
+
Logger.facilityLevels = {
|
|
151565
|
+
MessageChannel: resolvedProtocolLevel,
|
|
151566
|
+
MessageExchange: resolvedProtocolLevel
|
|
151567
|
+
};
|
|
151562
151568
|
Logger.format = options.disableColors ? LogFormat.PLAIN : LogFormat.ANSI;
|
|
151563
151569
|
}
|
|
151564
151570
|
get(nameOrService) {
|
|
@@ -151878,6 +151884,7 @@ var Options = class {
|
|
|
151878
151884
|
get logging() {
|
|
151879
151885
|
return {
|
|
151880
151886
|
level: this.startOptions.logLevel,
|
|
151887
|
+
protocolLevel: this.startOptions.protocolLogLevel,
|
|
151881
151888
|
disableColors: this.startOptions.disableLogColors ?? false,
|
|
151882
151889
|
jsonOutput: this.startOptions.jsonLogs ?? false
|
|
151883
151890
|
};
|
|
@@ -151927,7 +151934,8 @@ var Options = class {
|
|
|
151927
151934
|
productName: "MatterHub",
|
|
151928
151935
|
productLabel: "Home Assistant Matter Hub",
|
|
151929
151936
|
hardwareVersion: (/* @__PURE__ */ new Date()).getFullYear(),
|
|
151930
|
-
softwareVersion: (/* @__PURE__ */ new Date()).getFullYear()
|
|
151937
|
+
softwareVersion: (/* @__PURE__ */ new Date()).getFullYear(),
|
|
151938
|
+
softwareVersionString: resolveAppVersion()
|
|
151931
151939
|
}
|
|
151932
151940
|
};
|
|
151933
151941
|
}
|
|
@@ -152176,12 +152184,25 @@ var BridgeService = class extends Service {
|
|
|
152176
152184
|
recoveryInterval;
|
|
152177
152185
|
async initialize() {
|
|
152178
152186
|
for (const data of this.bridgeStorage.bridges) {
|
|
152179
|
-
|
|
152187
|
+
const normalized = this.normalizeBridgeData(data);
|
|
152188
|
+
await this.bridgeStorage.add(normalized);
|
|
152189
|
+
await this.addBridge(normalized);
|
|
152180
152190
|
}
|
|
152181
152191
|
if (this.autoRecoveryEnabled) {
|
|
152182
152192
|
this.startAutoRecovery();
|
|
152183
152193
|
}
|
|
152184
152194
|
}
|
|
152195
|
+
normalizeBridgeData(bridgeData) {
|
|
152196
|
+
const { basicInformation } = bridgeData;
|
|
152197
|
+
return {
|
|
152198
|
+
...bridgeData,
|
|
152199
|
+
basicInformation: {
|
|
152200
|
+
...basicInformation,
|
|
152201
|
+
hardwareVersionString: basicInformation.hardwareVersionString ?? this.props.basicInformation.hardwareVersionString ?? String(basicInformation.hardwareVersion),
|
|
152202
|
+
softwareVersionString: basicInformation.softwareVersionString ?? this.props.basicInformation.softwareVersionString ?? String(basicInformation.softwareVersion)
|
|
152203
|
+
}
|
|
152204
|
+
};
|
|
152205
|
+
}
|
|
152185
152206
|
startAutoRecovery() {
|
|
152186
152207
|
const intervalMs = this.props.recoveryIntervalMs ?? 6e4;
|
|
152187
152208
|
this.recoveryInterval = setInterval(() => {
|
|
@@ -165205,6 +165226,8 @@ var ServerModeServerNode = class extends ServerNode {
|
|
|
165205
165226
|
serialNumber: `server-${bridgeData.id}`.substring(0, 32),
|
|
165206
165227
|
hardwareVersion: bridgeData.basicInformation.hardwareVersion,
|
|
165207
165228
|
softwareVersion: bridgeData.basicInformation.softwareVersion,
|
|
165229
|
+
hardwareVersionString: bridgeData.basicInformation.hardwareVersionString,
|
|
165230
|
+
softwareVersionString: bridgeData.basicInformation.softwareVersionString ?? String(bridgeData.basicInformation.softwareVersion),
|
|
165208
165231
|
...bridgeData.countryCode ? { location: bridgeData.countryCode } : {}
|
|
165209
165232
|
},
|
|
165210
165233
|
subscriptions: {
|
|
@@ -167332,6 +167355,8 @@ function createBridgeServerConfig(data) {
|
|
|
167332
167355
|
serialNumber: crypto5.createHash("md5").update(`serial-${data.id}`).digest("hex").substring(0, 32),
|
|
167333
167356
|
hardwareVersion: data.basicInformation.hardwareVersion,
|
|
167334
167357
|
softwareVersion: data.basicInformation.softwareVersion,
|
|
167358
|
+
hardwareVersionString: data.basicInformation.hardwareVersionString,
|
|
167359
|
+
softwareVersionString: data.basicInformation.softwareVersionString ?? String(data.basicInformation.softwareVersion),
|
|
167335
167360
|
...data.countryCode ? { location: data.countryCode } : {}
|
|
167336
167361
|
},
|
|
167337
167362
|
subscriptions: {
|
|
@@ -167395,6 +167420,16 @@ var Bridge = class {
|
|
|
167395
167420
|
this.dataProvider,
|
|
167396
167421
|
this.endpointManager.root
|
|
167397
167422
|
);
|
|
167423
|
+
const { basicInformation } = this.dataProvider;
|
|
167424
|
+
this.log.debugCtx("Root bridge BasicInformation configured", {
|
|
167425
|
+
vendorName: basicInformation.vendorName,
|
|
167426
|
+
productName: basicInformation.productName,
|
|
167427
|
+
productLabel: basicInformation.productLabel,
|
|
167428
|
+
hardwareVersion: basicInformation.hardwareVersion,
|
|
167429
|
+
hardwareVersionString: basicInformation.hardwareVersionString,
|
|
167430
|
+
softwareVersion: basicInformation.softwareVersion,
|
|
167431
|
+
softwareVersionString: basicInformation.softwareVersionString
|
|
167432
|
+
});
|
|
167398
167433
|
}
|
|
167399
167434
|
log;
|
|
167400
167435
|
server;
|
|
@@ -170812,7 +170847,7 @@ var ClimateOnOffServer = OnOffServer2({
|
|
|
170812
170847
|
return { action: "climate.turn_on" };
|
|
170813
170848
|
},
|
|
170814
170849
|
turnOff: () => ({ action: "climate.turn_off" })
|
|
170815
|
-
}).with("
|
|
170850
|
+
}).with("DeadFrontBehavior");
|
|
170816
170851
|
|
|
170817
170852
|
// src/matter/endpoints/legacy/climate/behaviors/climate-thermostat-server.ts
|
|
170818
170853
|
init_dist();
|
|
@@ -182488,6 +182523,11 @@ function startOptionsBuilder(yargs2) {
|
|
|
182488
182523
|
type: "string",
|
|
182489
182524
|
choices: ["silly", "debug", "info", "notice", "warn", "error", "fatal"],
|
|
182490
182525
|
default: "info"
|
|
182526
|
+
}).option("protocol-log-level", {
|
|
182527
|
+
type: "string",
|
|
182528
|
+
choices: ["silly", "debug", "info", "notice", "warn", "error", "fatal"],
|
|
182529
|
+
default: "info",
|
|
182530
|
+
description: "Log level for matter.js MessageChannel/MessageExchange facilities. These emit per-packet payloads at debug. Only lower it if you're debugging matter.js."
|
|
182491
182531
|
}).option("disable-log-colors", {
|
|
182492
182532
|
type: "boolean",
|
|
182493
182533
|
default: false
|