Tuesday, March 10, 2015

Usefull tools #2

If you want a nice gauge to display some data you can use the google's one with the help from thingspeak.com.


Thingspeak.com Plugin

For this gauge we will need to read data from thingspeak.com and this require an API Read Key that can be generated from the API KEYS menu.



Now go to the Plugin menu from the Main Menu:



and click on "New Plugin"


and select the Google Gauge and "Create Plugin".

Now you can modify the Javascript with your channel id and the READ API Key:


  // set your channel id here
  var channel_id = 87654;
  // set your channel's read api key here if necessary
  var api_key = 'Q68B3YMORI9S49JJ';
  // maximum value for the gauge
  var max_gauge_value = 100;
  // name of the gauge

  var gauge_name = 'My_gauge_name';

To include the new created gauge in other page you can use the HTML TAG <IFRAME>.

<iframe width="330" height="360" style="border: 1px solid #cccccc;" src="http://api.thingspeak.com/plugins/2345" ></iframe>



3 comments:

  1. Hi,
    can you please tell me how to add plugins to blogspot.com, I want to add 2 meters ie Temp and Humidity from my channel at thingspeak.com. I tried several methods but they don't work. Please guide.
    Thanks in advance
    Max.

    ReplyDelete
  2. Hi Max,

    If the plugins are created and are working in your channel, add them to your blog by entering in the admin page,
    click in the left panel Layout -> Add a Gadget and insert the exported code IFRAME tag from your plugin.

    ReplyDelete
    Replies
    1. Thanks, I got it working. see here http://vu2iia-meteor-m2.blogspot.in/ . Actually I was adding java script instead of just using IFRAME tag.
      max

      Delete