can I check what, in your experience, would prevent the (pre-installed) node-red GPIO input nodes from responding to changes in state of the GPIOs? On an RPi4 model b running bookworm.
looking at the state in terminal (using pinctrl) they are reporting properly via the OS.
Have you got debug nodes directly to the GPIO nodes to confirm that is what is happening?
What status is shown under the nodes when they are not working?
Is this an intermittent problem or do they not work at all? If they don't work at all then run node-red-stop node-red-start
and show us what appears in the command window. Note that it is node-red-start not node-red start
doesn't seem to be an intermittent problem. remains the case through multiple reboots (not just restarts).
for debugging I'm asserting the pins directly against leads connected to 3.3v and gnd. I've also tried against the module that I'm working with (a standard EC11 rotary encoder).
here is the output from node-red-start
node-red-start
Start Node-RED
Once Node-RED has started, point a browser at http://10.10.10.112: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
To find more nodes and example flows - go to http://flows.nodered.org
Starting as a systemd service.
30 Jun 14:45:17 - [info]
Welcome to Node-RED
===================
30 Jun 14:45:17 - [info] Node-RED version: v4.0.1
30 Jun 14:45:17 - [info] Node.js version: v18.20.3
30 Jun 14:45:17 - [info] Linux 6.6.31+rpt-rpi-v8 arm64 LE
30 Jun 14:45:18 - [info] Loading palette nodes
30 Jun 14:45:20 - [info] Settings file : /home/jpadie/.node-red/settings.js
30 Jun 14:45:20 - [info] Context store : 'default' [module=memory]
30 Jun 14:45:20 - [info] User directory : /home/jpadie/.node-red
30 Jun 14:45:20 - [warn] Projects disabled : editorTheme.projects.enabled=false
30 Jun 14:45:20 - [info] Flows file : /home/jpadie/.node-red/flows.json
30 Jun 14:45:21 - [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.
---------------------------------------------------------------------
30 Jun 14:45:21 - [warn] Encrypted credentials not found
30 Jun 14:45:21 - [info] Server now running at http://127.0.0.1:1880/
30 Jun 14:45:21 - [info] Starting flows
30 Jun 14:45:21 - [info] Started flows
after the start I tried two different GPIOs against both the gnd and 3.3v leads.
attached is a screenshot of what the flow looks like.
What do you see in the debug pane for debug 3 4 and 5?
Do the status codes shown under the nodes change?
Are you absolutely certain that you are connecting to the correct pins?
What type of pi is it?
it's an official RPi4b.
there is nothing in the input pane for the debugs other than on deploy. the status codes do not change.
I've taken a video and the link is here. Apologies for shaky camera skills: I'm mid-50s and had a coffee after lunch.
Hopefully viewers can see that the lead assignments are:
they are connected to 3.3 and gnd. sorry if the photography didn't seem that way.
I got some results when using the gpiod nodes yesterday but now do not. nothing has changed RPi wise in the meantime (no new packages installed) other than turning it off over night. I can't say for sure that the gpiod nodes were reporting anything accurate as one of the reasons for starting over with the standard nodes was that there was a requirement for the pigpiod daemon to be loaded with root privileges.
I know there have been problems with the pi5 and gpio, but I have not heard of problems with bookworm on a 4 and gpio, and I can't find anything in the forum.
I may try in a couple of weeks but this visit I've only got another 48 hours to complete the build and deployment of the kit. and it's 1500km away from where I usually live!
interestingly I've just installed spidev and rpio.gpio (for the adc hat) and now the gpio nodes are not responding (and the ADC hat does not work either).
so am now thinking it may be more an issue with nodered 4 than bookworm. or maybe both.