Billions and Billions

The open data platform for the Internet of Things

Get Started


Send sensor data to the cloud.


Analyze and visualize your data.


Trigger a reaction.

ThingSpeak Features

  • Real-time data collection and storage
  • MATLAB analytics and visualizations
  • Alerts
  • Scheduling
  • Device communication
  • Open API
  • Geolocation data
  • Available on GitHub
  • Works With

  • Arduino
  • Raspberry Pi
  • Electric Imp
  • Mobile and web apps
  • Twitter
  • Twilio

  • Featured Projects

    Latest News

    Video Introduction to ThingSpeak and the Internet of Things

    Our very own Robert Mawrey produced a video introducing ThingSpeak and the Internet of Things.

    ThingSpeak is an open data platform for the Internet of Things. Your device or application can communicate with ThingSpeak using a RESTful API, and you can either keep your data private, or make it public. In addition, use ThingSpeak to analyze and act on your data. ThingSpeak provides an online text editor to perform data analysis and visualization using MATLAB®. You can also perform actions such as running regularly scheduled MATLAB code or sending a tweet when your data passes a defined threshold. ThingSpeak is used for diverse applications ranging from weather data collection and analysis, to synchronizing the color of lights across the world.

    At the heart of ThingSpeak is a time-series database. ThingSpeak provides users with free time-series data storage in channels. Each channel can include up to eight data fields. This tutorial provides an introduction to some of the applications of ThingSpeak, a conceptual overview of how ThingSpeak stores time-series data, and how MATLAB analysis is incorporated in ThingSpeak.

    [via MathWorks]

    Counting Cars and Analyzing Traffic #RaspberryPi #MATLAB #ThingSpeak

    The power of any tool becomes magnified when you start combing it with other tools. In this MakerZone project by Eric Wetjen, he demonstrates a powerful project by using a webcam to gather live traffic video of Route 9 in Natick, MA, using Simulink to deploy a car-counting algorithm to a Raspberry Pi, using MATLAB to perform analysis, and using ThingSpeak to collect and share the analyzed data with others.

    The project uses a Raspberry Pi 2 and USB webcam acting as a sensor. The webcam picks up traffic flowing in both directions. Once the algorithm for detecting cars is modeled in Simulink, the algorithm gets deployed on the Raspberry Pi. The Raspberry Pi sends the raw data to ThingSpeak on regular basis where it is analyzed using the MATLAB Analysis app on ThingSpeak.

    After sending to ThingSpeak, Eric created a MATLAB Analysis app to calculate the daily traffic-volume on ThingSpeak Channel 51671. Now that the data is public, others could use this processed data within apps such as Waze to optimize directions using analyzed traffic flows.

    Check out the MakerZone article for the complete project details and all of the code to get your Raspberry Pi + ThingSpeak analysis project started.

    [via MathWorks MakerZone]

    Updates to the MATLAB Analysis App with Lots of Example Code

    When using the MATLAB Analysis app on ThingSpeak, the MATLAB function to represent date and time (datetime) allows you to represent points in time. You can also use datetime(‘now’)datetime(‘today’), datetime(‘yesterday’), or datetime(‘tomorrow’) to create scalar datetimes at or around the current moment. Refer to the link below for additional information about datetime function:

    On ThingSpeak, so far, the datetime function returned time set to UTC time zone by default. Starting at 10 am (EDT) on September 10th 2015, the datetime function will return date and time set to your account time zone (at This will allow you to read data from your channel with timestamps zoned to your local time zone instead of UTC.

    For example, my account time zone is set to Eastern Time (US & Canada), and when I ran the following MATLAB code at 12:23 pm, I received:

    dt = datetime('now')
    dt =
    10-Sep-2015 12:23:35


    Prior to this change, I would have received:

    dt =
    10-Sep-2015 16:23:35


    As you can see, the timestamp is 4 hours ahead of my time zone, which was due to MATLAB returning time in UTC.

    This change makes it easier for you to perform time related activities in your time zone. Note that this new feature is available for both thingSpeakRead and thingSpeakWrite functions as well. As an example, consider the following request to read data from the MathWorks Weather Channel:

    MATLAB Code:

    [data, timestamp] = thingSpeakRead(12397);
    display(timestamp.TimeZone, 'TimeZone');
    data =
    225.0000    3.8000   43.9000   95.8000
    0   29.9800    4.3000    0.0300
    timestamp =
    10-Sep-2015 16:13:54
    TimeZone =


    With this enhancement, you would no longer have to explicitly specify the time zone of your dates and time to read and write data in your time zone.

    Here are a few other examples:

    1. Read data corresponding to one entire day in your time zone:
    startDateTime = datetime('September 10, 2015 00:00:00')
    endDateTime = datetime('September 10, 2015 23:59:59')
    readChannelID = 12397;
    [data, timeStamps] = thingSpeakRead(readChannelID, 'DateRange', [startDateTime, endDateTime])
    1. Read data between certain hours of a day (between 7 am and 9 pm)
    startDateTime = datetime('September 10, 2015 07:00:00')
    endDateTime = datetime('September 10, 2015 21:00:00')
    readChannelID = 12397;
    [data, timeStamps] = thingSpeakRead(readChannelID, 'DateRange', [startDateTime, endDateTime])
    1. Generate a MATLAB plot in your local time zone:
    [data, timeStamps] = thingSpeakRead(12397, 'Fields', 3, 'NumPoints', 10);
    plot(timeStamps, data)


    Note that, if at present, you are explicitly setting the time zone to your local time zone, you might see unexpected behavior in your code. Here are a few examples, based on support requests we have received:

    1. If you are using datetime function in your code similar to the example below:
    % Set the time now to variable dt
    dt = datetime('now')
    % Assign time zone to UTC since the dt is unzoned by default
    dt.TimeZone = 'UTC';
    % Convert the timestamp to ‘America/New_York’
    dt.TimeZone = 'America/New_York'


    To fix this, remove the “TimeZone” assignments since time is now returned in your time zone by default, and use the code below:

    % Set the time now to variable dt
    dt = datetime('now')
    1. If you are setting the time zone of data returned by thingSpeakRead to your zone:
    % Read data from a channel
    [data, timeStamps] = thingSpeakRead(12397);
    % Set the timezone to match your zone
    timeStamps.TimeZone = 'America/New_York';


    To fix this, remove the line with the “TimeZone” assignment, and use the code below:

    % Read data from a channel
    [data, timeStamps] = thingSpeakRead(12397);


    For more information about the datetime function refer to the MATLAB documentation. If you need support, use the MATLAB section of the ThingSpeak Forum.