|
SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
Service mode vs client in v7
I am trying to get SageTCPServer to be configurable within the plugin interface... Currently, one instance is loaded from sage.properties (to pull the list of recordings and so on, or to control extenders) and another is loaded on any software client, like the server's UI, in order to control it (UI navigation, playback, etc.). Each instances monitors different TCP ports for communication with other pieces of software.
While I guess a software client on a different PC might be able to install a local copy of a plugin and configure it... What happens with the server's UI, since that's also where you would configure the service mode plugins... My guess is that I should also submit an identical copy as SageTCPServer-client and set it as Desktop only, but maybe that's overkill...
__________________
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 |
#2
|
||||
|
||||
You might want to take a look at shadeblue's info popup/caller ID plugin. There is a InfoPopup/CaleerID plugin in General that is installed on the server. I can see it as an installed plugin from a client PC and I can configure it from there. He also has the InfoPopup STVI in the UI Mod that needs to be installed on any PC client you want the popup to show up. Maybe look at doing it similar to that?
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. |
#3
|
||||
|
||||
Thanks, indeed that's the same kind of issues he had moving to the SageTVPlugin interface. So I am looking through his thread.
__________________
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 |
#4
|
||||
|
||||
Why do you need to install anything on the client? Code running on the server can invoke API methods on any client using the appropriate UI context. This includes using SageCommand() calls to navigate the UI. (This is how the web server's remote control feature works, for instance.) So all you should need is to install one instance of your plugin on the server and have it instantiate an internal class for each client it wants to control. You should then be able to configure them all from one screen.
__________________
-- Greg |
#5
|
||||
|
||||
Based on the info/popup thread, indeed I don't anymore. Though I'm not sure that when the original project (SageCQC by Beelzerob) was started 4 years ago, it would have been the case.
Quote:
__________________
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 |
#6
|
||||
|
||||
Quote:
Code:
Global SageGlobalApi = new Global(API.apiLocalUI); String[] listOfContextNames = SageGlobalApi.GetUIContextNames(); String[] listOfExternalContextNames = SageGlobalApi.GetConnectedClients();
__________________
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 |
#7
|
||||
|
||||
It's a bit weird to be using apiLocalUI in service mode, since there is no local UI in that mode. I would use apiNullUI in that case.
Also you don't need to instantiate the Global class yourself. Every instance of API already has an instance of Global. So apiNullUI.global.GetUIContextNames() would be the intended way of accessing it. All of that said, however, I'm not seeing any obvious reason why your code shouldn't work. The only time both lists would be empty is when the service first boots up, before any clients or extenders have connected (or after they've all disconnected). Have you checked the logs for exceptions?
__________________
-- Greg |
#8
|
||||
|
||||
Quote:
Quote:
Quote:
Quote:
__________________
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 Last edited by Fonceur; 01-28-2011 at 02:21 PM. |
#9
|
||||
|
||||
OK, so from the getConfigSettings I do find the server's UI context through GetConnectedClients(). The bad news is that it uses a different local port each time the SageTV service is restarted, so I won't be able to use it on the next relaunch...
__________________
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 |
#10
|
||||
|
||||
Right, you have to strip off the port before saving it away, and then match it back up by IP next time it reconnects.
In fact you probably want to translate the IP to a host name and match by that instead of by IP, in order to be invariant across DHCP lease reassignments. For extender and Placeshifter clients, the MAC address is probably the appropriate invariant to use. (You can have more than one Placeshifter connection from the same host/IP, so long as they have different MAC addresses.)
__________________
-- Greg |
#11
|
||||
|
||||
I'm really hoping that at some point in the future of SageTV, the Client/Server model gets reworked a bit to avoid some of these hassles. There's really no reason for keeping the extenders/placeshifters IN the server process. Things would end up being much smoother if the server ONLY ever did recording/serving, and ALL clients connected to it via a standardized protocol. Even if extenders/placeshifter's still ran on the server hardware, it would be MUCH easier if the server launched a new JVM with that handled that particular connection, and it communicated with the server process via the same IP protocol that the full clients do. Then, you'd have no reason for these UI hosts to even be ON the server.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Service Mode wont let client change channels | CloudWraith | SageTV Software | 1 | 12-03-2010 06:35 PM |
Converting from Client to Service Mode | jturner421 | SageTV Software | 2 | 12-22-2007 01:47 AM |
Sage as a client while in Service mode | ptaylor | SageTV Software | 2 | 02-21-2006 05:18 PM |
sage client fails with server in service mode | folly12345 | SageTV Software | 2 | 05-22-2005 05:04 PM |
Client stopped working when using Service mode | srothwell | SageTV Software | 5 | 11-13-2004 01:54 PM |