Capability report: PUT /devices/{id}/report, a Capabilities section, offline devices degraded
A device reports its board, screen, camera and ports from its own credential (16 KB, schema 1, replacing the last report), and the flows are validated against it again. The node panel turns a reported port's config schema into a form, a reported screen is a canvas preset and a touch screen's first report turns Touch friendly on. An offline device node is degraded: amber on the canvas, a warning on Home, never a fault. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138N7k5PT4dcR1iEqXaaQ9k
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a9d453c9d9
commit
ad76200d3d
@@ -189,10 +189,10 @@ def _device_may(payload: dict[str, Any], request: Request) -> None:
|
||||
A panel credential names the account that approved the pairing, so without
|
||||
this it would be that person's session hanging on a wall. What a panel
|
||||
genuinely needs is small and worth writing out: the dashboards it was
|
||||
assigned, its own definition, the messages its own widgets and ports bind
|
||||
to, and the bytes those messages currently point at, for a tile drawing a
|
||||
camera frame — plus an upload named after one of its ``in`` ports, for a
|
||||
microphone whose recording is the value it publishes.
|
||||
assigned, its own definition and report, the messages its own widgets and
|
||||
ports bind to, and the bytes those messages currently point at, for a tile
|
||||
drawing a camera frame — plus an upload named after one of its ``in``
|
||||
ports, for a microphone whose recording is the value it publishes.
|
||||
|
||||
Publishing is in the list because a panel cannot be strictly read-only — a
|
||||
control on a panel is the point of putting one there, and a querying chart
|
||||
@@ -239,6 +239,9 @@ def _device_may(payload: dict[str, Any], request: Request) -> None:
|
||||
f"{api}/panels/{device.id}",
|
||||
):
|
||||
allowed = True
|
||||
elif method == "PUT" and path == f"{api}/devices/{device.id}/report":
|
||||
# What it has, said about itself and nobody else.
|
||||
allowed = True
|
||||
elif method == "POST" and path == f"{api}/flows/ws-ticket":
|
||||
# How its live socket opens; the socket applies the panel's own scope.
|
||||
allowed = True
|
||||
|
||||
Reference in New Issue
Block a user