Integrate Sirius
Incomplete, needs to be expanded. Please help to fill the gaps or discuss the issue on the talk page
This article is going to give you all of the info you need in order to pipe your online Sirius Satellite Radio account directly through your MythTV system. The first draft of this article is based around a Fedora Core 6 setup. This may or may-not be the answer to what you're looking for so please READ THE INTRODUCTION CAREFULLY and read all the way to the end before you start anything.
- Note: this is NOT a plug-in and is basically a hack, but it looks just like a plug-in ;-).
Contents
Article from 10,000 feet
What this article is...
This article IS about:
- Setting up MythTV to play streams from Sirius Radio Online
- How-To use programs that other people that have no experience with MythTV have wrote
- How-To integrate everything with MythTV
What this article is not...
This article IS NOT about:
- How-To get free access to the streams (although a Sirius online guest account will work fine)
- How-To perfectly integrate with your particular MythTV interface (just read the entire article before you start)
- Intended for the beginner MythTV user as it will require changing some of the default menu themes
- A Sirius Radio Plug-in for MythTV
What you need
Setup
- You only need to have an account setup at Sirius.com.
Installed
Required:
- MythTV
- Python (2.4+)
- mplayer
- sipie
- Beautiful Soup
Optional:
Introducing SIPIE
Pronounced SY PIE, like sirius python sipie is a command line player for sirius on-line Internet streaming. It requires a login to sirius's streaming, both guest and subscriber logins are supported. Streams are entered on the command line or are asked for. TAB twice will list all streams, type part of a stream and hit TAB to complete it. You can change streams without restarting (and thus not re-authenticating) by hitting CTRL-C while a stream is playing. sipie is written in python, and uses mplayer for the streams. Beautiful Soup is the only extra library you'll need. See the README on how to get it. Eli Criffield
Let's get started!
Installing SIPIE
The README is extremely simple to understand and only takes a few minutes to get up and running... I suggest using that as a guide because ONLY when you get sipie working OUTSIDE of MythTV, will it work INSIDE of MythTV. Also, make sure when you do your sipie setup that you do it under your mythtv account (or whatever account runs the front end).
Installing VIA YUM
You should only need the extras repository to install... This was my install.
#yum install python python-setuptools wxPython Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: wxPython i386 2.6.3.2-2.fc6 extras 7.4 M Installing for dependencies: wxGTK i386 2.6.3-2.6.3.2.3.fc6 extras 3.5 M wxGTK-gl i386 2.6.3-2.6.3.2.3.fc6 extras 28 k Transaction Summary ============================================================================= Install 3 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 11 M
Installing VIA APT
Make sure it works
Now that you have read the README for sipie and can listen to streams, we can integrate it with our MythTV instance.
Let's hack it together
OK, now we are going to write a couple of uber-simple shell scripts that we will use to make MythTV happy while talking to sipie. You will notice that these are simple, novice scripts that are pretty ruthless in how they work... plus sipie doesn't have an API and isn't intended for applications such as this... I haven't been calling it a "hack" the whole time for nothing. :-)
Also note that (at least in my case) I only had to enter the text from the captcha during initial setup and never once since. I also turned off the playlist song lookup in the config since I can't see it yet anyway... I'm sure it wouldn't be hard to plug something into sipie that would send the song to the front end OSD, but remember this isn't a plug-in, yet.
We need to create a couple of files, so find a nice place you can execute them from, and create them... personally, I put them in /usr/bin, the same place I put sipie.
#vi sipie_myth ----------------- #!/bin/bash # Control Sirius in Myth if [ "$1" != "" ]; then # First, we'll kill off any other stream that may be playing /usr/bin/sipie_kill echo "I'm about to play:" $1 /usr/bin/$1 & else exit 1 fi exit 0
#vi sipie_kill ----------------- #!/bin/bash # Kill sipie from Myth pkill -f sirius.com/sirius/mediaplayer/ killall python
Now you will want to make them both executable:
chmod a+x sipie_*
Next, we want to create those links that you read about at the end of the README file earlier. I had to create these because it seemed to be the path of least resistance in getting this to work correctly. My girlfriend and I don't listen to more then 4 or 5 stations so I only added a few to my setup, but you can add as many as you like. I did it like this:
#cd /usr/bin #ln -s sipie howardstern100 #ln -s sipie octane #ln -s sipie altnation #ln -s sipie hardattack #ln -s sipie siriusnflradio #ln -s sipie 90salternative
Now, pull up a command window and run one of the commands we just "made"
$octane
Do you hear the stream without having to enter a single thing in the command window? That's good, now use this to kill the stream
$sipie_kill
Did you have to enter information? That's bad. Make sure you setup sipie as your mythtv user.
At this point, you should be able to listen to (and kill) streams from the command line with no user intervention... that's 1/2 the battle. Now, we are going to hack a couple of buttons onto the classic menu theme.
- Note: If you are currently running .20+ chances are that you're NOT using the classic menu theme (not the actual theme, just the menu theme) and once you switch over it's going to look funky. The default menu theme in .20 is much better IMHO so I will include a couple of xml menus that will do 2 things:
- Get your GUI back to something similar to the default menu theme
- Give you examples on how-to re-build your own xml menu theme
Since this is a hack you are expected to do some work to get it exactly the way you want it. The entire process took me a little over 2 hours to get straight since my front end didn't like my original menu hacks.
I'm currently doing more research on how to integrate this better with the default menu theme before I finish the article... if you MUST know how I did my integration before I finish this article, you can find me at TwoOneSix@thatclothingco.com