I have a Raspberry Pi 4 running a NodeRed server.
This Pi has no mouse or keyboard, but it does have a regular HDMI display.
It runs a minimal Xorg setup and a Midori browser connects as a client to the NodeRed server itself.
The user can interact with NodeRed through some buttons wired to the GPIO.
So far so good.
I set up a little python script which starts a screensaver (feh) when the user is idle for a while (xprintidle).
Now I would like to stop the screensaver when the user presses a button.
I tried to bind those GPIO pins with the RPi.GPIO library, but it says that they're already bound to something else (NodeRed) and the even won't fire when the button is pressed.
I tried to look at /sys/class/gpio/ but I don't see those exports changing when I click the button, and besides, I would have to use a bash script which constantly poll those sys-files. I'd rather use events/interrupts.
How would you go about achieving this?
Is there some lower system way of getting interrupts from the GPIO?
Maybe is it possible to have NodeRed kill Feh (or feed a fake user input to xorg), somehow?
maybe I gave up too soon. I later realized that it's not that difficult to manage the host system processes with NodeRed.
That way I was also able to intercept all the button pushes and make sure that the screensaver is not running, before performing the required action.
Reset Xorg idle time upon RPi GPIO event, maybe through NodeRed