matterbridge 3.4.6-dev-20251229-8c7522d → 3.4.6-dev-20251231-042eed6

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.
@@ -92,6 +92,7 @@ Examples:
92
92
  { name: '_matterc._udp.local', type: 12, class: 1, unicastResponse: true },
93
93
  { name: '_matter._tcp.local', type: 12, class: 1, unicastResponse: true },
94
94
  { name: '_matterbridge._tcp.local', type: 12, class: 1, unicastResponse: true },
95
+ { name: '_home-assistant._tcp.local', type: 12, class: 1, unicastResponse: true },
95
96
  { name: '_shelly._tcp.local', type: 12, class: 1, unicastResponse: true },
96
97
  { name: '_mqtt._tcp.local', type: 12, class: 1, unicastResponse: true },
97
98
  { name: '_http._tcp.local', type: 12, class: 1, unicastResponse: true },
@@ -65,7 +65,7 @@ export class MdnsReflectorServer {
65
65
  return undefined;
66
66
  };
67
67
  const selectedInterfaceName = pickInterface();
68
- this.log.info(`**UpgradeAddress selected interface for address upgrade: ${selectedInterfaceName || 'N/A'}`);
68
+ this.log.debug(`UpgradeAddress selected interface for address upgrade: ${selectedInterfaceName || 'N/A'}`);
69
69
  const selectedInfos = selectedInterfaceName ? (interfaces[selectedInterfaceName] ?? []) : [];
70
70
  const hostIpv4 = selectedInfos.find((info) => info && !info.internal && info.family === 'IPv4')?.address;
71
71
  const hostIpv6List = (() => {
@@ -79,8 +79,8 @@ export class MdnsReflectorServer {
79
79
  }
80
80
  return [...set];
81
81
  })();
82
- this.log.info(`**UpgradeAddress Host IPv4 for address upgrade: ${hostIpv4 || 'N/A'}`);
83
- this.log.info(`**UpgradeAddress Host IPv6 for address upgrade: ${hostIpv6List.length > 0 ? hostIpv6List.join(', ') : 'N/A'}`);
82
+ this.log.debug(`UpgradeAddress Host IPv4 for address upgrade: ${hostIpv4 || 'N/A'}`);
83
+ this.log.debug(`UpgradeAddress Host IPv6 for address upgrade: ${hostIpv6List.length > 0 ? hostIpv6List.join(', ') : 'N/A'}`);
84
84
  if (!hostIpv4 && hostIpv6List.length === 0)
85
85
  return msg;
86
86
  const upgradedMsg = Buffer.from(msg);
@@ -132,10 +132,10 @@ export class MdnsReflectorServer {
132
132
  upgradeResourceRecords(arCount);
133
133
  }
134
134
  catch (error) {
135
- this.log.error(`**UpgradeAddress failed to parse message: ${error.message}`);
135
+ this.log.error(`UpgradeAddress failed to parse message: ${error.message}`);
136
136
  return msg;
137
137
  }
138
- this.log.info(`**UpgradeAddress message completed. Interface: ${selectedInterfaceName}, Host IPv4: ${hostIpv4 || 'N/A'}, Host IPv6: ${hostIpv6List.length > 0 ? hostIpv6List.join(', ') : 'N/A'}`);
138
+ this.log.debug(`UpgradeAddress message completed. Interface: ${selectedInterfaceName}, Host IPv4: ${hostIpv4 || 'N/A'}, Host IPv6: ${hostIpv6List.length > 0 ? hostIpv6List.join(', ') : 'N/A'}`);
139
139
  if (hasParameter('log-reflector-messages')) {
140
140
  try {
141
141
  let decodedMessage = this.mdnsIpv4.decodeMdnsMessage(msg);
@@ -144,7 +144,7 @@ export class MdnsReflectorServer {
144
144
  this.mdnsIpv4.logMdnsMessage(decodedMessage, this.log, '**Upgraded mDNS message');
145
145
  }
146
146
  catch (error) {
147
- this.log.error(`**UpgradeAddress failed to decode message: ${error.message}`);
147
+ this.log.error(`UpgradeAddress failed to decode message: ${error.message}`);
148
148
  }
149
149
  }
150
150
  return upgradedMsg;
@@ -205,29 +205,30 @@ export class MdnsReflectorServer {
205
205
  this.log.info(`Received message from reflector client on ipv4 ${BLUE}${rinfo.address}${nf}:${BLUE}${rinfo.port}${nf}: ${msg.toString()}`);
206
206
  return;
207
207
  }
208
- this.log.notice(`Reflecting message from reflector client on ipv4 ${BLUE}${rinfo.address}${nt}:${BLUE}${rinfo.port}${nt} to mDNS ipv4 multicast`);
208
+ const type = isMdnsQuery(msg) ? 'query' : 'response';
209
+ this.log.notice(`Reflecting ${type} message from reflector client on ipv4 ${BLUE}${rinfo.address}${nt}:${BLUE}${rinfo.port}${nt} to mDNS ipv4 multicast`);
209
210
  const upgradedMsg = isMdnsResponse(msg) ? this.upgradeAddress(msg) : msg;
210
211
  this.mdnsIpv4.send(upgradedMsg, MDNS_MULTICAST_IPV4_ADDRESS, MDNS_MULTICAST_PORT);
211
212
  if (hasParameter('broadcast')) {
212
213
  const broadcastAddress = this.getBroadcastAddress(this.mdnsIpv4);
213
214
  if (broadcastAddress) {
214
- this.log.notice(`Reflecting message from reflector client on ipv4 ${BLUE}${rinfo.address}${nt}:${BLUE}${rinfo.port}${nt} to ipv4 broadcast address ${BLUE}${broadcastAddress}${nt}:${BLUE}${MDNS_MULTICAST_PORT}${nt}`);
215
+ this.log.notice(`Reflecting ${type} message from reflector client on ipv4 ${BLUE}${rinfo.address}${nt}:${BLUE}${rinfo.port}${nt} to ipv4 broadcast address ${BLUE}${broadcastAddress}${nt}:${BLUE}${MDNS_MULTICAST_PORT}${nt}`);
215
216
  this.mdnsIpv4.send(upgradedMsg, broadcastAddress, MDNS_MULTICAST_PORT);
216
217
  }
217
218
  }
218
219
  if (hasParameter('localhost')) {
219
- this.log.notice(`Reflecting message from reflector client on ipv4 ${BLUE}${rinfo.address}${nt}:${BLUE}${rinfo.port}${nt} to ipv4 localhost address ${BLUE}localhost${nt}:${BLUE}${MDNS_MULTICAST_PORT}${nt}`);
220
+ this.log.notice(`Reflecting ${type} message from reflector client on ipv4 ${BLUE}${rinfo.address}${nt}:${BLUE}${rinfo.port}${nt} to ipv4 localhost address ${BLUE}localhost${nt}:${BLUE}${MDNS_MULTICAST_PORT}${nt}`);
220
221
  this.mdnsIpv4.send(upgradedMsg, 'localhost', MDNS_MULTICAST_PORT);
221
222
  }
222
- if (hasParameter('share-with-clients')) {
223
- this.log.notice(`Sharing message from reflector client on ipv4 ${BLUE}${rinfo.address}${nt}:${BLUE}${rinfo.port}${nt} with other ipv4 reflector clients`);
223
+ if (hasParameter('share-with-clients') && this.ipv4Clients.size > 1) {
224
+ this.log.notice(`Sharing ${type} message from reflector client on ipv4 ${BLUE}${rinfo.address}${nt}:${BLUE}${rinfo.port}${nt} with other ${this.ipv4Clients.size - 1} ipv4 reflector clients`);
224
225
  for (const client of this.ipv4Clients.values()) {
225
226
  if (client.address === rinfo.address && client.port === rinfo.port)
226
227
  continue;
227
228
  this.unicastIpv4.send(upgradedMsg, client.address, client.port);
228
229
  }
229
230
  }
230
- this.unicastIpv4.send(Buffer.from('mDNS ipv4 reflector server reflected your message'), rinfo.address, rinfo.port);
231
+ this.unicastIpv4.send(Buffer.from(`mDNS ipv4 reflector server reflected your ${type} message`), rinfo.address, rinfo.port);
231
232
  });
232
233
  this.unicastIpv6.on('message', (msg, rinfo) => {
233
234
  this.ipv6Clients.set(`${rinfo.address}:${rinfo.port}`, rinfo);
@@ -235,29 +236,30 @@ export class MdnsReflectorServer {
235
236
  this.log.info(`Received message from reflector client on ipv6 ${BLUE}${rinfo.address}${nf}:${BLUE}${rinfo.port}${nf}: ${msg.toString()}`);
236
237
  return;
237
238
  }
238
- this.log.notice(`Reflecting message from reflector client on ipv6 ${BLUE}${rinfo.address}${nt}:${BLUE}${rinfo.port}${nt} to mDNS ipv6 multicast`);
239
+ const type = isMdnsQuery(msg) ? 'query' : 'response';
240
+ this.log.notice(`Reflecting ${type} message from reflector client on ipv6 ${BLUE}${rinfo.address}${nt}:${BLUE}${rinfo.port}${nt} to mDNS ipv6 multicast`);
239
241
  const upgradedMsg = isMdnsResponse(msg) ? this.upgradeAddress(msg) : msg;
240
242
  this.mdnsIpv6.send(upgradedMsg, MDNS_MULTICAST_IPV6_ADDRESS, MDNS_MULTICAST_PORT);
241
243
  if (hasParameter('broadcast')) {
242
244
  const broadcastAddress = this.getBroadcastAddress(this.mdnsIpv6);
243
245
  if (broadcastAddress) {
244
- this.log.notice(`Reflecting message from reflector client on ipv6 ${BLUE}${rinfo.address}${nt}:${BLUE}${rinfo.port}${nt} to ipv6 broadcast address ${BLUE}${broadcastAddress}${nt}:${BLUE}${MDNS_MULTICAST_PORT}${nt}`);
246
+ this.log.notice(`Reflecting ${type} message from reflector client on ipv6 ${BLUE}${rinfo.address}${nt}:${BLUE}${rinfo.port}${nt} to ipv6 broadcast address ${BLUE}${broadcastAddress}${nt}:${BLUE}${MDNS_MULTICAST_PORT}${nt}`);
245
247
  this.mdnsIpv6.send(upgradedMsg, broadcastAddress, MDNS_MULTICAST_PORT);
246
248
  }
247
249
  }
248
250
  if (hasParameter('localhost')) {
249
- this.log.notice(`Reflecting message from reflector client on ipv6 ${BLUE}${rinfo.address}${nt}:${BLUE}${rinfo.port}${nt} to ipv6 localhost address ${BLUE}localhost${nt}:${BLUE}${MDNS_MULTICAST_PORT}${nt}`);
251
+ this.log.notice(`Reflecting ${type} message from reflector client on ipv6 ${BLUE}${rinfo.address}${nt}:${BLUE}${rinfo.port}${nt} to ipv6 localhost address ${BLUE}localhost${nt}:${BLUE}${MDNS_MULTICAST_PORT}${nt}`);
250
252
  this.mdnsIpv6.send(upgradedMsg, 'localhost', MDNS_MULTICAST_PORT);
251
253
  }
252
- if (hasParameter('share-with-clients')) {
253
- this.log.notice(`Sharing message from reflector client on ipv6 ${BLUE}${rinfo.address}${nt}:${BLUE}${rinfo.port}${nt} with other ipv6 reflector clients`);
254
+ if (hasParameter('share-with-clients') && this.ipv6Clients.size > 1) {
255
+ this.log.notice(`Sharing ${type} message from reflector client on ipv6 ${BLUE}${rinfo.address}${nt}:${BLUE}${rinfo.port}${nt} with other ${this.ipv6Clients.size - 1} ipv6 reflector clients`);
254
256
  for (const client of this.ipv6Clients.values()) {
255
257
  if (client.address === rinfo.address && client.port === rinfo.port)
256
258
  continue;
257
259
  this.unicastIpv6.send(upgradedMsg, client.address, client.port);
258
260
  }
259
261
  }
260
- this.unicastIpv6.send(Buffer.from('mDNS ipv6 reflector server reflected your message'), rinfo.address, rinfo.port);
262
+ this.unicastIpv6.send(Buffer.from(`mDNS ipv6 reflector server reflected your ${type} message`), rinfo.address, rinfo.port);
261
263
  });
262
264
  this.log.notice('mDNS Reflector Server started.');
263
265
  }
package/dist/frontend.js CHANGED
@@ -11,7 +11,7 @@ import { CommissioningOptions } from '@matter/types/commissioning';
11
11
  import { BridgedDeviceBasicInformation } from '@matter/types/clusters/bridged-device-basic-information';
12
12
  import { PowerSource } from '@matter/types/clusters/power-source';
13
13
  import { MATTER_LOGGER_FILE, MATTER_STORAGE_NAME, MATTERBRIDGE_DIAGNOSTIC_FILE, MATTERBRIDGE_HISTORY_FILE, MATTERBRIDGE_LOGGER_FILE, NODE_STORAGE_DIR, plg } from './matterbridgeTypes.js';
14
- import { isValidArray, isValidNumber, isValidObject, isValidString, isValidBoolean } from './utils/isvalid.js';
14
+ import { isValidArray, isValidNumber, isValidObject, isValidString, isValidBoolean } from './utils/isValid.js';
15
15
  import { createZip } from './utils/createZip.js';
16
16
  import { hasParameter } from './utils/commandLine.js';
17
17
  import { withTimeout, wait } from './utils/wait.js';
@@ -15,7 +15,7 @@ import { dev, MATTER_LOGGER_FILE, MATTER_STORAGE_NAME, plg, NODE_STORAGE_DIR, MA
15
15
  import { bridge } from './matterbridgeDeviceTypes.js';
16
16
  import { getIntParameter, getParameter, hasParameter } from './utils/commandLine.js';
17
17
  import { copyDirectory } from './utils/copyDirectory.js';
18
- import { isValidNumber, isValidString, parseVersionString } from './utils/isvalid.js';
18
+ import { isValidNumber, isValidString, parseVersionString } from './utils/isValid.js';
19
19
  import { wait, withTimeout } from './utils/wait.js';
20
20
  import { inspectError } from './utils/error.js';
21
21
  import { BroadcastServer } from './broadcastServer.js';
@@ -17,7 +17,7 @@ import { BasicInformationServer } from '@matter/node/behaviors/basic-information
17
17
  import { getParameter, getIntParameter, hasParameter } from './utils/commandLine.js';
18
18
  import { copyDirectory } from './utils/copyDirectory.js';
19
19
  import { createDirectory } from './utils/createDirectory.js';
20
- import { isValidString, parseVersionString, isValidNumber, isValidObject } from './utils/isvalid.js';
20
+ import { isValidString, parseVersionString, isValidNumber, isValidObject } from './utils/isValid.js';
21
21
  import { formatBytes, formatPercent, formatUptime } from './utils/format.js';
22
22
  import { dev, MATTER_LOGGER_FILE, MATTER_STORAGE_NAME, MATTERBRIDGE_LOGGER_FILE, NODE_STORAGE_DIR, plg, typ } from './matterbridgeTypes.js';
23
23
  import { PluginManager } from './pluginManager.js';
@@ -60,7 +60,7 @@ import { RadonConcentrationMeasurementServer } from '@matter/node/behaviors/rado
60
60
  import { TotalVolatileOrganicCompoundsConcentrationMeasurementServer } from '@matter/node/behaviors/total-volatile-organic-compounds-concentration-measurement';
61
61
  import { FanControlServer } from '@matter/node/behaviors/fan-control';
62
62
  import { ThermostatUserInterfaceConfigurationServer } from '@matter/node/behaviors/thermostat-user-interface-configuration';
63
- import { isValidNumber, isValidObject, isValidString } from './utils/isvalid.js';
63
+ import { isValidNumber, isValidObject, isValidString } from './utils/isValid.js';
64
64
  import { MatterbridgeServer, MatterbridgeIdentifyServer, MatterbridgeOnOffServer, MatterbridgeLevelControlServer, MatterbridgeColorControlServer, MatterbridgeLiftWindowCoveringServer, MatterbridgeLiftTiltWindowCoveringServer, MatterbridgeThermostatServer, MatterbridgeFanControlServer, MatterbridgeDoorLockServer, MatterbridgeModeSelectServer, MatterbridgeValveConfigurationAndControlServer, MatterbridgeSmokeCoAlarmServer, MatterbridgeBooleanStateConfigurationServer, MatterbridgeSwitchServer, MatterbridgeOperationalStateServer, MatterbridgeDeviceEnergyManagementModeServer, MatterbridgeDeviceEnergyManagementServer, MatterbridgeActivatedCarbonFilterMonitoringServer, MatterbridgeHepaFilterMonitoringServer, MatterbridgeEnhancedColorControlServer, MatterbridgePowerSourceServer, } from './matterbridgeBehaviors.js';
65
65
  import { addClusterServers, addFixedLabel, addOptionalClusterServers, addRequiredClusterServers, addUserLabel, createUniqueId, getBehavior, getBehaviourTypesFromClusterClientIds, getBehaviourTypesFromClusterServerIds, getDefaultOperationalStateClusterServer, getDefaultFlowMeasurementClusterServer, getDefaultIlluminanceMeasurementClusterServer, getDefaultPressureMeasurementClusterServer, getDefaultRelativeHumidityMeasurementClusterServer, getDefaultTemperatureMeasurementClusterServer, getDefaultOccupancySensingClusterServer, getDefaultElectricalEnergyMeasurementClusterServer, getDefaultElectricalPowerMeasurementClusterServer, getApparentElectricalPowerMeasurementClusterServer, lowercaseFirstLetter, updateAttribute, getClusterId, getAttributeId, setAttribute, getAttribute, checkNotLatinCharacters, generateUniqueId, subscribeAttribute, invokeBehaviorCommand, triggerEvent, featuresFor, getDefaultPowerSourceWiredClusterServer, getDefaultPowerSourceReplaceableBatteryClusterServer, getDefaultPowerSourceRechargeableBatteryClusterServer, getDefaultDeviceEnergyManagementClusterServer, getDefaultDeviceEnergyManagementModeClusterServer, getDefaultPowerSourceBatteryClusterServer, } from './matterbridgeEndpointHelpers.js';
66
66
  import { inspectError } from './utils/error.js';
@@ -80,7 +80,7 @@ import { RadonConcentrationMeasurementServer } from '@matter/node/behaviors/rado
80
80
  import { TotalVolatileOrganicCompoundsConcentrationMeasurementServer } from '@matter/node/behaviors/total-volatile-organic-compounds-concentration-measurement';
81
81
  import { deepCopy } from './utils/deepCopy.js';
82
82
  import { deepEqual } from './utils/deepEqual.js';
83
- import { isValidArray } from './utils/isvalid.js';
83
+ import { isValidArray } from './utils/isValid.js';
84
84
  import { MatterbridgeIdentifyServer, MatterbridgeOnOffServer, MatterbridgeLevelControlServer, MatterbridgeColorControlServer, MatterbridgeLiftWindowCoveringServer, MatterbridgeThermostatServer, MatterbridgeFanControlServer, MatterbridgeDoorLockServer, MatterbridgeModeSelectServer, MatterbridgeValveConfigurationAndControlServer, MatterbridgeSmokeCoAlarmServer, MatterbridgeBooleanStateConfigurationServer, MatterbridgeOperationalStateServer, MatterbridgePowerSourceServer, MatterbridgeDeviceEnergyManagementServer, MatterbridgeDeviceEnergyManagementModeServer, } from './matterbridgeBehaviors.js';
85
85
  export function capitalizeFirstLetter(name) {
86
86
  if (!name)
@@ -7,7 +7,7 @@ import { Descriptor } from '@matter/types/clusters/descriptor';
7
7
  import { BridgedDeviceBasicInformation } from '@matter/types/clusters/bridged-device-basic-information';
8
8
  import { checkNotLatinCharacters } from './matterbridgeEndpointHelpers.js';
9
9
  import { bridgedNode } from './matterbridgeDeviceTypes.js';
10
- import { isValidArray, isValidObject, isValidString } from './utils/isvalid.js';
10
+ import { isValidArray, isValidObject, isValidString } from './utils/isValid.js';
11
11
  import { hasParameter } from './utils/commandLine.js';
12
12
  import { BroadcastServer } from './broadcastServer.js';
13
13
  export class MatterbridgePlatform {
package/dist/update.js CHANGED
@@ -2,7 +2,7 @@ import { AnsiLogger, db, debugStringify, nt, wr } from 'node-ansi-logger';
2
2
  import { plg } from './matterbridgeTypes.js';
3
3
  import { BroadcastServer } from './broadcastServer.js';
4
4
  import { hasParameter } from './utils/commandLine.js';
5
- import { isValidString } from './utils/isvalid.js';
5
+ import { isValidString } from './utils/isValid.js';
6
6
  export async function checkUpdates(matterbridge) {
7
7
  const log = new AnsiLogger({ logName: 'MatterbridgeUpdates', logTimestampFormat: 4, logLevel: matterbridge.logLevel });
8
8
  const server = new BroadcastServer('updates', log);
@@ -1,4 +1,4 @@
1
- import { isValidNumber } from './isvalid.js';
1
+ import { isValidNumber } from './isValid.js';
2
2
  export function hasParameter(name) {
3
3
  const commandArguments = process.argv.slice(2);
4
4
  let markerIncluded = commandArguments.includes(`-${name}`);
@@ -1,6 +1,6 @@
1
1
  export * from './network.js';
2
2
  export * from './commandLine.js';
3
- export * from './isvalid.js';
3
+ export * from './isValid.js';
4
4
  export * from './colorUtils.js';
5
5
  export * from './deepCopy.js';
6
6
  export * from './deepEqual.js';
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge",
3
- "version": "3.4.6-dev-20251229-8c7522d",
3
+ "version": "3.4.6-dev-20251231-042eed6",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge",
9
- "version": "3.4.6-dev-20251229-8c7522d",
9
+ "version": "3.4.6-dev-20251231-042eed6",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@matter/main": "0.15.6",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge",
3
- "version": "3.4.6-dev-20251229-8c7522d",
3
+ "version": "3.4.6-dev-20251231-042eed6",
4
4
  "description": "Matterbridge plugin manager for Matter",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",
File without changes