|
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
|
|||
|
|||
Detecting UIContext Type?
Is there a way to detect the UIContext type? For example to detect if a certain active UI context is an HD200 or HD300?
__________________
Host: ESXi 6.5 w/ Intel Core i7 2.8GHZ 8GB Ram Guest: Ubuntu 16.04 with Sage v9 in Docker Tuners: 2 HDHR (OTA); Extenders: HD300 connected to a Samsung 56" DLP HDTV; HD300 connected to a Sharp 42" LCD Storage: OmniOS w/6 1TB Samsung Spinpoint in a RaidZ2 configuration in a 20 bay SATA hotswap case. |
#2
|
|||
|
|||
Yup look under Global with sagex
for example extender Code:
String UIContext = sagex.api.Global.GetUIContextName(); sagex.api.global.IsRemoteUI(UIContext)&&!sagex.api.global.IsServerUI(UIConftext) There is also a IsClient call. For the extender you might need to use the sagex method for creating a new uicontext from the current context name. Or at least I did to get reliable results for extenders cheers |
#3
|
|||
|
|||
Holy crap I just noticed the
IsEmbeddedSystem() call I never noticed that so there is a better way to get extender I have read that probably 100 times don't know how I missed it. |
#4
|
|||
|
|||
Plucky -
Thanks. But that seems to only tell me if it is an extender, client or server. I am trying to discern if a specific UI Context is an HD100, HD200 or HD300? Is there a way to tell if an embedded context is a particular type of extender?
__________________
Host: ESXi 6.5 w/ Intel Core i7 2.8GHZ 8GB Ram Guest: Ubuntu 16.04 with Sage v9 in Docker Tuners: 2 HDHR (OTA); Extenders: HD300 connected to a Samsung 56" DLP HDTV; HD300 connected to a Sharp 42" LCD Storage: OmniOS w/6 1TB Samsung Spinpoint in a RaidZ2 configuration in a 20 bay SATA hotswap case. |
#5
|
||||
|
||||
Quote:
Then, under it, see the LocalizeString("HD_Media_Player") branch. For now, there is no direct HD200 vs HD300 API call, see the code below that branch where it calls GetAudioOutputOptions() & uses the result to determine whether it is an HD200 or HD300. - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#6
|
|||
|
|||
That's what I get for skimming didn't see you wanted the type sorry Andy already answered you anyhow. Oh well I found that call I somehow missed 100 times I swear it must be new or I am blind
|
#7
|
|||
|
|||
Cool - Thanks Opus and Plucky!
__________________
Host: ESXi 6.5 w/ Intel Core i7 2.8GHZ 8GB Ram Guest: Ubuntu 16.04 with Sage v9 in Docker Tuners: 2 HDHR (OTA); Extenders: HD300 connected to a Samsung 56" DLP HDTV; HD300 connected to a Sharp 42" LCD Storage: OmniOS w/6 1TB Samsung Spinpoint in a RaidZ2 configuration in a 20 bay SATA hotswap case. |
#8
|
||||
|
||||
Before I start reinventing the wheel by following Opus4 suggestion, I don't suppose you have some java code snippet doing that?
__________________
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 |
#9
|
||||
|
||||
This is code from nielm's web server that's a little old, but has most of the checks. It also has poweroff code for extenders but it's not 100%.
http://sageplugins.cvs.sourceforge.n...va?view=markup
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun. Extender: STP-HD300, Harmony 550 Remote, Netgear MCA1001 Ethernet over Coax. SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client, Java 1.6. Plugins: Jetty, Nielm's Web Server, Mobile Web Interface. |
#10
|
||||
|
||||
So I have tried using the code used in NielM web server, but I have someone running the latest SageTV beta where his HD200 is reporting IsRemoteUI() as false, and GetAudioOutputOptions() == null (using the latest GKusnick Studio Tools for SageTV V7)... Anyone else seeing that?
__________________
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 |
#11
|
||||
|
||||
As far as I can tell those functions are working properly on my HD300.
When you say "the latest Sage" and "the latest ToolsLib", have you actually verified this? Or are you just taking his word for it that as far he knows, whatever version he has is the latest? (This is why it's always best to insist on actual version numbers in bug reports.)
__________________
-- Greg |
#12
|
||||
|
||||
I did have access to the sagetv_0.txt to confirm the latest versions being used...
Upon further investigations, I think that all is good. It's just that he was connecting within seconds of a SageTV restart, with the associated reboot of the extender still in progress, and wondering why commands were not working... Had he actually been in front of the extender with the TV/monitor opened, he probably would have realized how silly it was to complain about the power button not working in the middle of a reboot or similar things...
__________________
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 |
#13
|
||||
|
||||
So here is a code snippet (using GKusnick Studio Tools library) doing what Opus4 suggested:
Code:
enum ClientType {None, Local, MVP, HD100, HD200, HD300, Placeshifter}; ClientType clientType = ClientType.None; API sageApi = new API(uiContext); Global global = sageApi.Global; Utility utility = new Utility(sageApi); if (global.GetRemoteUIType().equalsIgnoreCase(utility.LocalizeString("Local"))) clientType = ClientType.Local; else if (global.GetRemoteUIType().equalsIgnoreCase(utility.LocalizeString("Placeshifter"))) clientType = ClientType.Placeshifter; else if (global.GetRemoteUIType().equalsIgnoreCase(utility.LocalizeString("SD Media Extender"))) clientType = ClientType.MVP; else if (global.GetRemoteUIType().equalsIgnoreCase(utility.LocalizeString("HD Media Extender"))) clientType = ClientType.HD100; else if (global.GetRemoteUIType().equalsIgnoreCase(utility.LocalizeString("HD Media Player"))){ clientType = ClientType.HD300; for (String option : configuration.GetAudioOutputOptions()){ if (option.equalsIgnoreCase("HDMIHBR")){ clientType = ClientType.HD200; break; } } }
__________________
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) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Detecting and Stopping Unattended Extenders | personalt | SageTV Customizations | 4 | 01-02-2010 11:20 PM |
Getting a valid UIContext from 3rd party apis | razrsharpe | SageTV Studio | 3 | 12-16-2009 10:05 PM |
6.4.8 Broken "new API(uiContext)"? | Fonceur | SageTV Beta Test Software | 10 | 08-18-2008 10:41 PM |
Stop detecting iPod | zoundz | SageTV Software | 4 | 02-01-2006 11:49 AM |
1.4.10 (Demo) not detecting PVR-USB | flatline | Hardware Support | 1 | 03-14-2004 06:59 PM |