# Suggs: hack to create suggestions



## mikerr

Suggs: the new suggestion engine ! V 1.04
a hack to recreate suggestions.

This hack will run in the background and set suggestions every 30 minutes.

Basically looks at the schedule of the current tv channels, 
and tries to record some of the upcoming programmes as suggestions

The threshold for choosing programmes can be set:
default is neutral ( i.e. record all except thumb-downed shows) 
_This default option good for generating lots of suggestions_
To run this way:

./suggs.tcl

To record only those with 1 thumb up or more:

./suggs.tcl -threshold 127

To record those with "predicted relevance":

*./suggs.tcl -threshold 1

this last example is closest to how tivo suggestions worked.*

they will show up in tivoweb scheduled suggestions 
(http://tivo/ui/suggestions )
but not in the tivo GUI suggestions menu.

*To show scheduled suggestions on the tivo GUI todo list,
navigate to the todo list on your tivo, and press:
Thumbs Down, Thumbs Down, Thumbs Up, Instant Replay *

Being suggestions, they never interfere with your season passes or wishlists.

- Doesn't record duplicate suggestions,
- Won't record a show as a suggestion if it is present in now playing
( e.g. use suggs.tcl -daysback 28 if you don't want another episode for 28 days)
- Gives priority to thumbed shows, but also has predicted thumbs
- Predicted thumbs based on genres 
- By default only schedules one day ahead, use "-days 2" to schedule 2 days ahead
- 
- Shares the blocklist.txt and blockgenres.txt from global blocklists
(E.g. block all football programmes from being recorded as suggestions by putting "Football" in blockgenres.txt , or "Children", "News" etc one per line)
- Takes account of padding

# 1.04 Some duplicate checking code
# 1.03 No stuttering!
# 1.02 - only processes channel guide data once per day 
# 
# 1.01 Uses tivo's database of genre thumbs


----------



## a_tivo_noob

is anyone else using this other than mikerr? sounds like just what we need now!

quick (stupid) question mikerr, but the txt file accompanying it states


> # record suggestions on current channel


 - does it not change channel then or am i reading it wrong


----------



## mikerr

a_tivo_noob said:


> is anyone else using this other than mikerr? sounds like just what we need now!


It was originally a 10 minute hack to help out when suggestions were flaky,
but now as it is the only way of getting suggestions I'll spend some time on it,

and also include it with preconfigured drives 



> quick (stupid) question mikerr, but the txt file accompanying it states - does it not change channel then or am i reading it wrong


Not in the current version, no.

Basic operation is as follows:

It looks a few hours ahead into the tv guide for the current channel,
if any programme has a thumbs up it will record it as a suggestion.

Version 0.3 will look across all channels and pick from there.


----------



## a_tivo_noob

nice one - thx for clarification and keep up the good work - any ideas on when a v0.3 release will be (if its in the next week or two i'll hold off v0.2)


----------



## andonevris

The fate of my tivo rests in your hands mikerr, if I can't get suggestions working again to a reasonable level I'll be jumping ship, I hope you can pull it off.

Looking forward to your 0.3 release

:up:


----------



## Mike Rogers

mikerr you're a star.

Many thanks for this!


----------



## kitschcamp

mikerr said:


> Version 0.3 will look across all channels and pick from there.


Any chance of making it so the script will only check and add suggestions if it isn't currently recording a program? With tivoweb, endpad and irblast and this at the same time you get "stuttering" whilst it is processing.


----------



## mikerr

The stutter is probably on first access to the database, common to many hacks: 


Code:


set db [dbopen]

It doesn't stutter after the first few seconds does it?


----------



## kitschcamp

His nibbs at home has been complaining of TiVo having a stammer today, so it looks like it is at times. I've put it down to too many hacks, and this was the last one I added.


----------



## TCM2007

Why every 30 mins? Wouldn't once a day be enough with this way of working?


----------



## mikerr

I've found they get removed from the todo list after a while,
even if there is nothing else scheduled at that time.

I should probably be sending a todolist-changed signal, but can't find it.
[edit] Oh.. might have found it:


Code:


event send $TmkEvent::EVT_DATA_CHANGED $TmkDataChanged::SCHEDULE 0


----------



## ColinYounger

I tried that event before when trying to fix the restore thumbs problem, but it didn't affect the scheduling process.


----------



## ColinYounger

Interesting link: Broad overview of suggestions. No technical detail.


----------



## kitschcamp

mikerr said:


> I've found they get removed from the todo list after a while,
> even if there is nothing else scheduled at that time.


Ah, I did wonder - I did notice one appear then disappear earlier today.


----------



## kitschcamp

mikerr said:


> The stutter is probably on first access to the database, common to many hacks:
> 
> 
> Code:
> 
> 
> set db [dbopen]
> 
> It doesn't stutter after the first few seconds does it?


I was at home last night, and yes, every thirty minutes, regular as clockwork.


----------



## mikerr

Ah thanks, noted.


----------



## kitschcamp

I've turned off irblast today to see if it's just a simple case of too many things at once running. I'll soon know if it's ok


----------



## 6022tivo

Just a quickie on this, so does it add "suggestions" and do they get recorded as the little tivo icon next to them (Not blank, Yellow, Green DOT?)

Do they go to the bottom of the list and not get in the way of "proper" recordings???

If so.... This is ace..


----------



## mikerr

Yes to all the above. They appear at the bottom as a suggestion, and doesn't interfere with other recordings. Tivo actually _is _recording it as normal suggestion.

Indistinguishable from the "real thing" apart from:

1) Pending suggestions don't appear in the TV tivo suggestions menu 
(you have to use tivoweb (http://tivo/ui/suggestions) to see the todo list)

2) At present only records on the current channel, but this is just in testing.


----------



## Pugwash

mikerr, you've clearly done something TiVo have been unable to do (for whatever reason). I'm sure if you can get this working across all channels many people would shake your hand.


----------



## mikerr

New version uploaded, now covers all channels you receive.


----------



## 6022tivo

Mike you are amazing.. I will upload this to mytivo in the next few days...

Thank you for all the time you have put into this...


----------



## Pugwash

Out of interest, do we need to kill the previous version's process (how?) or will replacing the file make it restart?

p.s. This is excellent work. I have suggestions in TiVoWebPlus across all channels now, which I assume means the new one is running by just copying the file over the top and running it.


----------



## Mostin

Nice one mike, i'll be in touch for a new hd soon:up:


----------



## andonevris

Mikerr....this is VERY cool. Fired it up and started seeing suggestions filling up straight away. They look like the sort of stuff tivo would record for me when its own suggestions were working.

Thanks very much for this.....

Tivo should give you a job


----------



## kitschcamp

Hi Mike,

Does it just run once in the background then close down? I'm asking because it doesn't seem to be staying running on mine in the background, and when I check back after about an hour and run

ps ax

The process is no longer running, but there is nothing I can see in the logs to say it closed.

It has, however, added some entries to the scheduled suggestions recording, so that definitely works!  Many thanks for putting in the effort.


----------



## mikerr

ColinYounger said:


> Interesting link: Broad overview of suggestions





> TiVo Suggestions currently works by sending all the ratings across to their server cluster from each TiVo, generate correlations between the shows, and send back the list of correlations to each TiVo


Ours don't (didn't!) work that way..the US tivos work the above way, including US S1 tivos.
TivoPony mentioned that in the suggestions announcement thread.

Our UK tivos process all suggestions on the tivo itself.

[*everyone*] What would your opinions be if I added something similar (upload thumbs) to this hack ?
Obvious privacy implications as I'd be uploading all your thumbs to my website for processing,
but it would produce better results.



kitschcamp said:


> it doesn't seem to be staying running on mine in the background [...] but there is nothing I can see in the logs to say it closed.


It's possible it has closed with an error, logs are in /var/log/suggs.log

[edit] Argh ! 0.4 does only run once, due to a silly bug 
The code


Code:


-console { set bg true ; set runonce true }

should be


Code:


-console { set bg true }

up with 0.5 ....


----------



## ag5002

andonevris said:


> Mikerr....this is VERY cool. Fired it up and started seeing suggestions filling up straight away. They look like the sort of stuff tivo would record for me when its own suggestions were working.
> 
> Thanks very much for this.....
> 
> Tivo should give you a job


Very clever and cool. If the Nero product ever comes to the UK, I assume you will be building new Tivo boxes for everyone?  Perhaps you could even take over the entire Tivo UK service.


----------



## kitschcamp

mikerr said:


> Argh ! 0.4 does only run once, due to a silly bug


Thanks! I'll test it again now.


----------



## AMc

Thanks for adding the attachment 

Is there a reason it runs every 30 minutes - would there be any harm in running it less frequently - say once a day at 3am with cron instead?


----------



## mikerr

See post #11 
Tivo wipes out the suggestion list after a while, so I refresh it.

If you want to run it once only e.g. from cron,
then use the -debug option 
-which runs once only, and prints progress to the console

/var/hack/suggs.tcl -debug >/dev/null


----------



## AMc

But you said you'd found the command you needed 
Seriously I'm more concerned about stuttering during stuff I want than ending up with fewer suggestions.
I assume that by hacking the runonce loop I could vary the reset loop but cron is probably safer.


Code:


if { $runonce } { exit }
# loop around after 30 mins
if {$debug} { puts "Waiting for 30 mins" }
after [expr [b]1440[/b] * 60 * 1000]
}

Hmm seem to have rebooted Tivo by killing the process with the kill command - not much of a hacker am I? Is there a safe way to stop it when it's running in a 30min loop?


----------



## Tim L

mikerr said:


> See post #11
> Tivo wipes out the suggestion list after a while, so I refresh it.
> 
> If you want to run it once only e.g. from cron,
> then use the -debug option
> -which runs once only, and prints progress to the console
> 
> /var/hack/suggs.tcl -debug >/dev/null


Would it reduce the processor load a bit if it ran once a day and wrote the suggestions to somewhere that Tivo won't overwrite, then just copy those to the correct location every half an hour?


----------



## kitschcamp

That's not a bad idea! It's killing my tivo every half-hour, even without any other hacks running as a test. Even renice doesn't help stop the freezes.


----------



## ak-a

mikerr said:


> [*everyone*] What would your opinions be if I added something similar (upload thumbs) to this hack ?
> Obvious privacy implications as I'd be uploading all your thumbs to my website for processing,
> but it would produce better results.


Personally I would be fine with that. Have tried 0.4 version and get the same stutter reported by another user. I have endpad and tivewebplus hacks running, but no other hacks so I think it is the sugg.tcl getting a bit carried away.

Thanks for your efforts. :up:

AKA


----------



## TCM2007

Mikerr,

A couple of other routes to possibly explore.

1) Run a script to delete the two extra digits from the TMSIDs in the database. This shouldn't effect TiVo's functions as they, as TiVoPony has confirmed, are abstracted to the MFS ID and don't use the TMSID after the data is loaded. If the the crash point for suggestions is reading the TMSID from upcoming shows in the guide this might fix it. If the crash point is elsewhere it won't!

2) If thumbing a programme reactivates suggestions until the next guide download, programmatically thumb a show after each guide download.

A clue about the way the suggestions database works might be contained in reports that if you restore a backup image, the thumbs don't reappear instantly.


----------



## AMc

Hmmm well I ran it manually at 10am, got one suggestion half an hour later and now the list is blank again - so I guess croning it once a day would be waste of time.

I'm not adverse to uploading thumbs/downloading thumbs but it should obviously be an option. The list that your script populated looked pretty much on a par with previous Tivo suggestions.


----------



## mikerr

TCM2007 said:


> 1) Run a script to delete the two extra digits from the TMSIDs in the database.


Thats easily done, I'll test it later.... depends on where the suggestions look for that data though.



> 2) If thumbing a programme reactivates suggestions until the next guide download, programmatically thumb a show after each guide download.


That just seems to set suggestions to record that particular show, not any historical thumbs AFAICS



AMc said:


> The list that your script populated looked pretty much on a par with previous Tivo suggestions.


Anyone getting "predicted thumbs" in the list?

I.e. the number listed in tivoweb is 1 - 127


----------



## kitschcamp

No predicted thumbs so far.


----------



## Rob Randall

mikerr said:


> Anyone getting "predicted thumbs" in the list?
> 
> I.e. the number listed in tivoweb is 1 - 127


The lowest I've seen is 'Implied 128', so no I've not seen any predicted <=127.

I'm also seeing an over-emphasis on suggestions from low channel numbers. This is presumably because suggs goes through all the channels sequentially, so by the time it's got past the first handful of channels, there's no gaps to schedule in stuff from the higher channels. Any way to mix this up a bit? On my setup, once it gets to UKGLD and UKGLD1 the schedule is full 

Looking forward to 0.6, great work mikerr


----------



## mikerr

> I'm also seeing an over-emphasis on suggestions from low channel numbers. This is presumably because suggs goes through all the channels sequentially, so by the time it's got past the first handful of channels, there's no gaps to schedule in stuff from the higher channels. Any way to mix this up a bit? On my setup, once it gets to UKGLD and UKGLD1 the schedule is full


Wondered if anyone would spot that 
Yes exactly the reason you mentioned...its due to the simplistic way of working through channels one by one, and setting suggestions en route.

The way around that is to batch read all possibles into a tcl list first, 
process that list, then apply that back to tivo mfs.
That might stop the stuttering you're seeing too.


----------



## SCOOBY.C

sorry to be really thick here but i'd like to try this on my tivo which the previous owner modded. I can network to my laptop but have no idea where to add this hack, could someone point me in the right direction? thanks.


----------



## 6022tivo

TCM2007 said:


> 1) Run a script to delete the two extra digits from the TMSIDs in the database. This shouldn't effect TiVo's functions as they, as TiVoPony has confirmed, are abstracted to the MFS ID and don't use the TMSID after the data is loaded. If the the crash point for suggestions is reading the TMSID from upcoming shows in the guide this might fix it. If the crash point is elsewhere it won't!


Genius :up::up::up:


----------



## AMc

SCOOBY.C said:


> sorry to be really thick here but i'd like to try this on my tivo which the previous owner modded. I can network to my laptop but have no idea where to add this hack, could someone point me in the right direction? thanks.


Download the zip from the first post and extact it
Assuming you're on a PC open a command line (*Start>run>cmd*) and move to the folder you extracted the suggs.tcl to.
Now type 
*ftp [yourtivoipaddress]*
Change to the Tivo hack directory 
*cd /var/hack*
set binary transfer mode by typing
*binary* 
then copy the file
*put suggs.tcl*
close the ftp session by typing 
*bye*

Now back in the DOS command window type 
*telnet [yourtivoipaddress]*
change to the hack directory by typing
*cd /var/hack*
Make the file executable (not sure if you need to but I do out of habit) by typing
*chmod 755 suggs.tcl*
Now start the program once to be sure it runs with 
*/var/hack/suggs.tcl -debug*
Assuming you get no errors and you want it to run every 30 mins you can now start it properly with 
*/var/hack/suggs.tcl*
then close the Telnet session by typing
*exit*

Once you're really happy with it you can add a line to rc.sysinit.author that starts it when Tivo boots. I've not done that yet.

There is a really comprehensive guide to getting started hacking Tivo here which I recommend you read
http://tivo.stevejenkins.com/network_cd.html


----------



## Pugwash

andonevris said:


> Tivo should give you a job


Nooooooo! He'd never fix UK TiVos again!


----------



## Pete77

Pugwash said:


> mikerr, you've clearly done something TiVo have been unable to do (for whatever reason)


I don't think that Tivo are unable to do it at all but its just that the Bean Counters in Alviso won't agree to cover the allocation of the necessary programmer time and all other ensuing costs involved to develop the fix, then test it, then sign it off and send out a new software version to the UK machines (which would also need to have an updated kernel in order to handle larger drives if it was not to be self defeating).

The fact that Mike has been able to come up with this heroic lash up on his own in a relatively short time clearly shows that a proper fix is not beyond the wit of Tivo or its programmers if they actually wanted to bother...........


----------



## SCOOBY.C

AMc - thanks greatly for that. I'll read the link and all its info to get a better understanding and then hopefully give it a try!


----------



## TCM2007

Pete77 said:


> I don't think that Tivo are unable to do it at all but its just that the Bean Counters in Alviso won't agree to cover the allocation of the necessary programmer time and all other ensuing costs involved to develop the fix, then test it, then sign it off and send out a new software version to the UK machines (which would also need to have an updated kernel in order to handle larger drives if it was not to be self defeating).
> 
> The fact that Mike has been able to come up with this heroic lash up on his own in a relatively short time clearly shows that a proper fix is not beyond the wit of Tivo or its programmers if they actually wanted to bother...........


For once I agree! Where I disagree, I guess, is that I can understand where the bean counters are coming from!


----------



## SCOOBY.C

AMc said:


> Download the zip from the first post and extact it
> Assuming you're on a PC open a command line (*Start>run>cmd*) and move to the folder you extracted the suggs.tcl to.


sorry for another noob question but the only bit that confused me is when do you mean by move to the folder? I can open the command but then miss the point of what comes next? sorry and thanks!


----------



## a_tivo_noob

he means type commands in to get the dosprompt (which is the 'cmd' bit) to be at the same location as where you have put the file on your computer...

so do the above (start-> run -> cmd) then for example, if you saved the file here: 
"C:\"

then type:
cd c:\

the "cd" stands for "change directory" (IIRC)

if you saved it in a folder called "C:\MyFile" then you type "CD C:\MyFile" and so on... if you put it in a folder with a space in it, you have to put quote marks round the whole file path... so probably just easier you dont  (just to save me explaining properly  )


----------



## SCOOBY.C

thanks:up:


----------



## mikerr

New version (0.6) uploaded.
This hammers the mfs database less, so sthere shouldn't be as much picture judder (if at all).


----------



## martink0646

Hi Mike,

Brilliant (as always), thanks.

As I've said elsewhere, I wasn't a major user of suggestions, but always found them useful. I used the '-threshold 128' option and got nothing upcoming. However, the '-threshold 1' option works perfectly. Is that because I haven't thumbed up & down enough?

Martin


----------



## mikerr

That's a slight error in instructions (now corrrected), 
the threshold means "more than",
so 128 is really "2 thumbs up or more"

It should be 
-threshold 127 for "at least one thumb".

Multiples of 128 are those with thumbs up in the GUI:

1 Thumbs up = 128
2 Thumbs up = 256

But tivo also has predicted thumbs thoughout that range 
e.g. 56 
That would not show as a thumb in the GUI, but is something related to another thumb/genre that you might like.


----------



## TCM2007

Mikerr, Is TiVo still generating implicit thumbs for shows with 14-character TMSIDs?


----------



## mikerr

[edit] misread post.

No, I haven't seen any attached to the longer TMSIDs
I've wiped all 14 char TMSIds on a test tivo, and suggestions didn't reappear so far.


----------



## -MC-

Hi mikerr, great work :up:

Ive set this up as threshold 1 and so far i have something in Tivoweb scheduled suggestions - the 'score' shown on one is 'Explicit 1 255', two showing 'old-style 0', and one showing 'void 0 0'. does this mean anything? where can i get more info ? also should i have anything showing up on the suggs.log as its empty ?


----------



## Andy Leitch

TCM2007 said:


> For once I agree! Where I disagree, I guess, is that I can understand where the bean counters are coming from!


I thought the subs, both monthly and lifetime, was supposed to pay for the ongoing upkeep of the service. Not only in providing the data, paying for the freephone number but also in providing *software updates* to fix any problems.


----------



## simbeav

*Warning !*
Unless I've done something wrong this is not working as expected. 
I came home tonight to find my season pass on Dads Army not recording, but the Coventry v Southampton football match instead.

Extracts of the endpad log show :-

Saturday 12:00:03 : Next recording is {Dad's Army} on BBC2 at 16:55

Saturday 12:30:03 : Next recording is {The Simpsons} on SKY1 (Suggestion) at 16:30
Saturday 13:00:04 : Recording {Time Team} on DISKNOW (Suggestion) now
Saturday 13:00:04 : Next recording is {The Ray Bradbury Theater} on HORROR (Suggestion) at 14:00
Saturday 14:55:00 : Next recording is {The Simpsons} on SKY1 (Suggestion) at 16:30
Saturday 15:25:00 : Next recording is {Football League Championship} on SKYSP2 (Suggestion) at 16:15
Saturday 16:39:00 : Recording {Football League Championship} on SKYSP2 (Suggestion) now
Saturday 16:39:00 : Recording Scheduled End Time: 18:30
Saturday 16:39:00 : Next recording is {Dad's Army} on BBC2 at 16:55


----------



## wonderboy

Just wanted to say "well done". It's not as good as the old suggestions so far (one of my tivos recorded 10 shows on some news channel!) but at least it's nearly normal service resumed!!

I've now started it using "-threshold 1" so hopefully will work better!

THANKS


----------



## TCM2007

simbeav said:


> *Warning !*
> Unless I've done something wrong this is not working as expected.
> I came home tonight to find my season pass on Dads Army not recording, but the Coventry v Southampton football match instead.
> 
> Extracts of the endpad log show :-
> 
> Saturday 12:00:03 : Next recording is {Dad's Army} on BBC2 at 16:55
> 
> Saturday 12:30:03 : Next recording is {The Simpsons} on SKY1 (Suggestion) at 16:30
> Saturday 13:00:04 : Recording {Time Team} on DISKNOW (Suggestion) now
> Saturday 13:00:04 : Next recording is {The Ray Bradbury Theater} on HORROR (Suggestion) at 14:00
> Saturday 14:55:00 : Next recording is {The Simpsons} on SKY1 (Suggestion) at 16:30
> Saturday 15:25:00 : Next recording is {Football League Championship} on SKYSP2 (Suggestion) at 16:15
> Saturday 16:39:00 : Recording {Football League Championship} on SKYSP2 (Suggestion) now
> Saturday 16:39:00 : Recording Scheduled End Time: 18:30
> Saturday 16:39:00 : Next recording is {Dad's Army} on BBC2 at 16:55


I think there's a bug in the code:



Code:


if { $starttime >= $tstarttime  &&  $starttime <= $tstoptime }  {  set recordThis 0 }
if { $starttime < $tstarttime  &&  $stoptime > $tstarttime }  {  set recordThis 0 }

won't trap a recording which starts before the next TDL item starts, but finishes after the next TDL items ends


----------



## mikerr

TCM2007 said:


> I think there's a bug in the code
> it won't trap a recording which starts before the next TDL item starts, but finishes after the next TDL items ends


That second line catches that I think; the line wasn't present in older versions pre 0.6, which is what his problem might have been - sorry simbeav! 


wonderboy said:


> It's not as good as the old suggestions so far (one of my tivos recorded 10 shows on some news channel!) but at least it's nearly normal service resumed!!


Starting it without any threshold makes it "neutral", the only things it wouldn't record are thumbed-down shows 
That isn't how tivo original suggestions worked, but is what I wanted to keep it recording all the time 


wonderboy said:


> ]I've now started it using "-threshold 1" so hopefully will work better!


Yes, thats exactly how original tivo recordings worked:
only record things with some positive thumbs (or predicted thumbs).


----------



## TCM2007

You're quite right, I apologise for impugning your code!


----------



## Pugwash

Bad news here  Since running the suggs.tcl I've had recordings with stutters and looping! Sometimes I'd have infinite repeat of a ten second section on playback until I double-fast forwarded past it. I rebooted the TiVo and all is well again (didn't set suggs to run on start up)


----------



## -MC-

Pugwash said:


> Bad news here  Since running the suggs.tcl I've had recordings with stutters and looping! Sometimes I'd have infinite repeat of a ten second section on playback until I double-fast forwarded past it. I rebooted the TiVo and all is well again (didn't set suggs to run on start up)


Same here...


----------



## kitschcamp

And here, too.


----------



## ag5002

Well, started learning Linux over the weekend. (Don't yet have a turbonet card, but on my Christmas list)

Put Tivo's drive in my PC, booted from Linux CD and installed the suggestions hack. Everything working OK, and I have suggestions! 

Mike, you are a star. Well done and thanks for your efforts. Also, found lots of other pre-installed gems that Mike installs as standard on his new drives. I am now a happy, confirmed hacker. Now, where's that credit card....


----------



## mikerr

New version up (0.71)
added a whole load of pauses to give tivo chance to catch up,
and this seems to eliminate most of the picture glitches on my machine.


----------



## Tim L

mikerr said:


> New version up (0.71)
> added a whole load of pauses to give tivo chance to catch up,
> and this seems to eliminate most of the picture glitches on my machine.


Cheers - do you think it would be possible to eliminate all the picture glitching though?

Just popped downstairs and seen Tivo recording its first suggestion since August. Lovely!


----------



## TCM2007

mikerr - I've found with, ahem, certain background processes which extract video, that manipulation of the thread's priority with setpri eliminates interference with the interface. No idea if it works on TCL threads though.


----------



## -MC-

Hi Mikerr,

I see it makes a channel list - 'suggs.channel' , if I remove channels on my Tivo does this list get amended ?, or should I delete the list and let suggs.tcl create a new list ?


----------



## simbeav

0.71 is unusable on my machine. The Tivo slows down to a crawl. Pressing any button can take 30 seconds or more to respond and anything that shows programme information (especially the guide button) can take minutes to come back.

Also - Is there a clean way to stop Suggs ? Every time I "kill" it , the Tivo reboots.


----------



## mista_c

Mikerr - thanks for creating this, its much appreciated. I'm now getting more suggestions than ever, which is a good thing, but am not sure that it is working like it did before. I came home today to find that most of my own recorded programmes have been deleted and looks as though those with yellow exclamations, i.e. allow to be deleted in place of other programmes, are being deleted so that suggestions can be recorded. 

Maybe I've got things wrong here, but I don't remember suggestions doing this before.


----------



## -MC-

mista_c said:


> Mikerr - thanks for creating this, its much appreciated. I'm now getting more suggestions than ever, which is a good thing, but am not sure that it is working like it did before. I came home today to find that most of my own recorded programmes have been deleted and looks as though those with yellow exclamations, i.e. allow to be deleted in place of other programmes, are being deleted so that suggestions can be recorded.
> 
> Maybe I've got things wrong here, but I don't remember suggestions doing this before.


Mine has recorded a few thing but isnt recording much now, and looking at scheduled suggetions it has no plans to in the near future ! ..Strange, and yet the Suggs log is full of program titles (Size 24563)..


----------



## mikerr

Version 0.8 uploaded.

Main addition is that it only sets suggestions when you have at least 2GB free disk space ( i.e. 1 hour or more).

While tivo should be deleting suggestions by itself to make room, and not deleting normal recordings, that code may be elsewhere... so this is the safe way.



> I see it makes a channel list - 'suggs.channel' , if I remove channels on my Tivo does this list get amended ?, or should I delete the list and let suggs.tcl create a new list ?


Delete the file, and it will be recreated.

You can also edit the file, removing channels you don't want suggestions to record from, 
or to favour channels over others. 
Due to a side effect of the current coding, moving a channel to the start of the list will make it favoured over others.


----------



## -MC-

*Any way of telling if its still running or not ?*


----------



## mikerr

-MC- said:


> *Any way of telling if its still running or not ?*


*ps -a*



> Is there a clean way to stop Suggs ? Every time I "kill" it , the Tivo reboots.


Generally, for any tivo hack, don't kill it (often causes reboots), but stop it instead:
*kill -20 <pid> *

Version 0.8 and above will stop when another copy is run, or you delete the /var/log/suggspid.* file


----------



## Richard Loxley

mikerr said:


> Version 0.8 uploaded.
> 
> Main addition is that it only sets suggestions when you have at least 2GB free disk space ( i.e. 1 hour or more)


Does this mean once the hard disk is filled with suggestions it won't record any more suggestions unless you manually delete some of the existing ones?

The official behaviour was to delete the oldest suggestions to record new ones ISTR.

Or does 'free space' include space occupied by suggestions?


----------



## mikerr

Richard Loxley said:


> Does this mean once the hard disk is filled with suggestions it won't record any more suggestions unless you manually delete some of the existing ones?


Correct, as of v0.8 - _can't risk having your recordings deleted _!


> The official behaviour was to delete the oldest suggestions to record new ones ISTR.


I had assumed that by putting suggestions in the todo list, tivo would do that sort of housekeeping itself 
- it does see them as suggestions in most other respects.

I think on a full tivo (i.e. full of recordings, no free space) that forcing suggestions with an earlier version of this hack may delete a recording, but not any more.


> Or does 'free space' include space occupied by suggestions?


It does on my testing version, but not on v0.8


----------



## ak-a

mikerr said:


> Version 0.8 and above will stop when another copy is run, or you delete the /var/log/suggspid.* file


BTW suggs barfs if there are no matches to /var/log/suggspid.*, to get it working I had to create a dummy file 

Great stuff otherwise - looking forward to the next version that will roll the suggestions off the bottom 

ak-a


----------



## mikerr

Oops (fixed), re-download it, or change the line to read:
*
# kill any other running version
catch {eval file delete [glob /var/log/suggspid.* ]}*


----------



## AMc

Sorry for the Bob Basic questions.
*ps -a * doesn't show suggs.tcl started in a previous Telnet session I needed *ps -x*.
How long should *kill -20 <pid>* take? I gave it half a minute but no effect. Regular killed it and was lucky not to reboot.
Then started 0.8 with* /var/hack/suggs.tcl threshold 128* - noted I'd goofed the parameter and tried */var/hack/suggs.tcl -threshold 128* and ended up with both running on different pids.
Then I pushed my luck and killed them both and bounced Tivo at the same time 

Now running again with */var/hack/suggs.tcl -threshold 1* - we'll see what happens next.

Really appreciate the work going into this Mikerr!


----------



## Rob Randall

Could the suggestions not being overwritten be to do with their Expiration Date?

On my TiVo all the suggestions created by suggs 0.71 have no expiration date and are showing in TiVoweb as KUID. Should they be set with expiry of 2 days or even 1 day so that they get overwritten before expired normal recordings?


----------



## mikerr

AMc said:


> How long should *kill -20 <pid>* take? I gave it half a minute but no effect.


-20 stops it, doesn't kill it.
If you kill a process which still has a database handle open (i.e. most tivo hacks) then tivo will reboot.

0.8 sits in a pause state for 30 minutes at a time, 
it exits at the end of that if another copy has been started in the meantime.


Rob Randall said:


> On my TiVo all the suggestions created by suggs 0.71 have no expiration date and are showing in TiVoweb as KUID


Hmm, suggestions should have an expiration date that has already passed, I think you have found the problem!


----------



## Tim L

Thanks for all the hard work on this - it's coming along nicely!

Can I make a small request to have a timestamp in suggs.log? It makes it easier to see what it's up to.


----------



## Rob Randall

mikerr said:


> Hmm, suggestions should have an expiration date that has already passed


I have one 'real' suggestion (not created by suggs) that has an expiration date as follows -



Code:


Showing Date	Mon   6th Oct 09:50
Expiration Date	Wed   8th Oct 00:30

So looks like it's normally a couple of days(ish). I would have thought that suggestions should expire immediately.

Can suggs be modded to force an expiration date?



> I think you have found the problem!


Do I win a prize?


----------



## Rob Randall

Tim L said:


> Can I make a small request to have a timestamp in suggs.log? It makes it easier to see what it's up to.


 and maybe also cycle the log occasionally, mine's starting to grow rather large.


----------



## TCM2007

I think suggestions do have an expiration date f a day or two, to stop TiVo wasting its time recording one then immediately overwriting it.


----------



## TCM2007

mikerr - there's code in endpad.tcl to have a "stop" command and cycle logs.


----------



## wonderboy

one other thing I noticed is it's actually recording duplicate suggestions (ie same episode of same show ). I have three copies of some programmes, one from season pass and two suggestions!

other than that it seems to be working great on both tivos (I have now updated so it doesn't delete my shows!)


----------



## davisa

Once this reaches version 1.0 I assume we all re-direct &#163;3 of our monthly sub to you, and reduce our payment to TiVo to &#163;7?


----------



## simbeav

Firstly - Thanks Mikerr - Your efforts are really appreciated. Unfortunately when beta testing everything can sound so negative. 

A few points :-

1. My problems with the Tivo slowing down seem to have gone with the latest version - I don't know what that was about.

2. The suggestions that have been recorded seem to show as Partial (0 minutes) or whatever the exact wording is. When you play them back, leave and return they start at the beginning again, not where you left. This was not the case in early versions.

3. Probably not a Suggs problem, but mine recorded a load of Paramount Comedy programmes last night and none of them actually recorded the programme suggested. I suspect it is just bad guide data, but am not absolutely sure.

4. Wonderboy's comment about duplicate suggestions is true. It especially seems to pick up on the same programme on Channel x and then Channel x+1 1 hour later.


Keep up the good work !


----------



## Pugwash

I think anyone who's done software development will agree the negative comments are normal. It's a sign of good testing though, not bad programming


----------



## mikerr

All suggestions about suggestions welcome,
all feedback is good 



simbeav said:


> The suggestions that have been recorded seem to show as Partial (0 minutes)


I'll check what I broke 



> Wonderboy's comment about duplicate suggestions is true. It especially seems to pick up on the same programme on Channel x and then Channel x+1 1 hour later.


Won't tracker help with that ? (or doesn't it look at suggestions... I don't use it personally, I'll check...)


----------



## Rob Randall

Maybe suggs could check by ID that an item it is about to schedule isn't already in the ToDo or Now Playing lists? That would cut down on a lot of duplicates? Or would that overload the program (or mikerr )?


----------



## Tim L

The process seems to die after a day or so on my Tivo for some reason. The timestamp on the suggs.log is from about 4AM yesterday, and the process is nowhere to be seen (using ps x). The Tivo's uptime is about 50 days, so it's not losing it in a restart.


----------



## mikerr

v0.9 is up. 
Records if there is at least one suggestion / free space.
Includes duplicate checking on a *series *basis 
(max of one episode of a series per day)

... so it won't suffer from recording 5 different episodes of the simpsons per day 
like old suggestions used to !


----------



## Rob Randall

Thanks mikerr - you _have_ been busy 

However, attachment seems to be missing from post #1


----------



## mikerr

Nope, the attachment is there now


----------



## Rob Randall

Excellent. Off to download it and give it a go. Keep up the good work


----------



## FluffyLob

Is it just me or does v0.9 fail with:



Code:


bash-2.02 hack # couldn't open "/var/hack/suggs.channels": no such file or directory
    while executing
"open $suggsfile r"
    (file "./suggs.tcl" line 280)

if there's no suggs.channels present?

Loving it, other than this


----------



## Crispin

FluffyLob said:


> Is it just me or does v0.9 fail with:
> 
> 
> 
> Code:
> 
> 
> bash-2.02 hack # couldn't open "/var/hack/suggs.channels": no such file or directory
> while executing
> "open $suggsfile r"
> (file "./suggs.tcl" line 280)
> 
> if there's no suggs.channels present?


This happened for me as well - either:


Create an empty suggs.channels file - although this will probably not record anything for up to a day
Open suggs.tcl and change the line "set channelage 0" to "set channelage 1" at about line 273 in the file


----------



## mikerr

Heh, yes thats the exact fix I made... 
I uploaded v0.91 with that fix included just 3 minutes before your post (probably as you were typing it)


----------



## FluffyLob

Ha! Patience was never my strongest point


----------



## Tim L

Anyone have any idea why the process keeps dying on mine?


----------



## Pugwash

mikerr said:


> v0.91


Can't wait for v0.99z


----------



## simbeav

v0.91 hasn't produced any suggestions for me 

It started off badly by really slowing down the UI again at the beginning, but that got better, and hasn't set up any suggestions on Threshold 1 and the log hasn't been touched since 00:37 last night (it's 08:25 now).

I can't get PS to work in Shell command on Tivoweb, so can't see if it is still running.


----------



## -MC-

last log showing here is - * Friday 00:03:55: Processing schedule*

and scheduled suggestions is empty


----------



## AMc

I've been getting no suggestions with threshold 1 using 0.8.
I have been getting stuttering every 30 mins and ps x shows it's running.
Trying 0.91 with theshold 128 now.


----------



## Rob Randall

Ran 0.9 last night and got some suggestions scheduled. Checked this morning and no new suggestions since last night. The log just stops and the process doesn't seem to be running any more. The last part of the log is


Code:


Thursday 17:44:01: Checking for free space
Thursday 17:44:02: Scanning todo list
Thursday 17:44:17: Scanning history list
Thursday 17:44:17: reading history list from disk
Thursday 17:44:17: Processing schedule
Thursday 18:16:33: Checking for free space
Thursday 18:16:34: Scanning todo list
Thursday 18:16:49: Scanning history list
Thursday 18:16:49: reading history list from disk
Thursday 18:16:49: Processing schedule
Thursday 18:49:04: Checking for free space
Thursday 18:49:05: Scanning todo list
Thursday 18:49:20: Scanning history list
Thursday 18:49:20: reading history list from disk
Thursday 18:49:20: Processing schedule
Thursday 19:21:37: Checking for free space
Thursday 19:21:37: Scanning todo list
Thursday 19:21:52: Scanning history list
Thursday 19:21:52: reading history list from disk
Thursday 19:21:52: Processing schedule
Thursday 19:54:08: Checking for free space
Thursday 19:54:08: Scanning todo list


----------



## Rob Randall

Ran 0.91 this morning and it only ran once. I used the startup command ./suggs.tcl -threshold 1

Here's the whole log


Code:


Friday 10:36:33: reading channel list from disk (cached)
Friday 10:36:33: Checking for free space
Friday 10:36:34: Scanning todo list
Friday 10:36:49: Scanning history list
Friday 10:36:49: reading history list from disk
Friday 10:36:49: Processing schedule

I had left the telnet session open and this was in it. Maybe it helps you identify why suggs stopped running.


Code:


Bash /var/hack #
Bash /var/hack #no such object: {CONFLICT err=errTmActiveLockConflict}
    while executing
"dbobj $seriesid get TmsId"
    ("foreach" body line 13)
    invoked from within
"foreach showing $showings {

                after 50
                set recordThis 0
                set fsid [dbobj $showing fsid]
                set starttime [dbobj $showing get Time]

 ..."
    ("uplevel" body line 10)
    invoked from within
"uplevel $body"
    invoked from within
"transaction {uplevel $body}"
    (procedure "RetryTransaction" line 6)
    invoked from within
"RetryTransaction {

        set schedlist [get_fsidbyprefix "/Schedule" "$stationfsid:$date:"]

        if { [ catch { set stationday [db $db openid [lindex ..."
    ("foreach" body line 9)
    invoked from within
"foreach thischannel $channelsReceived {

        set stationfsid [lindex $thischannel 0 ]
        set callsign [lindex $thischannel 1]

        if {$debug} { # putlog $cal..."
    (file "./suggs.tcl" line 358)

Another thing I have noticed is that suggs ignores any hard-padding that is on a Season Pass and schedules recordings over the hard-padding area. e.g. I have 2 minutes hard padding on the start of Coronation Street to appease SWMBO and prevent a show on before it using up the 2 minutes soft padding that Endpad would add to the start and therefore losing some of the programme. Today suggs has scheduled The One Show on BBC1 between 7pm and 7.30pm which is bound to affect the Coronation Street SP in some way as it should start at 7.28pm with the hard-padding. Not sure I want to risk finding out what will happen in this scenario, so I shall delete the suggestion.

The same thing is likely to happen over the weekend with my F1 Racing SP as I always add 90 minutes hard-padding to cope with incidents and overruns.

Sorry if this post sounds somewhat negative, I hope you see the above as observations more than criticism. I think suggs is great and is evolving nicely


----------



## wonderboy

I don't seem to have had any suggestions recorded since either 0.9 or 0.91 - Last were on Thursday or Friday. (threshold =1)


----------



## Rob Randall

Is it still running? It keeps shutting down for me.


----------



## -MC-

Rob Randall said:


> Is it still running? It keeps shutting down for me.


Me too - It wont last a full day - Mikerr where are you !


----------



## Tim L

-MC- said:


> Me too - It wont last a full day - Mikerr where are you !


Ah, glad it isn't just me then. Someone fire up the Mikerr signal!


----------



## mikerr

CONFLICT err=errTmActiveLockConflict

...is normally just a "too busy" message, but it seems to be triggered by the EnableTransactionHoldoff line ( speeds it up...)

So a minor update, mainly removing that line.


----------



## -MC-

Its been running since last nights update (.92) but Im getting this :

(Last bit of log shown)


Monday 05:32:17: Waiting for 30 mins
Monday 06:02:17: Checking for free space
Monday 06:02:18: Scanning todo list
Monday 06:02:33: Scanning history list
Monday 06:02:33: reading history list from disk
Monday 06:02:33: Processing schedule
{CONFLICT err=0x00030019}
{CONFLICT err=0x00030019}
Monday 06:04:49: Waiting for 30 mins
Monday 06:34:49: Checking for free space
Monday 06:34:49: Scanning todo list
Monday 06:35:08: Scanning history list
Monday 06:35:08: reading history list from disk
Monday 06:35:08: Processing schedule
{CONFLICT err=0x00030019}
{CONFLICT err=0x00030019}
Monday 06:37:22: Waiting for 30 mins
Monday 07:07:22: Checking for free space
Monday 07:07:22: Scanning todo list
Monday 07:07:42: Scanning history list
Monday 07:07:42: reading history list from disk
Monday 07:07:42: Processing schedule
{CONFLICT err=0x00030019}
Monday 07:09:51: Waiting for 30 mins
Monday 07:39:51: Checking for free space
Monday 07:39:51: Scanning todo list
Monday 07:40:23: Scanning history list
Monday 07:40:23: reading history list from disk
Monday 07:40:23: Processing schedule
{CONFLICT err=0x00030019}
Monday 07:42:43: Waiting for 30 mins


----------



## mikerr

(0x00030019)Thats a known "bug" in tivo's RetryTransaction.
You can only do about 50 database accesses inside a RetryTransaction, and some channels have too many programmes in the day.
It's not affecting the working on suggs too much -
E.g. it will not be seeing the last 2 programmes before midnight on bbc1, so will never schedule them as suggestions...


----------



## wonderboy

Hi Mikerr,

not sure if this will help, but using TivoWeb, in scheduled suggestions I see when suugs runs, it puts, say three entries there. But if I look an hour later, I see three completely different scheduled suggestions, so it looks to me like it's overwriting it's own scheduled suggestions before they can even be recorded, rather than adding to them.

This didn't happen prior to 0.8 I'm fairly sure.

cheers:up:

EDIT
hmmm, looking a little later I'm only seeing two of the previous three. Scratch that idea,


----------



## -MC-

wonderboy said:


> Hi Mikerr,
> 
> not sure if this will help, but using TivoWeb, in scheduled suggestions I see when suugs runs, it puts, say three entries there. But if I look an hour later, I see three completely different scheduled suggestions, so it looks to me like it's overwriting it's own scheduled suggestions before they can even be recorded, rather than adding to them.
> 
> This didn't happen prior to 0.8 I'm fairly sure.
> 
> cheers:up:
> 
> EDIT
> hmmm, looking a little later I'm only seeing two of the previous three. Scratch that idea,


Do you have endpad running ? , I seem to get quite a few logs like this -

*Monday 18:55:00 : Deleting suggestion {BBC News; Regional News; Weather} on BBC1 to make room for 60 seconds startpad of {The Gadget Show} on FIVE*

which explains where some of my suggestions disapear to


----------



## wonderboy

I do have endpad running, yes, but it never stopped suggs working until Friday.

Checked the logs and nothing untoward in there.


----------



## Z1000

Hi all,

first post so go easy on me.

I am trying to install the suggs file and following the instructions in post #44 I do not seem to have a hack directory on my tivo. The vars one it there.

So my question is what command do I need to issue to create the directory?

Thanks

Graham


----------



## ColinYounger

Get to a DOS command line and type:

*telnet [yourtivoipaddress]*

change to the var directory by typing:

*cd /var*

make the hack directory by typing:

*mkdir hack*

Finish by typing:

*quit*


----------



## Wonder_lander

Not a user of suggestions myself but I just wanted to say a big thanks to Mike for doing this for the good of the community!


----------



## simbeav

Mine still isn't recording suggestions.

Suggs doesn't disappear anymore, still getting entries in the log , but :-

When first run it produced three suggestions which never got recorded (Endpad even got to putting start padding on two of them, but they never got recorded).
A few more then appeared in Scheduled Suggestions, but never got recorded.

This morning, I've checked Scheduled Suggestions a few times, but there is nothing there.

Finally, since I've been running Suggs, Space used on TivoWeb has gone screwy. Getting entries like :-

Deleted 24 61327 MB 43.2&#37; -2:51:25 

I may be wrong, but I'm sure I've never seen a negative number here before.


----------



## mikerr

Another day, another version (0.94).

Fixed the problem with displayed duration of 0:00
It seems to read from the expiration time, and I'd set suggestions to expire immediately 
- before they had finished recording...

Pulled in some code from blocklists (and it shares the config files).
So you can put "Football" in blockgenres.txt to stop any football related suggestions,
or "Children" to stop all kids programme suggestions.
Also has the title blocklist from there too, read blocklist description for more.

The free space indicator problem on tivoweb may have been related to the duration bug
as mentioned above.


----------



## -MC-

This is running 0.94 -

Tuesday 12:52:51: reading channel list from mfs
Tuesday 12:52:54: Checking for free space
Tuesday 12:52:54: Scanning todo list
Tuesday 12:53:15: Scanning history list
Tuesday 12:53:15: Processing schedule
Tuesday 12:55:56: Waiting for 30 mins
Tuesday 13:25:56: Checking for free space
Tuesday 13:25:59: Scanning todo list
Tuesday 13:26:14: Scanning history list
Tuesday 13:26:15: reading history list from disk
Tuesday 13:26:15: Processing schedule
Tuesday 13:28:00: Waiting for 30 mins
*Tuesday 12:56:25: exiting*


----------



## Tim L

Not exiting here, but not doing much either. Am I right in thinking it won't delete old suggestions when it runs out of room? Either way, I've deleted a load so there's space free on the disk, but still nothing doing apart from this every half an hour:

Tuesday 19:06:36: Checking for free space
Tuesday 19:06:36: Scanning todo list
Tuesday 19:06:45: Scanning history list
Tuesday 19:06:45: reading history list from disk
Tuesday 19:06:45: Processing schedule
Tuesday 19:07:36: Waiting for 30 mins

Also, if I might ask another n00bish question - how does one kill the suggs process? I tried kill <PID> where the PID is the process ID gleaned via ps, but it doesn't appear to do anything.


----------



## -MC-

mikerr said:


> Another day, another version (0.94).
> 
> Fixed the problem with displayed duration of 0:00
> It seems to read from the expiration time, and I'd set suggestions to expire immediately
> - before they had finished recording...
> 
> *Pulled in some code from blocklists (and it shares the config files).
> So you can put "Football" in blockgenres.txt to stop any football related suggestions,
> or "Children" to stop all kids programme suggestions.
> Also has the title blocklist from there too, read blocklist description for more.*
> 
> The free space indicator problem on tivoweb may have been related to the duration bug
> as mentioned above.


Thats very usesful, should it have the */var/log/blocklist *log or is that only if you install blocklist.tcl ?

Also can you use the original Global Blocklist Tivoweb Module to edit the txt files ?


----------



## simbeav

Latest report !

0.94 looks the most stable for me, so far.

Hasn't bombed out - Been running since 20:10 yesterday.
Has recorded some suggestions and the duration etc. looks good.
Is still producing suggestions.

I am getting some messages in the Log that are a bit mysterious, though.

Wednesday 02:05:39: Already recorded 'Comic Strip' once today!
Wednesday 02:05:39: Already recorded 'South Park' once today!
Wednesday 02:07:55: Already recorded 'Comic Strip' once today!
Wednesday 02:07:55: Already recorded 'South Park' once today!


Neither programme had been recorded.

I haven't tried the "blocking" function yet, but :up: at the moment. Good work.


----------



## kitschcamp

For me the freezing has become very very minor. But the script seems to stop suggesting after about 12 hours or so. There's nothing in the logs to show it is terminated, and ps ax shows it's still running, but nothing happens. Killing the old process and starting it again seems to cure it.


----------



## Rob Randall

simbeav said:


> I am getting some messages in the Log that are a bit mysterious, though.
> 
> Wednesday 02:05:39: Already recorded 'Comic Strip' once today!
> Wednesday 02:05:39: Already recorded 'South Park' once today!
> Wednesday 02:07:55: Already recorded 'Comic Strip' once today!
> Wednesday 02:07:55: Already recorded 'South Park' once today!
> 
> Neither programme had been recorded.


When suggs schedules a suggestion the series id gets added to that day's history to prevent subsequent programmes in the same series being recorded on the same day. This stops multiple episodes of e.g. The Simpsons being recorded as suggestions. However, if you are watching LiveTV at the time the suggestion is due to record (or more specifically used the remote recently whilst watching LiveTV) then TiVo won't record the suggestion. Also, if you use Endpad then that can also cancel suggestions depending on your settings.

So even though the suggestion didn't record, suggs doesn't know it was cancelled by TiVo so it blocks all other suggestions for that series for the rest of that day.


----------



## mikerr

Spot on explanation!

It only tracks duplicate *scheduled *programmes since that required little/no overhead (cpu usage/runtime)

To track actual successfully *recorded *programmes requires more work for poor old tivo to do,
but easy to implement (I originally did it this way).


----------



## -MC-

mikerr said:


> Another day, another version (0.94).
> 
> Fixed the problem with displayed duration of 0:00
> It seems to read from the expiration time, and I'd set suggestions to expire immediately
> - before they had finished recording...
> 
> *Pulled in some code from blocklists (and it shares the config files).
> So you can put "Football" in blockgenres.txt to stop any football related suggestions,
> or "Children" to stop all kids programme suggestions.
> Also has the title blocklist from there too, read blocklist description for more.*
> 
> The free space indicator problem on tivoweb may have been related to the duration bug
> as mentioned above.


I'll try again with that question:

Thats very usesful, should it have the */var/log/blocklist* log or is that only if you install blocklist.tcl ?

Also can you use the original Global Blocklist Tivoweb Module to edit the txt files ?


----------



## mikerr

No, var/log/blocklist is only for the blocklist.tcl script.

...and yes, you can edit the config files with the original tivoweb module.


----------



## Rob Randall

Have had suggs 0.94 running since about 5pm yesterday and it's been running well producing good suggestions. However it's stopped running tonight. The last entries in the log are


Code:


Wednesday 17:04:22: Already recorded 'The Simpsons' once today!
Wednesday 17:04:22: Already recorded 'The Simpsons' once today!
Wednesday 17:04:28: Already recorded 'Friends' once today!
Wednesday 17:07:17: Waiting for 30 mins
Wednesday 17:37:17: Checking for free space
Wednesday 17:37:18: Scanning todo list

Is there a way to redirect error messages to the log file too so we might get an idea what is failing?


----------



## -MC-

Rob Randall said:


> Have had suggs 0.94 running since about 5pm yesterday and it's been running well producing good suggestions. However it's stopped running tonight. The last entries in the log are
> 
> 
> Code:
> 
> 
> Wednesday 17:04:22: Already recorded 'The Simpsons' once today!
> Wednesday 17:04:22: Already recorded 'The Simpsons' once today!
> Wednesday 17:04:28: Already recorded 'Friends' once today!
> Wednesday 17:07:17: Waiting for 30 mins
> Wednesday 17:37:17: Checking for free space
> Wednesday 17:37:18: Scanning todo list
> 
> Is there a way to redirect error messages to the log file too so we might get an idea what is failing?


Me too 

Wednesday 12:35:57: reading history list from disk
Wednesday 12:35:57: Processing schedule
Wednesday 12:36:30: Already recorded 'Frasier' once today!
Wednesday 12:36:30: Already recorded 'Frasier' once today!
Wednesday 12:36:42: Already recorded 'Frasier' once today!
Wednesday 12:36:42: Already recorded 'Frasier' once today!
Wednesday 12:37:14: Waiting for 30 mins
Wednesday 13:07:14: Checking for free space
Wednesday 13:07:14: Scanning todo list


----------



## kitschcamp

Same here:



Code:


Wednesday 14:17:48: Waiting for 30 mins
Wednesday 14:47:48: Checking for free space
Wednesday 14:47:49: Scanning todo list
Wednesday 14:48:37: Scanning history list
Wednesday 14:48:37: reading history list from disk
Wednesday 14:48:37: Processing schedule
Wednesday 14:48:40: Neighbours - cancelled (Soap genre blocklist)
Wednesday 14:51:21: Waiting for 30 mins
Wednesday 15:21:21: Checking for free space
Wednesday 15:21:21: Scanning todo list


----------



## Richard42

Mikerr this is great. 
I don't have a network connection ( yet ) but have transfered the file over the serial port via a telnet clint and it works a treat.
As I don't have tivoweb where will I find what suggestions are up and comming ?

Thanks for saving suggestions

Richard


----------



## wonderboy

0.94 has been working great for me since yesterday evening and is still running on both tivos.


----------



## Rob Randall

Richard42 said:


> As I don't have tivoweb where will I find what suggestions are up and comming ?


You can see scheduled suggestions in the regular TiVo ToDo list by using a BackDoor code.

Enable BackDoors by following instructions here.

Then press the following whilst in the ToDo List -

Thumbs Down, Thumbs Down, Thumbs Up, Instant Replay


----------



## Richard42

Thanks for that Rob. I've set the Backdoor, entered that code and get 3 dings, but can't see any suggestions in the list - maybe there aren't any at the moment - I'll try again later


----------



## Rob Randall

TiVo removes the suggs-generated suggestions from the scheduled list every so often and suggs tries to put them back every 30 minutes. So sometimes the scheduled suggestions list is blank, even in TiVoWeb. Nothing to worry about


----------



## Tim L

I've been running suggs with threshold 0 for the past couple of days for the sheer hell of it, and have noticed that the suggestions it creates override the endpad-added start padding on scheduled recordings. Is this expected behaviour? I can't remember how endpad behaved with normal suggestions.


----------



## Rob Randall

I think suggs just looks at the guide data start and end times for each entry in the ToDo list. It doesn't know about Endpad soft-padding as that only gets added a few minutes before it needs to.

If you have hard-padding defined in a Season Pass or WishList, then suggs ignores that too.

I don't know how difficult it would be to modify suggs to cope with this, but I suspect it's not trivial.


----------



## TCM2007

The hard padding bit is easy; EndPad less so, but EndPad is quite happy cancelling suggestions to add padding if its parameters are set that way so it shouldn't be needed.


----------



## Tim L

Actually, I'm not sure this is anything to do with suggs. ISTR the same thing happening before. I have the BBC news set to record from 9.00-9.30 every morning, with endpad adding 2 mins to the start and 5 mins to the end. What's happening is that sometime the 2 mins start padding isn't recorded. There's nothing being recorded beforehand that should get in the way. Weirder yet is that endpad's log claimes to have applied the padding:

Friday 07:45:00 : Woken up
Friday 07:45:00 : Deleting suggestion Pocoyo on FIVE to make room for 120 seconds startpad of {BBC News} on BBCNEWS
Friday 07:45:00 : Recording Rupert on FIVE (Suggestion) now
Friday 07:45:00 : Recording Scheduled End Time: 07:50
Friday 07:45:00 : Next recording is {BBC News} on BBCNEWS at 08:00
Friday 07:45:00 : Gap to next programme is 600 seconds
Friday 07:45:00 : Added 300 seconds end padding to Rupert on FIVE (Suggestion)
Friday 07:45:00 : Next end padding setting due 08:25
Friday 07:45:00 : Gap to previous recording is 300 seconds
Friday 07:45:00 : Added 120 seconds start padding to {BBC News} on BBCNEWS
Friday 07:45:00 : Next start padding setting due 08:25
Friday 07:45:00 : Next wake up will be 08:15

Sorry if this is a bit OT for this thread.


----------



## Rob Randall

TCM2007 said:


> The hard padding bit is easy


Over to you then mikerr


----------



## dickp

I've been running suggs for a few days now. Thanks for implementing this.

(I was wondering what I'd changed to break Tivo suggestions, till I got around to looking on here a week or so ago...)

The latest version has worked pretty well here. One thing I've noticed though, is it has a tendency to repeatedly record something when the showings are on different days. In one case it recorded a film, when the same film (same channel too) was still in 'Now Playing'!

Would it be possible to do the 'already recorded within 28 days' or 'Now Playing' check before picking something to record?


----------



## -MC-

Works great but I still have this problem where it stops working, usually around 3 -4 in the morning :

Saturday 05:13:20: Checking for free space
Saturday 05:13:21: Scanning todo list
Saturday 05:13:36: Scanning history list
Saturday 05:13:36: reading history list from disk
Saturday 05:13:36: Processing schedule
Saturday 05:13:41: Already recorded 'How Do They Do It?' once today!
Saturday 05:13:42: Already recorded 'How Do They Do It?' once today!
Saturday 05:14:29: Waiting for 30 mins
Saturday 05:44:30: Checking for free space
Saturday 05:44:31: Scanning todo list

Any 'suggestions' Mikerr


----------



## simbeav

Suggs working fine now. Mine has been running non-stop since last Tuesday (almost a week now).

Two quick questions :-

1. The log file is getting a bit big now (showing as 115472 on Tivoweb). Could this become a problem ? Will running Suggs again close the old process and start a new log or do I have to close the old one first ?

2. This morning Suggs recorded 2 Time Teams, one immediately after the other. Up until then, "only record one showing a day" had been working. Not a problem, especially as they were different episodes, but just wondering why. Is it because they were on different channels ?


----------



## simbeav

Not a bad run, Suggs seems to have given up the ghost at last. Running from Oct 14th 20:10 until Oct 22 08:29 (B.S.T). 
Not sure if it was a coincidence, but it seemed to stop as Tivo was doing all it's work after the daily call.

Wednesday 06:55:11: Processing schedule
Wednesday 06:59:58: Waiting for 30 mins
Wednesday 07:29:57: Checking for free space
Wednesday 07:29:58: Scanning todo list

Then nothing.


----------



## -MC-

simbeav said:


> Not a bad run, Suggs seems to have given up the ghost at last. Running from Oct 14th 20:10 until Oct 22 08:29 (B.S.T).
> Not sure if it was a coincidence, *but it seemed to stop as Tivo was doing all it's work after the daily call.*
> 
> Wednesday 06:55:11: Processing schedule
> Wednesday 06:59:58: Waiting for 30 mins
> Wednesday 07:29:57: Checking for free space
> Wednesday 07:29:58: Scanning todo list
> 
> Then nothing.


Makes me wonder if that's what stops mine running
That a good run though, mine has never lasted a full day - stopping in the early hours..... *Mikerr where are you ! *


----------



## Tim L

Mine's been running for over a week now without issue. I'm running with threshold 0, whereas previously I'd used threshold 1 and it barely lasted a day. I think that was a different version though so it's most likely a coincidence.


----------



## wonderboy

Mine has been running fine on two tivos since 0.94. There are soooo many suggestions now, it's actually better than before they stopped working.

Only problem is there is still a bit of stuttering but I haven't been able to tell if it's the sat box or the tivo. The one on freeview seems to work perfectly.


----------



## mesaka

This has been running for a couple of days without any issues - its really great to have suggestions back again!

Something that might be considered for any future upgrade. Yesterday eastenders was recorded on BBC1 in its early evening slot. The same episode was already planned to be recorded (and was later recorded) on BBC3 late evening. Is there any way to ensure that these kinds of repeats can't occur?

Thanks once again for the modules development!


----------



## mikerr

simbeav said:


> 1. The log file is getting a bit big now (showing as 115472 on Tivoweb). Could this become a problem ? Will running Suggs again close the old process and start a new log or do I have to close the old one first ?


Yes starting a new copy will erase logs and kill the old process after a minute.


> This morning Suggs recorded 2 Time Teams, one immediately after the other. Up until then, "only record one showing a day" had been working. Not a problem, especially as they were different episodes, but just wondering why. Is it because they were on different channels ?


The "record only one showing per day" does need some work, I think i'll make it read the now-playing listing in the next version. It has to partially read that to find free space anyway.


----------



## -MC-

Mikerr

Any idea why some of us find that suggs only runs for a short while before clapping out, would be nice to have something you could start with rc.sysinit.author and just leave to do its bit.


----------



## mikerr

Wish I knew 
The only error I'm getting is the 0x00003019 error, but that doesn't stop it running.


----------



## wonderboy

mikerr,

just tried running .95 and got this:-

bash-2.02# /var/hack/suggs.tcl -threshold 1
bash-2.02# 
bash-2.02# 
bash-2.02# no such object: 
while executing
"dbobj $series get Title"
("uplevel" body line 18)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 6)
invoked from within
"RetryTransaction {
set recording [db $db openid $fsid]
set state [dbobj $recording get State]
set selectiontype ..."
("uplevel" body line 3)
invoked from within
"uplevel $body"
invoked from within
"ForeachMfsFile fsid name type "/Recording/DiskUsed/10" "" {

RetryTransaction {
set recording [db $db openid $fsid]
set state ..."
(procedure "get_freespace" line 8)
invoked from within
"get_freespace 2"
(file "/var/hack/suggs.tcl" line 447)

Not sure how bad this is... but suggs doesn't appear to be running using "ps ax". Same result on both my tivos.

Reverting to 0.94 (most usefully included in zip) seems to be working as normal and is listed using "ps ax".

BTW one of my tivos does not appear to have the "top" command - any idea why?

ta.


----------



## mikerr

That error message means the show has no series object 
- has it been been imported from a PC ? 
Anyway, the code has been updated now.

Version 1.00 ! 

Internally, it works a little differently now;
Previously it set recordins while scanning channels which meant it favoured lower channel numbers (as the todo list filled up).

It now reads a batch of all upcoming programmes into a list, then decides which to record based on thumbs, and genre information.

It also now has a bit more intelligence with 0-thumbed shows:
it builds a list of the genres you have recorded in now playing 
- so it can see you like films, scifi or whatever - 
then builds a score for each potential suggestion based on that, and will favour suggestions which match those genres. 


I've also reduced the amount of work done in each transaction, which should help it be more reliable!


----------



## Tim L

Sounds great! Giving it a whirl now.


----------



## nickf

Great module!

Something I've noticed with v1.00 (it may also have happened in previous versions).

2 suggestions today were recorded in Best - my default recording quality is High, and endpad is set to change Suggestions to Medium.

Also - a suggestion was immediately followed by a SP recording, and the suggestion should have been cancelled (by endpad) to allow start padding, but it wasn't.

I think this is because the suggestion was scheduled, and then started, before endpad came out of its 30 min sleep. From the endpad log, it cancelled the suggestion once, but it was re-added to the suggestion list, probably just before it started, so wasn't removed (or changed to Medium) before it started.

So ideally, suggs should set the suggestion quality to that set in endpad, or failing that, the default recording quality. And maybe it shouldn't suggest anything starting in the next 30 mins, to give endpad a chance to run and change quality / cancel as necessary? (depends how often TiVo removes the full Suggestion list!)


----------



## Tim L

nickf said:


> Great module!
> 
> Something I've noticed with v1.00 (it may also have happened in previous versions).
> 
> 2 suggestions today were recorded in Best - my default recording quality is High, and endpad is set to change Suggestions to Medium.
> 
> Also - a suggestion was immediately followed by a SP recording, and the suggestion should have been cancelled (by endpad) to allow start padding, but it wasn't.
> 
> I think this is because the suggestion was scheduled, and then started, before endpad came out of its 30 min sleep. From the endpad log, it cancelled the suggestion once, but it was re-added to the suggestion list, probably just before it started, so wasn't removed (or changed to Medium) before it started.
> 
> So ideally, suggs should set the suggestion quality to that set in endpad, or failing that, the default recording quality. And maybe it shouldn't suggest anything starting in the next 30 mins, to give endpad a chance to run and change quality / cancel as necessary? (depends how often TiVo removes the full Suggestion list!)


That sounds like the behaviour I was describing in an earlier version upthread.

Also, v1.00 seems to be causing a lot of stuttering here. It was barely noticeable in v0.94 - presumably this is caused by the extra work being done? Would it be possible to have suggs run just once a day, produce a list of suggestions which it keeps on disk somewhere, then just refreshes the main suggestions list (the one Tivo keeps wiping) every half an hour? I gather it would also need to check for other activity at this time, but it would be better if all the donkey work could be done in one go in the wee-small hours. Perhaps even have the time to run set as a parameter. I made a similar suggestion a while back, but wasn't sure whether it was ignored because it was bollocks or not.


----------



## Rob Randall

I made some tweaks to suggs 1.00 on my TiVo as I was getting a lot of stuttering. I also made a change to stop it trying to record any suggestions in the next 30 minutes so that EndPad gets a look-in. I had already made these changes in 0.94, so I just made similar changes in 1.00.

To prevent any suggestions in the next 30 minutes, this code


Code:


if { $starttime > $time]  || $date > $today }  {

 I changed to


Code:


if { $starttime > [ expr $time + 1800]  || $date > $today }  {

To reduce/remove the stuttering I added some extra delays in each of the main loops as follows


Code:


foreach item $blockgenres {
after 40




Code:


foreach oldrec $historylist {
after 40




Code:


foreach todo $todolist {
after 40

These changes seem to do the job for my TiVo. Your mileage may vary.
I haven't tried to find the optimum setting for the delays, but a value of 40 doesn't slow the whole process down too much and the removal of picture stuttering makes it worth it.


----------



## mikerr

Rob Randall said:


> I made some tweaks to suggs 1.00 on my TiVo as I was getting a lot of stuttering.


All good stuff :up::up:

I did take some of the pauses out, since I'm not getting stuttering at all ...


> I also made a change to stop it trying to record any suggestions in the next 30 minutes so that EndPad gets a look-in.


Do you still get suggestions working at all with that?

Tivo often wipes the list every half hour or so, which is why suggs is re-running every 30 mins.

So you may never see a suggestion actually get to the recorded stage with that change. ?



Tim L said:


> Would it be possible to have suggs run just once a day, produce a list of suggestions which it keeps on disk somewhere, then just refreshes the main suggestions list (the one Tivo keeps wiping) every half an hour?


 1.00 now separates the guide processing(heavy) from the suggestion setting in the code, but they run immediately one after another at present.
It would be easy enough to do the guide processing only once per day now.



nickf said:


> So ideally, suggs should set the suggestion quality to that set in endpad, or failing that, the default recording quality.


It is set to record in best ATM (does anyone use anything else  ) - but yes, I'll change to the default quality. Maybe have a config file too.


----------



## verses

mikerr said:


> I did take some of the pauses out, since I'm not getting stuttering at all ...


I'm not running Suggs, but I am following this thread with interest 

Just a 'suggestion' but could this performance difference be down to people who have Cachecards with 512MB of RAM and those with no cachecard or those using lesser amounts of RAM?

Cheers,

Ian


----------



## Tim L

verses said:


> I'm not running Suggs, but I am following this thread with interest
> 
> Just a 'suggestion' but could this performance difference be down to people who have Cachecards with 512MB of RAM and those with no cachecard or those using lesser amounts of RAM?
> 
> Cheers,
> 
> Ian


Don't think so - I've got a full cachecard here and I'm getting stuttering.


----------



## Rob Randall

mikerr said:


> Do you still get suggestions working at all with that?
> 
> Tivo often wipes the list every half hour or so, which is why suggs is re-running every 30 mins.


Yes, I do get loads of suggestions, even with the first 30 minutes excluded  I do see TiVo dropping some of the suggestions, but then suggs puts some new ones in. I did change suggs to run every 20 minutes so that it had chance to fill any new gaps, and I also changed one of your debug lines to always output what was actually scheduled to the log, so I could see what was being dropped and when.

Even with my extra delays in 1.00 I'm still seeing a fair amount of stuttering. I've gone back to my modified 0.94 for now until I have more time to look at the 1.00 code.

Another thing I've been thinking about is trying to get the suggs-generated suggestions added into the MFS Recording/Pending area instead of Recording/Active which is where suggs puts them at the moment. I suspect if they went in the Pending area then the TiVo might not wipe them as this is where it puts (or used to put!) it's own suggestions before it scheduled them. I haven't had much time to look into this yet though :down:


----------



## simbeav

I've been running version 1 since last night with Threshold 1 and it seems a bit limited compared to previous versions.

It seems to just want to record the same Time Team episode and some The Good Lifes over and over again. I haven't seen any duplicate programme messages in the log, when previous versions used to have loads.

I'll have to try the blocklist to see if it can get over thinking that I only ever watch Time Team and The good Life !


----------



## mikerr

Small update:
delays added back in, fixed the duplicate bug 
(programmes that had spaces in titles weren't checked) 
also now uses tivo's internal database of genre thumbs for programmes without any explicit thumbs.


----------



## Tim L

Cheers, will see how it does.


----------



## Rob Randall

Thanks mikerr. I'll see how I get on with 1.01


----------



## nickf

Hi mikerr - just installed 1.01 - it has reported that it won't record something: 


> Tuesday 12:45:55: Already recorded '{Police, Camera, Action!}' (in now playing)


But there isn't a showing in Now Showing today - there is one from yesterday, and there is one scheduled for today though. I noticed the code says:


> # Don't record the same series twice in one day
> # So won't record 5 episodes of simpsons each day!


Is this expected behaviour?


----------



## Rob Randall

I have to agree with nickf - 1.01 does seem overzealous to not re-record things even if the last recording of the same series was sometime last week. It would be good if it only checked Now Playing for repeats within the last day or so.

I also made my '30-minute exclusion' change in 1.01 and have it running every 20 minutes as I did before. Apart from the above mentioned problem this version seems to be running well and EndPad is spotting and handling all the suggestions correctly. I'm not seeing any stuttering either now that you've put your delays back in


----------



## mikerr

It currently won't record another episode of any programme (series) which is still present in now playing, 
regardless of when it was recorded.
Personally I prefer it that way now, but it was initially an mistake not doing the day check... so it'll be put in with a configurable day range.


----------



## nickf

Hmm... the only things I seem to get suggested, are programmes I already have season passes to (and there's usually still at least one episode in Now Playing). I've tried running without -threshold 1, and that's at least suggested something new... 

Am I right in thinking that everything that's season passed, is automatically given 1 thumb up?


----------



## Tim L

mikerr said:


> It currently won't record another episode of any programme (series) which is still present in now playing,
> regardless of when it was recorded.
> Personally I prefer it that way now, but it was initially an mistake not doing the day check... so it'll be put in with a configurable day range.


Cool - will one of the options be zero, effectively switching the constraint off?


----------



## Rob Randall

Yes nickf, everything you tell TiVo to record gets an implied thumbs-up. This is one of the best ways for TiVo to learn what sort of programmes you like by seeing what you choose to record.

To get a good spread of programmes recorded by suggs you need to go through the guide and give other programmes you like (but don't normally record) a :up: or :up::up:. If there are programmes that you have a Season Pass for but don't want suggs to record any other showings. then remove the implied thumbs-up on that show by pressing :down:


----------



## dickp

mikerr said:


> It currently won't record another episode of any programme (series) which is still present in now playing,
> regardless of when it was recorded.
> Personally I prefer it that way now, but it was initially an mistake not doing the day check... so it'll be put in with a configurable day range.


Would it be possible for the check to match series and episode before deciding to not record?

I don't mind it filling my disk with old eps of eg "Time Team" but I don't need it recording an episode, then straight away recording it again on the +1 channel


----------



## nickf

Has anyone got cron to start suggs successfully? I've tried scheduling it - it seems to start the process, but the log file just gets blanked, and nothing is written to it, so I have no idea what it's doing!


----------



## nickf

suggs has died on me - and I still had the telnet session open. The error in the session started with:


> no such object: {CONFLICT err=errTmActiveLockConflict}
> while executing
> "dbobj $programId get Title"
> ("uplevel" body line 10)
> invoked from within
> "uplevel $body"


Now *errTmActiveLockConflict* occasionally happens in TiVoWeb when it times out due to other activity on the box (ie recording). Does this help in debugging? Can it be caught and retried?


----------



## Rob Randall

dickp said:


> Would it be possible for the check to match series and episode before deciding to not record?


Version 1.01 already seems to be doing this - at least for me it is  If a programme has episode data then suggs is scheduling multiples of the same series but only if the particular episode is not already in the NPL. So I am seeing multiple copies of Simpsons, Futurama, Time Team, etc in my suggestions, but not the same episodes.


----------



## -MC-

Since changing the config file on endpad to a simple global s1 e3, I've had a run of 9 days using v0.94, but i'ts finally packed up now . interestingly the *last log entry is 3 minutes before the daily call*  If only I knew how to fix it !


----------



## Rob Randall

I changed my startup command for suggs 1.01 to this


Code:


/var/hack/suggs.tcl -threshold 1 -console > /var/log/suggs.log 2>&1 &

 so that stderr messages go to the log file too.

Suggs stopped running early this morning, these were the last entries in the log


Code:


Sunday 05:08:42: Checking for free space
Sunday 05:09:02: Scanning todo list
no such object: {CONFLICT err=errTmActiveLockConflict}
    while executing
"dbobj $programId get Title"
    ("uplevel" body line 10)
    invoked from within
"uplevel $body"
    invoked from within
"transaction {uplevel $body}"
    (procedure "RetryTransaction" line 6)
    invoked from within
"RetryTransaction {
				set obj [db $db openid $fsid]
				set selectionType [dbobj $obj get SelectionType]

				regexp {([0-9]*)/(.*)} [dbobj $obj gett..."
    ("uplevel" body line 7)
    invoked from within
"uplevel $body"
    invoked from within
"ForeachMfsFile fsid name type "/Recording/Active" "" {

	if {$type == "tyDb"}  {
		after 50
		if { [regexp {^4} $name] || [regexp {^3} $name] } { 
			..."
    (procedure "refresh-todolist" line 4)
    invoked from within
"refresh-todolist "
    (file "./suggs.tcl" line 529)

My last successful daily call was 01:35pm, 2-Nov-08 so could have had no effect.


----------



## -MC-

Rob Randall said:


> I changed my startup command for suggs 1.01 to this
> 
> 
> Code:
> 
> 
> /var/hack/suggs.tcl -threshold 1 -console > /var/log/suggs.log 2>&1 &
> 
> so that stderr messages go to the log file too.
> 
> Suggs stopped running early this morning, these were the last entries in the log
> 
> 
> Code:
> 
> 
> Sunday 05:08:42: Checking for free space
> Sunday 05:09:02: Scanning todo list
> no such object: [B]{CONFLICT err=errTmActiveLockConflict}[/B]
> while executing
> "dbobj $programId get Title"
> ("uplevel" body line 10)
> invoked from within
> "uplevel $body"
> invoked from within
> "transaction {uplevel $body}"
> (procedure "RetryTransaction" line 6)
> invoked from within
> "RetryTransaction {
> set obj [db $db openid $fsid]
> set selectionType [dbobj $obj get SelectionType]
> 
> regexp {([0-9]*)/(.*)} [dbobj $obj gett..."
> ("uplevel" body line 7)
> invoked from within
> "uplevel $body"
> invoked from within
> "ForeachMfsFile fsid name type "/Recording/Active" "" {
> 
> if {$type == "tyDb"}  {
> after 50
> if { [regexp {^4} $name] || [regexp {^3} $name] } {
> ..."
> (procedure "refresh-todolist" line 4)
> invoked from within
> "refresh-todolist "
> (file "./suggs.tcl" line 529)
> 
> My last successful daily call was 01:35pm, 2-Nov-08 so could have had no effect.


So it looks like the timing of mine stopping was just coincidence

I see nickf has the same error as you -

sorry I dont know much about hacking but doesn't that just mean that the database was busy at the time and so crashed the program -

I see this in the logs of irblast, but that retrys until its successful ie -

Starting irblast 1.2.1...
Wednesday 20:32:09 : Opening Log file /var/log/irblast.log
*retrying after errTmActiveLockConflict ...*
Got IR codes for {BSkyB - England} IRcode: 20017
Starting main loop...
Key 0 Clear Clear to disable
Key 1 Clear Clear to reenable
Key 8 Clear Clear or 'touch /tmp/blastquit' to quit.

.


----------



## mikerr

It is a database busy message, which can be caught,
but sometimes it also causes a transaction to fail totally, and you get the no such object error.

V1.02 is uploaded, and continues running after these errors.


----------



## -MC-

mikerr said:


> It is a database busy message, which can be caught,
> but sometimes it also causes a transaction to fail totally, and you get the no such object error.
> 
> V1.02 is uploaded, and continues running after these errors.


Thats great mikerr, I'll give it a go :up:


----------



## nickf

Yup sounds good, I'll test it out. Although 1.01 had been running fine since Friday night (interestingly I haven't watched much on TiVo - I wonder if you get more errTmActiveLockConflict when you're actively using TiVo).

Couple of requests / suggestions - can we have an option to output more detail to the log? I tend to edit and set debug to true, and uncomment all the logging contained in *if {$debug} * calls.

Also - the readme and bugs list in the distribution are a little out of date, would be good for checking what's changed if they were updated 

Thanks again for working on this Mike.


----------



## Rob Randall

mikerr said:


> V1.02 is uploaded, and continues running after these errors.


Thanks mikerr


----------



## nickf

I was still getting slight stuttering on playback every 30 mins when the schedule is processed. I think this is because we need a slight pause in the *foreach prog $allprogs {* loop (line 646), so I've added a *after 100* at the start of that (currently it only pauses within the *if { $recordThis } {* loop, ie if really is going to schedule the suggestion).

I've just tried this, and first time through (ie 30 mins after starting), it didn't seem to stutter at all...


----------



## mikerr

Delays really should be added just before a RetryTransaction 
as stuttering is caused by tivo not getting enough cpu/database time (transactions lock tivo out of the database).

Try increasing the existing delay value from 100 to 500.


----------



## Rob Randall

1.02 seems to like scheduling suggestions that were on earlier today i.e. they are in the past. It doesn't seem to be causing any problems except there are many entries in tverr like the following -


Code:


Nov  4 01:11:23 (none) Scheduler[162]: Scheduled Recording ends before it starts
Nov  4 01:11:24 (none) Scheduler[162]: Scheduled recording expires before it starts
Nov  4 01:11:24 (none) last message repeated 17 times
Nov  4 01:11:27 (none) Scheduler[162]: Scheduled Recording ends before it starts
Nov  4 01:11:27 (none) Scheduler[162]: Scheduled recording expires before it starts
Nov  4 01:11:27 (none) last message repeated 17 times


----------



## -MC-

First *errTmActiveLockConflict* since running v1.02,

but i see its gone to *Tuesday 10:38:25: Waiting for 30 mins* instead of retrying again - is that right ?

Tuesday 10:07:19: Waiting for 30 mins
Tuesday 10:37:19: Checking for free space
Tuesday 10:37:25: Error... no such object: {CONFLICT err=}
while executing
"dbobj $program get Title"
("uplevel" body line 15)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 6)
invoked from within
"RetryTransaction {
set recording [db $db openid $fsid]
set state [dbobj $recording get State]
set seltype ..."
("uplevel" body line 3)
invoked from within
"uplevel $body"
invoked from within
"ForeachMfsFile fsid name type "/Recording/DiskUsed/10" "" {
after 50
RetryTransaction {
set recording [db $db openid $fsid]
s..."
(procedure "get_freespace" line 9)
invoked from within
"get_freespace 2"
Tuesday 10:37:25: ... retrying in a minute
Tuesday 10:38:25: Waiting for 30 mins


----------



## mikerr

-MC- said:


> First *errTmActiveLockConflict* since running v1.02,
> but i see its gone to *Tuesday 10:38:25: Waiting for 30 mins* instead of retrying again - is that right ?


That's ok - the point is that it continues running for the next loop in 30 mins. So it'll run without crashing now.


----------



## nickf

Rob Randall said:


> 1.02 seems to like scheduling suggestions that were on earlier today i.e. they are in the past. It doesn't seem to be causing any problems except there are many entries in tverr like the following -
> 
> 
> Code:
> 
> 
> Nov  4 01:11:23 (none) Scheduler[162]: Scheduled Recording ends before it starts
> Nov  4 01:11:24 (none) Scheduler[162]: Scheduled recording expires before it starts
> Nov  4 01:11:24 (none) last message repeated 17 times
> Nov  4 01:11:27 (none) Scheduler[162]: Scheduled Recording ends before it starts
> Nov  4 01:11:27 (none) Scheduler[162]: Scheduled recording expires before it starts
> Nov  4 01:11:27 (none) last message repeated 17 times


Yes I noticed this - looks like it builds the list of what to schedule at the first run after midnight, then keeps trying to schedule these showings for the rest of the day, even when we've passed them. It confused me but it seemed to do no harm. (Mike, might be an idea to print the date in the SCHEDULE logging line - I tried but couldn't get it to format into a Julian date)


----------



## simbeav

Has anybody else been having problems with blocklists with the last couple of versions of SUGGS ? 
My blockgenre is still working, but I'm getting inundated with Time Team's again. 
Is anybody else using blocklists and are they working ? Or have I broken my blocklist somehow ?


----------



## mesaka

Hi

Does anyone happen to have a version of 0.94 that I could have? That was running pretty well for me. However, I deleted it (doh!) and with 1.02 the stuttering is so bad I have had to disable the hack.


----------



## carl newman

Here you go..... i'm currently using this version and think its great! Thanks Mikerr


----------



## mesaka

Thanks!


----------



## dbradbu3

mikerr said:


> V1.02 is uploaded, and continues running after these errors.


Thanks Mikerr! You have really done a stunner here.
I have been running V1.02 since Thursday night and it hasn't died yet, I have a list full of suggestions and no noticeable freezes just yet. 

We have just taken delivery of number 2 son (6 weeks old) and it's a god send to have a few suggs down there on the list when you just want something brainless to watch while you do the 2 / 3 / 4 am feeds 

Thanks again, and keep up the fab work :up:


----------



## kitschcamp

mesaka said:


> with 1.02 the stuttering is so bad I have had to disable the hack.


Have to say it's the same here, prior versions were fine (esp 0.94), but 1.02 does cause regular freezes.


----------



## simbeav

I've reverted to 0.94 as well. 
No noticable stuttering or freezing with 1.02, but I don't like the over zealous rejecting any title already in Now Playing and there definitely is a problem with blocklists. 1.02 was always wanting to record Time Team and The good Life despite them both being in my Blocklist.txt. 0.94 is rejecting them correctly.
Still a great module though :up:


----------



## Z1000

I've reverted to 0.94 as well.

Version 1.02 was not reliable for me. 0.94 is running well at the moment.

Great module even so, thank you

Graham


----------



## nickf

Well just to buck the trend - 1.02 is the most stable version I've had. It's been running for 5 days, and freezes don't seem as bad.


----------



## Rob Randall

I'm using 1.02, but I added some delays into the code as I was seeing a lot of picture glitches. Interestingly I was also seeing glitches in 0.94 until I added extra delays. The only other mod I made was to stop it trying to record programmes that were on earlier today.

Otherwise 1.02 has been the best version for me so far 

I can't comment on the blocklist features as I don't use them.


----------



## -MC-

Rob Randall said:


> I'm using 1.02, but I added some delays into the code as I was seeing a lot of picture glitches. Interestingly I was also seeing glitches in 0.94 until I added extra delays. The only other mod I made was to stop it trying to record programmes that were on earlier today.
> 
> Otherwise 1.02 has been the best version for me so far
> 
> I can't comment on the blocklist features as I don't use them.


Rob,

Could you tell me what mods you've made to put in the delays as I'm getting a lockup and blocky picture briefly every half hour.

I've been using your startup command:

*/var/hack/suggs.tcl -threshold 1 -console > /var/log/suggs.log 2>&1 &*

but for some reason found that it stopped irblast from starting 

Thanks :up:


----------



## Rob Randall

Looks like I made a few more mods than I remember  As well as the extra delays I made a couple of scheduler changes. I also made it run every 20 minutes to compensate for the extra delays.

Anyway I've attached my modded version. I'm not sure all the delays are necessary, but it does the job for me (very slight sound blip when it loads the schedule cache from disk, but not that noticeable).

My startup command is now

*/var/hack/suggs.tcl -threshold 1 -daysback 5 -console > /var/log/suggs.log 2>&1 &*

Not sure how this would affect irblast  Maybe if we saw your rc.sysinit.author it would give some clues.


----------



## -MC-

Rob Randall said:


> Looks like I made a few more mods than I remember  As well as the extra delays I made a couple of scheduler changes. I also made it run every 20 minutes to compensate for the extra delays.
> 
> Anyway I've attached my modded version. I'm not sure all the delays are necessary, but it does the job for me (very slight sound blip when it loads the schedule cache from disk, but not that noticeable).
> 
> My startup command is now
> 
> */var/hack/suggs.tcl -threshold 1 -daysback 5 -console > /var/log/suggs.log 2>&1 &*
> 
> Not sure how this would affect irblast  Maybe if we saw your rc.sysinit.author it would give some clues.


Thanks for that Rob, I'll give it a go :up:

my rc.sysinit.author file :

#!/bin/bash
/var/hack/tivoweb-tcl/tivoweb
/var/hack/tytools/tserver -s /var/hack/tytools/NowShowing.tcl &
/var/hack/ir/irblast.tcl - forcestart >> /dev/null &
/var/hack/endpad.tcl -auto >> /dev/null &
/var/hack/suggs.tcl -threshold 1 -console > /var/log/suggs.log 2>&1 &

.


----------



## jonphil

sorry if it's already been covered, but how do I stop the running copy so I can downgrade to 0.94 version as 1.02 is stuttering so bad I'm missing 30secs of audio in recordings and it's getting annoying. the other version didn't seem to do it.


----------



## nickf

Just start the new one, that will make the old one stop.

Or remove /var/log/suggspid.xxxx


----------



## verses

-MC- said:


> my rc.sysinit.author file :
> 
> #!/bin/bash
> /var/hack/tivoweb-tcl/tivoweb
> /var/hack/tytools/tserver -s /var/hack/tytools/NowShowing.tcl &
> /var/hack/ir/irblast.tcl - forcestart >> /dev/null &
> /var/hack/endpad.tcl -auto >> /dev/null &
> /var/hack/suggs.tcl -threshold 1 -console > /var/log/suggs.log 2>&1 &


I see you have a space in your irblast startup line between the '-' and the 'forcestart'. I don't use IRBlast, but I looking at the support page for it it doesn't look like there should be one.
Also I personally would make sure that every line ended ">>/dev/null 2>&1 &".

So I would change the file to be as follows;


Code:


#!/bin/bash
/var/hack/tivoweb-tcl/tivoweb >>/dev/null 2>&1 &
/var/hack/tytools/tserver -s /var/hack/tytools/NowShowing.tcl >>/dev/null 2>&1 &
/var/hack/ir/irblast.tcl -forcestart >>/dev/null 2>&1 &
/var/hack/endpad.tcl -auto >>/dev/null 2>&1 &
/var/hack/suggs.tcl -threshold 1 -console > /var/log/suggs.log >>/dev/null 2>&1 &

Cheers,

Ian

PS: I haven't included any of the change to the Suggs startup line which were suggested above. I thought I'd leave that up to you as I don't use Suggs yet 

PPS: I'm pretty sure that the #!/bin/bash is not needed at the start of the file, but I left it in as I don't think it's doing any harm.


----------



## mikerr

Well version 1.03 is uploaded, and I think all the stuttering problems should be fixed now the following line has been added:


Code:


setpri fifo 1

..and delays could probably be removed now too.


----------



## -MC-

verses said:


> I see you have a space in your irblast startup line between the '-' and the 'forcestart'. I don't use IRBlast, but I looking at the support page for it it doesn't look like there should be one.
> Also I personally would make sure that every line ended ">>/dev/null 2>&1 &".
> 
> So I would change the file to be as follows;
> 
> 
> Code:
> 
> 
> #!/bin/bash
> /var/hack/tivoweb-tcl/tivoweb >>/dev/null 2>&1 &
> /var/hack/tytools/tserver -s /var/hack/tytools/NowShowing.tcl >>/dev/null 2>&1 &
> /var/hack/ir/irblast.tcl -forcestart >>/dev/null 2>&1 &
> /var/hack/endpad.tcl -auto >>/dev/null 2>&1 &
> /var/hack/suggs.tcl -threshold 1 -console > /var/log/suggs.log >>/dev/null 2>&1 &
> 
> Cheers,
> 
> Ian
> 
> PS: I haven't included any of the change to the Suggs startup line which were suggested above. I thought I'd leave that up to you as I don't use Suggs yet
> 
> PPS: I'm pretty sure that the #!/bin/bash is not needed at the start of the file, but I left it in as I don't think it's doing any harm.


Thank Ian,

I'll give that a go :up:

Never noticed the "- " gap


----------



## Rob Randall

mikerr said:


> Code:
> 
> 
> setpri fifo 1
> 
> ..and delays could probably be removed now too.


Correct. The added delays no longer seem to be required 

Does the setpri command used in suggs only affect it's own process priority or all subsequently started processes? I have *setpri ts 0 $$* at the start of my rc.sysinit.author file.


----------



## mesaka

A question - would I still get some stuttering on old programmes that were recorded on versions prior to 1.03? 

I ask as I installled 1.03 yesterday and later watched a show I had recorded with a previous version installed. I got stuttering still (roughly every 20 minutes) albeit not as bad as previously. While I was watching the prerecorded programme another was recording so I suppose the processer was under some strain.


----------



## kitschcamp

Hmm. This new version doesn't seem to be quite right. Since it started, it's not recorded a single suggestion. The logs seem to suggest why.



Code:


Friday 09:20:47: ... retrying later
Friday 09:21:47: Waiting for 30 mins
Friday 09:51:48: Checking for free space
Friday 09:52:09: Scanning todo list
Friday 09:52:21: Scanning now playing
Friday 09:52:21: Reading schedule list from disk (cached)
Friday 09:52:22: SCHEDULE {Martial Law} (128 / 102) on BRAVOD1 at 14:00
Friday 09:52:23: Error... can't open object (errDbNotFound)

while executing
"db $db openidconstruction $showingobjid $subobjid"
("uplevel" body line 2)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 6)
invoked from within
"RetryTransaction {
set showing [db $db openidconstruction $showingobjid $subobjid]

if { [catch {set recording [db $db create Recording] }..."
("foreach" body line 52)
invoked from within
"foreach prog $allprogs {
set recordThis 1
set thumbData [lindex $prog 0]
set genreThumb [lindex $prog 1]
set title [lindex $prog 2]

se..."
Friday 09:52:23: ... retrying later
Friday 09:53:23: Waiting for 30 mins

This is repeating every 30 minutes.


----------



## mikerr

Its possibly using an old cache file from a previous version,
delete the cache files (suggs.channels & suggs.progs)



Code:


cd /var/hack
rm suggs.channels
rm suggs.progs

They are recreated if they aren't there, or are over a day old.


----------



## kitschcamp

Ok, I'll give that a go and see what happens. Thanks!


----------



## djb2002

What does this hack not do, that the original suggestions feature do ?

Thanks
Daniel


----------



## richbain

I'd just like to say a big thank you to mikerr and the other contributors on here for saving my Tivo from the bin. Spent a couple of hours yesterday installing suggs and my Tivo is now off the critical list and is making suggested recordings. It's amazing how much you miss these things when they're gone!

Keep up the good work lets hope we can keep the old boxes running until we are allowed to get our hands on a brand new version.


----------



## ruperte

Hi,

First of all .... A big thanks for developing this. I've got it working on my Tivo with Freeview just fine. But on my other Tivo setup with Sky, I keep getting the following:

Tuesday 01:08:59: SCHEDULE {The Record} (128 / 101) on BBCPARL at 05:30
Tuesday 01:09:04: SCHEDULE {Monster Jam} (000 / 104) on BRAVO2 at 08:30
Tuesday 01:09:07: SCHEDULE {Kenny the Shark} (000 / 104) on DMAXE at 05:05
Tuesday 01:09:13: SCHEDULE {The Story of Tracy Beaker} (000 / 103) on CBBC at 08:15
Dumping mempool to /tmp/BlockFailure.208
Tmk Assertion Failure:
BlockFailure, line 1771 ()

And then it reboots. As it clears out /tmp on the reboot, I don't ever get the mempool file either? Does anyone have any ideas?

All the best.

Rupert


----------



## mikerr

Blockfailure is often an out of memory error 
Are you running a dual source setup (lots of channels)?

Check your swapfile? You should see something like this:



Code:


&#37; cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  14151680 13885440   266240 77410304   774144  4222976
Swap: 314564608  4878336 309686272
MemTotal:     13820 kB
MemFree:        260 kB
MemShared:    75596 kB
Buffers:        756 kB
Cached:        4124 kB
SwapTotal:   307192 kB
SwapFree:    302428 kB

SwapTotal should be non zero



djb2002 said:


> What does this hack not do, that the original suggestions feature do ?


The main missing feature is that pending/todo suggestions don't show up in the onscreen GUI,
everything else is much the same or better


----------



## ruperte

mikerr said:


> Blockfailure is often an out of memory error
> Are you running a dual source setup (lots of channels)?


Yes it is running dual source, Sky Radio and Sky TV channels, so that would make sense.

If memory serves, it's running EndPad, TivoWeb and now Suggs. I'll check that the Swap is active and try it with EndPad and TivoWeb stopped this evening and report back.

Thanks for the pointers.

Rupert


----------



## Rob Randall

I'm running 1.03 and it's doing a fine job of supplying me with suggestions.

However, I'm getting lots of suggested series being recorded on consecutive days even though I have *-daysback 5* in the startup command. It looks like suggs doesn't repeat suggestions for programmes that have no episode data, but if there is episode data then another recording from that series can happen before the requested number of days have elapsed.

As examples, I have 3 episodes of X-Files, 2 episodes of Red Dwarf and 3 episodes of Big Barn Farm all suggested and recorded in the last 3 days.

Is there any way to 'fix' this?

Thanks


----------



## ruperte

bash-2.02# cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 14151680 14020608 131072 49963008 155648 4390912
Swap: 314564608 2367488 312197120
MemTotal: 13820 kB
MemFree: 128 kB
MemShared: 48792 kB
Buffers: 152 kB
Cached: 4288 kB
SwapTotal: 307192 kB
SwapFree: 304880 kB

Well swap is certainly there and in use!

I tried starting it with TivoWeb and EndPad stopped and that did the trick. Having done it's big list of channels calculations it seem to be happy starting and running. I wonder if it will still be running tomorrow morning.


----------



## DanielB

Firstly a big thanks to MikeRR for this, I find it amazing that one person with a little time can sometimes eclipse what a large company can / or is willing to do in the same time.

I have been using 1.03 for a little while and it is working very well however I have noticed the off occassion where the same program has been recorded twice. I had two recordings of the gadget show, and one was a repeat of the other.

I am wondering if this is a fault of the suggestions hack, or what I am more likely to belive is that there was insufficent metadata, to reflect on that both recording are the same.


----------



## BrianHughes

I second that. I've been running 1.03 for the last 10 days and it works beautifully. Thanks Mike.  :up: :up: :up:


----------



## Rob Randall

I've been seeing lots of repeated series suggestions with 1.03 and I've not been seeing any "Already recorded" messages in the log either. I found some time today to investigate and I think I have a fix 

There are a couple of issues affecting suggs 1.03 as follows -

* suggs calls a function called get_nowplaying to check what has already been recorded. This function returns nothing on my TiVo. It tries to load data from the MFS /Recording/NowPlaying area which doesn't seem to exist. I've changed it to use /Recording/NowShowing instead.

* I've been using a modified version of sortnp to add episode titles to my Now Playing list. This also confuses suggs history tracking so I've modified it to use the series name instead.

Here is my modified routine for get_nowplaying which now seems to be doing the job for me. I don't know if mikerr wants to include this in his code and produce a 1.04, but I'll leave that up to him. If anyone else feels like trying this just replace the get_nowplaying function in your copy of suggs 1.03.



Code:


proc get_nowplaying { } {
global db historylist 

# /Recording/Nowplaying only has current non-deleted items in it 
# so quicker to scan

ForeachMfsFile fsid name type "/Recording/NowShowing" "" {
   after 500
   RetryTransaction {
    set recording [db $db openid $fsid]
    set state [dbobj $recording get State]
    set seltype [dbobj $recording get SelectionType]
    set startdate [dbobj $recording get StartDate]
    set showing [dbobj $recording get Showing]

    set program [dbobj $showing get Program]
    set title [dbobj $program get Title]
    # get series if possible
    set inserted [catch {
		    set series [dbobj $program get Series]
				set seriesname [strim [dbobj $series get Title]]
				}]

    if { $inserted != 0 } {
        # item has no series data, so use normal title
        set seriesname $title
     }

    lappend historylist "$startdate $fsid {$seriesname}"
    }
  }

}

I'll see how it goes over the next few days to see if there are any other tweaks needed.


----------



## mikerr

Thanks for that Rob, that can go in 1.04 unchanged.

There is another current issue with duplicate checking, in that it's still only checking title/series title - not actual unique episode ids (TMSIDs). 
So currently while it can avoid duplicate shows of the same title, it may still record the same episode outside the "daysback" range.

Code for that was in an earlier version (track by TMSID) , needs putting back in.


----------



## erinq

I am in the US and my S1 is not recording suggestions either...

Is this compatible with my S1 3.0?

Thanks


----------



## Rob Randall

Rob Randall said:


> I'll see how it goes over the next few days to see if there are any other tweaks needed.


 Some tweaks were required 

The previous version didn't handle some series/programme names properly so caused some series to repeat. It also didn't handle some programmes where the series name didn't match the individual showing e.g. South Bank Show. So here's the modified (and tested for the last 5 days!) version. It has corrections in for the above, but can still handle programme titles that have been modified by the Add Episodes option in sortnp.



Code:


proc get_nowplaying { } {
global db historylist 

# /Recording/Nowplaying only has current non-deleted items in it 
# so quicker to scan

ForeachMfsFile fsid name type "/Recording/NowShowing" "" {
   after 500
   RetryTransaction {
    set recording [db $db openid $fsid]
    set state [dbobj $recording get State]
    set seltype [dbobj $recording get SelectionType]

    set startdate [dbobj $recording get StartDate]

    set showing [dbobj $recording get Showing]
    set program [dbobj $showing get Program]
    set title [dbobj $program get Title]
    set episode [strim [dbobj $program get EpisodeTitle]]

    # get series if possible
    set inserted [catch {
		    set series [dbobj $program get Series]
				set seriesname [dbobj $series get Title]
				}]

    if { $inserted != 0 || $episode==""} {
        # item has no series or episode data, so use normal title
        set seriesname $title
     }

    lappend historylist "$startdate $fsid {$seriesname}"
    }
  }

}

In the version on my TiVo I've also added back in the matching episodes in Now Playing by TMSID as mentioned by Mikerr above. I've also been tinkering with matching with TMSIDs in /Recording/NoReRecord which I think would mean that suggs would obey the 30-day rule also. Some further testing required though before I put that out in the wild


----------



## Johnbyte

I'd be grateful for anyone's help on a problem with the excellent suggestions module. I've installed the latest version of suggs, and ran it with the -dubug option which gave no errors and found several suggestions. After starting the module 'properly' with the -threshold 1 suffix, I can see suggestions being generated in the log and they exist in the Scheduled Suggestions page of the Tivoweb UI - but they don't record. Ever. There are no error messages in the log and manrec is installed and works fine. If anyone has any ideas on what the problem might be, I'd welcome them.


----------



## gaz8292

Hi,
Sorry for the basic question but i am useless on Unix.
I want to install Suggs, upto now i have managed to ftp it into my /VAR/HACK/ directory
but not sure what to do next to get it to run.
Can anyone help please?

Thanks
G


----------



## simbeav

G

There is a very good explanation earlier in this thread :-

http://www.tivocommunity.com/tivo-vb/showthread.php?p=6731743#post6731743

Remember to put any parameters that you want after suggs.tcl

e.g /var/hack/suggs.tcl -threshold 1


----------



## gaz8292

Thanks for the help getting it started.
I have it running now but it doesn't schedule any recordings the log just repeats over and over the following but doesn't record anything -
Tuesday 17:47:03: Checking for free space
Tuesday 17:47:04: Scanning todo list
Tuesday 17:47:05: Scanning now playing
Tuesday 17:47:05: Reading schedule list from disk (cached)
Tuesday 17:47:05: SCHEDULE Airline (384 / 103) on SRELIV at 20:00 
Tuesday 17:47:06: SCHEDULE {Soldier, Soldier} (256 / 101) on MM at 22:00 
Tuesday 17:47:08: SCHEDULE Watchdog (128 / 104) on BBC1NW at 19:30 
Tuesday 17:47:09: SCHEDULE {Road Wars} (128 / 102) on SKY1 at 21:00 
Tuesday 17:47:13: Waiting for 30 mins
Tuesday 18:17:13: Checking for free space
Tuesday 18:17:14: Scanning todo list
Tuesday 18:17:16: Scanning now playing
Tuesday 18:17:16: Reading schedule list from disk (cached)
Tuesday 18:17:16: SCHEDULE Airline (384 / 103) on SRELIV at 20:00 
Tuesday 18:17:17: SCHEDULE {Soldier, Soldier} (256 / 101) on MM at 22:00 
Tuesday 18:17:19: SCHEDULE Watchdog (128 / 104) on BBC1NW at 19:30 
Tuesday 18:17:20: SCHEDULE {Road Wars} (128 / 102) on SKY1 at 21:00 
Tuesday 18:17:25: Waiting for 30 mins.

Any ideas whats is wrong?
Thanks
G


----------



## simbeav

gaz8292 said:


> Thanks for the help getting it started.
> 
> Tuesday 17:47:13: Waiting for 30 mins
> Tuesday 18:17:13: Checking for free space
> Tuesday 18:17:14: Scanning todo list
> Tuesday 18:17:16: Scanning now playing
> Tuesday 18:17:16: Reading schedule list from disk (cached)
> Tuesday 18:17:16: SCHEDULE Airline (384 / 103) on SRELIV at 20:00
> Tuesday 18:17:17: SCHEDULE {Soldier, Soldier} (256 / 101) on MM at 22:00
> Tuesday 18:17:19: SCHEDULE Watchdog (128 / 104) on BBC1NW at 19:30
> Tuesday 18:17:20: SCHEDULE {Road Wars} (128 / 102) on SKY1 at 21:00
> Tuesday 18:17:25: Waiting for 30 mins.
> 
> Any ideas whats is wrong?
> Thanks
> G


It looks OK. You've probably found by now that it has recorded a suggestion.

Remember, the suggestions will only appear in Scheduled Suggestions in TivoWeb, not in Suggestions.
Also, the suggestions will keep "disappearing". That is why Suggs runs every 30 minutes to reschedule the suggestions.


----------



## gaz8292

its working ok? that does surprise me..I have no suggestions at all. I would have expected it to try and record something by now.
When it displays these ScHEDULE msg's, Are these the programs its going to schedule? or is it what its looking for? 
Tuesday 18:17:16: SCHEDULE Airline (384 / 103) on SRELIV at 20:00 
Tuesday 18:17:17: SCHEDULE {Soldier, Soldier} (256 / 101) on MM at 22:00 

Thanks 
G


----------



## gaz8292

My box has recorded some programs overnight making me a very happy man.
Thanks to mikerr and anybody else who may have helped in the development.
You are stars :up:


----------



## ciper

To everyone : If you have not done so already you *must* read this post http://tivocommunity.com/tivo-vb/showthread.php?p=6925447#post6925447


----------



## gaz8292

My box has ben recording suggestions quite happily for the last couple of days but today i get this error msg:-
Friday 10:55:57: ... retrying later
Friday 10:56:57: Waiting for 30 mins
Friday 11:26:57: Checking for free space
Friday 11:26:57: Scanning todo list
Friday 11:26:58: Scanning now playing
Friday 11:26:58: Reading schedule list from disk (cached)
Friday 11:26:58: SCHEDULE {The X Factor} (384 / 103) on ITV2P1 at 16:55 
Friday 11:26:59: Error... can't open object (errDbNotFound)

while executing
"db $db openidconstruction $showingobjid $subobjid"
("uplevel" body line 2)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 6)
invoked from within
"RetryTransaction {
set showing [db $db openidconstruction $showingobjid $subobjid]

if { [catch {set recording [db $db create Recording] }..."
("foreach" body line 52)
invoked from within
"foreach prog $allprogs {
set recordThis 1
set thumbData [lindex $prog 0]
set genreThumb [lindex $prog 1]
set title [lindex $prog 2]

se..."
Friday 11:26:59: ... retrying later
Friday 11:27:59: Waiting for 30 mins
Friday 11:57:59: Checking for free space
Friday 11:58:00: Scanning todo list
Friday 11:58:01: Scanning now playing
Friday 11:58:01: Reading schedule list from disk (cached)
Friday 11:58:01: SCHEDULE {The X Factor} (384 / 103) on ITV2P1 at 16:55 
Friday 11:58:02: Error... can't open object (errDbNotFound)

while executing
"db $db openidconstruction $showingobjid $subobjid"
("uplevel" body line 2)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 6)
invoked from within
"RetryTransaction {
set showing [db $db openidconstruction $showingobjid $subobjid]

if { [catch {set recording [db $db create Recording] }..."
("foreach" body line 52)
invoked from within
"foreach prog $allprogs {
set recordThis 1
set thumbData [lindex $prog 0]
set genreThumb [lindex $prog 1]
set title [lindex $prog 2]

se..."
Friday 11:58:02: ... retrying later
Friday 11:59:02: Waiting for 30 mins

Does anyone how how i can fix it?
Thanks in advance
G


----------



## mikerr

gaz8292 said:


> Friday 11:26:59: Error... can't open object (errDbNotFound)


Just restarting suggs wil fix that. 
It looks like its lost the database handle, which shouldn't happen at all... suggs keeps the database open.


----------



## dhorsler

hi, 

firstly congrats on creating the suggs suggestions module which i have succesfully got working on one tivo but cannot get it to work on the other tivo as it always reports a memory blockfailure every half hour and resets tivo, a bit of background knowledge ....

1. unit 1 - freesat, limited number of channels, suggs appears to work fine along with tivoweb 1.3.1 and endpad

2. unit 2 - full sky package, quite a lot of channels, suggs gives memory block failure regularly:

have already tried:

1. running tivoweb 2, suggs appears to work when started but crashes after midnight when it re-reads the channel list with blockFailure

2. running tivoweb 1.3.1, suggs initially appeared to work but now resets every 30 minutes with block failure, i may have changed something and forgotten what i changed possibly ...

3. have tried reducing the number of channels, this has no effect.

4. have tried drastically reducing the number of channels being used by manually modifying the suggs.channels file and then changing the .tcl module to run permanently from cache, this doesn't seem to work either, still get blockFailure error

5. have made sure swap is in use.

any ideas what the problem may be?, at a rough guess it appears to use too much memory or not free it but i am not an expert in tcl/tivo so this guess is probably wrong....

any suggestions on what i can try?, at this point anything considered, having seen it work succesfully on one tivo and work very well i feel spurred on to get it to work on the second one....

the log shows the following:

Saturday 11:04:34: reading channel list from disk (cached)
Saturday 11:04:34: Checking for free space
Saturday 11:04:37: Scanning todo list
Saturday 11:04:48: Scanning now playing
Saturday 11:05:16: Processing schedule
Saturday 11:05:30: Already recorded 'Gladiators' in the past 1 days
Saturday 11:06:01: Already recorded 'Gladiators' in the past 1 days
Saturday 11:06:29: SCHEDULE Mythbusters (384 / 103) on DISSCI1 at 13:00 
Saturday 11:06:30: SCHEDULE {CSI: Miami} (128 / 104) on LIVING1 at 22:00 
Saturday 11:06:31: SCHEDULE {Star Trek: The Next Generation} (128 / 103) on VIRG1 at 16:00 
Saturday 11:06:33: SCHEDULE {Stargate SG-1} (128 / 102) on SKY2 at 15:00 
Saturday 11:06:35: SCHEDULE {True Gladiators} (000 / 104) on DISC1 at 12:00 
Saturday 11:06:38: SCHEDULE {Tales From the Crypt} (000 / 103) on HORROR1 at 21:30 
Saturday 11:06:41: SCHEDULE {New Home DIY} (000 / 103) on DISCRTX at 14:30 
Saturday 11:06:47: SCHEDULE {Great Scenic Railways USA} (000 / 103) on TRAVP1 at 11:30 
Saturday 11:06:53: SCHEDULE {The Mr Men Show} (000 / 102) on FIVER at 11:10 
Saturday 11:06:57: SCHEDULE {Regional News and Weather} (000 / 102) on BBC1SE at 18:45 
Saturday 11:07:16: SCHEDULE {Top 10 Show} (000 / 101) on SMOVFAM at 14:15 
Saturday 11:07:34: Waiting for 30 mins
Saturday 11:37:34: Checking for free space
Saturday 11:37:38: Scanning todo list
Saturday 11:37:50: Scanning now playing
Saturday 11:38:18: Reading schedule list from disk (cached)
Saturday 11:38:20: SCHEDULE Mythbusters (384 / 103) on DISSCI1 at 13:00 
Saturday 11:38:21: SCHEDULE {CSI: Miami} (128 / 104) on LIVING1 at 22:00 
Saturday 11:38:22: SCHEDULE {Star Trek: The Next Generation} (128 / 103) on VIRG1 at 16:00 
Saturday 11:38:24: SCHEDULE {Stargate SG-1} (128 / 102) on SKY2 at 15:00 
Saturday 11:38:26: SCHEDULE {True Gladiators} (000 / 104) on DISC1 at 12:00 
Saturday 11:38:29: SCHEDULE {Tales From the Crypt} (000 / 103) on HORROR1 at 21:30 
Saturday 11:38:32: SCHEDULE {New Home DIY} (000 / 103) on DISCRTX at 14:30 
Saturday 11:38:44: SCHEDULE {The Adventures of Bottle Top Bill and His Best Friend Corky} (000 / 102) on FIVERP1 at 11:40 
Saturday 11:38:47: SCHEDULE {Regional News and Weather} (000 / 102) on BBC1SE at 18:45 
Saturday 11:39:07: SCHEDULE {Top 10 Show} (000 / 101) on SMOVFAM at 14:15 
Dumping mempool to /tmp/BlockFailure.221


cheers

dave


----------



## mikerr

v1.4 is uploaded in the first post.

dhorsler: From the looks of it its crashing when it writes to disk, maybe tivo allocates a lot of buffers at that stage?
I've temporarily removed that code from v1.4

I also found/remembered a useful backdoor code:

Thumbs Down, Thumbs Down, Thumbs Up, Instant Replay -
If done in the ToDo List, it will turn on the display of Suggestions in the todo list.

Very useful for suggs which doesn't show pending suggestions in the GUI anywhere else... !


----------



## dhorsler

thanks for that, i have quickly tried the 1.04 version and unfortunately i have to report that it also died via blockFailure, see log below,

i will have a detailed look at it later and see if i can come up with some more ideas ...

cheers

dave

Tuesday 13:19:14: reading channel list from mfs
Tuesday 13:19:18: Checking for free space
Tuesday 13:19:18: Scanning todo list
Tuesday 13:19:29: Scanning now playing
Tuesday 13:19:34: Processing schedule
Tuesday 13:22:49: SCHEDULE Next (384 / 105) on SMOVSFH at 21:00 
Tuesday 13:22:50: SCHEDULE {Star Trek: Voyager} (384 / 103) on VIRGP1 at 16:00 
Tuesday 13:22:50: SCHEDULE {How It's Made} (384 / 102) on DISSCI1 at 17:30 
Tuesday 13:22:51: SCHEDULE {Top Gear} (384 / 101) on DAVE at 15:00 
Tuesday 13:22:51: SCHEDULE {Midnight Hot} (384 / 101) on FASHTV at 23:00 
Tuesday 13:22:51: SCHEDULE Trawlermen (128 / 104) on DAVEP1 at 14:20 
Tuesday 13:22:52: SCHEDULE {South East Today; Weather} (128 / 103) on BBC1SE at 18:25 
Tuesday 13:22:53: SCHEDULE {Ballet Rocks} (128 / 102) on SKYART1 at 20:55 
Tuesday 13:22:54: SCHEDULE {Transformers: Robots in Disguise} (000 / 105) on JETIXUK at 13:50 
Tuesday 13:22:58: SCHEDULE {Monster Buster Club} (000 / 104) on JETIXUK at 13:25 
Tuesday 13:23:09: SCHEDULE {Oggy and the Cockroaches} (000 / 103) on POPTV at 18:10 
Tuesday 13:23:14: SCHEDULE {Happy Monsters' Band} (000 / 103) on DISPLYP at 17:05 
Tuesday 13:23:37: SCHEDULE {The Wombles} (000 / 102) on NICKJR at 20:35 
Tuesday 13:23:54: SCHEDULE {Jonas Brothers: Living the Dream} (000 / 102) on DISNEY at 17:25 
Dumping mempool to /tmp/BlockFailure.268


----------



## mikerr

Running it as 
*./suggs.tcl -threshold 1*

will make it use less memory, but it will record less suggestions 
- only those with thumbs ( the first number in brackets above)


----------



## dhorsler

so far so good as in it hasn't run out of memory, although it hasn't recorded any of the suggestions yet but time will tell ....

cheers

dave

update: still running and recording stuff fine, far less frequently than before but has yet to run out of memory so that's a good thing


----------



## mercuryraven

Hi,

I have hacked my tivo and have just added suggs, or at least tried to. I am having a problem getting it to run though.

I have ftp'd the file to /var/hack on my tivo, but when i try to run it I get the message "bash: ./suggs.tcl: No such file or directory".

I know the file /var/hack/suggs.tcl is there as I am able to ls it and cat it.

Do you have any ideas where i could be going wrong, I have a feeling I should know!!!!


Cheers,

Mark


----------



## Pugwash

chmod it to be executable? I can't remember the value but as far as my memory of linux goes 777 would work.


----------



## mercuryraven

Pugwash said:


> chmod it to be executable? I can't remember the value but as far as my memory of linux goes 777 would work.


I knew I'd work it out as soon as I posted such a stupid question. I didn't ftp in binary mode, have ftp'd again and it now works......

Cheers.


----------



## Tim L

mikerr said:


> I also found/remembered a useful backdoor code:
> 
> Thumbs Down, Thumbs Down, Thumbs Up, Instant Replay -
> If done in the ToDo List, it will turn on the display of Suggestions in the todo list.
> 
> Very useful for suggs which doesn't show pending suggestions in the GUI anywhere else... !


Thanks - that's really useful!


----------



## mikerr

Well since tivo suggestions are now working again:



TiVoPony said:


> Good news. We have successfully identified and tested a fix for the issue with TiVo Suggestions. It will be rolling out via the service over the next few days


This means suggs is no longer really needed, but as mentioned in another post, suggs and tivo suggestions will work fine alongside each other.

Tivo suggestions are days ahead, but only ever 2-3 per day - suggs will fill in the gaps in the schedule.
Since suggs only schedules a few hours ahead, tivo suggestions will take priority since they would already be in the todo list.

It won't do any harm leaving suggs installed, and you may want to do this to keep up the volume of suggestions - normal tivo siggestions will only schedule 2-3 per day.


----------



## Johnbyte

mikerr said:


> Well since tivo suggestions are now working again:
> 
> This means suggs is no longer really needed, but as mentioned in another post, suggs and tivo suggestions will work fine alongside each other.


Hi Mike,

Good to see suggestions working again - I have about 50 today! But actually I've come to prefer your suggs hack , which I've modified slightly so that it only records suggestions from my Freeview box, not from my Sky box. I don't want Tivo interfering with Sky when it might be in use by other members of the family. I still want to have Sky included in the Channels I Receive, however. All of which leads me to a question: is there any way at all your hack can be modified to record its suggestions, even though the recording suggestions option is turned off in Tivo? This would enable me to continue to use suggs without automatically recording Tivo's suggestions.


----------



## mikerr

Johnbyte said:


> I've modified slightly so that it only records suggestions from my Freeview box, not from my Sky box.


post or PM source so it can be added in to suggs proper ?



> is there any way at all your hack can be modified to record its suggestions, even though the recording suggestions option is turned off in Tivo?


It's actually done that all long - suggs does its thing regardless of whether suggestions are turned on or off in the GUI


----------



## DanielB

mikerr said:


> I also found/remembered a useful backdoor code:
> 
> Thumbs Down, Thumbs Down, Thumbs Up, Instant Replay -
> If done in the ToDo List, it will turn on the display of Suggestions in the todo list.


Now when I do this I do see a list of suggestions however, when I go to 'TiVo Suggestions' I am told once more that my TiVo is new so still dependant on mikerr's great fix, any ideas why I am seeing no suggestions on this page?


----------



## gaz8292

Whats the easiest way to remove Suggs now that suggestions are working?
I have entered rm /var/log/suggspid.xxxx but after power cuts etc it starts up again? I'm a unix newb so easy instructions please


----------



## Pete77

gaz8292 said:


> Whats the easiest way to remove Suggs now that suggestions are working?
> 
> I have entered rm /var/log/suggspid.xxxx but after power cuts etc it starts up again? I'm a unix newb so easy instructions please


You need to remove the executable file. Presumably this is in /var/hack?

Alternatively remove the command in rc.sysinit.author or similar that is starting up Suggs when the Tivo reboots.


----------



## gaz8292

Pete77 said:


> You need to remove the executable file. Presumably this is in /var/hack?
> 
> Alternatively remove the command in rc.sysinit.author or similar that is starting up Suggs when the Tivo reboots.


What happens if I remove it and the tivo reboots and can't find it!
Will it just ignore it?
Just that I know the command to remove it, but can't remember how to edit the rc.sysinit


----------



## Pete77

gaz8292 said:


> What happens if I remove it and the tivo reboots and can't find it!


It just won't run if the program no longer exists in /var/hack

Its easy to edit your rc.sysinit.author/rc.sysinit/author.edit Startup file if you install Sanderton's Startup Editor add on module for Tivoweb 1.9.4 or use the startup editor in the www.tivohackman.com module for Tivoweb 1.9.4 or TivoWebPlus 2.1.0

See http://en.wikipedia.org/wiki/Tivoweb for more information. Or www.steveconrad.co.uk/tivo and www.planetbuilders.org/tivo/tivo_upgrade_diary.html


----------

