GPIO not available on Raspberry

Hello Guys!

I just started to use Raspberry OS Full with applications. First when I installed it, noticed, that it has built in Node-RED (so cool). I tried it without any modification and I manage to control GPIO pin 2 without any issue through Node-RED. Then I did an upgrade according to this article:

Also I setup Node-RED to start as a service. I added a few nodes to it, like the node-red-contrib-s7 and node-red-dashboard. I setup PIGPIOD to start automatically after reboot with this command:

sudo systemctl enable pigpiod

Additionally I setup to run my .py program, which controls the MeArm Robot with Crontab with the help of this article (you can find the autostart description in the middle):

I wanted to do the same, as before, control the same GPIO 2 with node-red-node-pi-gpio, but now it says not available.

  1. I am using Rasberry Pi 4 with 8 gb RAM.
  2. The newest Rasberry OS is installed on it.
  3. GPIO-s are working, if I run a python program on it.
  4. Doesn't matter if I set it up as output or input, it won't work. Always show not available.
  5. node-red startup log

"pi@zeus:~ $ node-red startup log
10 Nov 19:14:50 - [info]

Welcome to Node-RED

10 Nov 19:14:50 - [info] Node-RED version: v2.1.3
10 Nov 19:14:50 - [info] Node.js version: v12.22.5
10 Nov 19:14:50 - [info] Linux 5.10.63-v7l+ arm LE
10 Nov 19:14:51 - [info] Loading palette nodes
10 Nov 19:14:53 - [info] Dashboard version 3.1.1 started at /ui
10 Nov 19:14:53 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
10 Nov 19:14:53 - [info] Settings file : /home/pi/.node-red/settings.js
10 Nov 19:14:53 - [info] Context store : 'default' [module=memory]
10 Nov 19:14:53 - [info] User directory : /home/pi/.node-red
10 Nov 19:14:53 - [warn] Projects disabled : editorTheme.projects.enabled=false
10 Nov 19:14:53 - [info] Flows file : /home/pi/.node-red/startup
10 Nov 19:14:53 - [info] Creating new flow file
10 Nov 19:14:53 - [warn]

Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change."

  1. Export of the flow with all the nodes, what I have now online. Only using the S7 and GPIO nodes.
  2. I'm not using any extra hardware.
  3. Start and Stop the Node-RED did not help.
  4. I even disabled the script Autostart function, but it did not help either.

This is the last step what I want to achieve on Raspberry to my Master Thesis, besides that the missing part is setting up the Node-RED communicating with the Siemens S7 300 PLC and Raspberry correctly and make a nice dashboard for it.

If you have any idea how to get GPIO alive again, please let me know. I don't want to start from the beginning again. The strange thing, that the first time with brand new Raspberry OS without any Node-RED upgrade it worked :confused:

maybe this service that you are starting uses the PINS and doesnt allow the Node-red RPi Node to access them ? what if you stop that service and restart NR server ?

You don't need pigpiod for node-red-node-pi-gpio. That is for node-red-node-pi-gpiod.
See Interacting with Raspberry Pi GPIO : Node-RED
I don't know what the effect of running pigpiod is when trying to use the pi-gpio node.

This is not about creating custom nodes - moved to general


I need to have run this service to be able to control the robot from my python program.
Anyway, I just tried to stop the pigpiod to check if that is the case, then restarted Node-RED several times, but the results was the same: not available.

Hi Colin!

When I tried this on the brand new Rasberry OS, it worked. I could start the robot sequence from a button connected to the GPIO and also from Node-RED. At that time PIGPIOD was running behind. So I think that is not the problem. Something else should be.

Any other idea?

Which version is that?

[Edit] Also what do these commands show
apt-cache policy rpi.gpio

pi@zeus:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION="11 (bullseye)"
SUPPORT_URL="RaspbianForums - Raspbian"
BUG_REPORT_URL="RaspbianBugs - Raspbian"

pi@zeus:~ $ apt-cache policy rpi.gpio
Installed: 0.7.0-0.2+b1
Candidate: 0.7.0-0.2+b1
Version table:
*** 0.7.0-0.2+b1 500
500 Index of /raspbian bullseye/main armhf Packages
100 /var/lib/dpkg/status
Installed: (none)
Candidate: (none)
Version table:
Installed: 0.7.0-0.2+b1
Candidate: 0.7.0-0.2+b1
Version table:
*** 0.7.0-0.2+b1 500
500 Index of /raspbian bullseye/main armhf Packages
100 /var/lib/dpkg/status
pi@zeus:~ $ groups
pi adm dialout cdrom sudo audio video plugdev games users input netdev lpadmin gpio i2c spi
pi@zeus:~ $

That all looks ok.
This thread has another user unable to access the GPIO with raspbian bullseye (which has only just been released)

1 Like

I don't think it will help, but for the record, what does uname -a show?

pi@zeus:~ $ uname -a
Linux zeus 5.10.63-v7l+ #1459 SMP Wed Oct 6 16:41:57 BST 2021 armv7l GNU/Linux

I think we need to wait for @cymplecy to complete his install (in the other thread) to see if he also sees the issue.

For anyone finding this it looks like we have a fix in the the other thread.


Came here looking for this fix, thanks Colin

What exactly did you do to fix it?

Apologies, it's the raspbian bullseye issue where the python libraries need to be updated with a new version. You linked to the post with the command to do the update:

cd ~/.node-red
npm i node-red-node-pi-gpio@2.0.0-beta4

Which fixed things.

I couldn't reply on the other thread as it has been closed but wanted to thank you for pointing me in the right direction.

Further down the thread it says that the fix has been released. All you should need is the latest version. If you use the Palette Manager option in the menu you should see an option to update the node to 2.0.1. You should do that otherwise you are stuck on a beta version.

Gotcha, I see it. Thanks

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