USTVNOW and HDHomeRun Stream Files in XBMC

What you see here is the act of a desperate man who got sick of trying to make XBMC’s PVR support work. I tried for several days to get tvheadend to work with my HDHomeRun. In the end I gave up and went my way. What you see may be a mess to setup but it works very well for me.

When all setup XBMC will have a directory full or playlist files representing your channels/streams. The playlist files will be named after the channel they represent along with the current and next show that is going to play.

Here is a video to show what I mean:

Quick note on my setup; I have an HDHomeRun receiving QAM channels from Cox cable. These channels come in as by product of the Internet service I receive. Via Cox and the HDHomeRun I receive local network stations. I also have an USTVNOW account for basic cable channels. Why do I use USTVNOW instead of getting basic cable from Cox? USTVNOW is about $10 a month cheaper and receives more channels.

Installation is a crazy mess. I didn’t expect to release this but I figured at the least the USTVNOW streams will be useful to someone.

I did all of this under openElec. XBMCbuntu works. Other Linux based installs should work. Windows will probably work if you install Python and something similar to CRON.

Prerequisites:

For USTV: Just make sure you have the USTVNOW plugin working. XBMC HUB Article About It

For HD Home Run: Make sure its connected to your network and can view some channels. Have hdhomerun_config working. (Part of libhdhomerun: Download It

Installation:

  • Download this repo. (Direct link to zip)
  • Unzip it and copy everything into /storage/dean. If you’re the picky sort this is where you begin to change pathnames. For narcissistic reasons I’m going to assume you’ve put everything in /storage/dean.
  • Make a directory: /storage/Streams. This is where all your stream files will go. Add that directory as video source in XBMC.

USTVNOW Streams

  • We’re going to add a script to the USTVNOW addon to download a list of channels and turn them into stream files (.strm). We’re going to place this in CRON so it updates itself.
  • Edit /storage/dean/ustvnow_stream_grabber.py and change the email and password variables to your USTVNOW credentials.
  • Move /storage/dean/ustvnow_stream_grabber.py to the directory your USTVNOW addon resides in. For me its /storage/.xbmc/addons/ustvnow/
  • Make sure it works by running /storage/dean/ustvnow.sh. After that you should see a bunch of stream files in /storage/Streams. Each file should represent one of your USTVNOW channels.
  • Add a cron job so that /storage/dean/ustvnow.sh is ran every thirty minutes. Example in /storage/dean/crontab.

Go to your stream video source in XBMC. You should be able to play each file in there.

HDHomeRun Streams

  • We’re going to build stream (.strm) files for each channel your HDHomeRun receives.
  • On a Windows box open up HDHomeRun Setup and look at the tab that shows all of your channels, Digital Cable for me.
  • Write down the channel numbers and what channel they represent. (FOX, ABC, ect)



  • Two options now. Build the stream files by hand or use HDHomeRun Stream Builder to do it for you.
  • If you’re doing it by hand and pretending we’re working on the file for CBS in Fort Smith, AR:
  • Create a file named KFSMDT.strm
  • Open the file up and add this: hdhomerun://103D1F0E-0/tuner0?channel=auto:92&program=1
  • Notice a few things you’ll need to change.
  • 103D1F0E-0 is the ID of my tuner. You’ll need to change it to your tuner’s ID.
  • tuner0 is the first tuner on my HDHomeRun. The second tuner is tuner1. I watch TV on tuner0. I record TV on tuner1.
  • channel=auto:92&program=1 represents CH92 – 1 from HDHomeRun Setup. Change the 92 and the 1 as appropriate for your channels.
  • Save the file and put it in /storage/dean/Streams-default
  • Repeat this for every channel your HDHomeRun receives.
  • HDHomeRun Stream Builder will automate all of this for you, but it is a PITA to setup. (As if all the above hasn’t been)
  • If you don’t care about having the currently playing show in the file name, copy the all the .strm file you made into /storage/Streams and call it done. Just like the USTVNOW streams they should play as if they were any other video file.

Getting the currently playing show to be in the HDHomeRun stream’s file name

  • Theory behind this is that we’re going to use mc2xml to download TV scheduling information, parse it, and rename our stream files using the info.
  • Get mc2xml working for your zip code. There is a copy in /storage/dean/mc2xml-local
  • For me the command line is ./mc2xml -c us -g 72714 -d 72 -f (72714 is my zip code)
  • Have cron run /storage/dean/update_xmltv.sh once a day. Example in /storage/dean/crontab
  • Have cron run /storage/dean/update_streams.sh every thirty minutes. Example in /storage/dean/crontab
  • Now your stream files in /storage/Streams should be all renamed with the current show playing.

13 comments

  1. Awesome… Going to try it tonight. I have a paid USTVNOW account and use it mainly for ESPN. How do you set up the cron job on Win 7 and is it necessary for every 30 minutes? Its not necessary every 30 minutes, but USTVNOW does change the address of the streams on occasion.

  2. Dean I am running my xbmc on raspberry
    How do I unzip and place in my storage folder on raspberry for the ustv info you gave?
    I’m new to this, but can work my way around. I’ve created the directories. will need help on the CRON also
    Please help

  3. Pretty much have the same setup as you except instead of XBMC use HDHomerun with Plex, and EyeTV. Also pick up a few not all HD network channels so decided to take advantage of USTVNOW $19 a month promotion which I watch on Roku. Will need to try out your settings when I start using XBMC although for now every thing seems to work pretty well. Your correct about USTVNow being less than basic cable and you get more channels as well. When the 3 month promo is over I just cancel and sign up again for another 3 more months at the same price.

Leave a Reply to Dean Vaughan Cancel reply

Your email address will not be published. Required fields are marked *