ezvpn-csv-writer is a pre-configured container docker for the IOhubTM environment.
ezvpn-csv-writer creates a CVS file within the EZ Box file system that contains the measurement name, its value and its timestamp. From configuration you can define the file size and retention.
The CSV file can be downloaded by connecting to the EZ Box, for example using filebrowser container.
How to use it
You can use
ezvpn-csv-writer directly in IOhubTM for final production, or on your PC for testing purposes.
The Docker image is provided as follows, with the description of each environment variable used by the container.
If used with
ezvpn-mqtt, no environment variable needs to be provided.
ezvpn-csv-writer does a subscribe on an MQTT topic and writes the content in a CVS file defined in the container Environment variable
If you do not define a Volume, the CSV file created will not have persistence and will not be readable externally. In order to read it you will need to mount a Global Volume or an Application Volume to have persistence and to be able to read it. For example, to read the CSV file you can use the filebrowser container. For more informations on "Volumes", please visit this section.
Make sure that the
CSV_PATH and the path to the mounted Volume are the same otherwise the CSV files will not be visible. Remember to use a "Global Volume" or an "Application Volume".
The data stored on CSV file is on format below:
value: The measurement value
ts: UNIX timestamp
protocol: The measurement protocol
measurement: The measurement name
When you start the
ezvpn-csv-writer container, you can adjust the instance's configuration by passing one or more environment variables to the
docker run command.
MQTT_HOST: MQTT host. Defaults to
MQTT_PORT: MQTT port. Defaults to
MQTT_IN_TOPIC: MQTT topics to subscribe. Default to
fld/+/r/#. Subscribe to multiple topics can be obtained defining each topic on a separated line.
CSV_PATH: File path of CSV file to be populated with MQTT incoming messages. Defaults to
CSV_MAX_SIZE: Max size for CSV. Units of measures are k (kilobyte), m (megabyte), g(gigabyte). Defaults to
CSV_MAX_ROTATE: Max number of rotated CSV files. Defaults to
CSV_CHECK_FREQ: Interval in minutes between each log size check. Defaults to
Docker container details
MQTT_IN_TOPICaccepts multiple topics
- First Release