Moode Forum
[IDEA] Add power/restart button on Roon Bridge screen. - 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] Add power/restart button on Roon Bridge screen. (/showthread.php?tid=6332)



Add power/restart button on Roon Bridge screen. - Maverick565 - 03-17-2024

Hi!

If i want turn off my RPI endpoint with moode and Roon Bridge installed i need to login into ssh and use shutdown command.

As you can see there is no option to turn off or restart RPI on that screen. When i click disconnect there's nothing happens. Even turning off Roon server not help, to exit roon bridge on moode.

[attachment=3681]


RE: Add power/restart button on Roon Bridge screen. - Tim Curtis - 03-17-2024

Is the issue that clicking or tapping on the Disconnect button does not return to the main Playback screen?


RE: Add power/restart button on Roon Bridge screen. - Maverick565 - 03-19-2024

(03-17-2024, 12:08 PM)Tim Curtis Wrote: Is the issue that clicking or tapping on the Disconnect button does not return to the main Playback screen?

Unfortunately not, even it i turn off roon server.


RE: Add power/restart button on Roon Bridge screen. - Tim Curtis - 03-19-2024

It should be fixed in upcoming moOde 9.0.0


RE: Add power/restart button on Roon Bridge screen. - AllezOM06 - 05-19-2025

Hello,
I tried to stop the receivers when stopping the sender with the following script:

import requests

url1 = 'http://moodeclient1.local/command/system.php?cmd=poweroff'
url2 = 'http://moodeclient2.local/command/system.php?cmd=poweroff'

try:
# Stop reciever moodeclient1
requests.post(url1)
print("Shutdown moodeclient1")
except:
# On error
print("moodeclient1 is offline.")

try:
# Stop reciever moodeclient2
requests.post(url1)
print("Shutdown moodeclient2")
except:
# On error
print("moodeclient2 is offline.")

And with service reciever_shutdown.service:

[Unit]
Description=Run scrip at shutdown
DefaultDependencies=no
Before=shutdown.target

[Service]
Type=oneshot
ExecStart=/usr/bin/python3 /opt/reciever_shutdown/reciever_shutdown.py
RemainAfterExit=true

[Install]
WantedBy=shutdown.target

But it does not work, I do not find how to configure the service so that it executes the script reciever_shutdown.py during a shuddown of the sender and before the network is stopped by the shutdown.
Maybe you should look with this method ...


RE: Add power/restart button on Roon Bridge screen. - AllezOM06 - 05-29-2025

Hi !
I've foiund the good config por the service:

[Unit]
Description=Shutdown recievers
Requires=multi-user.target
After=multi-user.target
 
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/python3 /opt/reciever_shutdown/reciever_start.py
 
[Install]
WantedBy=multi-user.target