NovaStar Program Reference / Data Collection / nspollstevensapi
- Overview
- Command Line Usage
- Examples
- Scheduling
- NovaStar Administrator Interface
- Troubleshooting
- See Also
Overview
The nspollstevensapi
program polls channel data from the Stevens Connect API.
See the Stevens Connect Documentation.
See the Data Collection overview for background on data collection.
Command Line Usage
The command line syntax is:
nspollstevensapi -r relative | absolute [options...]
Optional values are shown in square brackets. Command line parameters are as follows.
nspollstevensapi
Command Line Parameters
Parameter | Description | Default |
---|---|---|
-r relative -r absolute required |
Time range type (absolute or relative). | None - must be specified. |
-startdate YYYY-MM-DD hh:mm:ss |
Start date for absolute time range type (-r absolute ). |
Required if time range is absolute . |
-enddate YYYY-MM-DD hh:mm:ss |
End date for absolute time range type (-r absolute ). |
Required if time range is absolute . |
-minutes # |
Number of minutes to query relative to current time for relative time range type (-r relative ). |
Required if time range is relative . |
-d |
Enable debug output. | |
-version |
Display program version. | |
-help |
Display help. |
Examples
nspollstevensapi -r relative -minutes 1440
nspollstevensapi -r absolute -startdate '2018-06-01 00:00:00' -enddate '2018-06-02 00:00:00' -d
NovaStar Administrator Interface
The following steps are used to add Stevens-Connect data to a NovaStar system:
- Create a Stevens Point Type.
- For a Stevens rain gauge, use a name similar to:
Stevens Rain Gauge
. - For a rain gauge point type, Point class should be
total
. - Units should be determined based on the Stevens API configuration data (this will vary by sensor).
- Data units, raw digits and scaled digits should be set appropriately for the incoming data.
- Data calibration and data checking can be left as the defaults.
- For a Stevens rain gauge, use a name similar to:
- Create a Stevens Station Type.
- The Name should be something like:
Stevens Connect Station
- Protocol should be
none
.
- The Name should be something like:
- Create a Stevens Station.
- Station Remote Tag should match a Stevens ID (if desired).
- Station Type should be
Stevens Connect Station
. - Add points to the station by clicking Add next to the Point List (see #4 below)
- Create Stevens Rain Gauge Points.
- Point Type should be
Stevens Rain Gauge
. - Point Remote ID should be correlated to a Stevens Channel ID for the
nspollstevensapi
program. - Use a description that indicates the NovaStar and Stevens connection.
- Data checking and plot limits can be left as the defaults.
- Point Type should be
Scheduling
This routine is called through a scheduled process using the Scheduler List / Add button.
To prevent data loss confirm that the program parameter for time period matches the interval.
For example:
To run the script every 15 minutes, specify a 15 minute interval in the schedule.
Then, use command parameters -r relative -minutes 15
.
Troubleshooting
See Also
nsautointer
program