Table of Content
- Download the eBook
- MODULE 7: Sending Notifications with Node-RED
- Six smart home ecosystems worth checking out
- Build an Entire Home Automation System with a Raspberry Pi and Arduino
- MODULE 4: Introducing the ESP32 and ESP8266 Boards
- Home Automation Projects
- MODULE 3: Getting Started with MQTT
- Devices for starting a smart home
When you’re done looking at the list, hit Ctrl+X to exit Help menu. Now let’s say you’re working on your text file and you want to save it and exit nano. Unit 3 - Editing Files using the Terminal Nano is an easy to use text editor that is installed by default in Raspbian distribution and many other Linux distributions. Then go to the Connection tab, type localhost in the server field and I’ll the other settings are configured properly by default.
You can minimize threats by sticking with trusted manufacturers, using strong passwords, and setting up two-factor authentication if available. Check out our guide to protecting your smart home from hacking for more tips. Exporting Now with the nodes highlighted, you open the top Menu, go to Export and select Clipboard. Unit 1 - Creating Master Switches or Modes In any home automation system, it’s useful to create specific modes tailored for your home. For instance, it’s handy to press a button that turns on/off all the lights in your home. With Node-RED this can be accomplished with what I call a master switch.
Download the eBook
Setup In the setup() function, you need to set the LED as an OUTPUT and the motion sensor is set as an INTERRUPT that is activated in RISING mode. The motionTriggered control variable is used to trigger the notification message to the Node-RED Dashboard just once. So you can send commands from the Node-RED Dashboard to arm/disarm the smoke sensor. Throughout this Unit you’re going to use the DHT11 sensor. Setup_wifi The setup_wifi() function connects your ESP8266 to your router and you don’t need to modify anything.
If you don’t have a Raspberry Pi, you can use Digital Ocean , but you’ll need to pay for a monthly plan. We use a step-by-step teaching approach, so all the modules and corresponding units are straightforward to follow even with no previous experience. This Module explains how to set up a Cloudflare tunnel to access your Node-RED home automation system and InfluxD monitoring dashboards from anywhere. Use interrupts to publish MQTT messages when motion is detected.
MODULE 7: Sending Notifications with Node-RED
However, you can add as many as you want and extend this project to other rooms in your home. Creating the Flow In this flow, you’re going to turn your outlets on/off according to a threshold value. Unit 5 - Triggering Outlets with Temperature and Luminosity This Unit shows you how to trigger your outlets based on sensor values that you define.

A new window called dashboard opens in the right side. That’s were you can create tabs, groups and organize the buttons of the interface. Now you have an SSH communication established with your Raspberry Pi. This will be useful to install software in your Pi, run your programs, create folders or files, etc... Here’s a quick overview of the application that we’re going to build.
Six smart home ecosystems worth checking out
Creating a simple flow Let’s test a simple example of a flow. Running Angry IP Scanner Now, run the Angry IP Scanner. When you launch the software, it should automatically pick the IP Range for you network, so all you need to do is press Start and wait a few seconds.
The Inject node has a great feature that I haven’t covered. It’s called “Repeat” and you can set the Inject node to be automatically triggered “at a specific time”. In the next Unit, you’re going to learn how you can trigger these modes or any NodeRED node automatically with time-based events. Testing the Master Switch Open the Node-RED Dashboard tab. If you press the Master Switch, you can instantly control all the other Switches. If the smokeValue is greater than the smokeThres value and if the sensor is armed, it sends a warning message saying “SMOKE DETECTED” to the Node-RED Dashboard.
Build an Entire Home Automation System with a Raspberry Pi and Arduino
You simply connect an E27 lamp to the E27 remote controlled holder. Reconnect The function reconnect() reconnects your ESP to your MQTT broker. Set the On Value to “1” and the Off Value to “0“. Then, it configures the module with your own credentials . You actually need to replace those 3 variables with your credentials, so that your ESP8266 can connect to your network and MQTT broker.

At this moment, the Node-RED Dashboard is only accessible when you are connected to your network. Luckily, in just a few minutes you’ll be able to control and monitor your home from anywhere. Callback Inside the callback() function, you receive commands from the Node-RED Dashboard to actually arm/disarm the motion sensor.
Unit 3 - Testing the Installation To test the ESP8266 add-on installation, let’s see if we can blink an LED with the ESP8266 using the Arduino programming language. Installing Arduino IDE Grab the file that you have just downloaded and open the Arduino IDE application file . Programming the ESP8266 with Arduino IDE There are a few ways of programming the ESP8266. In this course you’ll program your ESP using the Arduino IDE software.

As you add more goodies to your smart home, you can create more routines and automations with your existing gear. We also include links to relevant comparisons of the best smart home products and possible combinations of devices to help you choose your next smart product. Below, we highlight some of our favorite products for smart home beginners that are easy to use, affordable, or too good to pass up.
In the next Module, we’re going to explore the MQTT protocol to integrate with your RPi and other popular development boards . Testing the application Now, press the square of the Inject 1 node. Double-click the first Inject node to edit its properties. Open the debug window and click the Inject node to trigger the “Hello!
For example, adjust a smart bulb to the right brightness and color to set the mood as you curl up with a good book. A smart hub is traditionally a device which controls other devices through protocols like Z-Wave and Zigbee. Although this type of tangible hub still exists , it's becoming more common to see virtual hubs that link accounts of different Wi-Fi devices over the internet . While a security camera's primary goal is to record events in and around your home, they can also act as a video intercom thanks to two-way audio. The Arlo Pro 4 (about $200) is one of our favorite security cameras because it boasts excellent video quality and is compatible with tons of smart home devices.