Value export on the command line
Export the values of a node and its children as CSV or NDJSON for other tools, with aggregation, unit conversion, streams and password protection, and follow or cancel running exports.
Overview#
A value export hands the values of a node (and of the nodes below it) over to other tools such as spreadsheets, pandas, R or a data pipeline: as a CSV or NDJSON file with one row per value. It is not a backup. To back up and restore whole subtrees with structure, permissions and settings, use Exchange. The same function exists in the workbench, see Value export; the file format and the limits are described there as well.
The export runs on the server as a job. loot values export creates the job, waits for it with a progress display and saves the result. If you do not want to wait, start it with --no-wait and fetch it later with loot values export-show.
| Command | Purpose |
|---|---|
loot values export | Create an export, wait and save the result |
loot values export-show | Show the state of an export and download the finished result |
loot values export-cancel | Cancel an export |
The group loot values itself has no function; loot values --help lists the three commands. Who may read a node may also export it; nodes you may not read are missing from the export and are not counted. The job belongs to its creator: only you (and system admins) see its state and result.
loot values export#
Exports the values of a node and its children for a time range.
loot values export <path> --from <time> --to <time>
[--include <path>]… [--exclude <path>]… [--include-linked]
[--format <csv|ndjson>] [--bucket <width> --functions <list>] [--unit <unit>]
[--streams]
[--password-prompt | --password-file <file> | --password-env <variable>]
[-o <file> | --folder <folder>] [--no-wait] [--json]The <path> is the node the export starts from, for example Brewery/Plant. All nodes with a time series in its subtree are exported (the node itself too), unless you restrict the selection.
| Argument or option | Meaning |
|---|---|
<path> | Node from which to export, for example Brewery/Plant |
--from <time> | Required. Start of the range (inclusive), ISO 8601. Without an offset the input counts as local time, with --utc as UTC. |
--to <time> | Required. End of the range (exclusive), like --from. It must lie after --from. |
--include <path> | Export only this node together with its descendants. Repeatable. Default: all nodes in the subtree. |
--exclude <path> | Leave out this node together with its descendants. Repeatable. An exclusion wins over an inclusion. |
--include-linked | Also exports nodes outside the subtree that links of the selected nodes point to (under their own path). Default: off. |
--format <csv|ndjson> | File format: csv (default) or ndjson |
--bucket <width> | Aggregation instead of raw values: window width such as 5m, 1h or PT5M. Needs --functions. |
--functions <list> | Functions of the aggregation, separated by commas: min, max, avg, count, first, last, sum. Needs --bucket. |
--unit <unit> | Target unit of the conversion, for example K or °F. Only numeric values are converted, and only nodes with a matching physical quantity; the others keep their unit. |
--streams | Takes the sessions of stream nodes along as files in the folder streams/. The result is then a ZIP. Not together with --bucket. |
--password-prompt | Protects the result as a ZIP with AES-256; the password is asked for on the terminal |
--password-file <file> | Password from the first line of this file (result as ZIP with AES-256) |
--password-env <variable> | Password from this environment variable (result as ZIP with AES-256) |
-o, --output <file> | Saves the result to this file. Default: the name the server gives the file (node name and time, for example Plant_20261130T132000.csv), in the current directory. |
--folder <folder> | Unpacks the result into this folder (created if needed): a ZIP is unpacked, a single file is placed there together with its manifest.json. Practical for scripts. Not together with -o and not with a password. |
--no-wait | Prints only the number of the export; does not wait and downloads nothing |
--json | Prints the final state of the export as JSON instead of text |
The password is never a command-line argument, because it would appear in the process list and the shell history. Give at most one of the three sources; it needs at least 8 characters. LooT does not store the password: if you lose it, nobody can open the result. The AES-256 ZIP opens with 7-Zip, Keka or Python (pyzipper), but not with Windows Explorer or the unzip of many systems.
A simple export of a month to a file:
$ loot values export "Brewery/Plant" --from 2026-11-01 --to 2026-12-01 -o plant-november.csv
Export 31 gestartet: 14 Nodes von 'Brewery/Plant'.
Export 31: Läuft (reading): 5/14 Nodes, 410220 Zeilen, 21.3 MiB
Export 31: Läuft (reading): 12/14 Nodes, 905114 Zeilen, 47.8 MiB
Ergebnis gespeichert: /home/alice/plant-november.csv (52.6 MiB).loot prints a line whenever the progress changes. Ctrl+C cancels the export on the server and discards the partial result. The file has one row per value:
timestamp,node_path,node_id,value_type,value,unit
2026-11-01T00:00:00.000000Z,Brewery/Plant.Line1.Temperature,103,Double,78.4,°C
2026-11-01T00:00:01.000000Z,Brewery/Plant.Line1.Temperature,103,Double,78.6,°CTimestamps in the file are always UTC, regardless of --utc.
Selecting nodes#
Only the temperature and the pressure of line 1, without the rest:
$ loot values export "Brewery/Plant" --from 2026-11-01 --to 2026-12-01 --include "Brewery/Plant.Line1.Temperature" --include "Brewery/Plant.Line1.Pressure" -o line1.csvThe whole plant without the noisy vibration sensors:
$ loot values export "Brewery/Plant" --from 2026-11-01 --to 2026-12-01 --exclude "Brewery/Plant.Line1.Vibration" -o plant.csvThe fields of a compound node belong to their compound and cannot be selected individually. A selection without any node with values ends with the message Die Auswahl enthält keinen Node mit Werten.
Aggregation and units#
For long ranges you export aggregates instead of raw values. --bucket and --functions always belong together; the file then has the columns bucket_start,node_path,node_id,value_type,unit plus one column per function:
$ loot values export "Brewery/Plant.Line1" --from 2026-11-01 --to 2026-12-01 --bucket 1h --functions avg,min,max --unit K -o line1-hourly.csv
Export 32 gestartet: 2 Nodes von 'Brewery/Plant.Line1'.
Ergebnis gespeichert: /home/alice/line1-hourly.csv (1.2 MiB).Some functions are not possible for every value type (text and bool values allow only count, first and last); affected cells stay empty and the manifest.json notes it. Compound and stream nodes have no aggregates and are absent with a note.
Streams and password protection#
Audio and video sessions are only included with --streams. The result is then a ZIP with the data file, manifest.json and the folder streams/. With --folder, loot unpacks it for you:
$ loot values export "Brewery/Plant.Line1.Microphone" --from 2026-11-30T08:00 --to 2026-11-30T09:00 --streams --folder ./recording
Export 33 gestartet: 1 Nodes von 'Brewery/Plant.Line1.Microphone'.
Ergebnis ausgepackt in: /home/alice/recordingWith a password, the result is an encrypted ZIP that you save with -o; --folder is not possible then:
$ loot values export "Brewery/Plant" --from 2026-11-01 --to 2026-12-01 --password-prompt -o plant-secret.zip
Passwort für das Ergebnis:
Export 34 gestartet: 14 Nodes von 'Brewery/Plant'.
Ergebnis gespeichert: /home/alice/plant-secret.zip (49.1 MiB).In scripts, the password comes from a file or from the environment, for example --password-env EXPORT_PASSWORD.
Start now, fetch later#
With --no-wait, loot only prints the number of the export. Together with --json, it prints the job as JSON, which scripts can parse:
$ loot values export "Brewery/Plant" --from 2026-11-01 --to 2026-12-01 --no-wait
Export 35 gestartet: 14 Nodes von 'Brewery/Plant'.
Stand abfragen: loot values export-show 35Without --no-wait, --json prints the final state of the finished job as JSON after the download, instead of the text lines. Exit code 1 means the export failed, was cancelled or could not be saved; exit code 2 a wrong invocation, for example a missing --bucket for --functions, a combination of -o and --folder, or an empty range.
loot values export-show#
Shows the state of an export and, if it is finished, downloads the result.
loot values export-show <id> [-o <file> | --folder <folder>]| Argument or option | Meaning |
|---|---|
<id> | Number of the export (printed by loot values export) |
-o, --output <file> | Downloads the finished result to this file. Without -o and --folder, only the state is shown. |
--folder <folder> | Downloads the finished result and unpacks it into this folder (not for password-protected exports) |
-o and --folder exclude each other. The command has no --json.
$ loot values export-show 35
Export 35: Fertig
Ergebnis: Plant_20261130T132000.csv (52.6 MiB), abrufbar bis 2026-12-01T14:20:00.000000+01:00The states are Wartet (queued, waiting for a free slot), Läuft (running, with the number of finished nodes, rows and bytes), Fertig (completed), Fehlgeschlagen (failed, with a line Meldung: …) and Abgebrochen (cancelled). A finished result stays available for a limited time (24 hours by default); abrufbar bis names the end.
$ loot values export-show 35 -o plant-november.csv
Export 35: Fertig
Ergebnis: Plant_20261130T132000.csv (52.6 MiB), abrufbar bis 2026-12-01T14:20:00.000000+01:00
Ergebnis gespeichert: /home/alice/plant-november.csv (52.6 MiB).If the export is not finished yet, -o and --folder end with the message Der Export ist nicht fertig; es gibt noch nichts zu laden. and exit code 1.
loot values export-cancel#
Cancels a waiting or running export. The partial result is discarded.
loot values export-cancel <id>| Argument | Meaning |
|---|---|
<id> | Number of the export |
$ loot values export-cancel 36
Export 36: Abgebrochen