In my opinion, NodeRed is one of the most intuitive graphical programming tools in the SmartHome/IoT area.
In NodeRed, program sequences are not (only) programmed with program code but largely with function blocks (nodes) that can be combined and connected with each other.
This reduces the hurdles for beginners and those switching to getting started with NodeRed.
Before you can use NodeRed, you first have to integrate it into your SmartHome system.
How to install NodeRed on a RapsberryPi is described in the following article.
I know the following notes are always kind of annoying and seem unnecessary. Unfortunately, many people who knew "better" have lost eyes, fingers or other things due to carelessness or injured themselves. Data loss is almost negligible in comparison, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Because even the coolest project is not worth injury or other trouble.
Affiliate links/advertising links
The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and make a purchase via this link, Nerdiy.de will receive a commission from the relevant online shop or provider. The price does not change for you. If you make your purchases via these links, you support Nerdiy.de in being able to offer other useful projects in the future. 🙂
Before you start with the installation you should prepare the RaspberryPi so that it is accessible via the network and controllable via SSH.
The following three articles describe what needs to be done to prepare the RaspberryPi:
RaspberryPi – setup for nerdiys!
RaspberryPi – The first configuration!
RaspberryPi – Control the RaspberryPi via SSH
In the following list you will find all the parts you need to implement this article.
Log in to the RaspberryPi via SSH
To start, you must first log in to the Rasp Pi with Putty via SSH. How to do this is in the article RaspberryPi - Control the RaspberryPi via SSH described.
Update package management
The package management in Linux is a "central place" through which various software packages can be installed. In order for this to work reliably, the lists and sources of the package management should be updated before each installation of new packages.
sudo apt-get update && sudo apt-get upgrade
Run installation script
Installing NodeRed is child's play thanks to an installation script provided by the developers. It installs and configures the required software packages automatically.
To start the installation script you just need to run the following command.
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
After installation you can start NodeRed. Simply follow the next steps. It is also recommended to set up the NodeRed autostart.
NodeRed can be started with the following command:
sudo systemctl start nodered
NodeRed can be stopped with the following command:
sudo systemctl stop nodered
If you need to restart NodeRed, you can do so with the following command:
sudo systemctl restart nodered
Enable NodeRed autostart
In order for NodeRed to start automatically after restarting the RaspberryPI, you must execute the following command. This means that after restarting the Raspberry Pi you no longer have to worry about starting NodeRed manually.
sudo systemctl enable nodered.service
Call up the NodeRed interface
After installation, the NodeRed configuration interface can be accessed using the IP address of your RaspberryPI and the port “1880” in the web browser.
To do this, enter the following into the address bar of your browser:
Of course, you have to replace “IP_EURES_RASPBERRYPI” with the real IP address or hostname of your RaspberryPI.
After installation, your NodeRed installation is unfortunately configured like an open barn door by default. There are no hurdles (as long as you are in the same network as the Raspberry Pi) to execute commands on the Raspberry Pi via NodeRed. You should definitely change this.
You can find tips on this in the articles NodeRed – Set up user login and NodeRed - Encrypt connection.
Further information on how to use NodeRed and a few examples can be found in the “NodeRed” category on Nerdiy.de. Go to category this way.
Have fun with the project
I hope everything worked as described for you. If not or you have questions or suggestions please let me know in the comments. I will then add this to the article if necessary.
Ideas for new projects are always welcome. 🙂
PS Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you think it's cool that I share the information with you, I would be happy about a small donation to the coffee fund. 🙂