I’ve been trying to setup Volumio on a Raspberry Pi 3b to automatically begin playing whatever music was playing when the device was last powered off or rebooted.
After searching these forums I found a few various solutions. I’ve tried tweaking the files at /etc/init.d/mpd, /etc/rc.local, and even tried adding some code to the index.js file after the startup sound has finished playing to start playing my music. None of these methods have worked for me so far.
Is there a best method that is known to work with the current version of Volumio to get my music or playlist playing when the device is powered on?
Well, I was able to get something working after messing about in the code. I’m not sure if it will work 100% of the time, but a timeout delay called after the startupSound is called has worked for me every time I’ve tried it so far.
I’ll get the official version whenever the next img is published for download, but for now this hack works for me.
/volumio/app/plugins/system_controller/volumio_command_line_client/volumio.sh volume 60
/volumio/app/plugins/system_controller/volumio_command_line_client/volumio.sh next
in /etc/rc.local
Thanks everybody for the tips. I used the bash script on the linked GitHub discussion page by GRIzmak to make autoplay work. The plugin zip files I weren’t able to install without getting unspecified errors.
Note that without the 120 second delay this command line program method doesn’t work. To elaborate a little further, copy the delay script to some location (i put it in /etc/fixautoplay.sh). Then do sudo chmod +x fixautoplay.sh to make it executable. Then call it from /etc/rc.local with /etc/fixautoplay.sh 120 before the return 0 statement.
Maybe you also need to check that Persistent Queue in the Volumio GUI settings is enabled.
I really hope that this feature will be an official setting in Volumio soon. It’s a crucial feature.
Thanks for the plugin link. I haven’t got the time to test it now, besides I got my own hack solution to work.
If the plugin is stable and works fine then it really should be listed among the other plugins in the Volumio GUI.
I always power off Volumio the brute force way with an electricity switch. When I turn the power on again I want to resume where I was before turning off. I want to use the GUI as little as possible.