# GROUP SELECTION not working. NR 4.0.9

**URL:** https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523
**Category:** General
**Created:** [10 June 2025 03:56 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523 "2025-06-10T03:56:49Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [10 June 2025 03:56 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/1 "2025-06-10T03:56:49Z")

</div>

I seem to be having a lot of problems of late.

Today's quest is I'm trying to group some nodes.

THEY WON'T!

I've tried to group just a few, they too won't group.

**Other nodes - near by - will group.**

Want screen shots?  
Though I can't see how it would help.

Oh, full run down of setup:

 ![Screenshot from 2025-06-10 13-55-31](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/7/17f24d8599d1dbe8a1d528c8dc9fd1b19820e47f.png)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [10 June 2025 04:05 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/2 "2025-06-10T04:05:06Z")

</div>

Andrew, you have made a lot of posts recently and written lots of words but every one of them are of no use to the maintainersbwithout the errors logged in the devtool console, a step by step what you did & the data/flow that caused it.

If you are not willing to share the flow on the main forum, you can DM me.

Please format your post like this.

#### version info

- Node version: xxx _(enter `node -v`)_
- Node-red version xxx
- Browser kind: xxx _(e.g chrome)_
- Browser version: Vxxx _(eg V112.333)_

#### steps you took

1. Starting from empty edit
2. Press ctrl+I
3. Paste flow
4. Etc

#### errors in your browsers devtools console (usually accessed via `f12`

Xxxxx

#### screenshots

Xxxxx

#### data /flows that caused your issue

```auto
[...]

```

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [10 June 2025 04:16 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/3 "2025-06-10T04:16:31Z")

</div>

Ok, I am not exactly hitting the _required things_ here.

These things are not predictable and I am really not dealing with them well.

I can post screen shots but I am not sure what good they will do.

Starting from an empty edit screen won't _give_ me the problems I am seeing, as far as I know.  
They are...... _problems_ which are way outside my scope of knowledge.

`dev tools` Sorry. Browser's? Node-Red's?

I do - in some ways - fully appreciate it from the Dev's side of things.

If I know how to ..... _force_ these things: I would.  
I don't and so can't.

All I can do is _show_ what is happening.

That is easy enough when I'm getting rogue errors and there are things to see.  
But when I draw a box around some nodes and say `ADD TO GROUP` and nothing happens...

What am I supposed to do?

I'm not trying to be difficult. Believe me. As said: I have NO IDEA what is happening or how/why/etc.

I can't just reach into a magic hat and produce information I don't have.

Sorry, I hope you understand.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [10 June 2025 04:22 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/4 "2025-06-10T04:22:50Z")

</div>

90% of that post is waffle 😉

> [@Trying\_to\_learn](#):
>
> `dev tools` Sorry. Browser's? Node-Red's?

Your browser will have devtools and console where errors are written. You have been there before. You press f12 or similar.

I'll update my thread above to try and clarify what is required.

> [@Trying\_to\_learn](#):
>
> Starting from an empty edit screen won't _give_ me the problems I am seeing

To be clear, the format I suggested included sample text - it is NOT a set of instructions, just a suggested posting format.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [10 June 2025 04:31 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/5 "2025-06-10T04:31:12Z")

</div>

I'm not getting any _ERRORS_....

I group the nodes go to the menu in NR pick the group nodes.

The screen does nothing.

No errors.

I'll dig and see what I can find.

"that" post.... which one?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [10 June 2025 04:33 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/6 "2025-06-10T04:33:24Z")

</div>

> [@Trying\_to\_learn](#):
>
> "that" post.... which one?

All of them 😂

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [10 June 2025 04:36 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/7 "2025-06-10T04:36:09Z")

</div>

Well, I gave all the information I could/have/discovered.

If that isn't enough then I'm at a loss what to do.

There **IS** a problem there. It is beyond me. I can (if lucky) force it as what happened this morning - again.

But there are no promises it WILL happen.

All I can do is show people.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [10 June 2025 04:37 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/8 "2025-06-10T04:37:21Z")

</div>

> [@Trying\_to\_learn](#):
>
> If that isn't enough then I'm at a loss what to do

Andrew, we need the info as requested.

> [@Steve-Mcl](#):
>
> Please format your post like this.
> 
> #### version info
> 
> - Node version: xxx _(enter `node -v`)_
> - Node-red version xxx
> - Browser kind: xxx _(e.g chrome)_
> - Browser version: Vxxx _(eg V112.333)_
> 
> #### steps you took
> 
> 1. Starting from empty edit
> 2. Press ctrl+I
> 3. Paste flow
> 4. Etc
> 
> #### errors in your browsers devtools console (usually accessed via `f12`
> 
> Xxxxx
> 
> #### screenshots
> 
> Xxxxx
> 
> #### data /flows that caused your issue

If there are no errors, then state that. But each time you encounter an issue, as one set of information, the above format works best for us.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [10 June 2025 04:39 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/9 "2025-06-10T04:39:45Z")

</div>

Well the grouping problem has been...... _fixed_.

I grouped two nodes and dragged them around all the others and then moved them all (one by one) to add them to the group.

Give me a ~~gun~~ lead tranquiliser and I'll fix all my problems.  
I don't need this.  
REALLY DON'T

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [10 June 2025 06:49 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/10 "2025-06-10T06:49:31Z")

</div>

RPiOS Buster is very out of date and nodejs 18 is also the oldest still supported version for Node-red.  
No idea if your recent problems are related to this but it might be wise to plan to update them.

Do you run a lot of other software on your Node-red Pies - databases, pihole, etc?  
Do they run on SD cards or SSDs?  
Do you use the desktop on a day to day basis? (I know you have said you use desktop tools for system admin tasks).

If I was buying a Pi as my main Node-red server today I'd consider the Pi 5 2GB.  
The performance improvement when I upgraded from a 3B to a 4B and switched to an SSD was well worth the (not cheap) cost, though it's a significant effort to transfer everything.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [10 June 2025 09:46 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/11 "2025-06-10T09:46:08Z")

</div>

I suspect there were compound issues relevant to all of Andrews recent posts.  
I suspect it started when he imported flows into newer Node-RED (4.0.9) which uses some more modern syntaxes (like `.hasOwn` and `this?.that` etc) that WOULD have raised errors in the consle & would _probably_ be the cause of the missing lines/nodes. Following that, the grouping and so forth are possibly compounded issues.

It is just a suspicion, unfortunately, without the relevant requested info this is pretty tricky to determine if this is a user/system issue or a real node-red problem.

I have a feeling Andrew is doing imports over VNC in an old version of chromium.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [10 June 2025 11:16 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/12 "2025-06-10T11:16:10Z")

</div>

Andrew, you might find this flow useful. It is designed to send to MQTT using retained topics but you can simply dump it to a global variable and output to debug when needed if you prefer that.

```json
[{"id":"16c80b3b.96b455","type":"inject","z":"d0860be6.7951b8","g":"22b622da.95bf8e","name":"","props":[{"p":"topic","vt":"str"}],"repeat":"21600","crontab":"","once":true,"onceDelay":0.1,"topic":"OS Info","x":95,"y":1040,"wires":[["a3b2034e.b6368","b2eada78.c69358","174f9b34.08c585","a81d73e6.f2b48","35352753.1c63d8","83f3c36b.fcf6","5102db3fc51c266f"]],"l":false},{"id":"5f6080b8.724c8","type":"function","z":"d0860be6.7951b8","g":"22b622da.95bf8e","name":"","func":"// @ts-ignore\nconst require = global.get('require')\n\nconst os = require('os')\nconst pay = msg.payload.split('\\n')\n\nmsg.var = \"INFO\"\nmsg.prop = \"system.server\"\nconst server = {}\n\nserver.hostname = os.hostname()\nserver.type = os.type()\nserver.os = pay[0]\nserver.last_reboot = new Date(pay[1])\nserver.release = os.release()\nserver.version = os.version()\n//server.platform = os.platform()\nserver.arch = os.arch()\nserver.endianness = os.endianness()\nserver.cpu = os.cpus()[0].model\nserver.cores = os.cpus().length\nserver.totalmem = Number.parseFloat( os.totalmem()/1073741824 ).toFixed(1) // GB\n\n// server.freemem = os.freemem()\n// server.loadavg = os.loadavg()\n// server.networkInterfaces = os.networkInterfaces()\n\nmsg.val = server //{}\n//msg.val.system = system\n\nreturn msg\n\n// cat /etc/os-release | grep -oP '^PRETTY_NAME=\\\"\\K.*?(?=\")'\n// lsb_release -a\n// Description: Debian GNU/Linux 10 (buster)","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":515,"y":1040,"wires":[["06e8df4b2381e872"]],"l":false},{"id":"a3b2034e.b6368","type":"exec","z":"d0860be6.7951b8","g":"22b622da.95bf8e","command":"cat /etc/os-release | grep -oP '^PRETTY_NAME=\\\"\\K.*?(?=\")' && uptime -s","addpay":"","append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Get OS Name & last reboot","x":340,"y":1040,"wires":[["5f6080b8.724c8"],[],[]]},{"id":"b2eada78.c69358","type":"exec","z":"d0860be6.7951b8","g":"22b622da.95bf8e","command":"ls -lact --full-time /etc |awk 'END {print $6,$7,$8}'","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"OS Install Dt","x":290,"y":1100,"wires":[["dde4c354.5ba12"],[],[]]},{"id":"dde4c354.5ba12","type":"function","z":"d0860be6.7951b8","g":"22b622da.95bf8e","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.server\"\nmsg.val = {}\n\nmsg.val.os_installed = new Date(msg.payload.trim())\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":515,"y":1100,"wires":[["06e8df4b2381e872"]],"l":false},{"id":"cf70194f.ca8478","type":"function","z":"d0860be6.7951b8","g":"22b622da.95bf8e","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.nodered.last_restart\"\nmsg.val = msg.payload.trim().replace('+00:00','.000Z')\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":515,"y":1160,"wires":[["06e8df4b2381e872"]],"l":false},{"id":"174f9b34.08c585","type":"exec","z":"d0860be6.7951b8","g":"22b622da.95bf8e","command":"sudo systemctl show nrmain | grep -oP 'ExecMainStartTimestamp=\\K.*' | xargs -0 date -Iseconds -u -d","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Node-RED restarted last?","x":330,"y":1160,"wires":[["cf70194f.ca8478"],[],[]]},{"id":"a81d73e6.f2b48","type":"exec","z":"d0860be6.7951b8","g":"22b622da.95bf8e","command":"npm ls --depth=0 | grep -oP 'node-red\\@\\K.*'","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Node-RED current version","x":340,"y":1220,"wires":[["b5575ac.eb4c1a8"],[],[]]},{"id":"b5575ac.eb4c1a8","type":"function","z":"d0860be6.7951b8","g":"22b622da.95bf8e","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.nodered.version\"\nmsg.val = msg.payload.trim()\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":515,"y":1220,"wires":[["06e8df4b2381e872"]],"l":false},{"id":"35352753.1c63d8","type":"exec","z":"d0860be6.7951b8","g":"22b622da.95bf8e","command":"node --version","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Node.js current version","x":330,"y":1280,"wires":[["2e54abd3.f445a4"],[],[]]},{"id":"2e54abd3.f445a4","type":"function","z":"d0860be6.7951b8","g":"22b622da.95bf8e","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.node.version\"\nmsg.val = msg.payload.trim()\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":515,"y":1280,"wires":[["06e8df4b2381e872"]],"l":false},{"id":"cd99fc7f.3ed21","type":"function","z":"d0860be6.7951b8","g":"22b622da.95bf8e","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.node.npm_version\"\nmsg.val = msg.payload.trim()\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":515,"y":1340,"wires":[["06e8df4b2381e872"]],"l":false},{"id":"83f3c36b.fcf6","type":"exec","z":"d0860be6.7951b8","g":"22b622da.95bf8e","command":"npm --version","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"npm current version","x":320,"y":1340,"wires":[["cd99fc7f.3ed21"],[],[]]},{"id":"5102db3fc51c266f","type":"http request","z":"d0860be6.7951b8","g":"22b622da.95bf8e","name":"NR Diagnostics","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://home.knightnet.co.uk:1880/red/diagnostics","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"headers":[],"x":300,"y":1400,"wires":[["d64c4be6b011e1a8"]]},{"id":"d64c4be6b011e1a8","type":"function","z":"d0860be6.7951b8","g":"22b622da.95bf8e","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.nodered.diagnostics\"\nmsg.val = msg.payload\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":515,"y":1400,"wires":[["06e8df4b2381e872"]],"l":false}]

```

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/f/df3c2474f04f9201f9af7418389529996d93eb82.png)

There is also this which tells you whether your currently installed node.js is an LTS version and what the current LTS version is:

```json
[{"id":"f9f5e3edbfdb44a7","type":"function","z":"d0860be6.7951b8","g":"3aba606e3d187d8b","name":"function 4","func":"const releases = msg.payload\n\nconst latestLTS = releases.find((release) => release.lts)\n\nconst installedVersion = process.version\n\nconst installedDetails = releases.find((release) => release.version === installedVersion)\n\nconst isIninstalledLTS = installedDetails.lts !== false\n\nconsole.log(`Latest LTS version: ${latestLTS.version}, LTS: ${latestLTS.lts}`)\nconsole.log(`Installed version: ${installedVersion}. From details: ${installedDetails.version}, LTS ${installedDetails.lts}`);\n\nif (isIninstalledLTS === true) {\n console.log('The installed version is an LTS version.');\n} else {\n console.log('The installed version is not an LTS version.');\n}\n\nreturn {\n isInstalledLTS: isIninstalledLTS,\n installed: installedVersion,\n installedDetails: installedDetails,\n latestLTS: latestLTS,\n releases: releases,\n}","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[{"var":"process","module":"process"}],"x":500,"y":3680,"wires":[["6413c730059274c2"]]}]

```

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/1/b1298fb4728b6f0907c76d87c8ca8b7a25f67369.png)

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [10 June 2025 13:38 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/13 "2025-06-10T13:38:24Z")

</div>

I'm not sure this would help Andrew, or confuse him more 😉  
It looks like it is somewhat customised for your particular install.

If you want to try it Andrew, then try this modified flow -

```auto
[{"id":"16c80b3b.96b455","type":"inject","z":"32bc1133.9bf706","name":"","props":[{"p":"topic","vt":"str"}],"repeat":"21600","crontab":"","once":true,"onceDelay":0.1,"topic":"OS Info","x":1205,"y":1140,"wires":[["a3b2034e.b6368","b2eada78.c69358","174f9b34.08c585","a81d73e6.f2b48","35352753.1c63d8","83f3c36b.fcf6","5102db3fc51c266f"]],"l":false},{"id":"5f6080b8.724c8","type":"function","z":"32bc1133.9bf706","name":"","func":"\n\nconst pay = msg.payload.split('\\n')\n\nmsg.var = \"INFO\"\nmsg.prop = \"system.server\"\nconst server = {}\n\nserver.hostname = os.hostname()\nserver.type = os.type()\nserver.os = pay[0]\nserver.last_reboot = new Date(pay[1])\nserver.release = os.release()\nserver.version = os.version()\n//server.platform = os.platform()\nserver.arch = os.arch()\nserver.endianness = os.endianness()\nserver.cpu = os.cpus()[0].model\nserver.cores = os.cpus().length\nserver.totalmem = Number.parseFloat( os.totalmem()/1073741824 ).toFixed(1) // GB\n\n// server.freemem = os.freemem()\n// server.loadavg = os.loadavg()\n// server.networkInterfaces = os.networkInterfaces()\n\nmsg.val = server //{}\n//msg.val.system = system\n\nreturn msg\n\n// cat /etc/os-release | grep -oP '^PRETTY_NAME=\\\"\\K.*?(?=\")'\n// lsb_release -a\n// Description: Debian GNU/Linux 10 (buster)","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[{"var":"os","module":"os"}],"x":1625,"y":1140,"wires":[["6837697c8f850add"]],"l":false},{"id":"a3b2034e.b6368","type":"exec","z":"32bc1133.9bf706","command":"cat /etc/os-release | grep -oP '^PRETTY_NAME=\\\"\\K.*?(?=\")' && uptime -s","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Get OS Name & last reboot","x":1450,"y":1140,"wires":[["5f6080b8.724c8"],[],[]]},{"id":"b2eada78.c69358","type":"exec","z":"32bc1133.9bf706","command":"ls -lact --full-time /etc |awk 'END {print $6,$7,$8}'","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"OS Install Dt","x":1400,"y":1200,"wires":[["dde4c354.5ba12"],[],[]]},{"id":"dde4c354.5ba12","type":"function","z":"32bc1133.9bf706","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.server\"\nmsg.val = {}\n\nmsg.val.os_installed = new Date(msg.payload.trim())\n\nreturn msg\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1625,"y":1200,"wires":[["271ea0173ca6f4b5"]],"l":false},{"id":"cf70194f.ca8478","type":"function","z":"32bc1133.9bf706","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.nodered.last_restart\"\nmsg.val = msg.payload.trim().replace('+00:00','.000Z')\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1625,"y":1260,"wires":[["f402b50c783046a2"]],"l":false},{"id":"174f9b34.08c585","type":"exec","z":"32bc1133.9bf706","command":"sudo systemctl show nodered | grep -oP 'ExecMainStartTimestamp=\\K.*' | xargs -0 date -Iseconds -u -d","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Node-RED restarted last?","x":1440,"y":1260,"wires":[["cf70194f.ca8478"],[],[]]},{"id":"a81d73e6.f2b48","type":"exec","z":"32bc1133.9bf706","command":"npm list -g node-red --depth=0 | grep -oP 'node-red@\\K[^@\\s]+'","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Node-RED current version","x":1450,"y":1320,"wires":[["b5575ac.eb4c1a8"],[],[]]},{"id":"b5575ac.eb4c1a8","type":"function","z":"32bc1133.9bf706","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.nodered.version\"\nmsg.val = msg.payload.trim()\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1625,"y":1320,"wires":[["91be16884fba7d7b"]],"l":false},{"id":"35352753.1c63d8","type":"exec","z":"32bc1133.9bf706","command":"node --version","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Node.js current version","x":1440,"y":1380,"wires":[["2e54abd3.f445a4"],[],[]]},{"id":"2e54abd3.f445a4","type":"function","z":"32bc1133.9bf706","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.node.version\"\nmsg.val = msg.payload.trim()\n\nreturn msg\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1625,"y":1380,"wires":[["0d1258e5da087cbb"]],"l":false},{"id":"cd99fc7f.3ed21","type":"function","z":"32bc1133.9bf706","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.node.npm_version\"\nmsg.val = msg.payload.trim()\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1625,"y":1440,"wires":[["0719a207ec68c560"]],"l":false},{"id":"83f3c36b.fcf6","type":"exec","z":"32bc1133.9bf706","command":"npm --version","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"npm current version","x":1430,"y":1440,"wires":[["cd99fc7f.3ed21"],[],[]]},{"id":"6837697c8f850add","type":"debug","z":"32bc1133.9bf706","name":"debug 76","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1740,"y":1130,"wires":[]},{"id":"271ea0173ca6f4b5","type":"debug","z":"32bc1133.9bf706","name":"debug 77","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1750,"y":1200,"wires":[]},{"id":"f402b50c783046a2","type":"debug","z":"32bc1133.9bf706","name":"debug 78","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1730,"y":1260,"wires":[]},{"id":"91be16884fba7d7b","type":"debug","z":"32bc1133.9bf706","name":"debug 79","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1750,"y":1330,"wires":[]},{"id":"0d1258e5da087cbb","type":"debug","z":"32bc1133.9bf706","name":"debug 80","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1750,"y":1380,"wires":[]},{"id":"0719a207ec68c560","type":"debug","z":"32bc1133.9bf706","name":"debug 81","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1750,"y":1440,"wires":[]}]

```

It should work for a "standard" NR install, and includes the following changes

**Get OS Name & last reboot**  
In function node setup-tab add os imported as os, in on message-tab remove references to require.

**Node-RED restarted last?**  
Change the service name to nodered -

```auto
sudo systemctl show nodered | grep -oP 'ExecMainStartTimestamp=\K.*' | xargs -0 date -Iseconds -u -d

```

**Node-RED current version**  
Official install script is a global install, which can be found using a slightly different command. Change the command in the exec node to -

```auto
npm list -g node-red --depth=0 | grep -oP 'node-red@\K[^@\s]+'

```

**NR Diagnostics**  
Not sure if this is a custom endpoint, but doesn't work for me ?

**Function 4**  
The flow is missing all the other nodes 😉

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [10 June 2025 13:47 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/14 "2025-06-10T13:47:38Z")

</div>

> [@Sean-McG](#):
>
> It looks like it is somewhat customised for your particular install.

There is only 1 part that is custom that I'd forgotten about. In the first fn node, remove the 2 lines that refer to `require` and add `os` as a module in the setup of that node. I wrote that long before adding modules to function nodes was possible. 🙂

Everything else should work on anyone's Node-RED instance.

Sorry, should have said that the OS commands mostly assume that you are on Linux. But they wouldn't be hard to adjust for other OS's.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [10 June 2025 22:13 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/15 "2025-06-10T22:13:59Z")

</div>

Running the slightly modified flow.

 ![Screenshot from 2025-06-11 08-19-36](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/e/1eed70785212e8b7eb4914b3a5c7f3367ab60ce7.png)

Working here.

I'll put it on the RasPi ASAP.  
Though the one `error` is of slight concern.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [10 June 2025 22:35 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/16 "2025-06-10T22:35:59Z")

</div>

Here is a small tweak I did which MAY be better for people.

But I can't get the `node-red last restarted` value to work.  
(on the Ubuntu machine at least)

```auto
[{"id":"53755bb120c6ceb8","type":"exec","z":"65c9b63cb09879a0","command":"npm list -g node-red --depth=0 | grep -oP 'node-red@\\K[^@\\s]+'","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Node-RED current version","x":4250,"y":2930,"wires":[["8f396a40ab38b367"],[],[]]},{"id":"6c3a701d3d95f84e","type":"inject","z":"65c9b63cb09879a0","name":"","props":[{"p":"topic","vt":"str"}],"repeat":"21600","crontab":"","once":true,"onceDelay":0.1,"topic":"OS Info","x":4005,"y":2750,"wires":[["2e52422215f0773d","694b04458be823a6","83eeb3be4aef3f98","53755bb120c6ceb8","7868cb709aa70716","38e0a6a4ddb70943"]],"l":false},{"id":"8f396a40ab38b367","type":"function","z":"65c9b63cb09879a0","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.nodered.version\"\nmsg.val = msg.payload.trim()\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":4425,"y":2930,"wires":[["4ed19bb198825e9d","e18e5f89925e88ff"]],"l":false},{"id":"2e52422215f0773d","type":"exec","z":"65c9b63cb09879a0","command":"cat /etc/os-release | grep -oP '^PRETTY_NAME=\\\"\\K.*?(?=\")' && uptime -s","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Get OS Name & last reboot","x":4250,"y":2750,"wires":[["182d97ee5516dc5f"],[],[]]},{"id":"694b04458be823a6","type":"exec","z":"65c9b63cb09879a0","command":"ls -lact --full-time /etc |awk 'END {print $6,$7,$8}'","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"OS Install Dt","x":4200,"y":2810,"wires":[["d48fc1f140bc6520"],[],[]]},{"id":"83eeb3be4aef3f98","type":"exec","z":"65c9b63cb09879a0","command":"sudo systemctl show nodered | grep -oP 'ExecMainStartTimestamp=\\K.*' | xargs -0 date -Iseconds -u -d","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Node-RED restarted last?","x":4240,"y":2870,"wires":[["9d47ce5a7a04c537"],[],[]]},{"id":"7868cb709aa70716","type":"exec","z":"65c9b63cb09879a0","command":"node --version","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Node.js current version","x":4240,"y":2990,"wires":[["62f398e8c0a20318"],[],[]]},{"id":"38e0a6a4ddb70943","type":"exec","z":"65c9b63cb09879a0","command":"npm --version","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"npm current version","x":4230,"y":3050,"wires":[["a8fe80bf444786b7"],[],[]]},{"id":"4ed19bb198825e9d","type":"debug","z":"65c9b63cb09879a0","name":"NR version","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":4710,"y":2930,"wires":[]},{"id":"e18e5f89925e88ff","type":"template","z":"65c9b63cb09879a0","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"N/R version {{payload}} ","output":"str","x":4520,"y":2960,"wires":[["47cf93bf3221b468"]]},{"id":"182d97ee5516dc5f","type":"function","z":"65c9b63cb09879a0","name":"","func":"const pay = msg.payload.split('\\n')\n\nmsg.var = \"INFO\"\nmsg.prop = \"system.server\"\nconst server = {}\n\nserver.hostname = os.hostname()\nserver.type = os.type()\nserver.os = pay[0]\nserver.last_reboot = new Date(pay[1])\nserver.release = os.release()\nserver.version = os.version()\n//server.platform = os.platform()\nserver.arch = os.arch()\nserver.endianness = os.endianness()\nserver.cpu = os.cpus()[0].model\nserver.cores = os.cpus().length\nserver.totalmem = Number.parseFloat( os.totalmem()/1073741824 ).toFixed(1) // GB\n\n// server.freemem = os.freemem()\n// server.loadavg = os.loadavg()\n// server.networkInterfaces = os.networkInterfaces()\n\nmsg.val = server //{}\n//msg.val.system = system\n\nreturn msg\n\n// cat /etc/os-release | grep -oP '^PRETTY_NAME=\\\"\\K.*?(?=\")'\n// lsb_release -a\n// Description: Debian GNU/Linux 10 (buster)","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[{"var":"os","module":"os"}],"x":4425,"y":2750,"wires":[["6762a535df84d344","280c69c222ab28db"]],"l":false},{"id":"d48fc1f140bc6520","type":"function","z":"65c9b63cb09879a0","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.server\"\nmsg.val = {}\n\nmsg.val.os_installed = new Date(msg.payload.trim())\n\nreturn msg\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":4425,"y":2810,"wires":[["811063316450194e","69d7eb987fdd466c"]],"l":false},{"id":"9d47ce5a7a04c537","type":"function","z":"65c9b63cb09879a0","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.nodered.last_restart\"\nmsg.val = msg.payload.trim().replace('+00:00','.000Z')\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":4425,"y":2870,"wires":[["cf645fef91d33b11","b48636e653632b32"]],"l":false},{"id":"62f398e8c0a20318","type":"function","z":"65c9b63cb09879a0","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.node.version\"\nmsg.val = msg.payload.trim()\n\nreturn msg\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":4425,"y":2990,"wires":[["4c7951a31bd5f922","bf40aeba4bc91e3a"]],"l":false},{"id":"a8fe80bf444786b7","type":"function","z":"65c9b63cb09879a0","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.node.npm_version\"\nmsg.val = msg.payload.trim()\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":4425,"y":3050,"wires":[["2b7c28dcf9d1aae4","4fdc0671babf3c4b"]],"l":false},{"id":"47cf93bf3221b468","type":"join","z":"65c9b63cb09879a0","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":false,"timeout":"","count":"5","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":4720,"y":3140,"wires":[["ac61c2633ef7e832"]]},{"id":"6762a535df84d344","type":"debug","z":"65c9b63cb09879a0","name":"O/S name and last reboot","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":4750,"y":2750,"wires":[]},{"id":"280c69c222ab28db","type":"template","z":"65c9b63cb09879a0","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"O/S and last reboot {{payload}} ","output":"str","x":4520,"y":2780,"wires":[["47cf93bf3221b468"]]},{"id":"811063316450194e","type":"debug","z":"65c9b63cb09879a0","name":"debug 77","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":4700,"y":2810,"wires":[]},{"id":"69d7eb987fdd466c","type":"template","z":"65c9b63cb09879a0","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"O/S install DT {{payload}} ","output":"str","x":4520,"y":2840,"wires":[["47cf93bf3221b468"]]},{"id":"cf645fef91d33b11","type":"debug","z":"65c9b63cb09879a0","name":"NR last restarted","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":4730,"y":2870,"wires":[]},{"id":"b48636e653632b32","type":"template","z":"65c9b63cb09879a0","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"This is the payload: {{payload}} !","output":"str","x":4520,"y":2900,"wires":[[]]},{"id":"4c7951a31bd5f922","type":"debug","z":"65c9b63cb09879a0","name":"Node.js version","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":4720,"y":2990,"wires":[]},{"id":"bf40aeba4bc91e3a","type":"template","z":"65c9b63cb09879a0","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Node.js version {{payload}} ","output":"str","x":4520,"y":3020,"wires":[["47cf93bf3221b468"]]},{"id":"2b7c28dcf9d1aae4","type":"debug","z":"65c9b63cb09879a0","name":"NPM version","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":4710,"y":3050,"wires":[]},{"id":"4fdc0671babf3c4b","type":"template","z":"65c9b63cb09879a0","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"NPM version {{payload}} ","output":"str","x":4520,"y":3080,"wires":[["47cf93bf3221b468"]]},{"id":"ac61c2633ef7e832","type":"debug","z":"65c9b63cb09879a0","name":"All data","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":4900,"y":3140,"wires":[]}]

```

With this, _you_ get one message which you can copy/paste to the forum.

 ![Screenshot from 2025-06-11 08-36-07](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/1/c1b4bb5b28a24761c0d0dbe173e097c955cdddea.png)

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [10 June 2025 22:49 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/18 "2025-06-10T22:49:34Z")

</div>

Well there is a _problem_ that the `sudo` command needs the password.

Sorry.

AND...

```auto
 sudo systemctl show nodered | grep -oP 'ExecMainStartTimestamp=\K.*' | xargs -0 date -Iseconds -u -d
[sudo] password for me: 
date: invalid date ‘Wed 2025-06-11 07:40:14 AEST\n’

```

`invalid date` probably won't help.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [10 June 2025 22:52 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/19 "2025-06-10T22:52:19Z")

</div>

Just to check:

(with either/both)

This flow is seemingly ONLY for machine identification.

NOTHING to do with catching errors or the like.

Just so it is clear in my mind and there is no mistakes.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [10 June 2025 23:00 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/20 "2025-06-10T23:00:56Z")

</div>

This code works on my UBUNTU NUC

```auto
[{"id":"d02cb65efee301f1","type":"exec","z":"65c9b63cb09879a0","command":"systemctl show nodered | grep ^ExecMainStartTimestamp= | cut -d= -f2-","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Node-RED restarted last?","x":4260,"y":3400,"wires":[["0311db730a002792"],[],[]]},{"id":"e5c2ee066e9fbfc6","type":"inject","z":"65c9b63cb09879a0","name":"","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"OS Info","x":4025,"y":3280,"wires":[["f8c36499d7f2a52c","0c9a36f1d1d24c26","d02cb65efee301f1","c1037cfa5fd5726a","4e3b82d1a7ea356f","b7c14e12e20a0f94"]],"l":false},{"id":"0311db730a002792","type":"function","z":"65c9b63cb09879a0","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.nodered.last_restart\"\nmsg.val = msg.payload.trim().replace('+00:00','.000Z')\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":4445,"y":3400,"wires":[["917143b7247bfc23","4405895f9ac5fae2"]],"l":false},{"id":"f8c36499d7f2a52c","type":"exec","z":"65c9b63cb09879a0","command":"cat /etc/os-release | grep -oP '^PRETTY_NAME=\\\"\\K.*?(?=\")' && uptime -s","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Get OS Name & last reboot","x":4270,"y":3280,"wires":[["08df6dd7f4c7475b"],[],[]]},{"id":"0c9a36f1d1d24c26","type":"exec","z":"65c9b63cb09879a0","command":"sudo tune2fs -l $(df / | tail -1 | awk '{print $1}') | grep 'Filesystem created:' | cut -d: -f2- | xargs","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"OS Install Dt","x":4220,"y":3340,"wires":[["d5835190e53e665f"],[],[]]},{"id":"c1037cfa5fd5726a","type":"exec","z":"65c9b63cb09879a0","command":"npm list -g node-red --depth=0 | grep -oP 'node-red@\\K[^@\\s]+'","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Node-RED current version","x":4270,"y":3460,"wires":[["32fd3e7362c8d1f1"],[],[]]},{"id":"4e3b82d1a7ea356f","type":"exec","z":"65c9b63cb09879a0","command":"node --version","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Node.js current version","x":4260,"y":3520,"wires":[["ee81681b41d04e27"],[],[]]},{"id":"b7c14e12e20a0f94","type":"exec","z":"65c9b63cb09879a0","command":"npm --version","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"npm current version","x":4250,"y":3580,"wires":[["a7e14e47fe84720b"],[],[]]},{"id":"917143b7247bfc23","type":"debug","z":"65c9b63cb09879a0","name":"NR last restarted","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":4750,"y":3400,"wires":[]},{"id":"4405895f9ac5fae2","type":"template","z":"65c9b63cb09879a0","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Node-red last started {{payload}} ","output":"str","x":4540,"y":3430,"wires":[["9104b0360038ccb0"]]},{"id":"08df6dd7f4c7475b","type":"function","z":"65c9b63cb09879a0","name":"","func":"const pay = msg.payload.split('\\n')\n\nmsg.var = \"INFO\"\nmsg.prop = \"system.server\"\nconst server = {}\n\nserver.hostname = os.hostname()\nserver.type = os.type()\nserver.os = pay[0]\nserver.last_reboot = new Date(pay[1])\nserver.release = os.release()\nserver.version = os.version()\n//server.platform = os.platform()\nserver.arch = os.arch()\nserver.endianness = os.endianness()\nserver.cpu = os.cpus()[0].model\nserver.cores = os.cpus().length\nserver.totalmem = Number.parseFloat( os.totalmem()/1073741824 ).toFixed(1) // GB\n\n// server.freemem = os.freemem()\n// server.loadavg = os.loadavg()\n// server.networkInterfaces = os.networkInterfaces()\n\nmsg.val = server //{}\n//msg.val.system = system\n\nreturn msg\n\n// cat /etc/os-release | grep -oP '^PRETTY_NAME=\\\"\\K.*?(?=\")'\n// lsb_release -a\n// Description: Debian GNU/Linux 10 (buster)","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[{"var":"os","module":"os"}],"x":4445,"y":3280,"wires":[["e369c7b8dfd5743d","52e7a1881b55df36"]],"l":false},{"id":"d5835190e53e665f","type":"function","z":"65c9b63cb09879a0","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.server\"\nmsg.val = {}\n\nmsg.val.os_installed = msg.payload.trim()\n\nreturn msg\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":4445,"y":3340,"wires":[["834e2348995df30e","65218ece78508079"]],"l":false},{"id":"32fd3e7362c8d1f1","type":"function","z":"65c9b63cb09879a0","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.nodered.version\"\nmsg.val = msg.payload.trim()\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":4445,"y":3460,"wires":[["8705e093b67058e2","ee984aea418f2c16"]],"l":false},{"id":"ee81681b41d04e27","type":"function","z":"65c9b63cb09879a0","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.node.version\"\nmsg.val = msg.payload.trim()\n\nreturn msg\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":4445,"y":3520,"wires":[["c9dc226153c72825","38288951667915eb"]],"l":false},{"id":"a7e14e47fe84720b","type":"function","z":"65c9b63cb09879a0","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.node.npm_version\"\nmsg.val = msg.payload.trim()\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":4445,"y":3580,"wires":[["c6caa9a0f395e05e","9cb31a2aecd56a1c"]],"l":false},{"id":"9104b0360038ccb0","type":"join","z":"65c9b63cb09879a0","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":false,"timeout":"","count":"6","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":4740,"y":3670,"wires":[["e776e02060c8757f"]]},{"id":"e369c7b8dfd5743d","type":"debug","z":"65c9b63cb09879a0","name":"O/S name and last reboot","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":4770,"y":3280,"wires":[]},{"id":"52e7a1881b55df36","type":"template","z":"65c9b63cb09879a0","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"O/S and last reboot {{payload}} ","output":"str","x":4540,"y":3310,"wires":[["9104b0360038ccb0"]]},{"id":"834e2348995df30e","type":"debug","z":"65c9b63cb09879a0","name":"debug 77","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":4720,"y":3340,"wires":[]},{"id":"65218ece78508079","type":"template","z":"65c9b63cb09879a0","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"O/S install DT {{payload}} ","output":"str","x":4540,"y":3370,"wires":[["9104b0360038ccb0"]]},{"id":"8705e093b67058e2","type":"debug","z":"65c9b63cb09879a0","name":"NR version","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":4730,"y":3460,"wires":[]},{"id":"ee984aea418f2c16","type":"template","z":"65c9b63cb09879a0","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"N/R version {{payload}} ","output":"str","x":4540,"y":3490,"wires":[["9104b0360038ccb0"]]},{"id":"c9dc226153c72825","type":"debug","z":"65c9b63cb09879a0","name":"Node.js version","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":4740,"y":3520,"wires":[]},{"id":"38288951667915eb","type":"template","z":"65c9b63cb09879a0","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Node.js version {{payload}} ","output":"str","x":4540,"y":3550,"wires":[["9104b0360038ccb0"]]},{"id":"c6caa9a0f395e05e","type":"debug","z":"65c9b63cb09879a0","name":"NPM version","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":4730,"y":3580,"wires":[]},{"id":"9cb31a2aecd56a1c","type":"template","z":"65c9b63cb09879a0","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"NPM version {{payload}} ","output":"str","x":4540,"y":3610,"wires":[["9104b0360038ccb0"]]},{"id":"e776e02060c8757f","type":"debug","z":"65c9b63cb09879a0","name":"All data","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":4920,"y":3670,"wires":[]}]

```

And working on all RasPi machines too.

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [10 June 2025 23:09 UTC](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523/21 "2025-06-10T23:09:21Z")

</div>

Yeah it's just an old flow Julian posted to get some system info.  
Several things didn't work on my Pi running Bookworm, hence the modified flow.

It seems there are some differences with Ubuntu and Debian also.

Give this a try on Ubuntu

```auto
[{"id":"53755bb120c6ceb8","type":"exec","z":"32bc1133.9bf706","command":"npm list -g node-red --depth=0 | grep -oP 'node-red@\\K[^@\\s]+'","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Node-RED current version","x":1290,"y":2110,"wires":[["8f396a40ab38b367"],[],[]]},{"id":"6c3a701d3d95f84e","type":"inject","z":"32bc1133.9bf706","name":"","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"OS Info","x":1045,"y":1930,"wires":[["2e52422215f0773d","694b04458be823a6","83eeb3be4aef3f98","53755bb120c6ceb8","7868cb709aa70716","38e0a6a4ddb70943"]],"l":false},{"id":"8f396a40ab38b367","type":"function","z":"32bc1133.9bf706","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.nodered.version\"\nmsg.val = msg.payload.trim()\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1465,"y":2110,"wires":[["4ed19bb198825e9d","e18e5f89925e88ff"]],"l":false},{"id":"2e52422215f0773d","type":"exec","z":"32bc1133.9bf706","command":"cat /etc/os-release | grep -oP '^PRETTY_NAME=\\\"\\K.*?(?=\")' && uptime -s","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Get OS Name & last reboot","x":1290,"y":1930,"wires":[["182d97ee5516dc5f"],[],[]]},{"id":"694b04458be823a6","type":"exec","z":"32bc1133.9bf706","command":"sudo tune2fs -l $(df / | tail -1 | awk '{print $1}') | grep 'Filesystem created:' | cut -d: -f2- | xargs","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"OS Install Dt","x":1240,"y":1990,"wires":[["d48fc1f140bc6520"],[],[]]},{"id":"83eeb3be4aef3f98","type":"exec","z":"32bc1133.9bf706","command":"systemctl show nodered --property=ExecMainStartTimestamp --value | grep -v '^$\\|^0$' | xargs -r -I {} date -Iseconds -u -d \"{}\"","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Node-RED restarted last?","x":1280,"y":2050,"wires":[["9d47ce5a7a04c537"],[],[]]},{"id":"7868cb709aa70716","type":"exec","z":"32bc1133.9bf706","command":"node --version","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"Node.js current version","x":1280,"y":2170,"wires":[["62f398e8c0a20318"],[],[]]},{"id":"38e0a6a4ddb70943","type":"exec","z":"32bc1133.9bf706","command":"npm --version","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"npm current version","x":1270,"y":2230,"wires":[["a8fe80bf444786b7"],[],[]]},{"id":"4ed19bb198825e9d","type":"debug","z":"32bc1133.9bf706","name":"NR version","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1750,"y":2110,"wires":[]},{"id":"e18e5f89925e88ff","type":"template","z":"32bc1133.9bf706","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"N/R version {{payload}} ","output":"str","x":1560,"y":2140,"wires":[["47cf93bf3221b468"]]},{"id":"182d97ee5516dc5f","type":"function","z":"32bc1133.9bf706","name":"","func":"const pay = msg.payload.split('\\n')\n\nmsg.var = \"INFO\"\nmsg.prop = \"system.server\"\nconst server = {}\n\nserver.hostname = os.hostname()\nserver.type = os.type()\nserver.os = pay[0]\nserver.last_reboot = new Date(pay[1])\nserver.release = os.release()\nserver.version = os.version()\n//server.platform = os.platform()\nserver.arch = os.arch()\nserver.endianness = os.endianness()\nserver.cpu = os.cpus()[0].model\nserver.cores = os.cpus().length\nserver.totalmem = Number.parseFloat( os.totalmem()/1073741824 ).toFixed(1) // GB\n\n// server.freemem = os.freemem()\n// server.loadavg = os.loadavg()\n// server.networkInterfaces = os.networkInterfaces()\n\nmsg.val = server //{}\n//msg.val.system = system\n\nreturn msg\n\n// cat /etc/os-release | grep -oP '^PRETTY_NAME=\\\"\\K.*?(?=\")'\n// lsb_release -a\n// Description: Debian GNU/Linux 10 (buster)","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[{"var":"os","module":"os"}],"x":1465,"y":1930,"wires":[["6762a535df84d344","280c69c222ab28db"]],"l":false},{"id":"d48fc1f140bc6520","type":"function","z":"32bc1133.9bf706","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.server\"\nmsg.val = {}\n\nmsg.val.os_installed = msg.payload.trim()\n\nreturn msg\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1465,"y":1990,"wires":[["811063316450194e","69d7eb987fdd466c"]],"l":false},{"id":"9d47ce5a7a04c537","type":"function","z":"32bc1133.9bf706","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.nodered.last_restart\"\nmsg.val = msg.payload.trim().replace('+00:00','.000Z')\n\nreturn msg\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1465,"y":2050,"wires":[["cf645fef91d33b11","b48636e653632b32"]],"l":false},{"id":"62f398e8c0a20318","type":"function","z":"32bc1133.9bf706","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.node.version\"\nmsg.val = msg.payload.trim()\n\nreturn msg\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1465,"y":2170,"wires":[["4c7951a31bd5f922","bf40aeba4bc91e3a"]],"l":false},{"id":"a8fe80bf444786b7","type":"function","z":"32bc1133.9bf706","name":"","func":"msg.var = \"INFO\"\nmsg.prop = \"system.node.npm_version\"\nmsg.val = msg.payload.trim()\n\nreturn msg\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1465,"y":2230,"wires":[["2b7c28dcf9d1aae4","4fdc0671babf3c4b"]],"l":false},{"id":"47cf93bf3221b468","type":"join","z":"32bc1133.9bf706","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":false,"timeout":"","count":"6","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1760,"y":2320,"wires":[["ac61c2633ef7e832"]]},{"id":"6762a535df84d344","type":"debug","z":"32bc1133.9bf706","name":"O/S name and last reboot","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1790,"y":1930,"wires":[]},{"id":"280c69c222ab28db","type":"template","z":"32bc1133.9bf706","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"O/S and last reboot {{payload}} ","output":"str","x":1560,"y":1960,"wires":[["47cf93bf3221b468"]]},{"id":"811063316450194e","type":"debug","z":"32bc1133.9bf706","name":"debug 77","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1740,"y":1990,"wires":[]},{"id":"69d7eb987fdd466c","type":"template","z":"32bc1133.9bf706","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"O/S install DT {{payload}} ","output":"str","x":1560,"y":2020,"wires":[["47cf93bf3221b468"]]},{"id":"cf645fef91d33b11","type":"debug","z":"32bc1133.9bf706","name":"NR last restarted","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1770,"y":2050,"wires":[]},{"id":"b48636e653632b32","type":"template","z":"32bc1133.9bf706","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Node-RED Started: {{payload}}","output":"str","x":1560,"y":2080,"wires":[["47cf93bf3221b468"]]},{"id":"4c7951a31bd5f922","type":"debug","z":"32bc1133.9bf706","name":"Node.js version","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1760,"y":2170,"wires":[]},{"id":"bf40aeba4bc91e3a","type":"template","z":"32bc1133.9bf706","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Node.js version {{payload}} ","output":"str","x":1560,"y":2200,"wires":[["47cf93bf3221b468"]]},{"id":"2b7c28dcf9d1aae4","type":"debug","z":"32bc1133.9bf706","name":"NPM version","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1750,"y":2230,"wires":[]},{"id":"4fdc0671babf3c4b","type":"template","z":"32bc1133.9bf706","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"NPM version {{payload}} ","output":"str","x":1560,"y":2260,"wires":[["47cf93bf3221b468"]]},{"id":"ac61c2633ef7e832","type":"debug","z":"32bc1133.9bf706","name":"All data","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1940,"y":2320,"wires":[]}]

```

[Next page](https://discourse.nodered.org/t/group-selection-not-working-nr-4-0-9/97523.md?page=2)
