11 Mar 2016

Node Red on Raspbian Jessie

Node Red is pre-installed with the November 2015 Raspbian Jessie release. Node Red has information regarding the install here. These are some notes on how it is installed for sys admins.

NPM

NPM is not installed so if you plan on adding nodes from the Node Red flow repository, you'll need to install npm:

sudo apt-get install -y npm
sudo npm install -g npm@2.x
hash -r

Installing Flows

To install a flow:

cd ~/.node-red
npm install node-red-{example node name}

Start & Stop

The start/stop script is installed at /etc/init.d/nodered. It supports start, stop & restart options.

sudo service nodered restart

To setup Node Red to automatically stat on boot, run this command:

sudo systemctl enable nodered.service

Logging

Node Red is configured to write log messages to:

/var/log/syslog

File Locations

Here are the locations of other key files & directories:

[table nl="~~"]
File / Directory,Location
User Directory,/home/pi/.node-red
Settings File,/home/pi/.node-red/settings.js
Flows File,/home/pi/.node-red/flows_raspberrypi.json
[/table]

 


Tags:
0 comments