Capturing Weather Station Data with EQuIS REST API

Introduction

Campbell Scientific designs and manufactures rugged, state-of-the-art measurement systems (e.g., weather stations, data loggers). An EarthSoft client in Australia installed Campbell Scientific weather stations to capture hourly and daily temperature, relative humidity, and precipitation data. Campbell Scientific collaborated with EarthSoft and the client to use the EQuIS REST API (Representational State Transfer Application Programming Interface) to upload weather station data to EQuIS™.

Data Logging

Sensors within the weather station are programmed to monitor the parameters of interest and log the relevant data (e.g., hourly average, daily total). Each data record is a series of data fields, logged with a particular timestamp, representing the values of the desired parameters over the recent period of interest. The timestamp is based on the time zone and real time clock that has been set in the data logger. The Campbell Scientific data logger has capacity to provide a few years of on-site data storage.

Cemex logo

Site Data Collection

 

 

Average and Maximum Air Temperature for each hour

Total Rainfall
for each hour

Average Relative Humidity
for
each hour

Using EQuIS REST API

For the weather station data to be inserted into the client EQuIS Online (EOL) database via the EQuIS REST API, each data point must be matched with a timestamp in the appropriate format and to a logger series ID. EarthSoft and our client provided Campbell Scientific with an API Token for the client EOL database to access the appropriate database tables as well as the logger series ID values for each of the data fields in the database tables. Campbell Scientific then programmed routines in the data logger to be able to retrieve a relevant record (immediately after it had been logged) and work through each element one at a time, creating the timestamp and linking it with the appropriate logger series ID, and then interacting with the EQuIS REST API to automatically upload the record into EQuIS.

The HTTP response from the server was also parsed. This allows the logger to keep track of whether the API call was successful or not, and to identify when, (if ever) data failed to be delivered for any reason.

Benefits

Using Campbell Scientific weather stations with automated data uploads to EQuIS improves data collection efficiency and provides additional insight for project/facility decision making.

 

Want to learn more about EQuIS?