@matter-server/dashboard 1.5.3 → 1.5.5

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.
@@ -18602,7 +18602,7 @@ const clusters = {
18602
18602
  },
18603
18603
  "291503119": {
18604
18604
  "id": 291503119,
18605
- "label": "AqaraLedStripT2Cluster",
18605
+ "label": "AqaraLedStripCluster",
18606
18606
  "attributes": {
18607
18607
  "19": {
18608
18608
  "id": 19,
@@ -1,4 +1,4 @@
1
- import { i, n, r, e, b as i$1, u as requireAttributeWriteSuccess, A, v as formatHex, d as b, h as handleAsync, g as t } from './matter-dashboard-app-BdO9wWRC.js';
1
+ import { i, n, r, e, b as i$1, u as requireAttributeWriteSuccess, A, v as formatHex, d as b, h as handleAsync, g as t } from './matter-dashboard-app-DZ4JhRBd.js';
2
2
  import { t as toBigIntAwareJson } from './main.js';
3
3
  import { p as preventDefault } from './prevent_default-D-ohDGsN.js';
4
4
  import { p as parseJsonPayload } from './parse-json-payload-DU9TWKdu.js';
@@ -1,4 +1,4 @@
1
- import { i, n, r, e, b as i$1, A, v as formatHex, d as b, h as handleAsync, g as t } from './matter-dashboard-app-BdO9wWRC.js';
1
+ import { i, n, r, e, b as i$1, A, v as formatHex, d as b, h as handleAsync, g as t } from './matter-dashboard-app-DZ4JhRBd.js';
2
2
  import { t as toBigIntAwareJson } from './main.js';
3
3
  import { p as preventDefault } from './prevent_default-D-ohDGsN.js';
4
4
  import { p as parseJsonPayload, i as isPlainObject } from './parse-json-payload-DU9TWKdu.js';
@@ -1,4 +1,4 @@
1
- import { r, c, a as clientContext, t as tickContext, g as t, b as i, d as b } from './matter-dashboard-app-BdO9wWRC.js';
1
+ import { r, c, a as clientContext, t as tickContext, g as t, b as i, d as b } from './matter-dashboard-app-DZ4JhRBd.js';
2
2
  import { p as preventDefault } from './prevent_default-D-ohDGsN.js';
3
3
  import './main.js';
4
4
 
@@ -52,18 +52,18 @@ let ComissionNodeDialog = class extends i {
52
52
  if (!this.client.serverInfo.bluetooth_enabled) {
53
53
  return;
54
54
  }
55
- import('./commission-node-wifi-8im5zNEv.js');
55
+ import('./commission-node-wifi-Da5VTbZq.js');
56
56
  this._mode = "wifi";
57
57
  }
58
58
  _commissionThread() {
59
59
  if (!this.client.serverInfo.bluetooth_enabled) {
60
60
  return;
61
61
  }
62
- import('./commission-node-thread-CnixX2gX.js');
62
+ import('./commission-node-thread-Djja_wa4.js');
63
63
  this._mode = "thread";
64
64
  }
65
65
  _commissionExisting() {
66
- import('./commission-node-existing-Dth2CY1e.js');
66
+ import('./commission-node-existing-DvFFq178.js');
67
67
  this._mode = "existing";
68
68
  }
69
69
  _nodeCommissioned(ev) {
@@ -71,7 +71,7 @@ let ComissionNodeDialog = class extends i {
71
71
  this._close();
72
72
  }
73
73
  _requestSettings() {
74
- import('./matter-dashboard-app-BdO9wWRC.js').then(function (n) { return n.N; }).then(({
74
+ import('./matter-dashboard-app-DZ4JhRBd.js').then(function (n) { return n.N; }).then(({
75
75
  showSettingsDialog
76
76
  }) => {
77
77
  showSettingsDialog("network-credentials");
@@ -1,4 +1,4 @@
1
- import { r, c, a as clientContext, n, e, g as t, b as i, A, h as handleAsync, d as b, s as showAlertDialog } from './matter-dashboard-app-BdO9wWRC.js';
1
+ import { r, c, a as clientContext, n, e, g as t, b as i, A, h as handleAsync, d as b, s as showAlertDialog } from './matter-dashboard-app-DZ4JhRBd.js';
2
2
  import { f as fireEvent } from './fire_event-CJVsUQ4T.js';
3
3
  import './main.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { i, c, a as clientContext, n, r, e, b as i$1, A, h as handleAsync, d as b, q as mdiAccessPoint, s as showAlertDialog, g as t } from './matter-dashboard-app-BdO9wWRC.js';
1
+ import { i, c, a as clientContext, n, r, e, b as i$1, A, h as handleAsync, d as b, q as mdiAccessPoint, s as showAlertDialog, g as t } from './matter-dashboard-app-DZ4JhRBd.js';
2
2
  import { f as fireEvent } from './fire_event-CJVsUQ4T.js';
3
3
  import './main.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { i, c, a as clientContext, n, r, e, b as i$1, A, h as handleAsync, d as b, m as mdiWifi, s as showAlertDialog, g as t } from './matter-dashboard-app-BdO9wWRC.js';
1
+ import { i, c, a as clientContext, n, r, e, b as i$1, A, h as handleAsync, d as b, m as mdiWifi, s as showAlertDialog, g as t } from './matter-dashboard-app-DZ4JhRBd.js';
2
2
  import { f as fireEvent } from './fire_event-CJVsUQ4T.js';
3
3
  import './main.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { i, n, b as i$1, d as b, g as t } from './matter-dashboard-app-BdO9wWRC.js';
1
+ import { i, n, b as i$1, d as b, g as t } from './matter-dashboard-app-DZ4JhRBd.js';
2
2
  import { p as preventDefault } from './prevent_default-D-ohDGsN.js';
3
3
  import './main.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { r, n, g as t, b as i, d as b, s as showAlertDialog } from './matter-dashboard-app-BdO9wWRC.js';
1
+ import { r, n, g as t, b as i, d as b, s as showAlertDialog } from './matter-dashboard-app-DZ4JhRBd.js';
2
2
  import { p as preventDefault } from './prevent_default-D-ohDGsN.js';
3
3
  import './main.js';
4
4
 
@@ -101,6 +101,21 @@ function parseBigIntAwareJson(json) {
101
101
  });
102
102
  }
103
103
 
104
+ /**
105
+ * @license
106
+ * Copyright 2025-2026 Open Home Foundation
107
+ * SPDX-License-Identifier: Apache-2.0
108
+ */
109
+ function toConsole(write) {
110
+ return (message, detail) => detail === void 0 ? write(message) : write(message, detail());
111
+ }
112
+ const consoleLogger = {
113
+ debug: toConsole((...values) => console.debug(...values)),
114
+ info: toConsole((...values) => console.info(...values)),
115
+ warn: toConsole((...values) => console.warn(...values)),
116
+ error: toConsole((...values) => console.error(...values))
117
+ };
118
+
104
119
  /**
105
120
  * @license
106
121
  * Copyright 2025-2026 Open Home Foundation
@@ -201,16 +216,23 @@ class Connection {
201
216
  /**
202
217
  * Create a new connection.
203
218
  * @param ws_server_url WebSocket server URL
204
- * @param wsFactory Optional factory function to create WebSocket instances.
205
- * If not provided, uses the global WebSocket constructor.
219
+ * @param options The {@link ConnectionOptions}, or only a {@link WebSocketFactory}.
206
220
  */
207
- constructor(ws_server_url, wsFactory) {
221
+ constructor(ws_server_url, options) {
208
222
  this.ws_server_url = ws_server_url;
223
+ const {
224
+ wsFactory,
225
+ logger = consoleLogger
226
+ } = typeof options === "function" ? {
227
+ wsFactory: options
228
+ } : options ?? {};
209
229
  this.ws_server_url = ws_server_url;
210
230
  this.wsFactory = wsFactory ?? (url => new WebSocket(url));
231
+ this.logger = logger;
211
232
  }
212
233
  ws_server_url;
213
234
  serverInfo = void 0;
235
+ logger;
214
236
  socket;
215
237
  wsFactory;
216
238
  get connected() {
@@ -220,26 +242,26 @@ class Connection {
220
242
  if (this.socket) {
221
243
  throw new Error("Already connected");
222
244
  }
223
- console.debug("Trying to connect");
245
+ this.logger.debug("Trying to connect");
224
246
  return new Promise((resolve, reject) => {
225
247
  this.socket = this.wsFactory(this.ws_server_url);
226
248
  this.socket.onopen = () => {
227
- console.log("WebSocket Connected");
249
+ this.logger.info("WebSocket Connected");
228
250
  };
229
251
  this.socket.onclose = () => {
230
- console.log("WebSocket Closed");
252
+ this.logger.info("WebSocket Closed");
231
253
  this.socket = void 0;
232
254
  this.serverInfo = void 0;
233
255
  onConnectionLost();
234
256
  };
235
257
  this.socket.onerror = error => {
236
- console.error("WebSocket Error: ", error);
258
+ this.logger.error("WebSocket Error:", () => error);
237
259
  reject(new Error("WebSocket Error"));
238
260
  };
239
261
  this.socket.onmessage = event => {
240
262
  const dataStr = typeof event.data === "string" ? event.data : String(event.data);
241
263
  const data = parseBigIntAwareJson(dataStr);
242
- console.debug("WebSocket OnMessage", redactIncomingMessage(data));
264
+ this.logger.debug("WebSocket OnMessage", () => redactIncomingMessage(data));
243
265
  if (!this.serverInfo) {
244
266
  this.serverInfo = data;
245
267
  resolve();
@@ -260,7 +282,7 @@ class Connection {
260
282
  if (!this.socket) {
261
283
  throw new Error("Not connected");
262
284
  }
263
- console.debug("WebSocket send message", redactSensitiveCommandFields(message));
285
+ this.logger.debug("WebSocket send message", () => redactSensitiveCommandFields(message));
264
286
  this.socket.send(toBigIntAwareJson(message));
265
287
  }
266
288
  }
@@ -519,14 +541,14 @@ class MatterClient {
519
541
  /**
520
542
  * Create a new MatterClient.
521
543
  * @param url WebSocket URL to connect to
522
- * @param wsFactory Optional factory function to create WebSocket instances.
523
- * For Node.js, pass: (url) => new WebSocket(url) from the 'ws' package.
524
- * For browser, leave undefined to use native WebSocket.
544
+ * @param options The {@link ConnectionOptions}, or only a {@link WebSocketFactory}.
545
+ * For Node.js, pass a factory: (url) => new WebSocket(url) from the 'ws' package.
546
+ * For browser, leave the factory undefined to use native WebSocket.
525
547
  */
526
- constructor(url, wsFactory) {
548
+ constructor(url, options) {
527
549
  this.url = url;
528
550
  this.url = url;
529
- this.connection = new Connection(this.url, wsFactory);
551
+ this.connection = new Connection(this.url, options);
530
552
  this.serverBaseAddress = this.url.split("://")[1].split(":")[0] ?? "";
531
553
  }
532
554
  url;
@@ -787,7 +809,7 @@ class MatterClient {
787
809
  subscription_id
788
810
  }) => {
789
811
  if (timedOut) {
790
- this.unsubscribe(args.node_id, subscription_id).catch(error => console.warn(`Could not end subscription ${subscription_id} after its subscribe timed out`, error));
812
+ this.unsubscribe(args.node_id, subscription_id).catch(error => this.connection.logger.warn(`Could not end subscription ${subscription_id} after its subscribe timed out`, () => error));
791
813
  return;
792
814
  }
793
815
  this.subscriptionListeners.set(subscriptionKey(args.node_id, subscription_id), listener);
@@ -1081,7 +1103,7 @@ class MatterClient {
1081
1103
  try {
1082
1104
  listener.ended?.();
1083
1105
  } catch (error) {
1084
- console.error("Subscription listener failed on end", error);
1106
+ this.connection.logger.error("Subscription listener failed on end", () => error);
1085
1107
  }
1086
1108
  }
1087
1109
  }
@@ -1145,10 +1167,9 @@ class MatterClient {
1145
1167
  this._resolvePendingCommand(msg.message_id, msg.result);
1146
1168
  return;
1147
1169
  }
1148
- console.warn("Received message with unknown format", redactIncomingMessage(msg));
1170
+ this.connection.logger.warn("Received message with unknown format", () => redactIncomingMessage(msg));
1149
1171
  }
1150
1172
  _handleEventMessage(event) {
1151
- console.debug("Incoming event", redactIncomingMessage(event));
1152
1173
  this.onRawEvent(event);
1153
1174
  if (event.event === "node_added") {
1154
1175
  const node = new MatterNode(event.data);
@@ -1347,7 +1368,7 @@ const ThemeService = new ThemeServiceImpl();
1347
1368
  * SPDX-License-Identifier: Apache-2.0
1348
1369
  */
1349
1370
  async function main() {
1350
- import('./matter-dashboard-app-BdO9wWRC.js').then(function (n) { return n.O; });
1371
+ import('./matter-dashboard-app-DZ4JhRBd.js').then(function (n) { return n.O; });
1351
1372
  let url = "";
1352
1373
  const isProductionServer = window.__MATTERJS_PRODUCTION_MODE__ === true || location.origin.includes(":5580") || location.href.includes("hassio_ingress") || location.href.includes("/api/ingress/");
1353
1374
  if (!isProductionServer) {
@@ -4873,7 +4873,7 @@ MdListItem = __decorate([t$1('md-list-item')], MdListItem);
4873
4873
  * SPDX-License-Identifier: Apache-2.0
4874
4874
  */
4875
4875
  const showSettingsDialog = async section => {
4876
- await import('./settings-dialog-gcsO83Jl.js');
4876
+ await import('./settings-dialog-CoelUHvS.js');
4877
4877
  const dialog = document.createElement("settings-dialog");
4878
4878
  if (section) dialog.scrollToSection = section;
4879
4879
  document.querySelector("matter-dashboard-app")?.renderRoot.appendChild(dialog);
@@ -23950,7 +23950,7 @@ const clusters = {
23950
23950
  },
23951
23951
  "291503119": {
23952
23952
  "id": 291503119,
23953
- "label": "AqaraLedStripT2Cluster",
23953
+ "label": "AqaraLedStripCluster",
23954
23954
  "attributes": {
23955
23955
  "19": {
23956
23956
  "id": 19,
@@ -26670,7 +26670,7 @@ const semantic_tag_namespaces = {
26670
26670
  * SPDX-License-Identifier: Apache-2.0
26671
26671
  */
26672
26672
  const showDialogBox = async (type, dialogParams) => {
26673
- await import('./dialog-box-Daj8_--D.js');
26673
+ await import('./dialog-box-BfzF7HC6.js');
26674
26674
  return new Promise(resolve => {
26675
26675
  const dialog = document.createElement("dialog-box");
26676
26676
  dialog.params = dialogParams;
@@ -26688,7 +26688,7 @@ const showPromptDialog = dialogParams => showDialogBox("prompt", dialogParams);
26688
26688
  * SPDX-License-Identifier: Apache-2.0
26689
26689
  */
26690
26690
  const showAttributeWriteDialog = async options => {
26691
- await import('./attribute-write-dialog-C-KBqyuJ.js');
26691
+ await import('./attribute-write-dialog-CUqs3YJ7.js');
26692
26692
  const dialog = document.createElement("attribute-write-dialog");
26693
26693
  dialog.client = options.client;
26694
26694
  dialog.nodeId = options.nodeId;
@@ -26706,7 +26706,7 @@ const showAttributeWriteDialog = async options => {
26706
26706
  * SPDX-License-Identifier: Apache-2.0
26707
26707
  */
26708
26708
  const showCommandInvokeDialog = async options => {
26709
- await import('./command-invoke-dialog-C4HMf49Q.js');
26709
+ await import('./command-invoke-dialog-DkwV9ewo.js');
26710
26710
  const dialog = document.createElement("command-invoke-dialog");
26711
26711
  dialog.client = options.client;
26712
26712
  dialog.nodeId = options.nodeId;
@@ -27180,7 +27180,7 @@ MdTextButton = __decorate([t$1('md-text-button')], MdTextButton);
27180
27180
  * SPDX-License-Identifier: Apache-2.0
27181
27181
  */
27182
27182
  const showNodeLabelDialog = async (client, node) => {
27183
- await import('./node-label-dialog-IVEQrmsg.js');
27183
+ await import('./node-label-dialog-B4G5yyR1.js');
27184
27184
  const dialog = document.createElement("node-label-dialog");
27185
27185
  dialog.client = client;
27186
27186
  dialog.node = node;
@@ -36418,7 +36418,7 @@ async function downgradeToOperate(client, nodeId, keys) {
36418
36418
  * SPDX-License-Identifier: Apache-2.0
36419
36419
  */
36420
36420
  const showNodeAclAddDialog = async node => {
36421
- await import('./node-acl-add-dialog-OeLLubXq.js');
36421
+ await import('./node-acl-add-dialog-C6QXsCRL.js');
36422
36422
  const dialog = document.createElement("node-acl-add-dialog");
36423
36423
  dialog.node = node;
36424
36424
  document.querySelector("matter-dashboard-app")?.renderRoot.appendChild(dialog);
@@ -38753,7 +38753,7 @@ async function deleteBinding(client, sourceNode, sourceEndpoint, target) {
38753
38753
  * SPDX-License-Identifier: Apache-2.0
38754
38754
  */
38755
38755
  const showNodeBindingDialog = async (node, endpoint) => {
38756
- await import('./node-binding-dialog-DQ9R0KrP.js');
38756
+ await import('./node-binding-dialog-DPojChrx.js');
38757
38757
  const dialog = document.createElement("node-binding-dialog");
38758
38758
  dialog.node = node;
38759
38759
  dialog.endpoint = endpoint;
@@ -64599,7 +64599,7 @@ MatterNodeView = __decorateClass$3([t$1("matter-node-view")], MatterNodeView);
64599
64599
  * SPDX-License-Identifier: Apache-2.0
64600
64600
  */
64601
64601
  const showCommissionNodeDialog = async () => {
64602
- await import('./commission-node-dialog-Driu7kGn.js');
64602
+ await import('./commission-node-dialog-DFCd2bt_.js');
64603
64603
  const dialog = document.createElement("commission-node-dialog");
64604
64604
  document.querySelector("matter-dashboard-app")?.renderRoot.appendChild(dialog);
64605
64605
  };
@@ -64610,7 +64610,7 @@ const showCommissionNodeDialog = async () => {
64610
64610
  * SPDX-License-Identifier: Apache-2.0
64611
64611
  */
64612
64612
  const showFabricLabelDialog = async (client, currentLabel, onSaved) => {
64613
- await import('./fabric-label-dialog-Bk6lPNvk.js');
64613
+ await import('./fabric-label-dialog-sJL3m9c1.js');
64614
64614
  const dialog = document.createElement("fabric-label-dialog");
64615
64615
  dialog.client = client;
64616
64616
  dialog.currentLabel = currentLabel;
@@ -1,4 +1,4 @@
1
- import { i, c, a as clientContext, n, r, b as i$1, P as Privilege, x as nodeIdKey, y as aclCapacity, s as showAlertDialog, z as targetServerClusters, B as clusters, C as AuthMode, E as addAclEntry, F as PRIVILEGE_NAMES, d as b, G as mdiClose, H as getDeviceName, h as handleAsync, g as t } from './matter-dashboard-app-BdO9wWRC.js';
1
+ import { i, c, a as clientContext, n, r, b as i$1, P as Privilege, x as nodeIdKey, y as aclCapacity, s as showAlertDialog, z as targetServerClusters, B as clusters, C as AuthMode, E as addAclEntry, F as PRIVILEGE_NAMES, d as b, G as mdiClose, H as getDeviceName, h as handleAsync, g as t } from './matter-dashboard-app-DZ4JhRBd.js';
2
2
  import { p as preventDefault } from './prevent_default-D-ohDGsN.js';
3
3
  import './main.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { i, c, a as clientContext, n, r, b as i$1, x as nodeIdKey, B as clusters, s as showAlertDialog, I as targetAclCapacityForBinding, J as addBinding, K as bindableClusters, A, d as b, H as getDeviceName, L as getEndpointDeviceTypes, h as handleAsync, g as t } from './matter-dashboard-app-BdO9wWRC.js';
1
+ import { i, c, a as clientContext, n, r, b as i$1, x as nodeIdKey, B as clusters, s as showAlertDialog, I as targetAclCapacityForBinding, J as addBinding, K as bindableClusters, A, d as b, H as getDeviceName, L as getEndpointDeviceTypes, h as handleAsync, g as t } from './matter-dashboard-app-DZ4JhRBd.js';
2
2
  import { p as preventDefault } from './prevent_default-D-ohDGsN.js';
3
3
  import './main.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { r, n, g as t, b as i, M as MAX_NODE_LABEL_LENGTH, d as b, w as writeNodeLabel, s as showAlertDialog } from './matter-dashboard-app-BdO9wWRC.js';
1
+ import { r, n, g as t, b as i, M as MAX_NODE_LABEL_LENGTH, d as b, w as writeNodeLabel, s as showAlertDialog } from './matter-dashboard-app-DZ4JhRBd.js';
2
2
  import { p as preventDefault } from './prevent_default-D-ohDGsN.js';
3
3
  import './main.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { i, c, a as clientContext, t as tickContext, r, e, b as i$1, f as fireAndForget, s as showAlertDialog, d as b, A, h as handleAsync, g as t, n, D as DevModeService, m as mdiWifi, j as mdiPlus, k as mdiPencil, l as mdiDelete, o as mdiEyeOff, p as mdiEye, q as mdiAccessPoint } from './matter-dashboard-app-BdO9wWRC.js';
1
+ import { i, c, a as clientContext, t as tickContext, r, e, b as i$1, f as fireAndForget, s as showAlertDialog, d as b, A, h as handleAsync, g as t, n, D as DevModeService, m as mdiWifi, j as mdiPlus, k as mdiPencil, l as mdiDelete, o as mdiEyeOff, p as mdiEye, q as mdiAccessPoint } from './matter-dashboard-app-DZ4JhRBd.js';
2
2
  import { p as preventDefault } from './prevent_default-D-ohDGsN.js';
3
3
  import './main.js';
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matter-server/dashboard",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
4
4
  "description": "Dashboard for OHF Matter Server",
5
5
  "homepage": "https://github.com/matter-js/matterjs-server",
6
6
  "bugs": {
@@ -34,8 +34,8 @@
34
34
  "dependencies": {
35
35
  "@lit/context": "^1.1.6",
36
36
  "@material/web": "^2.5.0",
37
- "@matter-server/custom-clusters": "1.5.3",
38
- "@matter-server/ws-client": "1.5.3",
37
+ "@matter-server/custom-clusters": "1.5.5",
38
+ "@matter-server/ws-client": "1.5.5",
39
39
  "@mdi/js": "^7.4.47",
40
40
  "lit": "^3.3.3",
41
41
  "qrcode-generator": "^2.0.4",
@@ -18653,7 +18653,7 @@ export const clusters: Record<number, ClusterDescription> = {
18653
18653
  },
18654
18654
  "291503119": {
18655
18655
  "id": 291503119,
18656
- "label": "AqaraLedStripT2Cluster",
18656
+ "label": "AqaraLedStripCluster",
18657
18657
  "attributes": {
18658
18658
  "19": {
18659
18659
  "id": 19,