(My) History of the Internet of Things

Back in 2007, Jason Winters and I started working on what would become ioBridge, RealTime.io, and ThingSpeak. The phrase “Internet of Things” got added to the discussion when Richard MacManus resurrected it from the RFID days in the late 90s and applied it to companies like ourselves in a 2009 article in the New York Times. Jason and I had experience with projects going viral such as a remote-controlled tractor with a webcam and an aquarium with real-time controls and monitoring. “Jason’s Fishcam” had sensors reporting temperature on a webpage and an interactive gator inside the aquarium. People used to watch the fish and control the gator mouth.

Jason’s Fishcam (January 2006)

The “Slashdot Effect” used to crush our homespun servers and render our projects useless for a period of time. Jason had the idea of moving the “control” part of our projects to the web. If all commands routed to and from a web server instead of going directly to a device, then we could control which commands went through, secure the connections using SSL, create access lists, and change things on the fly. This idea became our obsession for over a decade with several patents, licenses, open source projects, and customers from all over the world to show for the effort. We still work on large-scale IoT, Internet of Things for short, projects and have helped companies of all sizes reduce costs, predict equipment failures, and bring about connected products that serve a purpose.

“Twitter for Things” Demo App

When I first heard about Twitter back in 2006, I thought this is a perfect idea for things. Why would a human want to post short statues? Devices have a lot to say. “The HVAC system just turned on.” “The conveyor is drawing 3.1 amps.” “SYSTEM FAILURE: Code 87643.” If a web application could capture these messages, then the messages could be used for analysis. Jason and I started ioBridge in July of 2008 and built a scalable out-of-the-box solution plus a hardware dev kit. The only issue is that we only knew 30 people that were interested in the aquarium project. We sent an email to all 30 people and one person named Pete purchased a dev kit. He built a monitoring system for large aquariums in the Baltimore area. The next wave of users and customers didn’t come until Stephen Myers created an interactive pet treat dispenser for his dog. Stephen didn’t have an aquarium, but he did have a dog. Everything is a remix. Stephen blogged about his project on December 3, 2008, and his project got picked up by “The Unofficial Apple Weblog” since he used the iPhone as the controller.

iPhone Controlled Pet Treat Dispenser (December 2008)

To demonstrate the idea for a “Twitter for Things” to investors, I created @MyToaster – a Tweeting Toaster that used our system to send status updates about whether or not it was toasting. I followed Stephen’s idea and blogged about the toaster with my article, “Social Networking for My Toaster” on December 8, 2008, and described in detail how to build your own connected appliance. A few days later, Priya Ganapati picked up the story of MyToaster and wrote an article for Wired Magazine. This project and our company… took off.

First MyToaster Article in Wired Magazine (December 2008)

The toaster allowed me to start conversations with product manufacturers and designers that had ideas for new products. I worked on a number of consumer products and industrial systems that all use the same technology that Jason and I created. The Amazon Echo wouldn’t be possible if the Echo device had to understand all aspects of speech and user intents locally. The web allows Echo to tap into a huge data set that enhances its functionality. ThingSpeak is still going strong. You can still sign up today for a free, non-commercial account and join a community of over 350,000 developers around the world that are all learning about IoT and building new IoT applications.

ThingSpeak System Diagram (December 2010)

Fast forward 10 years, and we are still working on the same thing, but the things are now factories, agricultural systems, windmills, and space probes. I was really happy when Katie Blackley from Pittsburgh’s NPR New Station asked me for an interview and an update regarding the MyToaster that started my journey. It has been 10 years and the toaster still works. It is now outfitted with a Particle Photon and uses the ThingSpeak web service to update its thousands of followers. I am glad she reached out to me as it caused me to reflect a bit about the journey and prompted me to share my history of the Internet of Things.

Appendix: MyToaster

MyToaster has been popular on its own for a long time. I have gotten requests to talk about the toaster on news stations, interviews for magazines, and to have the toaster brought to IoT conferences. Every trade show we did had MyToaster on display. The “touring toaster” was a stand-in and took a lot of abuse over the years.

Another significant event for MyToaster is when the Washington Post posted an infographic on “The Marriage of Appliance and Internet“.

They listed that MyToaster from 2008 was a significant event that shaped “Connected Appliances” and “Consumer Internet of Things Products”.

2008 – @mytoaster joins Twitter. It’s a toaster that Tweets. Hans Scharler rigged up his toaster to his Twitter so the appliance Tweets one of two things: Toasting or Done Toasting.

Time Logo

A man in Pittsburgh, Pennsylvania has rigged his toaster to tweet “Toasting” or “Done Toasting” with each use, and — despite the account’s lack of variety — has gained more than 2,000 followers.

In order to further connect us with our possessions, Scharler and his friend Jason Winters created a platform for developers called ThingSpeak— a sort of Twitter for things — that lets objects send messages, broadcast their location, graph their temperature, and more.

 / Time

Wired Logo

“Tweeting appliances speaks to this whole ‘internet of things’ idea,” says Hans Scharler, a tech consultant who also writes comedy material. “If your appliances were outputting information, it can always go to a database. But we love to share information. So why not find a way to do that?” Scharler found online fame for his twittering toaster, whose tweets alternate between “toasting” and “toast is done.” @mytoaster has about 200 twitter followers.

Priya Ganapati / Wired

Control IFTTT Webhooks with MATLAB

Yesterday, I was building an integration with IFTTT and my Philips Hue lights in my office. I wanted the Philips Hue lights to change to the latest CheerLights color. IFTTT offers a webhook as a trigger, so I decided to use MATLAB to trigger the webhook. MATLAB will get the latest CheerLights color, then send it to IFTTT and IFTTT sends the color to Philips Hue.

When I created the IFTTT webhook, IFTTT presented a CURL example:

curl -X POST -H “Content-Type: application/json” -d ‘{“value1″:”green”}’ https://maker.ifttt.com/trigger/mwOffice/with/key/xxxyyyzzz

Here’s how to turn the CURL request into a MATLAB command:

webwrite(‘https://maker.ifttt.com/trigger/mwOffice/with/key/xxxyyyzzz’,’value1′,’green’);

Check out the IFTTT documentation for more information.

Getting Ready for the Bay Area Maker Faire!

I have a lot of favorite times of the year. I get excited about the holidays, weekends, evenings, and days. I am usually filling each day with something new and/or pushing a project further along. One of my favorite events is the Bay Area Maker Faire. Imagine over 120,000 makers, hackers, builders, engineers, and students putting on the world’s biggest show-and-tell? You will see things that spark new ideas and you will see giant robotic giraffes.

You never know who you are going to run into. I was so happy to meet one of the first users of ThingSpeak! This is Andy Leer of Leer Media. Andy was introduced to my IoT projects back in 2008 at Hack Pittsburgh! He was instrumental in me being able to kickstart my startup and help support my growing community. Andy provided meeting space for my IoT Meetup in Pittsburgh.

A couple of the Mythbusters also showed up at the Bay Area Maker Faire. I got to talk about MathWorks software with both Adam Savage and Grant Imahara. Grant remembers using MATLAB quite a bit in his education and later his engineering projects.

This slideshow requires JavaScript.

I have been getting ready for this year’s Bay Area Maker Faire. Stop by the MathWorks booth to see our latest hardware projects and demos. We have giveaways and info on the latest products. See you soon at the Maker Faire!

Use AWS DeepLens to Determine If Hotdog or Not Hotdog

While at re:Invent, I got to take a deep learning workshop to learn about the new capabilities of AWS such as SageMaker and Greengrass. We used a new device created by AWS and Intel called DeepLens to build an image classification model, deploy it to the device, and use the model to predict image labels. In reference to the TV show Silicon Valley, we trained a neural network to determine if the image from the video camera contained a “Hotdog or Not hotdog.” My machine learning model performed better when the hot dog had mustard on it.

Fun aside, the DeepLens device is a really powerful way to learn image and video-based machine learning and artificial intelligence. Once you get ahold of the device, you can follow the workshop by downloading the materials and code from GitHub.

How to Reset the Arduino MKR1000

I am working on a project that uses the Arduino MKR1000 with ThingSpeak. While working on my code, I uploaded a bad sketch to the MKR1000. Every time that the board powers up, it starts running my bad code over and over and appears to be stuck in an infinite loop. I tried pressing the reset button, unplugging the USB cable, reboot my computer, reinstalling drivers, and unplugging the USB cable (for good measure). Nothing made the board responsive again. I found a forum post talking about the bootloader. The user mentioned that quickly pressing the reset button twice put the device into a good state by loading the bootloader. Success!

CheerLights Robot for Your Nursery

I shared my latest project over on my Nursery Hacks website. It combines some of my favorite things… IoT, CheerLights, ThingSpeak, Particle, and building things for my soon-to-be-here son’s nursery.  I didn’t want a bright light in the nursery, but I did want to build a little CheerLights display for something in the background.

I found a Robot Nightlight on Amazon and purchased it. This little robot is a great night-light and you can change the color using the included infrared remote control. To connect this light to CheerLights, I built an IR controller that is internet-connected using the Particle Photon. The Photon subscribes to the latest CheerLights color on ThingSpeak and transmits the IR code as if the button was pressed on the remote control.

To build your own CheerLights Robot, visit Nursery Hacks for the parts and code.

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”.

Parts

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

ThingSpeak

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 ThingSpeak.com 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.

Channel_Settings

Setup

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 Arduino.cc 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: http://arduino.esp8266.com/stable/package_esp8266com_index.json – 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.

Programming

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.

ThingSpeak_Channel

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: mqtt.thingspeak.com
    • Broker Port: 1883

MQTT.fx Screenshot

  • Click Connect to connect to the ThingSpeak MQTT broker.

mqttdesktop02

  • 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.

mqttdesktop03

  • 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.

mqttdesktop04

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: https://demo.twilio.com/docs/voice.xml.

If you look closer you will see the following code:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Say voice="alice">Thanks for trying our documentation. Enjoy!</Say>
    <Play>http://demo.twilio.com/docs/classic.mp3</Play>
</Response>

Go ahead and click: http://demo.twilio.com/docs/classic.mp3