A client wanted to build a push button board connected to a rpi to trigger scripts in order to automate scene recall, audio routing and quick switching of setups. This is accomplished by this small daemon that listens to GPI changes and runs scripts depending on the type of the event.
If you want to have to use a GPI, create one or more scripts in /var/lib/gpiod/scripts with the following name(s):
- <GPI>.sh for raising or falling edge (any change triggers the script)
- <GPI>_up.sh for raising edge
- <GPI>_down.sh for falling edge
As usual, the GPIOs have to be configured in the system in order to use them. You can do this yourself (by writing the necessery values to /sys/class/gpio/...) or use the scripts provided in the archive:
- edit gpiod.conf so the list of GPIs and GPOs reflect your hardware setup
- run create_gpios.sh and run_gpiod.sh at startup (in that order!)