|
SageTV Software Discussion related to the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the SageTV software application should be posted here. (Check the descriptions of the other forums; all hardware related questions go in the Hardware Support forum, etc. And, post in the customizations forum instead if any customizations are active.) |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Anyone know about SageTV Client port numbers / context?
I have written a driver for IP control of SageTV from Control4 using the webremote types of commands. This works well with miniclients as they use the MAC ID and that stays constant.
But things are not so simple for SageTV Client. The context for SageTV Client is the IP address plus a port number and the port number seems to change every time the client restarts. You can see this client number and the context when hovering over this client name from the SageTV web UI home page. For example, right now I see Code:
http://192.168.1.99:7070/sage/ExtenderDetails?context=%2F192.168.1.98%3A64862 Why does this port number change, and is there any way to keep it constant?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
#2
|
|||
|
|||
Wayne - Thanks for posting this! I know this has come up in the past for other developers - EnterNoEscape - I think might have run into it (trying to obtain the full context for each client including port).
If anyone has any ideas or pointers I would be very grateful! Using Wayne's control4 driver I am very close to seamless remote control for my HTPC clients. Alternatively, if anyone knows how to form the HTTP messages to command clients via IP or MAC alone without specifying the client listening port that might also do the trick! -Owen |
#3
|
|||
|
|||
Owen - the other way to skin this cat, although less elegant, would be to send keyboard commands to the PC. This could be done via IR or IP but would be much less elegant of a solution, but would have the advantage of being able to have the PC start the SageTV client app.
Former C4 executive Charles Kindel built the MCE Controller app for PCs starting 16 years ago and he still maintains it - it is on Github: https://github.com/tig/mcec. Quote:
So using MCEC is a potential solution to this problem as well if we can't solve the problem from the SageTV server side.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
#4
|
|||
|
|||
FYI - the way that we are solving this is that we have installed an instance of the SageTV web UI on the client. Then we are using a connection to that client with a context of SAGETV_PROCESS_LOCAL_UI to be able to control the client.
It is the same as using the Web Remote with the server, except you are using the IP address and port of the client's instance of SageTV web server and you are using as the context ID instead of a miniclient's MAC or the client's IP address/port. So the command Code:
http://192.168.1.98:8081/sage/SageCommand?context=SAGETV_PROCESS_LOCAL_UI&command=Down
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
#5
|
||||
|
||||
If the sagex apis are installed you can call the GetUIContextNames (or maybe GetConnectedClients) and use that information to determine the correct context.
http://download.sage.tv/api/sage/api...IContextNames() https://github.com/stuckless/sagetv-...sing-sagex-api
__________________
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 |
#6
|
|||
|
|||
Quote:
@stuckless - Any idea why the client uses a different port every time it connects to a server. Is there any way to force it to use a constant port number?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
#7
|
|||
|
|||
Quote:
From http://www.steves-internet-guide.com...-ports-sockets “Ports 49152-65535– These are used by client programs and you are free to use these in client programs. When a Web browser connects to a web server the browser will allocate itself a port in this range. Also known as ephemeral ports.” https://en.m.wikipedia.org/wiki/Ephemeral_port
__________________
Windows Installer |
#8
|
|||
|
|||
I guess it would just be easier if those ports weren't epehmeral and you could assign a specific port to each client for control. If I remember correctly this is how Fonceur's SacgeTCP used to work.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SageTV V7 - API: FindWidgetBySymbol on remote UI context | shadeblue.com | SageTV Beta Test Software | 10 | 07-17-2010 12:45 AM |
SageTV Not Opening Com Port (Using Digi realport multi-port serial adapter) | personalt | Hardware Support | 0 | 06-09-2010 07:02 PM |
Firewall and port numbers | KeAuraPete | SageTV Software | 5 | 12-24-2003 12:59 PM |
What port does SageTv listen for client on | rkn555 | SageTV Software | 3 | 12-01-2003 06:49 PM |