🎉 Node-RED 1.1.0-beta.1 released

We have just released the first public beta release of Node-RED 1.1.0

This beta contains all of the major features for 1.1.0. There are a small number of items still to add before the full release later this month.

As its been 6 months since the 1.0 release, there are quite a lot of new features in this release.

What follows is just some of the main highlights. Be sure to read through the Change Log to see what else is in there.

Known Issues

The following issues have already been reported:

Fixed in git

  • Some nodes (eg Dashboard nodes) unexpectedly show a configuration error
  • Some configuration nodes incorrectly show a '0' user count in the config node sidebar
  • Debug node's status 'automatic' behaviour not working as expected
  • Missing tooltips on Outliner buttons
  • Cannot re-enable a disabled config node
  • Buttons don't work for a node freshly added to a group
  • Trigger node - disabling second output doesn't mark workspace dirty
  • "Select node" behaviour in Catch/Complete/Status nodes not working as expected on Android
  • Function node still creates VM for empty setup/close code
  • Duplicate events on node buttons with Android
  • Merging flows from the server breaks the view
  • node-red admin throws error when displaying help. (node-red-admin@0.2.6 published with fix)
  • Edit group dialog throws error on Done for some users

Not yet fixed

  • Node icons turning blue randomly (think this is due to the latest Chrome changing its default form/focus CSS)

Editor features

Information sidebar redesign

The info sidebar now includes a tree-view of your flows - we call it the outliner. This gives another way to navigate your flows and quick find things.

Each node has a button that takes you to it in the workspace, a button to enable/disable it and, in the case of the Inject and Debug nodes, a button to trigger their action. Double-clicking on a node will bring up its edit dialog.

To make room for the outliner, the help section of the sidebar has now moved to its own sidebar tab. The added benefit of putting the help in its own tab is you can now browse all of the available help topics without having to select a node of the right type in the workspace.

It will also give us a space to add other help topics in the editor.

Grouping nodes

To help organise your flows you can now group your nodes in the editor. The group can have a custom border and background colour and an optional label.

You can even try your hand at pixel art if you really want.

Groups are added to the flow as a new type of node. As people start using them, it will make it harder to share flows with users who haven't yet upgraded. To help out, we've published node-red-node-group which registers a group node type but does absolutely nothing. Installing this module will allow older versions of Node-RED to import flows that include a group - although they won't see the groups in the editor. And the module knows not to register itself when it isn't needed, so there's no issue upgrading to 1.1 with it installed.

New actions

The following new actions have been added to the editor. You can searching for them in the Action List (Ctrl/Cmd-Shift-P or View -> Action List) and you can assign keyboard shortcuts to them.

  • core:show-examples-import-dialog
  • core:group-selection - (Ctrl/Cmd-Shift-G)
  • core:ungroup-selection - (Ctrl/Cmd-Shift-U)
  • core:merge-selection-to-group
  • core:remove-selection-from-group
  • core:copy-group-style - (Ctrl/Cmd-Shift-C)
  • core:paste-group-style - (Ctrl/Cmd-Shift-V)
  • core:show-help-tab
  • core:show-selected-node-labels
  • core:hide-selected-node-labels
  • core:activate-selected-debug-nodes
  • core:activate-all-debug-nodes
  • core:activate-all-flow-debug-nodes
  • core:deactivate-selected-debug-nodes
  • core:deactivate-all-debug-nodes
  • core:deactivate-all-flow-debug-nodes

Runtime features

node-red-admin built-in

The node-red-admin command-line tool has existed since the start of the project, but it isn't something widely known about or used. It can be used to remotely administer a Node-RED runtime.

To make it more useful, it is now integrated into the node-red command. You run it with:

node-red admin

One of the useful commands it provides is a way to hash passwords suitable for adminAuth. It prompts you for the password you want to use and it gives you back the hash you can paste into your settings file.

$ node-red admin hash-pw
Password:
$2b$08$sjxLvq8MmycyWJpxPLyweuw/WlYt1MX56eG5Q5nlyxJs2fASGm2jm

The other commands let you list what nodes are installed, enable/disable them, install new ones or remove old ones. You can also search the flow library.

Overriding individual settings

The node-red command now supports the -D option to override individual settings. For example, to temporarily run with a different level of logging you can use:

node-red -D logging.console.level=trace

Design note

httpAdminMiddleware setting

We've had the httpNodeMiddleware option for a while now - allowing a custom middleware to be added to the HTTP In node routes. This release adds httpAdminMiddleware that does the same thing for all of the admin routes, which includes the editor itself. This can be used, for example, to add custom http headers to all admin requests. Not something most end users need, but has been a requirement from those who embed the editor into their own applications.

Custom adminAuth token handling

adminAuth now supports a custom tokens function that can be used to validate any auth token passed to the admin api. This opens up some more flexible options to integrate Node-RED admin security with other authentication systems.

Design note

Installing nodes from other locations

The admin api for installing new nodes has been extended to support a 'url' parameter - which should be a full url to a tgz containing the node to install.

Design note

Refreshing HTTPS certificates

Thanks to @BartButenaers the runtime can now be configured to periodically refresh its https certificates. This feature requires Node.js 12 or later.

The default settings file has been updated with examples for how to configure this.

Node updates

JSONata $moment support

We've added support for the Moment date/time library within JSONata expressions via the $moment function.

This adds some long needed timezone awareness into the core of Node-RED. For example, you can get the current time in Auckland with the expression:

$moment().tz("Pacific/Auckland")

If you wanted to get the time 2 hours from now, you can do:

$moment().add(2, "hours")

It can also do a much better job of parsing dates:

$moment($.payload, "YYYY-MM-DD")

We're considering making the Moment library available as a default built-in of the Function node as well.

Inject node properties

The Inject node can now set any properties on the message it sends - you aren't limited to just topic and payload.

Function node lifecycle

The Function node now lets you provide code that should be run when the node is deployed and when it is being stopped. This lets you initialise any state in the node before it starts handling any messages. Note that each piece of code is in a separate scope - you cannot declare variables in one and access them in the others. You need to use context to pass things between them.

The main Function has also been made a proper async Function so you can use await at the top level, if that's your sort of thing.

image

Debug node status

The Debug node can now set its status message independently of what it passes to the Debug sidebar. Useful if you want to Debug a shorter summary to status, whilst showing more complete information in the sidebar where there is more space.

Trigger node

The Trigger node can now optionally send its 'second message' on a separate output.

If you want it to handle separate streams of messages, you are no longer tied to using msg.topic to identify the streams - you can use any message property.

Lots more...

Be sure to read through the Change Log to see what else is in there.

Installing the beta

If you want to try out the beta, you will need specify node-red@next when you use npm to update. Without the @next you'll still get 1.0.x.

So on a Pi you'd do:

sudo npm install -g --unsafe-perm node-red@next

Reporting problems

If you hit any problems, please report them either as a reply on this topic, or in the #dev slack channel. Please do not post new topics to the forum regarding the beta as that could confuse users who are not using the beta.

Outstanding work

There are a small number of pull-requests outstanding that should get merged next week. They including adding more example flows to the core nodes, and a few final bits of tidy up.

As it stands, we don't believe any of them would warrant another beta release.

So aside from resolving any feedback this beta generates, we'll be switching gears to get all of the documentation updates ready for the release later this month.

30 Likes

Just thinking about the terminology 'group', don't we also use the same word to describe dashboard tab/group?
Could that be confusing.

Some great additions there, thank you!

Minor issue re new status enhancement on Debug node

I'd previously got this arrangement with two debugs = PAYLOAD just for the msg.payload status and ALEXA PHRASE for the full msg object debug

image

I just tried it and the ALEXA PHRASE hasn't shown msg.payload which I thought it would when it defaults to automatic - obviously I can just change it to msg.payload but just feeding this back

image

There's a lot more useful new features than what I was expecting to be there, amazing work!

2 Likes

After reloading NR with the new release all my dashboard nodes give an error, changing one of the nodes makes all the red triangles disappear, but in the config tab, all the dashboard tab nodes show up with 0 items, i am affraid to remove the empty ones.

edit - deleting them, deletes the tab and all is gone, doesnt make much sense.

I've seen this too. I am on the latest dashboard UI 2.22.1, if I hover on the triagle the message is "invalid properties: - group" : image

ps: the nodes are working as before even with the error, but when deploying you get the warning about all those nodes.

Is that using the 1.1.0-beta or the current 1.0.x stable release?

1.1.0-beta.1 freshly built, the problem is not present when using 1.0.5 stable.

With the beta, all dashboard tabs show up with 0 nodes in the config tab.
Even with recreating the tabs, it keeps them at 0 in the config tab (and showing the element twice, one with elements and one with 0)

Just rolled back and all is back in normal state. Is it possible due to duplicate names in group names throughout tabs ?

The "Select node" feature doesn't seem to work on Android Chrome. Picking a node highlights it but when pressing "Done", the selected node is not checked. I used "Select node" within complete node settings if it matters. On desktop this work.

I noticed another Android specific issue - everything logged to debug sidebar is printed twice. This didn't happen with 0.20.x at least and I don't think it happened with the latest 1.0.x either. Yet again on desktop this doesn't occur.

really cool features!!!!
Having moment in function nodes would also be really great.

About the function node having the setup and closing tab:
By default, the new VM for the setup code is not created, which is really good :slight_smile:
However, if I write something in the setup tab and later remove it in the following way:


then the VM is created. Only if one removes also that comment completely, or inserts a "\n" again, like so

the VM is correctly not executed anymore.

Not really a dealbreaker, but I thought I mention it

Ah yes - good spot. We try to be smart by adding that default comment if the box is otherwise blank, but only save anything if it gets edited. So any change to the whitespace will be regarded as a 'change' meaning we believe there to be valid code to run. We should try to be smarter on that.

Fantastic work. Well done to everyone who contributed.

Does that mean that the separately install node-red-admin npm package can be removed?

Haha, way to go to make my moment node redundant! Truth be told, couldn't happen to a nice node. :rofl:

You no longer need to install node-red-admin as a separate module if you have node-red installed - but just take note of the different command name: node-red admin xyz not node-red-admin xyz

This is because you cannot have two npm modules provide the same command without leading to errors and warnings from npm when you install the second one.

The separately installable node-red-admin module still has a place - if you were wanting to remotely administer a NR instance without having the full node-red installed locally.

1 Like

Both fixed in git. May spin a beta.2 as this will be annoying for any dashboard user to put up with.

4 Likes

The edit group dialogue isn't working for me, pressing "Done" doesn't close the dialogue. Colour changes work nevertheless after pressing "Cancel". Label names are not stored either.

Is working for me NR running on Win10/Chromium Browser on Pi4

[edit]Actually just failed for me now - was OK to start with until I started trying to show the label[/edit]

1 Like

Chrome Browser on MX Linux:

I had this this morning too (firefox) but cannot reproduce it now. But I am 100% certain it happened