Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Make Tivo over the Internet

  1. #11
    Join Date
    Feb 2006
    Location
    NSW
    Posts
    19
    Here' s what I get:
    + OLDIP=<tr height=60 align=center valign=top> <td height=60 align=center> 60.228.7.242 <tr height=60> <td height=60 align=center> <tr height=60 align=center valign=bottom> <td height=60 align=center>
    + '[' '<tr height=60 align=center valign=top>
    <td height=60 align=center>
    60.228.7.242
    <tr height=60>
    <td height=60 align=center>
    <tr height=60 align=center valign=bottom>
    <td height=60 align=center>' '!=' '<tr height=60 align=center valign=top> <td height=60 align=center> 60. 228.7.242 <tr height=60> <td height=60 align=center> <tr height=60 align=center valign=bottom> <td height= 60 align=center>' ']'
    + /devbin/wget


    So even though IP and OLDIP seem to be the same, it goes on to the next line (wget) when I think it should just exit.

  2. #12
    Join Date
    Feb 2007
    Location
    NSW
    Posts
    108
    Hmm, the problem is that the script expects your IP to start with 203, but yours starts with 60.
    Therefore your old/new IP is a whole load of html not just the IP
    Try changing the script
    Code:
    IP=`$GREP 203 index.html |$SED 's/<p><b>//g' | $SED 's/<\/b>//g'`
    to
    Code:
    IP=`$GREP 60 index.html |$SED 's/<p><b>//g' | $SED 's/<\/b>//g'`
    Or maybe you've already done that? Because you are getting every bit of html that contains the number 60.
    In which case try changing it to
    Code:
    IP=`$GREP "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" index.html |$SED 's/<p><b>//g' | $SED 's/<\/b>//g'`

  3. #13
    Join Date
    Feb 2006
    Location
    NSW
    Posts
    19
    Well done, that did the trick!
    I had already changed 203 to 60 but never twigged that it was picking up character sizes as well. In any event your solution is better because I see now that Bigpond IP addresses sometimes start with 203.
    The script works fine now, although it still picks up some of the HTML code

    [TiVo [p0] /tmp]# cat /tmp/ip.txt
    <html><head><title>Current IP Check</title></head><body>Current IP Address: 203. 51.17.173</body></html>

    Is this what you would expect?

  4. #14
    Join Date
    Feb 2007
    Location
    NSW
    Posts
    108
    That's because you are using checkip.dyndns.com rather than www.myipaddress.com.
    The script is designed to parse the output from www.myipaddress.com. In fact checkip.dyndns.com is probably easier to use.
    I expect that what you have now will work fine, but if you want a really tidy output from checkip.dyndns.com you could try

    Code:
    CUT=/devbin/cut
    IP=`$CUT -d: -f2 < index.html |  $SED -e :a -e 's/<[^>]*>//g;/</N;//ba' -e 's/^[ \t]*//;s/[ \t]*$//'`
    This uses cut to split the text at the ':', then sed to remove the html tags and leading/trailing whitespace

    (sed scripts from http://www.eng.cam.ac.uk/help/tpl/unix/sed.html)

  5. #15
    Join Date
    Feb 2006
    Location
    NSW
    Posts
    19
    That worked perfectly!

    ++ /devbin/sed -e :a -e 's/<[^>]*>//g;/</N;//ba' -e 's/^[ \t]//;s/[ \t]*$//'
    + IP=203.51.17.173


    Thank you for all your help. You have expanded my knowledge and once again demonstrated what a great forum this is.

  6. #16
    Join Date
    Feb 2007
    Location
    NSW
    Posts
    108
    Good! Glad it works. I've uploaded a modifed version of the script to the WiKi page

  7. #17
    Take a look at the script I created. You might prefer it over the script you are currently using. It doesnt require the username and password in cleartext and will keep activity on your DynDNS account so it isn't deleted.
    http://www.dealdatabase.com/forum/sh...ad.php?t=51840
    Last edited by ciper; 16-08-2007 at 02:20 AM.

Similar Threads

  1. Slingbox - Viewing my TiVo anywhere via the internet
    By SeanOffShotgun in forum New Zealand General Forum
    Replies: 5
    Last Post: 27-02-2008, 07:46 AM
  2. NZ Tivo able to make use of keywords/actors/etc?
    By BenMorgan in forum New Zealand General Forum
    Replies: 1
    Last Post: 29-11-2006, 04:30 PM
  3. Tivo interfering with Internet???
    By kim in forum Question and Answer Forum
    Replies: 2
    Last Post: 29-08-2006, 09:21 PM
  4. cant force phone/internet connect
    By vex in forum Question and Answer Forum
    Replies: 5
    Last Post: 04-04-2006, 01:55 AM
  5. Tivo and No internet
    By Expon in forum Question and Answer Forum
    Replies: 1
    Last Post: 01-11-2005, 07:19 PM

Bookmarks

Posting Permissions

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