Skip to content

NovaStar Program Reference / Data Collection / nspollstevensapi


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:

  1. Create a Stevens Point Type.
    1. For a Stevens rain gauge, use a name similar to: Stevens Rain Gauge.
    2. For a rain gauge point type, Point class should be total.
    3. Units should be determined based on the Stevens API configuration data (this will vary by sensor).
    4. Data units, raw digits and scaled digits should be set appropriately for the incoming data.
    5. Data calibration and data checking can be left as the defaults.
  2. Create a Stevens Station Type.
    1. The Name should be something like: Stevens Connect Station
    2. Protocol should be none.
  3. Create a Stevens Station.
    1. Station Remote Tag should match a Stevens ID (if desired).
    2. Station Type should be Stevens Connect Station.
    3. Add points to the station by clicking Add next to the Point List (see #4 below)
  4. Create Stevens Rain Gauge Points.
    1. Point Type should be Stevens Rain Gauge.
    2. Point Remote ID should be correlated to a Stevens Channel ID for the nspollstevensapi program.
    3. Use a description that indicates the NovaStar and Stevens connection.
    4. Data checking and plot limits can be left as the defaults.

Scheduling

This routine is called through a scheduled process using the Scheduler List / Add button.

Stevens Scheduler Entry

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.

Stevens Scheduler Arguments

Troubleshooting

See Also