Node-RED visual designer for home automation

Adrian Biffen, Senior Partner

Node-RED running on the Raspberry Pi with Alexa automates our shade motors and window openers

As previously noted, the Raspberry Pi® is a credit-card sized computer that enables people to explore computer programming for a very low cost. The Node-RED visual design system for home automation comes pre-installed with the default Raspbian operating system for the Pi. Node-RED can also be installed on any PC (Windows, Mac, etc.).

You can convert the Pi into a very effective, low cost home automation system with our BroadLink® RF-IR hub, providing direct control with Node-RED of our roller blind motors, window openers, and many other devices.

Node-RED runs as a web server on your local network, and it can also be accessed from internet at a later time, if you wish. Voice control with Alexa™ can be easily added.

The picture at left shows a small portion of the extensive Node-RED palette, displaying some of the BroadLink® node components. To start using these nodes, you just drag these components onto the design area - it is very easy to do!

The Node-RED Design Screen

This is a screen capture of what you might see when you point your browser to the Node-RED system (this is an Alexa FLOW for lighting):

Node-RED is a visual design program for IoT

There are 4 main elements visible:

  • NODE component selector PALETTE panel on the left
  • system DESIGN panel in the center (may have multiple tabs)
  • interconnect WIRES connect NODES in DESIGN panel to create the FLOW
  • information OUTPUT panel on right (showing feedback from NODE FLOW testing)

The 4 items above are the essence of the Node-RED system. A double click on a NODE in the DESIGN panel opens a dialog box to set PARAMETERS for that NODE.

Loading the Node Components for BroadLink™ & Alexa™

The picture below shows where the system menu is (note mouse pointer at top right). This menu allows you to add node components from the extensive Node-RED library, such as the BroadLink™ nodes, and to generally manage various aspects of the Node-RED system.

Node-RED dialog example for Alexa control of blinds, shades, and lighting

The "Manage palette" command is used to add (and remove) node components. To add the BroadLink™ node, you would search the library for "node-red-contrib-broadlink" and just click "Install" to load the nodes into the palette. This particular node set has been provided by a Node-RED user, Vladimir Filippov.

If the DASHBOARD tab is not displayed in the right hand panel, you can load the dashboard component by searching for "node-red-dashboard".

There are several ways to set up Alexa™ voice control, and we are chose a simple solution from a user in Singapore. The advantage is that it does not require an account setup with Amazon, or the setup of a "SKILL". You can go the SKILL route if you prefer, if you want a cloud-based solution, but there is a learning curve associated with it.

We are focused on providing a simple solution, and the Alexa node component we are using emulates the Philips HUE™ lighting system, which is already built into Alexa™. It does not require any complicated programming; to add this node, search the library for "node-red-contrib-alexa-local".

You can also use the TEMPLATE node in the Node-RED UI palette area to create nice gauges; here are some examples of Node-RED gauges created with Rgraph.

----------------------------------------------

Buy The RF-IR Hub In Our Online Store

We have the excellent BroadLink phone apps that are very capable, and they work stand-alone, the RPi is not needed. You will have direct control over our blind motors and window openers. You will need to set up the phone app if you want to implement the system described in this series because it uses some of the phone files to access the control codes.

You can purchase these products in our DIY online automation store.

We sincerely hope you enjoy our advanced technology products; if you have any questions, please contact us at any time!