Device node: a device's ports are wired in flows
- flow/nodes/device.py: `device` node with params `device` and `config`;
provides the device's `in` ports, requires its `out` ports without
waking anything, never run (Node.passive), down "Offline" from presence
- DeviceDef.io and DevicePort go; GET /devices/{id} computes `io` and
`bindings` from the device nodes of published flows, in a fixed order,
cached by FlowStore.revision; the credential's scope comes from them
- issues `unknown_device` and `device_port` (wired twice; against a report
the wrong direction or dtype, or unlisted as advisory), rechecked when a
device is created or deleted; ValidationIssue.advisory is a field
- a device publishing on a bound port is credited to its node by the
server; the panel endpoint kind is gone from `_endpoints` and the canvas
- a rebuild that moves a device's bindings sends `dashboard_changed` with
an empty name, which the firmware refetches on
- startup moves each device's `io` rows into device nodes in the flows
declaring their messages, draft and published, one commit; rows no
flow declares are logged and left out
- frontend: Device node settings (device, Publishes, Follows, a port
picker from a report), palette shortcuts per reported port, DeviceDetail
lists bindings with "Use in flow" in place of the I/O editor
- docs: devices, flow editor, node types, issues, API
This commit is contained in:
@@ -13,14 +13,14 @@ below, so a large flow grows downwards in one column.
|
||||
- **Edges** are routed around the nodes, a loop back to an earlier node
|
||||
included, and pulse when values pass through. Click one to inspect its
|
||||
payload.
|
||||
- **Endpoints** show flow inputs, dashboard widgets, device I/O ports and nodes
|
||||
in other flows that exchange messages with this flow. A value passing lights
|
||||
- **Endpoints** show flow inputs, dashboard widgets and nodes in other flows
|
||||
that exchange messages with this flow. A value passing lights
|
||||
one up in a sweep: left to right when it sends into the flow, right to left
|
||||
when it reads out of it.
|
||||
- **Clicking an endpoint** shows a flow input's type, starting value and
|
||||
current value, with a pencil that opens the flow settings to edit it. A device
|
||||
port opens the device in the Devices tab. A node in another flow opens that
|
||||
flow on the label leading back here, with its edges highlighted.
|
||||
current value, with a pencil that opens the flow settings to edit it. A node
|
||||
in another flow opens that flow on the label leading back here, with its
|
||||
edges highlighted.
|
||||
|
||||
Values update over a websocket. A connection banner tells you when the editor
|
||||
cannot reach the engine.
|
||||
@@ -37,6 +37,12 @@ and open its settings.
|
||||
payload type, bound message and delivery interval. Outputs also have a
|
||||
streaming toggle.
|
||||
|
||||
A **Device** node stands for a paired device instead: pick the device, then
|
||||
its ports under **Publishes** and **Follows** (see
|
||||
[the device's own ports](dashboards.md#the-devices-own-ports)). A device that
|
||||
reports its ports offers them in a list with their type filled in, and the
|
||||
command palette offers each one as a shortcut, such as *Hallway camera*.
|
||||
|
||||
Message fields suggest existing names. Matching an output's message is how
|
||||
you connect an input.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user