You are reading a single comment by @hansamann and its replies. Click here to read the full conversation.
  • I seem to be not successful with the Xively - I used a REST client which gave me the info that it works with HTTP, too, so I gave it a try:

    PUT http://api.xively.com/v2/feeds/184885797­4
    header: X-Api-Key: RMspyWqYIq1m9vEyuF9Q9BLpngLf4Tr1MlEhmDnH­TbAjQvG8
    body: counter,2

    in JS it looks like this - but was not able to get a request through:

    function putXively() {
    	digitalWrite(LED1,1);
    
        var options = {
          host: 'api.xively.com', 
          port: '80',
          path:'/v2/feeds/1848857974', 
          method:'put',
          headers: { "X-ApiKey":"RMspyWqYIq1m9vEyuF9Q9BLpngLf­4Tr1MlEhmDnHTbAjQvG8" }
        };
    
        var req = require("http").request(options, function(res)
        {
    		res.on('data', function(data) {
            setTimeout(putXively, 2000);
    		digitalWrite(LED1,0);
          });
        });
        req.end("counter," + counter++);
    }
    

    Yes, I posted my API key. Don't care, this is for testing. Feel free to use exactly the same key. The feed is also public, e.g. can be accessed via https://xively.com/feeds/1848857974

    I made a few test calls via RESTclient, so some data is there. But unfortunately did not get a request through via the Espruino+CC3000.

About

Avatar for hansamann @hansamann started