Node-RED: Difference between revisions

From Axel Public Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 12: Line 12:


=== Install Node.js ===
=== Install Node.js ===
Open up a terminal and execute the following command in order to install Node.js:
 
Windows:
Follow the link below:
[https://nodejs.org/en/ download Node.js]
 
Linux:
Open up a terminal and execute the following commands:
<pre style="color: red">
<pre style="color: red">
node-red start
sudo apt-get update
sudo apt-get install nodejs
</pre>
</pre>
Note: The package has been developed and tested with v8.11.1 of Node.js.
=== Install npm ===
Further information can be retrieved from the following links:  
Further information can be retrieved from the following links:  
* [https://nodejs.org/en/ Node.js]
* [https://nodejs.org/en/ Node.js]

Revision as of 14:31, 18 June 2018

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

  • GetTagValue
  • SetTagValue

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


Requirements

In order to make this package work, you have to install the JavaScript runtime Node.js, the package manager npm and Node-RED. The package manager is usually provided along with the Node.js installer, however you should make sure that both the versions you got are still supported by Node-RED.

Install Node.js

Windows: Follow the link below:

download Node.js

Linux: Open up a terminal and execute the following commands:

 sudo apt-get update
 sudo apt-get install nodejs

Note: The package has been developed and tested with v8.11.1 of Node.js.

Install npm

Further information can be retrieved from the following links:


Install the package

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 path that points to the main folder of the package to be installed (it contains a file named package.JSON).

cd /home/USER_NAME/.node-red
sudo npm install PATH_TO_FOLDER_WITH_FILE


Running

Now you can finally use the modules (nodes) of the package by starting Node-RED with the following command:

node-red start