TiVo Community Forum banner
1 - 20 of 2705 Posts

·
TiVoer since 11/2000
Joined
·
6,341 Posts
Discussion Starter · #1 ·
Note: the original version of DailyMail has now been superceded by tivo_onion's Jazz version, which can be found lower down the thread (here at the the time of writing.)

Ian was mentioning the other day about his daily routine for checking that his TiVo was all set up for the day's recordings. I know that I haven't the patience for that - heck, I know I haven't even got the patience to check via TiVoWeb on my coffee break. If such a system was to work for me, it would have to be more pro-active.

So I wrote this script.

It sends me an e-mail at work every day, telling me:

* If the TiVo has rebooted recently
* If the last daily call failed
* What unresolved conflicts are coming up
* What programmes are about to expire
* What the TiVo is planning to record that day

Here is an example of what it sends.

I wrote it for my own amusement, and I certainly don't want to get into a big round of bug fixing and beta testing, but I offer it here in case its of use to anyone else, or if someone wants to use it as the basis for something better.

Most of the code is adapted, filched and straight copied from various TiVoWeb modules - if I've omitted a credit in the code my apologies. I thank those authors for their great work.

To use it you'll need to edit the .tcl file - preferably on the TiVo using joe or vi, or on the PC if you have a Unix compatible text editor. If not you'll need to run it through DOS2UNIX or similar to get it back in Unix format. There are some variables at the top you'll need to set as a minimum:

- the e-mail address to send the mail to
- the IP address of your ISP's SMTP server (must be an IP as TiVo has no DNS lookup)
- your domain name

Some have also found it necessary to tweak the exact commands sent to the mail server - see the posts below for details if you are having problems; most have been incorporated into the code now. In particular, if your ISP mail server requires authentication see here

The file dailymail.tcl will need to be made executable with

chmod 755 dailymail.tcl

You need to have TiVoWeb 1.9.4 installed - DailyMail is not compatible with the TiVoWebPlus hack, but there are workarounds, see below. And an always-on internet connection. This script will not work using the TiVo's modem - it must be able to connect to the net via your network

I have a cron job set up to run it every morning.

Feel free to take this code and run with it - just please post anything cool you add or fix!
 

Attachments

·
Registered
Joined
·
862 Posts
Will dailymail automatically include the latest number of asylum seekers and the dangers of interest rates rising, or do I need to edit the tcl file?
 

·
Registered
Joined
·
74 Posts
Stuart,

Two things.

1. Haven't you got a job? (Tivo are you listening?)

or

2. Haven't you got a life?

Some amazing stuff kicking around in that head of yours....:D

James
 

·
Tivo is getting old
Joined
·
215 Posts
Great, now to make me look thick (not hard generally)?

How do I find the IP address of my ISP's SMTP server (mail.btconnect.com)?

my domain - I take this as the @xxxx bit

as my emails address is [email protected] the domain is btconnect.com , True?

have not a clue how to set up a a "cron job" to run it every morning. How do I get it to send every morning?

thanks
 

·
Registered
Joined
·
14 Posts
how do i find the ip address of the smtp server?

look in outlook or whatever your mail client is and see what your outgoing mailserver is called, then if you run win nt/2000/xp type on a command line 'nslookup <the server name here>'

not sure about tivo but in unix 'crontab -e' allows you to edit the crontab, you want to make a timed entry for a specific time each day, under day you enter '*' to mean everyday, i think i'm right in saying 0 is sunday, 1 is monday, upto saturday which is 6, if you only want it on specific days.

maybe someone can clarify this.
 

·
Registered
Joined
·
862 Posts
Script works just great - cheers!

(Eventually) tracked down Cron - http://www.tivocommunity.com/tivo-vb/showthread.php?s=&threadid=69877&highlight=cron

Looks v. complicated - I'll have to work out how to get it to run each morning tomorrow I think! Anyone got any tips?

BTconnect should have an IP of 193.113.154.2 - hit start, then run in windows, then type CMD and press enter. then just type ping mail.btconnect.com to find out the ip address. And yes, that's your domain - but I don't think it does anything other than form the 'From' address in the Tivo email.
 

·
Registered
Joined
·
11 Posts
I get the following error:

object not found (errNmNameNotFound)

while executing
"mfs find $guideindexdir/ChannelTable"
("uplevel" body line 2)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 5)
invoked from within
"RetryTransaction {
set channeltablefsid [lindex [mfs find $guideindexdir/ChannelTable] 0]
set channeltabledata [mfs get $channeltablefsid]..."
(procedure "init_channelindex" line 58)
invoked from within
"init_channelindex"
(file "/var/hack/tivoweb-tcl/modules/index.itcl" line 658)
invoked from within
"source /var/hack/tivoweb-tcl/modules/index.itcl"
(file "/var/hack/dailymail.tcl" line 445)

Any help?

Thanks,
rAndy
 

·
Tivo is getting old
Joined
·
215 Posts
Thanks, think I have got it - except for the crone bit. Tool late to worry tonight ( just got back from a 9-8 penalty shoot out?).

If anyone out there is sleepless, maybe an idiots guide exacly what I need to run on the tivo for the "cron" stuff. Got tivoweb etc etc working , but only by following idiots guides
 

·
Ex TiVo User
Joined
·
4,184 Posts
Originally posted by tivo_boj
Great, now to make me look thick (not hard generally)?

How do I find the IP address of my ISP's SMTP server (mail.btconnect.com)?

my domain - I take this as the @xxxx bit

as my emails address is [email protected] the domain is btconnect.com , True?
Try ping mail.btconnect.com from the command prompt on your PC.

Some of the big email providers can have more than one mail server (to ease the load / increased reliability). Thus it's possible when you ping a mailserver by it's DNS name you make get a diferent IP number.

Automan.
 

·
TiVoer since 11/2000
Joined
·
6,341 Posts
Discussion Starter · #10 ·
Originally posted by randymc
I get the following error:

object not found (errNmNameNotFound)

while executing
"mfs find $guideindexdir/ChannelTable"

rAndy
Check the version3 variable at the start of the code, should be false if v2 or true if v3. No idea about v4. :)
 

·
TiVoer since 11/2000
Joined
·
6,341 Posts
Discussion Starter · #11 ·
cron's a bit complicated.

I did it like this (from memory so replace the xxx's with the real names!):

1) copy the xxx.tar.gz file to /var/hack
2) gzip -d xxx.tar.gz to get to the xxx.tar
3) cpio -idu -H tar < xxx.tar which will create a directory of xxx
4) cd xxx to that directory
5) Make everything there executable with chmod 755 *
6) There is a .sh script in the directory, run it with ./xxx.sh which will create a load of subdirectories of /var/hack
7) Copy the crontab file (the text file which sets what cron does) to /var/hack/etc with mv crontab /var/hack/etc/crontab
8) Copy the cron program itself to /var/hack/bin with mv cron /var/hack/bin/cron
9) If you've followed one of the usual hacking guides /var/hack/bin will be in your path so you can now run cron with cron &, if not use /var/hack/bin/cron &
10) Open the /var/etc/crontab file with joe or your preferred editor. The last line is an example cron job wich just modifies a file to see if its working. Delete that line, and to run dailymail.tcl every weekday at 8am add this one:

0 8 * * 1-5 /var/hack/dailymail.tcl &

11) So it survives reboots, add the line
/var/hack/bin/cron &
to rc.sysinit.author
 

·
Gold Member
Joined
·
105 Posts
Blimey, that's good :)

Do you have trouble sleeping with all these thoughts that keep going through your head ?
 

·
Registered
Joined
·
862 Posts
Thanks for the cron help - i had to change a few bits to make it work with the cron link above, but it looks like it will work - we'll find out in the morning!

Dailymail caused my Tivo to reboot this afternoon when it was run through a bash prompt - no idea why, sorry!
 

·
Tivo is getting old
Joined
·
215 Posts
Originally posted by sanderton
cron's a bit complicated.

I did it like this (from memory so replace the xxx's with the real names!):

1) copy the xxx.tar.gz file to /var/hack
2) gzip -d xxx.tar.gz to get to the xxx.tar
............. etc
being really thick now - what is programme xxx, anyone know the real name and where I ge it :confused:
 

·
Registered
Joined
·
70 Posts
Originally posted by tivo_boj
being really thick now - what is programme xxx, anyone know the real name and where I ge it :confused:
You'll find it in the lost post of the thread pointed to here:
Originally posted by bobnick
Script works just great - cheers!

(Eventually) tracked down Cron - http://www.tivocommunity.com/tivo-vb/showthread.php?s=&threadid=69877&highlight=cron

Looks v. complicated - I'll have to work out how to get it to run each morning tomorrow I think! Anyone got any tips?

BTconnect should have an IP of 193.113.154.2 - hit start, then run in windows, then type CMD and press enter. then just type ping mail.btconnect.com to find out the ip address. And yes, that's your domain - but I don't think it does anything other than form the 'From' address in the Tivo email.
Specifically, go here and get cron-3.0pl1_TiVo-2.tar.gz (that should tell you what "xxx" is, too).
 

·
Registered
Joined
·
862 Posts
Read further up the thread, and follow the readme files that come with it - you'll need to change the insructions in this thread slightly (as the files go in a different place)
 

·
Registered
Joined
·
70 Posts
set domain yourdomain.com ;# your domain
What do I do here? I'm sending the email to a hotmail.com address (and, as such, am using their mail server). I assume this has nothing to do with my Windows domain nor with my ISP.

p.s. This sounds great -- exactly what I do by hand and wish I had a quick tool for!
 

·
Tivo is getting old
Joined
·
215 Posts
Thanks,

got it now, just configuring files to see if I can get the cron job working
 

·
TiVoer since 11/2000
Joined
·
6,341 Posts
Discussion Starter · #20 ·
Originally posted by horwitz
What do I do here? I'm sending the email to a hotmail.com address (and, as such, am using their mail server). I assume this has nothing to do with my Windows domain nor with my ISP.
You need to set this to be the internet domain that you are sending from and which appears in your outgoing e-mails, often something like accountname.isp.com.

The mailserver needs to be the IP addess of your ISP's outgoing SMTP server, not hotmail. Check your e-mail client's preferences to see what the name of it is, then (as suggested above) use ping to find out the IP address.
 
1 - 20 of 2705 Posts
Top