Use the New MQTT Service from ThingSpeak for Real-time CheerLights Updates

It’s that time again. That time when people all across the world synchronize their lights together with CheerLights! People have built amazing CheerLights displays. I have seen everything from color-changing shoes to snowmen… and trees.

 

CheerLights Introduction

Here’s a quick introduction to the CheerLights project for those who are new to the project. Imagine 1000’s of multicolored lights all around the world synchronized to one color. When one of the lights turns red, they all turn red. To control CheerLights, send a tweet to @cheerlights or include “cheerlights” somewhere in your message with the name of a color. This will cause a chain reaction and all of the CheerLights displays and apps will change their color to red.

 

ThingSpeak MQTT Service

CheersLights is powered by ThingSpeak IoT. And, this year, I am happy to introduce real-time CheerLights updates using ThingSpeak’s new MQTT service. Using the MQTT service by ThingSpeak, your CheerLights change instantly. ThingSpeak has posted an example that gets a Particle Photon connected to CheerLights using MQTT. The Subscribe to Channel Updates Using Particle Photon Client example shows you how to use a Particle Photon Wi-Fi board to subscribe to channel updates from the CheerLights channel. The program displays the color read from the channel on the built-in LED on the Photon board. You can subscribe to the channel feed or directly to the color field on the CheerLights channel.

Once you learn how to use the MQTT service from ThingSpeak, you can easily adapt it to your IoT project. This is a great way to have real-time control of a device or real-time monitoring of sensors.

If you want to follow the project and see what others are building, visit CheerLights.com or follow on Twitter.

CheerLights is Back for the Holidays

For the third holiday season in a row, the CheerLights project is gearing up. The idea behind CheerLights is to show that we are all connected by synchronizing the color of lights around the world. Christmas lights are a staple around the holidays and with Internet-connected lights, the color of your lights matches the color of everyone else’s lights.

It has been a real treat watching this project evolve as more and more people add lights… and other things. Things like Android and iPhone apps that check the latest color of CheerLights, an old Commodore 64, and Christmas trees.

To control the lights around the world, send a Tweet mentioning @CheerLights and a color. The command is processed by ThingSpeak platform and distributed to all of the lights listening to the CheerLights API.

@CheerLights I am dreaming of a White Christmas

Another powerful aspect of the CheerLights project is that is shows off what is possible with the emerging Internet of Things. With a single message sent via a social network like Twitter, 1000’s of objects around the world are in sync with each other. Lights are connected by many types of controllers, such as Arduino, ioBridge, Philips, and the Raspberry Pi. This project is only possible through the Internet and the coordination of developers around the world.

Learn how to join the project at CheerLights.com.

We are all connected…

CheerLights: my lights are linked to everyone else’s

If you have been following my projects for the last 12 years, you probably figured out that I must have a master plan. And this plan involves connecting things to the Internet that may or may not turn against us in the future. Way back in 2001, my partners and I released FuzzBox – this technology allowed for artificial intelligence to be distributed to devices via the Web. Our thoughts were if the decision making could be made on the Internet the devices themselves could focus on their task vs. trying to be a super device on their own. This was way early on and the ideas were premature, but it started a series of events and failures that led to even more projects involving devices linked together over the web. I guess this is now called, “The Internet of Things”.

Something that has emerged over the years is social networking. I have been fascinated by the idea of collective intelligence. It’s fun to follow a football game on Twitter or on Facebook’s live stream. You get to see the take other’s have on the same event that you are experiencing. If the Steelers score, you can feel it reverberate through social networks. These networks only work if there is lots of participation by many people. I have heard that people have predicted STD outbreaks from Twitter status updates, food poisoning sources, and even where earthquakes have taken place. This is fascinating to me.

The results are two-fold: you can learn from this data and that we are all connected. Enter in, CheerLights – CheerLights is my combination of distributed devices with social networking. This project that involves connecting multicolored lights to other people’s lights and allow Twitter keywords control them all. If someone tweets, “@cheerlights let’s go green” – every light connected to the project would change to green. To me this is a physical representation of a social network trending topic. It’s a way to share a moment in that moment. Just like with social networking, CheerLights requires scale to be very interesting.  If you check out CheerLights.com, you will see how to build a set of lights that are linked together with other people’s lights via Twitter. I have examples using things from ioBridge, Arduino, and Digi. Please let me know if you decide to build something and connect it to CheerLights.

We are all connected. That’s my purpose for building all of this technology. Nothing else matters.

ThingSpeak: Building My Own Twitter (for Things)

Over the past several months I have been working on software to allow “things” to form social networks and send status updates via the Internet. At first glance this may sound very impractical. Hopefully, in a few years this will make more sense as better applications come out. Remember how ridiculous my toaster sounded three years ago? I gave that thing a voice and since has been on TV and more people are interested in it than my Twitnot not saying ter status updates. More proof? At CES 2011 there were at least 10 appliances that could send Twitter status updates. I am not saying that I created them, but I am that they didn’t know about My  Toaster and it’s 600+ followers on Twitter. With this project, I wanted to take it a few steps further and build something from the ground up that’s focused on collecting enormous amounts of data from everyday objects, allowing devices to interact with each other, and building applications to present some meaning. The ThingSpeak project is finally ready to go and open to anyone that wants to start building applications.

My Problem

One problem with the Internet of Things is the concept of “the killer app” – the app that defines a new industry. The internet connected refrigerator is our poster child. Recently, Ryan Rusnak connected a mini fridge to the iPhone via ioBridge, added a motor controlled beer selector, and strapped on an air cannon to fire beers to his couch from 25 feet away – now that’s a killer app. So, my problem was trying to find an application that highlights key features of ThingSpeak and why it’s different.

My App

What I come up with is the idea of “my_house”. “my_house” is a collection of “rooms” that all hold computers, appliances, and sensors aka things. I recently installed some light sensors in “my_room” that push light levels to the ThingSpeak API. I did this to remind me when to turn my lights on so I don’t work in the dark when I get plugged in. And an interesting side benefit was that now I can detect whether or not someone is in the room based on the light level. I will admit this could have been done other ways, but sometimes you solve problems with what you have lying around. “my_house” already keeps track of my location using Google Latitude to control my thermostat.

Eureka moment…

Now I can tell when my mom goes into my room when I am out on the town, most likely Sheetz!!!

Below is a screenshot of the demo app and how I aggregate the data collected by my light sensors. Here are a few things I want to point out:

  • “my_house” is sending the status updates via a collection of networked sensors
  • The status updates were generated by the light sensor device itself
  • The timestamps were recorded by the ThingSpeak API
  • If you click the chart icon you get what the actual light level was
  • The app works in real-time and you can check it out here

"Twitter of Things" ThingSpeak Demo App

The Technical Details

The light sensor uses a Netduino Plus that connects to my home network over Ethernet. This device uses Microsoft .NET Micro Framework and I wrote an application that interfaces with the ThingSpeak API. I also wrote a tutorial over at the ThingSpeak community site on how to use the Netduino Plus for those that want to get started with it fast.

The front-end application is written using only HTML, CSS, and jQuery. I have the fully documented source code attached and you can also see the app live in your web browser.

Light Sensor Netduino Plus

Project Files:

Toaster + Twitter = Internet of Things

Really?

You might be hearing this new buzz-phrase, “Internet of Things” quite a bit lately. You might be wondering what it’s all about. Let me try to explain.

A “thing” could be a lot of things, but it’s not people (and definitely not places). That leaves everything else. Now according to the Internet, there are 6,767,805,208 people on Earth and of those 6,767,805,208 people 1,802,330,457 have used the Internet. That’s (only) 26%. So, that means one out of four people do not know what Numa Numa is all about. This also means there are a lot more things than people. A thing could be a camera, mobile device, sensors, your air conditioner, a river, and even a toaster.

The trick to the “Internet of Things” or the “Web of Things” will be providing connectivity to all of those things. Once we do, we will be able to gain access to a lot of information. The next challenge will be making that data useful in our everyday lives. We are just at the start of this, that’s why we are just starting to hear about it (with some help with IBM commercials).

I have been fascinated by this concept since I first joined the Internet, back where GeoCities and L’Hotel Chat were the hip spots. For me the interest started off by controlling things over the web. Then, I started wondering what are my things doing. What temperature is it at my house? What’s going on with my freezer? Is it time to refill my humidor? How much power is my computer using?

Over a year and half ago, I placed my toaster on Twitter (@mytoaster). Since then, my toaster starting using other social networks and discovered online dating all by itself. That is a weird thought, “What if things get smarter and smarter?” Things will eventually be able to socialize with other things. My (sentient) toaster might even find another compatible toaster using eHarmony.

I am not saying that this is the best example of the Internet of Things, but what I am saying is that it’s a start. I believe in a future of connected things so strongly that I joined a start up company that enabled my toaster way back when I was more interesting than my things.

For a good primer on the Internet of Things, check the recent article on Silicon.com called, “Cheat Sheet: The internet of things”. My toaster even gets a tongue-in-cheek reference. Actually there are lots of great sites that are covering the Internet of Things and making things happen in this emerging industry – Singularity HubReadWriteWeb, Wired.com to name a few.

My guess is that you will hear more and more about The Internet of Things until it hits Smart Grid proportions, then you will hear about the next big thing – the smart internet of things grid perhaps.

She Thinks My Toaster is Hot

One day you put your toaster on a social networking site. And then on another day you find out that your toaster has more friends than you.

Twitter Toaster System

This little story sounds made up. Well, it’s not.

My toaster has had a Twitter page since December 2008, tweeting the status of my toast making habits for all of the world to follow. On occasion people even write to the toaster to ask what it’s toasting. Oddly enough, it can tell you.

I get asked, “Why have your toaster on the Internet?” Well, it’s a starting point for future projects and part sarcasm. I have been working on gizmos, web control, and power / resource management projects with my friend Jason Winters of ioBridge for over a decade. One day I had the idea to overlay appliance usage data onto a graph of my power consumption for my house. My theory is to use this appliance meta data to reduce the power I use everyday by pointing directly to the power hogs. It’s a start to my internet of things at my house. If you want to get start your own Skynet, visit Wired’s Wiki on making things talk. I use the IO-204 control and monitor module from ioBridge.com.

OK, mostly it’s sarcasm.

My Toaster has been recently written about on Wired.com, ReadWriteWeb, PC World, Tiscali, De Morgen, XYCity China, etc. If you want to hear about it straight from the bread slot, you can get live updates from my toaster by following @MyToaster on Twitter.

I am now jealous of my toaster which has made for awkward moments when I want some crunchy Wonder Bread.

Social Networking for My Toaster

My Toaster Tweets

That statement sounds odd. Well, let me explain. My friends would describe me as the kind of person that has a lot of time on their hands. They would be right. That time is never put to productive use, but over Thanksgiving I got the gumption to start a new project. Sometimes, I start little servo, robotic, web-based projects for my own gratification, but I get fed up with all of the time I invest just so I can impress my 3 friends that also have nothing do to over the holidays.

My friend Jason Winters has been working on an module that simplifies the connecting of projects to the internet. He sent me one of his ioBridge modules to beta test and my mind started spinning. My goal this Thanksgiving was to think of a crazy project that would be the most senseless thing someone has ever heard of before.

Again, My Toaster Tweets…

Twitter is a social networking site that allows you to tell the world your current status – kind of like a microscopic blog that gets to the point. You can write, “Hans is going to lunch” or “Hans is tired”, etc. It’s fun to follow people and see what they can do creatively with just a few characters of updates.

I use my toaster when I am home and I thought that the world may want to know when I’m toasting.

Twitter Screen Shot

How do you make a toaster twitter?

I grabbed my old bagel / toast toaster and glued a switch to the outside, so when the slider gets pressed down it triggers the switch and when it pops up, the switch opens (couldn’t be any more binary than that).

Toasting Position

The ioBridge module has a digital input that I can hook the switch up to and monitor that state of toasting or not. Using a terminal board, a pull up resistor (1k), and some alligator clips, I hooked up the resistor from the digital input to the +5v source from the module, and clipped my clips on the resistor and the ground. A few pictures are worth more than my description.

Toaster Hookup Close Up

Module Hookup

Here is the whole system hooked together:

Twitter Toaster System

The Web Stuff

Using the ioBridge website, I created an event widget that monitors the input state of that particular digital input. And when the input is “high”, the site sends an HTTP POST to the ThingSpeak API to send a message to Twitter. ThingSpeak calls this “ThingTweet” and is one of many services that you can use to build Internet of Things projects.

MyToaster IoT Gadget

Follow My Toaster on Twitter at twitter.com/mytoaster. I think that I proved that I have too much time on my hands.