Sleep Mode

Suggestions/requests/ideas for RuneAudio core features and functions

Sleep Mode

Postby tatoosh » 14 Jan 2015, 19:26

I would like to have a sleep mode like TVs or my denon reciever has.
Like 10min/20min etc. so runeaudio will stop.

TaToosh
tatoosh
 
Posts: 50
Joined: 12 Jan 2015, 12:18

Re: Sleep Mode

Postby jpfelgueiras » 31 Jan 2015, 03:52

I was investigating a litle,

If it was a debian based system you could run something like this
Code: Select all
 curl http://localhost/command/?cmd=stop | at date +"%T" -d '+20 minutes'


Since we are on Arch, I can't find the "at" command

I can't help more, but I'm shure thats a lot of people on this forum will have a solution for this.

After that is solved, it's a question of UI to make a screan to select the off set time and a litle php script to run a shel command
jpfelgueiras
 
Posts: 3
Joined: 28 Jan 2015, 23:32

Re: Sleep Mode

Postby tatoosh » 31 Jan 2015, 08:44

I also came from debian so i can try this parameter with volumio distribution.
Thanks @jpfelgueiras for the snippet.

Tatoosh
tatoosh
 
Posts: 50
Joined: 12 Jan 2015, 12:18

Re: Sleep Mode

Postby Dezo » 01 Feb 2015, 14:53

This command works for me (shutting down the rpi after the 20 minutes time period)
Code: Select all
shutdown -P +20

Or if you just want to stop the mpc use shell script
Code: Select all
sleep 20m
mpc stop
Dezo
 
Posts: 11
Joined: 01 Nov 2014, 13:33

Re: Sleep Mode

Postby tatoosh » 01 Feb 2015, 18:43

Good solution. How to implement this in the web interface? I will ask for an api.
tatoosh
 
Posts: 50
Joined: 12 Jan 2015, 12:18

Re: Sleep Mode

Postby ACX » 01 Feb 2015, 20:28

tatoosh wrote:I will ask for an api.

That is under work, but for such custom things we'll think about a way to run custom scripts from the UI.
User avatar
ACX
RuneAudio co-founder
 
Posts: 1693
Joined: 29 Nov 2013, 02:25
Location: Udine, Italy

Re: Sleep Mode

Postby tatoosh » 01 Feb 2015, 21:07

Thats a gold idea, thanks
tatoosh
 
Posts: 50
Joined: 12 Jan 2015, 12:18

Re: Sleep Mode

Postby jpfelgueiras » 01 Feb 2015, 23:35

Is the idea to shutdown the raspberry or to stop the music?

I never (almost) shutdown the raspberry, becaus it dosent have wake up on lan. I think it's a better idea to just stop the music
jpfelgueiras
 
Posts: 3
Joined: 28 Jan 2015, 23:32

Re: Sleep Mode

Postby tatoosh » 02 Feb 2015, 07:03

Yes, my raspberry is also running 24x7.
The music should only stop, also by playing spotify. So my last.FM stats are correct and i dont have to switch anything of while sleeping.

An optimation is to fade the music. there also is a MPC sleep script for that, so i am waiting for custom script implemention.
tatoosh
 
Posts: 50
Joined: 12 Jan 2015, 12:18

Re: Sleep Mode

Postby Dezo » 02 Feb 2015, 09:08

I looked at the RuneUI code and managed to add a new button for my command in file footer.php.
It is necessary to modify also runeui.js and rune_SY_wrk files.

Image
Dezo
 
Posts: 11
Joined: 01 Nov 2014, 13:33

support RuneAudio Donate with PayPal

Next

Return to Feature request

Who is online

Users browsing this forum: No registered users and 1 guest