SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Media Extender
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Media Extender Discussion related to any SageTV Media Extender used directly by SageTV. Questions, issues, problems, suggestions, etc. relating to a SageTV supported media extender should be posted here. Use the SageTV HD Theater - Media Player forum for issues related to using an HD Theater while not connected to a SageTV server.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-21-2009, 08:11 PM
personalt's Avatar
personalt personalt is offline
Sage Advanced User
 
Join Date: Apr 2008
Posts: 243
HD200 - Rebooting From Command Line

With the HD100 there was a mini-application/script I could call to reboot the box. This doesnt seem to work with the HD200

Does anyone have a way to remotely reboot?

My server and extender are the closet and I am controlling via CQC. anytime I reboot the machine the connection drops and I have head down to the closet to reboot.
Reply With Quote
  #2  
Old 01-22-2009, 12:55 PM
cenwesi cenwesi is offline
Sage Aficionado
 
Join Date: Aug 2005
Posts: 311
telnet into the hd200 and i believe the login ID=root with no password.
and issue the reboot command at the shell. That worked for me
Reply With Quote
  #3  
Old 01-25-2009, 09:48 PM
jwpicard jwpicard is offline
New Member
 
Join Date: Jan 2008
Posts: 4
I am assuming you want to reboot your server not the HD200

create a batch file called whatever, mine is called reboot.bat. Inside that put the following command - shutdown -r t 05
the -r tells it to reboot and the t 05 says to wait for 5 seconds. Then just add this as an external command on your menu somewhere.

I also schedule this to run at 7 am becuase I have it on Windows XP and it seems to perform better with a daily reset.
Reply With Quote
  #4  
Old 01-26-2009, 03:07 AM
matt91's Avatar
matt91 matt91 is offline
Sage Icon
 
Join Date: Feb 2005
Location: Washington, DC
Posts: 1,185
Quote:
Originally Posted by jwpicard View Post
I am assuming you want to reboot your server not the HD200
I think he means the extender. The server gets rebooted, but then the extender is out of sync, and needs to be restarted too.
__________________
Server: Ubuntu 16.04 running Sage for Linux v9
Reply With Quote
  #5  
Old 01-26-2009, 09:13 AM
Eckwell's Avatar
Eckwell Eckwell is offline
Sage Aficionado
 
Join Date: Apr 2007
Posts: 289
Quote:
Originally Posted by cenwesi View Post
telnet into the hd200 and i believe the login ID=root with no password.
and issue the reboot command at the shell. That worked for me
Can you give me the syntax to use telnet in this way? This would be great to set up each time the server reboots (for whatever reason!) WAF would go up a few tenths...
__________________
Eckwell / Chicago, IL
SERVER: AMD Phenom III 8750 Black / 4 GB / XP Pro / JV1.6.24 / V7 / 2 PVR-HD (DirectTV) & HDHR (2xATSC)
STORAGE: WD Raptor36GB boot / 11TB in 2 eSATA enclosure
DEFAULT STV
Comskip triggered by DirMON2 --- HD100 / HD200 /HD300
BMI fanart
Reply With Quote
  #6  
Old 01-26-2009, 12:29 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 Eckwell View Post
Can you give me the syntax to use telnet in this way? This would be great to set up each time the server reboots (for whatever reason!) WAF would go up a few tenths...
[If your HD200's ip was 192.168.1.200]

Start--Run--cmd
telnet 192.168.1.200
root
[NO PASSWORD]
reboot
__________________
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; 01-26-2009 at 12:33 PM.
Reply With Quote
  #7  
Old 01-26-2009, 12:31 PM
cenwesi cenwesi is offline
Sage Aficionado
 
Join Date: Aug 2005
Posts: 311
Simple:

meSvr$: telnet 192.168.1.13

Trying 192.168.1.13...
Connected to 192.168.1.13.
Escape character is '^]'.

STP-HD200 login: root

Once you are in... simply issue the command:

meSvr$: reboot now

thats it...
Reply With Quote
  #8  
Old 01-26-2009, 02:07 PM
QueOnda's Avatar
QueOnda QueOnda is offline
Sage Icon
 
Join Date: Jan 2008
Posts: 1,093
Or you can use the Neilm's webadmin and has an option to power off or reboot.

Last edited by QueOnda; 01-26-2009 at 02:09 PM.
Reply With Quote
  #9  
Old 01-31-2009, 09:35 PM
personalt's Avatar
personalt personalt is offline
Sage Advanced User
 
Join Date: Apr 2008
Posts: 243
I found a good solution. the file that is attached will script a batch file for reboot the HD200. just edit the ip file with the of your extender(s)

I found the application here, I take no claim to it other then it seems to work good
http://www.techidiots.net/autoit-scripts/telnet-batch
Attached Files
File Type: zip telnet_batch2.zip (181.2 KB, 449 views)
Reply With Quote
  #10  
Old 03-31-2009, 07:55 AM
mangriotis mangriotis is offline
Sage Aficionado
 
Join Date: Mar 2003
Location: Elgin, IL
Posts: 345
Theoretically, by putting telnet_batch2.exe into the startup folder on my WHS machine, this should reboot the HD200 after a restart of the server, correct?

I would like to have the HD200 restart and be "on" and ready after the WHS machine installs updates and reboots (or after any other service interruption or reboot). Will this accomplish that task?
__________________
m2
Reply With Quote
  #11  
Old 03-31-2009, 11:37 AM
personalt's Avatar
personalt personalt is offline
Sage Advanced User
 
Join Date: Apr 2008
Posts: 243
yes... two things to think about are

1. you need is a static ip on the HD200.
2. the sagetv service doesnt start up as quick as the computer so if you star the extender really fast it might not find the sage server. In my pc I ping the server ip for 120 seconds before I reboot the extender. This allows the server time to start sage. I am sure there are other timers but pinging myself works fine.
Reply With Quote
  #12  
Old 03-31-2009, 12:57 PM
mangriotis mangriotis is offline
Sage Aficionado
 
Join Date: Mar 2003
Location: Elgin, IL
Posts: 345
Would I place that ping command within the Function.txt file then?

So, it would look like this:
"root

ping 127.0.0.1 -n 120 > nul
reboot"

Or, should I create a batch file like this,
"ping 127.0.0.1 -n 120 > nul
telnet_batch2.exe"

and put that into my startup folder?
__________________
m2
Reply With Quote
  #13  
Old 03-31-2009, 01:19 PM
personalt's Avatar
personalt personalt is offline
Sage Advanced User
 
Join Date: Apr 2008
Posts: 243
I do it the second way.. the timer is in my batch file that precedes calling telnet_batch2.exe.
Reply With Quote
  #14  
Old 04-01-2009, 12:53 PM
babgvant babgvant is offline
Sage Icon
 
Join Date: Jul 2008
Location: London
Posts: 1,834
Quote:
Originally Posted by mangriotis View Post
Theoretically, by putting telnet_batch2.exe into the startup folder on my WHS machine, this should reboot the HD200 after a restart of the server, correct?
items in the startup folder execute when you log on, so if you did this in the admin's account it would reboot the extender each time you started the WHS console.
__________________
babgvant.com | @babgvant | Missing Remote
Reply With Quote
  #15  
Old 04-01-2009, 02:33 PM
mangriotis mangriotis is offline
Sage Aficionado
 
Join Date: Mar 2003
Location: Elgin, IL
Posts: 345
Yeah, I figured this out quickly...

I created a scheduled task that runs a batch file called "rebootHD200.bat". This is scheduled "When my computer starts".

However, it doesn't seem to be executing as expected. I need to look at it a bit further...
__________________
m2
Reply With Quote
  #16  
Old 04-02-2009, 03:24 AM
hugenbdd hugenbdd is offline
Sage Advanced User
 
Join Date: Feb 2009
Location: Cincinnati, KY
Posts: 81
Here's how I did it.

I couldn't use VBS sendkey commands as I would not be logged into the server and it can't find the telnet window.

SO, I have had to download and register a dll.
Download the item called w3Sockets
http://www.dimac.net/default3.asp?M=...loadsstart.asp
(Yes, you need to send an email so you can get the DL link).
Extract and register the dll. (I put mine in windows\system32)

regsvr32 C:\WINDOWS\system32\Socket.dll

I have a bat file that stops and starts the SageTV service every night. (see Included File)
Make sure that you have the "logs directory" c:\logs\ etc... or wherever you may change it.

--Restart Bat File--
net stop SageTV >> c:\logs\sagecycle.log 2>&1
net start SageTV >> c:\logs\sagecycle.log 2>&1
"C:\Documents and Settings\Administrator\Desktop\telnet2.vbs"
--End Restart Bat File--

I have the bat file setup in scheduler to restart at 4:30am every day.

The file telnet2.vbs is a script fie that utilizes the w3Sockets sockets.dll. (See included file) It will login to the ip address given.
Change this to your extender IP address.

Add as many function calls as you need 1 for each IP address of your extenders. I have two HD200 extenders to I have two function calls.
(frebootHD is the function call, the first two lines).

-- start telnet2.vbs --
frebootHD("192.168.1.24:23")
frebootHD("192.168.1.26:23")

Function frebootHD(HOST)
'WScript.Echo HOST
Dim oSocket, iErr, sSocketText
sSocketText = ""
Set oSocket = CreateObject("Socket.TCP")
oSocket.DoTelnetEmulation = True
oSocket.TelnetEmulation = "TTY"

'oSocket.Host = "192.168.1.24:23"
oSocket.Host = HOST

oSocket.TimeOut = 5000
On Error Resume Next
oSocket.Open
WScript.Sleep 500
sSocketText = oSocket.GetLine

iErr = Err.Number
'WScript.Echo Err.Number
If iErr = 0 Then
'WScript.Echo "Logging In!"
sSocketText = oSocket.GetLine
oSocket.SendLine "root"
WScript.Sleep 500
sSocketText = oSocket.GetLine
oSocket.SendLine "reboot now"
WScript.Sleep 500
sSocketText = oSocket.GetLine
End If

oSocket.Close

End Function

--end telnet2.vbs--

This works well for if you use the Windows MCE remote as now you don't have to keep the standard remote around to power on the HD200 after a restart of the services.

If found most of the code to do this at http://www.visualbasicscript.com/m_38306/tm.htm


Please do not put the -- comments -- in your files, they are just there to mark the code in this post.

Dave
Attached Files
File Type: zip restartsage.zip (665 Bytes, 309 views)
Reply With Quote
  #17  
Old 04-03-2009, 07:56 AM
mangriotis mangriotis is offline
Sage Aficionado
 
Join Date: Mar 2003
Location: Elgin, IL
Posts: 345
Thanks very much Dave.

My batch file now looks like this:
---start rebootHD200.bat---
ping 127.0.0.1 -n 60 >nul
telnet2.vbs
---end rebootHD200.bat---

It works great. Now, whenever the server reboots, my HD200 will come up a couple minutes later (haven't measured the total reboot time yet, but the 60s wait is long enough on my system that the Sage service is already running and it auto-connects).

This improves WAF significantly.

I haven't found a need to reboot the server regularly yet, but it's easy to add that task to the schedule also should it become necessary. Thanks again.
__________________
m2
Reply With Quote
  #18  
Old 04-04-2009, 09:00 PM
shadeblue.com's Avatar
shadeblue.com shadeblue.com is offline
Sage Aficionado
 
Join Date: Jun 2008
Posts: 435
Quote:
Originally Posted by personalt View Post
With the HD100 there was a mini-application/script I could call to reboot the box. This doesnt seem to work with the HD200

Does anyone have a way to remotely reboot?

My server and extender are the closet and I am controlling via CQC. anytime I reboot the machine the connection drops and I have head down to the closet to reboot.

Does this utility reboot EXE not work to reboot the HD200?
http://forums.sagetv.com/forums/down...do=file&id=251

I don't have a HD200 so I can't test it, but if you give me the exact log of the console displayed when accessing it via TELNET, I can update this program to fix it.

For example, here is how the current version works against the HD100

Login Prompt:
Code:
em86xx login:  root<enter>
password: <enter>
If login attempt is invalid, the following is returned by the extender:
Code:
login incorrect
If login attempt is successful, the following is returned by the extender:
Code:
em86xx[/root]#
To issue a POWER ON instruction, I send this command:
Code:
killall waitpower<enter>
To issue a POWER OFF instruction, I send this command:
Code:
killall miniclient<enter>
To issue a REBOOT instruction, I send this command:
Code:
reboot<enter>

If somebody can update the telnet command syntax for the HD200, I will be happy to update this utility program.

Thanks, SB
__________________
Server Hardware: Intel Core 2 Quad Q6700 2.66GHz CPU, 4GB DDR2 RAM, NVIDIA nForce 780i SLI Motherboard, GeForce 8600 GT, Seagate Barracuda 7200.11 2.5TB
Operating System: Windows XP Professional
HTPC/DVR Software: SageTV 7
Capture Devices: 2 @ Hauppauge HD-PVR (1212), Hauppauge WinTV-HVR-1600 ATSC/QAM, HD Homerun
Media Extenders: 2 @ Sage HD100 & 1 @ Sage HD200
Signals/Providers: AT&T UVerse, OTA ATSC
Set-Top-Box: 2 @ Motorola Box VIP 1200
Reply With Quote
  #19  
Old 04-05-2009, 12:21 PM
mangriotis mangriotis is offline
Sage Aficionado
 
Join Date: Mar 2003
Location: Elgin, IL
Posts: 345
The syntax for the HD200 is in this thread and is quite simple I think.

Code:
root
reboot now
the vbs solution is working for me, and your exectrl seemed to only indicate the HD100, so I didn't try it.
__________________
m2
Reply With Quote
  #20  
Old 04-05-2009, 06:49 PM
shadeblue.com's Avatar
shadeblue.com shadeblue.com is offline
Sage Aficionado
 
Join Date: Jun 2008
Posts: 435
Quote:
Originally Posted by mangriotis View Post
The syntax for the HD200 is in this thread and is quite simple I think.

Code:
root
reboot now
the vbs solution is working for me, and your exectrl seemed to only indicate the HD100, so I didn't try it.
Do you know if the POWER ON and POWER OFF commands are the same?

Thanks, SB
__________________
Server Hardware: Intel Core 2 Quad Q6700 2.66GHz CPU, 4GB DDR2 RAM, NVIDIA nForce 780i SLI Motherboard, GeForce 8600 GT, Seagate Barracuda 7200.11 2.5TB
Operating System: Windows XP Professional
HTPC/DVR Software: SageTV 7
Capture Devices: 2 @ Hauppauge HD-PVR (1212), Hauppauge WinTV-HVR-1600 ATSC/QAM, HD Homerun
Media Extenders: 2 @ Sage HD100 & 1 @ Sage HD200
Signals/Providers: AT&T UVerse, OTA ATSC
Set-Top-Box: 2 @ Motorola Box VIP 1200
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
HD200 HDMI not not working RodEvan SageTV Media Extender 2 01-17-2009 02:05 PM
WHo was provided client license to use HD200 in 6.4? TwistedMelon SageTV Media Extender 4 12-22-2008 11:03 PM
HD200 as Germany-US placeshift clieent HellerMD98 SageTV Media Extender 4 12-22-2008 07:00 AM
Sigma SMP8635LF (HD200) vs EM8620L (HD100) & Capability Video/Audio voidpt SageTV Media Extender 4 12-10-2008 04:56 PM
HD200 initial impressions jmv SageTV Media Extender 12 12-10-2008 11:56 AM


All times are GMT -6. The time now is 12:25 AM.


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