User Manual

PoKeys user manual
71
www.poscope.com
Reporting data to network server with PoKeys57CNC device
PoKeys57CNC devices can automatically report sensor values to various network servers using the
HTTP POST, HTTP PUT or text-only protocols.
To use this reporting feature, user must specify reports type (RAW, UDP, Xively, Standard HTTP
POST/PUT or custom), server IP, server port number and update rate.
Custom report type
The request header is constructed of two parts HTML header and data header, divided by double
new line character (\n). Example header (Xively.com web service):
PUT /v2/feeds/62592.csv HTTP/1.1
Host: api.xively.com
X-ApiKey:
CAb3XX634daSAKxZc3M0M3I1NWVZVT0g
User-Agent: PoKeys56E
Content-Type: text/csv
Content-Length: 010
Connection: close
Test1234,-15000.00
The HTTP header without 'Connection' and
'Content-length' tags must be provided by the
user
The 'Connection' and 'Content-length' tags are
automatically inserted by the PoKeys device
Data is inserted at the end of the packet
The above example is specified as
PUT /v2/feeds/62592.csv HTTP/1.1
Host: api.xively.com
X-ApiKey: CAb3XX634daSAKxZc3M0M3I1NWVZVT0g
User-Agent: PoKeys56E
Content-Type: text/csv
The extra new line at the end is essential.