Node-RED & Dashboard, OPC UA, MQTT

After succefully installing Node-RED on AXC F 2152, Firmware 2019.LTS I am trying to add the Dashboard, OPC UA and MQTT

using the commands “npm install -g node-red-contrib-[xxx]”. My problem is to get the error message “Incoming packet was garbled on decryption”. I am using WinSCP/PuTTY from a VM (Windows 7). How can I continue?

Hello, A google search suggests that this error appears when there is a problem with the ssh client, not the ssh server. You could check this by trying the same commands from a Linux VM. If this works, then it’s more likely that the problem is with your PuTTY setup. - Martin.

Hi Martin, with this command it worked: npm install -g node-red-contrib-iiot-opcua**--unsafe-perm**( --unsafe-perm was missing) And I stopped the plcnext process before installing. Thanks! Götz

Hello What command did you use to stop PlcNext?

Hello. I have used the same command as you (with unsafe perm), but unfortunately, the install of the opcua contrib did not work also. I had a talk with Mr Sauer, the builder of the node.js application in the plcnext store, and he told me that the problem should be normal, because : it is not possible to install native node modules because they can not be compiled on install. node-red-contrib-iiot-opcua depends on the native module deasync and will fail on install due to not be able to build that module. That’s written in the node.js application description. so, it seems that the only way to make the OPC installable are as follow : There a several solutions:

                                               1. **Install an compiler and the needed headers and dependencies an the target.**
                                               2. **2\. Cross compile the native node module by your own**
                                               3. **3\. Open an issue to the developer.**
                                               4. **4\. Search for an alternative OPC UA Node-Red extension.**

Did you try one of these options?

Did you try this solution? https://www.plcnext-community.net/index.php?option=com_easydiscuss&view;=post&id;=1779&Itemid;=221⟨=en#reply-1785 Regarding the other suggestions - I am also interested if other community members have tried one or more of these. For me:

                                               1. In the past I have installed gcc, make and python on the AXC F 2152 in order to natively compile a node package. This was a long and (I think) difficult process but it worked eventually.
                                               2. I know that one of my colleagues here has tried cross-compiling node packages on a host machine and then successfully used them on the target, so we know this works.
                                               3. In the past I have opened an issue with the developer of this package on Github. [Here is a link to the issue](https://github.com/BiancoRoyal/node-red-contrib-iiot-opcua/issues/79). The author was very helpful.

Martin.

I hope that my previous post didn’t appear too short (it has been a tiring week of Champions League football :slight_smile: I think Option 1 in your list might be worth a try, since the installation is complaining about python, and the version of python on the PLC probably doesn’t have the necessary features to run the build script. Some more details on how you might be able to try this:

                                               1. Install the ipkg package manager for armv7hf:  

wget -O - http://ipkg.nslu2-linux.org/optware-ng/bootstrap/buildroot-armeabihf-bootstrap.sh | sh

                                               2. Install python3:  

/opt/bin/ipkg install python3

                                               3. Make sure the system runs this version of python instead of the factory-installed version:  

export PATH=/opt/bin/:$PATH

                                               4. Check that this has worked:  

which python

(it should show /opt/bin/python, I think). You may need to create a symbolic link from “python” to “python3 in that directory.”

Now try installing the node package again. Hopefully the error message is gone. If there are other errors, please let us know. To answer your other question, you can stop the PLCnext process with the command /etc/init.d/plcnext stop from an account with root rights, but that should make no difference to this installation.

Hi Martin, if you want to compile node native modules you have to install python 2. The build tool node-gyp does not support python 3. -– Björn

Hello Martin when trying to install Python 2 as Bjoern said Python3 is not compatible, i get this :

root@axcf2152:/opt/plcnext/# /opt/bin/ipkg install python2
Unknown package ‘python2’.
Collected errors:

  • opkg_install_cmd: Cannot install package python2.

------------------------- After install, which python return /usr/bin/python (difference vs you) for creating the sybolic link, do i have to type : lr -s /usr/bin/python /opt/bin/python ??? PS : in the forum, how do you make the special format, like that : special

…regarding the P.S.: This is done with the “Code” format directly out of the editor: Code formatting in the Forum That formatting ends up as a code tag in HTML which is the inline formatting for a short command or line of code, equivalent to a single backtick in Markdown syntax. Other than the combination of a pre and a code tag (in Markdown: 3 backticks) it doesn’t put the text into a codeblock. In case that formatting doesn’t work out the way you wanted it, switch to the code view in the editor and correct it manually. :wink:

Hello Michel, actually if you installed python successfully.

do IPKG update and check in the repository if the package is actually named like that…
the “ln” command should be something like :

ln -s /opt/bin/python/usr/bin/python**

** ln -s Target Linkname not the other way around.

kind regards,
Oliver.

PS: Björn recommends a different package manager:

https://www.plcnext-community.net/index.php?option=com_content&view;=article&id;=382:install-the-gnu-guix-package-manager&catid;=78&Itemid;=366⟨=en