Measure Wi-Fi Signal Levels with the ESP8266 and ThingSpeak

Oh, my. I am sure you have been hearing about the Internet of Things… The IoT! You might be wondering how to get started with i(o)t. There are many places to start. You might be interested in the data that devices collect and analyzing it or you might be interested in how to deploy thousands of sensors around a factory floor to better understand how efficient things are. You might just want to tinker. Be the cool person at the party talking about Arduino, Raspberry Pi, and Maroon 5. If you want to try out a “thing” – a small, connected device – that can measure data, I will help you get started with a quick tutorial using the ESP8266 “thing”.


First, you need to go by a thing on Amazon. I recommend for this project an ESP8266 compatible device like the NodeMCU. Don’t be scared. Add it to your Amazon shopping list or ask Alexa to buy you one. It’s $8.

ESP8266 NodeMCU

Other parts that you will need:

  • Laptop
  • Micro USB cable


While you are waiting for your Amazon stuff to arrive, you can learn about ThingSpeak.

ThingSpeak IoT Platform

ThingSpeak is where we are going to store the data collected by our thing and where we can see the data that we collected. Visit and Sign Up for an account. This will just take a minute and user accounts are free. Once you have a user account, you need to create a channel. ThingSpeak channels are where data gets stored. Create a new channel by selecting Channels, My Channels, and then New Channel. Name the channel, “ESP8266 Signal Strength” and name Field 1, “RSSI”. Click “Save Channel” at the bottom to finish the process.



Once the ESP8266 comes in the mail in a couple of days you need to gather a few more things to be able to program this thing. You will need a laptop and a micro USB cable (like the one that you charge a phone with). On the laptop, we need to install some software to be able to program the ESP8266. Visit and install the Arduino IDE.

Arduino IDE

Once the Arduino IDE is installed, open the program so we can do a couple of setup steps to get it ready to program ESP8266 devices. Under File, Preferences, and Additional Boards Manager URLs, add this link: – this will allow the Arduino IDE to manage ESP8266 compatiable boards.

Arduino Preferences for ESP8266 programming

The thing that you bought from Amazon uses the CP2102 USB driver. You might have to install a USB driver from Silicon Labs for this to work with your computer. Connect the ESP8266 to your laptop with the micro USB cable.

USB Driver for the ESP8266 CP2102

Back on the Arduino IDE, under tools, configure the following settings:
Arduino Board Settings for NodeMCU

Whew. We got through the setup. Now we can program this device or any ESP8266 compatible device and shouldn’t have to do that again.


The code that the Arduino IDE uses is called a “sketch” – this is just a short program that the device runs over and over. In our project, we are going to have the code measure the signal strength of the Wi-Fi connection and upload the data to ThingSpeak, wait, and repeat. Over time we can see the signal strength of our Wi-Fi connection. Copy the example code to your Arduino IDE and change some of the defaults to match your Wi-Fi network and ThingSpeak settings.

Once everything is set, click Sketch and then Upload. This will take the code and program the ESP8266 with it. It takes a minute so be patient. If anything goes wrong, make sure that you have the right board settings and that your “Port” matches what your laptop thinks the port is.

Back on ThingSpeak, you should see data start to come in. You are looking for the Private View of your channel and a chart that is updating. As new dsata comes in, the chart shows the latest value. If you carry the ESP8266 around the house, you might notice the signal strength changing.


Next Steps

To take the project further, you can use MATLAB on ThingSpeak to do some data analysis. I will post about IoT data analytics on another day. The ESP8266 source code for sending data to ThingSpeak is available on GitHub.

Welcome to the Internet of Things. Let me know if you try this out and let me know if you take this project further and build something cool.

Learn How to Use MQTT.fx with ThingSpeak

ThingSpeak just announced that they added MQTT as a way to send data to a ThingSpeak channel. This is great news since a lot of devices support MQTT. If you don’t have a device, but want to try out the MQTT protocol with ThingSpeak, you can use a desktop application called MQTT.fx. In this example, I am going to explain how to use MQTT.fx to send data to a ThingSpeak channel.

ThingSpeak MQTT Broker

Setup ThingSpeak

  • Sign up for ThingSpeak (or log in if you have an account)
  • Create a new channel
  • Note the Channel ID and Write API Key

Setup MQTT.fx

  • Download and install MQTT.fx.
  • Configure the connection profile for the desktop MQTT client.
    • Broker Address:
    • Broker Port: 1883

MQTT.fx Screenshot

  • Click Connect to connect to the ThingSpeak MQTT broker.


  • Enter the topic channels/<channelID>/publish/<apikey> to publish data to a channel feed. Replace <channelID> with the channel ID and <apikey> with the write API key of the channel. Enter the message to publish to the channel feed. This PUBLISH message publishes a value of 45 to field 1 and 60 to field 2 of the specified channel, along with a status message MQTTPUBLISH.


  • Alternatively, you can enter the topic channels/<channelID>/publish/fields/field<fieldnumber>/<apikey> to publish to a channel field. Replace <channelID> with the channel ID, <fieldnumber> with field number that want to update, and <apikey> with the write API key of the channel. Enter the message to publish to the channel field. This PUBLISH message publishes a value of 45 to field 1 of the specified channel.


Additional Resources

  • MQTT Basics – Learn about the publish/subscribe architecture for connecting bandwidth and power-constrained devices over wireless networks
  • MQTT Client Configuration – Learn how to set up an MQTT client to communicate with the ThingSpeak MQTT broker
  • Choose Between REST and MQTT – Learn when to use REST and MQTT to update a channel

Are Open Source IoT Platforms Ready for Primetime?

Bruce Sinclair of IoT-Inc. recently asked me to be a guest on his Internet of Things podcast, the IoT Business Show. I have been a faithful listener to the podcast since it started so I was honored to be a part of his show. Bruce asks very interesting questions and has his audience at heart. His questions help answer questions that the audience might be wrestling with when making a decision about getting into IoT (or not).

In his latest episode, Bruce asks, “Are Open Source IoT Platforms Ready for Primetime?” My open source IoT project is ThingSpeak. I created ThingSpeak back in 2010 as an ioBridge project and it has really taken off. The source code for the ThingSpeak API is available on GitHub and is being worked on by over 100,000 developers from around the world.

Open Source IoT Platforms Podcast

To listen to the IoT Business Show podcast, check out iTunes or the IoT-Inc. website.

In this episode of the IoT Business Show, I speak with Hans Scharler about where open source platforms are today, and when it makes most sense to use them.

Bruce Sinclair


Twilio Rickrolls You Using Their API

I have been working with the Twilio API for a few of my projects. I have used Twilio to call me when disk space is running low on a server or to call my house and request its status. Twilio is a cloud-based communications platform for sending and receiving text messages or placing phone calls. Twilio is wrapped up nicely with a RESTful API so ThingSpeak or MATLAB can use it without a lot of setup.

Tonight, I was following a beginner tutorial that I wrote for using Twilio and ThingSpeak, and I noticed that their voice example plays a friendly greeting and then by surprise Twilio starts playing Rick Astley’s “Never Gonna Give You Up”, for the world’s geekiest rickroll.

Twilio’s example points to this Url:

If you look closer you will see the following code:

<?xml version="1.0" encoding="UTF-8"?>
    <Say voice="alice">Thanks for trying our documentation. Enjoy!</Say>

Go ahead and click:

Learning About Internet Memes – Ignite Talk

Ignite talks are 5 minute presentations about anything. The talks are designed to be quick, fun, and digestible. Ideas can spark revolutions. I had an idea for an Ignite talk about memes. I am fascinated by internet memes and how they get started. Through my research of memes, I ended up learning a lot more than I expected.

Richard Dawkins Meme

My Meme” is a talk about memes, and how we are hardwired to spread ideas. Humans use a process of imitation, transformation, and combination to invent new things, change culture, or just to share sometime new.

William Shatner at Boston Comic Con!

I had to. I just had to meet William Shatner. I saw that William Shatner was the guest of honor at this year’s Boston Comic Con, so I had to find a chance to meet him. Shatner is promoting a new memoir about his friendship with Leonard Nimoy. It is also the 50th anniversary of Star Trek. In my opinion, the original 3 seasons of Star Trek is some of the best TV ever produced.

Hans Scharler and William Shatner at Boston Comic Con

Shatner greeted us with a monologue about how he liked the Patriots because of Brady’s wife, but now he is a LA Rams fan. The Mayor of Boston, Marty Walsh, named August 13, 2016 William Shatner Day. From TV to spoken word albums, “I think it’s gonna be a long, long time” before I get this star struck again.