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/
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 library 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.
Go to Node-RED. In the menu, choose Import then 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 .
The Node added, it remains more to use it in a Flow.
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
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.
Now start Node-RED
node-red-start sudo
And refresh the view of the browser. The new palette dashboard is now available.
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.
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.
By unfolding a Node, it is possible to enable or disable each Node proposed by each module. It helps lighten the palette.
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.
To learn more about Node-RED, see the dedicated category.
- Xiaomi Mijia Honeywell Smoke Detector Test with Domoticz, Emergency Notification with PushOver
- Test Zigbee2MQTT gateway. Part 2, include Xiaomi Aqara or Mijia accessories to Domoticz with Node-RED
- #Test Zigbee2MQTT project, hack of the Xiaomo Aqara Smart Home Gateway. Part 1: assembly, demo with Node-RED, 3D printed case [update]
- Install Node-RED on Raspbian Jessie Lite on a Raspberry Pi Zero W
- Node-RED + MQTT + ESP8266: how to drive an articulated PTZ system in WiFi
- Orange Pi: test of the OPI.GPIO package for Node-Red (node-red-contrib-opi-gpio)