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

**URL:** <https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817>\
**Category:** General\
**Created:** [30 May 2023 14:48 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817 "2023-05-30T14:48:06Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Miliks](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/miliks/32/7598_2.png) [@Miliks](https://discourse.nodered.org/u/Miliks)\
**Post date:** [6 June 2023 16:24 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/22 "2023-06-06T16:24:52Z")

</div>

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

```auto
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

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [6 June 2023 16:25 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/23 "2023-06-06T16:25:34Z")

</div>

```auto
+ 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.

---

<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:** [6 June 2023 16:26 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/24 "2023-06-06T16:26:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [6 June 2023 16:31 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/25 "2023-06-06T16:31:41Z")

</div>

@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.

---

<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:** [6 June 2023 16:41 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/26 "2023-06-06T16:41:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Miliks](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/miliks/32/7598_2.png) [@Miliks](https://discourse.nodered.org/u/Miliks)\
**Post date:** [6 June 2023 16:50 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/27 "2023-06-06T16:50:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Miliks](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/miliks/32/7598_2.png) [@Miliks](https://discourse.nodered.org/u/Miliks)\
**Post date:** [6 June 2023 16:54 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/28 "2023-06-06T16:54:29Z")

</div>

```auto
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:~ $

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [6 June 2023 17:06 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/29 "2023-06-06T17:06:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Miliks](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/miliks/32/7598_2.png) [@Miliks](https://discourse.nodered.org/u/Miliks)\
**Post date:** [6 June 2023 17:23 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/30 "2023-06-06T17:23:54Z")

</div>

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

---

<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:** [6 June 2023 17:44 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/31 "2023-06-06T17:44:47Z")

</div>

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

```

---

<div class="post-metadata">

**Author:** ![Miliks](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/miliks/32/7598_2.png) [@Miliks](https://discourse.nodered.org/u/Miliks)\
**Post date:** [6 June 2023 17:50 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/32 "2023-06-06T17:50:51Z")

</div>

i get to this point:

```auto
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

---

<div class="post-metadata">

**Author:** ![Miliks](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/miliks/32/7598_2.png) [@Miliks](https://discourse.nodered.org/u/Miliks)\
**Post date:** [6 June 2023 17:53 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/33 "2023-06-06T17:53:15Z")

</div>

Anyway this script keep giving me an error

```auto
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

```

---

<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:** [6 June 2023 17:59 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/34 "2023-06-06T17:59:37Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [6 June 2023 18:00 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/35 "2023-06-06T18:00:12Z")

</div>

> [@Miliks](#):
>
> `sudo apt install nodered`

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

---

<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:** [6 June 2023 18:26 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/36 "2023-06-06T18:26:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Miliks](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/miliks/32/7598_2.png) [@Miliks](https://discourse.nodered.org/u/Miliks)\
**Post date:** [7 June 2023 07:42 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/37 "2023-06-07T07:42:46Z")

</div>

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

```auto
 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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [7 June 2023 08:53 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/38 "2023-06-07T08:53:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Miliks](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/miliks/32/7598_2.png) [@Miliks](https://discourse.nodered.org/u/Miliks)\
**Post date:** [7 June 2023 09:01 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/39 "2023-06-07T09:01:52Z")

</div>

it was my original post: [Remote I/O erro on reading data from I2C bus on Raspberry Pi - #3 by Miliks](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/3)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/6/e6c907b91dace04963079863ebdfba91f9c2b199.png)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [7 June 2023 09:05 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/40 "2023-06-07T09:05:40Z")

</div>

Have you thought about trying [node-red-contrib-sht (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-sht)?  
If you do, make sure to read about the code and it's prerequisites.

---

<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:** [7 June 2023 09:31 UTC](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817/41 "2023-06-07T09:31:05Z")

</div>

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

> [@Miliks](#):
>
> I can read the data using the Python script on the same board

and run the Python script via an Exec node.

[Previous page](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817.md?page=1)

[Next page](https://discourse.nodered.org/t/remote-i-o-erro-on-reading-data-from-i2c-bus-on-raspberry-pi/78817.md?page=3)
