Overview

Node-RED has the ability to install nodes from within its editor by using the Manage palette tool. However, any installed nodes cannot be updated using the same method.

When Node-RED is running on a computer, the command line can be used to issue the npm install command to update a node package to the newest version.

That’s not an option on the GROOV-AR1 groov Box. Fortunately, there’s a simple method to do the same thing with an Exec node in a Node-RED flow.

Instructions

The following instructions use an example of updating the groov nodes (“node-red-contrib-groov”) from version 1.0.1 to 1.0.2.

  1. Make sure that your GROOV-AR1 can access the Internet. Details on this are in the Node-RED GROOV-AR1 Troubleshooting section.
  2. Open the Node-RED editor in your browser.
  3. Under the menu, select the Manage palette menu item. This will open the “Manage palette” view.
  4. Confirm the current version of the node you want to update.

  5. Click Done to close the “Manage palette” view
  6. Add an Exec node (found in the Advanced category) to a flow.
  7. Double-click on the Exec node to open the “Edit exec node” view.
    1. For the Command field, enter cd .node-red && npm install node-red-contrib-groov
      • “node-red-contrib-groov” can be substituted with any package name.
      • You can also specify a specific version with the @ symbol, like “node-red-contrib-groov@1.0.1”.
    2. Unselect the “Append msg.payload” field.
    3. Click Done to close the “Edit exec node” view.
  8. Connect an Inject node to the Exec node’s input.
  9. Connect a Debug node to the Exec node’s three outputs.

  10. Click Deploy to deploy the flow.
  11. Click the Inject node connected to the Exec node.
    • It will take a moment to update the node.
    • In the Debug panel, the output will look something like this:

  12. Restart Node-RED
    1. In a new browser tab, open Node-RED Admin (port 3000)
    2. Click Stop to stop Node-RED.
    3. Click Start to start Node-RED.

  13. Wait a few seconds for Node-RED to start up.
  14. Go back to the Node-RED tab in your browser and reload the page.
  15. Under the menu, select the Manage palette menu item. This will open the “Manage palette” view.
  16. Confirm that the version has been updated.

Troubleshooting

If you encounter any problems, use Node-RED Admin (port 3000) to view diagnostic information. The Node-RED editor won’t display much useful information, if any.