I know there is another thread, but this has a clear name and it is in the correct place.
Now, I will get soon what I need to build a switch that allows me to turn on/off my speakers from Volumio. I need it because my system uses about 50W even without music playing and I don’t want it on all the time.
That circuit will have a bypass switch, so that I can still force it on,if needed, and a switch to send an OFF signal to Volumio, if I want to do switch it off without the GUI.
The question is how to modify/improve Volumio to get a simple way to apply this.
Is there a sort of trigger that can be executed when playing starts, and another one for when the play stops? this way I may have a daemon running that gets notified and, after a delay since the last stop-trigger, turns off the speakers. This daemon would also monitor the input GPIO pin associated with the external pushbutton, so that if it is pressed, power gets cut immediately.
I can write scripts, but not much more. If there is a change to be applied to the WebGUI or to mpd, I will need very accurate directions, at least to know where that should be implemented.
As second option, I could have the daemon offer a separate webpage, where I can turn it on and off manually, but I think that a (optional) switch button in the webGUI (on/off/auto_delay) would be much better.