Instructions

69
BS1400 Messenger to a webserver
Introduction
The BS1500 GP(R)S base station for the Arexx Multilogger system has built-
in messenger functionality. With the messenger it is possible source http
requests to external web servers by the base station. The http requests are
used to transport measurement data to a database via a script based web
servicelikeMySQL/ApacheorMicrosoft’sSQLServer/asp.net.Themessenger
applies given rules for each incoming measurement. A rule is an action that
is executed as soon as its accompanying condition is met. Rules are com-
posedbytheRuleEditortool,andtheresultingruleleisuploadedtothe
BS1500 were it becomes active immediately after upload. The rule action can
be an email message, a HTTP request or turning on the built-in buzzer.
Here we focus on the HTTP requests.
HTTP request
The HTTP request contains the following data:
Request type: POST or GET
URL: the URL of the web service, a port number can be added to
this URL, separated by a colon.
Requestdata:auserdenedstringthatcontainstheactualdata.
This string is base64 encoded.
When the HTTP request type is POST, the request data string is added to the
http request, when the request type is GET, the request data string is appen-
dedtotheURLseparatedbythe‘?’character.Ontheserversidethechosen
requestmethoddeneshowthedataisextracted.
The request data string is composed by the BS1500 to contain actual measu-
rementdatabythegivenrequestdatastring.Datatags(startingwiththe‘$’
character) are replaced by the actual data, like measurement value, sensor
id etc. The resulting string is base64 encoded thereafter, and sent to the web
server as a HTTP request. The following data tags can be used:
E
N
G
L
I
S
H