Difference between revisions of "Scripts usage"
From PhotoVoltaic Logger new generation
(Created page with "Category:Scripts == Data gathering scripts == Mostly all scripts that gather data from equipments to store into PVLng support these parameters: usage: ./script.sh [opti...") |
m |
||
Line 1: | Line 1: | ||
[[Category:Scripts]] | [[Category:Scripts]] | ||
+ | == Configuration Template == | ||
+ | |||
+ | A configuration template for each script is available in the corresponding <code>dist/</code> directory. | ||
+ | |||
== Data gathering scripts == | == Data gathering scripts == | ||
− | Mostly all scripts that gather data from equipments to store into PVLng support | + | Mostly all scripts that gather data from equipments to store into PVLng support the following parameters. |
+ | |||
+ | -c, --config Config file [default:script.conf] | ||
+ | |||
+ | The default configuration file file depends on the concrete script file name, so for an <code>update.sh</code> the default configuration file is <code>update.conf</code> | ||
+ | |||
+ | -l, --localtime Use local time, rounded to ? seconds [default:0] | ||
+ | |||
+ | If you gather the data with external hardware (e.g. a Raspberry), you can define that the "lokal" time will be used. | ||
+ | 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] | ||
+ | |||
+ | This is helpful, if the connection to the API server is not stable. This help to load missing data later. | ||
+ | |||
+ | -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 <code>-v</code> increase up to level 3 | ||
+ | |||
+ | == Data readout scripts == | ||
+ | |||
+ | |||
+ | == 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 | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 11:45, 5 August 2016
Configuration Template
A configuration template for each script is available in the corresponding dist/
directory.
Data gathering scripts
Mostly all scripts that gather data from equipments to store into PVLng support the following parameters.
-c, --config Config file [default:script.conf]
The default configuration file file depends on the concrete script file name, so for an update.sh
the default configuration file is update.conf
-l, --localtime Use local time, rounded to ? seconds [default:0]
If you gather the data with external hardware (e.g. a Raspberry), you can define that the "lokal" 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]
This is helpful, if the connection to the API server is not stable. This help to load missing data later.
-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
Data readout scripts
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