NovaStar Program Reference / Data Collection / nspollstevensapi


Overview

The nspollstevensapi program polls channel data from the Stevens Connect API
See Stevens Connect Documentation

Command Line Usage

The command line syntax is:

nspollstevensapi -r 'relative'|'absolute' [options...]

Command line parameters are:

Parameter Description Required?
-r Time range type (absolute or relative) Yes.
-startdate Start date for absolute time range type (YYYY-MM-DD HH:MM::SS) Yes, if time range absolute.
-enddate End date for absolute time range type (YYYY-MM-DD HH:MM::SS) Yes, if time range absolute.
-minutes # of minutes to query for relative time range type Yes, if time range relative.
-d Enable debug output. No.
-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

These steps must be taken to add Stevens-Connect data to a NovaStar System:

  1. Create a Stevens Point Type.
    1. For a Stevens rain gauge, it should be named something like: '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 config data (this will vary by sensor)
    4. Data units, raw digits and scaled digits should be set high enough to accommodate the incoming data!
    5. Data calibration and data checking can be left default
  2. Create a Stevens Station Type.
    1. Name should be something like: 'Stevens Connect Station'
    2. Protocol should be 'none'
  3. Create a Stevens Station.
    1. Station Remote Tag can be correlated to 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 nspollstevensapi to function!
    3. A description that explains the correlation may be helpful
    4. Data checking and plot limits can be left default

Scheduling

This routine is called through a scheduled process. You can add it to your Schedule via the Scheduler List -> Add button.

Stevens Scheduler Entry

To prevent data loss when you set up the Scheduler entry, you should ensure that your program argument for time period matches the interval that you set.!

For example:
I want to run the stevens script every 15 minutes, so i will specify in the scheduler a 15 minute interval.
Then, in the command, i will add arguments for -r relative -minutes 15

Stevens Scheduler Arguments

Troubleshooting

TODO