Node-RED: Difference between revisions

From Axel Public Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(68 intermediate revisions by the same user not shown)
Line 1: Line 1:
This wiki document explains how to install and configure our Node-RED modules. At the moment, we have developed the following ones:
This wiki document explains how to install and configure our Node-RED modules. At the moment, we have developed the following ones:


[[File:GetTagValue.png|150px]]
[[File:GetTagValue.png|170px]]


[[File:SetTagValue.png|150px]]
[[File:SetTagValue.png|170px]]


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.
Line 9: Line 9:
After the installation, these nodes will appear into the function tab of the palette.
After the installation, these nodes will appear into the function tab of the palette.


Please be aware that this documentation page is intended for Raspberry Pi[[File:Raspi.png|30px]]only.  
Follow the guidelines taken from the section that fits with your own specific case, since you could use our pre-configured Raspbian image (RECOMMENDED) or, on the other hand, manually install our package, Node-RED and all its dependencies on a new virgin Raspbian. Instead, the last section provides you information on how to install our package on Windows.


Follow the guidelines taken from the section that fits with your own specific case, since you could use our pre-configured Raspbian image or, on the other hand, manually install our package, Node-RED and all its dependencies on a new virgin Raspbian.
__TOC__
 
 
==Use the pre-configured Raspbian image [[File:Raspi.png|30px]]==


__TOC__
'''If you downloaded our pre-configured Raspbian (see [[Raspberry_Pi]]), you don't have to do anything more since Node-RED is already set up to auto-start on boot and, as a result, ready to be used.'''
 
This image already comes with the project feature enabled and the dashboard and MySql nodes added. This is the recommended way to use Node-RED with LogicLab.


This section only gives you the information required to run the Example project and, if it is of interest, to enable the pre-installed MQTT message broker.




==<h3 style="color: red">Manual setup on a virgin Raspbian image</h3>==
=== Credentials ===
If you want to access to the command line, you can log in with the default user '''pi''' by specifying the following credentials:
user: '''pi'''
password: '''axel'''


This section explains how to manually install our package on a virgin Raspbian image.


'''If you have downloaded our pre-configured Raspbian, you don't have to follow this section since Node-RED is already installed and set up to auto-start on boot: skip to [[#Section_2|the section explaining how to use our package on our distributed image]].'''
=== Run the Example project ===
The '''Example''' folder containing the project core is already located at the requested path (i.e. '''/home/pi/.node-red/projects/''').


This project is binded to a LogicLab sample named '''RaspPI_PlcSample''': open it from LogicLab, then connect to your target and finally download the code.


=== <h4 style="color: red">[ Requirements ]</h4> ===
Reboot the system and then open up a browser and change the URL to your device address at port 1880 in order to open a Node-RED page.
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.''
You have to set our project as the active one: click on the menu button that you can see on the top-right side of your Node-RED page, then select '''Projects''' > '''Open''' > '''Example'''.


Now you should be able to see the example flows and work with them.


==== <h5 style="color: red">Install Node.js and npm</h5> ====
=== RabbitMQ ===
The package manager npm is provided along with the Node.js installation package.
Our pre-configured Raspbian also has an interesting package that you can interact with through the MQTT nodes provided by Node-RED: this is RabbitMQ.


Open up a terminal and execute the following commands:
==== What is it ====
<pre style="color: blue">
RabbitMQ is an open source message broker written in Erlang that implements the most widely used queue-based message protocols such as AMQP or MQTT. You can check additional information from [https://www.rabbitmq.com/ here].
sudo apt-get update
sudo apt-get dist-upgrade
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
</pre>


Now you can check that both Node.js and npm have been installed with:
==== Enable it ====
<pre style="color: blue">
Since it is disabled by default, if you want to use it you have to allow it to auto-run on boot with the following command:
node -v
npm -v
</pre>


Look [https://www.w3schools.com/nodejs/nodejs_raspberrypi.asp here] for further details.
sudo systemctl enable rabbitmq-server


==== <h5 style="color: red">Install Node-RED</h5> ====
then reboot the system.
You can install Node-RED using the following npm command:
<pre style="color: blue">
sudo npm install -g --unsafe-perm node-red
</pre>


Ignore any error regarding the module node-pre-gyp.
Now you should be able to use the MQTT nodes inside Node-RED and you can also check the RabbitMQ management dashboard at port 15672 of your device. The credentials to access the dashboard are the following:
username: '''pi'''
password: '''axel'''


Further information can be found [https://nodered.org/docs/getting-started/installation here].
==== Use the MQTT nodes ====
Now you can use the two Node-RED nodes to publish messages and to subscribe to specific topics of interest. Configure them with the IP address of the device that is running the RabbitMQ server service.


==== Disable it ====
If you enabled RabbitMQ, but you don't want to use is anymore, write this from command line:


sudo systemctl disable rabbitmq-server


=== <h4 style="color: red">[ Install the package ]</h4> ===
then reboot the system.
'''Download our package from [http://www.axelsw.it/pwiki/pub/LLSymbols_Node-RED-raspberry.zip here]'''.


After that, move the file you just downloaded to the following path:
'''/home/pi/'''


Now open up a terminal, unzip the file and change the directory path to the folder where Node-RED had been installed.
=== Disable / Re-enable Node-RED on boot ===
After that you can add the package by using the appropriate npm command (the following commands summarize all these steps):
This image comes with Node-RED ready to be used, but since you may want to run it manually to inspect the debug messages within the terminal, you can stop it from starting up on boot with the following command:


<pre style="color: blue">
sudo systemctl disable nodered
cd /home/pi
unzip LLSymbols_Node-RED-raspberry.zip -d .
cd /usr/lib/node_modules/node-red
sudo npm install /home/pi/LLSymbols_Node-RED
</pre>


Now you are ready to start Node-RED, but before that it's highly recommended that you enable the projects feature for your Node-RED installation.
and then reboot the system. Now start Node-RED from command line with


node-red start


=== <h4 style="color: red">[ Enable the projects feature ]</h4>  ===
to view the messages related to your nodes.
If you want to open and close projects as you please, you have to edit the '''settings.js''' file sited into your Node-RED installation folder.


If you have followed the steps above, the settings.js file should be located at this path:
Obviously, you can always set Node-RED to start up on boot again with:
  '''/home/pi/.node-red/settings.js'''
sudo systemctl enable nodered


Now edit it by adding or modifying (if it's already there) the following option within the module.exports block:
<pre style="color: blue">
editorTheme: {
      projects: {
          enabled: true
      }
},
</pre>


Finally, you can start Node-RED manually or by configuring it to start up on boot.
==Manual setup on a virgin Raspbian image [[File:Raspi.png|30px]]==


This section explains how to manually install our package on a virgin Raspbian image.


=== <h4 style="color: red">[ Start Node-RED manually ]</h4> ===
'''If you have downloaded our pre-configured Raspbian, you don't have to follow this section since Node-RED is already installed and set up to auto-start on boot (see above chapter).'''


Our nodes are designed to interact with LogicLab: open the project whose variables you want to read/write, then connect to the target and download the code.


Now you can start Node-RED with the following command:
=== Requirements ===
<pre style="color: blue">
In order to make this package work, you have to install the JavaScript runtime Node.js, the package manager npm and Node-RED. Whether you installed our setup or a virgin Raspbian image, in both cases a version of Node.js and npm comes along with your installation.
node-red start
</pre>


'''Our packages are currently built and tested on versions v12.18.2 of Node.js and v6.14.4 of npm and so it is recommended that you have installed these releases, but they should also work for previous Node.js major releases since our nodes are build with [https://nodejs.org/api/n-api.html#n_api_n_api N-API].'''




=== <h4 style="color: red">[ Configure Node-RED to auto-start on boot ]</h4> ===
==== Install Node.js and npm ====
The package manager npm is provided along with the Node.js installation package.


In order to make Node-RED auto-start on boot, please execute the following commands:
To download and install Node.js, it is recommended to download the binaries and install nodejs through apt-get:
<pre style="color: blue">
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo wget -O /tmp/download https://gist.github.com/bigmonkeyboy/9962293/download
sudo unzip /tmp/download -d /etc/init.d
sudo chmod 755 /etc/init.d/nodered
sudo update-rc.d nodered defaults
</pre>


You can check further information from [https://gist.github.com/bigmonkeyboy/9962293 here].
Now install it by running:
sudo apt-get install nodejs


And finally check the versions:
node -v
npm -v


Additional information can be found [https://github.com/nodesource/distributions/blob/master/README.md here] or [https://www.w3schools.com/nodejs/nodejs_raspberrypi.asp here].


=== <h4 style="color: red">[ Run the Example project ]</h4> ===
==== Install Node-RED ====
Note 1: you have to enable the projects feature in order to make this example work.
You can install Node-RED using the following npm command:
sudo npm install -g --unsafe-perm node-red


Note 2: you have to install the dashboard nodes and then add them to the palette in order to make this example work. Please check this [https://github.com/node-red/node-red-dashboard link] for additional information.
Further information can be found [https://nodered.org/docs/getting-started/installation here].


When you unzipped the LLSymbols_Node-RED-raspberry.zip file, you also got an '''Example''' folder; please move it to the following path:
=== Install the package ===
'''/home/pi/.node-red/projects/'''  
'''Download our package from [http://www.axelsw.it/pwiki/pub/LLSymbols_Node-RED_raspberry_2.0.0.zip here]'''.


This project is binded to the LogicLab example named '''RaspPI_PlcSample''': open it from LogicLab, then connect to your target and finally download the code.
You do not need to move our package to a specific path, since all our libraries are referenced with relative paths.
 
The zip file comes with the package that will be installed by npm, a directory containing the Example project that you may want to test later and a txt file containing the release notes.
Now you can install our package by this way (the following commands summarize all these steps; please note that you have to insert the correct version of the zip file  for the following command instead of "X.X.X"):
 
unzip LLSymbols_Node-RED_raspberry_X.X.X.zip -d .
sudo npm install -g node-red-contrib-LLSymbols-X.X.X.tgz


Now open up a browser and set the URL bar to your device IP address at port 1880: you should see a Node-RED empty flow.
This command will copy the whole content of the .tgz file into the directory containing the global installation on npm.
Now you are ready to start Node-RED, but before that it's highly recommended that you enable the projects feature for your Node-RED installation.


The next step consists of setting our project as the active one by creating a new empty project from '''Menu''' > '''Projects''' > '''New''' and by giving it a default name of your choice: this is not relevant to our goal, but this custom project is just created with the aim to enable the ''Open'' choice into the ''Projects'' tab of the ''Menu'', since this one is disabled if you have never created at least one project by yourself.  
=== Enable the projects feature  ===
If you want to open and close projects as you please, you have to edit the '''settings.js''' file sited into your Node-RED installation folder.


After that choose our example from '''Menu''' > '''Projects''' > '''Open''' > '''Example'''.
If you have followed the steps above, the settings.js file should be located at the path where all projects are saved for the Node-RED that is currently in execution:
  '''~/.node-red/settings.js'''


Now you should be able to see the example flows and you can start working with them.
Now edit it by adding or modifying (if it's already there) the following option within the module.exports block:
editorTheme: {
      projects: {
          enabled: true
      }
},


Finally, you can start Node-RED manually or by configuring it to start up on boot.


=== Start Node-RED manually ===


==<h3 style="color: red" id="Section_2">Use the pre-configured Raspbian image</h3>==
Our nodes are designed to interact with LogicLab: open the project whose variables you want to read/write, then connect to the target and download the code.


'''If you downloaded our pre-configured Raspbian, you don't have to do anything more since Node-RED is already set up to auto-start on boot and, as a result, ready to be used.'''
Now you can start Node-RED with the following command:
node-red


This image already comes with the project feature enabled and the dashboard and MySql nodes added.
=== Configure Node-RED to auto-start on boot ===


This section only gives you the information required to run the Example project and, if it is of interest, to enable the pre-installed MQTT message broker.
In order to make Node-RED auto-start on boot, please execute the following commands:
sudo wget -O /tmp/download https://gist.github.com/bigmonkeyboy/9962293/download
sudo unzip /tmp/download -d /etc/init.d
sudo chmod 755 /etc/init.d/nodered
sudo update-rc.d nodered defaults


You can check further information from [https://gist.github.com/bigmonkeyboy/9962293 here].


=== <h4 style="color: red">[ Credentials ]</h4> ===
If you want to access to the command line, you can log in with the default user '''pi''' by specifying the following credentials:
'''user: pi'''
'''password: axel'''




=== <h4 style="color: red">[ Run the Example project ]</h4> ===
=== Run the Example project ===
The '''Example''' folder containing the project core is already located at the requested path (i.e. '''/home/pi/.node-red/projects/''').
Note 1: You have to enable the projects feature in order to make this example work.


This project is binded to a LogicLab sample named '''RaspPI_PlcSample''': open it from LogicLab, then connect to your target and finally download the code.
Note 2: You have to install the dashboard nodes and add them to the palette in order to make this example work. Please check [https://github.com/node-red/node-red-dashboard this link] for additional information.


Reboot the system and then open up a browser and change the URL to your device address at port 1880 in order to open a Node-RED page.
By unzipping the LLSymbols_Node-RED_raspberry_X.X.X.zip file, you will see an '''Example''' folder. Please move it to the path containing all the projects created with your current execution of Node-RED:
'''~/.node-red/projects/'''


You have to set our project as the active one: click on the menu button that you can see on the top-right side of your Node-RED page, then select '''Projects''' > '''Open''' > '''Example'''.  
This project is binded to the LogicLab example named '''RaspPI_PlcSample''': open it from LogicLab, then connect to your target and finally download the code.


Now you should be able to see the example flows and work with them.
Now open up a browser and set the URL bar to your device IP address at port 1880: you should see a Node-RED empty flow.


The next step consists of setting our project as the active one by creating a new empty project from '''Menu''' > '''Projects''' > '''New''' and by giving it a default name of your choice: this is not relevant to our goal, but this custom project is just created with the aim to enable the ''Open'' choice into the ''Projects'' tab of the ''Menu'', since this one is disabled if you have never created at least one project by yourself.


=== <h4 style="color: red">[ RabbitMQ ]</h4> ===
After that choose our example from '''Menu''' > '''Projects''' > '''Open''' > '''Example'''.
Our pre-configured Raspbian also has an interesting package that you can interact with through the MQTT nodes provided by Node-RED: this is RabbitMQ.


==== <h5 style="color: red">What is it</h5> ====
Now you should be able to see the example flows and you can start working with them.
RabbitMQ is an open source message broker written in Erlang that implements the most widely used queue-based message protocols such as AMQP or MQTT. You can check additional information from [https://www.rabbitmq.com/ here].


==== <h5 style="color: red">Enable it</h5> ====
== Windows version [[File:Windows.png|30px]] ==
Since it is disabled by default, if you want to use it you have to allow it to auto-run on boot with the following command:
If you want to configure our package on Windows, first of all you have to install Node.js, npm and Node-RED.
<pre style="color: blue">
sudo systemctl enable rabbitmq-server
</pre>
then reboot the system.


Now you should be able to use the MQTT nodes inside Node-RED and you can also check the RabbitMQ management dashboard at port 15672 of your device. The credentials to access the dashboard are the following:
==== Install Node.js, npm and Node-RED ====
'''username: pi'''
1. Download the 32 bit or the 64 bit installer (they are both supported by Axel npm module) from [https://nodejs.org/ nodejs.org] and run it.
'''password: axel'''


==== <h5 style="color: red">Use the MQTT nodes</h5> ====
2. Add the module Node-RED with npm:
Now you can use the two Node-RED nodes to publish messages and to subscribe to specific topics of interest. Configure them with the IP address of the device that is running the RabbitMQ server service.
npm install -g node-red


==== <h5 style="color: red">Disable it</h5> ====
==== Install our npm package ====
If you enabled RabbitMQ, but you don't want to use is anymore, write this from command line:
1. '''Download our package according to your 32/64 bit Node.js installation and unzip it: '''
<pre style="color: blue">
sudo systemctl disable rabbitmq-server
</pre>
then reboot the system.


- '''[http://www.axelsw.it/pwiki/pub/LLSymbols_Node-RED_windows32_2.0.0.zip 32 bit]'''
- '''[http://www.axelsw.it/pwiki/pub/LLSymbols_Node-RED_windows64_2.0.0.zip 64 bit]'''


=== <h4 style="color: red">[ Disable / Re-enable Node-RED on boot ]</h4> ===
2. Install the .tgz file (replace the 'X.X.X' substring with the number of the downloaded version):
This image comes with Node-RED ready to be used, but since you may want to run it manually to inspect the debug messages within the terminal, you can stop it from starting up on boot with the following command:
<pre style="color: blue">
sudo systemctl disable nodered
</pre>
and then reboot the system. Now start Node-RED from command line with
<pre style="color: blue">
node-red start
</pre>
to view the messages related to your nodes.


Obviously, you can always set Node-RED to start up on boot again with:
npm install -g node-red-contrib-LLSymbols-X.X.X.tgz
<pre style="color: blue">
sudo systemctl enable nodered
</pre>


Now you should be able to start Node-RED and ready to enjoy our nodes.


==<h3 style="color: red">Windows version</h3>==
====Start Node-RED  ====
If you want to configure our package on Windows, first of all you have to install Node.js, npm and Node-RED.
node-red


==== <h5 style="color: red">Install Node.js, npm and Node-RED</h5> ====
== General issues ==
Please download the '''32 bit version''' of the Node.js installer from [https://nodejs.org/dist/v8.11.3/node-v8.11.3-x86.msi here] and run it.
If you are experiencing connection errors or problems regarding the debug tab of Node-RED not working properly and you are behind a Proxy, please make sure that it is configured to allow websocket connections through, or just disable the Proxy for your local addresses.


Now you can install Node-RED with the following command:
<pre style="color: blue">
npm install -g --unsafe-perm node-red
</pre>


==== <h5 style="color: red">Add our nodes</h5> ====
Download our package from HERE and unzip it into a folder you want. Now copy the path to that folder (for instance, let's assume it's called 'PATH') and,
from command line, move to your Node-RED main folder ('''\.node-red''').


Now type:
<pre style="color: blue">
npm install PATH\LLSymbols_Node-RED
</pre>





Latest revision as of 11:40, 21 July 2021

This wiki document explains how to install and configure our Node-RED modules. At the moment, we have developed the following ones:

GetTagValue.png

SetTagValue.png

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

After the installation, these nodes will appear into the function tab of the palette.

Follow the guidelines taken from the section that fits with your own specific case, since you could use our pre-configured Raspbian image (RECOMMENDED) or, on the other hand, manually install our package, Node-RED and all its dependencies on a new virgin Raspbian. Instead, the last section provides you information on how to install our package on Windows.


Use the pre-configured Raspbian image Raspi.png

If you downloaded our pre-configured Raspbian (see Raspberry_Pi), you don't have to do anything more since Node-RED is already set up to auto-start on boot and, as a result, ready to be used.

This image already comes with the project feature enabled and the dashboard and MySql nodes added. This is the recommended way to use Node-RED with LogicLab.

This section only gives you the information required to run the Example project and, if it is of interest, to enable the pre-installed MQTT message broker.


Credentials

If you want to access to the command line, you can log in with the default user pi by specifying the following credentials:

user: pi
password: axel


Run the Example project

The Example folder containing the project core is already located at the requested path (i.e. /home/pi/.node-red/projects/).

This project is binded to a LogicLab sample named RaspPI_PlcSample: open it from LogicLab, then connect to your target and finally download the code.

Reboot the system and then open up a browser and change the URL to your device address at port 1880 in order to open a Node-RED page.

You have to set our project as the active one: click on the menu button that you can see on the top-right side of your Node-RED page, then select Projects > Open > Example.

Now you should be able to see the example flows and work with them.

RabbitMQ

Our pre-configured Raspbian also has an interesting package that you can interact with through the MQTT nodes provided by Node-RED: this is RabbitMQ.

What is it

RabbitMQ is an open source message broker written in Erlang that implements the most widely used queue-based message protocols such as AMQP or MQTT. You can check additional information from here.

Enable it

Since it is disabled by default, if you want to use it you have to allow it to auto-run on boot with the following command:

sudo systemctl enable rabbitmq-server 

then reboot the system.

Now you should be able to use the MQTT nodes inside Node-RED and you can also check the RabbitMQ management dashboard at port 15672 of your device. The credentials to access the dashboard are the following:

username: pi
password: axel

Use the MQTT nodes

Now you can use the two Node-RED nodes to publish messages and to subscribe to specific topics of interest. Configure them with the IP address of the device that is running the RabbitMQ server service.

Disable it

If you enabled RabbitMQ, but you don't want to use is anymore, write this from command line:

sudo systemctl disable rabbitmq-server

then reboot the system.


Disable / Re-enable Node-RED on boot

This image comes with Node-RED ready to be used, but since you may want to run it manually to inspect the debug messages within the terminal, you can stop it from starting up on boot with the following command:

sudo systemctl disable nodered

and then reboot the system. Now start Node-RED from command line with

node-red start

to view the messages related to your nodes.

Obviously, you can always set Node-RED to start up on boot again with:

sudo systemctl enable nodered


Manual setup on a virgin Raspbian image Raspi.png

This section explains how to manually install our package on a virgin Raspbian image.

If you have downloaded our pre-configured Raspbian, you don't have to follow this section since Node-RED is already installed and set up to auto-start on boot (see above chapter).


Requirements

In order to make this package work, you have to install the JavaScript runtime Node.js, the package manager npm and Node-RED. Whether you installed our setup or a virgin Raspbian image, in both cases a version of Node.js and npm comes along with your installation.

Our packages are currently built and tested on versions v12.18.2 of Node.js and v6.14.4 of npm and so it is recommended that you have installed these releases, but they should also work for previous Node.js major releases since our nodes are build with N-API.


Install Node.js and npm

The package manager npm is provided along with the Node.js installation package.

To download and install Node.js, it is recommended to download the binaries and install nodejs through apt-get:

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

Now install it by running:

sudo apt-get install nodejs

And finally check the versions:

node -v
npm -v

Additional information can be found here or here.

Install Node-RED

You can install Node-RED using the following npm command:

sudo npm install -g --unsafe-perm node-red

Further information can be found here.

Install the package

Download our package from here.

You do not need to move our package to a specific path, since all our libraries are referenced with relative paths.

The zip file comes with the package that will be installed by npm, a directory containing the Example project that you may want to test later and a txt file containing the release notes. Now you can install our package by this way (the following commands summarize all these steps; please note that you have to insert the correct version of the zip file for the following command instead of "X.X.X"):

unzip LLSymbols_Node-RED_raspberry_X.X.X.zip -d .
sudo npm install -g node-red-contrib-LLSymbols-X.X.X.tgz

This command will copy the whole content of the .tgz file into the directory containing the global installation on npm. Now you are ready to start Node-RED, but before that it's highly recommended that you enable the projects feature for your Node-RED installation.

Enable the projects feature

If you want to open and close projects as you please, you have to edit the settings.js file sited into your Node-RED installation folder.

If you have followed the steps above, the settings.js file should be located at the path where all projects are saved for the Node-RED that is currently in execution:

 ~/.node-red/settings.js

Now edit it by adding or modifying (if it's already there) the following option within the module.exports block:

editorTheme: {
      projects: {
          enabled: true
      }
},

Finally, you can start Node-RED manually or by configuring it to start up on boot.

Start Node-RED manually

Our nodes are designed to interact with LogicLab: open the project whose variables you want to read/write, then connect to the target and download the code.

Now you can start Node-RED with the following command:

node-red

Configure Node-RED to auto-start on boot

In order to make Node-RED auto-start on boot, please execute the following commands:

sudo wget -O /tmp/download https://gist.github.com/bigmonkeyboy/9962293/download 
sudo unzip /tmp/download -d /etc/init.d
sudo chmod 755 /etc/init.d/nodered
sudo update-rc.d nodered defaults

You can check further information from here.


Run the Example project

Note 1: You have to enable the projects feature in order to make this example work.

Note 2: You have to install the dashboard nodes and add them to the palette in order to make this example work. Please check this link for additional information.

By unzipping the LLSymbols_Node-RED_raspberry_X.X.X.zip file, you will see an Example folder. Please move it to the path containing all the projects created with your current execution of Node-RED:

~/.node-red/projects/ 

This project is binded to the LogicLab example named RaspPI_PlcSample: open it from LogicLab, then connect to your target and finally download the code.

Now open up a browser and set the URL bar to your device IP address at port 1880: you should see a Node-RED empty flow.

The next step consists of setting our project as the active one by creating a new empty project from Menu > Projects > New and by giving it a default name of your choice: this is not relevant to our goal, but this custom project is just created with the aim to enable the Open choice into the Projects tab of the Menu, since this one is disabled if you have never created at least one project by yourself.

After that choose our example from Menu > Projects > Open > Example.

Now you should be able to see the example flows and you can start working with them.

Windows version Windows.png

If you want to configure our package on Windows, first of all you have to install Node.js, npm and Node-RED.

Install Node.js, npm and Node-RED

1. Download the 32 bit or the 64 bit installer (they are both supported by Axel npm module) from nodejs.org and run it.

2. Add the module Node-RED with npm:

npm install -g node-red

Install our npm package

1. Download our package according to your 32/64 bit Node.js installation and unzip it:

- 32 bit

- 64 bit

2. Install the .tgz file (replace the 'X.X.X' substring with the number of the downloaded version):

npm install -g node-red-contrib-LLSymbols-X.X.X.tgz

Now you should be able to start Node-RED and ready to enjoy our nodes.

Start Node-RED

node-red

General issues

If you are experiencing connection errors or problems regarding the debug tab of Node-RED not working properly and you are behind a Proxy, please make sure that it is configured to allow websocket connections through, or just disable the Proxy for your local addresses.




Node-red.png