1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Automatic soft padding running on the TiVo

Discussion in 'TiVo Series 1 - UK' started by sanderton, Oct 8, 2003.

Thread Status:
Not open for further replies.
  1. May 8, 2005 #1001 of 1197
    maxwells_daemon

    maxwells_daemon New Member

    84
    0
    Apr 9, 2005
    Oxford, UK
    It's Sanderton's (the log messages would have been different - I added the channel name to some of them), though I doubt the bug is restricted to that version, since I only made small changes to the logic.
     
  2. May 8, 2005 #1002 of 1197
    6022tivo

    6022tivo A Happy Member

    2,061
    1
    Oct 29, 2002
    North West, UK
    Could it be it is running twice one time with 14 mins padding and another with 15, both ammending to the log file??
     
  3. May 8, 2005 #1003 of 1197
    pmk

    pmk New Member

    388
    0
    Jan 1, 2002
    Can anyone tell me what command I should use to see what processes are running via telnet? I can then check if nothing is running more than once. I doubt this however as nothing has been changed for months.

    TIA
     
  4. May 8, 2005 #1004 of 1197
    6022tivo

    6022tivo A Happy Member

    2,061
    1
    Oct 29, 2002
    North West, UK
    at a bash prompt type

    ps -ax



    to kill a process type

    kill -9 ****

    where **** is the process ID
     
  5. May 8, 2005 #1005 of 1197
    maxwells_daemon

    maxwells_daemon New Member

    84
    0
    Apr 9, 2005
    Oxford, UK
    As 6022tivo suggests, you can use
    Code:
    ps ax
    to list processes. One of them should have "endpad.tcl" as part of the command string. There shouldn't be two.

    However I would urge you not to kill endpad with the kill command. That can cause your TiVo to reboot. Instead, create a file endpad.kill in the directory where endpad.tcl is located. After a few minutes, all endpad processes should have stopped (you can see in the logfile).

    If you don't have "ps" installed on your TiVo, you can get it from Craig Leres' page (or a newer port from my page, but that comes as part of a bigger package).
     
  6. May 8, 2005 #1006 of 1197
    sanderton

    sanderton TiVoer since 11/2000

    6,341
    0
    Jan 4, 2002
    The 14 1/2 minutes is a/the clue I think.

    Endpad checks the start time of the next but one show as well when adding padding. For it have reduced that time by 30 seconds, there must have been a show scheduled to start 14:30 after the start of Hit me Baby One More Time. That show would have forced the recording of HMB1MT to be cancelled as it is 15 mins long.

    Looks to me like the datbase got itself well confused over a period of minutes. I don't think that was directly caused by EndPad - I can't see how it could "imagine" a show starting 14.30 later - but it being busy accessing the database at the time may have added to the confusion.

    I'd just restart your Tivo.
     
  7. May 8, 2005 #1007 of 1197
    pmk

    pmk New Member

    388
    0
    Jan 1, 2002
    ps showed only one copy of endpad running.

    Thanks I will restart my TiVo just in case - luckily I noticed HMB1T had not started recording and managed to see the last 2 minutes so I know who won.

    Cheers
     
  8. pmk

    pmk New Member

    388
    0
    Jan 1, 2002
    Same problem happened yesterday except this time I did not manage to catch it so I do not know who won. I use 2 min starting and 15 min end padding. Could there be a problem if the program you are trying to record matches the length of the end padding? Appears funny the problem seems to be reproducible?

    TIA

    Saturday 18:42:00 : Woken up
    Saturday 18:42:00 : Recording {Doctor Who} on BBC1NW now
    Saturday 18:42:00 : Recording Scheduled End Time: 18:45
    Saturday 18:42:00 : Next recording is {Doctor Who Confidential} on BBC3 at 18:45
    Saturday 18:42:00 : Gap to next programme is 0 seconds
    Saturday 18:42:00 : Can't add end padding to {Doctor Who}
    Saturday 18:42:00 : Next end padding setting due 19:10
    Saturday 18:42:00 : Gap to previous recording is 0 seconds
    Saturday 18:42:00 : Can't add start padding to {Doctor Who Confidential}
    Saturday 18:42:00 : Next start padding setting due 19:10
    Saturday 18:42:00 : Next wake up will be 19:10
    Sleeping, checking every minute for kill signal.............................
    Saturday 19:10:00 : Woken up
    Saturday 19:10:00 : Recording {Doctor Who Confidential} on BBC3 now
    Saturday 19:10:00 : Recording Scheduled End Time: 19:15
    Saturday 19:10:00 : Next recording is {Hit Me Baby One More Time} on ITV1GRA at 19:15
    Saturday 19:10:00 : Gap to next programme is 0 seconds
    Saturday 19:10:00 : Added 870 seconds end padding to {Doctor Who Confidential}
    Saturday 19:10:00 : Next end padding setting due 19:25
    Saturday 19:10:00 : Not time to add start padding yet
    Saturday 19:10:00 : Next start padding setting due 19:12
    Saturday 19:10:00 : Next wake up will be 19:12
    Sleeping, checking every minute for kill signal...
    Saturday 19:12:00 : Woken up
    Saturday 19:12:01 : Recording {Doctor Who Confidential} on BBC3 now
    Saturday 19:12:01 : Recording Scheduled End Time: 19:29
    Saturday 19:12:01 : Next recording is {Click Online} on BBC24 at 19:30
    Saturday 19:12:01 : Not time to add end padding yet
    Saturday 19:12:01 : Next end padding setting due 19:24
    Saturday 19:12:01 : Not time to add start padding yet
    Saturday 19:12:01 : Next start padding setting due 19:27
    Saturday 19:12:01 : Next wake up will be 19:24
    Sleeping, checking every minute for kill signal..............
    Saturday 19:24:30 : Woken up
    Saturday 19:24:30 : Recording {Doctor Who Confidential} on BBC3 now
    Saturday 19:24:30 : Recording Scheduled End Time: 19:29
    Saturday 19:24:30 : Next recording is {Click Online} on BBC24 at 19:30
    Saturday 19:24:30 : Gap to next programme is 900 seconds
    Saturday 19:24:30 : Added 900 seconds end padding to {Doctor Who Confidential}
    Saturday 19:24:30 : Next end padding setting due 19:55
    Saturday 19:24:30 : Not time to add start padding yet
    Saturday 19:24:30 : Next start padding setting due 19:27
    Saturday 19:24:30 : Next wake up will be 19:27
    Sleeping, checking every minute for kill signal....
    Saturday 19:27:00 : Woken up
    Saturday 19:27:00 : Recording {Doctor Who Confidential} on BBC3 now
    Saturday 19:27:00 : Recording Scheduled End Time: 19:30
    Saturday 19:27:00 : Next recording is {Click Online} on BBC24 at 19:30
    Saturday 19:27:00 : No end padding required:
    Saturday 19:27:00 : End padding of 900 seconds already set
    Saturday 19:27:00 : Next end padding setting due 19:55
    Saturday 19:27:00 : Gap to previous recording is 0 seconds
    Saturday 19:27:00 : Can't add start padding to {Click Online}
    Saturday 19:27:00 : Next start padding setting due 19:55
    Saturday 19:27:00 : Next wake up will be 19:55
    Sleeping, checking every minute for kill signal.............................
    Saturday 19:55:00 : Woken up
    Saturday 19:55:00 : Recording {Click Online} on BBC24 now
    Saturday 19:55:00 : Recording Scheduled End Time: 20:00
    Saturday 19:55:00 : Next recording is {CSI: NY} on FIVE (Suggestion) at 20:25
    Saturday 19:55:00 : Gap to next programme is 1500 seconds
    Saturday 19:55:00 : Added 900 seconds end padding to {Click Online}
    Saturday 19:55:00 : Next end padding setting due 21:20
    Saturday 19:55:00 : Not time to add start padding yet
    Saturday 19:55:00 : Next start padding setting due 20:22
    Saturday 19:55:00 : Next wake up will be 20:22
    Sleeping, checking every minute for kill signal............................
     
  9. sanderton

    sanderton TiVoer since 11/2000

    6,341
    0
    Jan 4, 2002
    Got it! Found the bug-ger. 1.4.2 is now in the top post.

    For those who have forked the code, the issue in line 439:

    Code:
    if {[expr $cendtime - $cexistingendpadding + $endpadding] >= [expr $longstop - 30]} {
    
    which should read:

    Code:
    if {[expr $cendtime - $cexistingendpadding + $endpadtoset] >= [expr $longstop - 30]} {
    
    The bug would only manifest itself if a recording was followed by another the EXACT length of the padding AND another recording was due IMMEDIATELY after that.

    Sorry Pmk! For the 1,355 folks who downloaded 1.4.1 - if your padding is only a few mins this is incredibly unlikley to happen, so you are pretty safe sticking with the old version if you want.
     
  10. pmk

    pmk New Member

    388
    0
    Jan 1, 2002
    No problem, I love EndPad and could not live without it. I am just pleased I could help in some little way by providing feedback. Thats two odd bugs solved for people who use long end padding. Who counting though :D
     
  11. Jun 4, 2005 #1011 of 1197
    sanderton

    sanderton TiVoer since 11/2000

    6,341
    0
    Jan 4, 2002
    You may remember that I asked that if you use EndPad you consider making an appropriate donation to charity.

    There is now a link through which you can make a donation to Cancer Reasearch if you use and enjoy EndPad:

    http://www.justgiving.com/brigid

    This link is for donations in memory of a friend of mine who died from breast cancer just before Christmas. She was 39 and had two young children.

    Please put "EndPad" in the comment if you make a donation.

    Thank you.
     
  12. Jun 4, 2005 #1012 of 1197
    Fozzie

    Fozzie New Member

    837
    0
    Sep 3, 2001
    Alton,...
    Done. (Thanks for the reminder Stuart). A worthy cause.
     
  13. Jun 4, 2005 #1013 of 1197
    6022tivo

    6022tivo A Happy Member

    2,061
    1
    Oct 29, 2002
    North West, UK
    I lost my wife earlier this year after she contracted MRSA during a stay in hospital. We also have two children, one who is my avartar (with a wig on!!). Don't know the full family situation, but we are dealing with this, best we can, and I can understand in some small way what Brigid's family are going though. I have sent across a donation, only small, but every little helps I suppose.

    Thanks again for the great module Stuart.
     
  14. Jun 8, 2005 #1014 of 1197
    staffie2001uk

    staffie2001uk New Member

    176
    0
    Apr 1, 2004
    Preston,...
    I had an unexpected reboot whilst fine tuning DailyMail and cron since when EndPad will not run. I am getting the following when I run it from the command line.
    Any help will be greatly appreciated.

    > exec /tvbin/tivosh /var/hack/endpad/endpad.tcl -s 1 -e sugqual 75 -sugeq
    EndPad v1.4.1 (c) 2004 Stuart Anderton
    Strictly no commercial distribution
    See file header for terms of use and distribution
    Switching to background...
    couldn't execute "/var/hack/endpad/endpad.tcl": no such file or directory
    while executing
    "exec $argv0 $argv -run >>& $errfile &"
    (file "/var/hack/endpad/endpad.tcl" line 521)
     
  15. Jun 8, 2005 #1015 of 1197
    sanderton

    sanderton TiVoer since 11/2000

    6,341
    0
    Jan 4, 2002
    The clue is in the error: "couldn't execute "/var/hack/endpad/endpad.tcl": no such file or directory" - have you checked to see if you still have a /var /hack directiory?
     
  16. Jun 9, 2005 #1016 of 1197
    staffie2001uk

    staffie2001uk New Member

    176
    0
    Apr 1, 2004
    Preston,...
    Stuart

    Yes, /var/hack is still there. In fact, it is an error from a line in the file it is claiming is not there! It is the line that calls EndPad in the background.

    I don't have a clue what the problem is, but I'm certain it's not a fault with EndPad, it's a linux issue. I could be wrong though.

    When I first installed EndPad, I am pretty certain I could run in from the bash prompt in telnet without having to use exec and specify the shell. Again. my memory could be faulty.

    Colin.
     
  17. Jun 9, 2005 #1017 of 1197
    maxwells_daemon

    maxwells_daemon New Member

    84
    0
    Apr 9, 2005
    Oxford, UK
    Perhaps your /var/hack/endpad/endpad.tcl doesn't have execute mode. Try
    Code:
    chmod 755 /var/hack/endpad/endpad.tcl
    Also, I'm not sure about the way you are running the command. Why exec it? Why specify /tvbin/tivosh explicitly (except as a way of trying to get round the lack of execute mode)? And I think you are missing the number on the -e option. I would use something like
    Code:
    /var/hack/endpad/endpad.tcl -s 1 -e 5 -sugqual 75 -sugeq
    By the way, in my modified endpad.tcl, I changed the background switch to use
    Code:
    exec [info nameofexecutable] [info script] $argv -run >>& $errfile &
    to ensure that the background process was started in the same way as the main one. That works even if endpad.tcl doesn't have execute mode (assuming you got it to run in the first place with /tvbin/tivosh).

    Tim.
     
  18. Jun 9, 2005 #1018 of 1197
    staffie2001uk

    staffie2001uk New Member

    176
    0
    Apr 1, 2004
    Preston,...
    endpad should have execute mode, I have chmodded it.

    As shown below, the file error goes if substitute your code for the original, but the after "switching to background..." appears the prompt does not reappear until I hit [Return].

    TiVo: {/var/hack/endpad} > ls
    endpad.err endpad.tcl
    TiVo: {/var/hack/endpad} > chmod 755 ./endpad.tcl
    TiVo: {/var/hack/endpad} > ls -l
    total 25
    -rw-r--r-- 1 0 0 0 May 31 20:44 endpad.err
    -rwxr-xr-x 1 0 0 23951 Jun 9 16:03 endpad.tcl
    TiVo: {/var/hack/endpad} > exec /tvbin/tivosh /var/hack/endpad/endpad.tcl -s 1 -
    e 10 -sugqual 75 -sugeq
    EndPad v1.4.1 (c) 2004 Stuart Anderton
    Strictly no commercial distribution
    See file header for terms of use and distribution
    Switching to background...
    TiVo: {/var/hack} >

    I agree, I don't think I should need to specify exec or the shell, I just get a "No such file or directory" error. When I can see the file is present, has execute set and can be run specifically by specifiying the shell.

    TiVo: {/var/hack/endpad} > ls -l
    total 25
    -rw-r--r-- 1 0 0 0 May 31 20:44 endpad.err
    -rwxr-xr-x 1 0 0 23951 Jun 9 16:03 endpad.tcl
    TiVo: {/var/hack/endpad} > ./endpad.tcl -s 1 -e 10 -sugqual 75 -sugeq
    bash: ./endpad.tcl: No such file or directory
    TiVo: {/var/hack/endpad} > /var/hack/endpad/endpad.tcl -s 1 -e 10 -sugqual 75 -sugeq
    bash: /var/hack/endpad/endpad.tcl: No such file or directory
    TiVo: {/var/hack/endpad} >

    Very, very puzzled, but I am sure it is a linux issue and I know to little to figure it out.

    Colin.
     
  19. Jun 9, 2005 #1019 of 1197
    LJ

    LJ New Member

    786
    0
    Nov 11, 2001
    West...
    Try deleting the file from the TiVo and then re-FTPing it across making sure you're in binary mode.

    Something like this should run it ok:

    /var/hack/endpad.tcl -s 1 -e 3 -auto >> /dev/null &
     
  20. Jun 9, 2005 #1020 of 1197
    sanderton

    sanderton TiVoer since 11/2000

    6,341
    0
    Jan 4, 2002
    I think, Mr J, that you may have identified the problem.
     
Thread Status:
Not open for further replies.

Share This Page