|
SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
How to control Client/Server via TCP/IP socket
Hi,
Is is possible to open a network socket to a SageTVClient and then send commands to it in order to control it? Basically, like a remote control but over the network rather then IR. If this is possible, is that any documentation the outlines the process and the commands that can be sent in order to control it? Thanks.
__________________
SageTV Server 7.0.23 - SageTV Client on 50" Plasma - HD100 Extender on 42" Plasma - HD300 on 92" Espon EH-TW3200 Projector 5.1 DB/DTS on all clients. |
#2
|
||||
|
||||
Yep, its very possible, although not quite like you're describing. Check out Neilm's webserver which has a webremote that lets you send commands via HTTP requests.
|
#3
|
|||
|
|||
Actually I think the command are routed to the Sage Server which uses the API to actually control the clients. The end result is the same, but I'm not sure you can control a HD-200 in stand alone mode via this method. There is no connection with the Sage Server in stand alone mode, so there is no communication pathway open.
I know we use this method in CQC to control just about all the variables of a Sage system. But it doesn't work with a HD-200 in standalone mode while it works fine for a HD-200 (or other extenders/clients) that are using the SageTV software connection.
__________________
i7-6700 server with about 10tb of space currently SageTV v9 (64bit) Ceton InfiniTV ETH 6 cable card tuner (Spectrum cable) OpenDCT HD-300 HD Extenders (hooked to my whole-house A/V system for synched playback on multiple TVs - great during a Superbowl party) Amazon Firestick 4k and Nvidia Shield using the MiniClient Using CQC to control it all |
#4
|
||||
|
||||
It's fairly trivial for someone who knows Java to write a background class that runs in the SageTV process, accepts a telnet connection, listens for commands, and passes them to the SageCommand() API method. (This is more or less what the web server does, except that it uses an HTTP connection instead of a telnet connection.)
For clients that execute the UI on the server (i.e. Extender and Placeshifter clients), the listener class must run on the server. For SageTV Client, which executes the UI locally, the listener class must run on the client. (So if you want to control SageTV Client via the web server, you must install it on the client as well as on the server.)
__________________
-- Greg |
#5
|
|||
|
|||
Quote:
http://forums.sagetv.com/forums/down...do=file&id=270
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct. Last edited by nyplayer; 07-17-2009 at 02:19 PM. |
#6
|
|||
|
|||
Both MainLobby and CQC automation software can control and see status of SageTV and Sage Extenders. Both use the TCPServer that Fonceur / Beelzerob have been supporting. All connections are via TCP.
__________________
Allonis LLC. |
#7
|
||||
|
||||
Quote:
Can you point me at the docs to this SageCommand() api, java I hope. Also, any simple examples of how to make my java class install in to sage and any example of how to use the API to execute a commands such as "Play" or something. Point me in the right direction and I'll have a go!
__________________
SageTV Server 7.0.23 - SageTV Client on 50" Plasma - HD100 Extender on 42" Plasma - HD300 on 92" Espon EH-TW3200 Projector 5.1 DB/DTS on all clients. |
#8
|
||||
|
||||
See the Studio Information Resources sticky for links to the SageTV API docs.
Java API docs are at http://java.sun.com/javase/6/docs/api/. There are numerous examples in the Downloads section of plugins that run as background classes in the SageTV process. Some of them (the web server for example) include source, or have links to publicly accessible source. But basically it's just a matter of implementing the Runnable interface and adding your fully-qualified class name to the load_at_startup_runnable_classes property.
__________________
-- Greg |
#9
|
||||
|
||||
thanks that's a big help.
I've downloaded; sagex.api-6.5.15-5.zip I've upzipped this into my server (JARS) and restarted it. Is there something else I need to do configuration wise, as typing this; http://<my-server-ip>/sagex/api into the browser is doing nothing? From the docs Quote:
Quote:
__________________
SageTV Server 7.0.23 - SageTV Client on 50" Plasma - HD100 Extender on 42" Plasma - HD300 on 92" Espon EH-TW3200 Projector 5.1 DB/DTS on all clients. |
#10
|
||||
|
||||
Quote:
EDIT: BTW, I just updated the wiki, because I realized the install instructions for jetty was outdated.
__________________
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 Last edited by stuckless; 07-17-2009 at 04:01 PM. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SageTV: DVB-S2 streaming ueber TCP/IP | popdog | SageTV Germany | 2 | 06-16-2009 01:11 AM |
Delay and double clicks while controlling extender via TCP | personalt | SageTV Media Extender | 2 | 09-17-2008 05:23 PM |
Hauppauge's TCP/IP Optimization | Taddeusz | SageTV Media Extender | 2 | 06-14-2007 01:11 PM |
2-way TCP control of SageTV from CQC, anyone? | IVB | SageTV Customizations | 5 | 08-26-2006 09:06 PM |
W/PVR250 in client can client remote control server? | mdmint | General Discussion | 8 | 05-01-2004 07:33 PM |