LooT Manuals
Deutsch

Data Sources

Connect devices and gateways – create data sources, assign data points to nodes, manage tokens, check buffer and log, and use templates.

What a data source is#

A data source receives measurements from the outside, for example from a device, gateway or program. It knows only its own data points (such as HallTemperature or Humidity) and nothing about your node tree. Only the assignment connects a data point to a node.

TermMeaning
Data sourceA device or gateway as an object of its own in the tenant, with token, buffer, log and permissions
Data pointA measured quantity of the source with a name and value type, for example Humidity (Double)
AssignmentConnects a data point to a node. A data point feeds at most one node; a node can be fed by several data points
NodeThe target in your hierarchy where the time series lives

This keeps the device connection independent of how your tree is built, and you can change either one separately. What happens to a value afterwards is described under The Path of Your Data.

The Data sources view#

Switch to Data sources in the rail. The list shows one row per source with its state, name, last arrival and an activity graph for the last seven days. It is grouped by what needs your attention:

  • Needs checking: The source waits for its first value, has gone silent, has an almost full buffer (from 80%) or has data points without a node.
  • Active: Everything runs.
  • Deactivated: The source is locked (see below).

At the top you search by name, template or data point, and the tiles All, Active, Check and Deactivated filter the list. The ⋮ menu holds Set up device …, Data source templates, the sort order (Check first, Last activity, Name) and Refresh. A click opens the source in a preview tab; a double-click pins the tab.

Data source with the table of data points
A data source: header with state and last arrival, below it the data points with their assigned node and last value.

Setting up a device#

The Set up device … assistant guides you through the connection in four steps. It opens as a tab of its own and stays open when you switch views in between. Entries and the token are held in memory only: they survive switching tabs but not reloading the page.

  1. Device: You create the source here (name, optionally a template with prefilled data points, buffer size and overflow rule), or you only give the expected name if the device creates its source itself.
  2. Connect: LooT generates the token. It appears only now, with a copy button and a curl example. You can also download the configuration file loot-datasource.json; it contains the ingest server address, the token and the data points and is read by the device SDKs and tools. While the token is not secured, LooT asks before you close the tab.
  3. Check: LooT shows whether the device has reported in and how many values per data point are in the buffer. If nothing arrives, a checklist helps (data point names, types, location of token or configuration file).
  4. Assign: For each data point you choose New node, Existing node … or Do not assign yet. New nodes are created under a storage location with the data point's name and value type. Buffered values are passed on immediately afterwards.

If you do not need the assistant, create the source from the view and continue in its detail tab. Creating needs the Create data sources permission in the tenant. Without it, Set up device … is locked.

Data points and assignment#

The Data points tab lists name, type, assigned node and the node's last value. The Name, Type and Node columns can be sorted. With the Manage permission you can:

  • Assign node … (for unassigned points) or Node … picks a node in the tree. You can choose nodes with the same or a convertible value type on which you may write. If the type differs, LooT warns: floating-point values are rounded for an integer node, numbers become "not zero" for a bool node. Values that cannot be converted are discarded and counted in the log.
  • Unassign removes the assignment. From then on the values stay in the buffer.
  • Add, change and delete data points. If you change the value type, LooT asks first, because the point's buffered values are discarded.
  • Create nodes for unassigned … creates a node with the same name and a matching value type for every unassigned data point. The Separator for sub-nodes field (suggestion /._) controls whether Hall/Climate/Temperature becomes a hierarchy: each separator splits the name, the leading parts become containers, the last part is the node holding the value. Existing nodes of the same name are reused as containers; if the leaf already exists, the data point stays unassigned (note in the log).
  • Create nodes automatically (switch above the table) does the same continuously: data points created later also get a node under a target node automatically. You choose the target there and store it with Save.

On the node itself, the detail shows "Fed by source · data point name" with a link to the source.

A source can have at most 1,000 data points. Data point names are unique within the source (case is ignored).

Buffer#

The Buffer tab shows the fill level (values, entries, percent), oldest entry, last arrival, discarded / rejected so far and the values per data point. With the Manage permission you change the buffer size (default 5,000 values) and the overflow rule (discard oldest values or reject new values) there, and empty the buffer with Empty buffer …. Values of data points that are not yet assigned are lost as well; the log records the number.

This is also where the switch Client may create data points lives (on by default): if a device delivers an unknown name, LooT creates the data point and detects the value type from the first value. The new point is not assigned to a node yet, and its values stay in the buffer. With the switch off, values with unknown names are rejected individually.

Buffer tab of a data source
Buffer: fill level, oldest and last entry, overflow rule and values per data point.

Log#

The Log lists events of the source, newest first: token renewed, target node deleted, overflow (discarded or rejected), conversion failed, buffer emptied, assignment invalid, data point created, nodes created or not created, deactivated and reactivated. Overflows and conversion errors are summarised per minute into one row with a count; losses are highlighted. Use Load older to page back. Entries are kept for 30 days by default.

Log tab of a data source
The log: time, event, count and text.

Token and access#

The Access tab shows the token hint (its last characters), the creation time and the state. You see the token in clear text only when creating and when renewing it.

  • Renew token …: The old token is invalid at once. The device delivers again only with the new one.
  • Rename data source and Delete data source are on this tab as well.
Access tab of a data source
Access: token hint, creation time, renew token, rename and delete.

Sending values and testing#

A device sends its values with the token as Authorization: Bearer loot_ds_… to the ingest server, either by REST or over the persistent device channel. The example LooT shows when you create a source looks like this (the workbench fills in the ingest server address if it is configured):

console
$ curl -X POST https://<ingest-address>/api/source/values \
  -H "Authorization: Bearer loot_ds_…" \
  -H "Content-Type: application/json" \
  -d '{"values": [{"name": "Temperature", "value": 21.5}]}'

Every entry names the data point (name), the value and optionally a timestamp ts (ISO 8601 with time zone, or microseconds since 1970). Without ts, the arrival time applies. The value must fit the value type of the data point, not of the node. Up to 10,000 values per call; the response (202) contains accepted, rejected with a reason per entry, and droppedValues.

For a test, the curl example is enough. Afterwards check Last arrival and the Values/min rate in the source header, the fill level on the Buffer tab and the value on the node. For recurring tasks there is loot source on the command line.

Deactivating, reactivating, deleting#

  • Deactivate … (in the source header or the context menu, with an optional reason) locks the source, for example for a dismantled device: the token stops working and new values are rejected with 403. Values already buffered are still passed on; nodes, data points, assignments and log remain. An Undo is offered for a few seconds.
  • Reactivate … lifts the lock. The previous token is valid again; if you want a new one, renew it separately.
  • Delete permanently … exists only for a deactivated source (it is directly reachable in the context menu). It removes the source, data points, assignments, buffer and log. The assigned nodes and their values stay.

Data source templates#

Save recurring device types once as a template. It holds a name, a description and the data points (name and value type); assignments, buffer and token are not part of it.

  • Save as data source template … in a source's header turns it into a template of the tenant.
  • ⋮ → Data source templates opens the list of the tenant's and the system-wide templates. Tenant admins create one with New … and edit or delete it in the detail (sources keep their data points). A system admin can Make system-wide.
  • When you create a source, you pick the template. The data points are prefilled and can be changed for this source.

Permissions#

The Permissions tab appears with the Manage permission on the source. There you grant Read (see the source) and Manage (change it). Creating new sources is governed by the Create data sources permission on the tenant, see Permissions.

Permissions tab of a data source
Permissions: who may see and manage the source.
A product of Rheinwert Datentechnik · rheinwert.deVersion: LooT 0.9.10