Node-RED: install, uninstall easely modules with Palette Manager

There are a very large number of modules (Nodes) and Flows for Node-RED available on the online library http://flows.nodered.org/. The palette Manager allows to enable or disable Nodes included in each module, to install or uninstall modules without even having to leave RED Node. It is very easy to manage the modules installed on directly from the browser without using the command lines.

Find modules (Nodes) or Flows for Node-RED

All modules (Nodes) and flows (pieces of code) are referenced in the official Red Node library https://flows.nodered.org/

 

node-red librarie flows nodes

You can filter the Flows or Nodes separately and combine with a keyword search.

Install a flow

The flows can be shared by everyone (without control) in the bookstore Node-RED. He must have a GitHub account to share your flows. A flow is a function that allows to perform a function. Some examples of

Once you have found what you need, go to the page of the flow and select the code of it (it goes in blue), copy it.

 

selection flow node-red

 

Go to Node-RED. In the menu, choose Import then Clipboard

node-red flow past coller clipboard

In the box Import nodes, paste the code. You can create a new node in the current flow or create a new one (new flow). Finish with Import .

 

 

node-red-flow-past-coller-clipboardThe Node added, it remains more to use it in a Flow.

ode-red flow importé

 

 

Install and uninstall module with command line

Before we look at how to install modules from the WEB interface, it may be useful to manage plugins through the Terminal. Indeed, it is possible to install and activate the nodes provided by plugins from the WEB interface, but it is not possible to uninstall a plugin already used by a Flow.

It is not necessary to stop RED Node to install new modules, but for it to be taken into account, it will take anyway to reboot, so much to do things. So first stop with this command (no need to be placed in the directory Node).

 node-red-stop

Node-RED uses Node.js to run. The modules are managed by npm. Installing a plugin will be always by an order of this type.

 sudo npm install node-red-contrib-MODULE_NAME

Tt is better to be in the Node directory

 cd ~/.node-red

For example install the module node-red-dashbord (the successor of the module node-red- contrib-ui ) which allows to add a GUI to a Node-RED project.

http://flows.nodered.org/node/node-red-dashboard

 

node-red-dashboard-ui-module

You start the installation of the module with the following command

 sudo npm install node-red-dashboard

At the end of the installation, npm return a report of installed dependencies.

 

91-node-red-dashboard-installe

Now start Node-RED

 node-red-start sudo

And refresh the view of the browser. The new palette dashboard is now available.

node-red-palette-dashboard-module-installe

Uninstall a module

Yo uninstall a module, use the command

 npm PackageName uninstall

However, it is not possible to uninstall a module in use. That means clear all Nodes of the plugin concerned before you uninstall it. Quickly, it can be problematic for some modules which add elements. For example the plugin contrib-ui (replaced by the new Dashboard module) created several ui_tab. You need to delete manually all of them before you can remove the module.

Then run the command

 npm uninstall node-red-dashboard

Install, disable, uninstall, modules from the Palette Manager

From the WEB interface, open the menu and select Manage Palette.

 

node-red manage palette

The Manager opens to the left of the screen instead of the pallets. It consists of two tabs. Nodes are all modules installed in the tab. You can disable all Nodes at once by pressing disable all. Use remove button to uninstall the module. Beware, the button remains grayed out as long as the Nodes of the module are in use. After removing all the Nodes of the flow, you have to deploy again the flows to release the Nodes.

 

node-red dashboard ui module

By unfolding a Node, it is possible to enable or disable each Node proposed by each module. It helps lighten the palette.

node-red-manage-palette-disable-nodes
Install tab allows you to search in the Node-RED library modules by keyword. An example with the keyword dashboard. A click on install starts the installation and activation of the module. However, it is necessary to refresh the display of the browser manually to make the new palette appears.

 

node-red-install-module-search

To learn more about Node-RED, see the dedicated category.

Subscribe to the weekly newsletter

No spam and no other use will be made of your email. You can unsubscribe anytime.

We will be happy to hear your thoughts

Leave a Reply

DIY Projects
%d bloggers like this: