User Tools

Site Tools


info:wiznet_to_pachube_communications

This is an old revision of the document!


Sending data to Pachube

Make an HTTP PUT call with the sensor value as the content (comma-separated if there’s more than one value) that looks like this:

   PUT /api/76.csv HTTP/1.1
   Host: www.pachube.com
   X-PachubeApiKey: ENTER_YOUR_PACHUBE_API_KEY_HERE
   Content-Length: 19
   Connection: close
   
   
   12,14,66,23.03,text

The content-length field is a count of every character in the content, which is the line at the very end. Content always comes after two newlines, at the end of an HTTP PUT request, as shown above. If sending only one sensor, the PUT statement would look like this:

   PUT /api/76.csv HTTP/1.1
   Host: www.pachube.com
   X-PachubeApiKey: ENTER_YOUR_PACHUBE_API_KEY_HERE
   Content-Length: 3
   Connection: close
   
   
   126
info/wiznet_to_pachube_communications.1296326858.txt.gz · Last modified: 2011/01/29 13:47 by tomgee