LinuxMCE Forums

General => Users => Topic started by: purps on May 27, 2013, 08:32:13 PM

Title: Play radio at a certain time (radio alarm)
Post by: purps on May 27, 2013, 08:32:13 PM
I have achieved this in "Timed Events" using Xine Player with the "Play Media" command. I've put the radio stream URL into "#59 MediaURL (Special)", and it works, but the radio stream does not appear on the orbiter in the Now Playing square, meaning I cannot turn it off or change the volume.

Does anybody have any suggestions please?

(I do have various radio stations set up under the radio scenario, is it possible to simply play one of these?)

Cheers,
Matt.
Title: Re: Play radio at a certain time (radio alarm)
Post by: sambuca on May 28, 2013, 07:23:12 AM
You should send the command to the Media Plugin instead, using the MH_Play_Media command. This way, the router will be aware of the media and the orbiter will show it as well.

br,
sambuca
Title: Re: Play radio at a certain time (radio alarm)
Post by: purps on May 28, 2013, 11:28:34 PM
Thanks for the reply. That's interesting, I did look at that, but couldn't work out how to play a radio stream. But your advice was the shove in the right direction that I needed!

For anybody else wanting to do this, fill out...

#13 Filename (string)
#45 PK_EntertainArea (string)
#29 PK_MediaType (int)

Where...

#13 Filename (string) = URL of stream (eg "http://www.bbc.co.uk/radio/listen/live/r4_aaclca.pls")
#45 PK_EntertainArea (string) = the ID for the Entertainment Area in which you would like the playback to occur.
#29 PK_MediaType (int) = 4

Hint: If you don't know what the ID is, on the core...
sudo su <ENTER>
mysql -u root -p pluto_main <ENTER>
mysql> SELECT PK_EntertainArea, Description FROM EntertainArea; <ENTER>

Make a note of the ID, and then...
mqsql> quit <ENTER>

Cheers,
Matt.
Title: Re: Play radio at a certain time (radio alarm)
Post by: Marie.O on May 29, 2013, 08:19:50 PM
purps,

thanks for your text. Did you know that we have a wiki? There is an article on how to play radio. Maybe you want to extend that page by your findings.
Title: Re: Play radio at a certain time (radio alarm)
Post by: purps on May 29, 2013, 08:22:45 PM
My pleasure. Wiki is already done http://wiki.linuxmce.org/index.php/Internet_Radio#Radio_alarm

Cheers,
Matt.
Title: Re: Play radio at a certain time (radio alarm)
Post by: purps on May 31, 2013, 12:41:57 PM
I do have one other question regarding this please.

With the stream playing, when I look at the orbiter, I notice that the stream is repeated 4 or 5 times in the playlist. The other day I noticed there were about 10 in there. Any reason for this?

Cheers,
Matt.
Title: Re: Play radio at a certain time (radio alarm)
Post by: sambuca on May 31, 2013, 01:18:11 PM
It could be that the url you use actually is a playlist with urls to the real streams. I can't remember for sure, but I think that this will cause LMCE to expand that playlist into its own playlist, thus presenting each real stream url as its own item in the playlist.

regards,
sambuca
Title: Re: Play radio at a certain time (radio alarm)
Post by: purps on May 31, 2013, 01:34:29 PM
Ah that would make sense. No biggie, just wondered. Thanks.

Cheers,
Matt.