|
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 |
#181
|
|||
|
|||
I have a question dealing with the Java RMI interface. If I know the IP of a sage client (with the remote api installed) on the network, is there anyway to determine what port the RMI server for that client is using? (rather than just assuming it is the default 1098)
If I understand the datagram request that's being used, it sends a request to the entire network and will just take whoever responds first. I'd like to be able to send a request from one client (or context within the server process) to another, specific client (or context within the server process). It's easy enough to get the IPs of all the clients, but I haven't found a way to get the port the remote apis are using. |
#182
|
||||
|
||||
If you know the host and port, you can set it either from the commandline or in your code, using,
Code:
System.setProperty("sagex.SageAPI.remoteUrl", "rmi:HOST:PORT") For example, the sage remote apis, use the following code, which only accepts a single reply. You could write something that keeps accepting replies until a particular timeout. Code:
public static Properties findRemoteServer(final long timeout) throws Exception { final Properties props = new Properties(); SimpleDatagramClient client = new SimpleDatagramClient(); client.send("Discover SageTV Remote API Server", DatagramServer.MULTICAST_GROUP, DatagramServer.MULTICAST_PORT, new DatagramPacketHandler() { public void onDatagramPacketReceived(DatagramPacket packet) { ByteArrayInputStream bais = new ByteArrayInputStream(packet.getData()); try { props.load(bais); } catch (IOException e) { onFailure(e); } } public void onFailure(Throwable t) { throw new RuntimeException(t); } }, timeout); return props; }
__________________
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 |
#183
|
|||
|
|||
Thanks for your reply. That is what I'll do.
|
#184
|
|||
|
|||
I noticed that you implemented remote server discovery in a recent revision. This will be really useful for me. Thanks!
|
#185
|
||||
|
||||
I'll try to get a build out this weekend. I added the remote discovery because I use it in the web ui for bmt to choose which server I want to manage. While that feature is not available for most people, it's useful for me in development sagex always had remote discovery, but there was no way to get a list of known servers that are available on the network.
__________________
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 |
#186
|
|||
|
|||
Quote:
|
#187
|
||||
|
||||
Sean,
Does sagex support the sage.media.rss package? I don't thing it does but I'm a complete java noob. If it does support the package what do I put in the "import" statement? If it does not support it, how do I use the sage.media.rss methods in my java source? Please respond like you are answering a java idiot, because you are Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#188
|
||||
|
||||
Quote:
But, you can probably use these apis directly in you including the Sage.jar in your path. Otherwise, there are lots of other rss parsing apis. Keep in mind that you cannot re-distribute the Sage.jar, so if this is something that has to run outside of the sagetv environment you'll want to use another jar file. This is a fragment of how you'd use the rss apis included in to the Sage.jar... Code:
import sage.media.rss.RSSChannel; import sage.media.rss.RSSHandler; import sage.media.rss.RSSItem; import sage.media.rss.RSSParser; ... public void somemethod() { RSSHandler handler = new RSSHandler(); RSSParser.parseXmlFile(new URL(feedURL), handler, false); RSSChannel chan = handler.getRSSChannel(); LinkedList ll = chan.getItems(); for (Object o : ll) { RSSItem item = (RSSItem) o; } }
__________________
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 |
#189
|
||||
|
||||
Sean,
OK, that makes sense. This is all Sage related so I won't have to worry about redistributing Sage.jar. Thanks a lot, Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#190
|
||||
|
||||
Sean,
A big thanks for the help. I got this working in no time flat thanks to you. It would have taken me hours to figure it out on my own. Now the only question i have is "Why the heck did I wait so long to start programming directly in Java?" (Of course my Java code looks like C written in Java so I have a long way to go ) Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#191
|
||||
|
||||
Quote:
[/quote]Now the only question i have is "Why the heck did I wait so long to start programming directly in Java?" (Of course my Java code looks like C written in Java so I have a long way to go )[/QUOTE] Glad you are having fun with it. My background is in C, and I resisted Java for years because of the FUD surrounding it at the time... but once I started to use it (about 12 years ago), I was quite taken with the language... so much so, that I'm considered a Java evangelist today But, like with any programming language my knowledge changes over time (I'm always learning new stuff, design patterns, language nuances, etc), and I'll look back at stuff that I wrote a year ago, and think, "what the hell was I thinking"
__________________
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 |
#192
|
||||
|
||||
Sean,
In the v7 plugin manager the Phoenix API is defined as a Server plugin. How do I get it installed on a SageClient? I tried running it from a Client and it didn't seem to update anything locally. Thanks, Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#193
|
||||
|
||||
Sorry Tom. I have <Desktop>false</Desktop> in my manifest for some reason (probably copy/paste ). I'll try to get this fixed up today... the problem is that I've been refactoring the code somewhat, so I need to check out an older version and rebuild from that point.
__________________
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 |
#194
|
||||
|
||||
No rush, I've got plenty of other things to work on!
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#195
|
||||
|
||||
Tom... i need more information Apparently the fact that I have <desktop>false<desktop> should not prevent the apis from being installed on a client machine. When you are browsing the plugins from the client, it is not allowing your to install the phoenix apis...if so, what the exact error message.
Thanks, Sean.
__________________
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 |
#196
|
||||
|
||||
Sean,
There was no error, but I thought it got downloaded to the server instead of the client. It's on the client now, but I'm not sure how it got there.... Probably user error on my part. Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#197
|
|||
|
|||
Is there a way to run code from java to run on streamer
I want to develop a screen for use in sage.
This needs to open a window, and have a few options in it. I want to do this from java using segez api, because I do not need to reload sage every time, so I figured I want to develop on my desktop, and have the ui open on my HD200. Is that doable? can I get the context of the hd200 while not running in a sage env? and then open screens on it?
__________________
Server SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1 Client SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1 Using Nielm's Web server 2.22 |
#198
|
||||
|
||||
Quote:
__________________
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 |
#199
|
|||
|
|||
question is:
Can you add GUI elements not in the STVI. ike panel and such... I want to write a new screen ui but I hate doing it with studio (and stvi) If so, can you give an example for ui not from studio?
__________________
Server SageTv 6.3.5, Core2Duo 6300 ,2Gigs ,Saphire x1650, PVR250, 2*320GB + 160GB, java 1.6.1 Client SageTV Client 6.3.5 , AMD 3000, 1024Mb, Saphire x1600Pro256HDMI, java 1.6.1 Using Nielm's Web server 2.22 |
#200
|
||||
|
||||
Quote:
1. It requires a tremendous knowledge of STV xml structure, attributes, etc. 2. Changes would not be persisted unless you explicity save the STV 3. If you run the plugin more than once, and the changes accidentally got saved (or intentionally saved), then you'd run into problems. I understand your frustrations with Studio. As a Java developer, I don't find it very user friendly... that being said, I have tried what you are intending to do, and I must admit, that Studio is a better choice. Once you do your changes in studio, you can export a stvi diff file that can easily be imported.
__________________
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 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hauppauge Remote Issue | yacht_boy | Hardware Support | 4 | 05-01-2008 09:25 PM |
MCE remote transmitting keypresses twice | arnabbiswas | Hardware Support | 1 | 02-22-2007 10:55 AM |
MCE Remote not work fully with Placeshifter | devinteske | SageTV Placeshifter | 5 | 02-08-2007 11:45 PM |
Harmony Remote IR Reciever Help | brundag5 | Hardware Support | 2 | 01-13-2007 09:08 PM |
How to get SageTV to release focus to NVDVD for remote | IncredibleHat | SageTV Software | 4 | 07-06-2006 07:47 AM |