SageTV Community  

Go Back   SageTV Community > General Discussion > The SageTV Community
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

The SageTV Community Here's the place to discuss what's worth recording, HTPC deals at retail stores, events happening outside of your home theater, and pretty much anything else you'd like. (No For-Sale posts)

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-28-2010, 05:38 AM
mikejaner's Avatar
mikejaner mikejaner is offline
Sage Icon
 
Join Date: Oct 2003
Location: Chantilly VA
Posts: 2,087
Send a message via MSN to mikejaner
Terraterm scripting

Does anybody know alot about terraterm scripting?
I set up a script to reboot my HD200's and HD300s when my SageTV server restarts, and that all works great.
The question I have is about a network device I have called iBoot, which resets the power to any device I have plugged into it. In this case the HDPVR.
I found the protocol for resetting the device via telnet, but cannot figure out how to script it in terraterm.
By typing telnet 192.168.1.10:80 I get a blank terminal with a blinking cursor. Then by hitting the ESC key, typing the iBoot password, hitting the ESC key, typing c, then hitting enter, it reboots. I just don't know how to send the ESC key in a terraterm script, and chain it together with other commands.
__________________
Mike Janer
SageTV HD300 Extender X2
Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5
Reply With Quote
  #2  
Old 09-28-2010, 06:24 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
While I know nothing about terraterm scripting... the iboot device looked interesting, so I decided to check it out.

personally, I think your best bet is to use a scripting language to control it (rather than a terminal), and they've been nice enough to provide a perl and php sample code that allows you to perform a reboot of the device (and other actions). Since i know perl, i looked at their boot.off script, and seems pretty straight forward, where they pass the control string with escapes to the device.
Reply With Quote
  #3  
Old 09-28-2010, 07:26 AM
JetreL's Avatar
JetreL JetreL is offline
Sage Aficionado
 
Join Date: Jun 2008
Location: Charlotte, NC
Posts: 388
If you were using Linux this would be fairly trivial with a shell script but since you are asking about Tera term I believe you can record a macro that would do it. I honestly haven't used Tera term in over 8 years. Another telnet client that may have the functionality of doing a startup script as well would be putty. Putty. Also here is the help page for using macros in Tereterm. Teraterm Macros

If that doesn't work you could install Perl for windows and write a perl script using the telnet module in perl.
Link

I know this doesn't answer your original question but hopefully this gives you a few more options.

Last edited by JetreL; 09-28-2010 at 07:30 AM.
Reply With Quote
  #4  
Old 09-28-2010, 07:41 AM
JetreL's Avatar
JetreL JetreL is offline
Sage Aficionado
 
Join Date: Jun 2008
Location: Charlotte, NC
Posts: 388
This seemed like fun so I tried my hand at it fairly quickly. Here would be my take on what you need to do:

Code:
   
timeout 30
connect'192.168.1.10:80'
    wait 'PASSWORD' 
    sendln 'YOURIBOOTPASSWORDGOESHERE'
  pause 3
    sendln '^['
    sendln 'c' 
    sendln '^M'
  pause 5
end
This should wait for the Word password to pop up on the screen. Change it as necessary.

This may not work because I am sending the ASCII characters. Looking at the examples you need to send a # and then the ascii code associated with it. Link to examples and here is a listing of the complete ASCII Character Sets

Last edited by JetreL; 09-28-2010 at 07:53 AM.
Reply With Quote
  #5  
Old 09-28-2010, 08:56 AM
mikejaner's Avatar
mikejaner mikejaner is offline
Sage Icon
 
Join Date: Oct 2003
Location: Chantilly VA
Posts: 2,087
Send a message via MSN to mikejaner
Thanks so much for all the help guys. I got it figured out, just needed that little nudge in the right direction. Perl was the way I was about to go, but the script and links from JetreL got me going with Terraterm on windows.
Here's the final script which worked with the iBoot:

connect'192.168.1.10:80'
pause 3
sendln #27'password'#27'c'

Since the iBoot gives no password prompt, or any prompt whatsoever, I basically told it to wait for three seconds and then send the command string

Along with my HD200 and HD300 Scripts Terraterm does the job for making sure my devices all reboot when SageTV(OS) reboots now!!
Again, thanks guys
__________________
Mike Janer
SageTV HD300 Extender X2
Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5
Reply With Quote
  #6  
Old 09-28-2010, 09:16 AM
JetreL's Avatar
JetreL JetreL is offline
Sage Aficionado
 
Join Date: Jun 2008
Location: Charlotte, NC
Posts: 388
Great! Years ago I was a Sysadmin at an ISP. We had telnet-able power strips. We did a good deal of scripting like this that integrated with monitoring software. It worked awesome. Especially when you had issues at 2:00 in the morning and didn't want to drive 30 minutes to reboot a server that had hung for some strange reason. You might want to put a timeout and end statement in the script in case it hangs. Glad it worked!!
Reply With Quote
  #7  
Old 09-28-2010, 12:29 PM
mayamaniac's Avatar
mayamaniac mayamaniac is offline
Sage Icon
 
Join Date: May 2004
Posts: 2,177
iBoot seems interesting, but a bit pricey ($200+) for what it does.

Just curious, after reboot, doesn't the HD-PVR needs to be power on manually with the press of the button in front of the unit?
__________________
Mayamaniac

- SageTV 7.1.9 Server. Win7 32bit in VMWare Fusion. HDHR (FiOS Coax). HDHR Prime 3 Tuners (FiOS Cable Card). Gemstone theme.
- SageTV HD300 - HDMI 1080p Samsung 75" LED.
Reply With Quote
  #8  
Old 09-28-2010, 12:31 PM
gplasky's Avatar
gplasky gplasky is offline
SageTVaholic
 
Join Date: Jul 2003
Location: Howell, MI
Posts: 9,203
Quote:
Originally Posted by mayamaniac View Post
iBoot seems interesting, but a bit pricey ($200+) for what it does.

Just curious, after reboot, doesn't the HD-PVR needs to be power on manually with the press of the button in front of the unit?
No. I've just pulled the plug and plugged it back in and the HD-PVR turns on just fine.

Gerry
__________________
Big Gerr
_______
Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB.
Reply With Quote
  #9  
Old 09-28-2010, 01:41 PM
mikejaner's Avatar
mikejaner mikejaner is offline
Sage Icon
 
Join Date: Oct 2003
Location: Chantilly VA
Posts: 2,087
Send a message via MSN to mikejaner
Quote:
Originally Posted by mayamaniac View Post
iBoot seems interesting, but a bit pricey ($200+) for what it does.

Just curious, after reboot, doesn't the HD-PVR needs to be power on manually with the press of the button in front of the unit?
Mine was given to me

Also, looks like you can get them on ebay for $160. http://cgi.ebay.com/DataProbe-iBoot-...item53e3bfd151
Still too pricey if you ask me, but really convenient.
__________________
Mike Janer
SageTV HD300 Extender X2
Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5

Last edited by mikejaner; 09-30-2010 at 10:51 AM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Utility: Sage Scripting Framework stuckless SageTV Customizations 6 01-19-2009 01:00 PM


All times are GMT -6. The time now is 06:07 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.