So I decided to upgrade my project from rPi3 & Bullseye (11) to rPi4 & Bookworm (12). As most can imagine this was a major effort as I had to also reinstall the (proprietary) text to speech software and many other required side apps, reset stuff I long forgot about.
Pretty much all working except the most important part, the GPIO nodes. All I get is a yellow "OK" and they are not reading or responding to GPIO pin changes. Updated NR, checked and rechecked what I could thing of.
Also, when I open the rpi-gpio node edit dialog box and click on a radio button to select an input (IE: GPIO06 - 31 ) it looks like it is selected but after I click DONE and re-open the box nothing is selected again.
I am able to read the pins using pinctrl
Linux 12 (bookworm)
OS Kernel Linux 6.6.74
Node Red v 4.0.9
Node.js v 18.20.6
Dashboard v 3.6.5
Colin
2 March 2025 15:24
2
Did you install node-red using the recommended install script ?
Which node are you using for GPIO? Is it the default one (node-red-node-pi-gpio)? Check in Manage Palette to find out.
Assuming that you did install using the script, stop and start node-red using
node-red-stop
node-red-start
Note that is not node-red start
and the same for stop. Then copy/paste the startup log here. Copy/paste please, not screenshot.
I am surprised to see you using nodejs 18. 20 is the recommended version, though that is not the problem, I am sure.
Used the recommended curl command to update NR. It installed the versions you see.
Tried node-red-stop | node-red-start many times, as well as reboot, shutdown, etc...
I am using the standard (default) NR GPIO nodes. Checked for GPIO node new versions.
Not sure why but I'm beginning to suspect it might be a file ownership issue. If so, I have no idea where to begin looking for the issue.
Here is the log though I don't see anything in it as a clue.
Start Node-RED
Once Node-RED has started, point a browser at http://192.168.2.155: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.
Started nodered.service - Node-RED graphical event wiring tool.
2 Mar 10:44:30 - [info]
Welcome to Node-RED
===================
2 Mar 10:44:30 - [info] Node-RED version: v4.0.9
2 Mar 10:44:30 - [info] Node.js version: v18.20.6
2 Mar 10:44:30 - [info] Linux 6.6.74+rpt-rpi-v8 arm64 LE
2 Mar 10:44:31 - [info] Loading palette nodes
2 Mar 10:44:31 - [debug] Module: @flowfuse/node-red-dashboard 1.22.1 /home/pi/.node-red/node_modules/@flowfuse/node-red-dashboard
2 Mar 10:44:31 - [debug] Module: node-red-contrib-buffer-parser 3.2.2 /home/pi/.node-red/node_modules/node-red-contrib-buffer-parser
2 Mar 10:44:31 - [debug] Module: node-red-contrib-cron-plus 2.1.0 /home/pi/.node-red/node_modules/node-red-contrib-cron-plus
2 Mar 10:44:31 - [debug] Module: node-red-contrib-modbus 5.43.0 /home/pi/.node-red/node_modules/node-red-contrib-modbus
2 Mar 10:44:31 - [debug] Module: node-red-contrib-os 0.2.1 /home/pi/.node-red/node_modules/node-red-contrib-os
2 Mar 10:44:31 - [debug] Module: node-red-contrib-ui-level 0.1.46 /home/pi/.node-red/node_modules/node-red-contrib-ui-level
2 Mar 10:44:31 - [debug] Module: node-red-contrib-wifiscan 0.0.2 /home/pi/.node-red/node_modules/node-red-contrib-wifiscan
2 Mar 10:44:31 - [debug] Module: node-red-dashboard 3.6.5 /home/pi/.node-red/node_modules/node-red-dashboard
2 Mar 10:44:31 - [debug] Module: node-red-node-email 3.0.3 /home/pi/.node-red/node_modules/node-red-node-email
2 Mar 10:44:31 - [debug] Module: node-red-node-pi-gpio 2.0.6 /home/pi/.node-red/node_modules/node-red-node-pi-gpio
2 Mar 10:44:31 - [debug] Module: node-red-node-pi-gpiod 0.4.0 /home/pi/.node-red/node_modules/node-red-node-pi-gpiod
2 Mar 10:44:31 - [debug] Module: node-red-node-ping 0.3.3 /home/pi/.node-red/node_modules/node-red-node-ping
2 Mar 10:44:31 - [debug] Module: node-red-node-random 0.4.1 /home/pi/.node-red/node_modules/node-red-node-random
2 Mar 10:44:31 - [debug] Module: node-red-node-serialport 2.0.3 /home/pi/.node-red/node_modules/node-red-node-serialport
2 Mar 10:44:31 - [debug] Module: node-red-node-smooth 0.1.2 /home/pi/.node-red/node_modules/node-red-node-smooth
2 Mar 10:44:31 - [debug] Module: node-red-node-suncalc 1.2.0 /home/pi/.node-red/node_modules/node-red-node-suncalc
2 Mar 10:44:34 - [info] Dashboard version 3.6.5 started at /ui
2 Mar 10:44:35 - [info] Settings file : /home/pi/.node-red/settings.js
2 Mar 10:44:35 - [info] HTTP Static : /home/pi/HC_Config/Images > /
2 Mar 10:44:35 - [info] Context store : 'default' [module=localfilesystem]
2 Mar 10:44:35 - [info] User directory : /home/pi/.node-red
2 Mar 10:44:35 - [warn] Projects disabled : editorTheme.projects.enabled=false
2 Mar 10:44:35 - [info] Flows file : /home/pi/.node-red/flows_HomeController.json
2 Mar 10:44:35 - [info] Server now running at http://127.0.0.1:1880/
2 Mar 10:44:35 - [debug] loaded flow revision: fc09f9fc4d26653abb7948dcb0e8acd4e3e954f8f0e0907fe61c2ba864ebf43c
2 Mar 10:44:35 - [debug] red/runtime/nodes/credentials.load : user disabled encryption
2 Mar 10:44:35 - [debug] red/runtime/nodes/credentials.load : keyType=disabled
2 Mar 10:44:35 - [warn] Using unencrypted credentials
2 Mar 10:44:35 - [info] Starting flows
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : global
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : a18fb121ee147914
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : 1ea7aa87.c3f9e5
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : 86f1e29d.384238
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : 71f0efa0.9ae71
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : 1c750efddad448c6
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : ca6aee3c.d94e8
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : 75bc8b85.6d3e74
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : dcee5015.d21f1
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : 1428bc74.610ad4
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : 7aa47c7f.409e74
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : 8186a870.b8d978
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : dde73827.b9fb38
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : a2d0e801.b9d2e8
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : 827b8502.e51878
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : a4606812512c010d
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : 8c2b2b2d.c88eb8
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : 37226bbddff3ddf4
2 Mar 10:44:35 - [debug] red/nodes/flows.start : starting flow : 1ce3710588772889
2 Mar 10:44:35 - [info] [ui-base:Jessie Mobile] Node-RED Dashboard 2.0 (v1.22.1) started at /dashboard
2 Mar 10:44:35 - [info] [ui-base:Jessie Mobile] Created socket.io server bound to Node-RED port at path /dashboard/socket.io
2 Mar 10:44:35 - [debug] [flow:a18fb121ee147914] not starting disabled node : fd4b18a265608212
2 Mar 10:44:35 - [debug] [inject:7:45 AM Check] crontab = 45 07 * * *
2 Mar 10:44:35 - [debug] [inject:Clear Email Queue] crontab = 59 23 * * *
2 Mar 10:44:35 - [debug] [flow:1ea7aa87.c3f9e5] not starting disabled node : 7699f568.f3c1dc
2 Mar 10:44:36 - [debug] [inject:3:00am backup] crontab = 00 03 * * *
2 Mar 10:44:36 - [debug] [inject:Time] repeat = 300000
2 Mar 10:44:36 - [debug] [inject:Speed Test 2Hrs] repeat = 7200000
2 Mar 10:44:36 - [debug] [inject:7eb84732.f4d098] repeat = 20000
2 Mar 10:44:36 - [debug] [inject:Midnight] crontab = 59 23 * * *
2 Mar 10:44:36 - [debug] [flow:ca6aee3c.d94e8] not starting disabled node : e6f4acf9.3ecf5
2 Mar 10:44:36 - [debug] [inject:551ce2702171d92a] repeat = 5000
2 Mar 10:44:36 - [debug] [flow:ca6aee3c.d94e8] not starting disabled node : 2f197275bb636667
2 Mar 10:44:36 - [debug] [cronplus:Graph It] createTask - index: 0, static: true, opt: {"name":"Midnight","topic":"cronInject","payloadType":"str","payload":"midnight","expressionType":"cron","expression":"0 0 0 * * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}
2 Mar 10:44:36 - [debug] [cronplus:Graph It] started 'Midnight' ~ 'cronInject'
2 Mar 10:44:36 - [debug] [cronplus:Graph It] createTask - index: 1, static: true, opt: {"name":"Graph","topic":"cronInject","payloadType":"str","payload":"graphit","expressionType":"cron","expression":"0 */2 * * * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}
2 Mar 10:44:36 - [debug] [cronplus:Graph It] started 'Graph' ~ 'cronInject'
2 Mar 10:44:36 - [debug] [inject:3AM] crontab = 00 03 * * *
2 Mar 10:44:36 - [debug] [inject:3AM] crontab = 00 03 * * *
2 Mar 10:44:36 - [debug] [inject:3AM] crontab = 00 03 * * *
2 Mar 10:44:36 - [debug] [inject:Cycle] repeat = 2000
2 Mar 10:44:36 - [debug] [inject:9pm check] crontab = 00 21 * * *
2 Mar 10:44:37 - [debug] [inject:Update] crontab = 00 03 * * *
2 Mar 10:44:37 - [debug] [inject:2 Full Moon Tonight?] crontab = 50 18 * * *
2 Mar 10:44:37 - [debug] [flow:1428bc74.610ad4] not starting disabled node : a73c39b6.059768
2 Mar 10:44:37 - [debug] [inject:Check Door] repeat = 60000
2 Mar 10:44:37 - [debug] [inject:Check Door] repeat = 58000
2 Mar 10:44:37 - [debug] [inject:Check Deck] repeat = 60000
2 Mar 10:44:37 - [debug] [inject:Check Door] repeat = 30000
2 Mar 10:44:37 - [debug] [inject:Check Door] repeat = 90000
2 Mar 10:44:37 - [debug] [inject:Check Door] repeat = 60000
2 Mar 10:44:38 - [debug] [inject:Update] repeat = 1000
2 Mar 10:44:38 - [info] [wifiscan:f4baf1d2b9045e8c] wifiscan - Initialized
2 Mar 10:44:38 - [debug] [inject:39dd6bb3e78f3803] repeat = 60000
2 Mar 10:44:38 - [debug] [inject:Log Data] repeat = 3600000
2 Mar 10:44:38 - [debug] [inject:Update] repeat = 5000
2 Mar 10:44:38 - [debug] [inject:Collection Stats] repeat = 7200000
2 Mar 10:44:38 - [info] Started flows
2 Mar 10:44:38 - [debug] [inject:Time] repeat = 2000
2 Mar 10:44:38 - [debug] [inject:Simcoe] crontab = */15 7-22 * * *
2 Mar 10:44:38 - [debug] [inject:Grand Bend] crontab = */15 7-22 * * *
2 Mar 10:44:38 - [debug] [inject:Stan Cottage] crontab = */15 7-22 * * *
2 Mar 10:44:38 - [debug] [inject:Shannon Brantford] crontab = */15 7-22 * * *
2 Mar 10:44:38 - [debug] [inject:Spae] crontab = */15 7-22 * * *
2 Mar 10:44:38 - [debug] [inject:Get Sun info] crontab = 00 01 * * *
2 Mar 10:44:38 - [debug] [inject:boot] crontab = 00 03 * * *
2 Mar 10:44:38 - [debug] [inject:Process Monitor] repeat = 800
2 Mar 10:44:38 - [debug] [inject:Update] repeat = 3600000
2 Mar 10:44:38 - [debug] [inject:Check] repeat = 900000
2 Mar 10:44:38 - [debug] [inject:Check] crontab = */30 19-20 * * *
2 Mar 10:44:38 - [debug] [inject:Refresh] repeat = 1800000
2 Mar 10:44:38 - [debug] [inject:GO] repeat = 21600000
2 Mar 10:44:38 - [debug] [inject:Check time] repeat = 60000
2 Mar 10:44:38 - [debug] [inject:Check Time] repeat = 45000
2 Mar 10:44:38 - [info] [wifiscan:f4baf1d2b9045e8c] wifiscan - Input received
2 Mar 10:44:38 - [warn] [function:Recall / Set: Switch Names / Solar / Online] Solar devices identified.
2 Mar 10:44:38 - [warn] [function:Load Monthly Array {LMA}] LMA 21: "Monthly_lights_Array" global context integrity not confirmed
2 Mar 10:44:38 - [debug] [inject:CPU Temp] repeat = 20000
2 Mar 10:44:38 - [debug] [inject:update] repeat = 5000
2 Mar 10:44:38 - [info] [mqtt-broker:rpi3 MQTT] Connected to broker: mqtt://192.168.2.154:1883
2 Mar 10:44:38 - [debug] [exec:cedebbc0eac63828] /usr/bin/vcgencmd measure_temp
2 Mar 10:44:38 - [debug] [inject:Update] repeat = 5000
2 Mar 10:44:38 - [debug] [inject:8ab49e302842d4ef] repeat = 3000
2 Mar 10:44:38 - [debug] [inject:Check for Quiet Time] repeat = 30000
2 Mar 10:44:39 - [debug] [inject:1 Tickle] repeat = 18000000
2 Mar 10:44:39 - [debug] [inject:cd55e32d6d777adf] crontab = 59 23 * * *
2 Mar 10:44:40 - [debug] [inject:Initialize vol setting] repeat = 60000
2 Mar 10:44:40 - [debug] [inject:Vstore Clear] crontab = 00 04 * * *
2 Mar 10:44:40 - [debug] [inject:20s test] repeat = 20000
2 Mar 10:44:40 - [debug] [inject:Clock] repeat = 5000
2 Mar 10:44:40 - [debug] [exec:Volumio Status] curl http://192.168.2.55/api/v1/getState
2 Mar 10:44:40 - [debug] [exec:Amixer] amixer -c 2 sset PCM -M 70%
2 Mar 10:44:40 - [debug] [exec:Check O/S] cat /etc/os-release
2 Mar 10:44:41 - [debug] [inject:Test ea min] repeat = 60000
2 Mar 10:44:41 - [debug] [exec:Check O/S] node -v
2 Mar 10:44:41 - [debug] [exec:Check O/S] hostnamectl
2 Mar 10:44:46 - [debug] [exec:Speedtest CLI] speedtest
2 Mar 10:44:46 - [debug] [inject:Get (30s)] repeat = 30000
2 Mar 10:44:58 - [debug] [exec:cedebbc0eac63828] /usr/bin/vcgencmd measure_temp
2 Mar 10:45:18 - [debug] [exec:cedebbc0eac63828] /usr/bin/vcgencmd measure_temp
2 Mar 10:45:38 - [debug] [exec:c2c3ca9ae4c4b858] ls /media/NAS/Transfer
2 Mar 10:45:38 - [debug] [exec:c2c3ca9ae4c4b858] ls /media/NAS/Homes
Colin
2 March 2025 15:58
4
You have two different gpio nodes installed, uninstall the gpiod one and make sure that pigpiod is not running. Restart node-red and refresh the browser page.
Thanks Colin
(why is this text always so small?),
I can remove it however that 2nd install set (gpiod) is claimed to work fine with the default (as long as no GPIO conflicts exist, which they do not). I only installed it this morning as a test to see if it would help resolve the problem.
Nonetheless, I did remove that module and NRstop, NRstart yet the problem persists.
Colin
2 March 2025 16:25
6
StrongTown:
the problem persists.
Are you still unable to configure the node?
Did you make sure the demon is not running?
Edit: If so then check for errors in the browser developer console in the browser.
I don't believe this is a NR problem I have but what is the best / simplest way to remove NR and reinstall it? Other such options seem rather BIG efforts.
You should check out the Python Pi GPIO tools first to see if they are working correctly.
It is possible that the uid/group used to run Node-RED does not have access to the GPIO devices. You may need to add that user to a group. I don't know which one as I'm not currently using any Pi's and I have never used the GPIO on them anyway.
Colin
2 March 2025 17:36
10
sudo npm -g node-red
Then run the script again, but it won't make any difference.
Are you going to answer my other questions?
Colin:
Are you still unable to configure the node?
Did you make sure the demon is not running?
Edit: If so then check for errors in the browser developer console in the browser.
Yes, still unable to configure.
No idea how to make sure the demon is not running.
Browser developer console scares the sh.t out of me.
Colin
2 March 2025 21:30
12
I don't know about it either, what did you do to enable it?
Have you definitely uninstalled the node? Check in Manage Palette.
Open it up, select the Console tab (hover over the buttons till you find it) and refresh the page. Then try and make the change and see what happens.
Well ... right now I'm in the midst of re-installing from a blank card with a new Bookworm install. Current problem is the test-to-voice app needs OSS. I'm hoping the problem doesn't re-appear.
Colin
3 March 2025 08:58
14
Once you have node red installed, along with node-red-node-pi-gpio, then before doing anything else check that the GPIO works, just using GPIO, Inject and Debug nodes. Then if it stops working you will know that it is something else that you have done that has stopped it working.
Thanks Colin,
I have done as you suggest and the GPIO works fine now. I still suspect it was a permissions thing but had no idea where to look for the files.
Still rebuilding the project as there are a few things to reinstall. Fighting with xrdp right now which I need because the system operates somewhat remote and headless (ohh, the tribulations of Linux).
Colin
3 March 2025 15:48
16
Why don't you just use ssh? Enable it in the pi and you are away.
Edit: Oh perhaps you mean across the internet.
Keep checking the gpio keeps working so that if it stops you will know what you did.
I use SSH as well but sometimes find a GUI is faster and easier to interface with. xrdp and the Debian std GUI don't seem to play well together as xrdp want to use X11 and D 12 is wayfire.
Colin
3 March 2025 16:50
18
I just use ssh in a command window, I don't use a gui type interface at all.
DARN. Now just one input is wonky.....
(see garage motion compared to 2 others I have). Something odd is going on here and I'm starting to think it's not my setup.
Also, on my fully fresh re-install, the (audio control) command
amixer set Master 65%
works fine from the CLI (SSH) yet will NOT work from an exec node, instead returns:
amixer: Unable to find simple control 'Master',0
Colin
3 March 2025 20:27
20
What is the failing input connected to? If it is a physical switch then have you got a wired pull up or down on it for when the input is open? If not then try configuring a pullup or down in the node config.
If you stop node-red running as a service (node-red-stop
) and instead, from the .node-red folder run
node-red
does it work? The difference is that in the second case you are running it in the environment of a logged in user.