To save write cycles on your SD Card you can install Log2Ram which stores the Log Files in memory. This isn't strictly necessary but highly recommended as it dramatically increases the lifespan of the Pi SD card.
First, install git:
sudo apt -y install git
Get log2ram from the git repository:
git clone https://github.com/azlux/log2ram.git
Enter the new directory and make the install script executable, then run the script:
cd log2ram chmod +x install.sh sudo ./install.sh
Finally, reboot the Pi:
sudo reboot now
Check if log2ram is running. The command
should reveal it as an entry:
log2ram 40M 452K 40M 2% /var/log
After that you can install Node.js and Node-Red.
bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)
To run Node Red from the terminal
To run Nore-Red in background on boot:
sudo systemctl enable nodered.service
Node-Red is now fully set up and can be reached on port 1880 by default.
While this configuration already offers some functionality, there are several purpose-built nodes for usage on Andino boards. A full list of all available nodes can be viewed by going to the Node-Red Settings, selecting Palette and Install. Here, search for andino to see a list of all Nodes.
All nodes can be installed in two ways:
Search for the package name of the node/node collection in the Palette manager (see section above)
Install the node with npm: Run the following command in the Node-Red directory - per default: ~/.node-red
sudo npm install packageName
The following Nodes are available for Andino boards:
Package name: node-red-contrib-andinox1
This Node enables processing of input signals of the Andino X1 board and controlling the relays of the X1 by enabling communication between the Raspberry Pi and the Arduino controller. What this Node does specifically is:
1) Converting incoming messages from the Arduino controller to an easily processable format (seperate integers)
2.) Converting a boolean input signal to a relay command processable by the Arduino controller.
For detailed documentation on the node, refer to Andino X1 Node.
Package name: node-red-contrib-andino-sms
This collection includes four nodes that facilitate sending and receiving SMS messages on an Andino board using a 2G or 4G modem.
For setup instructions refer to Andino SMS Nodes
Package name: node-red-contrib-andinooled
This node enables controlling the OLED display of Andino IO devices easily through NodeRed.
For setup instructions refer to OLED display control node (Adafruit SSD1306).
This node also has some other prerequisites, for detailed documentation follow Andino IO: Using the OLED display.
Some more information and samples about Node Red