Sometimes a GPIO pin will fail to setup (RuntimeError: Failed to add edge detection). It was hard to know which pin gave the error.
With this improvement the problematic pin number is logged and the plugin will continue to work for all other pins instead of stopping.
Also try multiple times to set the event, as the error can occur randomly due to an error in PRi.GPIO, even if the pin is not in use.
Tested on a Rpi Zero W with latest Raspbian-lite.
Sometimes a GPIO pin will fail to setup (RuntimeError: Failed to add edge detection). It was hard to know which pin gave the error. With this improvement the problematic pin number is logged and the plugin will continue to work for all other pins instead of stopping. Also try multiple times to set the event, as the error can occur randomly due to an error in PRi.GPIO, even if the pin is not in use. Tested on a Rpi Zero W with latest Raspbian-lite.