# Automatic free space indicator



## nsysblh

Here is a little free space indicator I wrote. It should work on Series 1 with software version >= 3.

Instructions are included, as well as an explanation of the osd output.

The automatic part is that is puts up the information in place of the header on the Now Showing (or Now Playing) screen automatically.

Anyway, have fun with it.

Brandon


----------



## nsysblh

This is now V1.1. This will work with UK and US TiVos. See CHANGES.txt

If you installed V1.0 (or V1.0a) previously, don't forget to replace the osdcons executable. Then make sure to kill the old osdcons and autospace before starting autospace.tcl

Thanks to sanderton for help with the UK changes.

The osdcons package is somewhere on the second page of the thread.

NOTE: Until I update the included readme, there have been reported issues with the daily call using the rc.sysinit documented in the included readme.

The following format is suggested for the startup line in rc.sysinit:

/<directory>/autospace.tcl start >/dev/null 2>&1 &

(Note the trailing & that is not in the included readme)


----------



## pahunt

This sounds great but will it definitely not work on a UK Tivo with 2.5.5 or have you just not been able to test it on older software than version 3?


----------



## nsysblh

As is, it won't work with UK tivos. The data is in a different place in versions < 3.


----------



## cachecard_user

all i have is a readme file and a version file

looks cool though, i would like to try it


----------



## SR712

Very Nice, nsysblh, good job. Pretty handy.  Works great. The only thing I can suggest, would be to use a san-serif font like the TiVo uses... it would blend into the normal TiVo-skin and look more like it belonged.


----------



## cachecard_user

[edit] Nevermind. For some reason windows won't show the files in any window or view, but my FTP client sees the files and they uploaded!

Looks GREAT!

(my only complaint is that the TiVo guy in the upper left hand corner is covered up)

-+-+-+-+-+-+-+-+-+-+
when I unzip the file, i only get the readme and the version files, where did you get the actual files?


----------



## tombo28

Cool idea.
I get the following error when I try to run it:


Code:


bash-2.02# ./autospace
No EventSwitcher active
    while executing
"event register $TmkEventII::EVT_USREVENT  EventCallback"
    (file "./autospace" line 161)

The same error appears when I try it with -start and -status. 
In case it helps, I'm running an SVR-2000 with v.3.01.

Thanks in advance for any help you can offer.


----------



## tombo28

Nevermind, a reboot fixed it.
Thanks again for a cool app.


----------



## route66

Worked great for me. I second the font change request.


----------



## nsysblh

Hmm. the font is from elseed (and tivovbi). apparently it was the only one that fit nicely. It also has the full PC character set...which is nice for line drawing.

If anyone knows of another fixed 16w x 26h font, let me know. Everything I have found is not a good aspect ratio. Since it is using fixed character spaces, it has to be a fixed size bitmap type font (not trutype or anything pcish)

I'll keep looking for a new font. I guess I could design my own. The font is the only thing I didn't rewrite myself.

---

As far as the EventSwitcher error, for some reason Version 3 has an eventswitcher bug and it does go out to lunch more and more as you run tcl scripts which attach to the EventSwitcher. A reboot will fix it.

My suggestion here is to reboot and run the program once. It will attach to the EventSwitcher only twice at startup (once for the foreground and once for the background) and then stay stable. If you restart or exit and start a lot, it will eventually kill the EventSwitcher (I know from testing). If that happens, a reboot will fix it.

---

The Tivo Guy isn't really covered. You can see thru the background. He is telling you how much space is being used (or something). I tried a transparent background, and the letters are harder to read...the palette on that screen only has about 10 unique colors to choose from (as opposed to the playback screen which has the full 256 and they are all different)

Brandon


----------



## 11274

I would like to request one more number in the display. The number of hours at the machines default recording quality attributed to Suggestions + Free/Deleted Space.

In other words the number of hours to the right of the yellow region in the bar.


----------



## sanderton

> _Originally posted by nsysblh _
> *As is, it won't work with UK tivos. The data is in a different place in versions < 3. *


Easy enough to change to work with 2.5.5. Might have a play later.


----------



## nsysblh

> _Originally posted by sanderton _
> *Easy enough to change to work with 2.5.5. Might have a play later. *


Feel free. It is fairly straightforward, I just didn't want to put out something with a totally untested code section.



> _Originally posted by km _
> *I would like to request one more number in the display. The number of hours at the machines default recording quality attributed to Suggestions + Free/Deleted Space.
> 
> In other words the number of hours to the right of the yellow region in the bar.*


I wanted to stay away from hour calculations, as they are more prone to error than anything else. However, adding an hour remaining counter may be a nice thing. You want it to just overlay the recording indicators on the right side if they exist? There are only 4 character positions to play with, so it would have to be a number kinda just floating in space. I think the most "recordings" that can be taking place at 1 time on a directivo is 3, so I used the last 3 positions for the recording indicators (it is left as an exercise to the reader as to how to record 3 things at once 

---

Just to point out, because it is buried in the doc, and not obvious, the numbers on the upper right are show counters, not hour counters...[1 2 3] would mean one permanent show, two normal, and 3 suggestions.

If I could only find a drastically smaller font that was still readable, I could fit more than 36cols and 2 rows in the space available...and add more info.

---

Is the timing ok? I know it takes a while to populate on a machine w/o a working cachecard. Sometimes I think the 30 minute timeout is too long. What I wanted to avoid is recalculating every time you navigate to anywhere besides Now Showing.

Does anyone care that the deleted shows and pure free space are lumped together for display. I tried it both ways, and decided using a real color for deleted shows was too confusing. Especially since there is no space to fit the count of deleted shows on the screen.

Brandon


----------



## hopefulboydy

I installed the app on a tivo with a working cachecard and it works great. I dont really think you need to add anything else as showing the memory available as a percentage of total memory is more meaningful that hours remaining (hours remaining is all dependent on what resolution/bitrates you record with etc). When I enter Now Showing and the app kicks in, it takes a a few seconds, maybe more than 5 seconds to display the info. Is there anyway to speed this up ?


----------



## spinJR

does this work with the DirectTV HDVRs? (HDVR and DSR7000)


----------



## nsysblh

> _Originally posted by spinJR _
> *does this work with the DirectTV HDVRs? (HDVR and DSR7000) *


Not Series 2. No one has figured out the Series 2 osd chip at the same level as the series 1 osd. All I know of at the moment is that you can rewrite the entire screen on a Series 2 via osdwriter. That would defeat the purpose of keeping the existing data on the screen.



> _Originally posted by hopefulboydy _
> *When I enter Now Showing and the app kicks in, it takes a a few seconds, maybe more than 5 seconds to display the info. Is there anyway to speed this up ?*


How many total entries do you have? I have a 160G disk with ~250 now showing entries on one dsr6000+cachecard and it usually takes about 2 secs. Does it print 3 dots as in: 'Getting Data...' and then pause? The last step is to plow thru all the recordings. That part is going to take awhile no matter how it gets done.

It used to be slower. I optimized it a bit before releasing it. This is probably as fast as tcl can read the info.

Brandon


----------



## hopefulboydy

nsysblh, I only have about 30 recordings on there at the minute - 80G + 80G Series 1 SA Philips. It does say Getting Data ... while its retrieving the info. I suppose, it may actually not take as much as 5 secs.......just me being impatient. I am not at home now so i cant check, but it did seem to take a while last night. I suppose I will have to learn to be patient  Thanks for the great app.


----------



## HTH

Can you make it appear on the To Do List as well, and update the value as the cursor moves forward through the list for how much space will be available at those future times?


----------



## sanderton

Tweaked it to work on UK 2.5.5. The enc. version is ONLY UK compatible. 

nsysblh, you should be able to see the very few changes with a compare; if you only want one version floating around TiVoWeb has code in it for identifying UK machines.

The filenames you have chosen are identified by WinXP as being system files, and so are hidden when you unzip them, which might cause some confusion!

Very nice work; it looks really good (I think I might move the % free number from over the top of the little TiVo though; my kids like him!)


----------



## SR712

> _Originally posted by nsysblh _
> *Hmm. the font is from elseed (and tivovbi). apparently it was the only one that fit nicely. It also has the full PC character set...which is nice for line drawing.
> 
> If anyone knows of another fixed 16w x 26h font, let me know. *


Do you have this font in a file by itself? It's compiled into your proggy, right? I could work on it if I had it in a recognized format.


----------



## WTF

Very nice. Thanks nsysblh!


----------



## cojonesdetoro

Very nice indeed. I would like to offer a humble suggestion. It would be nice to have cmdline flags to indicate if you want:

- just percent number (tivo guy not covered)
- yes/no graph (short version)

I modified it for myself to just show percent disk used away from the tivo guy on one line but I think it may be nice as a cmdline option.

Thanks for the great script. Now I don't need to rely on tivoweb to tell me how much space is left.


----------



## nsysblh

SR712: Here is the osdcons pacakge. It is really a .gz file, so rename to:

osdcons.tar.gz

and the font file is there too. I'm not locked in to a 26x16 font. That just seems to be big enough to be nicely readable. Something like 20x12 would probably work fine also. The osdcons code may or may not handle a width that isn't a multiple of 8, but I am willing to fix it so it will if someone comes up with a smaller bit-mapped font. Any normal font support is out of my capability, though. And since it has to be compiled into the code, I doubt there are any public domain or gpled normal fonts anyhow. I'm sure they are all copyrighted my adobe or M$ or apple or whoever.

This has been updated to osdcons V1.1A to support autospace V1.1


----------



## nsysblh

> _Originally posted by cojonesdetoro _
> *Very nice indeed. I would like to offer a humble suggestion. It would be nice to have cmdline flags to indicate if you want:
> 
> - just percent number (tivo guy not covered)
> - yes/no graph (short version)
> 
> I modified it for myself to just show percent disk used away from the tivo guy on one line but I think it may be nice as a cmdline option.
> 
> Thanks for the great script. Now I don't need to rely on tivoweb to tell me how much space is left. *


Looks like covering the TiVo guy is a big no-no, so the next version will at least have to have an option on that.

What is a 'yes/no' graph?

Tivoweb does an excellent job. I need to put a 'credits' file in the next version too thanking the Tivoweb people / project. It is on the thorough side. It actually tries to calculate hour values for everything. That takes a while. I looked at their code and decided it was best for me to just write the data collection routines from scratch. tivosh and dumpobj are a good way to learn the database structure. The entirety of autospace is extremely straightforward. I'm not sure why no one wrote this before. Maybe osdcons makes it easier. I know I wouldn't have done it without a generic osd writer program.

Brandon


----------



## bobnick

Thanks for a great utility, and a big thumbs up to Stuart for his version too.
It complained about reading osdcons the first time it was run (after a chmod 755) - i changed the rights to 777 and ran it again successfully - not sure if it was setting files up the first time or whether it was a rights based thing - but I'm very happy now!

I too would like to be able to see Mr Tivo, and a swisher font would be nice (if we're allowed to be this fussy!)

The request regarding the graph was to have a command line switch as to whether or not to show the graph, I presume. I just hope you weren't being sarcastic in your reply, in case your sense of humour is more British than the Brit's!


----------



## nsysblh

> _Originally posted by bobnick _
> *Thanks for a great utility, and a big thumbs up to Stuart for his version too.
> It complained about reading osdcons the first time it was run (after a chmod 755) - i changed the rights to 777 and ran it again successfully - not sure if it was setting files up the first time or whether it was a rights based thing - but I'm very happy now!
> 
> I too would like to be able to see Mr Tivo, and a swisher font would be nice (if we're allowed to be this fussy!)
> 
> The request regarding the graph was to have a command line switch as to whether or not to show the graph, I presume. I just hope you weren't being sarcastic in your reply, in case your sense of humour is more British than the Brit's! *


I have no sense of sarcasm that I am aware of...and I don't think I'm british (although I keep wanting to type presentationbehaviour and colour in the code...I like the concept of adding extra 'u's near the end of words)

Oh, yes/no to put the graph up or not I thought maybe there was some weird kind of graph that would only plot yes or no if there were certain types of shows. Isn't the graph the whole point of the program?

So, you just want the top line and a blank bottom line? Or should the show counts move around based on whether there is a graph or not. If the graph were gone, tivo guy could be set free. I could probably fit precentages as well as show counts...is that kinda what you want? A non-graphical rendition.

Brandon


----------



## sanderton

Everyone will have their own preference I suspect! For me, I'd have just the graph with the xx% free in text where the file numbers now - nothing else.

For perfection, I'd like it togglable from the remote.


----------



## mrtickle

This is superb! Thanks nsysblh, and sanderton for the tweaks for 2.5. Now that it is working for me I can read the comments about positions of things and they make sense 

Do you intend to merge the UK code into the main code, it would be cool if you could before there are too many changes.

As for layout, here are my opinions - there is a blank line at the top of the screen, could this be used? (hmm. Perhaps there is less room at the top on the NTSC version of Now Playing, so it's probably better not to so that there are fewer differences!)

The "% used" text could go actually on the graph itself, perhaps semi-transparent so that the colour underneath shows through? It could be centred under the total number of recordings, or at the end of the yellow bar, or to the right of the yellow bar. This way nothing would cover Mr. TiVo but we'd still get the info. You'd only need to display the number eg "65%".


Any reason cyan was used and not green? Ah, could it be a clash with the background colour of your Now Playing? The UK's background is blue. I was thinking it would be good if the permanent part of the graph and value at the top could be green, because the blobs next to their recordings are green as well.

Am I right in assuming you get the sizes of finished recordings direct from the tivo - so those of us with hacked bitrates will still have our own values being used?

At the moment it says "65% used" at the top of Now Playing (just refreshed) but tivoweb's info module says 66.8%. 

Anyway those are minor - this is one hack I'm definitely going to keep


----------



## nsysblh

> _Originally posted by sanderton _
> *Everyone will have their own preference I suspect! For me, I'd have just the graph with the xx% free in text where the file numbers now - nothing else.
> 
> For perfection, I'd like it togglable from the remote.  *


I'd love to add remote functionality. I've tested it. Here is the issue: Once you start receiving remote events, you receive all of them and there is no way to turn them off. There is some overhead to receive key-presses no matter where you are in the system. Maybe a command option to turn on remote control...for low overhead, disable it.

Now that I think of it, I kinda like it. You could have all sorts of options from the remote, even restarting the program with the remote disabled.

Now the bigger question, what keys are "safe" on that screen? I think Record is safe. 1, 2 and 3 aren't, as they resort the list. I think 5-9 and 0 are. I'll play around later and maybe try to figure out what can be used.


> _Originally posted by mrtickle _
> *Do you intend to merge the UK code into the main code, it would be cool if you could before there are too many changes.
> 
> As for layout, here are my opinions - there is a blank line at the top of the screen, could this be used? (hmm. Perhaps there is less room at the top on the NTSC version of Now Playing, so it's probably better not to so that there are fewer differences!)
> 
> The "% used" text could go actually on the graph itself, perhaps semi-transparent so that the colour underneath shows through? It could be centred under the total number of recordings, or at the end of the yellow bar, or to the right of the yellow bar. This way nothing would cover Mr. TiVo but we'd still get the info. You'd only need to display the number eg "65%".
> 
> Any reason cyan was used and not green? Ah, could it be a clash with the background colour of your Now Playing? The UK's background is blue. I was thinking it would be good if the permanent part of the graph and value at the top could be green, because the blobs next to their recordings are green as well.
> 
> Am I right in assuming you get the sizes of finished recordings direct from the tivo - so those of us with hacked bitrates will still have our own values being used?
> 
> At the moment it says "65% used" at the top of Now Playing (just refreshed) but tivoweb's info module says 66.8%. *


Yes, I will get the UK code merged now that I have something that has been tested.

The blank line at the top is merely an illusion. Ok, actually it could be used if osdcons were rewritten to allow resize of some constants. I'm resizing everything else, so it should be doable. Hmm 3 lines, imagine the possibilities...

I have an overstrike mode, so overlaying the percent used in the middle of the bar graph would work ok. It would have to be the dark transparent, or black so it would contrast no matter what was below it. I'll try that out.

The StreamSize reported by MFS is what I am using. Tivoweb goes to great trouble to be completely accurate. 65 is rounded to the nearest % anyway. It could be 64.5 up to 65.49. The number was an afterthought. My original idea was to round to the nearest 4% and use only solid blocks on the bar graph. Feature creep set in, and you see the result. In my mind 65 and 66.8 are as close as I had hoped for.

There is no green in the palette for that part of the screen. Only the first 16 color positions are implemented and several of those are a weird transparent blue. I don't like the Cyan either, but I gave up trying to find the palette to reload it. I kept obliterating the text on the bottom of the screen trying to find the palette. The lower text is a fairly necessary thing 

---

Thanks for all the compliments everybody. I'm glad it is useful. The Series 1 is a really nice platform to program on. Plus, I can test things while the family is watching tv. (why is the screen all funny colors?...oh let me clear that off)


----------



## Nihilator

I love it. I immediately loaded it up on every TiVo in my house that has a TurboNet (three of the four).

It was very interesting to see how the TiVo that I *perceive* to be full was actually not so...it had a bunch of suggestions and very few SUIDs, and space leftover after that. But the TiVo that we use less frequently, as a "backup" unit, which happens to have more HD space, actually is completely loaded with expired programs.

Of course, I could have seen that by making a pass up and down the Now Playing list, but it's different to see it in graphic form.

Neat-O!

--Chris


----------



## bbsux

I agree with just having the percentage used... on the upper right...

I wouldn't mind a graph showing free space, but i don't like the yellow, red thing its too confusing....

But it is great and I enjoy using it...


----------



## mrtickle

Thanks nsysblh. I've had trouble myself with palettes when I created some logos so I appreciate the problems! (We'll never have a proper BBC Two logo here - no purple!  ).

One more idea (sorry!) would be to have an option to select where you'd like the graph to appear (top or bottom). We've got a huge gap at the bottom of the screen on UK tivos:
http://www.garysargent.co.uk/tivo/glossary/nowplaying.htm
it would be nice to fill it


----------



## nsysblh

> _Originally posted by mrtickle _
> *Thanks nsysblh. I've had trouble myself with palettes when I created some logos so I appreciate the problems! (We'll never have a proper BBC Two logo here - no purple!  ).
> 
> One more idea (sorry!) would be to have an option to select where you'd like the graph to appear (top or bottom). We've got a huge gap at the bottom of the screen on UK tivos:
> http://www.garysargent.co.uk/tivo/glossary/nowplaying.htm
> it would be nice to fill it  *


I was responding in the UK thread, guess I'll just hang out here. Essentially, all I can presently do is the top of the screen. They have a different osd layout on the bottom and all I seem to be able to do is obliterate it. I have never drawn in the second segement on that screen. There are ways to figure out how to draw on the bottom. They are beyond my current ability.

I agree you have a huge gap at the bottom. Did anyone notice all your dates are backwards?


----------



## FreeBSD_user

Doesn't work for me. I get the "Now playing Getting data.." and the following in the /tmp/autospace.log file
01/14/04 19:12:32 /var/hack/autospace/autospace AutoSpace V1.0 Started (Priority
fifo 1)
retrying after errTmBackgroundHoldoff ...
retrying after errTmBackgroundHoldoff ...
can't open object (errDbNotFound)

while executing
"db $db openid $fsid"
("uplevel" body line 2)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 5)
invoked from within
"RetryTransaction {
set recording [db $db openid $fsid]
set selectiontype [dbobj $recording get SelectionType]
if { $selectiontype != 0..."
("uplevel" body line 2)
invoked from within
"uplevel $body"
invoked from within
"ForeachMfsFile fsid name type "/Recording/InProgress" "" {
RetryTransaction {
set recording [db $db openid $fsid]
set selectiontype [db..."
invoked from within
"while {!$Exit} {
set EventWait -1; vwait EventWait
if { $Exit || $CurrentContext != $nowShowing } { continue }

# Reset the console
puts -nonewlin..."
(file "/var/hack/autospace/autospace" line 333)


----------



## nsysblh

> _Originally posted by FreeBSD_user _
> *Doesn't work for me. I get the "Now playing Getting data.." and the following in the /tmp/autospace.log file
> 01/14/04 19:12:32 /var/hack/autospace/autospace AutoSpace V1.0 Started (Priority
> fifo 1)
> *


What TiVo software version are you using?


----------



## bobnick

> _Originally posted by nsysblh _
> *
> I agree you have a huge gap at the bottom. Did anyone notice all your dates are backwards? *


We didn't use to have a big gap, but then we were upgraded with v 2.5 software which shares its code with US Tivos, and so the screens are based on NTSC dimensions. Now if we could fill it with something useful, we Brits wouldn't look so longingly at your versions 3, 4 or 5...

I think you'll find our dates are just fine, thank you very much 
 
It's far more logical to go day / month / year, is it not? It gets confusing when I fill out US forms - I had to complete a reference for someone applying to the Bar last week, and wasn't sure if I should do d/m/y or m/d/y. I was going to plump for the US method (as maybe they thought I was American, having only put London and no 'UK' on my address (thank god for postmen with braincells!)) but then realised it would be easier just to write 9th January 2004


----------



## Nihilator

> _Originally posted by bobnick _
> *We didn't use to have a big gap, but then we were upgraded with v 2.5 software which shares its code with US Tivos, and so the screens are based on NTSC dimensions. Now if we could fill it with something useful, we Brits wouldn't look so longingly at your versions 3, 4 or 5...
> 
> I think you'll find our dates are just fine, thank you very much
> 
> It's far more logical to go day / month / year, is it not? It gets confusing when I fill out US forms - I had to complete a reference for someone applying to the Bar last week, and wasn't sure if I should do d/m/y or m/d/y. I was going to plump for the US method (as maybe they thought I was American, having only put London and no 'UK' on my address (thank god for postmen with braincells!)) but then realised it would be easier just to write 9th January 2004   *


Yeah, well, some of us are perfectly content with our 3. In fact, if they upgraded us series 1 owners, I betcha you could hear the shouts all the way over there in the motherland.

The NTSC dimensions thing is throwing me, though. When I watch a PAL-formatted DVD, everything looks a little squished down, much like your TiVo screen. You would think one of us would be squished, and the other would be stretched vertically.

Finally, it's not your dates that bother us so much as your excessive use of the letter "u", and the extra "me" at the end of the word "program".

--Chris


----------



## FreeBSD_user

SwSystem 3.0-01-1-000


----------



## ThreeSoFar

how about a screen shot of it?


----------



## nsysblh

> _Originally posted by FreeBSD_user _
> *SwSystem 3.0-01-1-000 *


Ok, I'm stumped. Version 3 should work ok. I suppose you could try it again after you reboot next time...but I doubt that will make any difference.

Is the TiVo is working ok for you in all other respects... Are you running any other tcl based hacks which *are* working (Tivoweb would be one)

---

As far as dates, I always use: yyyy/mm/dd so I can use 'sort' to sort the fields with no weirdo field definitions. Extrapolating from that, mm/dd seems ok to me. 'cept the tivo leaves the year out to make the display weird around the year change.

I always think it is strange when watching a show on BBC America when someone gets into the "passenger" seat of a car and drives off. The only people who drive from the right hand side over here are the mail people...and some of them do it with a left hand drive car...(If you don't like the way I drive, stay off the sidewalk)

---

Someone posted a screen shot over in the UK forum. do a search for autospace by thread. There are only 2, one here, one there.


----------



## sanderton

> _Originally posted by nsysblh _
> *Did anyone notice all your dates are backwards? *


It gets particularly confusing as our press has started referring the the World Trade Centre (sorry, Center) as "9/11"; so a generation of schoolchildren will learn form their history books that it happened on the 9th of November.


----------



## Fozzie

Another user from over the pond saying thanks for an excellent little hack 

Also, some of us found that when we started autospace from boot (with '>/dev/null 2>&1'), our daily calls through the network card were failing. This has now been fixed with using '>/dev/null 2>&1 &' instead. Perhaps you could amend your readme?

Thanks again.

Edit: Oh yeah, who's up for writing the Tivoweb module to use the same data, so we can see the info remotely too?


----------



## pahunt

> _Originally posted by Fozzie _
> *Edit: Oh yeah, who's up for writing the Tivoweb module to use the same data, so we can see the info remotely too?  *


You can see the figures (not in a graph) on the Info page in Tivoweb and there is also a module called Space Used that gives even more detail.


----------



## sanderton

> _Originally posted by Fozzie _
> *Also, some of us found that when we started autospace from boot (with '>/dev/null 2>&1'), our daily calls through the network card were failing. This has now been fixed with using '>/dev/null 2>&1 &' instead. Perhaps you could amend your readme?*


Just a guess nsysblh, but I think that the event handling code to see if another copy is running is causing a delay as events are a bit of a mess during startup. As a result the rc.net code seems to be failing.

I overcame a similar problem by adding a startup switch to skip the check for another copy (as by definition if you calling it from rc.sysyinit.author there can't be another copy).


----------



## mrtickle

> _Originally posted by Nihilator _
> *The NTSC dimensions thing is throwing me, though. When I watch a PAL-formatted DVD, everything looks a little squished down, much like your TiVo screen. You would think one of us would be squished, and the other would be stretched vertically.
> *


Sounds like on your TV/DVD player setup it is missing out lines of the original 576-line picture, and outputting 480 lines to the TV. This will screw up the aspect ratio as you say! Perhaps other DVD players sold in the US can scale the picture down from 576>480 before outputting it, keeping the original aspect ratio? We're lucky here - most TVs are dual PAL/NTSC so can display either at the correct aspect ratio.

On the UK TiVo, they added more lines to the video output for the PAL resolution but kept as much code as possible the same between the US and UK software. So we have big gaps. Also because we use the exact same set of images (green/yellow dots), the aspect ratio of those images is wrong and they look a bit squashed 

Re Dates - I detest ANY date format which doesn't display the name of the month (Jan, Feb etc). If that is done then all the problems disappear at a stroke. This was the first thing I changed in TiVoWeb when I got it! (In fact I delayed purchasing a TiVo by a year because all I could see of it was the Now Playing display in a shop with the silly number/number display, and I was waiting for them to fix it).

Anyway back to autospace  Using the bottom of the screen - righto, didn't realise it would be harder. No worries! The top is fine with the few tweaks discussed already


----------



## nsysblh

> _Originally posted by sanderton _
> *Just a guess nsysblh, but I think that the event handling code to see if another copy is running is causing a delay as events are a bit of a mess during startup. As a result the rc.net code seems to be failing.
> 
> I overcame a similar problem by adding a startup switch to skip the check for another copy (as by definition if you calling it from rc.sysyinit.author there can't be another copy). *


I'll fix that in the next release. If you give it the 'start' option it won't check for another instance running.

I didn't want to have 2 running..

I'll try to make a few requested changes and have a new version out in a few days.


----------



## nsysblh

Attached is just the autospace file (in a zip) with the following changes:

1) % Used is on top of the graph. TiVo guy is free!
2) This should work with any version of the TiVo software. UK included.
3) File renamed to autostart.tcl to make it obvious what it is.
4) if you put it in rc.sysinit[.author] use: autospace.tcl start and it shouldn't cause as many problems
5) I think I fixed it so if your in progress recording is permanent, it will show up cyan instead of yellow on the recording indicator.

Treat this as V1.0a (alpha) I have only done a basic test.

Can someone in the UK verify I put the support in correctly?

I'll remove this file and move it to the head of the thread once I hear back that it is working.

These were the most needed changes. I wanted to get them out as soon as I could.

edit: I just changed it slightly. Trying to overlay the bar is an exercise in futility, as there is no color that contrasts well to all of the bar colors. This one puts the percentage on the top line in place of now showing. I'm not so happy with this format either...I'll think about it some more. Maybe there is some way to keep track of what is on the space bar and alternate the text color to keep it viewable...

Is this revision working for anyone? Comments?

Edit: moving latest test version to end of thread. The latest stable version is at the beginning of the thread


----------



## FreeBSD_user

I have TiVo Web Project - TCL - v1.9.4 on the box and everything works but the info page.

Tivo seems to work right as far as I can tell.

I have also been able to run dailymail.tcl

Is there anything else I can tell you?


----------



## nsysblh

> _Originally posted by FreeBSD_user _
> *I have TiVo Web Project - TCL - v1.9.4 on the box and everything works but the info page.
> 
> Tivo seems to work right as far as I can tell.
> 
> I have also been able to run dailymail.tcl
> 
> Is there anything else I can tell you? *


Does the version in the post above work for you? It adapts to find the data where it actually lives. It tries the new places and if they don't work, it tries the old places. Maybe there is something old and somthing new about your system.


----------



## Fozzie

Doesn't work for me now (UK TiVo). 2 probs:

1. Daemon doesn't start from boot - using /var/hack/autospace/autospace.tcl start). osdcons does show in the process list though.
2. If I manually start the daemon, suggestions aren't displayed - either as a total or on the graph.

Thanks.

Edit: a bit more info:

It starts from boot ok if I use /var/hack/autospace/autospace.tcl >/dev/null 2>&1 &
The suggestions figures have been included in with the 'normal' showings totals.
Is it my eyes or can I see a small dark blue segment at the end of the graph, after normal showings?


----------



## tombo28

New version works great for me (US SA Tivo). I didn't really have a problem with covering the little guy, but I do like the look of this one better. Looks cleaner, less like a hack. The previous version kept quitting on me after a few hours. We'll see how this one fares over time.
Thanks again!


----------



## beardsley

I had made a few changes to sanderton's UK port of the first version. 

I changed the % used figure to exclude suggestions. This is more use to me because I want to know how much space I have left before I start to overwrite things I have chosen to record. Also with autorecord suggestions, it always showed >95% used. I am thinking of removing the system/buffer from the total too.

I also reduced the size of the graph to 90% to allow the % used to move to the right of this, and uncover TiVo Man.

Just a personal taste thing, but I do not like the cyan. Looking at the ANSI list, it looks like this code should be giving green, rather than cyan. Is there any way to actually get green?

I have not checked properly get, but the colours on the in progress square do not look right to me. Is there a list of what the recording type "s", "h", etc actually mean? I am toying with the idea of displaying a letter in the square, rather than a colour.

I will give version 1.0a a try tonight, and probably make this a new baseline for my personalizations.

This is being great fun. I have not tried tcl scripting before, and playing with this seems like a good way to start to learn.

Thanks to nsysblh and sanderton for all your efforts. Keep up the good work!


----------



## sanderton

nsysblh, I think the problem is in this bit:



Code:


  ForeachMfsFile fsid name type "/Recording/DiskUsed/10" "" {
   RetryTransaction {
    set recording            [db $db openid $fsid]
    set state                [dbobj $recording get State]
    set streamfilesize       [dbobj $recording get StreamFileSize]
    set expirationdate       [dbobj $recording get ExpirationDate]
    if { [catch { set recordingbehavior [dbobj $recording get RecordingBehavior]}] } {
     set presentationbehavior $selectiontype
    } else {
     set presentationbehavior [dbobj $recordingbehavior get PresentationBehavior]
    }
   }
...

You are setting presentationbehavior to selectiontype, but you haven't quried the selectiontype; its value is just whatever is left over from the previous loop in the code.


----------



## mrtickle

I get a big long grey (gray) bar instead of separate yellow and grey. Also my totals are [0 0 71] instead of [20 46 5]. Probably covered by Sanderton's post above.

_edit: yes - I inserted a copy of line 397:_


Code:


    set selectiontype        [dbobj $recording get SelectionType]

_after line 426 and this fixes it._

The layout looks much neater now, thanks!

One other think I've spotted is that when you exit, it leaves ./osdcons behind still running in the process list?


----------



## nsysblh

Here is the latest. You need a new osdcons to use it. Both files are included. osdcons won't shutdown with autospace.tcl. It is a dependent application, but won't do anything if no one opens the fifo.

More to the point, you can run osdcons manually before autospace.tcl and keep it running after autospace.tcl. It is meant to be an osd service task.

I added the code to start it if it wasn't already started so people wouldn't need to put 2 things in their startup.

You can just kill it if you don't want it. It is C, so kill is safe.

--

I think this may make most people happy. And fix my previous oversight for Version < 3 code. This will most likely become V1.1 as soon as I get some feedback.

---

This is now V1.1 and is in the second post of the thread...


----------



## nsysblh

> _Originally posted by beardsley _
> *I had made a few changes to sanderton's UK port of the first version.
> 
> I changed the % used figure to exclude suggestions. This is more use to me because I want to know how much space I have left before I start to overwrite things I have chosen to record. Also with autorecord suggestions, it always showed >95% used. I am thinking of removing the system/buffer from the total too.
> 
> I also reduced the size of the graph to 90% to allow the % used to move to the right of this, and uncover TiVo Man.
> 
> Just a personal taste thing, but I do not like the cyan. Looking at the ANSI list, it looks like this code should be giving green, rather than cyan. Is there any way to actually get green?
> 
> I have not checked properly get, but the colours on the in progress square do not look right to me. Is there a list of what the recording type "s", "h", etc actually mean? I am toying with the idea of displaying a letter in the square, rather than a colour.
> 
> I will give version 1.0a a try tonight, and probably make this a new baseline for my personalizations.
> 
> This is being great fun. I have not tried tcl scripting before, and playing with this seems like a good way to start to learn.
> 
> Thanks to nsysblh and sanderton for all your efforts. Keep up the good work! *


Try the latest (for now) just above this post. I like the idea to remove the suggestions from the total. That will definitely make it into V1.1. Since I can overwrite the bar now, There may be enough space for more info.

Green isn't available. I wish it was. palette is very limited.

So the escape codes are in one place, $InProgress is initially set as follows:

h - Hidden recording
p - Permanent recording
r - normal recording
s - suggestion

For SA, there should only be one byte max in the string. For directivo, there can be 2. For other nefarious purposes, there can be many more. There is only space for 3 on the screen.

Then, the code later on puts the colors and bars in place.

Brandon


----------



## bbsux

I think I liked the layout of the second file better. The bar graph is impossible to see in the ver 3...


----------



## nsysblh

> _Originally posted by bbsux _
> *I think I liked the layout of the second file better. The bar graph is impossible to see in the ver 3... *


I've been putting out too many interim releases. I'm going to update the second post with the official V1.1 files and strip out the intermediate copies.

I may have fixed your problems in V1.1

---

Any comments on V1.1 Is this more in line with where everyone wanted the program to be? I like it better. Thanks for the suggestions.


----------



## bbsux

I liked the fact that the % was at the top of the screen NOT over the bar graph, to me thats just annoying... (can you give us a choice?)


----------



## Fozzie

Just a quick comment on the readme, before I install. YOu say:
"[ You can put a trailing & in the above line, but it isn't needed. It backgrounds itself ]".

My (and others in the UK) Tivo fails it's daily call if booted without the '&'. Put the '&' in and reboot and daily call is ok again.


----------



## Mars Rocket

I love this tool - one of the primary reasons I hacked my TiVo in the first place (aside from adding more space) was to put TiVoWeb on it so I could get access to some space usage information.

That being said, I do have a few comments:

I'm not interested in the graph at all, and I don't really need the counts of each type either. I do like the overall count of shows in Now Playing, but don't want it to include Suggestions.

I'd like to see options to skip display of some items, like

autospace --nograph --nocounts

In the meantime I've hacked mine to show only one line that looks like this:

51% - 49 shows in Now Playing

It looks cleaner and pretty much sums up what I want to see in a tool like this.

Thanks for creating autospace!


----------



## Mars Rocket

BTW, what's setpri for? I notice it's missing from the most recent zip file you posted, and I don't have it running. Autospace still seems to work fine, though.


----------



## Spire

_setpri_ is used to adjust the process priority, so that it doesn't consume too much CPU and risk interfering with the normal operation of the recorder.


----------



## nsysblh

> _Originally posted by Mars Rocket _
> *BTW, what's setpri for? I notice it's missing from the most recent zip file you posted, and I don't have it running. Autospace still seems to work fine, though. *


setpri is still in the V1.1 autospace.zip file (second post in this thread). It will change the priority of a running program. If it doesn't find it, it will still work. If it is there, it will make autospace.tcl run at the lowest possible priority. It is so that the normal TiVo functions aren't impacted by this program.

---

I'm still thinking about how to do real command switches. It will take a while to get it worked out because tcl doesn't provide getopt like C does. I plan to give some options in the future for moving things around. I'm just trying to get a minimally acceptable default for now. Covering the TiVo guy apparently wasn't acceptable to most people. Overlaying the bar may not be either...I'll keep listening and trying to change based on what makes the most sense.


----------



## bbsux

I agree as well..

As far as I'm concerned the only thing I need is the Percentage used in the center of the screen. 

Even just a solid graph (including everything but suggestions) as a single color (to illistrate what the percentage says) would be OK. I think the numbers of programs is un-needed.

Perhaps we could make the selections as verbose...?

maybe:
"Simple" is just the percentage
"Medium" is the graph with no numbers (just showing how much space used and not differentiating between saved, not saved, etc.).
"Medium Plus" is same as above but with the number percentage.
"Verbose" Everything...

Just a suggestion...

Thanks...


----------



## nsysblh

> _Originally posted by Fozzie _
> *Just a quick comment on the readme, before I install. YOu say:
> "[ You can put a trailing & in the above line, but it isn't needed. It backgrounds itself ]".
> 
> My (and others in the UK) Tivo fails it's daily call if booted without the '&'. Put the '&' in and reboot and daily call is ok again. *


I'm fairly sure it was because it was sending weirdo events around the system. If you use the 'start' option in V1.1, it will just start the background process without checking anything.

In case I'm wrong, I'll go ahead and change the readme when I update next.


----------



## nsysblh

> _Originally posted by bbsux _
> *I agree as well..
> 
> As far as I'm concerned the only thing I need is the Percentage used in the center of the screen.
> 
> Even just a solid graph (including everything but suggestions) as a single color (to illistrate what the percentage says) would be OK. I think the numbers of programs is un-needed.
> 
> Perhaps we could make the selections as verbose...?
> 
> maybe:
> "Simple" is just the percentage
> "Medium" is the graph with no numbers (just showing how much space used and not differentiating between saved, not saved, etc.).
> "Medium Plus" is same as above but with the number percentage.
> "Verbose" Everything...
> 
> Just a suggestion...
> 
> Thanks... *


Ok, I like that idea. Sorta like the verbosity level in some programs.

I can still collect all the data (have to anyway). Then select various additions based on the selected verbosity level. I'll give it some more thought and try to review the thread to determine what people really want for options.


----------



## Fozzie

> _Originally posted by nsysblh _
> *I'm fairly sure it was because it was sending weirdo events around the system. If you use the 'start' option in V1.1, it will just start the background process without checking anything.
> 
> In case I'm wrong, I'll go ahead and change the readme when I update next. *


Just checked and:

/var/hack/autospace/autospace.tcl >/dev/null 2>&1 & (all ok)

/var/hack/autospace/autospace.tcl start >/dev/null 2>&1 (autospace doesn't start)

/var/hack/autospace/autospace.tcl start (autospace starts but daily call fails)

/var/hack/autospace/autospace.tcl start >/dev/null 2>&1 & (autospace doesn't start)

Only the first one worked ok (for me!).

I'm happy with the layout & content. One very very small thing - could you move the top line of text slightly to the right as it just overlaps Mr Tivo


----------



## nsysblh

> _Originally posted by Fozzie _
> *Just checked and:
> 
> /var/hack/autospace/autospace.tcl >/dev/null 2>&1 & (all ok)
> 
> /var/hack/autospace/autospace.tcl start >/dev/null 2>&1 (autospace doesn't start)
> 
> /var/hack/autospace/autospace.tcl start (autospace starts but daily call fails)
> 
> /var/hack/autospace/autospace.tcl start >/dev/null 2>&1 & (autospace doesn't start)
> 
> Only the first one worked ok (for me!).
> 
> I'm happy with the layout & content. One very very small thing - could you move the top line of text slightly to the right as it just overlaps Mr Tivo  *


You are working hard. Weird that start didn't work for you. Were there any errors in /tmp/autospace.log ? You can also redirect to somewhere besides /dev/null to check for errors. There shouldn't be any...but if it doesn't start and you want to find out why.

How many pixels is the overlap? The init string early in the code sets the pixel offsets. Try changing the 46 in the line that ends # Change offsets to 54 and let me know if that works better for you.


----------



## Fozzie

> _Originally posted by nsysblh _
> *How many pixels is the overlap? The init string early in the code sets the pixel offsets. Try changing the 46 in the line that ends # Change offsets to 54 and let me know if that works better for you. *


Thanks. I've changed it to 66, which looks better 

I've not had a chance to see if I get any errors when starting with the different options. Great hack.


----------



## JMB

> _Originally posted by Fozzie _
> *Just checked and:
> 
> /var/hack/autospace/autospace.tcl >/dev/null 2>&1 & (all ok)
> 
> /var/hack/autospace/autospace.tcl start >/dev/null 2>&1 (autospace doesn't start)
> 
> /var/hack/autospace/autospace.tcl start (autospace starts but daily call fails)
> 
> /var/hack/autospace/autospace.tcl start >/dev/null 2>&1 & (autospace doesn't start)
> 
> Only the first one worked ok (for me!).
> *


It's the same for me too. Exactly as above on my machine... which is a UK with a CacheCard. Great hack though. 

Jason


----------



## Mars Rocket

Slight thread hijack:

Can somebody point me towards a reference for the osdcon values that will shed light on what things like "\033\1331;2;7;46y" mean?

I'd like to position some text on the right of the screen but have the line start on the right as well so it doesn't overlay the existing "Now Playing" graphic with spaces. If I change the 46 in the offsets line to something like 300 it still puts it in the middle of the screen, but only part of the text value is displayed.

Edit: Nevermind, I found the reference.


----------



## FreeBSD_user

I was able to figure out what the problem was, it turns out there was a bad entry in Recording/InProgess and it was bombing out on that file.


----------



## mrtickle

> _Originally posted by Fozzie _
> *Thanks. I've changed it to 66, which looks better
> 
> I've not had a chance to see if I get any errors when starting with the different options. Great hack. *


I did it a different way, I added an extra space before "Now Showing" so that the N is above the red live buffer part of the graph. Also added a space before "Getting data". I did it this way because the offset in the code hadn't changed since last time. It is a little close to our TiVo man though; perhaps the UK/US TiVo men are in slightly different horizontal positions 

I think the overlayed %age looks ok but I thought the word "used" makes it cluttered, so have removed that on mine and added spaces to center it.

I seem to be in a minority here but I would prefer that the number of recordings figure and the %used should include suggestions! If it says "Now Showing: 78" on my tivo surely that should mean there are a total of 78 recordings in Now Playing. (just remembered - the UK TiVo menu is called Playing rather than Showing!). At the moment it says 78 [22 46 10] and I have to do mental arithmetic to work out that there are actually 88 recordings on my tivo. I think the people who want the figure without suggestions should have to do 88-10 instead  .Perhaps this could be another option.

Thanks again for the speedy development!


----------



## wintersn

Excellent hack, works great for me. I did notice that after a reboot it didn't load, I'll have to see what it does in the future. Only the osd... service was running when I did a PS, no autospace in the list.

I think the layout looks great, I like the % Used over the bar, nothing I would change at all. The only modification I made is while it is gathering data. I changed the text from "Getting Data" to "Gathering Data", I'm not sure why, but I liked the sound of it better.

Nate


----------



## iankb

> _Originally posted by mrtickle _
> *... I added an extra space before "Now Showing" ... , ... added a space before "Getting data" ... , ... I thought the word "used" makes it cluttered, so have removed that on mine and added spaces to center it.*


Made the same changes to mine, plus ...

I replaced the start and end triangles on the bar by spaces, since they seemed a bit fussy and unnecessary. They are the '\021' and '\020' octal sequences. I prefer the minimalist approach. 

A further hack that I haven't attempted yet is to move the In-Progress Indicator over to the far right, and to stretch the bar to fill up most of the gap.

Also, if the freespace were to be painted on the bar in another colour, then the absence of a terminator on the right of the bar wouldn't matter.

*nsysblh:* It's a great hack. Hope you don't take offence at all the hacks to your hack. 

_Edited to add suggestion for freespace colour_


----------



## nsysblh

> _Originally posted by iankb _
> *
> nsysblh: It's a great hack. Hope you don't take offence at all the hacks to your hack.
> 
> Edited to add suggestion for freespace colour *


Nope. At some point, I'm just going to call it done, so it is good that people want to change it around to suit themselves. I'll try to include the best of the ideas in the distribution. Besides a few changes to how the data is presented, this project is just about finished.

I hope people see how easy TiVo hacking really is.


----------



## beardsley

> _Originally posted by nsysblh _
> *Try the latest (for now) just above this post. I like the idea to remove the suggestions from the total. That will definitely make it into V1.1. Since I can overwrite the bar now, There may be enough space for more info.
> 
> Green isn't available. I wish it was. palette is very limited.
> 
> So the escape codes are in one place, $InProgress is initially set as follows:
> 
> h - Hidden recording
> p - Permanent recording
> r - normal recording
> s - suggestion
> 
> For SA, there should only be one byte max in the string. For directivo, there can be 2. For other nefarious purposes, there can be many more. There is only space for 3 on the screen.
> 
> Then, the code later on puts the colors and bars in place.
> 
> Brandon *


I like version 1.1. On balance I think that I like the text overlaid on the graph but I am not too sure yet.

The only hacks that I have made to this version are to recordings in progress:

I have added a type for manual recordings (presentation behavior 5)

elseif { $presentationbehavior == 5 } { lappend InProgress "m" } \

I have overlayed the square with a letter for the type of recording

if {$type == "h"} {append dat "\033\13341mL"} \
elseif {$type == "s"} {append dat "\033\13349mS"} \
elseif {$type == "p"} {append dat "\033\13342;30mP"} \
elseif {$type == "m"} {append dat "\033\13347;30mM"} \
else {append dat "\033\13343;30mR"}
\

I will undoubtedly do some more playing about - not because I think any changes are needed, but just for the fun of it.

Andrew


----------



## nsysblh

The best change so far for me has been to remove suggestions from the % Used. What was I thinking putting them in the total...everyone's machine would always say 97-98%

Manual recordings is a good idea, wishlists too...for the recording indicators. However, there aren't enough colors for the bar. Something inventive with overstrike mode to make up for the lack of colors in the palette may be possible. The bar routine was complicated enough, though. At least I figured it out programmatically instead of how I originally tried to do it (a different code section for each color...blah)


----------



## cojonesdetoro

Is there a way to show free space in GB?


----------



## nsysblh

> _Originally posted by cojonesdetoro _
> *Is there a way to show free space in GB? *


Spc_Available, Spc_Deleted, and Spc_Suggestions are in KB.

To get the Free Gigabytes (as an integer) place the following line somewhere after all those values are calculated, but before the display sections:

set FreeGB [eval ($Spc_Available+$Spc_Deleted+$Spc_Suggestions)/(1024*1024)]

Then, put $FreeGB somewhere in the output. You could replace the "$pct" variable with it and change the "% Used" constants to "GB Free", for example.

Is that what you were looking for?


----------



## Fozzie

> _Originally posted by Fozzie _
> *Thanks. I've changed it to 66, which looks better *


Doh! It might have looked better but just noticed that the total for Suggestions has disappeared! I'm now using an offset of 54 (as was originally suggested) and I'm happy with that.

My preference is for the total recordings figure to not include suggestions


----------



## dickuk

quote:
--------------------------------------------------------------------------------
Originally posted by cojonesdetoro 
Is there a way to show free space in GB? 
--------------------------------------------------------------------------------

I couldnt seem to get the following suggestion by nsysblh to work :

set FreeGB [eval ($Spc_Available+$Spc_Deleted+$Spc_Suggestions)/(1024*1024)]

It only worked when I changed it to the following, Is this anything to do with the UK models, nsysblh?

set FreeGB [expr ($Spc_Available+$Spc_Deleted+$Spc_Suggest)/(1024*1024)]


----------



## HTH

So, what about that total that changes as the cursor moves in To Do list instead?


----------



## nsysblh

> _Originally posted by dickuk _
> *quote:
> --------------------------------------------------------------------------------
> Originally posted by cojonesdetoro
> Is there a way to show free space in GB?
> --------------------------------------------------------------------------------
> 
> I couldnt seem to get the following suggestion by nsysblh to work :
> 
> set FreeGB [eval ($Spc_Available+$Spc_Deleted+$Spc_Suggestions)/(1024*1024)]
> 
> It only worked when I changed it to the following, Is this anything to do with the UK models, nsysblh?
> 
> set FreeGB [expr ($Spc_Available+$Spc_Deleted+$Spc_Suggest)/(1024*1024)] *


I can't remember my own variable names. That is correct. Sorry about that. I should have tested it.



> _Originally posted by HTH _
> *So, what about that total that changes as the cursor moves in To Do list instead?*


The context doesn't change as you move around, so the code doesn't receive any events. It is even worse if you hit clear to delete a program. The delete screen is counted as the same context, so it won't even repaint. Without the progrqam becoming much more intrusive (i.e a resource hog) it can't do much more.


----------



## bbsux

Is anything new happening?


----------



## nsysblh

Not really. I had to completely rebuild one of mine. It took a while to get it populated again. And work has reared its ugly head again. I doubt I'll have much time to devote to this for a while.


----------



## Nihilator

Work?!?! Don't you understand that *this* is now your work? 

Awesome utility, by the way. It's loaded on every TiVo, and I really like the new iteration. It even has a decent WAF, although she sees it less as an essential utility and more as an extraneous dork-centric thing. That's okay, I'm comfortable with that.

Thanks for your hard work!

--Chris


----------



## Nalez

Very, very nice hack. Such a simple idea, I am suprised it had been this long before someone did it.

Nice job on the hack.


----------



## Nihilator

Does anyone else's autospace.tcl spontaneously stop? I have to telnet in and restart it manually, but that's not a long-term solution.

The line in my rc.sysinit.author reads:

/var/hack/autospace.tcl >/dev/null 2>&1 &

--Chris


----------



## nsysblh

> _Originally posted by Nalez _
> *Very, very nice hack. Such a simple idea, I am suprised it had been this long before someone did it.
> 
> Nice job on the hack. *


Uhh, me too.

Really, the worst part is having something to place text on the screen in an easily controllable way. Getting the data isn't much trouble at all. Oh, and figuring out an elegant way to grab events, although that wasn't too difficult either.



> _Originally posted by Nihilator _
> *Does anyone else's autospace.tcl spontaneously stop?*


Next time is happens, see if there is anything in: /tmp/autospace.log before you restart it. Any errors should go there. There is always the possibility of many oversights in the code. Almost nothing is in a catch statement. It really is supposed to just fail if something goes wrong. That way you don't end up with an unstoppable tcl script in a tight CPU loop...which kept happening to me before I put in the bgerror handler. Restarting the program is a bit nicer than rebooting the TiVo...especially when it is recording at the time.



> _Originally posted by Nihilator _
> *Work?!?! Don't you understand that *this* is now your work?*


Do I get an office?


----------



## Nihilator

> _Originally posted by nsysblh _
> *Next time is happens, see if there is anything in: /tmp/autospace.log before you restart it. Any errors should go there. *


Right now, there's about a dozen lines in there, all of which say:

retrying after errTmBackgroundHoldoff ...

But it happens to be working just fine. The last time I restarted autospace.tcl was just before I wrote the last message.

In fact, each of my three TiVos has those same lines. One of them has it repeated almost 200 times.



> *Do I get an office? *


Ask someone in Alviso.


----------



## mrtickle

> _Originally posted by Nihilator _
> *
> The line in my rc.sysinit.author reads:
> 
> /var/hack/autospace.tcl >/dev/null 2>&1 &
> 
> --Chris *


Is that the correct way of doing it? I had problems when I put it in my startup - I think it might be when i tries to start up osdcons and can't find it as it isn't in the current directory.

I do like this hack a lot! As I prefer suggestions to be included I'm using the 2nd version and have moved the % figure between the total and the [] section.

The only change I thought I will try to do is to perhaps put it on the System Information screen instead of Now Playing - I keep accidentally going out of NP and I get impatient when it's recalculating


----------



## Fozzie

> _Originally posted by mrtickle _
> *Is that the correct way of doing it? I had problems when I put it in my startup - I think it might be when i tries to start up osdcons and can't find it as it isn't in the current directory.*


It's what I've got in my startup and not had any problems so far.


----------



## gl9500

Pretty cool nsysblh. Thanks for putting it out.

FWIW anyone... I moved the output "graph" to a different "page".
I have mine showing in "System Information".
To do that, just change this one line in autospace.tcl.
(I modified v1.1)

set nowShowing 7

to

set nowShowing 29

here are some other "context" values if you want it on another page...



Code:


#todo curContext 32
#msgs+setup curContext 14
#tivo msgs curContext 51
#system info curContext 29


----------



## mrtickle

Splendid, thanks!


----------



## Dunkwho

very cool mod, just got round to installing it (too much actual tivo use!  )

am I right in thinking that manual recordings aren't included either in the counts or in the bar\percentage displays?

I've 11 items in my now showing right now ... 10 of them are season pass recordings of which 1 is keep until i delete, the others are ok, expired, or about to expire. the 11th recording is a manually recorded (think i hit the record button not a manually scheduled recording) which is save until i delete ... thing is that autospace is counting only 10 shows in the central count breaking down to 1 save until i delete and 9 normals.

any thoughts?

Cheers & well done !

Duncan


----------



## Nihilator

> _Originally posted by Dunkwho _
> *I've 11 items in my now showing right now ...
> 
> any thoughts? *


Yes. You need to add more hard drive space to your TiVo. 

--Chris


----------



## GregA

> *...I moved the output "graph" to a different "page"....To do that, just change this one line in autospace.tcl...*


Where is the autospace.tcl? Looked for it, can't find it...


----------



## ThreeSoFar

is find on there? Never hacked my TiVo, but Unices in general have that command.


Code:


find / -name autospace.tcl


----------



## GregA

bash-2.02# find / -name autospace.tcl
bash: find: command not found


----------



## iankb

Maybe you haven't got the '.tcl' on the end of the executable's filename. Try ...


Code:


find / -name autospace


----------



## ThreeSoFar

No. It says "command not found". you do not have the "find" program on TiVo, apparently.

Try this:


Code:


ls -al /*/autospace* /*/*/autospace* /*/*/*/autospace* /*/*/*/*/autospace*


----------



## stickboy

> _Originally posted by GregA _
> *Where is the autospace.tcl? Looked for it, can't find it... *


 Huh? It's wherever you installed it to. It's one of the files included in autospace.zip in the second post of this thread...


----------



## Dunkwho

> _Originally posted by Dunkwho _
> *I've 11 items in my now showing right now ... 10 of them are season pass recordings of which 1 is keep until i delete, the others are ok, expired, or about to expire. the 11th recording is a manually recorded (think i hit the record button not a manually scheduled recording) which is save until i delete ... thing is that autospace is counting only 10 shows in the central count breaking down to 1 save until i delete and 9 normals.
> 
> *


My now playing currently has season-passed recordings (correctly counted), some suggestions (correctly counted), and this 1 off hit-record-on-the remote program that's keep until i delete which _isnt_ counted either in the total number of now playing entries or the breakdown of recording types in the count box ... my figures are therefore 1 out and I think my freespace is being incorrectly calced too.

I've only got the original 12hrs best (sniff, *blows nose*) at the moment so loosing a 1 hour program for the graph is a major mis-calc.

Happy to provide any info that might help resolve this ...

Duncan.


----------



## cojonesdetoro

> _Originally posted by ThreeSoFar _
> *Try this:
> 
> 
> Code:
> 
> 
> ls -al /*/autospace* /*/*/autospace* /*/*/*/autospace* /*/*/*/*/autospace*
> 
> *


Sheesh..

ls -laR works but won't show the path. There is a 'find' binary for Tivo SA1. It's worth trying find...find :-/ .. it's such a valuable tool to have.


----------



## dsmdriver

You did pick up that autospace is not on the TiVo unless you put it there, right?


----------



## ehgreen

Have been using Dish 501 PVR - 30 hours for a couple of years, and when I got a DirecTV - TiVo my first ankst was lack of time available (which I regularly used to prune my disk).

Question - since some users (apparently) have their TiVo units on a LAN, why do ?? most ?? hacks use ?? only ?? the TV screen for information display?

Have folks done hacks which export DATA to a "full function" computer, most likely a PC running either Linux or Windoze. 

Consider how POP3 mail works: your client makes a request, and the server usually deletes what is downloaded. But not if just mail headers are fetched, or deletion is not requested. The session may include commands to the server to delete some items, download others, etc. 

I'd rather not clutter my TV screen with "housekeeping". And I do have both PC display and "big" TV in front of me. 

So again, why are ??MOST?? hacks using only the TV as the output device?


----------



## iankb

> _Originally posted by ehgreen _
> *So again, why are ??MOST?? hacks using only the TV as the output device?*


I don't know where you got that idea. Most hacks use TivoWeb, which is output in a PC web browser. The only hack that I run that uses the TV is autospace. And that makes far more sense to most people, since the TV is what they use to monitor their list of recordings.


----------



## angel-78

Seems like a much needed utility. Is there a version that will work wish a directivo at 2.5.2 software? Thanks in advance for any help.


----------



## teeveeboy

I can't get this to work on my S1 Dtivo. I FTPed the 3 files files to /var/hack/autospace, chmod 755 all 3, then typed...

bash-202# ./var/hack/autospace/autospace.tcl

but get...

bash-2.02# ./var/hack/autospace/autospace.tcl: No such file or directory

What am I doing wrong?

Thanks


----------



## Fozzie

Leave out the '.' ?


----------



## teeveeboy

> _Originally posted by Fozzie _
> *Leave out the '.' ? *


Thanks, but that gives the same error. The files and dir are there.


----------



## ThreeSoFar

leave out the FIRST dot.:


Code:


/var/hack/autospace/autospace.tcl

And confirm it is there with:


Code:


ls -al /var/hack/ /var/hack/autospace


----------



## teeveeboy

> _Originally posted by ThreeSoFar _
> *leave out the FIRST dot.:
> 
> 
> 
> Code:
> 
> 
> /var/hack/autospace/autospace.tcl
> 
> And confirm it is there with:
> 
> 
> Code:
> 
> 
> ls -al /var/hack/ /var/hack/autospace
> 
> *


Thanks. All the files are there and I did leave out the first ".". I'm kindof a linux dummie, but I've had many tivo hacks running for years (elseed, tivoweb, etc). And everything is working fine on my Tivo...but this.

Thanks.


----------



## SR712

Put it somewhere in your PATH, and run it from there. Type:

echo $PATH

to get your PATH dirs.


----------



## teeveeboy

Very frustrating. Any other ideas why this may not run?

Series 1 DTIVO, 3.0-something,

I verified that /var/hack is in $PATH
I put autospace.tcl, osdcons, and setpri in /var/hack and chomod 755 each
tried to run /var/hack/autospace.tcl but I get "no such file or directory".

Any other ideas?

Thanks


----------



## SR712

First you say its in a directory called /var/hack/autospace/ , then you say /var/hack/ is in your PATH. ???? They are two different directories. Autospace is not in your path, then.

Put the files somewhere in your path. Put the files somewhere in your path. Put the files somewhere in your path.

There.... now I feel better.


----------



## teeveeboy

> _Originally posted by SR712 _
> *First you say its in a directory called /var/hack/autospace/ , then you say /var/hack/ is in your PATH. ???? They are two different directories. Autospace is not in your path, then.
> 
> Put the files somewhere in your path. Put the files somewhere in your path. Put the files somewhere in your path.
> 
> There.... now I feel better. *


Sorry....I moved them to /var/hack and deleted the /var/hack/autospace copies. I re-chmod 755 the /var/hack copies. /var/hack is in my path. Still no workie.


----------



## SR712

Maybe you have a corrupt download, but not likely. Don't know what else to suggest.


----------



## disco

All I can say is, "WOW!" This is simply one of the best hacks I've seen so far! Thanks, and keep up the GREAT work!


----------



## Mars Rocket

> _Originally posted by teeveeboy _
> *Sorry....I moved them to /var/hack and deleted the /var/hack/autospace copies. I re-chmod 755 the /var/hack copies. /var/hack is in my path. Still no workie. *


OK, cd to /var/hack type:

./auto

and press the tab key a few times. Don't press Enter after typing "auto". Does it autocomplete correctly? Does it show you more than one possible completion?

Next, type

ls -l

and post the results here.


----------



## Jeremybme

I have loaded this and have to say its the best thing i have loaded on my tivo, I love it alot. Thank you for developing it

here is a question,

i have it loaded in the rc.sysinit.author file,

when i reboot it self loads, but every couple of days it just stops working and i have to manually reload it /var/hack/autospace/autospace.tcl

or i have to reboot,

does anyone know why it randomly stops working?

thanks


----------



## lgkahn

how about getting a verswoin of this working for version two boxes with newtext2osd.. I am sure it is not rewriting theentire screen because my caller id only puts up a little box of text overlayed on the screen so it now should be possible... any comments...


----------



## nsysblh

Mine dies after a while too. I have no idea. Nothing in the errors file. I usually have to reboot. If you can restart and have it work, you are doing better than me. I don't think the tivo really likes long running tcl. The whole thing needs to be driven by C, but I'm not even sure it can be done from C. 

As for series 2, I'm thinking about buying one in the next 6 months. I've grown so used to the thing that the first thing I'll have to do is get autospace working. However that won't help right now.

I've still had no time to work on it anymore.


----------



## ThreeSoFar

S2's are really cheap...refurbs $149 before the $50 rebate.

Just got another one and thinking of monteing it (it would be my first). (*blush*)


----------



## smokie

I have a problem transferring osdcons. All the other files have FTPd across fine. I have changed the attributes of the file on the PC so that I can see it, but will FTP move it? Will it heck...

I tried renaming it too. FTP just seems to ignore it. (I also re-downloaded the zip file, just in case). Nothing appears in teh log, it's as though I haven't even made the request. Everything has been rebooted. I'm using FTPExplorer, which has been fine for everything else.


----------



## smokie

Above problem now sorted. Not sure quite what I did though.


----------



## horwitz

Awesome little hack -- thanks!


----------



## PortlandPaw

Hackman will now start and stop autospace. Look for it here.


----------



## jdixon

In case anyone gets the:
no such file or directory
on launch:
You transferred the files as text via FTP - you need to transfer them as binary.

For windows use the built in ftp client and before sending the file up issue to the program bin.

Wicked hack - thanks dude!


----------



## nrune

I am stuck on getting the osdcons to untar using the cpio comand. Could use a bump in the right direction.


----------



## JJBliss

> _Originally posted by nrune _
> *I am stuck on getting the osdcons to untar using the cpio comand. Could use a bump in the right direction. *


cpio -H tar -i < _<filename>_


----------



## stark

I found a work-around for a problem I was having with autospace and I thought I would share it.

I could get autospace to run from a bash prompt, but it wouldn't start start from my startup script (using sanderton's StartupEd Tivoweb module). It also wouldn't start using PortlandPaw's Hack Manager module. It always returned with a "child process terminated abnormally".

Because it worked from a bash prompt, I never got a good error message to debug it.

I finally tried to start it using the "Bash Command Prompt" option in Hack Manager. I finally got a error returned that indicated that the osdconsole wasn't starting.

I read the osdconsole readme file and added the following line right before the autospace line in my startup script.

/var/hack/bin/nicepri fifo 1 /var/hack/bin/osdcons >/dev/null 2>/tmp/osdcons.stderr &

Since then I haven't had any problems with autospace starting on reboot or using Hack Manager.


----------



## Fozzie

What command are you using in the startup script? I'm using:

/var/hack/autospace/autospace.tcl >/dev/null 2>&1 &

and never had any problems.


----------



## stark

I don't have autospace in its own directory, so my path is /var/hack/autospace.tcl. I also don't include the final ampersand (I don't think Hack Manager includes it either).

I used the same command line in the startup script and from the bash prompt that autospace defaults to. It would start from bash, but not from the other two until I started osdcons first.


----------



## Fozzie

If you use the command above in your startup script, you shouldn't need to do anything with osdcons. Did you try the command as I've typed it?


----------



## sbourgeo

Cool utility! It's up and running on my Philips standalone and DSR-6000 with no problems...

Steve


----------



## kirkbauer

I have Autospace 2.5.5 and a Series 1 with software 3.0. This is what I get in the log:

INFO: osdcons started (Pid: 189, Priority: fifo 1)
INFO: daemon started, output is in /tmp/autospace.log
bash-2.02#
bash-2.02# cat /tmp/autospace.log
invalid attribute: TimeZone
while executing
"dbobj $config get TimeZone"
("uplevel" body line 3)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 5)
invoked from within
"RetryTransaction {
set config [db $db open "/Setup"]
set tz [dbobj $config get TimeZone]
set dst [dbobj $config get DaylightSavingsPol..."
invoked from within
"if { ![info exists env(TZ)] } {

# Get time zone and daylight savings from database
RetryTransaction {
set config [db $db open "/Setup"]
set tz..."
(file "./autospace.tcl" line 288)


----------



## proggie

I installed the autospace.zip that is near the top of this forum (v1.1). I also have Daily Mail Jazz which also calculates free space. In Daily Mail it says that I'm using 97.1%, but autospace says that I'm only using 89%. Anyone use Daily Mail too, and anyone know why there's a difference?


----------



## Prof. Yaffle

I think it's because Autospace doesn't count Suggestions in the % used but Dailymail does count suggestions.


----------



## proggie

I don't have any suggestions currently recorded though.

I found this in the daily mail log though:
06:15:06-debug-actual space free = 98 gig
06:15:06-debug-actual space on disks = 101 gig
06:15:06-debug-actual % used = 97.1%

Apparently it thinks that my 120 gig drive has only 101 gigs. So it must be subtracting something off (like the OS, binaries, live buffer, etc.).

I'm not sure which percentage I should trust now


----------



## proggie

After installing autospace yesterday, I came home today from work and found that it was no longer working. I telneted into my tivo and found that the process was dead:

root 758 0.0 5.1 8380 712 ? S 06:12 0:18 (autospace.tcl)

I then looked in the autospace.log and found this:
07/29/04 23:12:34 /var/hack/autospace/autospace.tcl AutoSpace V1.1 Started (Priority fifo 1)
retrying after errTmBackgroundHoldoff ...
retrying after errTmBackgroundHoldoff ...
retrying after errTmBackgroundHoldoff ...
retrying after errTmBackgroundHoldoff ...
retrying after errTmBackgroundHoldoff ...
retrying after errTmBackgroundHoldoff ...

Any ideas?

I started it manually using:
/var/hack/autospace/autospace.tcl start >/dev/null 2>&1 &

which I also put in my /etc/rc.d/rc.sysinit, but my tivo hasn't restarted yet.


----------



## proggie

So I was at 91% and recorded a movie tonight, and one of my expired movies was deleted to make room. So I guess 91% is actually closer to 97% as my DailyMail correctly indicated. So why is autospace saying there's more space than there actually is? I guess I can just start deleting/juggling things when it is approaching 90%. Still it would be super if the indicator was a little more accurate.


----------



## proggie

I think I figured it out. autospace is including deleted, but still available shows in it's calculation (i.e. the space is free). I discovered that the 1.9.4 version of TivoWeb was not the final version (even though there was no indication that it was beta). I downloaded the final version, and the included Info module indicates space used/free. One of the lines indicated that 8.4% was being used by deleted shows. If I subtract that from the total used, I get the percentage that autospace indicates.
I also discovered that I'm recording in VBR mode (Save Space Mode), which makes my assumptions about how many hours there should be left inaccurate.


----------



## Prof. Yaffle

Have you altered the values for VBR? Because if not you aren't actually recording in VBR even though it indicates that you are. The values for Min and Max are identical unless you've actually altered them yourself.

EDIT

I'm very drunk so you'll have to excuse me.  I've just realised that this isn't in the UK forum so if you aren't UK based then the above isn't relevant!


----------



## proggie

Interesting. So you're saying that in the UK they have VBR set such that it isn't unless you go in and change it somehow? Was it on purpose or an oversight? I checked in the Resource Editor->Bit Rates via TivoWeb and there's different ranges, so I think I'm OK.


----------



## kitschcamp

From experience the figures need very careful tweaking to make sure you don't get sync problems with VBR figures set so it does VBR. And the same values on two Tivos don't necessarily give the same result.


----------



## nsysblh

The space calculations specifically exclude deleted programs and suggestions from the total. However, I wouldn't be surprised if it was off by several percent. It is amazing to me this quick hack works as well across the board as it does.


----------



## proggie

> _Originally posted by Fozzie _
> *Also, some of us found that when we started autospace from boot (with '>/dev/null 2>&1'), our daily calls through the network card were failing. This has now been fixed with using '>/dev/null 2>&1 &' instead. Perhaps you could amend your readme?
> *


That's how I run mine (with the & at the end) and my daily call still kills it.


----------



## bbsux

nsysblh,

Have you found a way to get the program to work on Series 2 machines?

Thanks...


----------



## cojonesdetoro

> _Originally posted by bbsux _
> *nsysblh,
> 
> Have you found a way to get the program to work on Series 2 machines?
> 
> Thanks... *


I have some big ol' hard drives and got tired of waiting for autospace to run on the NP list. Instead I butchered up a version of the tivoweb info module so that it prints to stdout with HTML stripped. I then use delmsg.tcl to delete old "info" messsages and mailfile.tcl to create a new "info" message with the output of my hacked up info module. I run the process once an hour via cron. It's pretty handy to see SMART info, filesystem and MFS usage as well as up-time. The best part is that TW doesn't need to be running for it to work.

I hacked up the info module specifically to work on my US/SA1/3.0 but the same technique can be used for the S2.


----------



## crow

Will this work on an SA S2 running 4.01b? I have backdoors enabled but I'd to play around with some OSD stuff..

thanks,


--CroW


----------



## disco

Has there been any movement on this? I can't get it to run on a S2 DTiVo w/ 4.0.1b... I get the following error:


> FATAL: osdcons not active and cannot be started (/tmp/osdconsole not a writable fifo)


----------



## falc122727

Awesome hack!!!! Glad I stumbled upon it by accident doing a search.

This begs the question, what other cool hacks are out there that I'm missing!


----------



## PortlandPaw

Try this link.


----------



## john1980

I have added a couple of catch statements around functions that can
cause issues when run on some modified systems. If anyone is having
trouble with the process aborting then you may like to modify the way
you start it up to create an error file. Then if you notice that it is no
longer running you will be able to check both the autospace.out and
autospace.err log files (found in the /tmp directory).



Code:


/<directory>/autospace.tcl start >/tmp/autospace.err 2>&1


----------



## PhilG

I just downloaded the v2.5.5 version of autospace (for UK Tivos) and I am well impressed!

Apart, that is, from the fact that the Tivo guy now has the in-use percentage smudged over the top of him 

Is this where it is on later US versions of Autospace? Could it be moved??


----------



## Fozzie

You can move it to the right very easily. I can't remember which value to change but I'll have a look on mine later and let you know.


----------



## Fozzie

Look for the line:



Code:


append init "\033\1331;2;7;46y"; # Change offsets

 and change to:



Code:


append init "\033\1331;2;7;54y"; # Change offsets

 HTH


----------



## Tintop2K

I've just installed version 1.3. I was getting the error


Code:


bash: /var/hack/autospace/autospace.tcl: No such file or directory

when running it. I went through this whole thread and tried the suggested fixes. Turns out the autospace.tcl file in the zip is in DOS format, not UNIX. I converted it to UNIX, copied it over using binary ftp again, and it now works. Hopefully this will help someone else if they have the same problem.

Great little hack btw. Many thanks to everyone who's contributed.


----------



## Fozzie

Strange - I've just downloaded the one in the .zip on the first page, to check, and it definitely IS in Unix format; it doesn't need any converting!?!

Edit: Ah ha, V.1.3 - you're absolutely correct - it is in Windows format and not Unix format. Hopefully the author can change it to avoid any further confusion


----------



## dogsbody

I have found the same thing though. I only manage to get the file to work when ftp'ing from a Linux box or extracting the file on the TiVo itself. Strange as other hacks have worked by extracting the archive on windows and uploding directly. It wasn't a problem just thought I would let Tintop2K he wasn't going mad


----------



## bnm81002

does this work on the DTivo units or just the SA Tivo? also if it does work on the DTivo's with 6.2 OS? thanks


----------



## Fozzie

Why not try it and find out?


----------



## mrrrl

OK so v1.3 is in DOS format, as found out by Tintop2K.

How do we convert it to Unix format on a WinXP machine? or how to unzip on the Tivo box, as unzip -aL autospace-1.3.zip does not work as zip and unzip are not in bin?

TIA


----------



## Fozzie

Try the free EditPad Lite.


----------



## john1980

mrrrl said:


> OK so v1.3 is in DOS format, as found out by Tintop2K.


You should be able to run the following on your TiVo to correct the format:


Code:


# dos2unix autospace.tcl
# chmod 755 autospace.tcl

I have also attached another slight modification which should detect a v2.5.5 system and adjust the offset to avoid text appearing over the "TiVo guy".


----------



## lee espinoza

I am getting:invalid command name "event"
while executing
"event register $TmkEventII::EVT_USREVENT EventCallback"
invoked from within
"if { [lindex $argv [expr $argc-1]] != "$BackGroundFlag" } {

#
# Running in foreground
#

if { [lindex $argv 0] != "start" } {
# Register for inter..."
(file "/busybox/autospace.tcl" line 169)

what is going on here?

I did some searching and found nothing.

I have TWP+ 1.2.1


----------



## john1980

lee espinoza said:


> I am getting:invalid command name "event"
> while executing
> "event register $TmkEventII::EVT_USREVENT EventCallback"
> invoked from within
> ...
> what is going on here?


Looking at this I would say that you are running a Tivo Software version >= 6. I say this because from what I can gather the "event" command is not supported in release 6 and above.

I have noticed that many TWP modules test the software version and skip any "event send" commands when run on newer releases... so you could try and remove all lines mentioning "event"... however without a EventCallback registered the module would never run.

I only have access to Tivo's running v2.5.5 and v3.0 so am not sure what would be required to get the module working as I am unable to test it.


----------



## philwojo

OK since I am still trying to figure everything out with my hacked TIVO please be patient with me.

I have read through this entire thread, as well as many others. I have the readme file open, but I am unable to get this to work on my series 1 tivo.

I can FTP it over via filezilla, and then I can telnet to the box and do the chmod on it but I can never get the dos2unix command to work on my box. Can anyone either point me to that file (Dos2unix) where I can download it to get it on my Tivo, or give me suggestions to get this hack working on my box.

I think I just need to do the dos2unix and I will be fine. When I try to put in //autospace.tcl it comes back and says:

"no such file or directory"

Any help would be appreciated.

Phil


----------



## philwojo

OK I got mine to work, I had to force it to transer in Binary mode, then everything was fine.

This is such a great Hack.

Phil


----------



## thechachman

What can I say except ... LURVELY :up:


----------



## dase

lee espinoza said:


> I am getting:invalid command name "event"
> while executing
> "event register $TmkEventII::EVT_USREVENT EventCallback"
> invoked from within
> "if { [lindex $argv [expr $argc-1]] != "$BackGroundFlag" } {
> 
> #
> # Running in foreground
> #
> 
> if { [lindex $argv 0] != "start" } {
> # Register for inter..."
> (file "/busybox/autospace.tcl" line 169)
> 
> what is going on here?
> 
> I did some searching and found nothing.
> 
> I have TWP+ 1.2.1


I'm getting the same error on my HDVR2 running 6.2. Anyone get this to work with 6.2?


----------



## cheer

dase said:


> I'm getting the same error on my HDVR2 running 6.2. Anyone get this to work with 6.2?





The README file said:


> Since the Series 2 OSD is different from the Series 1, it cannot work on a Series 2.


So I'm guessing no.


----------



## rbautch

I took a quick look at the tcl code here. It looks like the whole thing is based on the event system, which 6.2 does not have.


----------



## rahlquist

rbautch said:


> I took a quick look at the tcl code here. It looks like the whole thing is based on the event system, which 6.2 does not have.


So there is no hope for DTivo users?


----------



## cheer

rahlquist said:


> So there is no hope for DTivo users?


I don't think there's any hope for any S2 users, except MAYBE the HR10-250 (until/unless it's upgraded).


----------



## cwaring

Note: Tivo re-booted a couple of times yesterday due to short power cuts. No other problems encountered.

Having a little problem and no idea of solution as I don't know Linux. It has worked previously but now refuses to do so.

I have re-read the instructions and all files are present and correct, with the correct line in rc.sysinit.author

However, the autospace.err log has the following entry:

*FATAL: osdcons not active and cannot be started (/tmp/osdconsole not a writable fifo)*

Solutions greatfully accepted 

Edited to add: Can start it manually okay.


----------



## PortlandPaw

Try chmodding 777 the 'osdcons' file.

(I cheated and did a google on your error message and this thread popped up)


----------



## matteous

Is there, or will there be an autospace for the series 2?
I love this module on my series 1.


----------



## BTUx9

matteous said:


> Is there, or will there be an autospace for the series 2?
> I love this module on my series 1.


Unlikely... this program works by hooking the event system... this functionality isn't available on most S2 tivos (anything running s/w higher than 4, basically)


----------



## PhilG

((Can't believe how old this thread is!!!))

Anyway.....

Just discovered that Tivo starts deleting "unwanted" recordings when used space PLUS to-be-recorded-but-keep-until-I-delete hits 100%

I was expecting to have some headroom when my Tivo hit 90% but had a surprising flurry of "expired" deletions!

SO, what I am after is if someone has a modded version of Autospace that ALSO shows the upcoming KUID estimation of space that WILL be used (perhaps in another colour). I know this will be an estimate as no-one knows until a show HAS been recorded how much space each minute will take BUT on our sensibly sized Tivo disks, a reasonable estimation ought to be possible

My problem is, I think I know WHAT needs to be done - I just have no idea HOW to do it 

Thanks (anyone)


----------



## lrhorer

PhilG said:


> ((Can't believe how old this thread is!!!))


That should give you a clue.



PhilG said:


> Just discovered that Tivo starts deleting "unwanted" recordings when used space PLUS to-be-recorded-but-keep-until-I-delete hits 100%


Yep. A full TiVo is a happy TiVo.



PhilG said:


> SO, what I am after is if someone has a modded version of Autospace that ALSO shows the upcoming KUID estimation of space that WILL be used (perhaps in another colour). I know this will be an estimate as no-one knows until a show HAS been recorded how much space each minute will take BUT on our sensibly sized Tivo disks, a reasonable estimation ought to be possible


There's a simpler solution: forget about it. There are two caveats, however. One is: Don't abuse KUID. The other is: Get a large enough hard drive. With a large enough hard drive - typically for a Series III class TiVo about 750G - 1T or for an S1 / S2 TiVo about 130G, the recording space becomes effectively infinite. I never worry about drive space at all, and even though I record hundreds of programs, a couple of my TiVos have non KUID programs on them over a year old.


----------



## ronsch

lrhorer said:


> That should give you a clue.
> 
> Yep. A full TiVo is a happy TiVo.
> 
> There's a simpler solution: forget about it. There are two caveats, however. One is: Don't abuse KUID. The other is: Get a large enough hard drive. With a large enough hard drive - typically for a Series III class TiVo about 750G - 1T or for an S1 / S2 TiVo about 130G, the recording space becomes effectively infinite. I never worry about drive space at all, and even though I record hundreds of programs, a couple of my TiVos have non KUID programs on them over a year old.


I don't know about 130GB being "infinite". I have a 500GB drive in my S1 DTiVo and less than 80GB free.


----------



## pemills

Trying to get autospace (v2.5.5) to work and when following the readme file which says the following;

bash-2.02# /<directory>/autospace

I get the report coming back saying "Permission denied"

Tried to mount the partition as read/write but I just get back

bash: rw: command not found
also tried 
mount -0 remount,rw

no luck there either


----------



## MikeAndrews

lrhorer said:


> ... Get a large enough hard drive. With a large enough hard drive - typically for a Series III class TiVo about 750G - 1T or for an S1 / S2 TiVo about 130G, the recording space becomes effectively infinite. I never worry about drive space at all, and even though I record hundreds of programs, a couple of my TiVos have non KUID programs on them over a year old.





ronsch said:


> I don't know about 130GB being "infinite". I have a 500GB drive in my S1 DTiVo and less than 80GB free.


You just don't have enough interests.

I have 1.25TB in my S3 with 9TB more on the NAS and it has told me on more than one occasion that it can't record any more shows due to being out of space.

The 1500 hours on my S2DT with 500GB does show what infinite looks likes.


----------



## ronsch

pemills said:


> Trying to get autospace (v2.5.5) to work and when following the readme file which says the following;
> 
> bash-2.02# /<directory>/autospace
> 
> I get the report coming back saying "Permission denied"
> 
> Tried to mount the partition as read/write but I just get back
> 
> bash: rw: command not found
> also tried
> mount -0 remount,rw
> 
> no luck there either


The mount option is -o, not -0.


----------



## PhilG

lrhorer said:


> There's a simpler solution: forget about it. There are two caveats, however. One is: Don't abuse KUID. The other is: Get a large enough hard drive. With a large enough hard drive - typically for a Series III class TiVo about 750G - 1T or for an S1 / S2 TiVo about 130G, the recording space becomes effectively infinite. I never worry about drive space at all, and even though I record hundreds of programs, a couple of my TiVos have non KUID programs on them over a year old.


Well, I've got an S1 with around 200Gb BUT we spend most of each year "archiving" movies to watch over Christmas, so there's a big chunk of Tivo occupied with films that we WILL watch, DON'T want deleted but WON'T be watching soon (not so bad in January, but tricky in November/December!)


----------



## pemills

ronsch said:


> The mount option is -o, not -0.


Yeah sorry about the typo, I had entered it right when I was at the bash prompt but typed it wrong when I submitted my question, re-tried a few minutes ago and still getting "permission denied"


----------



## ThreeSoFar

pemills said:


> Yeah sorry about the typo, I had entered it right when I was at the bash prompt but typed it wrong when I submitted my question, re-tried a few minutes ago and still getting "permission denied"


You're on the TiVo itself doing this, or some other Linux distro with the TiVo mounted?

Are you root? Stick a "sudo" in front of the mount if not, or "su root" first.

Is mount in your path? 

which mount

Is it executable? 

ls -al /path/to/mount
chmod +x /path/to/mount


----------



## spitfires

Time for a new version methinks! ;-)

I've taken the latest version I could find (ably ferreted out by mrtickle) and made a few changes.

# 11/09/11 v1.6 [spitfires] 
# Corrected recording calculation for UK TiVi (i.e. s/w v2.5.5)
# Added "stop" as a synonym for "exit" 
# Append to log file rather than create afresh each run (it's in /var/tmp so will be cleared on a reboot)
# Added command-line parameters: 
# -interval xxx - Set cache rebuild interval secs (default 1800)
# -noprogress - Hide the "Getting Data" message
# -nocounts - Hide the recording counts
# -notext - Hide the "Now Playing" text
# -viatc - Refresh cache when going from Tivo Central to Now Playing (shortcutting the timeout)
# (e.g. "autospace.tcl start -interval 300 -nocounts" )
# Changed to retrieve data in the background by default (the previous method can be achieved with the -viatc parameter)
# (Hint: for a minimalist bar use "autospace.tcl start -nocounts -notext -noprogress" )

The biggest changes were to 
(1) fix the fact that 1.5 no longer worked on UK TiVi
(2) default to using a timer for recalculating the counts/space. With increasing use of 1TB discs and therefore lots of recordings this was becoming an issue - it was taking a long time for the program to calculate the used space. By doing it in the background it is also not fighting with the myworld program for database access (e.g. on a TiVo with 150 programs it takes over 30 secs when on the Now Playing screen vs. 9 seconds if done as a background task when TiVo is otherwise idle. Similar figures for a "small" TiVo are 12 seconds and 2.5 seconds respectively).

You now have two choices for deciding when autospace will perform a new "Getting Data..." recalculation:
(i) Every 30 mins in the background (the default)
(i) When you go from TivoCentral to Now Playing, or every 30 mins, whichever comes first.

The rest of the time Now Playing displays the cached data.

E.g. for
(1) autospace.tcl start
(2) autospace.tcl start -viatc

Possible future enhancements :
As Brandon suggested when he first wrote autospace, we could easily trap keypresses and change the info displayed accordingly...  I've put a keypress event handler in the code (but not enabled it yet) in case anyone wants to take this further

.


----------



## mrtickle

This is great, thanks for making those changes! It's quite odd to see the graph there instantly when going into Now Playing  Really nice code too. I got 1.5 from theotherplace I think, can't remember - anyway I hope that people find this version.


----------



## spitfires

Thanks MrT 

One thing I meant to say is that it probably needs amending to detect when a recording starts or stops - at the moment the blob which says it's recording (the one to the right of the status bar) is left in it's last retrieved state, so it appears to be recording when it's not. And vice-versa, if a recording starts in between cache refreshes. I guess the only way to catch this is to also trap the tmkevent for "recording start" and "recording stop" (assuming there is one  ) and refresh the cache at that point.

.


----------



## mikerr

Nice to see some ongoing hack development :up:

Tivo fires an event whenever something is added/deleted from now playing. (EVT_DATA_CHANGE?)

[edit] looked it up:
EVT_DATA_CHANGED and a subtype RECORDINGS_ON_DISK
it's used in mfs_ftp


----------



## spitfires

Thanks Mike. That would be good for recording start (and also could be used to update the counts when a recording is deleted  ), but I don't think that event will trigger when a recording currently in progress _stops_? I'll have to experiment and see...

Edit: Is there a list of the events anywhere (other than in Inc.itcl) ?


----------



## mikerr

Just a minor edit to merge in a "redbar theme" that I've been using for a couple of years with an older autospace 
(and this thread needed pictures!)

autospace.tcl​autospace.tcl start -redbar​


----------



## spitfires

Nice one 

Version 1.6.1 - added a refresh option to refresh the cache on demand :
autospace.tcl refresh

The thinking being that if you use "trickey" you could assign a remote control sequence to perform a refresh on your command :up:

.


----------



## Pete77

spitfires said:


> The thinking being that if you use "trickey" you could assign a remote control sequence to perform a refresh on your command :up:.


Thanks for all your work in updating this as a long term autospace user.

However can you explain your above comment about "if you use "trickey""

With reference to Mike's red bar theme I have to say that I prefer the original yellow bar.

And to those who might say "where you have been lately" the answer is dealing with a nightmare financial matter and also unable to post on the AltEPG forum due to some form of ritual humiliation in the stocks over there which has now ended but as a consequence of which I am now reluctant to take the risk of posting there any more (since certain parties involved in that project seem to take any suggestions about possible future feature enhancements of the AltEPG as being some form of attack or criticism of what they have already managed to achieve).


----------



## spitfires

Pete77 said:


> can you explain your above comment about "if you use "trickey""


Trickey is a well-known TiVo hack.
(included as standard on the AltEPG image incidentally :up: ).


----------



## lrhorer

netringer said:


> You just don't have enough interests.


Interests are not relevant. The TiVo is a FIFO buffer. Once the buffer exceeds a certain size, increasing it produces diminishing returns that eventually go away entirely. If you are recording more than you watch, then no matter how much hard drive space you have, it won't be enough. You are missing the point, though. One way or another, something has to be removed from the recording space. Ordinarily, the oldest items are going to be the least important. If you haven't watched them in over a year, how likely are you to watch them at all?



netringer said:


> I have 1.25TB in my S3 with 9TB more on the NAS and it has told me on more than one occasion that it can't record any more shows due to being out of space.


"It" being the TiVo or the NAS? IF it is the TiVo that is reporting that, it's because you are using KUID. KUID breaks the TiVo management model. Used extremely sparingly, it is OK, but in general it is a bad idea.



netringer said:


> The 1500 hours on my S2DT with 500GB does show what infinite looks likes.


I have a lot more than that, but it is not the point.


----------



## lrhorer

ronsch said:


> I don't know about 130GB being "infinite". I have a 500GB drive in my S1 DTiVo and less than 80GB free.


Then you should fill up the other 80 GB. Otherwise, it's just wasted space. I have over 4TB total on my 3 TiVos, all of them continuously 100% full. That doesn't prevent any of them from continuing to record programs. If the drives were too small, I would run the risk of having a program I want to watch be deleted before I got the chance to watch it. As long as I watch everything I want or else delete it in under about 18 months, I run no risk of losing anything I want. In nearly 11 years, I have never had any of my TiVos delete anything I did not want them to, yet they are always 100% full. How full the TiVo is is not relevant. It is *WHEN* the program becomes a target for deletion that is relevant.


----------



## mrtickle

Version 1.6.2 
- added "gentle" option Followed by a number - set delay time (msecs) when reading data to avoid stuttering/pixellation". Trouble-shooting to avoid pixellation/stuttering with some cachecard tivos when a background update of the stats is happening. It adds a delay after all successful Db reads (as well as the delays between retries after _un_successful Db reads) to give tivoapp a chance.

Ie, my tivo! "-gentle 70" works for me.

- added "darkdel" - Show deleted area of bar in dark blue
- added "stripeydel" - Show deleted area of bar in dark/light blue stripes

I've also added logging of the process's priority. This needs "getpri" which is now included (with many thanks to spitfires for his archive of old binaries being even more extensive than mine!). This is also to troubleshoot the problems I'm having with pixellation.

example command lines:
/var/hack/autospace/autospace.tcl start -interval 1800 -gentle 70 -darkdel >/tmp/autospace.err 2>&1 &
/var/hack/autospace/autospace.tcl start -interval 1800 -gentle 70 -stripeydel >/tmp/autospace.err 2>&1 &

(Edit: updated 30th Sep with spitfire's improved catch code.)


----------



## Pete77

mikerr said:


> Just a minor edit to merge in a "redbar theme" that I've been using for a couple of years with an older autospace
> (and this thread needed pictures!)


So are you saying that your amended version makes the main bar red instead of yellow? If so I 'm inclined to feel that I prefer the yellow bar. Or did you mean something else?


----------



## PhilG

spitfires said:


> Trickey is a well-known TiVo hack.
> (included as standard on the AltEPG image incidentally :up: ).


That doesn't really help those of us who have never heard of Trickey!

Also, a hint (or two) on HOW to use Trickey to trigger a recalculation of space usage might be handy.....

Thanks

Phil G


----------



## mrtickle

Version 1.6.5
Changes for V1.6.5 (mrtickle)
- added "lightdel" option for the background of Deleted recordings
- fixed bug with zero-size recordings


----------

