NodeRed, in my opinion, is one of the most intuitive graphical programming tools in the SmartHome-/IoT-range.
In NodeRed, program sequences are not programmed (only) with program code but, to a large extent, with function blocks (nodes) that can be combined and connected with each other.
This reduces the hurdles for beginners and changers with NodeRed.
But before you can use NodeRed you have to integrate it into your SmartHome system.
How to install NodeRed on a RapsberryPi is described in the following article.
Hints for our lovely english readers: Basically, many of the articles on Nerdiy.de are translations from the original german articles. Therefore, it may happen here and there that some illustrations are not available in english and that some translations are weird/strange/full of mistakes or generally totaly wrong. So if you find some obvious (or also not obvious) mistakes don't hesitate to leave us a hint about that in the comment section.
Also please don't get confused, that instead of a "dot" often a "comma" is used as decimal separator. 🙂
- 1 Safety instructions
- 2 Affiliate links / advertising links
- 3 Requirements
- 4 Log in via SSH on the RaspberryPi
- 5 Update package management
- 6 Run installation script
- 7 Start NodeRed
- 8 Stop NodeRed
- 9 Restart NodeRed
- 10 Enable autostart of NodeRed
- 11 Call NodeRed interface
- 12 Security
- 13 Additional information
- 14 Have fun with the project
I know the following hints are always a bit annoying and seem unnecessary. But unfortunately, many people who knew it "better" from carelessness lost their eyes, fingers or other things or hurt themselves. In comparison, a loss of data is almost not worth mentioning, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Even the coolest project is worth no injury or other annoyance. https://www.nerdiy.de/en/sicherheitshinweise/
The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and shop via this link, Nerdiy.de receives a commission from the online shop or provider concerned. The price doesn't change for you. If you do your purchases via these links, you will support Nerdiy.de in being able to offer further useful projects in the future. 🙂
Before you start with the installation, you should have prepared the RaspberryPi so far that it can be reached via the network and controlled by SSH.
In the following list you will find all the parts you need to implement this article.
Log in via SSH on the RaspberryPi
To get started, you first need to log in to RasPi with SSH on Putty. How to do it is described in the article
Update package management
The package management in Linux is a "central point" over which various software packages can be installed. For this to work reliably, the lists and sources of package management should be updated before installing any 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 automatically installs and configures the required software packages.
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 the installation you can start NodeRed. Just follow the next steps. It is also recommended to set up the autostart of NodeRed.
The following command can be used to start NodeRed:
sudo systemctl start nodered
NodeRed can be stopped with the following command:
sudo systemctl stop nodered
Should you need to restart NodeRed, you can do so with the following command:
sudo systemctl restart nodered
Enable autostart of NodeRed
To start NodeRed automatically after restarting the RaspberryPI, you need to execute the following command. So after rebooting the RaspberryPi, you no longer have to worry about starting NodeRed manually.
sudo systemctl enable nodered.service
Call NodeRed interface
After installation, the configuration interface of NodeRed can be accessed under the IP address of your RaspberryPI and port “1880” in the web browser.
Enter the following in 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.
Unfortunately, after installation, your NodeRed installation is unfortunately configured as an open barn door. There are no hurdles (as soon as you’re in the same network as the RaspberryPi) over NodeRed commands on the RaspberryPi. You should definitely change this.
Tips can be found in the articles NodeRed – User Login Setup and NodeRed – Encrypt Connection.
You can find further information about NodeRed and some examples in the category “NodeRed” on Nerdiy.de. Go to category here.
Have fun with the project
I hope everything worked as described. If not or you have any other questions or suggestions, please let me know in the comments. Also, ideas for new projects are always welcome. 🙂
P.S. 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 appreciate it that I share these information with you, I would be happy about a small donation to the coffee box. 🙂