Timed pause/ stop mopidy

Looking for a simple solution to a timer for mopidy to pause / stop music.

Something like: in 30 mins mopidy.pause.

Is this possible either one python via a library or via a bash script ?

How did you plan on instigating it?
Do you want to pause 30 mins after starting or at a specific time?

Hi, plan would be pause or stop in 30 minutes time. It would be good to be able to instigate it via SSH from my mobile phone.

Would something like this work for you? sleep then an mpd command?

Just what I was going to suggest this morning but you beat me to it. :grinning:
I was going to use mpc pause after the sleep though.

1 Like

Cheers both will defo try this out.

Can you help me out as I’m a bit stuck on next steps:

  • install mpd on rpi?
    then simply cmd with the mpd/mpc pause command something like this?

sleep 30m && mpc pause?

As long as you have mpc installed as well, then the command should work.

hi - sorry this wasn’t very clear from me. I have installed mpc. but i get an error message when i cmd saying mpd cannot connect.

error message: “mpd error: Connection refused”
access attempts was via SSH into the RPI.

I just tried it with mopidy-mpd, that works. I removed it and got the same error message as you, installed it and all seems fine.

i have just followed the same steps removed mpd, removed mpc reinstalled both but still get the same connection error. it seems i am missing something. the alternative would be sleep x seconds && sudo service mopidy stop but this seems a little crude but does work.

Are you using mopidy-mpd ?

I’ve installed mpd and the sleep thing doesn’t work, however now I’ve removed mpd and installed mopidy-mpd it’s all back working. I did have to reboot each time, just restarting mopidy didn’t resolve it.

Bingo works. cheers mate.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.