Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
app-notes:set-up-snmp [2025/01/23 14:44] – [4. Setting up an LXC container and then implementing Node RED] grayapp-notes:set-up-snmp [2025/05/07 15:16] (current) – [Prerequisites] gray
Line 14: Line 14:
  
   * NetModule Wireless Router with wireless connection   * NetModule Wireless Router with wireless connection
-  * NetModule Software [[https://share.netmodule.com/public/system-software/4.8/|4.8.0.x]] or newer+  * NetModule Software [[https://share.netmodule.com/public/system-software/4.9/|4.9.0.102]] or newer
   * A license is required for the LXC container   * A license is required for the LXC container
   * Not available for legacy products NB1600, NB2700, NB3700, NB3710   * Not available for legacy products NB1600, NB2700, NB3700, NB3710
 +
 +**
 +<WRAP center round important 95%>
 +The wiki was tested with router software 4.9.0.102 and the LXC container with Debian armhf bookworn.
 +</WRAP>
 +**
  
 ===== - Set up SNMP on the router ===== ===== - Set up SNMP on the router =====
Line 55: Line 61:
  
   * NetModule manual 4.8.0.103 [[https://share.netmodule.com/public/system-software/4.8/4.8.0.103/NB2800_Manual_4.8.0.103.pdf| Manual PDF]]    * NetModule manual 4.8.0.103 [[https://share.netmodule.com/public/system-software/4.8/4.8.0.103/NB2800_Manual_4.8.0.103.pdf| Manual PDF]] 
 +
 +----
  
 ===== - Setting up the SNMP client side for the query ===== ===== - Setting up the SNMP client side for the query =====
Line 125: Line 133:
 VENDOR-MIB.txt VENDOR-MIB.txt
 </konsole> </konsole>
 +
 +----
  
 ===== - Run some SNMP queries for testing and to see which queries are possible ===== ===== - Run some SNMP queries for testing and to see which queries are possible =====
Line 171: Line 181:
 </konsole> </konsole>
  
 +----
  
 ===== - Setting up an LXC container and then implementing Node RED ===== ===== - Setting up an LXC container and then implementing Node RED =====
Line 185: Line 195:
 Once the LXC container has been installed, we can install Node-RED. Once the LXC container has been installed, we can install Node-RED.
  
- +For further installation, we need the ''curl'' program and the ''npm'' package on the container. We will then deploy Node-RED on the router using a script.
-For the further installation, we need the ''curl'' program on the container. We will then roll out Node-RED on the router using a script.+
  
 <konsole> <konsole>
Line 201: Line 210:
 root@LXCNAME:/# root@LXCNAME:/#
 </konsole> </konsole>
 +
 +<konsole>
 +root@LXCNAME:/# apt install npm 
 +Reading package lists... Done
 +Building dependency tree... Done
 +Reading state information... Done
 +The following additional packages will be installed:
 +binutils binutils-arm-linux-gnueabihf binutils-common build-essential
 +...
 +x11-utils x11-xserver-utils xdg-user-dirs xdg-utils xz-utils zutty
 +0 upgraded, 614 newly installed, 0 to remove and 0 not upgraded.
 +Need to get 169 MB of archives.
 +After this operation, 684 MB of additional disk space will be used.
 +...
 +done.
 +root@LXCNAME:/#
 +</konsole>
 +
  
 Next, the Node-RED program is installed via a script file. Next, the Node-RED program is installed via a script file.
 +
 +Further information on the installation script can be found at this link.
 +
 + * Node-RED script information [[https://github.com/node-red/linux-installers| github link]] 
 +
 +**
 +<WRAP center round important 70%>
 +Node-RED core is installed in version 4.0.9 and Node.js in version 18.19.0.
 +</WRAP>
 +**
  
 The script command for this: The script command for this:
-''bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --node18"''+<code> 
 +bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/ 
 +master/deb/update-nodejs-and-nodered) --node18 
 +</code>
  
 <konsole> <konsole>
Line 215: Line 255:
  
 Are you really sure you want to install as root ? (y/N) ? ''y'' Are you really sure you want to install as root ? (y/N) ? ''y''
 +</konsole>
  
-If I want to see the installation steps, please also say ''yes'' here 
  
 +
 +<konsole>
 +If I want to see the installation steps, please also say ''yes'' here
 Are you really sure you want to do this ? [y/N] ? ''y'' Are you really sure you want to do this ? [y/N] ? ''y''
  
 I don't have a Pi where I install Node-RED on it, so ''no'' here I don't have a Pi where I install Node-RED on it, so ''no'' here
- 
 Would you like to install the Pi-specific nodes ? [y/N] ? ''n'' Would you like to install the Pi-specific nodes ? [y/N] ? ''n''
 +</konsole>
  
 +<konsole>
 Running Node-RED update for user root at /root on debian Running Node-RED update for user root at /root on debian
-Stop Node-RED                       \u2714+  Stop Node-RED                       \u2714
   Remove old version of Node-RED      \u2714   Remove old version of Node-RED      \u2714
-  Remove old version of Node.js       \u2714   20.18.2-1nodesource1 +  Remove old version of Node.js       \u2714   18.19.0+dfsg-6~deb12u2 
-  Install Node 18.20.6-1nodesource1   \u2714   v18.20.  Npm 10.8.2+  Install Node 18.20.6-1nodesource1   \u2714   v18.20.  Npm 10.8.2
   Clean npm cache                     \u2714   Clean npm cache                     \u2714
-  Install Node-RED core               \u2714   4.0.8+  Install Node-RED core               \u2714   4.0.9
   Move global nodes to local          -   Move global nodes to local          -
   Npm rebuild existing nodes          \u2714   Npm rebuild existing nodes          \u2714
   Install extra Pi nodes              -   Install extra Pi nodes              -
   Add shortcut commands               \u2714   Add shortcut commands               \u2714
-  Update systemd script               \u2714 +  Update systemd script               \u2714                                      
-                                       +  Any errors will be logged to   /var/log/nodered-install.log
-Any errors will be logged to   /var/log/nodered-install.log+
 All done. All done.
 </konsole> </konsole>
 +
 +Further settings for the Node-Red interface 
 +
 +The script command for this: 
 +<code>
 +root@LXCNAME:~# /usr/bin/node-red admin init
 +</code>
 +
 +<konsole>
 +✔ Settings file · /root/.node-red/settings.js
 +? That file already exists. Are you sure you want to overwrite it? … 
 +▸ Yes
 +▸ No
 +
 +User Security
 +=============
 +? Do you want to setup user security? … 
 +▸ Yes
 +▸ No
 +</konsole>
 +
 +<konsole>
 +✔ Do you want to setup user security? · Yes
 +✔ Username · admin
 +✔ Password · *********
 +? User permissions … 
 +▸ full access
 +▸ read-only access
 +
 +? Add another user? … 
 +▸ Yes
 +▸ No
 +</konsole>
 +
 +<konsole>
 +✔ Do you want to enable the Projects feature? … 
 +▸ Yes
 +▸ No
 +
 +✔ Do you want to enable the Projects feature? · Yes
 +? What project workflow do you want to use? … 
 +▸ manual - you must manually commit changes
 +▸ auto - changes are automatically committed
 +</konsole>
 +
 +<konsole>
 +Editor settings
 +===============
 +? Select a theme for the editor. To use any theme other than "default", you will need to install @node-red-contrib-themes/theme-collection in your Node-RED user directory. … 
 +▸ default
 +* aurora
 +* cobalt2
 +* dark
 +* dracula
 +* espresso-libre
 +* midnight-red
 +* monoindustrial
 +* monokai
 +* oceanic-next
 +* oled
 +* solarized-dark
 +* solarized-light
 +* tokyo-night
 +* zenburn
 +</konsole>
 +
 +<konsole>
 +✔ Select the text editor component to use in the Node-RED Editor … 
 +▸ monaco (default)
 +▸ ace
 +
 +Node settings
 +=============
 +? Allow Function nodes to load external modules? (functionExternalModules) … 
 +▸ Yes
 +▸ No
 +</konsole>
 +
 +
  
 If you want to test the whole thing first, you can start the Node-RED server manually by entering the command ''"node-red-start"'' If you want to test the whole thing first, you can start the Node-RED server manually by entering the command ''"node-red-start"''
Line 251: Line 373:
 </konsole> </konsole>
  
 +If you want this to happen automatically when you start the LXC container, you have to set it up with the command ''"systemctl enable nodered.service"''.
 +
 +<konsole>
 +root@LXCNAME:/# systemctl enable nodered.service
 +Created symlink /etc/systemd/system/multi-user.target.wants/nodered.service → /lib/systemd/system/nodered.service.
 +root@LXCNAME:/#
 +</konsole>
 +
 +Once you have stored the systemctl for Node-RED, you still have to restart the container for the service to start.
 +
 +You can access the Node-RED interface via a web browser. Simply enter the IP address of the container and port 1880.
 +
 +The Node-RED interface will then be displayed.
 +
 +{{:pictures:node-red.png?800|}}
 +
 +----
 +
 +
 +===== - Installing further app-nodes via palette management =====
  
 +For Node-RED, further ''"app nodes"'' need to be installed.