Could you select just the Garage motion detector node and export and paste it here please, I will see if the same config on a system here gives problems.
I don't see the point in sending the function node Colin as it is working perfectly. I tested this early on with the "Test" & "Simulate Motion" inject nodes you see in the gif above (which simply sends a 1 (motion) and then 6 secs later a 0 (reset). The dashboard shows the changes as expected both to active then passive.
Here are versions:
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux" v 12.9
Linux 6.6.74+rpt-rpi-v8 aarch64
Image used was the Bookworm 64bit from Debian for rPi4 (writes the boot image direct to the SD card).
EDIT: I always export a copy of each of my tabs as I make changes to them (for individual backup). I was able to go back and grab a previous rPi3 exact copy of the code (flow) for this tab, deleting the current in the rPi4 and importing this older version. It does exactly what the current one is doing. (This motion detector tab is simple and has not seen any change in years so I can confirm it as perfectly operating for a long time previous to this).
Not the function node, the GPIO node, labelled Garage Motion Detector. The one that is not working. I want to make sure I configure mine exactly as yours.
EDIT: Is it possible to check under what conditions that GPIO nde woould produce a yellow ":OK"?
EDIT2: Other nodes are showing the same issue. I have an input that monitors commercial hydro (AC) that is also yellow "OK" and not working. FWIW it is GPIO25 : Header Pin 22 So 10 of 12 are fine, just these 2.
I've restarted with node-red-start and interestingly GPIO25 : Header Pin 22 which was previously yellow "OK" is now showing proper green "1" however it SHOULD be showing green "0" (input is currently low). It is not responding to input changes when I remove AC (this is my commercial AC monitor, which is a N/O relay that is closed with AC, open when AC is not avail, a very simple input).
I found an unused pin that is likewise affected GPIO 04 (7)
Also, the problem with amixer set Master 65% volume command via exec node is not working again. It worked fine when I ran local node-red.
I can also see the issue that the pin is often not shown in the dialog. I have raised an issue. It is very odd that this has only recently started to be seen, as I can also see it on old versions of NR and old versions of the OS. The node itself has not been updated for two years. I think the problem with the nodes not working (as opposed to not showing the pin) is probably separate, and may be related to Bookworm, where I believe there have been changes in the OS with the way the GPIO works.
I deleted my flow (which was just every available pin set as an input) because running it caused my zero 2 pi to hang.
Not sure why interrogating the gpio would consume so much system resources.
That also needs investigating, was there anything in the node-red log. It is a shame you deleted it. If you have not deployed again yet then it should still be available in .flows.json.backup
You are right about the resource usage being high. On an old Pi Zero I am seeing the python nrgpio script consuming about 3% of the processor. I have submitted an issue about that too.
@StrongTown I am not able to replicate you OK status problem. Could you do as I asked earlier and export the failing gpio node (Menu > Export) and paste it here please.
Edit: Also, do you still see just OK if you remove the wire from the gpio pin?
Yes, still see the yellow "OK" with no connection.
Here is a node in the state you requested (GPIO-04, the motion detect node started working! ????). The other (unused) node in the pic below (GPIO-22) I do not know if it is working or not as it is hard to get at to test. Here is the exported contents of GPIO-04. The contents and image are captured seconds apart.
I have fixed your post so that the flow is importable. For future reference, In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)
Well I can't see any problems with that, and importing to my system does not cause an issue. The 'pin' number is badly named, it refers to the GPIO number, not the pin.
Can you open a command window and run ps -aux |grep nrgpio
and paste the result here. Use the same technique as for posting flows, that will stop the forum messing with the layout. I want to check if the python script that interrogates the non-working pin is running, and if it is if there is anything unusual about it.
Great, this looks a bit odd pi 254181 144 0.3 176048 11904 ? Rl 15:43 0:00 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py in 4 up 25
It appears to be saying that the python process monitoring GPIO 4 is using 144% of a processor core (ie more than one full core), which suggests that it is looping for some reason. I am not all that familiar with the ps output so I need to do a bit or research on that.
Can you repeat the ps command please and check to see if GPIO4 is still showing a large number there? If it is then run htop and see if it shows it using the processor.
My input to monitor commercial AC (a relay) feeds GPIO 25, which currently indicates green "0" (low, which is proper as AC is present) however when I remove the AC input to the relay (simulate hydro failure) the GPIO pin state does not change, so it's not working. Here is the output you requested. HTOP shows a lot of python3 gpio stuff, a lot at 0% but many in the 2-3%. Even filtered they jump around, hard to read. GPIO 4 seems to have settled.
pi@Homecontroller:~ $ ps -aux |grep nrgpio
pi 8452 0.0 0.0 6800 3072 ? S 11:18 0:00 /bin/bash /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio in 25 up 10
pi 8454 0.0 0.3 175696 12032 ? Sl 11:18 0:15 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py in 25 up 10
pi 8455 0.0 0.0 6800 3072 ? S 11:18 0:00 /bin/bash /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio in 5 up 50
pi 8457 0.0 0.3 175696 12032 ? Sl 11:18 0:16 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py in 5 up 50
pi 8458 0.0 0.0 6800 3072 ? S 11:18 0:00 /bin/bash /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio in 6 up 500
pi 8460 0.0 0.0 6800 3072 ? S 11:18 0:00 /bin/bash /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio in 12 up 1000
pi 8461 2.7 0.3 175696 12032 ? Sl 11:18 9:00 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py in 6 up 500
pi 8463 2.7 0.3 175696 12032 ? Sl 11:18 8:58 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py in 12 up 1000
pi 8464 0.0 0.0 6800 3072 ? S 11:18 0:00 /bin/bash /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio in 13 up 750
pi 8466 2.8 0.3 175696 12032 ? Sl 11:18 9:04 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py in 13 up 750
pi 8467 0.0 0.0 6800 3072 ? S 11:18 0:00 /bin/bash /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio in 16 up 100
pi 8469 2.8 0.3 175696 12032 ? Sl 11:18 9:07 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py in 16 up 100
pi 8470 0.0 0.0 6800 3072 ? S 11:18 0:00 /bin/bash /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio in 17 up 100
pi 8474 2.7 0.3 175696 11904 ? Sl 11:18 8:58 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py in 17 up 100
pi 8479 0.0 0.0 6800 3072 ? S 11:18 0:00 /bin/bash /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio in 19 up 100
pi 8483 2.8 0.3 175696 12032 ? Sl 11:18 9:05 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py in 19 up 100
pi 8486 0.0 0.0 6800 3072 ? S 11:18 0:00 /bin/bash /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio in 20 up 100
pi 8491 2.8 0.3 175696 12032 ? Sl 11:18 9:05 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py in 20 up 100
pi 8492 0.0 0.0 6800 3072 ? S 11:18 0:00 /bin/bash /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio in 21 up 100
pi 8496 2.7 0.3 175696 11776 ? Sl 11:18 8:58 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py in 21 up 100
pi 8501 0.0 0.0 6800 2944 ? S 11:18 0:00 /bin/bash /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio in 23 up 100
pi 8505 2.7 0.3 175696 12032 ? Sl 11:18 8:58 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py in 23 up 100
pi 8506 0.0 0.0 6800 3072 ? S 11:18 0:00 /bin/bash /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio out 27 0
pi 8508 0.0 0.3 175696 11904 ? Sl 11:18 0:16 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py out 27 0
pi 8510 0.0 0.0 6800 3072 ? S 11:18 0:00 /bin/bash /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio out 18 0
pi 8513 0.0 0.3 175696 12032 ? Sl 11:18 0:16 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py out 18 0
pi 8517 0.0 0.0 6800 3072 ? S 11:18 0:00 /bin/bash /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio in 24 up 300
pi 8522 2.8 0.3 175696 12032 ? Sl 11:18 9:04 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py in 24 up 300
pi 8537 0.0 0.0 6800 3072 ? S 11:18 0:00 /bin/bash /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio out 26 0
pi 8539 0.0 0.3 175696 12032 ? Sl 11:18 0:14 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py out 26 0
pi 8556 0.0 0.0 6800 3072 ? S 11:18 0:00 /bin/bash /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio in 22 up 250
pi 8559 2.7 0.3 175696 12032 ? Sl 11:18 9:01 python3 -u /home/pi/.node-red/node_modules/node-red-node-pi-gpio/nrgpio.py in 22 up 250
pi 308319 0.0 0.0 6088 1920 pts/0 S+ 16:41 0:00 grep --color=auto nrgpio
I did see GPIO 4 in HTOP (filtered to 'python3') but it came and went. When it was there it wasn't high in CPU use (but can't remember exact #).
Sorry Colin but the rpi4 is not on my desktop, it's in operation in a (poorly lit) utlility room and swapping wiring is a really really challenging thing.