Enabling i2c node in Node Red to access /dev/i2c-0

Hi All,

Have a problem where Node Red is saying - Error: EPERM: operation not permitted, open ‘/dev/i2c-0’ when using the node-red-contrib-i2c node. From what I have been able to work out, the issue is the Node Red docker container can’t access the hardware because it doesn’t have permission to do so. The device driver for i2c is in the /dev directory on the RPi4 I’m using (got the driver enabled by using the i2c addon). I started looking into adding the permission to the Node Red config.yaml to access i2c but can’t find it anywhere (and I don’t know if that is the right way to go about it anyway).

Can anyone help?

I also have this problem.

I followed this from Adam Outler

(note you need to read the installation instructions and make it run Protection mode = OFF)

The permissions on my pi (3) are:
[core-ssh ~]$ ls -l /dev/i2c-1 crw------- 1 root root 89, 0 Mar 11 07:33 /dev/12c-1

The file is a character special file (the leading c) then rw for root only. I’m looking at how to mod this.

1 Like

I have the very same issue!

Error: EPERM: operation not permitted, open ‘/dev/i2c-1’


Same problem by me.
Can someone help?

Das gleiche Problem bei mir!
Kann hier jemand helfen?

I have the same issue. Any luck?