Remote I/O erro on reading data from I2C bus on Raspberry Pi

after executing the jbudd suggested sequence i get an error log attached to the previous post. and on the screen i get the following:

Running Node-RED install for user pi at /home/pi on raspbian


This can take 20-30 minutes on the slower Pi versions - please wait.

  Stop Node-RED                       ✔
  Remove old version of Node-RED      ✔
  Remove old version of Node.js       ✔   v10.21.0
  Install Node.js 16 LTS              ✘   Bad install:  Node.js missing  Npm missing - Exit
  Clean npm cache
  Install Node-RED core
  Move global nodes to local
  Npm rebuild existing nodes
  Install extra Pi nodes
  Add shortcut commands
  Update systemd script


Any errors will be logged to   /var/log/nodered-install.log

+ apt-get update
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:2 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Reading package lists...
E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://archive.raspberrypi.org/debian buster InRelease' changed its 'Suite' value from 'testing' to 'oldstable'
Error executing command, exiting

There is something wrong with your system. Nothing to do with node red.
You need to be able to successfully run
sudo apt update && sudo apt full-upgrade
Once you fix your system so that works then run the script again.

I don't think you should have a Debian repository in there.

I think you need to do
sudo apt update && sudo apt -y full-upgrade before retrying the install script

@jbudd is correct, it should be full-upgrade. I have amended my post. The -y just means you don't need to confirm that you want to do it when you get to the upgrade part.

Not sure how long ago Buster changed to "oldstable" but seeing that message implies an awful lot of OS updates to apply.

It might be a good time to burn a fresh copy of Bullseye to a new micro SD card, update the os and then run the install script on it.

I see that Amazon are selling 32GB sandisks for just £6. Perfect for experimenting with Node-red.

thanks guys, it's still updating... i'll launch the full-upgrade after that, and i'll order the new microSD as well. will try all you suggestions and post the results. didn't know the RPi is getting old so fast.

pi@raspberrypi:~ $ sudo apt update && sudo apt -y full-upgrade
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Fetched 15.0 kB in 1s (14.0 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  gconf-service gconf2-common libgconf-2-4 python-colorzero
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi:~ $ cd ~
pi@raspberrypi:~ $ whoami
pi
pi@raspberrypi:~ $ pwd
/home/pi
pi@raspberrypi:~ $
pi@raspberrypi:~ $ curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered >nrinstall
pi@raspberrypi:~ $ ./nrinstall --node16
-bash: ./nrinstall: Permission denied
pi@raspberrypi:~ $

Just run the script rather than separately downloading it. Don't forget the --node16

sorry, which script should i run this time?
this one <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)? it gives me again the permission error

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

i get to this point:

pi@raspberrypi:~/node-v16.13.0-linux-armv7l $ node --version
v16.20.0
pi@raspberrypi:~/node-v16.13.0-linux-armv7l $ sudo apt install nodered
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nodered : Depends: npm (>= 5.8)
E: Unable to correct problems, you have held broken packages.
pi@raspberrypi:~/node-v16.13.0-linux-armv7l $ npm --version
8.1.0

what is wrong now? i have an npm more then 5.8

Anyway this script keep giving me an error

pi@raspberrypi:~/node-v16.13.0-linux-armv7l $ <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered --node16)
-bash: /dev/fd/63: Permission denied
pi@raspberrypi:~/node-v16.13.0-linux-armv7l $ curl: option --node16: is unknown
curl: try 'curl --help' or 'curl --manual' for more information

sorry for typo = click on the copy icon and paste into your pi terminal

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

Why did you do this? The bash script will install node-red for you.

When you download a script, as I suggested, you end up with a file which cannot be executed. This is a safety feature in Linux.

So when you type ./nrinstall (which nobody suggested you should do, though you seen to have repeated the attempt) you get a permission error.

In any case, as others say it's best to run the entire command line from the documentation, appending --node16 to force it to install node.js v 16. The crucial difference is that it tells the Bash shell to run the commands in the downloaded file.

But you are trying to run the script from a folder
/home/pi/node-v16.13.0-linux-armv7l
This folder should not exist and I can only guess that you wrongly tried to install node.js v16 before the install script.

Run the script, from your home directory and include the --node16.

If you still see errors, show us.

ok, the node.js and node-red have been updated

 Node-RED version: v3.0.2
6 Jun 20:42:55 - [info] Node.js  version: v16.20.0
6 Jun 20:42:55 - [info] Linux 5.10.103-v7l+ arm LE
6 Jun 20:42:56 - [info] Loading palette nodes
6 Jun 20:42:57 - [info] Dashboard version 3.5.0 started at /ui

But i'm still getting the I/O error on connecting to the I2C device

I don't know about I2C but I am sure that someone who does would first need to know what the error is.
Show us the rest of the node-red startup log up to the point where you get the error.

it was my original post: Remote I/O erro on reading data from I2C bus on Raspberry Pi - #3 by Miliks
image

Have you thought about trying node-red-contrib-sht (node) - Node-RED?
If you do, make sure to read about the code and it's prerequisites.

I'm glad you finally got OS and Node-red updated.

As you know, the Remote I/O error issue has been raised several times on GitHub since 2017 without anyone reporting a solution.

If a different I2C node doesn't work, you might have to fall back on your original statement

and run the Python script via an Exec node.