Thursday, March 5, 2015

Usefull tools #1






Ok, we have the board, we have the environment but we need to see the values from the sensors as a nice graph. What we should do ?

For storing the values I recommend and I use thingspeak.com.

Make an account on thingspeak.com and create a new channel.



Complete the fields for the newly created channel, a channel name, a description, metadata,
tags, Make Public check box.



On this step important fields are ones labeled Field 1 to Field 8. You can use them later 
to insert values into the thingspeak database. So complete the labels that your values will have.




Save your channel so you can use it later. You can come back later and modify those values.



API KEY

In order to upload values to thingspeak.com from the ESP8266, match must be done between your account and your ESP8266. This is done by the API KEY which can be found in the API KEYS menu.

Keep this KEY secret and don't post it on the web as I've seen it in a lot of github code. Every one that know you API KEY can alter your values and you will bang your head on the tables to see why your temperature is 200 degrees.  



Don't bother to use the API KEY above, I'll delete the channel later.


Testing

It's time to test the channel and the api key.

For now just add the the link changing the API_KEY with your own value in a browser.

http://api.thingspeak.com/update?key=[API_KEY]&field1=22&field2=55

which in my case is 

http://api.thingspeak.com/update?key=UD05NUCXSTSJ39W&field1=22&field2=55

Don't panic if your browser will show you just a blank page with one value "1", is the id
for your first record inserted into the database.





If you are going back the the channel page, you will see the values for field1 (temperature) and field2(humidity). In this way you can update up to 8 values in one shot.

Temperature:



Humidity:



Note: Keep at least 15 seconds between two writes !

No comments:

Post a Comment