Page 1 of 3 123 LastLast
Results 1 to 15 of 34

Thread: RemoteInfo Script

  1. #1
    Join Date
    Mar 2005
    Posts
    233

    RemoteInfo Script

    This script adds infomative entries to the Now Playing List so they can be viewed locally and remotely using MRV. I have only tested this on my THD running 11.0k, but it may work on other units/platforms. Here's some more information:

    New Version: 1.3
    Code:
    ################################################################################
    # RemoteInfo - Copyright (C) 2012 jkozee                                       #
    # This program is distributed WITHOUT ANY WARRANTY; without even the implied   #
    # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.             #
    #                                                                              #
    # TERMS OF USE: personal (noncommercial) fair-use backup & restore             #
    # This software may not be used for copyright infringment or any illegal       #
    # purpose, bundled with any product, sold, distributed or redistributed        #
    # under any circumstances on any media without express written consent.        #
    ################################################################################
    # History: 1.3 20120729 Bug Fix.                                               #
    # History: 1.2 20120610 Added daemonize code                                   #
    # History: 1.1 20111221 Bug fix.                                               #
    # History: 1.0 20111017 Initial release.  Tested on THD 11.0k only             #
    #                                                                              #
    # Purpose:  RemoteInfo (RI) was created to put useful information on the Now   #
    #           Playing List (NPL), so that it is easily accessable from the local #
    #           and from remote units via the built in MRV functionality of TiVo   #
    #           Currently there are 3 message types implemented (Free Space, Todo  #
    #           List, and Conflict).  The RI items all begin with 0 and are dated  #
    #           in the future to force them to the top of the NPL list when it is  #
    #           sorted by date or title.  The program is meant to be run as a      #
    #           daemon, and updates the RI items at 5 and 35 minutes of each hour. #
    #                                                                              #
    # Usage: RemoteInfo.tcl [-flags]                                               #
    #         -l       Log to /var/log/RemoteInfo.log                              #
    #         -s       Log to the Screen                                           #
    #         -v       Inlcude verbose log information                             #
    #         -vv      Include very verbose log information                        #
    #         -remove  Cleanup all RemoteInfo Items from mfs database              #
    #         -x       Exit immediately after the first run                        #
    #         touch /tmp/RemoteInfo.stop to stop the program                       #
    #         touch /tmp/RemoteInfo.update to force an immediate update            #
    #                                                                              #
    #         Typically just add this to line to your rc.sysinit.author            #
    #         /PathToApp/RemoteInfo.tcl or from a cron job using the -x flag       #
    #                                                                              #
    # Notes:   Portions of this code based on, borrowed from, or inspired by       #
    #          other projects found on DDB, including TWP, mfs_ftp, etc.           #
    #          The programs and series that we create will not have serverids to   #
    #          insure that we don't collide with real ones from the TiVo service.  #
    #          As a result they will end up as an orpahan in /Database.  Rather    #
    #          than enumerating all orphans and recordings, we will store our      #
    #          fsids in an array and keep it under /State/RI (ala /State/TWP).     #
    #          The -remove will attempt to rubbish/delete all objects that this    #
    #          progam has created and should when you no longer plan on using it.  #
    #                                                                              #
    ################################################################################
    The development thread for this script can be found here.
    Attached Files Attached Files
    Last edited by jkozee; 08-03-2012 at 02:02 AM. Reason: bug fix

  2. #2
    Join Date
    May 2007
    Posts
    449
    Hopefully this is the correct place to request help. I get this error when I run RemoteInfo on my TivoHD 11.0k. Any thoughts?

    Code:
    FamRoom# /var/remote/RemoteInfo.tcl -l
    can't read "startdate": no such variable
        (reading value of variable to increment)
        invoked from within
    "incr startdate 1"
        (procedure "CreateRecRI" line 14)
        invoked from within
    "CreateRecRI RIEntry"
        (procedure "ProcessList" line 41)
        invoked from within
    "ProcessList"
        (procedure "RemoteInfo" line 12)
        invoked from within
    "RemoteInfo"
        (file "/var/remote/RemoteInfo.tcl" line 981)

  3. #3
    Join Date
    Mar 2005
    Posts
    233
    Sorry Soapm, I missed this post earlier. I will have a look at this script tonight and see what I screwed up in my last update...

  4. #4
    Join Date
    Mar 2005
    Posts
    233
    New version posted to fix the error reported by Soapm.

  5. #5
    Join Date
    May 2007
    Posts
    449
    How do I kill the running app? I do a ps aux and don't see it in the list but I do see it in my NPL so I believe it's running.

    Also, I tried to do a restart with the -l option and got this feedback. Is this correct?

    Code:
    FamRoom# /var/remote/RemoteInfo.tcl -l restart
    Usage:  RemoteInfo [options]
    
      -l       Log to file /var/log/RemoteInfo.log
      -s       Log to screen
      -v       Verbose logging
      -vv      Very verbose logging
      -x       Exit immediately after the first run
      -remove  Cleanup all Remote Info Items from mfs database

  6. #6
    Join Date
    May 2007
    Posts
    449
    Just an FYI... I got it to run and waited while it indexed all my info into the NPL. I had to uninstall it because it really slowed my NPL to a snail and it wasn't really what I was looking for...

    Have you ever watched a show and they put on the screen, "coming up next Lizard Towing". I was hoping to be able to quickly see if I was set to record that show or did I have something bumping it until later. This kind of does that but a whole lot more.

    This program displayed the entire todo list up to 1/3. That's a bit much, a couple or three hours would have sufficed. It also organized them with 1/3/12 at the top so you have to scroll down to the bottom to see current events. By the way, 12/18 was at the bottom of my list so I had to then scroll up a bit. I think that was the date I first installed it.

    It was pretty much the same with the conflict list. It listed conflicts starting with one's next year. I'm liable to add new SP or rearrange them by then so it kind of fell into the category of too much info to see conflicts that far out.

    Lastly, each time the drive space polled it added a new entry to the NPL but it didn't delete the previous entry. This caused them to go into a folder which added another step to see the reading. I wouldn't think anyone wants to know the history of their drive space, just where am I at now. I could be wrong...

    This isn't a complaint because I found the program to be pretty cool and very imaginative. I just wanted to give an honest critique as to why I'm removing it from my system.

    Thanks for the program...

    PS... I'm having trouble getting it all deleted from my NPL. I run -remove and I can see it's shrinking what it added to my NPL but the Tivo keeps rebooting which makes me start the process again.

  7. #7
    Join Date
    Nov 2006
    Posts
    273
    tried it on a Series2 DTivo.

    got this:
    Code:
    bash# tivosh ./remoteinfo-1.1.tcl
    invalid attribute: ShortTitle
        while executing
    "dbobj $series set ShortTitle $title"
        ("uplevel" body line 7)
        invoked from within
    "uplevel $body"
        invoked from within
    "transaction {uplevel $body}"
        (procedure "RetryTransactionQuiet" line 5)
        invoked from within
    "RetryTransactionQuiet {
          set series [db $db create Series]
          set aSeries($tmsid) [ dbobj $series fsid]
          dbobj $series set TmsId $tmsid
     ..."
        (procedure "GetSeries" line 13)
        invoked from within
    "GetSeries "RI000001" "0 Free Space""
        (procedure "GetFreeSpace" line 44)
        invoked from within
    "GetFreeSpace"
        (procedure "RemoteInfo" line 9)
        invoked from within
    "RemoteInfo"
        (file "./remoteinfo-1.1.tcl" line 982)
    bash#
    They say beer will make me dumb. It are go good with pizza!-----------
    3XR10, prommed, 3xdvr40,4xdvr39, all networked, ranging from 40GB to 750GB

  8. #8
    Join Date
    Nov 2006
    Posts
    273
    Tried it today, on a DTivo Series 2, this time with 6.4a software, and it works.

    Neat app!
    They say beer will make me dumb. It are go good with pizza!-----------
    3XR10, prommed, 3xdvr40,4xdvr39, all networked, ranging from 40GB to 750GB

  9. #9
    Join Date
    Dec 2003
    Location
    Indianapolis
    Posts
    297
    Finally got around to playing with this.

    Cool app!

    Could do without all the TIVOR entries in the ToDo section though, other than that, I like it.
    (2) UltimateTV - upgraded w/160GB
    (1) HR10-250 2TB 6.4a
    (1) HR10-250 620GB 6.4a
    (1) HR10-250 300GB 6.4a
    (3) HR21 (2) with AM21 & internal 2TB Seagate
    RandC

  10. #10
    Join Date
    Nov 2006
    Posts
    273
    I've been thinking the same thing. I've been considering going through it and commenting out/removing the todo list part, and just keeping the conflicts and free space indicator. If I get around to it, I'll post results here.
    They say beer will make me dumb. It are go good with pizza!-----------
    3XR10, prommed, 3xdvr40,4xdvr39, all networked, ranging from 40GB to 750GB

  11. #11
    Join Date
    Nov 2006
    Posts
    273
    Commenting out line 888 (shown below) where the function "GetTodoList" is called prevents the script from putting the todo list in the NPL.

    Code:
    proc RemoteInfo {} {
      set db [dbopen]
      global RemoveRI AddRI
      global aRecordings aSeries
    
      logit 4 "DEBUG: Running RemoteInfo"
    
      LoadArrays
      GetFreeSpace
    #  GetTodoList
      GetConflicts
      ProcessList
    
      catch {unset aRecordings}
      catch {unset aSeries}
      catch {unset RemoveRI}
      catch {unset AddRI}
     
      dbclose $db
    }
    They say beer will make me dumb. It are go good with pizza!-----------
    3XR10, prommed, 3xdvr40,4xdvr39, all networked, ranging from 40GB to 750GB

  12. #12
    Join Date
    Dec 2003
    Location
    Indianapolis
    Posts
    297
    Quote Originally Posted by crashHD View Post
    Commenting out line 888 (shown below) where the function "GetTodoList" is called prevents the script from putting the todo list in the NPL.

    Code:
    proc RemoteInfo {} {
      set db [dbopen]
      global RemoveRI AddRI
      global aRecordings aSeries
    
      logit 4 "DEBUG: Running RemoteInfo"
    
      LoadArrays
      GetFreeSpace
    #  GetTodoList
      GetConflicts
      ProcessList
    
      catch {unset aRecordings}
      catch {unset aSeries}
      catch {unset RemoveRI}
      catch {unset AddRI}
     
      dbclose $db
    }
    Yes your are correct.
    I should have checked this post before I spent several minutes going through the program file to find the same thing.
    (2) UltimateTV - upgraded w/160GB
    (1) HR10-250 2TB 6.4a
    (1) HR10-250 620GB 6.4a
    (1) HR10-250 300GB 6.4a
    (3) HR21 (2) with AM21 & internal 2TB Seagate
    RandC

  13. #13
    Join Date
    Nov 2006
    Posts
    273
    Testing on a 2.0TB drive on a Series2 DirecTV Tivo running 6.4a yields the following error:
    Code:
    2TB-bash# ./RemoteInfo.tcl
    error during seek on "file13": invalid argument
        while executing
    "seek $fdDevs($x) [expr 512*$pZone+32]"
        (procedure "GetTotalSpace" line 50)
        invoked from within
    "GetTotalSpace"
        (procedure "GetFreeSpace" line 8)
        invoked from within
    "GetFreeSpace"
        (procedure "RemoteInfo" line 9)
        invoked from within
    "RemoteInfo"
        (file "./RemoteInfo.tcl" line 986)
    2TB-bash#
    They say beer will make me dumb. It are go good with pizza!-----------
    3XR10, prommed, 3xdvr40,4xdvr39, all networked, ranging from 40GB to 750GB

  14. #14
    Join Date
    Mar 2005
    Posts
    233
    crashHD,

    Looks like you are having an issue with the GetTotalSpace routine. This is the same routine I wrote for the TWP info module, which is why you are having problems with both. Can you please run the two test scripts in this attachment and PM me the results. Let me know when you have the attachment, so I can remove it. Thanks.
    Last edited by jkozee; 07-22-2012 at 10:21 PM.

  15. #15
    Join Date
    Nov 2006
    Posts
    273
    Got the files.

    Disregard, move on to post 17
    I'm assuming I just cut out the proc GetTotalSpace in RemoteInfo.tcl and replace it with this, right?

    test1 ends with this:
    Code:
    2TB-bash# ./RemoteInfo.tcl
    part_name=/dev/hda, x=0, devSectors(0)=1048576, pZone=1121
    type=0
    part_name=/dev/hda, x=0, devSectors(0)=1048576, pZone=263266
    type=2
    part_name=/dev/hda, x=0, devSectors(0)=1048576, pZone=263268
    type=1
    part_name=/dev/hda, x=2, devSectors(2)=1048576, pZone=1
    type=2
    part_name=/dev/hda, x=0, devSectors(0)=1048576, pZone=-2143322111
    error during seek on "file13": invalid argument
        while executing
    "seek $fdDevs($x) [expr 512*$pZone+32]"
        (procedure "GetTotalSpace" line 51)
        invoked from within
    "GetTotalSpace"
        invoked from within
    "expr ([GetTotalSpace]/2)&0x7fffffff"
        invoked from within
    "set total [expr ([GetTotalSpace]/2)&0x7fffffff]"
        (file "./RemoteInfo.tcl" line 681)
    2TB-bash#
    Moving on to try test2
    Last edited by crashHD; 07-22-2012 at 09:34 PM.
    They say beer will make me dumb. It are go good with pizza!-----------
    3XR10, prommed, 3xdvr40,4xdvr39, all networked, ranging from 40GB to 750GB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •