![]() |
|
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) |
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
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 |
#2
|
||||
|
||||
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.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#3
|
||||
|
||||
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. |
#4
|
||||
|
||||
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 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. |
#5
|
||||
|
||||
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 |
#6
|
||||
|
||||
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!!
|
#7
|
||||
|
||||
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. |
#8
|
||||
|
||||
Quote:
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. |
#9
|
||||
|
||||
Quote:
![]() 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. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Utility: Sage Scripting Framework | stuckless | SageTV Customizations | 6 | 01-19-2009 01:00 PM |