Autoplay on boot?

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
Post Reply
arnoldus
Posts: 2
Joined: Fri Apr 01, 2011 10:37 am

Autoplay on boot?

Post by arnoldus »

I want to thank everybody involved in the site: I got everything working within the hour!

The sole purpose of this radio is for my father to listen to BBC World Service now that the European transmitter has been shut down. I can get it playing the stream from Ario, but I would like it to start the BBC stream automatically after it has finished booting. Now I first have to log on with Ario every time, select the stream to the playlist, and then hit play.
I'm sure this is a small feat, does someone have an idea?
arnoldus
Posts: 2
Joined: Fri Apr 01, 2011 10:37 am

Re: Autoplay on boot?

Post by arnoldus »

I think I solved it, but don't know it it's the recommended UNIX way.
I opened /etc/init.d/mpd and added "/usr/bin/mpd add http://mp32.bbc.streamuk.com:80/"
just before /usr/bin/mpd play
User avatar
mightyohm
Site Admin
Posts: 1063
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Autoplay on boot?

Post by mightyohm »

Yes, that is one way to do it.

You can also write a short shell script to load a playlist on boot, see my tutorials.
User avatar
gerben
Posts: 164
Joined: Sat Oct 16, 2010 8:41 am
Location: Netherlands

Re: Autoplay on boot?

Post by gerben »

You could even use cron to automatically start playing at, for example, 8am and stop at 10pm. I don't know if you keep the radio on all the time, or if its plugged in when needed. If its on all the time it might be smart to add a cron-job to run "mpc play" once and a while, just in case the connection is lost or something.
Post Reply