Friday, February 19, 2016

Node-RED

Node-RED is a visual tool for wiring the Internet of Things - hardware devices, APIs and online services in new and interesting ways.


INSTALL Node-RED


sudo apt-get update
sudo apt-get install nodered

To start Node-RED, you can either:

on the Desktop, select Menu -> Programming -> Node-RED.
or run node-red-start in a new terminal window.
To stop Node-RED, run the command node-red-stop


Adding nodes


To add additional nodes you must first install the npm tool, as it is not included in the default installation. The following commands install npm and then upgrade it to the latest 2.x version.

sudo apt-get install npm
sudo npm install -g npm@2.x
cd ~/.node-red
npm install node-red-{example node name}

Extra Nodes


To install extra nodes make sure you are in your user-directory, by default this is ~/.node-red.

For example the Pibrella node can be installed as follows

npm install node-red-node-pibrella

You then need to stop and restart Node-RED to load the new nodes, and then refresh the flow editor page in the browser.

node-red-stop
node-red-start


This guide will help you get Node-RED installed and running in just a few minutes.
  1. Installation
  2. Upgrading
  3. Running
  4. Creating your first flow
  5. Creating your second flow

No comments:

Post a Comment