SageTV Community  

Go Back   SageTV Community > SageTV BETA Release Products > SageTV Beta Test Software
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Beta Test Software Discussion related to BETA Releases of the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. regarding SageTV Beta Releases should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-17-2008, 08:20 PM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
6.4.8 Broken "new API(uiContext)"?

Not sure if something changed and it broke the gkusnick's studio tools part or the API(uiContext) itself is broken, but basically now it always return the "SAGETV_PROCESS_LOCAL_UI" version, i.e. you only get access to the server, not the clients or extenders.

In other words, it's no longer possible to use Nielm's web server (unless he's using a different method), SageCQC or SageTCPServer to control a client/extender, or get information about the current media, instead all those calls will be going to (or about) the SageTV server...

Or is anyone still able to control an HD extender from one of those?
Reply With Quote
  #2  
Old 08-17-2008, 08:42 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Did you recently switch to running Sage in service mode? In this mode the server's pseudo-client has access only to its own local UI context; all other contexts (extenders, placeshifters, etc) live in the service process. You need to load your code into that process in order to have access to those contexts.
__________________
-- Greg
Reply With Quote
  #3  
Old 08-17-2008, 09:21 PM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
Quote:
Originally Posted by GKusnick View Post
Did you recently switch to running Sage in service mode?
It happens in both situations. And actually, in service mode you wouldn't even have access to the SageTV Server UI, while the problem here is that you always get access to it...
Reply With Quote
  #4  
Old 08-17-2008, 09:58 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
I'm not understanding your issue then. When I call GetUIContextNames() from a Placeshifter client, I get the contexts for all connected clients. When I call it from the server's pseudo-client, I get SAGETV_PROCESS_LOCAL_UI and nothing else, as expected.

Maybe you could provide a bit more detail on how to repro your issue, such as where you're calling it from and how you're getting the context to pass in.
__________________
-- Greg
Reply With Quote
  #5  
Old 08-17-2008, 10:47 PM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
Quote:
Originally Posted by GKusnick View Post
Maybe you could provide a bit more detail on how to repro your issue, such as where you're calling it from and how you're getting the context to pass in.
Code:
public SageServer(String uiContext, int portNum) 
{
  API sageApi = uiContext.equals("local") ? Api.apiLocalUI : new API(uiContext);
  MediaPlayerAPI sageApiMediaPlayer = new MediaPlayerAPI(sageApi);
 (...)
}
so basically in 6.3.10, by using SageServer("local", 9250) you get access to the SageTV Server controls, while using SageServer(MacID, 9251), you control the client or extender which corresponds to the MacID. That's how the SageCQC driver works.

Now in 6.4.8, both will only allow control the Server... Which leads me to believe that the problem is with the "new API(uiContext)" part... I guess it could be MediaPlayerAPI(sageApi) that is broken, but then other commands like maximizing the screen which are based on sageApi.global are also going to the server, regardless...
Reply With Quote
  #6  
Old 08-18-2008, 11:02 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
That still doesn't answer the question of where the MacID comes from. Is it the result of a call to GetUIContextName() or GetUIContextNames()? If not, what steps have you taken to verify that it is in fact a valid context, i.e. that it matches one of the strings returned by GetUIContextNames()?

Just guessing here, but it's possible that the format of the context strings has changed since 6.3. The API makes no guarantees about that. So if you're generating your own context strings directly from MAC addresses, rather than getting them from GetUIContextNames(), then it's up to you to ensure that you're generating them correctly.
__________________
-- Greg
Reply With Quote
  #7  
Old 08-18-2008, 11:24 AM
smoothtlk smoothtlk is offline
Sage User
 
Join Date: Jan 2007
Location: Metamora, Michigan
Posts: 23
Hi Greg,
Fonceur and I worked on this over the weekend. What we find is that we can control what Client (extender or software) with 6.3.10 but cannot with same settings latest beta. Do you know if the API changed syntax with latest beta? Possibly it's not a "bug" but a not understood change of syntax?
__________________
Allonis LLC.
Reply With Quote
  #8  
Old 08-18-2008, 11:47 AM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
Quote:
Originally Posted by GKusnick View Post
That still doesn't answer the question of where the MacID comes from.
It's the value shown by a router or "ipconfig /all" (i.e. 00085a12b34c for an extender, as shown by the MiniUI loading message or the extender's .properties file). Though I guess there might be a different translation somewhere now...
Reply With Quote
  #9  
Old 08-18-2008, 12:01 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
But again, the SageTV API does not guarantee that MAC addresses can be passed in as context names. It so happens that the context strings returned by GetUIContextNames() are derived from MAC addresses in the current implementation, but there's no guarantee that will always be true. The only guarantee is that GetUIContextNames() will return an array of the currently valid contexts, and that passing one of those strings back in as a UI context will let you control the corresponding client. By generating your own context strings out of whole cloth, you're depending on an implementation detail that is not part of the API contract, and so are vulnerable to breakage if the details of the implementation change.

My advice would be to take a look at the results of a call to GetUIContextNames() to make sure you're getting it right. When in doubt, print it out.

Also note that it's possible to specify a made-up MAC address on the Placeshifter command line. This allows you to run more than one instance of Placeshifter on the same client machine (assuming you have enough licenses, of course). But it also means that the MAC numbers you get from ipconfig don't tell the whole story about connected clients and their UI contexts.
__________________
-- Greg
Reply With Quote
  #10  
Old 08-18-2008, 12:31 PM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
Hmm, time to play with GetUIContextNames(), it might not be such a bad idea to discover them that way, rather than ask the user to do the work...
Reply With Quote
  #11  
Old 08-18-2008, 10:41 PM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
Quote:
Originally Posted by Fonceur View Post
Hmm, time to play with GetUIContextNames(), it might not be such a bad idea to discover them that way, rather than ask the user to do the work...
It turns out that it won't work, since the extenders and such won't be loaded before the .jar is done initializing.

OTOH, it seems that nothing is broken. The uiContext simply had to be forced to lower cases, as the upper cases from pasting the text from the filename client\00085A12B34C.properties was a bad idea... As for controlling a SageTV client from another PC, it requires the .jars files and sageclient.properties modifications on that PC, rather than how extenders work... So nothing to see, move along...
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
6.4.8, Network Drive as Media Import Directory Bug, Vista zjennings SageTV Beta Test Software 4 08-20-2008 02:38 PM
Installation error with 6.4.8 tomfisk SageTV Beta Test Software 0 08-15-2008 12:14 PM
HDPVR 6.4.8 IRblaster issues among others boomer SageTV Beta Test Software 5 08-15-2008 11:10 AM
SageTV - updated to 6.3 = broken GUI - all black jimbobuk SageTV Software 12 02-16-2008 07:13 PM
"-startup" and "ui/startup_type=2" BROKEN in SageTV 6.2.x mkanet SageTV Software 3 12-10-2007 01:18 PM


All times are GMT -6. The time now is 06:08 PM.


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