šŸŽ‰ Node-RED 4.0 released

I still have a Pi 1B but can't test because all my full sized SD cards have long since disappeared.

If you decide to abandon the 1B, I can confirm that a Pi Zero 2 with 64 bit Bookworm runs Node-red very nicely and it does upgrade to v4, no problems so far.

What about the command
node-red

SIG 4 = Illigal Instruction

The 1B is running a ARMv6 (same as a Pi Zero) CPU

NodeJS don't technically support ARMv6 any more, but do have unoffical builds, the latest available appears to be v20.14.0

https://unofficial-builds.nodejs.org/download/release/v20.14.0/

Which the install script should use okā€¦ if the OS is new enough

Hi,

@Colin
Every command with node-red returns Illegal instruction
So also the new node-red --version, which should not start Node-RED.

@hardillb
NodeJS v20.14.0 will not work, because of the missing GLIBCXX_3.4.26 issue in Buster..

node-red --version still starts Node-RED

OK, so the problem is here is the combination of ARMv6 and Buster, and getting a working version of NodeJS.

Note, technically Buster went End of Life September 10th last year with End of Extended life being end of July this year, so it probably is time to start thinking about when you will upgrade/replace the OS.

https://wiki.debian.org/DebianReleases

OK, so the problem is here is the combination of ARMv6 and Buster, and getting a working version of NodeJS.

No, the combination of ARMv6 and Buster is not a problem. It has been working for years.
And getting a working version of NodeJS is not a problem either, as v16 and v18 has run for a longer period on that machine. A working version of Node-RED isnĀ“t a problem either, as version 3.1.11 runs fine on RPi 1, Buster and NodeJS v18

V4.0.0 runs fine on my RPi 3B+, Buster and NodeJS v18
So it looks the combination of NR v4.0.0 and RPi 1B, but that is not confirmed by @jbudd 's post, in which he confirms

that a Pi Zero 2 with 64 bit Bookworm runs Node-red very nicely and it does upgrade to v4

It's not easy to point to a specific devise, OS or NodeJS version.

it probably is time to start thinking about when you will upgrade/replace the OS.

Sure, I will do that, but as said before I have a couple of Rasberry Pi's, all running Buster.
I like them to be on the same OS.

The Pi Zero is ARMv6, same as the original Pi B

The Pi Zero 2 w is ARMv7 (based on the Pi 3b+ CPU hence how it manages to run the 64but OS).

Lets try just running just running

  • node --version
  • node -e "console.log('helloworld')"

The second is because I'm not sure if node --version actually spins up a javascript vm, but the second command definately will.

Perhaps I should clarify that I was not suggesting that a Pi Zero 2 is the same as a 1B.
In fact it is a much more powerful computer, only except that it has wifi but not Ethernet.

Merely suggesting that the smallest/cheapest of current generation of Pies can run the latest Node-red very well.

I would not run the desktop OS on a Zero 2 though, I run Node-red on mine with RPiOS Lite and access it via ssh and my PC browser.

ABSOLUTE DISASTER

1 The change to the SPLIT node is a Breaking Change.
I had to go through 20 flows to make changes.

2 The Home Assistant Sensor defaults to loading the topmost alphabetical Binary Sensor, which is very confusing and you have to use the '+' sign to add a new entity.
However unless you have already noticed the default selection, instead of being a SENSOR is a BINARY SENSOR and this is where you inadvertently overwrite the binary sensor that was selected in the first stage. My question is why would you make these issues as default, it doesn't make any sense. If you are going to add a new sensor then the previous version was the most sensible.

3 After all of that I left it all running and this morning there were no entities running in Home Assistant, not one, even though Node-red was churning out the data.
I reinstalled the previous version of Node-red, still nothing.

In the end a full restore of the previous Home Assistant and all the components was the only way forward, to go backwards, and I am back in operation.

So after a considerable number of hours spent attempting, to get up and running again, I shall be very wary of installing any new versions until I see what other users report.

Can you be more specific please? Which change?

Can you provide a before and after. Include sample data (via an inject node) that demonstrates the problem.

This issue is being addressed in #4788 by @GogoVega, please just be aware of it until a maintenance release is done.

Unfortunately, not that many people here use Home Assistant so your comments dont really resonate.

If you can provide additional information and reproducible flows that clearly demonstrate your issue, we can take a look.

Though, if it is related to the config selection issue mentioned above, whatever this issue is/was may well be fixed in GogoVegas PR already.

I am sorry you had a bad experience in this release. To be fair, there were a HUGE number of changes shipped in V4 and a lot of beta releases too.

One thing that just occurred to me: I don't think Home Assistant folk release Node-RED beta versions (or do they?) I am thinking if HA did beta releases for HA users to try out, perhaps some of these could have been flushed out earlier?

5 Likes

Thanks for your reply.

Sorry if my notes sounded over critical, I can't add much more as I reset everything to the previous versions and rescued the situation, thank goodness for backups.

1 The split node issue was due to the way had previously configured the split, so the update stopped this working. To be fair it did make me re-evaluate my use on several flows and I made some subsequent improvements even with v 17.

  1. The issue relates to the Node-red Companion, which also gets updated in this release to version4. Again I don't have screenshots available, and it relates to the way that entities are configured for use with Home Assistant . As you say this is being looked into.

  2. The issue of an inability for Node-Red Companion to connect with HA, looks also being addressed.

Just to be on the safer side I will await the revisions

Can you put together a simple flow, an inject and split node the way you previously used it, plus an explanation of what you had to do differently for v4?

few comments

  1. It is difficult to get people to test new version properly. Mostly, people will start testing on new release :joy:
  2. It is kind of responsibility of node developers to be up to date and to manage testing of new upcoming node red version. It is regarding HA issues.
  3. @knolleary is there any distribution list for release candidate? I am not sure if I missed, but once you have a stable pre release, I would be very keen to test my flows and nodes against it.
  4. When reporting bugs, people tend to forget to share problematic flow :slight_smile:

Here is the issue with the SPLIT NODE

You can look at before and after.
Nothing complicated, it is the data from my Solar PV invertor in CSV format

[{"id":"6e41fe50023f1d6a","type":"csv","z":"8a38b732ace992cf","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":310,"y":260,"wires":[["b20f131bce1b4ad4"]]},{"id":"b20f131bce1b4ad4","type":"split","z":"8a38b732ace992cf","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":430,"y":260,"wires":[["cbc6f3e7152be3e2"]]},{"id":"cbc6f3e7152be3e2","type":"join","z":"8a38b732ace992cf","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":550,"y":260,"wires":[["7805df97f8f25053"]]},{"id":"7805df97f8f25053","type":"debug","z":"8a38b732ace992cf","name":"BEFORE","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":680,"y":260,"wires":[]},{"id":"15bf372e29016f35","type":"inject","z":"8a38b732ace992cf","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"20240624,17:45,11530,2.882,500,360,0.090,NaN,NaN,NaN,233.2","payloadType":"str","x":170,"y":260,"wires":[["6e41fe50023f1d6a"]]},{"id":"fe04c0f14e699719","type":"csv","z":"8a38b732ace992cf","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":310,"y":360,"wires":[["531ccdbc05a2d3d6"]]},{"id":"531ccdbc05a2d3d6","type":"split","z":"8a38b732ace992cf","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"index","x":430,"y":360,"wires":[["7bf394304d80cc24"]]},{"id":"7bf394304d80cc24","type":"join","z":"8a38b732ace992cf","name":"","mode":"auto","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":550,"y":360,"wires":[["37ae043f082b33d6"]]},{"id":"37ae043f082b33d6","type":"debug","z":"8a38b732ace992cf","name":"AFTER","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":680,"y":360,"wires":[]},{"id":"fde380b07543ff03","type":"inject","z":"8a38b732ace992cf","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"20240624,17:45,11530,2.882,500,360,0.090,NaN,NaN,NaN,233.2","payloadType":"str","x":170,"y":360,"wires":[["fe04c0f14e699719"]]},{"id":"bba193768810830b","type":"comment","z":"8a38b732ace992cf","name":"","info":"BEFORE UPDATE","x":380,"y":200,"wires":[]},{"id":"9657f7be06c33d42","type":"comment","z":"8a38b732ace992cf","name":"","info":"AFTER UPDATE","x":380,"y":420,"wires":[]}]

Here is my bad, I didn't need to use the split and join node anyway, so I should say thank you for making me re-evaluate what I am doing. As an retiree and 2 year veteran to Node-Red / Javascript, I am learning as I go and I am now on V4 of my solar panel output, where I have eliminated almost Ā½ my Nodes, which usefully feed my automations in HA.

My entire life has been built on my ethos - 'All good learning comes from ignorance and mistakes, but never, never give up'.

Keep at it my friends

1 Like

Hello, guys. I have a little issue here after updating to 4.0, regarding to Node.js version, and I would appreciate if someone could help me. My NR is running on a Pi 4.

After the update, I tested it typing 'node-red' on the console and everything seemed to be fine, even NPM and Node.JS versions. The dashboard was loaded in the browser with no problems.

"Welcome to Node-RED

24 Jun 18:01:40 - [info] Node-RED version: v4.0.0
24 Jun 18:01:40 - [info] Node.js version: v20.15.0
24 Jun 18:01:40 - [info] Linux 6.1.21-v8+ arm64 LE
24 Jun 18:01:40 - [info] Loading palette nodes
24 Jun 18:01:44 - [info] Dashboard version 3.6.5 started at /ui
(...)"

However, when I type node-red-start, it seems that NR is checking another Node.js version, so it does not start.

"Starting as a systemd service.
Unsupported version of Node.js: v12.22.12
Node-RED requires Node.js v18 or later
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'."

I checked the versions of NPM, Node and Node.js.

npm -v : 10.7.0
node -v : v20.15.0
nodejs -v : v12.22.12

I am not sure why NR checks one version when running the first way and another one when running the second way, but I am stuck here searching for a solution. Does anyone know what is going on and how can I solve it to make my system up and running again?

Thanks in advance.

Have you installed nodejs using n or nvm ? They are clever in that they allow you to easily switch between different versions of nodejs, but get in the way when we try to run Node-RED as a service.

Hi, dceejay. Thank you for the fast response.

I installed it using NVM, but actually I have been trying so many things that I am not sure about the current state of the system.

I am happy for having been able to ensure that my flows were not lost, but also frustraded for being stuck for hours in a stuff that looks so simple to solve.

Could you point me in the right direction to solve it? Looks like something solvable with one or two lines of code (that unfortunatelly I donā€™t knowā€¦ :cry: ).

I would appreciate it a lot.

THX.

EDIT: Well, it seems to have worked after some more tries, running a 'sudo npm cache clean -f', 'sudo npm install -g n' and 'sudo n stable' (not even know if all those were necessary). I was trying to figure out the difference on using 'nvm' or 'n' and, at the end, it worked. Tomorrow I will read more about them to learn about the differences. Thanks again for help, @dceejay.

Unless you really need to often swap nodejs versions I would advise not running either n or nvm. Just install the nodejs version you want.

We announce the beta releases in this cateogy (News) as well as posting to Twitter/X and Mastodon (although I realise I overlooked the latter a couple times this cycle) and in slack.