Connections and Commands
Pass values automatically from node to node, send commands to devices and follow their history.
Connections in the data flow#
A connection passes every new value of a node automatically on to another node or to a command. You can use it, for example, to convert a measurement into another value type and store it, or to trigger a command when a switch flips. Connections store no values themselves: what is stored is what arrives at the target, with the timestamp of the source, just like any other write.
Only values that were actually stored are passed on. How they get there is described under The Path of Your Data.
Direction of nodes#
Every node with a value type has a direction:
| Direction | Meaning |
|---|---|
| In | The value may be set from outside: by a device, a connection or a user |
| Out | The value may be read from outside and connected onward |
| In and out | Both; this is the default for new nodes with a value type |
The direction describes structure only. The Read, Write and Execute permissions apply in addition: only someone who also holds Write can set an input. You set the direction in the node form, see Editing nodes.
Rules#
- An output can feed any number of connections; an input has at most one incoming connection. A second one is rejected.
- A connection always has a level: the common parent node of both ends. There are no connections at the top level of the tenant. To connect two root trees, create a common root node.
- Cycles are not allowed: LooT rejects a connection that would close a cycle.
- A node can be fed by connections and by data points at the same time.
- Changes that would invalidate existing connections (narrowing the direction, changing the value type, moving a node) are rejected, and LooT names the number of affected connections. Delete those first.
Creating connections#
In the graphical editor you drag from one port to another: from an output to an input creates a connection. You see the ports on the nodes that are visible at that level. Double-clicking the canvas creates a node, Del deletes the selected connection. In a workflow you drag from port to port in the same way, there also to components and data sources; if you do not give a level, LooT determines the deepest common ancestor.
Before you drop, LooT checks and points out why a connection will probably fail, for example because the target already has an incoming connection.
If the value types differ, the Choose conversion dialog opens. A connection is made only with a conversion, and the editor offers only suitable ones:
- integer to floating point,
- floating point to integer (round or truncate),
- number to bool ("not zero" or with a threshold) and bool to number (0/1),
- number or bool to text, text to number or bool.
Values that cannot be converted or are out of range are discarded. Geo values are not converted: they can only be connected between geo nodes.
Viewing the connections of a node#
The node page shows a table in the Connections section with Source (output), Target (input), Conversion and Scope. The ends are links to the nodes. The trash icon deletes a connection (after confirmation). If a node has none, a note says that connections are created in the editor.
Visibility to the outside#
A parent node can restrict, rename or hide the values of its children towards the outside (the "values shown outside" section of the node page). Only what is visible at the level of the connection can be connected. If you hide a value that a connection needs, LooT refuses.
Commands#
A command is an instruction to a device that LooT accepts at a node and passes on, for example "close valve". It has a name, optional typed parameters and returns a feedback from the device (succeeded or failed, optionally with a message), but no result value.

Defining commands#
On the node page, in the Commands section, use Define command to create one (Manage permission on the node). The pencil edits and the trash icon deletes it; deleting makes still-waiting triggers fail, the history stays.
| Field | Meaning |
|---|---|
| Name | Name of the command |
| Description | Free text, shown as a tooltip on the button |
| Parameters | For each parameter: name, type, Required, Default value, Allowed values (comma), Minimum and Maximum |
Without parameters, the button triggers the command at once.
Triggering commands#
The button with the command name triggers it (Execute permission on the node). If the command has parameters, a form opens, together with the Expires after field (minutes, hours, days). You can also trigger commands from the command line.
A command passes through these states: pending, delivered, succeeded, failed or expired.
- If the device is not connected, the command waits in trigger order. It expires after the expiry time (default 24 hours, adjustable from 1 second to 30 days).
- If the connection breaks after the device has acknowledged receipt, the command fails and is not retried: LooT does not know whether the device carried it out. This is deliberately cautious, because commands often trigger physical actions.
- Before the acknowledgement it keeps waiting and goes to the next connected device.
The device channel#
A device keeps a persistent connection to the ingest server, over which it sends values, receives commands and gives feedback. On connecting, it declares for which nodes, subtrees or path patterns it accepts commands (a * stands for exactly one level). Exactly one device accepts commands per node: the more specific registration wins (single node before pattern, pattern before subtree, deeper subtree before higher subtree). The device's user account needs Read and Execute on the nodes, and Write for values.
History#
Under History the table of triggers shows Triggered, Command, Parameters, Status, Message and By. The history stays visible for 90 days. The refresh icon reloads it.
Commands as connection targets#
Every parameter of a command is an input that a connection can attach to; a command without parameters has a trigger input. An incoming value triggers the command and sets that parameter, and the others get their default value.
- A connection to a command is allowed only if all other required parameters have a default value.
- It triggers only when the value has changed compared with the last triggering one.
- Triggering happens on your behalf. When creating it you need Manage on the level, Read on the source and Execute on the command node. If the permission is missing later, the connection no longer triggers and shows the hint "does not trigger".
Commands have their own visibility, independent of the values: by default they are visible as connection targets at all parent nodes, and a parent node can hide them.