CC3000 + Xively JSON error

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
redauxr6ii
 
Posts: 4
Joined: Wed Dec 25, 2013 6:18 pm

CC3000 + Xively JSON error

Post by redauxr6ii »

Hello All,

I am new to the forums here and I need some help with an error I am getting.

I am building a Arduino aquaponics monitor that uses an Arduino UNO R3 and the Adafruit CC3000 to send the values to Xively.

I have successfully got the sketch compiled and uploaded, it reports the Current Temp in the serial Monitor but when it goes to send the data to Xively it gets back the following error.

I have had a look on the Xively website but there doesn't appear to be anything about this error.

Connect to 216.52.233.120:80
Connected!
-------------------------------------
HTTP/1.1 400 Bad Request
Date: Wed, 25 Dec 2013 22:01:13 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 73
Connection: close
X-Request-Id: e707aa17515d2179504be305395a4df12bca4ffa

{"title":"JSON Parser Error","errors":"JSON doesn't appear to be a hash"}-------------------------------------


Has anyone come across this before?

User avatar
redauxr6ii
 
Posts: 4
Joined: Wed Dec 25, 2013 6:18 pm

Re: CC3000 + Xively JSON error

Post by redauxr6ii »

Hey All,

I worked out what was happening, for others who come across this issue here is what I did wrong.

In my JSON string I was missing the ] at the end of the statement.

data = data + "\n" + "{\"version\":\"1.0.0\",\"datastreams\" : [ {\"id\" : \"Temperature\",\"current_value\" : \"" + String(temperature) + "\"}]}";

Once I stuck this back in the data started to flow again.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”