Skip to main content

CSV Transformer

Turns each received message into values by splitting its text at spaces, tabs and commas. Field n becomes the value csv_n, counting from csv_0. Each field is typed automatically: integer, then float, then true / false (any case) as a boolean, otherwise a string. The values appear on the values page, can be plotted on a dashboard, and can be read in Lua with message:get_value("csv_0").

Pair it with a codec that delivers one record per message. Usually that is Line, for a device that prints one line per sample, such as 23.5,61.2,1013.

Things to know:

  • Consecutive separators count as one, so an empty field leaves no gap: in 1,,3 the 3 becomes csv_1. Keep every field filled if column positions matter.
  • There is no header handling. A header line turns into string values with the same csv_n names.
  • The transformer only runs on messages that have no values yet. When the codec already decodes values (Modbus, Structured Frame, …), it does nothing.
  • Payloads that are not valid UTF-8 get no values.

Configuration reference​

Config IDcsv_transformer
Selected byapp_transformer = "csv_transformer"
PlatformsLinux, Windows, Android
LicenseFree

Parses space/tab/comma-separated values with auto type detection (Int64, Float64, Boolean, String). Values are named csv_0, csv_1, etc.

This transformer has no settings of its own.

Example config​

Default values as they appear in a saved configuration (for example the JSON block at the end of a cycbox/examples/*.lua file). Settings detected at runtime are omitted.

{
"app": {
"app_transformer": "csv_transformer"
}
}