Another problem

As of Friday I’ve seen a number of problems in posting data to – and it’s taken a lot of time to debug the problem. In the end it looks like I was sending too much data too fast, adding a delay of 0.2 seconds between postings like this :

data = $aio.feeds(navn).data.send_data(component[1]) # Had a real problem with value: in helper method send_data
                                                                                        # data = aio.feeds(“Test”).data.send_data({value: 5}) goes wrong as per documentation
sleep(0.2) # sleep between updates – otherwise things seems to go wrong
puts “data sent to adafruit”


Adafruit IO changes their REST API

I’ve ben having some weird problems with my software doing calls to the Adafruit API. I’ve spent a fair amount of time trying to find a problem in my own code until I found this in Adafruit’s changeling ;


Adafruit IO Changelog: “Apr 19, 2016 • @jwcooper REST API v2 Deployment on April 21st On Thursday, April 21st we will be deploying Version 2 of our API. This version is quite different from our existing API V1.

IMPORTANT: Your code or sketches will need to be updated if you are using the REST API.

From now until Thursday, you will want to update your code or sketches to change ‘/api/…’ to ‘/api/v1/’ so that you continue using v1 of the API until you are ready to upgrade to the latest version.



I’m using Adafruit’s Ruby gem – but it looks like it’s just a wrapper around the REST Api, so that would explain my problems.