[Official Tutorial] Monitoring Linux Server Statistics

ThingSpeak can be used to easily monitor CPU usage %, memory usage %, and disk usage % on any Linux machine connected to the internet.

First, create a new Channel, and fill out the field names as follows: Field 1 = “CPU Usage (%)”, Field2 = “Memory Usage (%)”, Field 3 = “Disk Usage (%)”.

ThingSpeak Channel Settings

Next, add the open-source server statistics script to your server, which can be found at: https://raw.githubusercontent.com/iobridge/thingspeak/master/lib/server_stats.sh

Inside the script there’s an API Key variable, which should be replaced with your specific Channel’s API Key (leave the single quotes, and only replace the X’s): api_key='XXXXXXXXXXXXXXXX'

For the script to work properly, install the “bc” package via: sudo apt-get install bc

Then make the script executable: chmod +x server_stats.sh

Finally, edit your crontab file: crontab -e

Make the script execute every minute by adding this line to your crontab (make sure you use the proper path to the script): * * * * * /path/to/server_stats.sh

The script will then automatically POST server stats to the Channel specified by the API Key every minute.

You can see some of the ThingSpeak server statistics here:


New Spline Charts for IoT Data Visualizations

Once your data gets into ThingSpeak, you than want to do something with it. A first step is to see the data. If the data are sensor values from a Nest thermostat for example, then you want to see it as a chart. We added a new way to visualize your data by adding Spline Charts! Spline Charts are super easy to create with ThingSpeak, just add “type=spline” to your ThingSpeak Chart API call. (And of course, once you have it as a chart, you may want to embed it on our ioBridge Dashboard application.)

Here’s what the new Spline Chart looks like:

Here’s a regular line chart:

And just as a reminder, here are all of the supported ThingSpeak Chart types:

  • type=bar
  • type=column
  • type=line
  • type=spline

For complete ThingSpeak Charts documentation, check out ThingSpeak Docs.

Battery-powered Temperature Logger with ThingSpeak + Electric Imp

[Marcus Olsson] of slickstreamer made a battery-powered temperature logger using ThingSpeak to store and visualize the data collected. He chose the Electric Imp Wi-Fi module for connectivity. The project is complete with a 3D printed case.

ThingSpeak Electric Imp Temperature Logger

All of the source code to connect Electric Imp to ThingSpeak and the 3D printer design files are available on Marcus’ blog ‘slickstreamer‘.

[slickstreamer / Dangerous Prototypes]

Unlocking Data from Twine by using ThingSpeak

[Risto] from Supermechanical wrote a tutorial on how to use the Twine with ThingSpeak web services such as Data Logging and Charting. The tutorial explains how you can use the Twine’s easy-to-use sensor module to trigger events and push data over to ThingSpeak. This opens up the data captured by Twine and allows for all kinds of new applications.

The Supermechanical team put this combination of Twine and ThingSpeak to use right away. They created a “Productivity Quantification” system to capture events around the office and try to determine how productive they are. They were able to track how much coffee they were drinking, snacks they were eating, toilets they were flushing, and things they were finishing. The results are a quantified picture of office productivity and a beautiful display of the data via the ThingSpeak API.

Twine Coffee Maker Monitor

Creating a Twine Action to push data to ThingSpeak is really easy to do. Here’s what it looks like…

Twine Action to ThingSpeak

To do more with ThingSpeak and Twine make sure to check out the tutorial on the Supermechnical blog.


Solar Panel Data Logging to ThingSpeak

ThingSpeak user, “SolarInKrimpen”, from Rotterdam, Netherlands, created a solar power monitoring system that reports data collected by solar panels and feeds the data to web services such as ThingSpeak, Cosm, and PVoutput. They are collecting data such as, AC Wattage collected by a Pulse Counter, Total KWH per day, temperature of the solar panels, and the carbon offset.


Over at the Netduino forums, we found the source code for the Netduino and HTML for the ThingSpeak gauges for embedding the solar panel data on a website. Awesome!

Smart Home Project with ThingSpeak, Arduino, chipKIT, and Drupal

Via Twitter, we caught wind of a project by a group of Rutgers University SCI ITI students. As their final project, the team built a working model of a smart home using sensors connected to ThingSpeak cloud services via Arduino and chipKit. They were able to embed their data and integrate with their Drupal-based website and show a live demonstration of the smart house. Lots of cool technology went into their project including a small scale model complete with balsa wood and Popsicle sticks. This proved to be a great way to show how their project works with other students and faculty.

This video that we discovered on YouTube is the team’s presentation. You will get to see ThingSpeak in action, live in front of an audience about halfway thru…

We hope you got an “A” on the project (do they still give letter grades?)!

Accessing Historical Data on a ThingSpeak Channel

We have recently received a few email about accessing historical data. We even noticed some posts on other forums asking about older data.

All ThingSpeak Channels are continuous logs of data. Using API commands, you can access recent data and historical data. The default API parameters allow for easy access to recent data. To get access to older data, all you need to do is pass in a “start” and “end” parameter into a channel request.

Here is my feed from New Year’s Eve:


And remember, you can also do this with charts too:


Let us know if you need any more clarification on the many API parameters possible. Have fun!

PS. Some big features coming soon!

Connect Sensors to ThingSpeak via Teracom

[david] from Toute la Domotique adapted the Teracom box to connect to ThingSpeak web services for data logging of sensors. In his article, “Suivi de Température“, David covers the ThingSpeak integration in a 6 part tutorial written in French.

Teracom temperature monitoring with ThingSpeak

The Teracom box allows for 1-wire connections to sensors. David connected a temperature sensor to the 1-wire bus, an Ethernet connection, and customized the controller to push data to ThingSpeak for data logging of environmental sensor data. The tutorial also includes great photos clearly showing the setup for others to repeat.

DIY Weather Station with Arduino, Processing, and ThingSpeak

[lars] created a weather station from scratch using sensors and bits from SparkFun and Adafruit. Lars wanted to log weather data and access it from remotely. He built the weather station using humidity, temperature, pressure, and light sensors collecting data from his apartment in Ithaca, NY. Originally, Lars was collecting data with his own web application created with PHP and MySQL. He has since started publishing his data to ThingSpeak where others can view the data and potentially build applications.

ThingSpeak Weather Station

Behind the scenes, Lars uses the Arduino microcontroller to collect data from the sensors and uses Processing to publish data to his ThingSpeak Channel.

From Lars’ project site:

The goal of this project is to log some weather data and be able to access it from anywhere. There is some sensor data (temperature, relative humidity, pressure, and ambient light) and some computed data (dew point). You can see the weather condition in my apartment in Ithaca, NY at my ThingSpeak Channel 346. You can also look at the Google Chart of my own MySQL solution, which I no longer maintain.

Check out a detailed breakdown of the Weather Station project and more awesome projects on Lars’ project site, called “make.larsi.org“.

Home Automation System HomeVisionXL adds ThingSpeak Plugin

HomeVisionXL adds a ThingSpeak Plugin for environmental data logging to their home automation controller. HomeVisionXL “is a cross-platform tool for developing schedules for the HomeVision integrated home controller.” The plugin was created by ThingSpeak user [bgardner] and adds data logging capability to the HomeVision home automation system.

ThingSpeak HomeVisionXL Plugin

Visit the ThingSpeak Plugin page for more information on how to use this plugin with your HomeVision home automation system.