Data sources and templates
Set up external data sources with a token, manage data points, assignments, buffer and log, send test values and keep templates for many identical devices.
Basic concepts#
A data source receives measurements from the outside, for example from a device, a gateway or a program. It knows only its own data points (a name and a value type each) and nothing about your node tree. The assignment connects a data point to a node. Until a data point is assigned, its values wait in the buffer of the source and move on to the node as soon as you assign it.
A device delivers with the token of its source. LooT shows the token only once, when you create the source or renew its token, and does not store it in plain text.
The web interface offers the same functions with a setup assistant: see Data sources. Where the values go afterwards is explained in The Path of Your Data.
| Command | Purpose |
|---|---|
loot source list, loot source show | List the sources of a tenant, show one with data points |
loot source create, loot source delete | Create a source (token appears once), delete it |
loot source token | Renew the token |
loot source lock, loot source unlock | Reject deliveries, accept them again |
loot source map, loot source unmap | Assign a data point to a node, remove the assignment |
loot source point add, loot source point remove | Add or delete a data point |
loot source buffer, loot source events | Show or empty the buffer, show the log |
loot source send | Send a test value with the token |
loot source-template list, loot source-template show | List templates, show one |
loot source-template create, loot source-template delete | Create or delete a template |
None of these commands supports --json.
A source is given as Tenant/Name (for example Brewery/Motor ABC #17; use quotation marks if the name contains spaces) or as its id. A number is always read as an id. The name is split at the first /; the source name itself may contain further slashes. Names are matched without regard to case. To create sources you need the permission to create data sources on the tenant, to change them Manage on the source. A new source is first visible only to tenant admins; grant permissions as described in Permissions.
Data point types. A data point is written as Name:Type, for example Temperature:Double or Speed:Int. The type is a value type name (Int, Long, Float, Double, Bool, String, Custom, Geo; case does not matter). A record is written Name:compound{Field:Type,Field:Type}, for example Log:compound{message:String,severity:Int}; a compound data point needs at least one field.
loot source list#
Lists the data sources of a tenant with state, data points, fill level and last arrival.
loot source list <tenant>| Argument | Meaning |
|---|---|
<tenant> | Name or id of the tenant |
$ loot source list Brewery
Id Name Zustand Datenpunkte Unzugeordnet Puffer Letzter Eingang
-- -------------- -------- ----------- ------------ -------------- --------------------------------
4 Motor ABC #17 aktiv 3 1 120/5000 (2 %) 2026-11-30T14:18:44.000000+01:00
5 Gateway Hall 2 gesperrt 2 0 0/5000 (0 %) -Zustand is aktiv or gesperrt (locked). Unzugeordnet counts the data points without a node. If the fill level cannot be read, loot prints a notice and still shows the list.
loot source show#
Shows a source with its data points and assignments.
loot source show <source>| Argument | Meaning |
|---|---|
<source> | Data source as Tenant/Name or id |
$ loot source show "Brewery/Motor ABC #17"
Datenquelle: Motor ABC #17
Id: 4
Zustand: aktiv
Template: -
Token: …a91f (erzeugt 2026-11-27T10:02:15.000000+01:00)
Puffer: 5000 Werte, Regel DropOldest
Neue Punkte: Client darf anlegen
Rechte: Manage
Datenpunkt Typ Node Umwandlung
----------- ------ ------------------- ----------
Speed Int Speed (118)
Temperature Double Temperature (103)
Vibration Double nicht zugeordnetThe Token line shows only the last characters. In the Umwandlung column a conversion appears if the value type of the point differs from that of its node. A warning for such an assignment is printed below the table.
loot source create#
Creates an external data source. The token appears only now.
loot source create <tenant/name> [--template <template>] [--point <name:type>]… [--buffer-size <values>]
[--overflow <DropOldest|Reject>] [--no-point-creation]| Argument or option | Meaning |
|---|---|
<tenant/name> | Tenant and name of the device, for example Brewery/Motor ABC #17 |
--template <template> | Data source template (id, Tenant/Name or the name of a system-wide one) whose data points the source adopts. A bare name is looked up in the tenant of the source first, then among the system-wide templates. |
--point <name:type> | Further data point, repeatable (format see above) |
--buffer-size <values> | Size of the buffer in values (server default: 5,000) |
--overflow <DropOldest|Reject> | Rule when the buffer is full: DropOldest (default) discards the oldest values, Reject refuses new ones |
--no-point-creation | The client may not create data points. By default a value for an unknown name creates the data point. |
$ loot source create "Brewery/Motor ABC #17" --point Temperature:Double --point Speed:Int --point "Log:compound{message:String,severity:Int}" --buffer-size 10000
Datenquelle 'Motor ABC #17' angelegt (Id 4, 3 Datenpunkt(e), Puffer 10000 Werte, DropOldest).
Token: loot_ds_3b7c0e9a41d85f26a91f
Das Token wird nur jetzt angezeigt; LooT speichert es nicht im Klartext. Geht es verloren, hilft nur 'loot source token'.The token goes to the standard output on a line of its own, the note about it to the error output. Copy the token at once into the configuration of the device. Tokens start with loot_ds_.
loot source delete#
Deletes a source with its data points, buffer and log. The values already stored in the nodes stay.
loot source delete <source>| Argument | Meaning |
|---|---|
<source> | Data source as Tenant/Name or id |
$ loot source delete "Brewery/Gateway Hall 2"
Datenquelle 'Gateway Hall 2' gelöscht (Datenpunkte, Puffer und Protokoll); die Werte an den Nodes bleiben.loot source token#
Renews the token. The old token becomes invalid at once; the new one appears only now.
loot source token <source>| Argument | Meaning |
|---|---|
<source> | Data source as Tenant/Name or id |
$ loot source token "Brewery/Motor ABC #17"
Token der Datenquelle 'Motor ABC #17' erneuert; das alte ist ab sofort ungültig.
Token: loot_ds_91c47d0be2a3586f0c2d
Das Token wird nur jetzt angezeigt; LooT speichert es nicht im Klartext. Geht es verloren, hilft nur 'loot source token'.The device delivers again only after you have entered the new token.
loot source lock#
Locks a source: deliveries are rejected. Values already in the buffer still move on to the nodes.
loot source lock <source>| Argument | Meaning |
|---|---|
<source> | Data source as Tenant/Name or id |
$ loot source lock "Brewery/Gateway Hall 2"
Datenquelle 'Gateway Hall 2' gesperrt; Lieferungen werden abgewiesen, gepufferte Werte gehen weiter an die Nodes.loot source unlock#
Lets a locked source accept deliveries again.
loot source unlock <source>| Argument | Meaning |
|---|---|
<source> | Data source as Tenant/Name or id |
$ loot source unlock "Brewery/Gateway Hall 2"
Datenquelle 'Gateway Hall 2' entsperrt; sie nimmt wieder Werte an.loot source map#
Assigns a data point to a node. Buffered values then go to the node. You need the Write permission on the node.
loot source map <source> <point> <node>| Argument | Meaning |
|---|---|
<source> | Data source as Tenant/Name or id |
<point> | Name of the data point |
<node> | Path of the target node, for example Brewery/Plant.Line1.Vibration |
$ loot source map "Brewery/Motor ABC #17" Vibration Brewery/Plant.Line1.Vibration
Datenpunkt 'Vibration' (Double) → Brewery/Plant.Line1.Vibration (Double).If the value types differ but can be converted, the assignment is made and loot prints a line Warnung: … to the error output; values that cannot be converted are discarded and appear in the log. A data point feeds at most one node.
loot source unmap#
Removes the assignment of a data point. New values then stay in the buffer.
loot source unmap <source> <point>| Argument | Meaning |
|---|---|
<source> | Data source as Tenant/Name or id |
<point> | Name of the data point |
$ loot source unmap "Brewery/Motor ABC #17" Vibration
Zuordnung von 'Vibration' gelöst; neue Werte bleiben im Puffer.loot source point add#
Adds a data point to an external source.
loot source point add <source> <name:type>| Argument | Meaning |
|---|---|
<source> | Data source as Tenant/Name or id |
<name:type> | New data point, for example Speed:Int or Log:compound{message:String,severity:Int} |
$ loot source point add "Brewery/Motor ABC #17" Pressure:Double
Datenpunkt 'Pressure' (Double) zu 'Motor ABC #17' hinzugefügt (Id 17).loot source point remove#
Deletes a data point. Its buffered values are discarded.
loot source point remove <source> <point>| Argument | Meaning |
|---|---|
<source> | Data source as Tenant/Name or id |
<point> | Name of the data point |
$ loot source point remove "Brewery/Motor ABC #17" Pressure
Datenpunkt 'Pressure' aus 'Motor ABC #17' gelöscht; seine gepufferten Werte sind verworfen.loot source buffer#
Shows the fill level of the buffer per data point, or empties it.
loot source buffer <source> [--clear]| Argument or option | Meaning |
|---|---|
<source> | Data source as Tenant/Name or id |
--clear | Empty the buffer. The buffered values are lost. |
$ loot source buffer "Brewery/Motor ABC #17"
Füllstand: 120/5000 (2 %), 118 Einträge, Regel DropOldest
Ältester: 2026-11-30T13:02:10.000000+01:00
Letzter: 2026-11-30T14:18:44.000000+01:00
Verworfen: 0 Werte (DropOldest), abgewiesen 0 (Reject)
Datenpunkt Werte Einträge Ältester Eingang
---------- ----- -------- --------------------------------
Vibration 120 118 2026-11-30T13:02:10.000000+01:00With --clear, loot reports Puffer der Datenquelle '<name>' geleert. Values of data points that are not assigned yet are lost as well.
loot source events#
Shows the log of the source, the newest entry first: overflow, new token, assignments and more.
loot source events <source> [--limit <count>]| Argument or option | Meaning |
|---|---|
<source> | Data source as Tenant/Name or id |
--limit <count> | Maximum number of entries (default 100, at least 1) |
$ loot source events "Brewery/Motor ABC #17" --limit 3
Zeit Art Anzahl Text
-------------------------------- --------------- ------ ----
2026-11-30T14:05:00.000000+01:00 OverflowDropped 35
2026-11-30T09:44:12.000000+01:00 BufferCleared 1
2026-11-27T10:02:15.000000+01:00 TokenRotated 1 Art names the kind of event, for example TokenRotated, OverflowDropped, OverflowRejected, ConversionFailed, BufferCleared, TargetDeleted, TargetInvalid or Deactivated. Overflows and conversion errors are summarized per minute with a count. Without entries loot prints Keine Ereignisse.
loot source send#
Sends a test value to the ingest server with the token of the source. Use it to check a source before the real device delivers.
loot source send <source> <point> <value> --token <token> [--ts <timestamp>]| Argument or option | Meaning |
|---|---|
<source> | Data source as Tenant/Name or id |
<point> | Name of the data point |
<value> | Value that fits the type of the data point: decimal point for numbers, true/false, Base64 for Custom, a JSON object for records, lat;lon[;alt] for Geo. null means: no value. |
--token <token> | Required. Access token of the source (loot_ds_…) |
--ts <timestamp> | Timestamp in ISO 8601. Default: the arrival time at the server. Without an offset the local time applies (with --utc UTC). |
$ loot source send "Brewery/Motor ABC #17" Temperature 71.4 --token loot_ds_3b7c0e9a41d85f26a91f --ts 2026-11-30T14:20:00
Wert angenommen: Motor ABC #17.Temperature = 71.4 (2026-11-30T14:20:00.000000+01:00); er liegt jetzt im Puffer.
Hinweis: Der Datenpunkt ist keinem Node zugeordnet; der Wert bleibt im Puffer, bis eine Zuordnung besteht.To read the value type of the point, loot looks up the source with your own sign-in (loot login), so you need Read on the source in addition to the token. A value that is rejected makes the command end with exit code 1 and the reason. If the buffer is full under the rule Reject, loot tries again after a short pause and reports each attempt. The formats of the values are the same as for loot write.
loot source-template list#
Lists data source templates. Give either a tenant (its own templates and the system-wide ones) or --system (only the system-wide ones).
loot source-template list <tenant>
loot source-template list --system| Argument or option | Meaning |
|---|---|
<tenant> | Name or id of the tenant |
--system | Only the system-wide templates |
$ loot source-template list Brewery
Id Name Gültig Datenpunkte Beschreibung
-- ------- ---------- ----------- ------------------
9 Motor Tenant 3 2 Motor with sensors
2 Gateway systemweit 2 -The tenant's own templates come first. Giving neither a tenant nor --system, or both, ends with exit code 2.
loot source-template show#
Shows a template with its data points.
loot source-template show <template>| Argument | Meaning |
|---|---|
<template> | Template as id, Tenant/Name or name of a system-wide one |
$ loot source-template show Brewery/Motor
Template: Motor
Id: 9
Gültig: Tenant 3
Beschreibung: Motor with sensors
Geändert: 2026-11-25T11:30:00.000000+01:00
Datenpunkt Typ
----------- ------
Speed Int
Temperature Doubleloot source-template create#
Creates a template for many identical devices. A source created from it adopts its data points.
loot source-template create <name> [--point <name:type>]… [--description <text>] [--system]
loot source-template create [<name>] --from-source <source> [--description <text>]| Argument or option | Meaning |
|---|---|
<name> | Tenant/Name of the new template. With --system only the name; with --from-source optional (default: the name of the source). |
--point <name:type> | Data point, repeatable (format see above) |
--description <text> | Description |
--system | Create a system-wide template (system admins only) |
--from-source <source> | Take the data points of this source (Tenant/Name or id). The template arises in the tenant of the source. |
--from-source cannot be combined with --point or --system. Without --from-source the name is required.
$ loot source-template create Brewery/Motor --point Temperature:Double --point Speed:Int --description "Motor with sensors"
Datenquellen-Template 'Motor' angelegt (Tenant 3, Id 9, 2 Datenpunkt(e)).
$ loot source-template create --from-source "Brewery/Motor ABC #17"
Datenquellen-Template 'Motor ABC #17' angelegt (Tenant 3, Id 10, 3 Datenpunkt(e)).loot source-template delete#
Deletes a template. Sources that were created from it keep their data points.
loot source-template delete <template>| Argument | Meaning |
|---|---|
<template> | Template as id, Tenant/Name or name of a system-wide one |
$ loot source-template delete Brewery/Motor
Datenquellen-Template 'Motor' gelöscht; Quellen daraus behalten ihre Datenpunkte.Example: connecting a device#
- Create the source:
loot source create "Brewery/Motor ABC #17" --template Motor. Note the token. - Check it with a test value:
loot source send "Brewery/Motor ABC #17" Temperature 71.4 --token <token>. - Assign the data points:
loot source map "Brewery/Motor ABC #17" Temperature Brewery/Plant.Line1.Temperature. The buffered test value moves on to the node. - Check the fill level and the log:
loot source buffer …andloot source events …. - Enter the token in the device. If you lose it,
loot source token …creates a new one.
Devices that should also accept commands are described in Connections, commands and devices.