Autoplay music on device boot

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?

Thanks again for the help!

There is an open request on Github for just such a feature Sorry, I’m not aware of any current workaround, but it’s not been forgotten.

Edit: aha, something is brewing in a development version I’ve just looked at :wink:

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/ volume 60
/volumio/app/plugins/system_controller/volumio_command_line_client/ 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/ Then do sudo chmod +x to make it executable. Then call it from /etc/rc.local with /etc/ 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.

Hi, you may can use the autoplay plugin:

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.

The official autoplay plugin doesn’t work. See plug-autoplay-dont-work-volumio-version-246-t7654.html

1 Like

How to configure play from last position in volumio 2.428.
I have tried but doesn’t work.
I’m using raspberry pi 3 b