-
Notifications
You must be signed in to change notification settings - Fork 1
Module thc_Csv
This module provides functions to log device states in the CSV format in a file.
Creates or opens an CSV data file. If the file exists already the new logging data will be will be appended to the file. This works also if devices are added or removed. If the devices to are not explicitly specified with the '-devices' option, the states of all devices are logged.
Parameters | Description |
---|---|
-file <CsvFile> | The name of the CSV data file to open or to create |
[-min_interval <MinInterval>] | Minimal interval in seconds in which the data are logged into the CSV data file. The thc::Csv::Log command will be ignored if it is called in a shorter interval than the specified minimum interval. |
[-devices <DeviceList>] | List of devices to log. By default all devices are logged. |
-
The following example opens or creates an CSV data file that logs the states of all devices in a minimum interval of 5 minutes :
thc::Csv::Open -file /var/thc/thc.csv -min_interval 300
Logs the devices states. The states of all declared devices is written to the opened CSV data file.
For devices that have a sticky state, this sticky state is written instead of the instantaneous state. The sticky states has usually to be cleared with thc::ResetStickyStates after having logged them by thc::Csv::Log.
-
thc::Csv::Log; ResetStickyStates
THC, Tight Home Control - See THC index register - THC repository on github.com/Drolla/thc