Volumio 3 & Autostart

I have created /etc/rc.local that tests for webservice, and some of the startup files from volumio, to then call the “play” command (yes, for loop ugly, but ensures not too much waiting.
Make sure you have rc.local service enabled.

#!/bin/bash
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# ref: https://linuxhint.com/use-etc-rc-local-boot/

[ -d /etc/boot.d ] && run-parts /etc/boot.d
export RC_LOG=/tmp/rc_local.log
export VOLEXEC=/volumio/app/plugins/system_controller/volumio_command_line_client/volumio.sh
export SNPFILE=/tmp/shairport-sync.conf

touch $RC_LOG
echo "starting $(date)" >> $RC_LOG

while !(lsof -Pi :3000 -sTCP:LISTEN -t >/dev/null); do
        echo "waiting for internet $(date)" >> $RC_LOG
        sleep 30
done
echo "service up $(date)" >> $RC_LOG

while [ ! -f $SNPFILE ]; do
        echo "no file yet $(date)"  >> $RC_LOG
        sleep 20
done
echo "SNPFILE there $(date)" >> $RC_LOG


# just try waiting and then kick off the request
for i in {1..10};
do
        echo "retrying" >> $RC_LOG
        sleep 30
        $VOLEXEC play
done

echo "finished $(date)" >> $RC_LOG

exit 0

Thank you Wheaten,
it works for me on 3.251 (RPI3B+). Glad to have this solution back.

1 Like

Hi @balbuze ,

I’m the developer of the plugin autostart. I sent a pull request in Feb. Update AutoStart plugin dependencies and tested with Volumio 3 by thomasdoerr · Pull Request #649 · volumio/volumio-plugins · GitHub but it has been declined as far as I unterstand. I just took a look at the URL you mentioned in that PR.
It’s unclear for me, how I can update the plugin and bring it into the new version.
I just updated my radio and since the plugin is missing, it doesn’t work anymore :slightly_frowning_face: . Could you give me a short hint on how to do it? I’d like to fix it, since I see that others also use it.

Thanks! Thomas

1 Like

hello,
please, refer to The Plugin Utility | Volumio Developers Documentation and
1 -from your Volumio 3 device, clone the repo : GitHub - volumio/volumio-plugins-sources: Volumio plugins source code for Volumio 3
and type

volumio plugin init
  • choose the category : system_controller
  • once the folder is created, you have to modify package.json if needed and put required files in folder

Remove node_modules and zip file!
when ready, send a pull request and submit your plugin

volumio plugin submit
2 Likes

Hi,
Just tried today to activate Autostart on my Volumio v3.378.
Unfortunaly no succes…

After:

cd autostart && volumio plugin installcd action:

volumo@volumio:~$ cd autostart && volumio plugin installcd
Error message “command not recognized see below availbable commands”

List of command…

volumo@volumio:~/autostart$

What goes wrong??
Can anyone help me?

Kindest regards in advance…

There is a beta plugin for autostart. try that.

Hi,

That also does not work.
See other thread.

Thanks you very much it works fine on my Volumio 3.429 Version on an Raspberry P3… and an Geekworm DACPi
Best from the funny town Berlin

Hi Thomas,
Finaly i found my time to test and it works !!
Thank you for your effort and support!
Kind regards,
Arieknarie

Is Autostart working or not? Do I have to install it from the ssh or is it in the plugin menu in Volumio? I used it on Volumio 2, but I’m missing it on the version 3.
Thanks

it’s in the plugin store (system tools) and its working

1 Like

Thanks :pray:

I have installed it and restarted the RPi with Volumio 3 on it, but it doesn’t autostart. I even tried and changed the timer for autostart to 120000 milliseconds (2 min), so the RPi has time to load everything.
I use RPi 3 and the Volumio is up-to-date. But when it restarts it doesn’t connect to the wifi, but instead creates it’s own hotspot. I like it like that. I hope that doesn’t influence anyhow on the plugin…

Autostart use the start or end of the loaded queue. If that requires a network connection…

I have music on my external disk and the queue is loaded. The music itself doesn’t need the network connection, because it’s offline and it plays normally when I login to hotspot and press play :thinking:

Edit: it somehow deleted my playing queue and I didn’t noticed. It works now. Thanks