Sanity check on my node-red version

I've been running Node-Red for years on a Raspberry Pi. I originally installed prior to version 1 coming out.

I wanted to upgrade to the latest and did so. I've updated it previously, but it's been a while. I have a feeling I'm not upgrading properly. I have version 0.10.29 reported when I do a node -v at the CLI.

Can you tell me if this sounds right to you?

Did you update using the bash script from the documentation page?

If you read that page you will see this note:

  • install the current Node.js LTS release using the NodeSource. If it detects Node.js is already installed from NodeSource, it will ensure it is at least Node 8, but otherwise leave it alone

That is the version of nodejs not node-red. To find the version of node red then in a terminal you can run
npm list -g node-red
However that version of nodejs is very old. As suggested the best solution is to run the node-red install/upgrade script pointed to by @zenofmud, that will update nodejs and node-red.

If node.js is that old then the underlying operating system may also be ancient as well.... what does cat /etc/issue report ?

1 Like

You validated my concerns! 'ancient' is exactly what I was expecting to hear but couldn't find the right info.

I'm going to dig in with those key pieces to research on. Excited to see what future holds with capabilities.

Dug into a few things for a quick response...

Raspbian Version: Raspbian GNU/Linux 8 \n \l
Node-red: node-red@1.1.3

@zenofmud, I definitely am familiar with that documentation page and referenced it last. What's interesting is that I misinterpreted it. I saw the versions of what to do and went right to the rPi command and ran that. apt-get install nodered

I'll run this and see where it gets me.

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

Now, before I begin, my entire house would go into a tizzy if this breaks anything. I have several elements controlled purely by this. I figured I'd pause for a moment and see some validation before proceeding. Obviously I know nothing is risk free, but if there is anything obvious that jumps out at you, I'd really appreciate your insights.

Take an image backup of your SD card first, then you can plug in the spare if disaster ensues.

Or perhaps, since you are using an obsolete version of Raspbian, you might be better to start with a new card and put Buster on it and node red, then copy the node red files from the original card and get it working on the new card. Then if you have problems getting it going you can put the old card back in.

I've been thinking about this and places to go with it. I've had this running for about 5 years I guess. I think this Pi is a version 2. SD cards fail at some point, but I have not yet experienced that.

I have other things running on this I'd also have to port, but I'm leaning where you are and doing a full documentation of my process in case of failure. Perhaps create a stand-by Pi w/ a card that I back up quarterly or something.

I have a bunch of 3s laying around so I can easily start this path regardless. I can't help to say that I'm totally curious what this would look like after performing the updates. (once I take my card image) :thinking:

1 Like

The sort of problem you might get is if you are using any contrib nodes that are no longer maintained and are not compatible with later versions of nodejs. That sort of problem can be quite problematic to recover from. You would not be able to revert nodejs to an earlier version because node-red now needs at least nodejs 8.x.

For incremental changes those problems are less likely to occur but with such a large leap in versions it is more likely, so having a plan allowing you to easily revert to the original temporarily while you sort it out is probably a good idea.

If you are starting from scratch on a new card and don't need a display on the pi then you might like to look at this blog on setting up a headless pi without having to plug any peripherals in. http://blog.clanlaw.org.uk/pi-headless-server.html

You're awesome. Outstanding points. I had fun last night recovering from a bad node contrib...node-red wouldn't start and had to manually edit the master flows file. First time I had to do that and went through the normal nervous concerns not knowing if there are hidden dependencies on some of the content I was editing. It went rather well. I also have MQTT on this that is critical to my system. That's probably a dinosaur version, too, albeit that's likely not as concerning because it's so simple.

Hopefully some of this thread will be useful for those who have done something like me where they put an 'appliance' in and get onto other things. Years tick by really quickly and you scratch your head thinking "gosh, that couldn't have been THAT long ago" where it really has been a technology generation.

I'm definitely running headless and I'm looking forward to reading your tip.

If you had to manually edit because node-red was crashing then there is an option to start node-red without starting the flows using
node-red --safe
which allows editing of the flow using the editor without node-red crashing.

However if you are using a version from before that option was available then perhaps manual editing was the easiest, or only, solution.

I had some time tonight. I did a backup of the SD card. I didn't update the OS, but I did a full upgrade to Node-red and nodejs. Wow, big difference. I had a ton of stuff break and I will find out tomorrow how much stuff is broken. I had to reinstall Slack, dashboard, twillio and...I think that was it. Having some issues w/ Slack, but they are major. I'm still using webhooks, so it looks like there are better, more recommended options now. I basically just use it to make sure I get messages on key events so I know things are working.

I probably need to update mosquitto(MQTT), but afraid to do too much.

I'm also in the process of building a new rPi from scratch using latest OS. I am using it for RADIUS (for my Wi-Fi), so I have some other hurdles to address at the same time.

You all helped a bunch and I thank you.

I just wanted to share back that things seem to be working. Pool controller went on and off. Landscape lights, etc. Some little bugs I'm working out, but huge help.

Now, I'm going to write something to monitor sunset/sunrise so I can get rid of the manual timer for the landscape lights. I've looked at several videos/posts. Looks like schedex can do it. Have any of you done this?

The node-red-contrib-cron-plus node can do this too. It gives you a nice easy way of setting location and does a lot more too.

It might seem daunting but it's very easy and there a built in examples (import menu) and extensive built in help.

Thank you, sir. Looking forward to trying it out. I'll give it a shot tonight.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.