Lior Elazary KK6BWA

...because this life is yours. Some of it was given to you, the rest you make yourself.

  • Increase font size
  • Default font size
  • Decrease font size
Lior Elazary
E-mail Print PDF

Welcome to my website. Here you will find information on the various project I have for robotics, astronomy, sailing, Holiday display and other misalliances items. You can contact me at:

Random Project/Article

  • ATT DVR scripts
    Misc Projects / Misc Projects

    For a few months now I have been having problems with my ATT Uverse DVR, its not recording any of my scheduled shows. It seems like they have a bug in their system, but I don't know if they are even working on fixing it. Their only solution so far is to reset everything, which does not seem to work. There are many other people experiencing the same issue (which seems like its worse in LA).

    However, instead of waiting for a fix (which seems like it will take a while), I wrote a few scripts to help me schedule recordings automaticly. Since I already have a dedicated linux box for managing the house, it was not a problem adding that to the cron, and running it on a weekly basis.The main goal of the script is to go online, get the guide for all the channels, and schedule recordings.

     

    Warnings: Although these scripts should not harm anything, I am not responsible for any damage that these scripts will cause. Use it at your own risk.

    Here are the scripts: dvrScripts.zip
    You will need the following perl modules:  WWW::Mechanize, HTTP::Cookies, JSON

    Usage:

    After extracting the scripts to a directory, you will have the following:

    getGuide.pl   : Get the whole guide for the next two weeks and store it in the guide directory

    getSeries.pl : Get the current scheduled series on the dvr

    schedule.pl : Schedules recordings contained in the file series

    searchGuide.pl : A simple utility to search though the guide

    parse.pl : A Simple script to parse JSON files

    series : A files containing the series to record

    guide : A directory containing the files for the guide

    The format of the series file is <Record in HD>:<Show Title>

    The Record in HD is a flag of 0 or 1 to specify whether this show needs to be recorded in HD or not. For example. 1:Star Trek  will record Start Trek on any HD channel at any time.

    For now I search any channel and record it at any time (because that is the way I want it). But feel free to change it if you feel adventurous or know perl.

    Note that for all these scripts you will need to supply your web username and password as command line options.

    Try the getSeries.pl first. This will return the current scheduled series on your dvr. If that works, then you can try getGuide.pl.

    getGuiide.pl will take a while (should be less then 10 min) since it will download the whole guide for the next 2 weeks. You can look inside the guide directory to see if you have any files in there.

    After that you can try searchGuide.pl to see if you got any data in the guide. For example:

    searchGuide.pl "Star Trek"

    should return all results with the title Star Trek. Note that in the searchGuide the name matches anywhere in the title, while in the schedule.pl, it matches the title exactly.

    Once you found some titles you want to record, place them in the series file. For example

    1:Star Trek: The Next Generation
    0:How It's Made

    This will record all occurrences of star trek in HD and How It's Made not in HD. Once the series file is set, run the schedule.pl.

    schedule.pl will then find all the shows in the series and schedule them for recordings. Since I don't check whether the show is already scheduled, you might get an error for some of them. This is normal.

    If you are happy with the results, you should run getGuide.pl and then schedule.pl on a weekly basis (should probably be every 1 to 2 weeks, since I get a 2 weeks worth of guide). getGuide.pl should always run before schedule.pl so you will get the latest shows.

     


    Here are some of the API I found using firebug running on the ATT yahoo website, which is used to schedule recordings.

     

    #For sceduling recording
    #http://uversetv.att.yahoo.com/wra/api/uverse/v1/scheduled/add/?showing=310362.326168510&tunerPosition=7&series=1&newOnly=0&protect=0&dailyTime=anyTime&padEnd=0&rand=1298738690552&wssid=mLz6aTC2hNW&checksum=536d048a54222fe6e50b21087f15b0ba&R_brand=uverse&R_tab=GUIDE

    #Cancel series
    #http://uversetv.att.yahoo.com/wra/api/uverse/v1/scheduled/cancel/
    #recdef=227eaa58-fc0c-40db-b988-b2c064d0e08b&wssid=mLz6aTC2hNW&checksum=536d048a54222fe6e50b21087f15b0ba&R_brand=uverse&R_tab=SCHEDULED

    #Add a recording
    #http://uversetv.att.yahoo.com/wra/api/uverse/v1/scheduled/add/?showing=310362.326168510&tunerPosition=7&series=0&protect=0&padEnd=0&rand=1298739822490&wssid=mLz6aTC2hNW&checksum=536d048a54222fe6e50b21087f15b0ba&R_brand=uverse&R_tab=GUIDE

    #Get channels
    #http://uversetv.att.yahoo.com/wra/api/uverse/v1/subscriber/?rand=1298773232856&wssid=5hOxWqaLKJZ&R_brand=uverse

    #Get guide
    # "http://uversetv.att.yahoo.com/wra/api/uverse/v1/listings/?time=2011-2-27T0^C3A30%3A00.000Z&hours=300&channels=4165&rand=1298772867684&wssid=5hOxWqaLKJZ&checksum=536d048a54222fe6e50b21087f15b0ba&R_brand=uverse&R_tab=GUIDE"