Need help rebuilding home automation raspberry pi

Rebuilding my Home Automation RPi3B+ with latest version of RPi, NodeRed and MQTT. I had exported the FLOW from the old system. After installing the new software versions and trying to import the FLOW I realized there is a little more to it than that. I had to install several nodes from the library. I think that the one that is causing me this issue is the one that includes all the ui interface nodes. There is also the fact that the versions of NR are not the same now. The original version of NR is v0.20.7 and the current one is v4.1.6. When I imported the FLOW to the new version, all of the ui nodes were marked with the red triangle. When I compared some of the files with some screenshots of the same files from the original system, the layout were very different. I think my question is this. Should I try to find the earlier version of the ui nodes and if so how do I locate the earlier versions? I would prefer that method instead of re-writing the nodes to the later version, as there are 60 of them.
Any and all ideas greatly appreciated.
kentm

Hi @merkelck

One thing that caught my eye.

You were using Node RED Version : 0.20.7
And now you rebuilt (From 0.20.7) to 4.1.6

My suggestion is this: Migrate to modern versions.

  • Security (100's of CVE's) - you really don't want to stick with older versions of Node.
  • 100's of optimisations.
  • Easisyer migration after (so you can keep aligned with modern developments)
  • Other than DB Nodes, other Nodes might have moved on, and dropped support for older Node Versions.

Example: Some of my Nodes, no longer supports Node < v20

I get it might be a lot of work, but I think you will be in a difficult situation trying to moving forward later, and support will be really hard to acquire as a result.

Yes!!!
You can install older version, but you will need to use command line args todo so.

  • Its quite easy, but your experience wont be as nice, as it is with modern versions,
    again, many Nodes may pull in incompatible (recent) versions that no longer support older Node versions - it could get really messy, really quickly

One of the more frustrating aspects of computers is everything changes. As things move forward it's always been my philosophy to keep up to the latest rev levels and moving from dashboard 1 to dashboard 2 was one of the most painful things I've done. Literally months and I'm still sorting out a few things. Loading old modules, definitely not something I think you should do. Try to get everything up to date as much as you can and when the next change comes along it won't be near as bad.

1 Like

Have you got a new Raspberry Pi for the migration?

Your dashboard nodes will be the original node-red-dashboard add-on, which you can install using the hamburger menu | Manage Palette | Install tag and searching node-red-dashboard.

Unfortunately, although the original dashboard should still work fine, it is now replaced by @flowfuse/node-red-dashboard (because it uses libraries that are no longer kept updated) and there is no easy way to migrate your dashboard.
You can install both dashboards and work slowly through the migration process, or I guess you can stay with the original version, so long as your system is not accessed from outside your LAN.

1 Like

Open one of the nodes with the red triangle and show us what you see.

Also stop node red and start it again and post the startup log here.

I really appreciate all the response. Here is the data requested by Colin




node-red-start.txt (1.7 KB)
Hopefully this will help
kentm

Wow thought so - just to muddy the waters further you are also using the Node Red version from Home Assistant with its webhooks etc - this will layer another level of complexity as there have been many internal changes changes with various versions of Home Assistant and how is handles States and notifications etc.

Your best bet would be to build your system in parallel slowly on a different machine and step through the different versions of the various applications (Home Assistant, Node Red and Webhooks) and slowly edge your way forward.

Craig

For ease of seeing the problem I am posting the log inline (that it the preferred method here, unless the log is large). If posting a log again please paste inline and add lines containing triple backticks before and after it to stop the forum interpreting it as markdown

ckentm@4004HOME:~ $ node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.151:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
nodered.service: Referenced but unset environment variable evaluates to an empty string: NODE_RED_OPTIONS
8 Mar 16:23:51 - [info]
Welcome to Node-RED
===================
8 Mar 16:23:51 - [info] Node-RED version: v4.1.6
8 Mar 16:23:51 - [info] Node.js  version: v22.22.0
8 Mar 16:23:51 - [info] Linux 6.12.62+rpt-rpi-v8 arm64 LE
8 Mar 16:23:51 - [info] Loading palette nodes
8 Mar 16:23:55 - [info] UI started at /ui
8 Mar 16:23:57 - [info] Settings file  : /home/ckentm/.node-red/settings.js
8 Mar 16:23:57 - [info] Context store  : 'default' [module=memory]
8 Mar 16:23:57 - [info] User directory : /home/ckentm/.node-red
8 Mar 16:23:57 - [warn] Projects disabled : editorTheme.projects.enabled=false
8 Mar 16:23:57 - [info] Flows file     : /home/ckentm/.node-red/flows.json
8 Mar 16:23:57 - [info] Creating new flow file
8 Mar 16:23:57 - [warn] Using unencrypted credentials
8 Mar 16:23:57 - [info] Server now running at http://127.0.0.1:1880/
8 Mar 16:23:57 - [info] Starting flows
8 Mar 16:23:57 - [info] Started flows

In particular note the lines

8 Mar 16:23:57 - [info] Flows file     : /home/ckentm/.node-red/flows.json
8 Mar 16:23:57 - [info] Creating new flow file

That means that this is not how you normally start node-red. How do you normally start it?

HOWEVER

As @craigcurtin noticed you said at the start that you are using Home Automation. If you want to continue to use Home Automation, and you are using the HA node red addon, then to upgrade node red you have to upgrade the HA node red addon.

If you want to use HA but use node red standalone then that is possible I believe by installing the HA nodes into node red.

The text node config that you show is not from the standard node original dashboard or the new one, so what dashboard was installed on your old system? Is it one that comes with HA?

From the way that the UI nodes seem to have a tab of none - it seems like they have just lost their ui_base node for some reason. If you weren't using HA I'd would say just copy over the entire .node-red user directory and sub directories - then run and npm rebuild to update to make it match latest nodejs version then and npm update to update the nodes... BUT not sure how do that within HA-land as I have never used it.. However if it is "just" a case of missing ui_base then in theory you should just be able to redefine the tabs by recreating them (using the plus symbol button) and allocating the UI nodes to them - which of course means you have to recall where they all were etc... but may be simper than wrangling HA.

The text node from node-red-dashboard does not have a Tab field, nor does it have an Order field, and the Size field is missing. It should look like

@merkelck which dashboard have you installed? Look in the dropdown menu Manage Palette and see what it says. I suspect you have installed one of the dashboard clones, not node-red-dashboard.

True - Indeed it does look like an unfamiliar dashboard.
The other safe way to install nodes is to copy over the original package.json file and the package-lock.json file if there is one, to the .node-red user directory, and then remove the local .node-red/node_modules sub-directory and re-run the npm install so it uses the correct list.

It might be better not to include the lock file, as that could force old versions of nodes to be installed. I suggest just copying package.json and running the install command.

Or you could migrate to UIBUILDER and likely never have that problem ever again. :wink:

ah - there he is ! right on cue ! (I thought one had slipped past you :slight_smile:

1 Like

No, I've been building a new personal finance system along side enjoying my retirement, so I've been a bit distracted! :rofl::rofl:

1 Like

Being an old geezer with nothing better to do, I have decided to rebuild from scratch with a new RPi .
I will just work through one node at a time.
Thanks for all the suggestions
kentm

1 Like