![]() |
[IDEA] Energy Saving Option - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Feature requests (https://moodeaudio.org/forum/forumdisplay.php?fid=8) +--- Thread: [IDEA] Energy Saving Option (/showthread.php?tid=7513) |
Energy Saving Option - UpsiUps - 03-14-2025 I am currently looking for energy saving option on all my devices. On my 4 RasPi's I have installed a Shelly Plug with the RasPi power supplies. While a single power supply only uses around 5 VA, 4 RasPi's already summing up to nearly 20 VA. and this is wasted energy , when I am not using MoOde. Last couple of years I have ignored this energy waste, but nowadays I think I need to do more to save energy. So the Shelly Plugs could be used to startup the MoOde player ( System boot ) and I could also use the MoOde menu to shutdown the RasPi - where I modified the system to tell the Shelly Plug to turn off the power after 2 min. Now long story short: often I or family member forget to do the shutdown and a direct switch off through the shelly app might destroy the MoOde SD-Card. So I would need an automatic shutdown from within MoOde. I am currently testing the use of the built-in "MoOde Sleep Timer", which could shutdown the App at an exact time - so like a last chance before the day finished. To make a finer tuning I think it would be nice to have a special energy saving feature: When MoOde doesn't play any track for a period of time (e.g.2h ) it could start a shutdown sequence. I think this could be a third Option in the clock radio: Wake up, sleep & energy timer. It would be simliar like the two first, but enabled it will start a sort of watch dog timer after each track. When the watch dog timer will not restarted with a new track play, it will initiate the shutdown sequence as energy saving. What do you think ? Does this sound feasible ? RE: Energy Saving Option - the_bertrum - 03-14-2025 (03-14-2025, 02:05 PM)UpsiUps Wrote: I am currently looking for energy saving option on all my devices. On my 4 RasPi's I have installed a Shelly Plug with the RasPi power supplies. While a single power supply only uses around 5 VA, 4 RasPi's already summing up to nearly 20 VA. and this is wasted energy , when I am not using MoOde. Last couple of years I have ignored this energy waste, but nowadays I think I need to do more to save energy. So the Shelly Plugs could be used to startup the MoOde player ( System boot ) and I could also use the MoOde menu to shutdown the RasPi - where I modified the system to tell the Shelly Plug to turn off the power after 2 min. Now long story short: often I or family member forget to do the shutdown and a direct switch off through the shelly app might destroy the MoOde SD-Card. So I would need an automatic shutdown from within MoOde. Some thoughts:
RE: Energy Saving Option - Tim Curtis - 03-14-2025 The main challenge with a feature is this is that it seems to be niche and so while it might be doable it's not going to get priority, at least on my TODO list. Another dev though might take an interest and contribute a PR :-) RE: Energy Saving Option - UpsiUps - 03-14-2025 (03-14-2025, 04:09 PM)the_bertrum Wrote:(03-14-2025, 02:05 PM)UpsiUps Wrote: I am currently looking for energy saving option on all my devices. On my 4 RasPi's I have installed a Shelly Plug with the RasPi power supplies. While a single power supply only uses around 5 VA, 4 RasPi's already summing up to nearly 20 VA. and this is wasted energy , when I am not using MoOde. Last couple of years I have ignored this energy waste, but nowadays I think I need to do more to save energy. So the Shelly Plugs could be used to startup the MoOde player ( System boot ) and I could also use the MoOde menu to shutdown the RasPi - where I modified the system to tell the Shelly Plug to turn off the power after 2 min. Now long story short: often I or family member forget to do the shutdown and a direct switch off through the shelly app might destroy the MoOde SD-Card. So I would need an automatic shutdown from within MoOde. Thanks for your thoughts. I had a defect SD-Card due to hard power off multiple times. So it might be today more rare, but it could still happen and is from my point of view not a good practice as long as you use SD-Cards. Yes, you would need that is informed during the shutdown to power off. I already have that solution in place. BTW: it is easy to implement the signal with systemd to send a signal to an URI. I am not expecting that MoOde is doing this interface. This hook and the custom uri is an individual solution. I was expecting, that MoOde implent a watch dog timer to shutdown the system after the timeout is reached. So as an addition to the "clock radio" function with "wake up" and "sleep timer" which are executed at a special time. I would expect that a third function just observe if a track is still played and if not for a period, it will start the shutdown. I think it is not such a difficult task to implement this. Maybe I will scroll through the source to find a possible hook place .. RE: Energy Saving Option - UpsiUps - 03-14-2025 (03-14-2025, 04:37 PM)Tim Curtis Wrote: The main challenge with a feature is this is that it seems to be niche and so while it might be doable it's not going to get priority, at least on my TODO list. Another dev though might take an interest and contribute a PR :-) LOL - I understand. I will have a look to my old implementation to visible the current track on an external display. This might be the place to get the information whether a track has been played "long time ago" to initiate a shutdown. I will also look at the clock radio code of MoOde to understand how an UI might be implemented as a third option. But now as winter is gone, this is also not on my priority list. I may live with the sleep timer of the clock radio that will ensure to shutdown the device every evening if it is still on. Thanks for your open feedback and the review of this niche idea ![]() RE: Energy Saving Option - UpsiUps - 03-14-2025 Ok, first result - the "sleep timer" from the clock radio is doing a shutdown which also then signals to the device to power off the power supply. So the small solution already works. Maybe I do a bit scripting with the Code: cat /var/local/currentsong.txt | grep state RE: Energy Saving Option - Tim Curtis - 03-14-2025 A more universal test would be to check the ALSA output since it covers both MPD and any of the renderers. Code: pi@moode:~ $ moodeutl --hwparams | grep closed |