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
servicelikeMySQL/ApacheorMicrosoft’sSQLServer/asp.net.Themessenger
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-
posedbytheRuleEditortool,andtheresultingruleleisuploadedtothe
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.
• Requestdata:auserdenedstringthatcontainstheactualdata.
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-
dedtotheURLseparatedbythe‘?’character.Ontheserversidethechosen
requestmethoddeneshowthedataisextracted.
The request data string is composed by the BS1500 to contain actual measu-
rementdatabythegivenrequestdatastring.Datatags(startingwiththe‘$’
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