@matter-server/dashboard 1.3.3 → 1.4.0-alpha.0-20260802-ac0d816
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/esm/client/models/descriptions.d.ts.map +1 -1
- package/dist/esm/client/models/descriptions.js +67 -62
- package/dist/esm/client/models/descriptions.js.map +1 -1
- package/dist/esm/components/avsum-ptz-strip.d.ts.map +1 -1
- package/dist/esm/components/avsum-ptz-strip.js +75 -75
- package/dist/esm/components/avsum-ptz-strip.js.map +1 -1
- package/dist/esm/components/dialog-box/dialog-box.d.ts.map +1 -1
- package/dist/esm/components/dialog-box/dialog-box.js +6 -4
- package/dist/esm/components/dialog-box/dialog-box.js.map +1 -1
- package/dist/esm/components/dialogs/acl/acl-actions.d.ts.map +1 -1
- package/dist/esm/components/dialogs/acl/acl-actions.js +11 -4
- package/dist/esm/components/dialogs/acl/acl-actions.js.map +1 -1
- package/dist/esm/components/dialogs/acl/node-acl-add-dialog.d.ts.map +1 -1
- package/dist/esm/components/dialogs/acl/node-acl-add-dialog.js +15 -15
- package/dist/esm/components/dialogs/acl/node-acl-add-dialog.js.map +1 -1
- package/dist/esm/components/dialogs/binding/binding-actions.d.ts +8 -3
- package/dist/esm/components/dialogs/binding/binding-actions.d.ts.map +1 -1
- package/dist/esm/components/dialogs/binding/binding-actions.js +45 -11
- package/dist/esm/components/dialogs/binding/binding-actions.js.map +1 -1
- package/dist/esm/components/dialogs/binding/node-binding-dialog.d.ts.map +1 -1
- package/dist/esm/components/dialogs/binding/node-binding-dialog.js +37 -37
- package/dist/esm/components/dialogs/binding/node-binding-dialog.js.map +1 -1
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-dialog.d.ts.map +1 -1
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-dialog.js +16 -16
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-dialog.js.map +1 -1
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-thread.d.ts.map +1 -1
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-thread.js +13 -13
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-thread.js.map +1 -1
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-wifi.d.ts.map +1 -1
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-wifi.js +13 -13
- package/dist/esm/components/dialogs/commission-node-dialog/commission-node-wifi.js.map +1 -1
- package/dist/esm/components/dialogs/dev/attribute-write-dialog.d.ts.map +1 -1
- package/dist/esm/components/dialogs/dev/attribute-write-dialog.js +5 -1
- package/dist/esm/components/dialogs/dev/attribute-write-dialog.js.map +1 -1
- package/dist/esm/components/dialogs/dev/command-invoke-dialog.d.ts.map +1 -1
- package/dist/esm/components/dialogs/dev/command-invoke-dialog.js +3 -3
- package/dist/esm/components/dialogs/dev/command-invoke-dialog.js.map +1 -1
- package/dist/esm/components/dialogs/settings/log-level-section.d.ts.map +1 -1
- package/dist/esm/components/dialogs/settings/log-level-section.js +14 -14
- package/dist/esm/components/dialogs/settings/log-level-section.js.map +1 -1
- package/dist/esm/components/dialogs/settings/settings-dialog.d.ts.map +1 -1
- package/dist/esm/components/dialogs/settings/settings-dialog.js +83 -81
- package/dist/esm/components/dialogs/settings/settings-dialog.js.map +1 -1
- package/dist/esm/components/webrtc-stream-view.d.ts.map +1 -1
- package/dist/esm/components/webrtc-stream-view.js +11 -11
- package/dist/esm/components/webrtc-stream-view.js.map +1 -1
- package/dist/esm/pages/camera-overlay.d.ts.map +1 -1
- package/dist/esm/pages/camera-overlay.js +90 -87
- package/dist/esm/pages/camera-overlay.js.map +1 -1
- package/dist/esm/pages/cluster-commands/clusters/access-control-commands.d.ts.map +1 -1
- package/dist/esm/pages/cluster-commands/clusters/access-control-commands.js +32 -28
- package/dist/esm/pages/cluster-commands/clusters/access-control-commands.js.map +1 -1
- package/dist/esm/pages/cluster-commands/clusters/avsum-commands.d.ts.map +1 -1
- package/dist/esm/pages/cluster-commands/clusters/avsum-commands.js +130 -129
- package/dist/esm/pages/cluster-commands/clusters/avsum-commands.js.map +1 -1
- package/dist/esm/pages/cluster-commands/clusters/basic-information-commands.d.ts.map +1 -1
- package/dist/esm/pages/cluster-commands/clusters/basic-information-commands.js.map +1 -1
- package/dist/esm/pages/cluster-commands/clusters/binding-commands.d.ts.map +1 -1
- package/dist/esm/pages/cluster-commands/clusters/binding-commands.js +32 -30
- package/dist/esm/pages/cluster-commands/clusters/binding-commands.js.map +1 -1
- package/dist/esm/pages/cluster-commands/clusters/chime-commands.d.ts +5 -0
- package/dist/esm/pages/cluster-commands/clusters/chime-commands.d.ts.map +1 -1
- package/dist/esm/pages/cluster-commands/clusters/chime-commands.js +45 -24
- package/dist/esm/pages/cluster-commands/clusters/chime-commands.js.map +1 -1
- package/dist/esm/pages/cluster-commands/clusters/closure-control-commands.d.ts.map +1 -1
- package/dist/esm/pages/cluster-commands/clusters/closure-control-commands.js +79 -79
- package/dist/esm/pages/cluster-commands/clusters/closure-control-commands.js.map +1 -1
- package/dist/esm/pages/cluster-commands/clusters/icd-management-commands.d.ts.map +1 -1
- package/dist/esm/pages/cluster-commands/clusters/icd-management-commands.js +27 -20
- package/dist/esm/pages/cluster-commands/clusters/icd-management-commands.js.map +1 -1
- package/dist/esm/pages/components/header.d.ts.map +1 -1
- package/dist/esm/pages/components/header.js +32 -32
- package/dist/esm/pages/components/header.js.map +1 -1
- package/dist/esm/pages/components/node-details.d.ts.map +1 -1
- package/dist/esm/pages/components/node-details.js +43 -42
- package/dist/esm/pages/components/node-details.js.map +1 -1
- package/dist/esm/pages/matter-cluster-view.d.ts +3 -0
- package/dist/esm/pages/matter-cluster-view.d.ts.map +1 -1
- package/dist/esm/pages/matter-cluster-view.js +105 -90
- package/dist/esm/pages/matter-cluster-view.js.map +1 -1
- package/dist/esm/pages/matter-endpoint-view.d.ts +3 -2
- package/dist/esm/pages/matter-endpoint-view.d.ts.map +1 -1
- package/dist/esm/pages/matter-endpoint-view.js +65 -20
- package/dist/esm/pages/matter-endpoint-view.js.map +1 -1
- package/dist/esm/pages/matter-network-view.d.ts.map +1 -1
- package/dist/esm/pages/matter-network-view.js +20 -20
- package/dist/esm/pages/matter-network-view.js.map +1 -1
- package/dist/esm/pages/matter-node-view.d.ts.map +1 -1
- package/dist/esm/pages/matter-node-view.js +9 -5
- package/dist/esm/pages/matter-node-view.js.map +1 -1
- package/dist/esm/pages/matter-server-view.d.ts.map +1 -1
- package/dist/esm/pages/matter-server-view.js +6 -6
- package/dist/esm/pages/matter-server-view.js.map +1 -1
- package/dist/esm/pages/network/device-panel.d.ts.map +1 -1
- package/dist/esm/pages/network/device-panel.js +10 -10
- package/dist/esm/pages/network/device-panel.js.map +1 -1
- package/dist/esm/pages/network/network-details.d.ts.map +1 -1
- package/dist/esm/pages/network/network-details.js +384 -382
- package/dist/esm/pages/network/network-details.js.map +1 -1
- package/dist/esm/pages/network/thread-graph.d.ts.map +1 -1
- package/dist/esm/pages/network/thread-graph.js.map +1 -1
- package/dist/esm/pages/network/update-connections-dialog.d.ts.map +1 -1
- package/dist/esm/pages/network/update-connections-dialog.js +30 -30
- package/dist/esm/pages/network/update-connections-dialog.js.map +1 -1
- package/dist/esm/util/binding.d.ts +18 -0
- package/dist/esm/util/binding.d.ts.map +1 -1
- package/dist/esm/util/binding.js +28 -6
- package/dist/esm/util/binding.js.map +1 -1
- package/dist/esm/util/chime.d.ts.map +1 -1
- package/dist/esm/util/chime.js +9 -2
- package/dist/esm/util/chime.js.map +1 -1
- package/dist/esm/util/icd.d.ts +6 -2
- package/dist/esm/util/icd.d.ts.map +1 -1
- package/dist/esm/util/icd.js +6 -6
- package/dist/esm/util/icd.js.map +1 -1
- package/dist/esm/util/matter-status.d.ts +11 -0
- package/dist/esm/util/matter-status.d.ts.map +1 -1
- package/dist/esm/util/matter-status.js +16 -0
- package/dist/esm/util/matter-status.js.map +1 -1
- package/dist/esm/util/node-label.d.ts +1 -1
- package/dist/esm/util/node-label.d.ts.map +1 -1
- package/dist/esm/util/node-label.js +6 -2
- package/dist/esm/util/node-label.js.map +1 -1
- package/dist/esm/util/shared-styles.d.ts +2 -0
- package/dist/esm/util/shared-styles.d.ts.map +1 -1
- package/dist/esm/util/shared-styles.js +38 -0
- package/dist/esm/util/shared-styles.js.map +1 -1
- package/dist/web/index.html +1 -0
- package/dist/web/js/{attribute-write-dialog-Dfm95ZtQ.js → attribute-write-dialog-lNuCZ3k9.js} +2 -2
- package/dist/web/js/{command-invoke-dialog-DrORSE5f.js → command-invoke-dialog-BsvOYKuy.js} +4 -4
- package/dist/web/js/{commission-node-dialog-Wjb4chGv.js → commission-node-dialog-BHdEFbdo.js} +21 -21
- package/dist/web/js/{commission-node-existing-Ykm-eejQ.js → commission-node-existing-DHnKVo6U.js} +1 -1
- package/dist/web/js/{commission-node-thread-DacHGwnB.js → commission-node-thread-Cj3toV8W.js} +14 -14
- package/dist/web/js/{commission-node-wifi-CEKp93HM.js → commission-node-wifi-BdAS2Vof.js} +14 -14
- package/dist/web/js/{dialog-box-DEKE_ZlH.js → dialog-box-DQV4kYxU.js} +7 -5
- package/dist/web/js/{fabric-label-dialog-CcMZOA7F.js → fabric-label-dialog-Be5bxfzQ.js} +1 -1
- package/dist/web/js/main.js +1 -1
- package/dist/web/js/{matter-dashboard-app-CEG7MSLx.js → matter-dashboard-app-B186DbKC.js} +1494 -1209
- package/dist/web/js/{node-acl-add-dialog-BDM3Rcou.js → node-acl-add-dialog-D4ZLnora.js} +16 -16
- package/dist/web/js/{node-binding-dialog-CYsbUPsh.js → node-binding-dialog-MGTLF9MJ.js} +38 -38
- package/dist/web/js/{node-label-dialog-DFIMPMuJ.js → node-label-dialog-DgbTIGwf.js} +1 -1
- package/dist/web/js/{settings-dialog-CGXliJcr.js → settings-dialog-BQJbHl4j.js} +98 -96
- package/package.json +3 -3
- package/src/client/models/descriptions.ts +67 -62
- package/src/components/avsum-ptz-strip.ts +109 -100
- package/src/components/dialog-box/dialog-box.ts +20 -12
- package/src/components/dialogs/acl/acl-actions.ts +15 -6
- package/src/components/dialogs/acl/node-acl-add-dialog.ts +35 -29
- package/src/components/dialogs/binding/binding-actions.ts +58 -15
- package/src/components/dialogs/binding/node-binding-dialog.ts +78 -66
- package/src/components/dialogs/commission-node-dialog/commission-node-dialog.ts +25 -23
- package/src/components/dialogs/commission-node-dialog/commission-node-thread.ts +22 -20
- package/src/components/dialogs/commission-node-dialog/commission-node-wifi.ts +22 -20
- package/src/components/dialogs/dev/attribute-write-dialog.ts +10 -4
- package/src/components/dialogs/dev/command-invoke-dialog.ts +13 -9
- package/src/components/dialogs/settings/log-level-section.ts +21 -19
- package/src/components/dialogs/settings/settings-dialog.ts +141 -115
- package/src/components/webrtc-stream-view.ts +30 -22
- package/src/pages/camera-overlay.ts +165 -132
- package/src/pages/cluster-commands/clusters/access-control-commands.ts +47 -37
- package/src/pages/cluster-commands/clusters/avsum-commands.ts +210 -187
- package/src/pages/cluster-commands/clusters/basic-information-commands.ts +5 -3
- package/src/pages/cluster-commands/clusters/binding-commands.ts +40 -36
- package/src/pages/cluster-commands/clusters/chime-commands.ts +84 -52
- package/src/pages/cluster-commands/clusters/closure-control-commands.ts +171 -139
- package/src/pages/cluster-commands/clusters/icd-management-commands.ts +51 -34
- package/src/pages/components/header.ts +62 -50
- package/src/pages/components/node-details.ts +87 -72
- package/src/pages/matter-cluster-view.ts +154 -121
- package/src/pages/matter-endpoint-view.ts +76 -25
- package/src/pages/matter-network-view.ts +36 -30
- package/src/pages/matter-node-view.ts +14 -8
- package/src/pages/matter-server-view.ts +11 -9
- package/src/pages/network/device-panel.ts +20 -18
- package/src/pages/network/network-details.ts +758 -618
- package/src/pages/network/thread-graph.ts +5 -3
- package/src/pages/network/update-connections-dialog.ts +64 -52
- package/src/util/binding.ts +42 -6
- package/src/util/chime.ts +9 -2
- package/src/util/icd.ts +12 -8
- package/src/util/matter-status.ts +26 -0
- package/src/util/node-label.ts +6 -2
- package/src/util/shared-styles.ts +39 -0
|
@@ -12,7 +12,7 @@ import "@material/web/iconbutton/outlined-icon-button";
|
|
|
12
12
|
import "@material/web/list/list";
|
|
13
13
|
import "@material/web/list/list-item";
|
|
14
14
|
import { isTestNodeId, MatterClient, MatterNode, toBigIntAwareJson } from "@matter-server/ws-client";
|
|
15
|
-
import { mdiAlertCircleOutline, mdiPencil, mdiPlay, mdiRefresh } from "@mdi/js";
|
|
15
|
+
import { mdiAlertCircleOutline, mdiFilterOffOutline, mdiPencil, mdiPlay, mdiRefresh } from "@mdi/js";
|
|
16
16
|
import { css, html, LitElement, nothing, type TemplateResult } from "lit";
|
|
17
17
|
import { customElement, property, state } from "lit/decorators.js";
|
|
18
18
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
DESCRIPTOR_CLUSTER_ID,
|
|
34
34
|
TAG_LIST_ATTR,
|
|
35
35
|
} from "../util/semantic-tags.js";
|
|
36
|
-
import { notFoundStyles } from "../util/shared-styles.js";
|
|
36
|
+
import { infoPanelStyles, notFoundStyles } from "../util/shared-styles.js";
|
|
37
37
|
import { BaseClusterCommands, getClusterCommandsTag } from "./cluster-commands/index.js";
|
|
38
38
|
import { bindingContext } from "./components/context.js";
|
|
39
39
|
|
|
@@ -105,6 +105,8 @@ class MatterClusterView extends LitElement {
|
|
|
105
105
|
|
|
106
106
|
// Per-attribute refresh state, keyed by attribute id (within the current ep/cluster)
|
|
107
107
|
@state() private _refreshState: Record<number, RefreshState> = {};
|
|
108
|
+
@state() private _unfilteredBusy: Record<number, boolean> = {};
|
|
109
|
+
private _viewKey = "";
|
|
108
110
|
|
|
109
111
|
private _unsubscribeDev?: () => void;
|
|
110
112
|
|
|
@@ -177,26 +179,32 @@ class MatterClusterView extends LitElement {
|
|
|
177
179
|
(attribute, index) => html`
|
|
178
180
|
<md-list-item class=${index % 2 === 1 ? "alternate-row" : ""}>
|
|
179
181
|
<div slot="headline">
|
|
180
|
-
${
|
|
181
|
-
|
|
182
|
+
${
|
|
183
|
+
clusters[this.cluster!]?.attributes[attribute.key]?.label ??
|
|
184
|
+
"Custom/Unknown Attribute"
|
|
185
|
+
}
|
|
182
186
|
</div>
|
|
183
187
|
<div slot="supporting-text">
|
|
184
188
|
AttributeId: ${attribute.key} (${formatHex(attribute.key)}) - Value type:
|
|
185
189
|
${clusters[this.cluster!]?.attributes[attribute.key]?.type ?? "unknown"}
|
|
186
190
|
</div>
|
|
187
191
|
<div slot="end" class="row-end">
|
|
188
|
-
${
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
192
|
+
${
|
|
193
|
+
this._devMode
|
|
194
|
+
? this._renderAttributeDevActions(attribute.key, attribute.value)
|
|
195
|
+
: nothing
|
|
196
|
+
}
|
|
197
|
+
${
|
|
198
|
+
toBigIntAwareJson(attribute.value).length > 30
|
|
199
|
+
? html`<md-outlined-button
|
|
200
|
+
@click=${() => {
|
|
201
|
+
this._showAttributeValue(attribute.value);
|
|
202
|
+
}}
|
|
203
|
+
>
|
|
204
|
+
Show value
|
|
205
|
+
</md-outlined-button>`
|
|
206
|
+
: html`<code>${toBigIntAwareJson(attribute.value)}</code>`
|
|
207
|
+
}
|
|
200
208
|
</div>
|
|
201
209
|
</md-list-item>
|
|
202
210
|
`,
|
|
@@ -223,19 +231,30 @@ class MatterClusterView extends LitElement {
|
|
|
223
231
|
>
|
|
224
232
|
<ha-svg-icon .path=${mdiRefresh}></ha-svg-icon>
|
|
225
233
|
</md-outlined-icon-button>
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
234
|
+
<md-outlined-icon-button
|
|
235
|
+
class="dev-action unfiltered"
|
|
236
|
+
title="Read unfiltered (all fabrics) — shown only, not cached"
|
|
237
|
+
aria-label="Read attribute unfiltered"
|
|
238
|
+
?disabled=${!online || this._unfilteredBusy[attributeId] === true}
|
|
239
|
+
@click=${() => this._readUnfiltered(attributeId)}
|
|
240
|
+
>
|
|
241
|
+
<ha-svg-icon .path=${mdiFilterOffOutline}></ha-svg-icon>
|
|
242
|
+
</md-outlined-icon-button>
|
|
243
|
+
${
|
|
244
|
+
meta?.writable
|
|
245
|
+
? html`
|
|
246
|
+
<md-outlined-icon-button
|
|
247
|
+
class="dev-action pencil"
|
|
248
|
+
title="Write attribute…"
|
|
249
|
+
aria-label="Write attribute"
|
|
250
|
+
?disabled=${!online}
|
|
251
|
+
@click=${() => this._openAttributeWriteDialog(attributeId, currentValue, meta.label)}
|
|
252
|
+
>
|
|
253
|
+
<ha-svg-icon .path=${mdiPencil}></ha-svg-icon>
|
|
254
|
+
</md-outlined-icon-button>
|
|
255
|
+
`
|
|
256
|
+
: nothing
|
|
257
|
+
}
|
|
239
258
|
</span>
|
|
240
259
|
`;
|
|
241
260
|
}
|
|
@@ -253,9 +272,10 @@ class MatterClusterView extends LitElement {
|
|
|
253
272
|
|
|
254
273
|
this._refreshState = { ...this._refreshState, [attributeId]: "loading" };
|
|
255
274
|
try {
|
|
256
|
-
|
|
275
|
+
// Fabric-filtered to match the subscription: matter.js discards a read whose filtering
|
|
276
|
+
// differs, so an unfiltered one would put values into the cache that nothing ever refreshes.
|
|
277
|
+
const result = await this.client.readAttribute(nodeId, path, undefined, true);
|
|
257
278
|
if (!isSameContext()) return;
|
|
258
|
-
// Defensive merge — attribute_updated events usually do this already.
|
|
259
279
|
for (const [key, value] of Object.entries(result)) {
|
|
260
280
|
this.node.attributes[key] = value;
|
|
261
281
|
}
|
|
@@ -271,7 +291,45 @@ class MatterClusterView extends LitElement {
|
|
|
271
291
|
if (!isSameContext()) return;
|
|
272
292
|
this._refreshState = { ...this._refreshState, [attributeId]: "idle" };
|
|
273
293
|
const message = err instanceof Error ? err.message : String(err);
|
|
274
|
-
showAlertDialog({ title: "Read failed", text: message })
|
|
294
|
+
showAlertDialog({ title: "Read failed", text: message }).catch(alertErr =>
|
|
295
|
+
console.error("Failed to show the read error", alertErr),
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Read across all fabrics for diagnostics. The result is displayed only — merging it would put
|
|
302
|
+
* values into the attribute cache that the fabric-filtered subscription never refreshes.
|
|
303
|
+
*/
|
|
304
|
+
private async _readUnfiltered(attributeId: number) {
|
|
305
|
+
if (!this.node) return;
|
|
306
|
+
const nodeId = this.node.node_id;
|
|
307
|
+
const endpoint = this.endpoint;
|
|
308
|
+
const cluster = this.cluster;
|
|
309
|
+
const path = `${endpoint}/${cluster}/${attributeId}`;
|
|
310
|
+
// The busy flag is cleared for the same view even while detached, since nothing resets it on
|
|
311
|
+
// reconnect and the button would stay disabled forever.
|
|
312
|
+
const isSameView = () =>
|
|
313
|
+
this.node?.node_id === nodeId && this.endpoint === endpoint && this.cluster === cluster;
|
|
314
|
+
const isSameContext = () => this.isConnected && isSameView();
|
|
315
|
+
|
|
316
|
+
this._unfilteredBusy = { ...this._unfilteredBusy, [attributeId]: true };
|
|
317
|
+
try {
|
|
318
|
+
const result = await this.client.readAttribute(nodeId, path, undefined, false);
|
|
319
|
+
if (!isSameContext()) return;
|
|
320
|
+
showAlertDialog({
|
|
321
|
+
title: "Unfiltered read (all fabrics)",
|
|
322
|
+
text: path in result ? toBigIntAwareJson(result[path]) : "The device returned no value for this path.",
|
|
323
|
+
asCodeBlock: true,
|
|
324
|
+
}).catch(err => console.error("Failed to show the unfiltered read", err));
|
|
325
|
+
} catch (err) {
|
|
326
|
+
if (!isSameContext()) return;
|
|
327
|
+
showAlertDialog({
|
|
328
|
+
title: "Read failed",
|
|
329
|
+
text: err instanceof Error ? err.message : String(err),
|
|
330
|
+
}).catch(alertErr => console.error("Failed to show the read error", alertErr));
|
|
331
|
+
} finally {
|
|
332
|
+
if (isSameView()) this._unfilteredBusy = { ...this._unfilteredBusy, [attributeId]: false };
|
|
275
333
|
}
|
|
276
334
|
}
|
|
277
335
|
|
|
@@ -308,33 +366,35 @@ class MatterClusterView extends LitElement {
|
|
|
308
366
|
Commands
|
|
309
367
|
</summary>
|
|
310
368
|
<div class="dev-commands-content">
|
|
311
|
-
${
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
<
|
|
319
|
-
<
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
369
|
+
${
|
|
370
|
+
commands.length === 0
|
|
371
|
+
? html`<p class="empty">No invokable commands for this cluster.</p>`
|
|
372
|
+
: html`
|
|
373
|
+
<ul class="command-list">
|
|
374
|
+
${commands.map(
|
|
375
|
+
cmd => html`
|
|
376
|
+
<li class="command-row">
|
|
377
|
+
<div class="command-meta">
|
|
378
|
+
<span class="command-label">${cmd.label}</span>
|
|
379
|
+
<span class="command-sub"
|
|
380
|
+
>CommandId ${cmd.id} (${formatHex(cmd.id)}) ·
|
|
381
|
+
<code>${cmd.name}</code></span
|
|
382
|
+
>
|
|
383
|
+
</div>
|
|
384
|
+
<md-outlined-button
|
|
385
|
+
class="dev-invoke-button"
|
|
386
|
+
?disabled=${!online}
|
|
387
|
+
@click=${() => this._openCommandInvokeDialog(cmd.id, cmd.name)}
|
|
323
388
|
>
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
</li>
|
|
334
|
-
`,
|
|
335
|
-
)}
|
|
336
|
-
</ul>
|
|
337
|
-
`}
|
|
389
|
+
<ha-svg-icon slot="icon" .path=${mdiPlay}></ha-svg-icon>
|
|
390
|
+
Invoke
|
|
391
|
+
</md-outlined-button>
|
|
392
|
+
</li>
|
|
393
|
+
`,
|
|
394
|
+
)}
|
|
395
|
+
</ul>
|
|
396
|
+
`
|
|
397
|
+
}
|
|
338
398
|
</div>
|
|
339
399
|
</details>
|
|
340
400
|
</div>
|
|
@@ -382,19 +442,21 @@ class MatterClusterView extends LitElement {
|
|
|
382
442
|
return html`
|
|
383
443
|
<div class="info-section">
|
|
384
444
|
<div class="info-section-header">Active Features</div>
|
|
385
|
-
${
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
${feature.
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
445
|
+
${
|
|
446
|
+
activeFeatures.length === 0
|
|
447
|
+
? html`<p class="empty">No active features</p>`
|
|
448
|
+
: html`
|
|
449
|
+
<ul class="chip-list">
|
|
450
|
+
${activeFeatures.map(
|
|
451
|
+
feature => html`
|
|
452
|
+
<li class="chip" title="Bit ${feature.bit} (${feature.code})">
|
|
453
|
+
${feature.label}
|
|
454
|
+
</li>
|
|
455
|
+
`,
|
|
456
|
+
)}
|
|
457
|
+
</ul>
|
|
458
|
+
`
|
|
459
|
+
}
|
|
398
460
|
</div>
|
|
399
461
|
`;
|
|
400
462
|
}
|
|
@@ -409,18 +471,20 @@ class MatterClusterView extends LitElement {
|
|
|
409
471
|
return html`
|
|
410
472
|
<div class="info-section">
|
|
411
473
|
<div class="info-section-header">Semantic Tags (TagList)</div>
|
|
412
|
-
${
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
474
|
+
${
|
|
475
|
+
tagList.length === 0
|
|
476
|
+
? html`<p class="empty">No semantic tags</p>`
|
|
477
|
+
: html`
|
|
478
|
+
<ul class="chip-list">
|
|
479
|
+
${tagList.map(entry => {
|
|
480
|
+
const { text, title, erroneous } = describeSemanticTagListEntry(entry);
|
|
481
|
+
return html`<li class=${erroneous ? "chip chip-error" : "chip"} title=${title}>
|
|
482
|
+
${text}
|
|
483
|
+
</li>`;
|
|
484
|
+
})}
|
|
485
|
+
</ul>
|
|
486
|
+
`
|
|
487
|
+
}
|
|
424
488
|
</div>
|
|
425
489
|
`;
|
|
426
490
|
}
|
|
@@ -458,9 +522,13 @@ class MatterClusterView extends LitElement {
|
|
|
458
522
|
override updated(changedProperties: Map<string, unknown>) {
|
|
459
523
|
super.updated(changedProperties);
|
|
460
524
|
|
|
461
|
-
// Reset per-attribute
|
|
462
|
-
|
|
525
|
+
// Reset per-attribute read state when navigating to a different node/endpoint/cluster. Keyed on
|
|
526
|
+
// the node id, not the property: `node` is a fresh object on every nodes_changed tick.
|
|
527
|
+
const viewKey = `${this.node?.node_id ?? ""}/${this.endpoint}/${this.cluster}`;
|
|
528
|
+
if (viewKey !== this._viewKey) {
|
|
529
|
+
this._viewKey = viewKey;
|
|
463
530
|
this._refreshState = {};
|
|
531
|
+
this._unfilteredBusy = {};
|
|
464
532
|
this._scrollCommandPanelIntoView();
|
|
465
533
|
}
|
|
466
534
|
|
|
@@ -490,6 +558,7 @@ class MatterClusterView extends LitElement {
|
|
|
490
558
|
|
|
491
559
|
static override styles = [
|
|
492
560
|
notFoundStyles,
|
|
561
|
+
infoPanelStyles,
|
|
493
562
|
css`
|
|
494
563
|
:host {
|
|
495
564
|
display: block;
|
|
@@ -711,42 +780,6 @@ class MatterClusterView extends LitElement {
|
|
|
711
780
|
border-radius: 3px;
|
|
712
781
|
}
|
|
713
782
|
|
|
714
|
-
.info-panel {
|
|
715
|
-
background-color: var(--md-sys-color-surface-container);
|
|
716
|
-
border: 1px solid var(--md-sys-color-outline-variant);
|
|
717
|
-
border-radius: 12px;
|
|
718
|
-
padding: 14px 16px;
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
.info-section + .info-section {
|
|
722
|
-
margin-top: 12px;
|
|
723
|
-
padding-top: 12px;
|
|
724
|
-
border-top: 1px solid var(--md-sys-color-outline-variant);
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
.info-section-header {
|
|
728
|
-
font-weight: 500;
|
|
729
|
-
color: var(--md-sys-color-on-surface);
|
|
730
|
-
margin-bottom: 10px;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
.chip-list {
|
|
734
|
-
list-style: none;
|
|
735
|
-
margin: 0;
|
|
736
|
-
padding: 0;
|
|
737
|
-
display: flex;
|
|
738
|
-
flex-wrap: wrap;
|
|
739
|
-
gap: 8px;
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
.chip {
|
|
743
|
-
font-size: 0.85rem;
|
|
744
|
-
color: var(--md-sys-color-on-secondary-container);
|
|
745
|
-
background: var(--md-sys-color-secondary-container);
|
|
746
|
-
padding: 4px 10px;
|
|
747
|
-
border-radius: 8px;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
783
|
.chip.chip-error {
|
|
751
784
|
color: var(--md-sys-color-on-error-container);
|
|
752
785
|
background: var(--md-sys-color-error-container);
|
|
@@ -13,16 +13,17 @@ import "@material/web/list/list-item";
|
|
|
13
13
|
import { consume } from "@lit/context";
|
|
14
14
|
import { MatterClient, MatterNode, isTestNodeId } from "@matter-server/ws-client";
|
|
15
15
|
import { mdiAlertCircleOutline, mdiChevronRight } from "@mdi/js";
|
|
16
|
-
import { LitElement, css, html, nothing } from "lit";
|
|
16
|
+
import { LitElement, type TemplateResult, css, html, nothing } from "lit";
|
|
17
17
|
import { customElement, property } from "lit/decorators.js";
|
|
18
18
|
import { guard } from "lit/directives/guard.js";
|
|
19
19
|
import "./cluster-commands/clusters/binding-commands.js";
|
|
20
20
|
import { clientContext, tickContext } from "../client/client-context.js";
|
|
21
21
|
import { clusters } from "../client/models/descriptions.js";
|
|
22
22
|
import "../components/ha-svg-icon";
|
|
23
|
+
import { BINDING_CLUSTER_ID, boundClientClusterIds, sourceClientClusters } from "../util/binding.js";
|
|
23
24
|
import { getEndpointDeviceTypes } from "../util/endpoints.js";
|
|
24
25
|
import { formatHex, formatNodeAddress, getEffectiveFabricIndex } from "../util/format_hex.js";
|
|
25
|
-
import { notFoundStyles } from "../util/shared-styles.js";
|
|
26
|
+
import { infoPanelStyles, notFoundStyles } from "../util/shared-styles.js";
|
|
26
27
|
import { bindingContext } from "./components/context.js";
|
|
27
28
|
|
|
28
29
|
declare global {
|
|
@@ -77,7 +78,10 @@ class MatterEndpointView extends LitElement {
|
|
|
77
78
|
this.client.serverInfo.fabric_index,
|
|
78
79
|
isTestNodeId(this.node.node_id),
|
|
79
80
|
);
|
|
80
|
-
const
|
|
81
|
+
const nodeId = this.node.node_id;
|
|
82
|
+
const nodeHex = formatNodeAddress(fabricIndex, nodeId);
|
|
83
|
+
const endpointClusters = getUniqueClusters(this.node, this.endpoint);
|
|
84
|
+
const hasBindingCluster = endpointClusters.includes(BINDING_CLUSTER_ID);
|
|
81
85
|
|
|
82
86
|
return html`
|
|
83
87
|
<dashboard-header
|
|
@@ -90,16 +94,20 @@ class MatterEndpointView extends LitElement {
|
|
|
90
94
|
<node-details .node=${this.node}></node-details>
|
|
91
95
|
</div>
|
|
92
96
|
|
|
97
|
+
${hasBindingCluster ? this._renderClientClustersSection(this.node) : nothing}
|
|
98
|
+
|
|
93
99
|
<!-- Binding editor (when this endpoint has a Binding cluster) -->
|
|
94
|
-
${
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
${
|
|
101
|
+
hasBindingCluster
|
|
102
|
+
? html`<div class="container">
|
|
103
|
+
<binding-cluster-commands
|
|
104
|
+
.node=${this.node}
|
|
105
|
+
.endpoint=${this.endpoint}
|
|
106
|
+
.cluster=${BINDING_CLUSTER_ID}
|
|
107
|
+
></binding-cluster-commands>
|
|
108
|
+
</div>`
|
|
109
|
+
: nothing
|
|
110
|
+
}
|
|
103
111
|
|
|
104
112
|
<!-- Endpoint clusters listing -->
|
|
105
113
|
<div class="container">
|
|
@@ -117,19 +125,22 @@ class MatterEndpointView extends LitElement {
|
|
|
117
125
|
.join(" / ")}
|
|
118
126
|
</div>
|
|
119
127
|
</md-list-item>
|
|
120
|
-
${guard(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
<
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
${guard(
|
|
129
|
+
// Must name the rendered set itself; anything derived from the attribute
|
|
130
|
+
// cache depends on how that cache mutates and can go stale.
|
|
131
|
+
[nodeId, this.endpoint, endpointClusters.join(",")],
|
|
132
|
+
() =>
|
|
133
|
+
endpointClusters.map(cluster => {
|
|
134
|
+
return html`
|
|
135
|
+
<md-list-item type="link" href=${`#node/${nodeId}/${this.endpoint}/${cluster}`}>
|
|
136
|
+
<div slot="headline">
|
|
137
|
+
${clusters[cluster]?.label ?? "Custom/Unknown Cluster"}
|
|
138
|
+
</div>
|
|
139
|
+
<div slot="supporting-text">ClusterId ${cluster} (${formatHex(cluster)})</div>
|
|
140
|
+
<ha-svg-icon slot="end" .path=${mdiChevronRight}></ha-svg-icon>
|
|
141
|
+
</md-list-item>
|
|
142
|
+
`;
|
|
143
|
+
}),
|
|
133
144
|
)}
|
|
134
145
|
</md-list>
|
|
135
146
|
</div>
|
|
@@ -140,8 +151,36 @@ class MatterEndpointView extends LitElement {
|
|
|
140
151
|
history.back();
|
|
141
152
|
}
|
|
142
153
|
|
|
154
|
+
private _renderClientClustersSection(node: MatterNode): TemplateResult | typeof nothing {
|
|
155
|
+
const clientClusters = sourceClientClusters(node, this.endpoint);
|
|
156
|
+
if (clientClusters.length === 0) return nothing;
|
|
157
|
+
const boundClusterIds = boundClientClusterIds(node, this.endpoint);
|
|
158
|
+
|
|
159
|
+
return html`
|
|
160
|
+
<div class="container">
|
|
161
|
+
<div class="info-panel">
|
|
162
|
+
<div class="info-section">
|
|
163
|
+
<div class="info-section-header">Client Clusters</div>
|
|
164
|
+
<ul class="chip-list" role="list">
|
|
165
|
+
${clientClusters.map(id => {
|
|
166
|
+
const bound = boundClusterIds.has(id);
|
|
167
|
+
return html`
|
|
168
|
+
<li class=${bound ? "chip chip-bound" : "chip"}>
|
|
169
|
+
${clusters[id]?.label ?? "Custom/Unknown Cluster"} ${formatHex(id)}
|
|
170
|
+
${bound ? html`<span class="chip-state">Bound</span>` : nothing}
|
|
171
|
+
</li>
|
|
172
|
+
`;
|
|
173
|
+
})}
|
|
174
|
+
</ul>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
`;
|
|
179
|
+
}
|
|
180
|
+
|
|
143
181
|
static override styles = [
|
|
144
182
|
notFoundStyles,
|
|
183
|
+
infoPanelStyles,
|
|
145
184
|
css`
|
|
146
185
|
:host {
|
|
147
186
|
display: block;
|
|
@@ -178,6 +217,18 @@ class MatterEndpointView extends LitElement {
|
|
|
178
217
|
font-weight: bold;
|
|
179
218
|
font-size: 0.8em;
|
|
180
219
|
}
|
|
220
|
+
|
|
221
|
+
.chip.chip-bound {
|
|
222
|
+
color: var(--md-sys-color-on-primary-container);
|
|
223
|
+
background: var(--md-sys-color-primary-container);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.chip-state {
|
|
227
|
+
font-weight: 500;
|
|
228
|
+
margin-left: 8px;
|
|
229
|
+
padding-left: 8px;
|
|
230
|
+
border-left: 1px solid currentcolor;
|
|
231
|
+
}
|
|
181
232
|
`,
|
|
182
233
|
];
|
|
183
234
|
}
|
|
@@ -354,29 +354,31 @@ class MatterNetworkView extends LitElement {
|
|
|
354
354
|
>
|
|
355
355
|
<ha-svg-icon .path=${mdiEyeOff}></ha-svg-icon>
|
|
356
356
|
</button>
|
|
357
|
-
${
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
<
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
357
|
+
${
|
|
358
|
+
this._showHideMenu
|
|
359
|
+
? html`
|
|
360
|
+
<div
|
|
361
|
+
id="hide-options-menu"
|
|
362
|
+
class="hide-dropdown"
|
|
363
|
+
role="group"
|
|
364
|
+
aria-label="Hide options"
|
|
365
|
+
>
|
|
366
|
+
${HIDE_OPTIONS.map(
|
|
367
|
+
option => html`
|
|
368
|
+
<label class="hide-option">
|
|
369
|
+
<input
|
|
370
|
+
type="checkbox"
|
|
371
|
+
.checked=${this[option.key]}
|
|
372
|
+
@change=${() => this._handleToggleHideOption(option.key)}
|
|
373
|
+
/>
|
|
374
|
+
<span>${option.label}</span>
|
|
375
|
+
</label>
|
|
376
|
+
`,
|
|
377
|
+
)}
|
|
378
|
+
</div>
|
|
379
|
+
`
|
|
380
|
+
: ""
|
|
381
|
+
}
|
|
380
382
|
</div>
|
|
381
383
|
<button
|
|
382
384
|
class="control-button ${this._physicsEnabled ? "" : "active"}"
|
|
@@ -388,13 +390,17 @@ class MatterNetworkView extends LitElement {
|
|
|
388
390
|
</div>
|
|
389
391
|
</div>
|
|
390
392
|
</div>
|
|
391
|
-
${
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
393
|
+
${
|
|
394
|
+
this._threadAddressSearchStatus === "idle"
|
|
395
|
+
? ""
|
|
396
|
+
: html`<div class="thread-search-status ${this._threadAddressSearchStatus}">
|
|
397
|
+
${
|
|
398
|
+
this._threadAddressSearchStatus === "found"
|
|
399
|
+
? "Node highlighted."
|
|
400
|
+
: "No matching device found."
|
|
401
|
+
}
|
|
402
|
+
</div>`
|
|
403
|
+
}
|
|
398
404
|
<thread-graph
|
|
399
405
|
.nodes=${this.nodes}
|
|
400
406
|
.borderRouters=${this._borderRouterStore.entries}
|
|
@@ -83,14 +83,20 @@ class MatterNodeView extends LitElement {
|
|
|
83
83
|
<div class="node-title-bar">
|
|
84
84
|
<ha-svg-icon class="node-icon" .path=${getDeviceIcon(this.node)}></ha-svg-icon>
|
|
85
85
|
<h2>Node ${this.node.node_id} <span class="node-id-hex">${nodeHex}</span></h2>
|
|
86
|
-
${
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
${
|
|
87
|
+
showGraphButton
|
|
88
|
+
? html`
|
|
89
|
+
<a
|
|
90
|
+
href=${graphUrl}
|
|
91
|
+
class="show-in-graph-button"
|
|
92
|
+
title="Show in ${graphViewType} graph"
|
|
93
|
+
>
|
|
94
|
+
<ha-svg-icon .path=${mdiGraphOutline}></ha-svg-icon>
|
|
95
|
+
<span class="button-text">Show in graph</span>
|
|
96
|
+
</a>
|
|
97
|
+
`
|
|
98
|
+
: ""
|
|
99
|
+
}
|
|
94
100
|
</div>
|
|
95
101
|
<node-details .node=${this.node}></node-details>
|
|
96
102
|
</div>
|