Volumio 3 & Autostart

Autostart is really important for me. I fixed autostart by adding a crontab entry
crontab -e
@reboot sleep 120 && /home/volumio/start.sh

— script content: /home/volumio/start.sh
/usr/local/bin/volumio play

After reboot - power on, latest used radio stream channel resumes and here you go.

4 Likes

Works for me now after a couple more steps:

Had to install cron: sudo apt-get install cron
Had to insert shebang at start of script: #!/bin/bash
Had to make start.sh executable: sudo chmod +x start.sh

1 Like

resolved: crontab -e 00 09 /usr/local/bin/volumio play
00 18 /usr/local/bin/volumio stop

1 Like

Can someone please post a more detailed procedure for this autostart work around.
I am not savy enough to figure it out from these notes.
txs

I will join the request. Maybe someone will tell you in great detail for the most inexperienced how to make the autoplay of the Internet radio playlist begin after switching on (rebooting). Thank you in advance.

1 Like

The autostart plugin works flawless on V3.xxx, only an update for NPM is required. Already did it in this zip file. Make sure to adjust the time, so you’re sure Volumio is fully started. Currently I set it to 40000 (40 seconds)
autostart.zip (152.4 KB)

  • unzip it
  • Place it in your home folder: /home/volumio
  • Open putty and run the command:
    cd autostart && volumio plugin install
6 Likes

It really works. It is very clear how to do it. Thank you very much.

Hello Wheaten!
Cool !
But for me it is not working, maybe you could help me ?
i can see the plugin in the Web-UI, when i switch it to ON settingbutton appears.
But the state still is Red-dot inactive.
If I klick on settings, no configuration is available appears.
If I do “volumio plugin list” the following appears:
prettyName: ‘AutoStart’,
name: ‘autostart’,
category: ‘miscellanea’,
version: ‘1.1.2’,
icon: ‘fa-play-circle-o’,
isManuallyInstalled: false,
enabled: true,
active: false

how can i activate it ?

Best regards and many thanks for your help!
Danny

1 Like

Weird.
Please try the following.

cd /data/plugins/miscellanea/autostart
npm install

if that doesn’t work, post your log as i have no clue otherwise. Lost my Crystal bal.

1 Like

Thanks for your help !!! and the quick answere !

i tried but it still does not work, its not shown anymore on the web-UI

hmmm, i could not find the volumio.log (/var/log/…)
just the mdp.log:

-bash-5.0$ cat mpd.log
Mar 09 14:11 : zeroconf: No global port, disabling zeroconf
Mar 09 14:11 : zeroconf: No global port, disabling zeroconf
Mar 09 14:12 : client: [0] opened from local
Mar 09 14:12 : exception: No such directory
Mar 09 14:12 : client: [1] opened from local
Mar 09 14:12 : zeroconf: No global port, disabling zeroconf
Mar 09 14:12 : client: [0] opened from 127.0.0.1:36078
Mar 09 14:12 : client: [1] opened from 127.0.0.1:36080
Mar 09 14:12 : client: [2] opened from 127.0.0.1:36092
Mar 09 14:12 : client: [3] opened from local
Mar 09 14:12 : client: [4] opened from 127.0.0.1:36104
Mar 09 14:13 : client: [5] opened from 127.0.0.1:36292
Mar 09 14:13 : client: [6] opened from 127.0.0.1:36296
Mar 09 14:13 : exception: Failed to read mixer for ‘alsa’: no such mixer control: PCM
Mar 09 14:13 : client: [0] closed
Mar 09 14:13 : client: [1] closed
Mar 09 14:13 : client: [2] closed
Mar 09 14:13 : client: [4] closed
Mar 09 14:14 : client: [5] closed
-bash-5.0$

1 Like

We need the log generate by Volumio: Sending logs for troubleshooting - Volumio Documentation
And paste the generated link here, so we can access it.

1 Like

The content of the zip is not met requirement for volumio3

1 Like

Hi Balbuze,
I am not the developer nor considering to become one nor even want to spend time to go through all new requirements at this moment. I respect those who did.
I just took the zip file from my V3.3xx system which is working and also for @trekaf (which is a really funny name in Dutch) and hoped it would work for DannyH to

2 Likes

ok no problem :wink:
I just wanted to point that some plugin needs to be updated to work with no effort on volumio 3

1 Like

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.