Author Topic: Play radio at a certain time (radio alarm)  (Read 6301 times)

purps

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1402
  • If it ain't broke, tweak it
    • View Profile
Play radio at a certain time (radio alarm)
« 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.
« Last Edit: May 27, 2013, 10:46:01 pm by purps »
1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: Play radio at a certain time (radio alarm)
« Reply #1 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

purps

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1402
  • If it ain't broke, tweak it
    • View Profile
Re: Play radio at a certain time (radio alarm)
« Reply #2 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...
Code: [Select]
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...
Code: [Select]
mqsql> quit <ENTER>
Cheers,
Matt.
« Last Edit: May 29, 2013, 01:03:45 pm by purps »
1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Play radio at a certain time (radio alarm)
« Reply #3 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.

purps

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1402
  • If it ain't broke, tweak it
    • View Profile
Re: Play radio at a certain time (radio alarm)
« Reply #4 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.
1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps

purps

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1402
  • If it ain't broke, tweak it
    • View Profile
Re: Play radio at a certain time (radio alarm)
« Reply #5 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.
1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: Play radio at a certain time (radio alarm)
« Reply #6 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

purps

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1402
  • If it ain't broke, tweak it
    • View Profile
Re: Play radio at a certain time (radio alarm)
« Reply #7 on: May 31, 2013, 01:34:29 pm »
Ah that would make sense. No biggie, just wondered. Thanks.

Cheers,
Matt.
1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps