I have installed the ‘auto start playlist’ plugin and now before closing down I always make sure that my favorite radio station is at the top of the playlist so that it plays when I power up. I have got the supply to my player running through a timer ( on only mode ) which means I can now have a radio alarm in the mornings.
Would it be a step too far to be able to have that radio station auto start even if it is not in the playlist so that whatever I was playing before I shut down is not auto started but the radio station is?
I did a test using the cron’s command suggested but unfortunately this REST request do not launch the playlist even if it reports that “playplaylist Success”
It works when the command is executed manually but not when cron executes it as it returns this permission error issue
Jan 01 09:39:57 volumio CRON[819]: (root) CMD (curl volumio.local:3000/api/v1/commands/?cmd='playplaylist&name=PL_Classic21')
Jan 01 09:40:04 volumio cron[561]: 2019-01-01 09:40:04 1geGWq-0000He-M7 Cannot open main log file "/var/log/exim4/mainlog": Permission denied: euid=112 egid=116
Jan 01 09:40:04 volumio cron[561]: 2019-01-01 09:40:04 1geGWq-0000He-M7 <= root@localhost U=root P=local S=1262
Jan 01 09:40:04 volumio cron[561]: 2019-01-01 09:40:04 1geGWq-0000He-M7 Cannot open main log file "/var/log/exim4/mainlog": Permission denied: euid=112 egid=116
Jan 01 09:40:04 volumio exim[1094]: 2019-01-01 09:40:04 1geGWq-0000He-M7 <= root@localhost U=root P=local S=1262
Jan 01 09:40:04 volumio exim[1094]: 2019-01-01 09:40:04 1geGWq-0000He-M7 Cannot open main log file "/var/log/exim4/mainlog": Permission denied: euid=112 egid=116
Jan 01 09:40:04 volumio exim[1094]: exim: could not open panic log - aborting: see message(s) above
Here is the command that I defined within the contrab file
## Reboot and use playlist defined / default
@reboot root curl volumio.local:3000/api/v1/commands/?cmd='playplaylist&name=PL_Classic21' >/dev/null 2>&1
If I add MAILTO="" top of the crontab file, then the problem is gone. The command is well executed but the radio’s player of volumio is not started …
I suspect that when this command is executed, then volumio is not yet started …
volumio@volumio:~$ sudo journalctl -u cron.service
-- Logs begin at Tue 2019-01-01 10:40:40 UTC, end at Tue 2019-01-01 10:44:24 UTC. --
Jan 01 10:40:44 volumio systemd[1]: Starting Regular background program processing daemon...
Jan 01 10:40:44 volumio systemd[1]: Started Regular background program processing daemon.
Jan 01 10:40:44 volumio cron[558]: (CRON) INFO (pidfile fd = 3)
Jan 01 10:40:44 volumio cron[558]: (CRON) INFO (Running @reboot jobs)
Jan 01 10:40:45 volumio CRON[560]: pam_unix(cron:session): session opened for user root by (uid=0)
Jan 01 10:40:45 volumio CRON[709]: (root) CMD (curl volumio.local:3000/api/v1/commands/?cmd='playplaylist&name=PL_Classic21')
Jan 01 10:40:52 volumio CRON[560]: pam_unix(cron:session): session closed for user root