Author
Topic: SiriusXM (Read 10518 times)

Sirius/XM now has the ability to listen via the web. The new page uses a flash plugin for playing a particular stream. There is a username/password box and then it allows you to choose a station much like a jukebox. After 90 minutes of listening it will ask you if you are still listening. Is there a way to incorporate this into Linuxmce similar to HULU? Also, the place I listen most I don't have a keyboard mouse. Is it possible to use the remote with flash? Is it possible to pre-populate the username/ password?

Sounds like a fun project... but I think these guys are busy crushing bugs rather than feature enhancements. It sounds pretty easy, so I will look into it, because my powers are weak. I know that flash is... glitchy at best in firefox.

A cursory examination reveals that the streaming protocol for Sirius XM is exposed via SOAP.

Look at Sipie for an example of how it was solved in Python, and make an equivalent C++ device.

However, to do this right, I would suggest making a Sirius Plugin, and a Sirius Streamer, that can provide a URL that can be passed via MH Play Media. This would allow it to work on all LinuxMCE devices, including Squeezeboxes. Look at existing code for a reference.

Grab usernames and passwords from Users, so that each user can have their individual subscription preferences.

Point being, this is more than possible, and can actually be done right.

It has been a while since I have coded in C++. But would be more than willing to give this a go when I get some spare time. I will try to look at the wiki and gather as much info/knowledge as possible, but I am sure I am going to have many questions.

When you say it is exposed through SOAP, does this mean the Flash plugin uses a web service to communicate with the Sirius server? Meaning I could potentially create my own client as long as I know the web services to call? Is this what you mean by the streamer?

also learn the MH Play Media command in the Media PlugIn. This is what you will need to use to actually take the stream and send it to a player.

If it is as I suspect, you'll get back an MP3 stream after sending what you want to get information wise by SOAP, this can be passed to the MH Play Media command to send the appropriate commands to the target player, rather than having a player embedded into the Sirus XM device.

Took a look at Pyxis since Sipie has basically been deprecated. My game plan is to mess with this in Java since that is what I am most familiar with at the present. Once I get something working there and understand the communication, I will port it to C++ which shouldn't be to big a deal. Once that is done I will work on understanding MH player and streamer.

It looks like the StreamHandler.py file just runs a command titled self.command that feeds the stream and timestamp to mplayer. I was trying to follow the Shoutcast Radio Plugin to see how that called xine or mplayer and mimic the process, but I don't understand the function calls...

Since Shoutcast is merely sending playlist files, and since Xine can read those playlist files, the Shoutcast PlugIn merely forms a URL to the playlist on the Shoutcast server.

This will not work for Sirius XM.

You will need to investigate how the stream is loaded and decoded. Based on this, you may be able to make a sort of proxy that you can pass to MH Play Media (passing a URL in the Filename device data parameter.)

Basically, MH Play Media, will send a CMD Play Media command to the Plugin that handles the media type for an entertainment area, normally this is the Xine PlugIn...the Xine Plugin then finds any Xine Players in the target entertaninment area, and sends a CMD_Play_Media to them.

To see the effect, go to the web admin, go select the media plugin in the device tree, and select "Send Command" and select "MH Play Media" ... you'll see the parameters you can pass to the command.

Based on MH Play Media, it looks like the only field I would populate is #13 Filename- the others- PK_Device and EntertainArea would be set by wherever we wanted the media played. Songs would not be repeated or queued- the idea would be to just stream, so #117 and #253 are not needed.

As for populating #13 Filename- the authors of Pyxis made it very simple (this is from StreamHandler.py):

It seems like a simple script that run "pyxis" and waited for the user to select a channel to import to the prompt at the terminal- then that channel was fed into #13 Filename above, you would have the start to a working Sirius integration.

So, where do I go from here? How do I get LMCE to grab this stream?

Edit 1: If you type in "print mpc" immediately after defining mpc under "else" in the above code, it prints out the actual address of the stream.

Edit 2: You can pass the pyxis python script the stream when you start the program. For example, you can type in

Sirius and XM have changed their web site in the past month. Not sure the streams in Pyxis or Sypie will work anymore. XMTuner works against the new Sirius/XM servers. I have used FiddlerCap to capture the outgoing http communications. Another program that I think works is XMmicroplayer. I haven't had a chance to mess with this lately. I am able to pull the current information as far as stations and currently playing. Can even find small icons, am working on finding larger ones. Once I get time I also want to try and get the stream working. I am doing all of this through java currently since it is what I am currently programming in.