Difference between revisions of "Scripts usage"
From PhotoVoltaic Logger new generation
m (→Common parameters) |
m (→Scripts for data saving) |
||
Line 29: | Line 29: | ||
-l, --localtime Use local time, rounded to ? seconds [default:0] | -l, --localtime Use local time, rounded to ? seconds [default:0] | ||
− | + | You can define that the "local" time will be used.<br />You can for example also define, that the timestamp always is rounded to full minute with <code>-l 60</code>. | |
− | You can for example also define, that the timestamp always is rounded to full minute with <code>-l 60</code>. | ||
-s, --save Save data also into log file [flag] | -s, --save Save data also into log file [flag] |
Revision as of 13:34, 5 August 2016
Configuration Template
A configuration template for each script is available in the corresponding dist/
directory.
Parameters
All scripts
These parameters work with all scripts, for writing data to and reading from PVLng API.
-c, --config Config file [default:script.conf]
The default configuration file name depends on the concrete script file name, so for an update.sh
the default configuration file will be update.conf
-t, --test Test mode, set verbosity to info level [flag]
Gather only the data, make required transformations and display what would be send to the API server. Set also verbosity to level 1.
-v, --verbose Verbosity, use multiple times for higher level [flag]
More information, multiple -v
increase up to level 3, which then also makes cUrl calls verbose.
Scripts for data saving
Data gathering scripts can run on different equipments than the API, e.g. on a Raspberry or so.
-l, --localtime Use local time, rounded to ? seconds [default:0]
You can define that the "local" time will be used.
You can for example also define, that the timestamp always is rounded to full minute with -l 60
.
-s, --save Save data also into log file [flag]
Save the data also locally, this is helpful if the connection to the API server is not stable. Missing data can loaded later manually.
Initial test
$ ./script.sh -t # Simple test with default configuration, verbose level 1 $ ./script.sh -tvc config.conf # Test with defined configuration, verbose level 2 $ ./script.sh -tvv # Test with verbose level 3 also shows cUrl details