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:
- Create a Stevens Point Type.
- For a Stevens rain gauge, it should be named something like: 'Stevens Rain Gauge'
- For a rain gauge point type, Point class should be 'total'
- Units should be determined based on the Stevens API config data (this will vary by sensor)
- Data units, raw digits and scaled digits should be set high enough to accommodate the incoming data!
- Data calibration and data checking can be left default
- Create a Stevens Station Type.
- Name should be something like: 'Stevens Connect Station'
- Protocol should be 'none'
- Create a Stevens Station.
- Station Remote Tag can be correlated to 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 nspollstevensapi to function!
- A description that explains the correlation may be helpful
- 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.
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
Troubleshooting
TODO