Node-RED is a low-code development tool that allows you to create event-driven applications by connecting different nodes in a graphical interface. Nodes are pre-defined or custom-made blocks of code that can perform various tasks, such as interacting with hardware devices, APIs, online services, or other nodes. You can wire together nodes using a browser-based editor that provides a drag-and-drop functionality and a rich text editor for writing JavaScript functions. You can also import and export your flows as JSON files and share them with others through an online library. Node-RED is built on Node.js, which means it can run on various platforms, such as your local computer, a Raspberry Pi, a Docker container, or in the cloud. Node-RED is designed to make it easy to create applications for the Internet of Things (IoT), which is a network of physical objects that can communicate and exchange data over the Internet. Some examples of IoT applications that you can create with Node-RED are:
A smart home system that can control lights, temperature, security, and other devices based on sensors, timers, or voice commands.
A weather station that can collect and display data from various sources, such as temperature, humidity, wind speed, air quality, and rainfall.
A chatbot that can respond to user queries and provide information or services, such as booking a flight, ordering a pizza, or playing a game.
A dashboard that can monitor and visualize data from different sources, such as stock prices, social media trends, or machine performance.
A third part addon called button-card is a highly customizable component the supports JavaScript and templates. I use it for multiple things, including displaying the status of components in my home theater. This snippet is the template I use for displaying statuses in my control panels and theater remote.
For those using Philips Hue Play Sync Box, you can integrate it with Home Assistant. Because Home Assistant treats the sync box like a media play, your able to start/stop the light syncing and grab status information. I have a dashboard the shows a summary of status information for all the hardware in my media cabinet. This card uses the custom:button-card to display the status of the Play Sync box.
Note: This snippet makes use of the button-card template feature. The template I used for this can be found here:
type: custom:button-card
template: large_status
icon: hue:sync-box
name: |
[[[
var status = ""
if (states['media_player.theater_sync_box'].state == "idle" )
var status = "On - Sync Idle ";
else if (states['media_player.theater_sync_box'].state == "playing")
status = "On - Sync Active ";
else
return "Off"
status = status + "- " + entity.attributes.source
return status;
]]]
entity: media_player.theater_sync_box
variables:
label_var: Hue Play Sync
This snippet uses two entities, a door lock and door sensor, and displays the status to the user. Using combination of icons, icon color and text, the user can determine if the door is open, closed and locked.
Code:
- type: custom:mushroom-template-card
primary: Basement Door
secondary: >-
{{ 'Closed and Locked' if
is_state_attr('binary_sensor.basement_door', 'raw_state_text',
'Closed') and is_state('lock.basement_door_lock', 'locked') else
'Open' if is_state_attr('binary_sensor.basement_door',
'raw_state_text', 'Opened') else 'Closed and Unlocked' if
is_state_attr('binary_sensor.basement_door', 'raw_state_text',
'Closed')}}
icon: >-
{{ 'mdi:door-closed-lock' if
is_state_attr('binary_sensor.basement_door', 'raw_state_text',
'Closed') and is_state('lock.basement_door_lock', 'locked') else
'mdi:door-open' if is_state_attr('binary_sensor.basement_door',
'raw_state_text', 'Opened') else 'mdi:door-closed' if
is_state_attr('binary_sensor.basement_door', 'raw_state_text',
'Closed')}}
icon_color: >-
{{ 'light-green' if is_state_attr('binary_sensor.basement_door',
'raw_state_text', 'Closed') and
is_state('lock.basement_door_lock', 'locked') else 'yellow' if
is_state_attr('binary_sensor.basement_door', 'raw_state_text',
'Closed') else 'red' is
is_state_attr('binary_sensor.basement_door', 'raw_state_text',
'Opened')}}
entity: binary_sensor.basement_door
hold_action:
action: more-info
This code snippet is an example of a cover status. In this example, we are displaying the current status of a group of blinds to the user. This snippet uses the Mushroom Dashboard cards. Two things are happening here:
The secondary information is dynamic and changes depending on the status of the entity (in this case “cover.basement_window_shades”):
Open if the shade position is 0
Closed if the position is 100
PartiallyOpen if the shade position is anything other that 0 or 100
Similar to #1 the icon displayed is based on the status:
mdi:window-closed if the shade position is at 100. Note: mdi:window-closed shows a window with no shade giving the user the impression that the shade is fully open.
mdi:roller-shade-closed if the shade position is at 0.
Home Automation is defined as building automation for the home. Homes with some home automation are often called intelligent homes or smart houses. A home automation system typically connects electronically controlled devices to a central hub that provides a user interface. This interface can be an app on your phone, a website you access for your computer or mobile device, or via a digital assistant like Amazon Alexa, Apple’s Siri, or Google Assistant. Its goal is to make your life easier by automating mundane tasks.
The benefits of home automation include safety, convenience, control, comfort, and energy savings. Here are some of the most significant benefits that home automation provides:
Home automation is convenient. With home automation, you can control your home’s lights, thermostat, and even your coffee maker from anywhere in the world.
Home automation creates comforting routines. With innovative home technology, you can create routines that make your life easier and more comfortable.
Home automation offers data and control. With smart home technology, you can monitor your energy usage and control your appliances remotely.
Home automation increases safety and security. Using motion detectors, you can turn on outdoor lights, trigger a camera to record video of someone at your front door, or alarm an intruder by sounding the alarm.
Today’s home automation technology is far different from 10 years prior. Today we have technologies like Virtual Assistants and devices like Philips Hue smart lighting. Our cars are more intelligent and often connected to the internet. As a technology enthusiast, all of this is amazing to me. I can ask my smartwatch to open my garage door or unlock my front door. From anywhere in my home, I can access many devices from my smartphone. I can turn my bedroom lights on or set the temperature before leaving my living room. All of this sounds great. However, there are two significant problems with today’s home automation marketplace. Interoperability and security. This article discusses interoperability today and what it should look like in the future. We will also touch on an open-source project called Home Assistant and discuss how it helps solve the interoperability problem.
Today, we have multiple competing technologies that we can use to make our homes smarter. For example, to send instructions to a smart device, you need some method to communicate with it. Z-wave and Zigbee are two incompatible radio technologies that allow devices to talk wirelessly to a central hub. This requires you to lock yourself into one of the two’s ecosystems or buy and support both using two different hubs. For the non-technical homeowner, this can be intimidating to figure out. A new technology that was recently introduced, Matter, aims to fix this issue. Matter has the backing of industry insiders such as Amazon, Apple, Google, Samsung, Legrand, and Lutron, to name just a few.
Another area where interoperability is an issue is Virtual Assistants (VA). Virtual Assistants allow you to interact with devices using just your voice. Amazon’s Alexa, Alphabet’s Google Assistant, and Apple’s Siri are the three most popular Virtual Assistants. You typically find an assistant installed on hardware sold by these companies. More so than Z-wave and Zigbee, users are locked into a proprietary ecosystem once they purchase one of their devices. Unfortunately, you need to ensure that any smart devices, such as lights or smart thermostats, are compatible with your preferred VA.
Thankfully, there are solutions to the interoperability problem. One mentioned earlier, Matter, has broad support among device manufacturers and tech companies. If your smart device or virtual assistant supports Matter, you know your devices will be compatible. However, as of 2023, there aren’t many Matter devices on the market.
Another solution is to use a central control system. Several good open-source systems are out there, including OpenHAB, Hubitat, and my favorite, Home Assistant.
Home Assistant (HA) is an open-source software project supported by a vibrant community of developers. The software can be installed on almost anything, from a Raspberry PI to your home PC. HA is modular and extensible. Want to use Zigbee-based lights such as Philips Hue? You can purchase a Zigbee USB radio, plug it into your HA device and start pairing and adding your lights. Do you want to use one of those Yale keyless locks you’ve been eyeing at Lowes, but it only supports Z-wave? Purchase a Z-wave USB radio, plug it into your HA device, and pair your newly installed lock. What about Virtual Assistants? Sure, HA supports all Virtual Assistants, including ones you probably have never heard of. HA is then where the automation magic happens. Using one of several methods, you can create automation rules that make your smart home truly smart. Do you want your outside lights to come on an hour before sunset? Easy, create just that rule. Take it a step further, purchase an outdoor sensor that measures how bright it is out and make an automation that turns your lights on when the sensor drops below a certain level. Does your wife like to open the windows in your house during the spring but leave the thermostat on so that your heat the outside? Purchase a supported smart thermostat and integrate your burglar alarm with HA, and now you can’t create a rule that turns off your HVAC anytime your windows are open for longer than five minutes.
Hopefully, this helps you understand home automation and smart homes. Later this week, I’ll post more on Home Assistant and how I use it to make my house a smart home.
Touchscreen control panels offer you, your loved ones, and your guests easy and convenient access to your smart home. Companies such as Control4 offer several touchscreens variations, including wall-mounted and tabletop devices. However, there are several drawbacks to these:
Cost
Proprietary ecosystem
Control
For me, the last one is the biggest. If you want to make a change, such as adding a new device, you need to go through a sytems integrator to make the change for you. This drawback can be particularly annoying if you’re tech-savvy enough to make the changes yourself.
I use Home Assistant (HA) as a smart home controller in our house. HA has a built-in dashboard called Lovelace, which allows you to build web-enabled interfaces for controlling your smart home. So for me, jumping into a propriety ecosystem also didn’t make sense.
I need a device with a touch screen that can access my smart home controller via a wifi network. After much research, I couldn’t find a cost-effective, open-source control panel. So I did what any sound engineer would; I built my own.
I developed a solution consisting of a Samsung Galaxy Tab A 8″ tablet mounted to the wall using a VidaMount On-Wall Tablet Mount. My biggest challenge was getting power to the tablet. I solved this by installing a recessed outlet with a USB port and wiring it to a light switch in the room where the control panel was going. I then installed the VidoMount over the recessed outlet, connected the tablet to the USB port of the outlet, and installed the tablet.
Here is a list of the parts I used for the control panels and installation. I’ll provide the steps I took to do the installation and some pictures.
You will also need some drywall anchors, wire nuts and approximately 18″ of Romex electrical cable.
All together, these parts cost me less than $500 plus labor per unit installed. Control4’s equivalent T4 8″ In-wall unit (SKU: C4-T4IW8-XX) can cost upwards of $1100 before install labor and programming.
Before we discuss installation, here is a quick note:
If you’re not an electrician and you are uncomfortable with touching your home’s electrical systems, hire one. Please use common sense and turn off your electricity before doing any of the work listed below.
Step 1: Turn of the room’s electrical breaker
Step 2: Remove your existing light switches from the gang box
Step 3: Locate a space about approximately 12″ above the rooms light switch. Ensure its approximately 1″ from any studs. Take the VidaMount, remove the front bezel and place the mount on the wall at this location. Ensure that the mount is level. Using a pencil, trace the inner portion of the mount on the wall. Then using the pencil, make the 4 screw holes. Install drywall anchors at these locations.
Step 4: Take the Arlington electrical box, remove the bezel and place the box, open side facing the wall withing the tracing you just did for the VidaMount. Using your pencil, trace the outside of the electrical box.
Step 5: Using a drywall saw, cut along the tracing you did for the ELECTRICAL BOX only. You should end up with something similar to this:
Step 6: Take your Romex cable and run it between the light switch electrical box up though the wall to the hole you just cut.
Step 7: Take the Arlington electrical box and insert the Romex into the hole that is locate in the box of the electrical box.
Step 8: Insert the electrical box into the newly cut hole until its 9/10ths of the way in. Install the outer bezel and then1st tighten the bezels screws. Then tighten the mounting wing screws until the bezel is pulled firmly against the wall. If you tighten the mounting wings screws 1st, you run the risk of pulling the box completely through the wall.
Step 9: Install the Leviton outlet by properly wiring the Romex to the outlet and installing the outlet into the Arlington electrical box. The switch side of the Romex should then be wired the electrical supply side of the light switch. If you wire to the side that goes to the lights themselves, turning the light switch off will disconnect power to the tablet.
Step 10: Install the VidaMount over the top of the Arlington electrical box. Do not over tighten the screws. The bezel for the electrical box will cause a 5mm gap between the VidaMount and the wall. This is OK. Over tightening the screws will cause the VidaMount to warp and create issues when installing the tablet.
Step 11: Connect your tablet to the USB cable and then connect the USB cable to the outlet. If you want, you can coil the USB cable and tuck it into the recessed area of the electrical box.
Step 12: Install the tablet into the VidaMount and then install the VidaMount’s bezel. Note. Depend on how your USB cable is constructed, you may need to shave some plastic off of the inside of the bezel in order to install the tablet and cable. This can easily be done with a knife or Dremel.
Step 13: Turn on the room’s electrical breaker. If all is well the panel should be charging.