Weather Station – Internet of Things https://blogs.mathworks.com/iot Hans Scharler is an Internet of Things pioneer. He writes about IoT and ThingSpeak IoT platform features. Tue, 31 Mar 2026 22:00:12 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 One Million ThingSpeak Channels! https://blogs.mathworks.com/iot/2020/03/17/one-million-thingspeak-channels/?s_tid=feedtopost https://blogs.mathworks.com/iot/2020/03/17/one-million-thingspeak-channels/#comments Tue, 17 Mar 2020 22:11:43 +0000 https://blogs.mathworks.com/iot/?p=2695

Christopher Stapels, the product marketing manager for ThingSpeak, told me that we crossed ONE MILLION CHANNELS of IoT data on ThingSpeak. We have come along way over the years. The first channel... read more >>

]]>
Christopher Stapels, the product marketing manager for ThingSpeak, told me that we crossed ONE MILLION CHANNELS of IoT data on ThingSpeak. We have come along way over the years. The first channel that we created got the Channel ID of 1. We deleted the channel to test if the channel deletion feature works. Then, we created a second channel, sent data to it, cleared it, and deleted it. The oldest active ThingSpeak channel is Channel 3. It’s still collecting weather data from my parent’s house after 10 years. I never expected to see seven-digit channel ID numbers, like Channel 1018612 based in Oslo, Norway.

Thanks to all of our users who keep collecting data, adding devices, and analyzing data on ThingSpeak! This is a huge milestone for all of us and you are making an impact on IoT all around the world.

To commemorate one million channels, Christopher saved the number of channels at the beginning of each year to an array and used MATLAB to fit a power function to the data. You can do this using a MATLAB Visualization in ThingSpeak. The fit parameters are a = 1693 and b=2.277 for the model shown here.

According to a Business insider article, there will be 25 billion IoT devices by 2025. If the present rate continues, at least .1% of those devices can be on ThingSpeak by 2024 when we reach 2.5 million channels!

Here’s some MATLAB code to generate this plot and estimate the number of the ThingSpeak channels in the future.

% Gather data
dates=2015:2020;
absYears=dates-2014;
numChan=[22155,75957,208835,394780,666479,1000000];

% Plot the data
plot(dates,numChan,'r*-','linewidth',3);
xlabel('time');ylabel('Number of Channels');title('1 Million Channels!');
[xData, yData] = prepareCurveData( absYears, numChan );

% Set up fittype and options
ft = fittype( 'power1' );
opts = fitoptions( 'Method', 'NonlinearLeastSquares' );
opts.Display = 'Off';

% Fit model to data
[fitresult, gof] = fit( xData, yData, ft, opts );
hold;
extendRange = 2015:2025;
plot(extendRange,fitresult(extendRange-2014),'r--');
yline(2.5e6,'b','LineWidth',3);

We wanted to thank you again. We look forward to the next million channels and supporting your IoT journey. Let us know in the comments what you are doing or planning to do with ThingSpeak and what functionality that will help you along the way.

]]>
https://blogs.mathworks.com/iot/2020/03/17/one-million-thingspeak-channels/feed/ 4
Collect and Visualize Agricultural Data using The Things Network and ThingSpeak https://blogs.mathworks.com/iot/2019/10/17/collect-and-visualize-agricultural-data/?s_tid=feedtopost https://blogs.mathworks.com/iot/2019/10/17/collect-and-visualize-agricultural-data/#comments Thu, 17 Oct 2019 19:19:13 +0000 https://blogs.mathworks.com/iot/?p=2670

Long-range wireless communication technology enables the transfer of sensor data over a long distance while using low-power radios for connectivity. This technology can be leveraged to connect... read more >>

]]>
Long-range wireless communication technology enables the transfer of sensor data over a long distance while using low-power radios for connectivity. This technology can be leveraged to connect sensors covering a large geographic area and give you insights into what is happening. With agricultural applications it is important to measure the soil moisture and efficiently irrigate. A big challenge for agricultural applications is robust connectivity in remote locations. By using a combination of The Things Network and ThingSpeak insightful applications can be built. The Things Network is a protocol and infrastructure that provides a link to cloud applications using LoRaWAN® technology. If you are already a The Things Network user, check out the documentation about the ThingSpeak integration at The Things Network. ThingSpeak is an IoT analytics platform service that allows you to aggregate, visualize, and analyze live data streams in the cloud using MATLAB®. You can send data to ThingSpeak from devices via The Things Network, create instant visualization of live data, and send alerts.

The ThingSpeak team has created a new example that shows you how to leverage The Things Network and build an agricultural data application using ThingSpeak. The sensors send data to The Things Network, which is then forwarded to ThingSpeak for collection, analysis, and visualization. Here’s what the project view on ThingSpeak looks like.

To build a soil moisture sensor device for The Things Network, you need use an Adafruit Feather M0 RFM95 LoRa Radio (900MHz), an Adafruit Ultimate GPS FeatherWing, a SparkFun Soil Moisture Sensor, and a DHT22 temperature and humidity sensor. Once you have the device put together and programmed, you can use this device to measure soil moisture, temperature, humidity, and its location.

Check out the full Collect Agricultural Data over The Things Network example at the MathWorks Documentation site.

]]>
https://blogs.mathworks.com/iot/2019/10/17/collect-and-visualize-agricultural-data/feed/ 2
What is a Bomb Cyclone? Use ThingSpeak and MATLAB to Figure it Out. https://blogs.mathworks.com/iot/2018/01/04/what-is-a-bomb-cyclone/?s_tid=feedtopost https://blogs.mathworks.com/iot/2018/01/04/what-is-a-bomb-cyclone/#respond Thu, 04 Jan 2018 22:32:58 +0000 https://blogs.mathworks.com/iot/?p=2236

Social media is blowing up the term bomb cyclone. The term is everywhere from Twitter to 24/7 news coverage of the storm hitting the East Coast of the United States. The technical term for a bomb... read more >>

]]>
Social media is blowing up the term bomb cyclone. The term is everywhere from Twitter to 24/7 news coverage of the storm hitting the East Coast of the United States. The technical term for a bomb cyclone is bombogenesis which is the combination of “bomb” and “cyclogenesis.” Or, you could call it an explosive cyclogenesis to grab views to your blog.

A storm undergoes bombogenesis when its central low pressure drops at least 24 millibars in 24 hours, according to the National Oceanic and Atmospheric Administration (NOAA).

At the MathWorks headquarters in Natick, MA we have a weather station sending data to ThingSpeak for the past several years. Here’s what the weather station looks like on a better day.

Not many interesting events emerge from the data, but with something called a bomb cyclone, Rob Purser decided to take a closer look using MATLAB. Our weather station on ThingSpeak channel 12397 collects temperature, humidity, and pressure data. By taking a look at this MATLAB plot of the pressure analyzed over 24 hours, you will see the pressure drops at least 24 millibars in 24 hours and in fact over 40 millibars. This storm definitely fits its name of explosive cyclogenesis.

Have a look at the raw data from ThingSpeak and see if you can determine the bomb cyclone event. In MATLAB, use thingSpeakRead via the ThingSpeak Support Toolbox. We documented the process of analyzing the weather station data using MATLAB on Hackster.io. Just follow the steps using MATLAB or MATLAB Online, to discover some interesting results.

Stay warm.

]]>
https://blogs.mathworks.com/iot/2018/01/04/what-is-a-bomb-cyclone/feed/ 0
IoT Day is the Day to Learn About Our New MATLAB Analytics Features https://blogs.mathworks.com/iot/2017/04/08/iot-day-is-the-day-to-learn-about-our-new-matlab-analytics-features/?s_tid=feedtopost https://blogs.mathworks.com/iot/2017/04/08/iot-day-is-the-day-to-learn-about-our-new-matlab-analytics-features/#respond Sun, 09 Apr 2017 02:30:59 +0000 https://blogs.mathworks.com/iot/?p=2048 IoT Data heatmap

April 9th is IoT Day! We are celebrating by announcing new IoT Analytic features. All ThingSpeak users now have access to the new features of MATLAB R2017a. In ThingSpeak you can analyze and... read more >>

]]>
April 9th is IoT Day! We are celebrating by announcing new IoT Analytic features. All ThingSpeak users now have access to the new features of MATLAB R2017a. In ThingSpeak you can analyze and visualize your data using the power of MATLAB. With the latest updates you can visualize your IoT data as a heatmap and analyze large sets of time-stamped data using a tall timetable.

In the latest update, we have added many new analytics features perfect for IoT data:

  • isoutlier / filloutliers: To find outliers in your data, use the isoutlier function. To replace outliers with alternative values, use the filloutliers function.
  • smoothdata: Smoothing noisy data is now possible with the smoothdata function. For example, smoothdata(A,’movmedian’) smooths data with a moving-window median.
  • fillmissing: Filling missing data using a moving mean or moving median option is now available with the fillmissing function.

Smooth Weather Data

At our headquarters in Natick, MA, we have a weather station sending data to ThingSpeak channel 12397. We use ThingSpeak to collect raw temperature, humidity, wind, and rain data. We use MATLAB to analyze and visualize the data so we can use it for forecasting plant harvesting and building weather models. Learn how to build your own weather station at Hackster.io and learn how to analyze the weather data using MATLAB with the source code on File Exchange.

Often you want to process the raw data by removing outliers and smoothing the data. This helps if you are building a predictive model and to better visualize the data. The common IoT analytics workflow is to read in raw data, synchronize the data in time, detect and remove outlier values, smooth the data, and visualize the data. This example works on ThingSpeak, MATLAB Online, and desktop MATLAB.

Read historic weather data

[weather,channelInfo] = thingSpeakRead(12397,...
'DateRange',[datetime('Feb 04, 2016'),datetime('Feb 10, 2016')],...
'outputFormat','table');

Convert to timetable

weather = table2timetable(weather);

Smooth the data

First, resample the timetable using the retime function so the times and data are uniformly spaced on the minute.

wdata = retime(weather(:,{'Humidity','TemperatureF'}),'minutely','linear');

Smooth the data using a moving median and compare this to the original data. There are a number of moving statistics functions for vectors and matrices like movmean, movmedian, etc and also the smoothdata function which also works on timetables and uses the RowTimes as the sample points. Moving median is the default and other options are available.

smdata = smoothdata(wdata);

Visualize the original and smoothed temperature data on a plot

figure
plot(wdata.Timestamps,wdata.TemperatureF,...
smdata.Timestamps,smdata.TemperatureF,'m--')
legend('Raw Data','Smooth Data')
ylabel('Temperature (\circF)')
title('Temperature Over Time')

Smooth Weather Data

Have a happy IoT Day and we hope that you understand your IoT data a littler more by using MATLAB Analytics on ThingSpeak. I would like to thank Heather Gorr for helping me put together the example MATLAB code. Cheers!

]]>
https://blogs.mathworks.com/iot/2017/04/08/iot-day-is-the-day-to-learn-about-our-new-matlab-analytics-features/feed/ 0
Weather Station with Particle, SparkFun, ThingSpeak, and MATLAB https://blogs.mathworks.com/iot/2016/06/06/weather-station-data-analysis/?s_tid=feedtopost https://blogs.mathworks.com/iot/2016/06/06/weather-station-data-analysis/#respond Mon, 06 Jun 2016 14:46:25 +0000 https://blogs.mathworks.com/iot/?p=1837

[Haodong Liang] has released a weather station project with full MATLAB data analysis, device source code, and procedures on Hackster.io. He used the Particle Electron to connect the SparkFun weather... read more >>

]]>
[Haodong Liang] has released a weather station project with full MATLAB data analysis, device source code, and procedures on Hackster.io. He used the Particle Electron to connect the SparkFun weather station to ThingSpeak anywhere covered by a 2G/3G cellular data network. The project demonstrates how to build your own and start exploring data collected by ThingSpeak with MATLAB.

MathWorks Weather Station

The project also shows you how to use MATLAB to get very detailed visualizations and data analysis of the data collected by the weather station. Some of the examples include histograms of temperature, humidity, and pressure, curve fitting, daily comparisons, and 3D plots of temperature.

MATLAB weather station temperature plot

Visit Hackster.io for the complete tutorial to build your own weather station, connect it to the internet with the Particle Photon, collect your data with ThingSpeak, and do data analysis with MATLAB.

[via Hackster.io]

]]>
https://blogs.mathworks.com/iot/2016/06/06/weather-station-data-analysis/feed/ 0
DIY Weather Station with Arduino, Processing, and ThingSpeak https://blogs.mathworks.com/iot/2011/09/01/diy-weather-station-with-arduino-processing-and-thingspeak/?s_tid=feedtopost https://blogs.mathworks.com/iot/2011/09/01/diy-weather-station-with-arduino-processing-and-thingspeak/#respond Thu, 01 Sep 2011 21:58:48 +0000 https://blogs.mathworks.com/iot/?p=810 [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... read more >>

]]>
[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“.

]]>
https://blogs.mathworks.com/iot/2011/09/01/diy-weather-station-with-arduino-processing-and-thingspeak/feed/ 0