HTTP Data Logging Protocol



Similar documents
Estação Meteorológica sem fio VEC-STA-003

Reference Guide. Vantage PRO2 Quick

BS1000 command and backlog protocol

For more detailed information, see your Vantage Vue Console manual.

PROFESSIONAL WEATHER STATION (WIND AND AIR PRESSURE) Operation Manual

WeatherLink for Alarm Output. Introduction. Hardware Installation and Requirements. Addendum

Technical Note A007 Modbus Gateway Vantage Pro2 25/09/2009 Rev. A 1 de 7

EXPLANATION OF WEATHER ELEMENTS AND VARIABLES FOR THE DAVIS VANTAGE PRO 2 MIDSTREAM WEATHER STATION

USER MANUAL INTRODUCTION CONTENTS PACKAGING CONTENTS BASE STATION WIND SENSOR TEMPERATURE & HUMIDITY SENSOR

Standard for Communication in Between VINTERMAN and Road Clearing Equipment

Setup of an internet enabled Davis Vantage Pro2 weather station using a Raspberry Pi Zeist Hoge Dennen October 2014

SpecWare Professional. Advanced Features User s Guide

TOUCH SCREEN WEATHER STATION (WIND AND AIR PRESSURE) WH-1080PC. Operation Manual

Domoticz. Open Source Home Automation System. Manual date: March Author: Robbert E. Peters

1000 Series Data Loggers PRODUCT MANUAL

User manual BS1000 LAN base station

SageCRM 6.1. Wireless Mobile Guide

Iotivity Programmer s Guide Soft Sensor Manager for Android

CABLE FREE TM WEATHER STATION

HTTP REST Interface AnySenseConnect Version 3

VIRTUAL LABORATORY: MULTI-STYLE CODE EDITOR

Internet Technologies. World Wide Web (WWW) Proxy Server Network Address Translator (NAT)

WIRIS quizzes web services Getting started with PHP and Java

SMS GSM Alarm Messenger

Autos Limited Ghana Vehicle Tracking Business Proposal

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP Abstract Message Format. The Client/Server model is used:

MXSAVE XMLRPC Web Service Guide. Last Revision: 6/14/2012

OPUS WIRELESS WEATHER STATION Instructions Manual Cat. Nr IT

WS1093 PROFESSIONAL WIRELESS WEATHER STATION WITH TOUCHSCREEN AND USB UPLOAD

Online signature API. Terms used in this document. The API in brief. Version 0.20,

Process Control and Automation using Modbus Protocol

Semaphore T BOX Applications in Data Center Facilities

06MAR THU 12: User Manual

PROFESSIONAL WEATHER CENTER WS-1510-IT Instruction Manual. PROFESSIONAL WEATHER CENTER WS-1510-IT Instruction Manual. Table of Contents FEATURES:

USER MANUAL. Console. For Vantage Pro2 and Vantage Pro2 Plus

WEB log. Device connection plans

StreamLink 5.0. StreamLink Configuration XML Reference. November 2009 C O N F I D E N T I A L

TOP Server DNP 3.0 Suite. Background & Best Practices

FF/EDM Intro Industry Goals/ Purpose Related GISB Standards (Common Codes, IETF) Definitions d 4 d 13 Principles p 6 p 13 p 14 Standards s 16 s 25

NortechCommander Software Operating Manual MAN R6

STORAGE SYSTEM DATALOGGER DATABASE

Premium Server Client Software

Z-Wave Gas Reader. Product Manual NQ-9121-EU. From your Z-wave network directly to the cloud! DESCRIPTION

Different Ways of Connecting to. 3DLevelScanner II. A.P.M Automation Solutions LTD. Version 3.0

Operation Manual Professional Remote Weather Station

FAMILY WEATHER STATION Instruction Manual

Bob's Place Media Engineering's ISY Insteon Plug-in User Guide Version 4.0

Network setup and troubleshooting

How will the transition to the new Adobe Forums be handled?

Oracle Forms Services Secure Web.Show_Document() calls to Oracle Reports

3465 Diablo Avenue, Hayward, CA U.S.A Fax:

The Answer to the 14 Most Frequently Asked Modbus Questions

Integrating Digiquartz MET3 and MET3A Broadband Meteorological Systems with Leica GX1200 Series GPS Receivers

Ultimate Server Client Software

Technical Information POWER PLANT CONTROLLER

MONETA.Assistant API Reference

Portals and Hosted Files

vcloud Air Platform Programmer's Guide

Indoor / Outdoor Antenna

SETTING UP A WEATHER DATA WEB PAGE Application Note 26

Fachgebiet Technische Informatik, Joachim Zumbrägel

Configuring System Message Logging

ANNEXURE - I. Back-office Interfaces

5.1 Features Denver CO 80202

Manual. IP Sensor and Watchdog IPSW2210. I P S W M a n u a l P a g e 1. Relay Output. Power input. 12VDC adapter LED Indicators. 2 Dry.

PROMIS Tutorial ASCII Data Collection System

USING THE XPERT2 / 9210B ON A TCP/IP NETWORK

Temperature Alert. LAN-based Temperature and Humidity Data Logger

Wireless Data Logger Monitoring Systems

Web Portal Step by Step

Integrating VOLTTRON and GridLAB-D to create a Power Hardware-in-the-Loop Test Bed. Ricardo Rangel

User Manual Weather station V 0.2

PART 1 CONFIGURATION 1.1 Installing Dashboard Software Dashboardxxx.exe Administration Rights Prerequisite Wizard

S4000TH HART. HART Communication Manual

Weather Station Digital Display User s Manual. Version 1.5

Weather Capture Software Guide Version 1.4 Revision: June

CERTIFIED MULESOFT DEVELOPER EXAM. Preparation Guide

Ultra-precision Professional Weather System USER MANUAL. INTRODUCTION Model: WMR300 / WMR300A CONTENTS PACKAGING CONTENTS DISPLAY UNIT

The Anatomy of a Forecast

Vehicle data acquisition using CAN By Henning Olsson, OptimumG

MS ACCESS DATABASE DATA TYPES

Safeguard Ecommerce Integration / API

GPS Vehicle and personal location tracker. User manual

Wind Plant Operator Data Guide

S/W MEDALS NV Version 2 Installation Guide

WISE-4000 Series. WISE IoT Wireless I/O Modules

API Reference Guide. API Version 1. Copyright Platfora 2016

Component Based Rapid OPC Application Development Platform

PLCM-T1 / PLCM-T2 Torch height controller

Monitoring Your Network

LATITUDE Patient Management System

THE CHALLENGE OF ADMINISTERING WEBSITES OR APPLICATIONS THAT REQUIRE 24/7 ACCESSIBILITY

Ubiquitous Wireless Sensor Networks for Environmental and Climate Data Management System

Please read the operating instructions carefully to familiarize yourself with the features and modes of operation before using the instrument.

Google Calendar 3 Version 0.8 and 0.9 Installation and User Guide. Preliminary Setup

USB-500 Series Stand-Alone, Low-Cost Data Loggers

IP - The Internet Protocol

Transcription:

HTTP Data Logging Protocol Version 1.5 (introduced with Meteohub 4.9) 1. Mission Statement The mission of this document is to provide a protocol specification that allows to handover weather data logged by Meteohub to WD and other PC weather programs. The underlying transport layer should be TCP/IP as this allows to connect the data logger from anywhere in the world as long as logger and PC program do have Internet access. The logger should be able to provide live data and also archived data on request. The protocol should be able to handle all types of sensors of current weather stations. 2. Basic Assumptions Communication should be realized as HTTP requests (GET and POST flavor should be supported). This has severe advantages compared to other TCP/IP-based protocols: going through firewalls is very easy and widely supported HTTP is supported on all known platforms, in all programming languages and development environments the logger can be easily tested by simple browser requests request/receive transactional logic behind HTTP requests fits the purpose The logger should provide two separate modes. "INFO" mode for information about connected sensors, station data, etc. "DATA" mode for retrieving logged data for a defined time frame or most recent data on all sensors The logger should reply data wrapped as TEXT/PLAIN in one of two types (the requesting program decides on the type) flat text, line-based (each response is terminated by a line feed). XML (enclosed by a "<logger>... </logger>" tag) By setting URL parameter "quotes" to "1" a strict XML format will be generated, with all values in quotes and "/>" as closing bracket. This change has not been generally applied, because WD will no longer be feedable using this strict format.

3. Defined Generic Sensors Meteohub supports a broad range and number of sensors. Regardless what weather station is connected Meteohub represents the sensor data by a set of defined sensor types. A specific sensor corresponds to one of the defined sensor types and is characterized by an unique ID that is composed from the type name and a number. Most sensor types can have 20 specific sensors (0...19) the thermo, thermo-hygro and data type support up to 40 sensors (0...39). Sensor type Sensor ID Values Comment THB: thermo-hygro-baro thb0, thb1,..., thb19 1. temperature [ C] 2. humidity [%] 3. dew point in [ C] 4. station pressure [hpa} 5. sealevel pressure [hpa] 6. simple forecast [num 1 ] TH: thermo-hygro th0, th1,..., th39 1. temperature in C 2. humidity in % 3. dew point in C this is mostly an indoor sensor, often directly integrated into the weather station. Normally just one sensor available, named thb0. Humidity and forecast are integer, other values have 1 decimal th0 is the standard outdoor sensors, other sensors can be outdoor or indoor, 1 decimal T: thermo t0, t1,..., t39 1. temperature in C pure temperature sensor without humidity information, 1 decimal WIND: wind wind0, wind1,..., wind19 1. direction 2 [ ] 2. gust speed [m/s] 3. aver. wind speed [m/s] 4. wind chill 3 [ C] RAIN: rain rain0, rain1,..., rain19 1. rain rate [mm/h] 2. rain fall total [mm] 3. delta rain fall [mm] since last request 4 UV: uv index uv0, uv1,..., uv19 1. uv index [uvi] 1 decimal SOL: solar radiation sol0, sol1,..., sol19 1. radiation [W/m 2 ] no decimals direction is integer, other values have 1 decimal total rain is counted since beginning of sensor's recording, 1 decimal DATA: numerical values data0, data1,..., data39 1. numerical value any value, 2 decimals Examples "thb0 22.5 55 5.2 1004.7 1007.9 3" indicates that indoor temp in 22.5 C, 55% relative humidity, dew point at 5.2 C, pressure at station level is 1004.7 hpa, pressure computed to sea level is 1007.9 hpa, forecast is: sunny "wind0 45 5.3 3.1 7.3" states that wind is blowing from NE (45 ), with gust speed 5.4 m/s, average wind speed 3.1 m/s, wind chill is 7.3 C (measured against temperature reading of th0) "rain0 1.5 4536.0" states that we have rain at a rate of 1.5 mm per hour, total rain fall measured so far by the sensor is 4536 mm. Values in mm are equivalent to liter per m 2. 1 num is a number that represents a very basic forecast: 0 = rainy, 1 = cloudy, 2 = some clouds, 3 = sunny, 4 = snowy, 5 = clouds at night, 6 = clear night 2 0 = North, 90 = East, 180 = South, 270 = West 3 based on temperature reading of th0 4 delta gets only reported in requests without start/end time stamp. delta gives amount of rain since last request 2

4. Commands to be supported by the Logger The data logger acts on HTTP requests. parameters can be given as URL parameters (GET mode) or by a transferred data record with name-value pairs (POST mode). The PC weather program has freedom to choose. 4.1 INFO Requests These requests as for general information about the connected station, location on earth, timezone, and available sensors. Request Parameter Flat Text Response XML Response Comment type=xml none, flat text responses will separated by line feeds none, XML resonses will be enclosed in "<logger>... </logger>" tags. quotes=1 none none, will use strict XML syntax for output with all values in quotes and "/>" as closing tag bracket. this switches to XML response mode. Without this parameter plain text will be reported. introduced to allow for strict XML parsing, not generally applied to keep compatibility to WD feed definition. mode=info none none tells the logger that this is an "info request" info=station WMR-928 WMR-100 WMR-200 TE-923 VANTAGE RFXCOM <station>wmr-928</station> <station>wmr-100</station> <station>wmr-200</station> <station>te-923</station> <station>vantage</station> <station>rfxcom</station> info=version Meteohub x.x <version>meteohub x.x </version> info=utcdate YYYYMMDDHHMMSS <utcdate year="yyyy" month="mm" day="dd" hour="hh" minute="mm" second="ss"> YYYYMMDDHHMMSS </utcdate> info=localdate YYYYMMDDHHMMSS <localdate year="yyyy" month="mm" day="dd" hour="hh" minute="mm" second="ss"> YYYYMMDDHHMMSS </localdate> info=latitude DEG,MIN,SEC,HEMI <latitude degree="deg" minute="min" second="sec" hemisphere="hemi">deg, MIN,SEC,HEMI</latitude> info=longitude DEB,MIN,SEC,MERID <longitude degree="deg" connected weather station used version of Meteohub date/time in UTC date/time in local time hemisphere can be "N" (north) or "S" (south) meridian can be "E" (east) or "W" (west) 3

Request Parameter Flat Text Response XML Response Comment minute="min" second="sec" meridian="merid">deg, MIN,SEC,Merid</longitude> info=altitude ALT <altitude>alt</altitude> altitude above sea level in meters info=sensorids info=sensortypes info=sensornames SENS1,SENS2,...,SEN Sn SENSTYPE1,SENSTY PE2,...,SENSTYPEn SENSNAME1,SENSNA ME2,...,SENSNAMEn <sensor id="sens1" type="senstype1"> SENSNAME1 </sensor>... no separate tag, included in "sensor" no separate tag, included in "sensor" "SENSx" is sensor ID (see Section 3. "SENSTYPEx" is sensor type (see ) SENSNAMEx is a speaking nick name the user has given the sensor inside Meteohub. see above sea above Examples Request: "http://.../meteolog.cgi? type=xml&quotes=1&mode=info&info=station&info=utcdate&info=sensorids" <logger> <station>wmr-928</station> <utcdate year="2008" month="2" day="27" hour="18" minute="35" second="9">20080227183509</utcdate> <sensor id="thb0" type="thb">indoor (living room)</sensor> <sensor id="th0" type="th">outdoor (car port)</sensor> <sensor id="wind0" type="wind">wind</sensor> <sensor id="rain0" type="rain">rain (backyard)</sensor> <sensor id="uv0" type="uv">uv sensor</sensor> </logger> Request: "http://.../meteolog.cgi? mode=info&info=station&info=utcdate&info=sensorids&info=sensortypes& info=sensornames" WMR-928 20080227183509 thb0,th0,wind0,rain0,uv0 THB,TH,WIND,RAIN,UV indoor (living room),outdoor (car port),wind,rain (backyard),uv sensor 4

4.2 DATA Requests Data requests ask the logger to report all data records that have a time stamp between boundaries given by a start and end time stamp. This allows retrieval of data from specified time frames in the past as well as reading the most actual data in a live mode. To realize an ongoing incremental reading of actual sensor data, the following flow of control should be realized by the PC program. Incremental read can be easily realized by taking the date stamp of the last received record as start parameter for the next request. This incremental approach allows the logger to optimize its performance by keeping in mind where delivery of data to the PC program has stopped. Having this information cached improves performance of incremental data delivery dramatically. On the other hand it is very easy for the PC program to ask for next data records by using the the last received time stamp as the start value for the next request. The flow of control for ongoing reading of live date can be like this: 1. PC requests the last logged weather data record ("mode=data", no start/end parameter). 2. Logger returns last values of all logged weather data sensors. Notice newest time stamp received by this request (time stamp has format: "YYYYMMDDHHMMSS"). 3. PC evaluates received data. After having done this PC might wait a few seconds and then asks the logger to report data with a newer time stamp than the newest data just received. As the logger doesn't remember time stamps of delivered data the PC program includes the time stamp of the last received data into the request and leaves end time stamp empty. ("mode=data&start=yyyymmddhhmmss"). 4. Logger returns all data records newer than the given time stamp. If it is more than 100 records, just the oldest 500 5 are reported. If there is no data available past the given time stamp, an empty response is returned. Continue at step 3. As an alternative you can also just send a request without start/end parameter every couple of minutes. Disadvantage of this method is that you get duplicated data that has not updated since last request and that you will not get notice of data that has changed more than once since last request. This approach to read the data logger is less accurate (duplicates, data losses) and by it's need for fast polling it adds stress to the system, but it might be more easy to implement. Request Parameter Flat Text Response XML Response Comment type=xml none, flat text responses will separated by line feeds none, XML responses will be enclosed in "<logger>... </logger>" tags. quotes=1 none none, will use strict XML syntax for output with all values in quotes and "/>" as closing tag bracket. this switches to XML response mode. Without this parameter plain text will be reported. introduced to allow for strict XML parsing, not generally applied to keep compatibility to feed WD. sensor=string none none tells the logger only to report data of sensors that match "string". Sensor parameter can be specified multiple times in URL 6. "start" parameter omitted last data record before reaching the time last data record before reaching the time stamp given useful to get a time stamp to start with, which is 5 If the limit is reached and there are more data records with the same time stamp these are also reported. Therefore, the result can be a bit more than 500 records. This is especially true for weather stations like Vantage or TE923 which report the whole sensor array at the same time. 6 string is used for a substring search in the data line. "th" matches all lines that have "th" in it. This will selct sensors like "thb0", "th0", "th1". "th1" selects sensor "th1" but also "th10". "th1+" matches just "th1", not "th10". 5

Request Parameter Flat Text Response XML Response Comment start=yyyymmddhh MMSS "end" parameter omitted end=yyyymmddhhm MSS "start" and "end" are omitted stamp given by "end" by "end" direct predecessor to the times tamp given by "end" parameter. max. 500 data records, one sensor per line max. 500 data records, one sensor per line max. 500 data records, one sensor per line latest set of data records for all sensors max. 500 data records in sensor type specific tags max. 500 data records in sensor type specific tags max. 500 data records in sensor type specific tags latest set of data records in sensor type specific tags requests data with time stamp newer than YYYYMMDDHHMMSS requests data up to last recently logged ones requests data with time stamp equal or older than YYYYMMDDHHMMSS this is in a live data reading context The logger reports data based a sensor's type for each of the sensor readings in scope. The following table explains how the response for each type of sensor looks like. Sensor Type Flat Text Response XML Response (quotes=1) Comment THB timestamp 7 thb? 8 values 9 <THB date="yyyymmddhhmmss" id="thb?" temp="value" hum="value" dew="value" press="value" seapress="value" fc="value" /> TH timestamp th? values <TH date="yyyymmddhhmmss" id="th?" temp="value" hum="value" dew="value" /> T timestamp t? values <T date="yyyymmddhhmmss" id="t?" temp="value" /> WIND timestamp wind? values <WIND date="yyyymmddhhmmss" id="wind?" dir="value" gust="value" wind="value" chill="value" /> RAIN timestamp rain? values <RAIN date="yyyymmddhhmmss" id="rain?" rate="value" total="value" delta="value" /> UV timestamp uv? values <UV date="yyyymmddhhmmss" id="uv?" 7 in UTC, format: YYYYMMDDHHMMSS 8? represents a number between 0 to 9 (0 to 19 in case of TH sensor) 9 list of values as described in 6

Sensor Type Flat Text Response XML Response (quotes=1) Comment index="value" /> SOL timestamp sol? values <SOL date="yyyymmddhhmmss" id="sol?" "rad=value" /> DATA timestamp data? values <DATA date="yyyymmddhhmmss" id="data?" value="value" /> As each weather station has a different configuration of sensors. The following conventions how to map sensors to unique sensor IDs is used by the logger: Weather Station Mapping of Sensors to IDs Comment WMR-928, WMR-968 thb0 indoor temp/hygro/baro sensor th0 primary outdoor temp/hygro sensor th1...3 additional temp/hygro sensors t1...3 additional temp sensor wind0 wind sensor rain0 rain sensor WMR-100 thb0 temp/hygro/baro in the base station th0 primary outdoor temp/hygro sensor th1...10 additional temp/hygro sensors wind0 wind sensor rain0 rain sensor uv0 uv sensor WMR-200 thb0 temp/hygro/baro in the base station th0 primary outdoor temp/hygro sensor th1...10 additional temp/hygro sensors wind0 wind sensor rain0 rain sensor uv0 uv sensor TE-923 (Mebus, Irox, Nexus, Honywell,...) thb0 th0 th1...5 uv0 wind0 rain0 temp/hygro/baro in the base station primary outdoor thermo/hygro sensor additional thermo/hygro sensors additional uv sensor wind sensor rain sensor Vantage thb0 temp/hygro/baro in the base station th0 primary outdoor thermo/hygro sensor th1...7 additional thermo/hygro sensors th10...13 additional soil thermo/hygro sensor th15...18 additional leaf thermo/hygro sensor uv0 additional uv sensor sol0 solar sensor wind0 wind sensor rain0 rain sensor RFXCOM thb0...19 indoor temp/hygro/baro sensor th0 primary outdor temp/hygro sensor th1...39 temp/hygro sensor t1...19 temp sensor uv0...19 uv sensor wind0...19 wind sensor rain0...19 rain sensor additional temp and temp/hygro sensors share the channel id. As a result each of the channels 1...3 can only have a T or TH sensor (not both). Therefore, number of additional sensors is limited to 3. additional leaf and soil sensors deliver humidity not as relative humidity measured in percent, but as an integer number. soil delivers a "centibar" value and leaf a "wetness" value. RFXCOM receiver module reads rf signals of most Oregon sensors. Therefore no hard limit in number of sensors is applicable. However, Meteohub limits number of sensors per type. 7

Examples Data Request: "http://.../meteolog.cgi?type=xml&quotes=1&mode=data&start=20080227183500" <logger> <THB date="20080227183508" id="thb0" temp="22.3" hum="63" dew="6.8" press="998.7" seapress=1004.3 fc="3" /> <TH date="20080227183510" id="th0" temp="12.5" hum="34" dew="2.3" /> <WIND date="20080227183510" id="wind0" dir="237" gust="12.4" wind="8.5" chill="8.9" /> <UV date="20080227183521" id="uv0" index="1.2" /> </logger> Data Request: "http://.../meteolog.cgi?mode=data&start=20080227183500" 20080227183508 thb0 22.3 63 6.8 998.7 1004.3 3 20080227183510 th0 12.5 34 2.3 20080227183510 wind0 237 12.4 8.5 8.9 20080227183521 uv0 1.2 Data Request: "http://.../meteolog.cgi?mode=data&start=20080227183500&sensor=th&sensor=uv" 20080227183508 thb0 22.3 63 6.8 998.7 1004.3 3 20080227183510 th0 12.5 34 2.3 20080227183521 uv0 1.2 Initial Data Request: "http://.../meteolog.cgi?mode=data" 20080227183524 rain0 1.5 2847.5 0.0 If no records are available for a given time frame an empty record is returned ("<logger></logger>" phrase in case of xml). 4.3 Error Handling If an error occurs the logger returns a HTML page that starts with "Error" (directly following the necessary HTML content type header). The explanation what has gone wrong is given in clear text. No data gets transmitted in case of an error. 8