|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Powering on and off extender via API?
There's been some clamoring for this capability, and I wasn't aware that the java API included it. I added in the SageCommands of "Power On" and "Power Off", but according to them, those only cause it to go in and out of sleep mode, not actually powering on or off. I've put in "Quit" also, but to my knowledge, that causes Sage itself to quit.
Is there any API command to control the extenders power setting? |
#2
|
||||
|
||||
It can be done with Nielms www server, so it would seem to be possible.
__________________
Server: Ubuntu 16.04 running Sage for Linux v9 |
#3
|
|||
|
|||
I dunno about that, when I do it with the webserver it's only a soft off.
Why do they want to cold boot the thing? |
#4
|
||||
|
||||
Red light off (on my MVPs), to me, meant power off. I didn't think that it was asleep.
__________________
Server: Ubuntu 16.04 running Sage for Linux v9 |
#5
|
|||
|
|||
I believe one of the updates for the MVP was to turn the light off when it was put into soft-off mode with the remote or with the web server - but I'm just going off of memory on this.
|
#6
|
||||
|
||||
When they're off (either extender) they're no longer connected to the server, so there'd be no way to turn them back on.
|
#7
|
|||
|
|||
ok....I didn't know if maybe Sage could write to a network port to turn it back on..some kind of WOL thing.
As for why they want it...well, it's mainly one person, and I think he's having some kind of other issues. He said that the extender tends to freeze up, and a quick "reboot" clears it up. Of course, the better solution would be to figure out why it's freezing, but I think I saw a thread indicating he's not the only one having that issue. The better reason was he said that his extender appeared to shut off by itself after a while...and his extender is in a remote part of the house, so it's cumbersome to have to go to it to turn it back on..it's something he'd rather be able to do remotely. I know many people point to the webserver as proof it can be done, but you're saying that's just the soft on/soft off also? |
#8
|
|||
|
|||
Quote:
__________________
Server : Intel Core i7 2.8 GHz Processor: Gigabyte X58A-UD3R Motherboard: 6 GB Memory : 1 120 GB Intel SSD :3 2 TB WD hard drives:1 Hauppauge PVR 2250: 3 HDHomeRuns:1 HD300 extender;1 HD200 extender;1 HD100 extender 2 MVP Media Extenders: Windows 7 64 bit Home Premium all updates applied, SageTV V7.1.7.254. |
#9
|
|||
|
|||
Quote:
B
__________________
Running SageTV on unRAID via Docker Tuning handled by HDHR3-6CC-3X2 using OpenDCT |
#10
|
|||
|
|||
Man, nielm does all the fancy stuff....
If it involves telneting into the thing to do this on/off thing, then I think I've just about hit the limit of what I'm willing to do to make this work. But what is the "api" of an extender? I can telnet in from the command prompt, but how to I then turn it on or off. Is that documented somewhere? Ya know, I think I downloaded a recent copy of nielms server, I should just browse that. His code is my Rosetta stone... |
#11
|
|||
|
|||
Quote:
B
__________________
Running SageTV on unRAID via Docker Tuning handled by HDHR3-6CC-3X2 using OpenDCT |
#12
|
||||
|
||||
MVP and HD100 both run linux. To power them off (and disconnect from the server), you need to telnet to the extender's IP address, login as root (no password), and then...
For an an MVP you need to run: killall miniclient For an STX-HD100, run poweroff This is the same as hitting the power button on the remote, puts the extender in stanby mode and, most importantly, releases the client licence. To power it back on, find the remote, or run the command: MVP: killall sagewait STX-HD100: unknown, possibly poweron To warm-reboot (same as unplugging power and replugging -- the OS and sage software are reloaded from the server) run: reboot My webserver interface can do poweroff and reboot for an MVP. It may also be able to do it for an HD extender, but some people have reported problems... (the reason it uses ARP is to find the IP address of the extender so that it can connect to it.). There are 'PowerOff' and 'PowerOn' commands in the Sage API, but this just puts the extenders to sleep/screen saver mode. (PS: the lines in my webserver code are here
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki Last edited by nielm; 05-28-2008 at 01:40 AM. |
#13
|
|||
|
|||
Excellent, thanks!
I could just make them enter the IP address of the extender when they install the plugin, so I don't have to search for it...but those can probably be dynamically allocated, can't they? If the extender had a host name, then couldn't I just telnet to that ("telnet hd100") instead of to the IP address? Time to learn how to telnet with java....TCP I can handle, that was easy. |
#14
|
|||
|
|||
I looked at the source code, doesn't look too difficult to understand. The other piece is a static html link or get uber fancy and have it read a list of ip addresses from a properties file. The list to power off MVPs/PS Clients/HD100s is built from a query to the sagetv server.
B
__________________
Running SageTV on unRAID via Docker Tuning handled by HDHR3-6CC-3X2 using OpenDCT |
#15
|
||||
|
||||
Quote:
HD100: killall miniclient HD100: killall waitpower
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2 TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|