This documentation explains what does the menu “import/node”.

Here is the menu documentation.

In the edit box, the user can enter:

  • a npm ID
  • an URL to a zip file

What is a Node to be imported

The node structure dedicated to the Thingbox extends the structure of the nodered nodes by adding flow libs and system flow.

It contains :

  • Core files: node.js, node.html
  • icon
  • lib/ : contains flow libs (created by export/lib)
  • flows.json : contains system flow merged with the actual system flow

The lib folder

The flow in the lib folder is added to the menu import/lib.

Example of use: Suppose an instructable explaining how to build a flow to show the location of a phone on a map. The user adds the npm name of the tutorial and after download he can add the demo flow from the lib menu. The actual NodeRED way to achieve that is to copy paste an ugly bloc of text using the import/clipboard menu.

The flow.json file

The flows.json file is dynamically added to the running flow and can be hidden in a system tab if the name of the tab start by ttb- (the user can show them by checking the “Show all tabs” in the settings page.

Where are the “imported Nodes” stored?

  • Nodes are stored into the /root/userdir folder
  • Libs are in the userdir / lib folder but a virtual link is created so it appears in the import/ lib menu of Node-RED

Back to top