IoT and the Smart Home, Series Overview

Hey everyone! Steve Perry here.

Do you like DIY projects? If so, make sure to check out my IoT Smart Home series at IBM developerWorks.

It is made up of three installments, which guide you through a DIY smart home project from start to finish.

Part 1 – Setup the hardware

In Part 1 I give you an overview of the project, including a complete parts list, and three videos that show you how to setup your Raspberry Pi 3, give you a quick tutorial of how to use a solderless breadboard, and how to setup the 433MHz receiver and transmitter modules on the breadboard.

Part 2 – Setup the software

In Part 2 I show you how to download, build, and use the software you’ll need to run on your Raspberry Pi to communicate with the Raspberry Pi, called WiringPi, and 433Utils,  how to use the WiringPi gpio utility, and show you how to capture the 433MHz encoding signals sent from the IoT device remote controls using a program you’ll build from 433Utils called RFSniffer.

Part 3 – Control the smart home

In Part 3 I show you how to setup your Watson IoT platform app that acts as the MQTT broker, how to build, test, and run the software that runs on the Raspberry Pi to control the smart home devices, and how to build and run the Android app that controls the system from your mobile phone.

Oh, there will be videos

Each part of the tutorial has three videos to let you see what I did to build the project, to help deepen your understanding of the technology, and to give you a jump start when you build the project for yourself.

In future posts, I’ll expand on each of these. I’m excited, and I hope you are too.

Get started with Part 1

To get started, check out Part 1, and order your parts. The entire project costs about 125USD, including the Raspberry Pi 3, and a 16GB micro SD flash drive. Not bad, IMO.

If you already have a Raspberry Pi 3 and 16GB (or larger) micro SD card, and want to get started, check out the video below, where I show you how to download and flash the Raspbian Stretch image onto the micro SD card and setup your Pi.

Thanks for reading!

–jsp

What is Node-RED?

Ah, the Internet of Things (IoT for all you acronym aficionados). It’s awesome, right? Throw in some JavaScript, and a browser, and what do you have? Node-RED!

Node-RED was created by IBM’s Emerging Technology Services team, and allows you to create functionality by wiring together flows of data between nodes using a browser. And it has gained tremendous popularity in the IoT space, by modeling bits of application functionality between IoT devices like sensors, cameras, and wireless routers.

But it’s so much more than that, and in this article, I’ll break it down for you.

What Problems Does Node-RED Solve?

It’s helpful to understand the problems a technology solves, or you might misapply it. So what problems does Node-RED solve?

High Barrier to Entry

Let’s face it, not everyone writes great code (I’m certainly not talking about you or me, of course). Coding has a high barrier to entry that can sometimes stifle innovation due to the gap between the idea and the code to implement it.

What happens to all those great, innovative ideas out there because nobody is around to code them?

Not only that, but not everyone thinks in code. Some people are more visual.

Prototypes are critical to innovation

If you’re going to pitch an innovative idea, you need something to show. You know, a straw man. That means you’ll need a prototype.

Let’s say you build a prototype. Now what? Prototypes are often just toy applications. How do you get from prototype to something useful?

And what about someone who doesn’t code? How would they build a prototype?

What Node Red is NOT

A new technology stack

Node-RED uses battle tested technologies as part of its technology stack like Node.js, JSON for metadata, JavaScript for coding, and almost any web browsers.

Of course, nodes can be written to allow processing in pretty much any way you like. Node-RED is super flexible!

XML based

I’m not terribly fond of XML – not because it’s not awesome but because in practice it’s so often misapplied (application metadata comes to mind) – and Node-RED doesn’t need a single shred of XML metadata to function.

Sure, there are contribs that allow you to work with XML, but the metadata of a Node-RED flow is not built on XML (but much more – IMHO – readable JSON).

A toy

Build a prototype in Node-RED and wow your customer. Then build on that prototype to create the finished product, whether that is a single new function, a collection of new functionality, or an entire application from browser to database.

Serious application functionality can be built using Node-RED. Don’t take my word for it. Using IBM’s BLOOP BLURP

Just for IoT

While Node-RED shines at the Edge, it can be used to solve pretty much any problem that can be modeled as a flow-based program (FBP).

An FBP is made up of processing components (the nodes) that process data (e.g., transform it from one form to another) and write the data out to other components to which they’re connected in a network of such components. FBP lends itself well to problems that don’t naturally fit traditional, sequential program models (e.g., multiplexing, and recursive programs).

The Solution

Enter Node-RED

Node-RED is:

  • A browser-based flow editing tool,
  • Built on Node.js, and
  • Designed for reuse – lots of pre-built nodes, or build your own and share them!

Okay, you may be thinking, how does that solve the problems listed earlier?

High Barrier to Entry

First off, Node-RED is simple to setup and use. You just install a few things (like Node.js, and the node-red package) and it’s ready to use. Seriously.

Then, once you’ve fired up Node-RED, you can use is to create flows visually. See, Flow-based programming is all about the flow of data: data in, data out. Visualize the data, Neo.

Finally, using Node-RED’s graphical flows makes building prototypes a snap:

  • Select pre-built nodes from the palette
  • Wire them together
  • Test
  • Repeat

Conclusion

So what are you waiting for? Give Node-RED a spin today.

You’ll be glad you did.

–jsp