Node-RED: Difference between revisions
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
These nodes interact with LogicLab and their aim is to, respectively, read/write a value for a requested symbol target. | These nodes interact with LogicLab and their aim is to, respectively, read/write a value for a requested symbol target. | ||
After the install, these nodes will appear into the function tab of the palette. | |||
__TOC__ | __TOC__ | ||
Line 18: | Line 20: | ||
=== | ===Debian=== | ||
==== Install Node.js, npm and Node-RED ==== | ==== Install Node.js, npm and Node-RED ==== | ||
Line 39: | Line 41: | ||
=== | ===Windows=== | ||
==== Install Node.js and npm ==== | ==== Install Node.js and npm ==== | ||
Line 62: | Line 64: | ||
After that you can add the package by using the npm command shown below. Be careful to specify the full path that points to the main folder of the downloaded package. | After that you can add the package by using the npm command shown below. Be careful to specify the full path that points to the main folder of the downloaded package. | ||
=== | ===Debian=== | ||
<pre style="color: red"> | <pre style="color: red"> | ||
Line 73: | Line 75: | ||
Now you are ready to start Node-RED. | Now you are ready to start Node-RED. | ||
=== | ===Windows=== | ||
Extract the folder LLSymbols_Node-RED from LLSymbols_Node-RED-windows.zip (for instance on your Desktop) and then follow these steps: | Extract the folder LLSymbols_Node-RED from LLSymbols_Node-RED-windows.zip (for instance on your Desktop) and then follow these steps: | ||
Line 85: | Line 87: | ||
== Run Node-RED == | == Run Node-RED == | ||
=== | ===Debian=== | ||
<pre style="color: red"> | <pre style="color: red"> | ||
node-red-start | node-red-start | ||
</pre> | </pre> | ||
''Important'': if you started Node-RED but | ''Important'': if you just started Node-RED but still don't see the nodes into the function tab, stop it with | ||
<pre style="color: red"> | <pre style="color: red"> | ||
node-red-stop | node-red-stop | ||
Line 97: | Line 99: | ||
=== | ===Windows=== | ||
<pre style="color: red"> | <pre style="color: red"> | ||
node-red | node-red |
Revision as of 09:09, 20 June 2018
This wiki document explains how to install the package that contains the following modules:
These nodes interact with LogicLab and their aim is to, respectively, read/write a value for a requested symbol target.
After the install, these nodes will appear into the function tab of the palette.
Guide
In order to make this package work, you have to install the JavaScript runtime Node.js, the package manager npm and Node-RED.
Note: The package has been developed and tested with v8.11.1 of Node.js and v5.6.0 of npm.
Debian
Install Node.js, npm and Node-RED
If you have a version of Raspbian, or other Debian based install, the following script will add all the required dependencies:
bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)
When you execute this script, give confirm to install the Pi-specific nodes and - when asked - do not start Node-RED yet.
After that, execute the following commands:
sudo apt-get update sudo apt-get install --reinstall nodered
You can check further information here.
Otherwise, if you are on Windows you have to follow the guide below.
Windows
Install Node.js and npm
The package manager npm is provided along with the Node.js install package: You can download and install it from here.
Further information can be found here.
Install Node-RED
You can install Node-RED on PC using the following npm command:
sudo npm install -g --unsafe-perm node-red
Further information can be found here.
Install the package
Download LLSymbols_Node-RED-debian.zip or LLSymbols_Node-RED-windows.zip from here and extract the content wherever you want on your device. Open up a terminal and change the directory path to the folder where Node-RED has been installed. After that you can add the package by using the npm command shown below. Be careful to specify the full path that points to the main folder of the downloaded package.
Debian
cd /home/pi unzip LLSymbols_Node-RED-debian.zip -d . cd .node-red npm install /home/pi/LLSymbols_Node-RED
Now you are ready to start Node-RED.
Windows
Extract the folder LLSymbols_Node-RED from LLSymbols_Node-RED-windows.zip (for instance on your Desktop) and then follow these steps:
cd .node-red npm install C:\Users\USER_NAME\Desktop\LLSymbols_Node-RED
Now you are ready to start Node-RED.
Run Node-RED
Debian
node-red-start
Important: if you just started Node-RED but still don't see the nodes into the function tab, stop it with
node-red-stop
and then start it again.
Windows
node-red