I love this plugin. The only problem is that if I manually hit the skip song button, this plugin handles the “musicPause” event and then the “musicPlay” event. Since I am using the GPIO pin to control a relay, this causes the relay power to blink for a short time. The relay powers my amplifier, and I’d rather not short cycle the power to it every time I manually skip a song.
Any way to resolve this?
I tried setting the “delay” settings, but that has its own problem - if a “pauseMusic” event is triggered and delayed, but the “musicPlay” event is not delayed, the “pauseMusic” event will trump the “musicPlay” event and cause the relay to be shut off. It would be nice if a delayed event could be cancelled if another event occurred before the delay timer is up.
UPDATE: As it turns out, the “Amplifier Switch” plugin is exactly fit-for-purpose for my scenario of power cycling an amp, and it works as one would want/expect. I didn’t notice this plugin before. I still think the option (in the GPIO Controller plugin) to be able to cancel delayed event handlers is a desirable feature. I have made the code changes in this GPIO Controller plugin. in a fork. and will probably submit a PR for it some time soon.