HomeHome AutomationExciting changes in NodeRED 1.1.0

Exciting changes in NodeRED 1.1.0

Totally new way of using function nodes

There is something exciting in NodeRED 1.1.0 released a couple of days ago. New changes in NodeRED 1.1.0 are not just visual. The bring a new way flows can be designed! I will show you a couple of cool things that you can do now NodeRED 1.1.0.

NodeRED 1.1.0

Loading animation isn’t the only graphical change, but it’s the first one that greets you when you update your NodeRED. If you haven’t already done so, back up your flows and run: sudo npm install -g --unsafe-perm node-red

Graphical changes in NodeRED 1.1.0

Info side panel

Now that you are on NodeRED 1.1.0 you will see a brand new layout (for the side panel). Panels had been moved around to make space for the tree view of ALL your flows. Now you can edit a node directly without opening a flow. Name your nodes well, and you will love this for quick updates.

Help panel

Help panel is redesigned as well. The information about nodes is still displayed in the same way, but the window is split to let you browse other nodes from the same window. You can still preview node help file by clicking on the node itself.

Node Groups

The new version also comes with grouping nodes. A perfect tool to select and wrap nodes performing specific functions. I will take advantage of this a lot in my tutorials. Groups have custom borders and fill colours and labels can be appended as well. Each group can be moved around as one object.

Under-da-hood changes in NodeRED 1.1.0

I will jump straight to the most important to me change as it will change the way I write the tutorials. The function node comes with 3 tabs:

  • Setup
  • Function
  • Close

Now, when a function node is deployed, the code from Setup will run once. The window won’t share the scope of the variables with Function or Close, but you will be able to pass the data between panels using context.set().

This is perfect for the situation where you want to, well… setup the environment for your work. You can declare variables, create files needed for your flow to work etc.

example:

//Setup
flow.set("timer", 0);

Running a function node below without the Setup would result in a undefined variable. But thanks to the new panel:

var x = flow.get("timer");
msg.payload = x;
return msg;

Returns 0instead of undefined as we set up the flow variable at the deployment.

Close runs each time the node is redeployed or stopped. Excellent for changing values and clean up operation. If in the same example I need my flow to reset and return to default values, I could do this by:

flow.set("timer", 10)

So when the flow is redeployed, our timer will be set at 10, regardless of how our function affected the timer in the runtime.

New Inject node

I’m surprised this change came so late. Inject node can be modified to your liking now. I often found myself using an inject node with a function node combo to inject a specific payload. Now the new inject node is more flexible and it should pretty much eliminate the need for “combos”.

Installing Nodes

This is not documented yet, but you should see the ability to install nodes from URL in .gz format. Looks like in the future you could make a list of nodes you want to have and run it from a native URI or self made directory. It will save you time, as you could install all nodes at once by executing a script.

JSONata $moment

Let’s take a moment to appreciate how nice is to have the timezone tool to use in NodeRED. If you ever tried to do anything that deals with time – you will appreciate it even more.

Final thoughts

There are other changes in NodeRED 1.1.0 but not as exciting – mainly around admin tools. You can check the full changelog here. I’m very happy with new changes, and could already see this in action in my Sonoff 4CH & 4CHPRO R3 Tasmota video. If you have any questions, feel free to leave it in this Reddit thread.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

Smart Ideas with

Automate your space in with these ecosystems and integrate it with other automation services

client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image

Learn NodeRED

NodeRED for beginners: 1. Why do you need a NodeRED server?

0
To server or not to server? That's a very silly question!

Best Automation Projects

Tuya SDK for beginners: Intro to Tuya Cloud API

0
Working with Tuya Cloud API. A guide to Cloud automation for beginners, get started with REST!

NEST your old thermostat under $5

0
Nest-ing up your older thermostat under $5

Nora – Google Assistant in NodeRED

0
Integrate Google Assistant with NodeRED thanks to Nora - NodeRED home automation

DIY Smart Washing Machine – for about 15 bucks!

0
Learn how to add washing machine notifications to your Google Home on the cheap

Sonoff Zigbee Bridge – review

0
Sonoff line up will soon include Sonoff Zigbee Bridge and more Zigbee sensors - here is the first look

Smart Home

Remotes aren’t done with us yet: SwitchBot Remote

0
If you hate having 20 remotes hidden in your sofa, or your parents despise talking to Alexa to turn the lights on - SwitchBot Universal Remote is here to deal with all this!

We’ve seen this before: SwitchBot K10+ PRO

0
This is an odd one. Building on the success of SwitchBot K10+ they released SwitchBot K10+ PRO - but is the experience actually better?

Is this the smart panel we have waited for?

0
ITEAD has released a new smart panel: Sonoff NSPanel Pro 120 - have they learned the lesson from the terrible launch of the original Pro? Let's see what's new.

Aqara FP1E detects motionless humans

0
This isn't exactly a new device, it's an interaction of the original Aqara presence sensor. Aqara FP1E brings Matter, ZigBee and new triggers to your smart home

SwitchBot S10: cleaning re-imagined!

0
SwitchBot S10 promises unattended vacuuming and mopping so you can focus on things you love and care for. Does it deliver?