Node-RED: Difference between revisions

From Axel Public Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 27: Line 27:
When you execute this script, give confirm to install the Pi-specific nodes and - when asked - do not start Node-RED yet.
When you execute this script, give confirm to install the Pi-specific nodes and - when asked - do not start Node-RED yet.


Afer that, execute the following commands:
After that, execute the following commands:
<pre style="color: red">
<pre style="color: red">
  sudo apt-get update
  sudo apt-get update
Line 33: Line 33:
</pre>
</pre>


Noy you are ready to start Node-RED.
Now you are ready to start Node-RED.
Further information can be retrieved [https://nodered.org/docs/hardware/raspberrypi here].
Further information can be retrieved [https://nodered.org/docs/hardware/raspberrypi here].



Revision as of 14:59, 19 June 2018

This wiki document explains how to install the package that contains the following modules:

GetTagValue.png

SetTagValue.png

These nodes interact with LogicLab and their aim is to, respectively, read/write a value for a requested symbol target.


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

Now you are ready to start Node-RED. Further information can be retrieved 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.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.

cd /home/pi
unzip LLSYmbols_Node-RED.zip .
cd /YOUR_PATH_TO/.node-red
sudo npm install /home/pi/LLSymbols_Node-RED


Run Node-RED

  • Debian:
node-red-start
  • Windows:
node-red


Node-red.png