I'm having an issue with multiple raspberry pi 5's where the GPIO inputs are not recognized reliably after editing/deploying a flow a few times. The inputs are switches tied between the GPIO pins and GND, with the GPIO pin set to "input-pullup".
The node i'm using is the default Pi GPIO V2.0.6.
This is running on a Pi 5 with a fresh install of Debian bookworm 64bit
To note, if i deploy the flow but only deploy the modified nodes, there doesnt seem to be an issue. It only occurs when I deploy the GPIO node multiple times and then the switches go into a "floating" state, where if the switch is flipped multiple times it may work 10% of the time.
I am not able to test this as I don't have the hardware, but we might get some useful information from the log.
Run node-red-reload, which will stop and start node-red and leave it showing the log output. Then attempt to reproduce the issue, then post the full log here please, from startup.
Here's the log from running node-red-reload.
I removed my original flow and only have 3 gpioin nodes.
This time, after deploying once, the nodes are not reliable any more.
I can switch the switches and sometimes they stick high and sometimes they don't respond, rebooting the pi fixes the problem.
Once Node-RED has started, point a browser at http://192.168.1.268:1880
On Pi Node-RED works better with the Firefox or Chrome browser
Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot
Starting as a systemd service.
2 Feb 08:22:13 - [info]
Welcome to Node-RED
2 Feb 08:22:13 - [info] Node-RED version: v4.0.8
2 Feb 08:22:13 - [info] Node.js version: v20.18.1
2 Feb 08:22:13 - [info] Linux 6.6.62+rpt-rpi-v8 arm64 LE
2 Feb 08:22:13 - [info] Loading palette nodes
2 Feb 08:22:15 - [info] Settings file : /home/raspberry/.node-red/settings.js
2 Feb 08:22:15 - [info] Context store : 'default' [module=memory]
2 Feb 08:22:15 - [info] Context store : 'storeInFile' [module=localfilesystem]
2 Feb 08:22:15 - [info] User directory : /home/raspberry/.node-red
2 Feb 08:22:15 - [warn] Projects disabled : editorTheme.projects.enabled=false
2 Feb 08:22:15 - [info] Flows file : /home/raspberry/.node-red/flows.json
2 Feb 08:22:15 - [warn] Encrypted credentials not found
2 Feb 08:22:15 - [info] Server now running at http://127.0.0.1:1880/
2 Feb 08:22:15 - [info] Starting flows
2 Feb 08:22:15 - [info] [ui-base:My Dashboard] Node-RED Dashboard 2.0 (v1.21.0) started at /dashboard
2 Feb 08:22:15 - [info] [ui-base:My Dashboard] Created socket.io server bound to Node-RED port at path /dashboard/socket.io
2 Feb 08:22:15 - [info] Started flows
2 Feb 08:22:38 - [info] Stopping flows
2 Feb 08:22:38 - [info] Stopped flows
2 Feb 08:22:38 - [info] Updated flows
2 Feb 08:22:38 - [info] Starting flows
2 Feb 08:22:38 - [info] Started flows
Certainly the Pi guys have totally re-implemented the GPIO hardware on the Pi5 so I guess there is no doubt also a low level software change to try to make it backwards compatible. I guess we may be falling into some timing issue or other oddness here - but sadly I don't have a Pi5 to play with - (to many Pi2,3,4 already) - so it will need someone to dig into the GPIO node/python code to figure it out.
Yes i'm seeing some other posts about the Pi 5 and GPIO issues. Looking at the pi gpio history, it hasn't been updated in 2 years is that correct? If so there might definitely be issues with compatibility with the Pi 5.
I retested the pi gpio node on a pi4 and theres no issues there after multiple deploys so definitely leaning towards the pi5 compatibility problem.