SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v9 Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV v9 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 9 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 9 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-04-2018, 02:59 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
sagex-api / sagex-services v9.1.7.0

I released a new version of the sagex apis, updated to reflect the current apis in SageTV V9.1.7

This release fixes a memory leak in the RMI remote apis, and fixes that leak, but no long caching anything on the server. So from here on the remote apis are completely stateless.

I also removed a bunch of RPC connectivity options that have been deprecated since v7, and they are now removed. This likely doesn't affect anyone, since most people use either the RMI apis or the /sagex/api REST endpoint.

sagex-service deploys an Open API browser (Swagger UI) for viewing and interacting with the /sagex/api REST apis. This is a work in progress, but it's fairly functional.

You can access it from the jetty server using the following path /apidocs/

Related to the /sagex/api REST apis, I'm also working on a set JavaScript wrappers for the REST apis.

https://github.com/stuckless/sagetv-js-api

This js-api is a work in progress and I don't recommend people use it, yet, but just letting people know that this is coming, and it aims to make it easier to develop web applications that integrate with SageTV. I'm currently building it out while prototyping a web ui using React + Bootstrap.
Reply With Quote
  #2  
Old 03-05-2018, 07:47 AM
waynedunham waynedunham is offline
Sage Icon
 
Join Date: Sep 2004
Posts: 1,469
The "apis in SageTV V9.1.7" may be why I can't get them to install on my SageTV machines. They say "Compatible= NO".

The Plugin details says that it has been brought up to SageTV V9 and I have V9.1.6.747 on both of my machines. I'm guessing that because I'm not on 9.1.7 is why they are showing as incompatible?

Actually that is why I came to the forums today, to see if there was a newer version of SageTV for Windows than what I am running.
__________________
Wayne Dunham
Reply With Quote
  #3  
Old 03-05-2018, 11:45 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by waynedunham View Post
The "apis in SageTV V9.1.7" may be why I can't get them to install on my SageTV machines. They say "Compatible= NO".

The Plugin details says that it has been brought up to SageTV V9 and I have V9.1.6.747 on both of my machines. I'm guessing that because I'm not on 9.1.7 is why they are showing as incompatible?

Actually that is why I came to the forums today, to see if there was a newer version of SageTV for Windows than what I am running.
Because the sagex apis is an api wrapper, and they wrap the 9.1.7 sage tv apis, then the min version is also set to 9.1.7. So yeah, you'd need to be at 9.1.7 of sagetv to install the new sagex apis.
Reply With Quote
  #4  
Old 03-05-2018, 06:28 PM
EnterNoEscape's Avatar
EnterNoEscape EnterNoEscape is offline
SageTVaholic
 
Join Date: Jun 2010
Location: Harrisburg, PA
Posts: 2,657
Quote:
Originally Posted by stuckless View Post
You can access it from the jetty server using the following path /apidocs/
Very cool.
__________________
SageTV v9 Server: ASRock Z97 Extreme4, Intel i7-4790K @ 4.4Ghz, 32GB RAM, 6x 3TB 7200rpm HD, 2x 5TB 7200rpm HD, 2x 6TB 7200rpm HD, 4x 256GB SSD, 4x 500GB SSD, unRAID Pro 6.7.2 (Dual Parity + SSD Cache).
Capture: 1x Ceton InfiniTV 4 (ClearQAM), 2x Ceton InfiniTV 6, 1x BM1000-HDMI, 1x BM3500-HDMI.

Clients: 1x HD300 (Living Room), 1x HD200 (Master Bedroom).
Software: OpenDCT :: WMC Live TV Tuner :: Schedules Direct EPG
Reply With Quote
  #5  
Old 03-05-2018, 10:03 PM
awhenry awhenry is offline
Sage User
 
Join Date: Aug 2008
Location: Old Town, ME, US
Posts: 39
Exclamation Warning for SJQ users

Note if you still use the (incomparably useful) SJQ, this update breaks it. You'll need to copy the sagex-api.jar file from your SageTV JARs folder to your sjqagent lib folder to restore operation. Unfortunately I did not discover this until after my SJQ filecleaner process ran, irrevocably deleting each and every one of my EDL and closed caption files for thousands of recordings (since it thought the media file was gone)...
__________________
Andrew
Reply With Quote
  #6  
Old 03-06-2018, 09:15 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by awhenry View Post
Note if you still use the (incomparably useful) SJQ, this update breaks it. You'll need to copy the sagex-api.jar file from your SageTV JARs folder to your sjqagent lib folder to restore operation. Unfortunately I did not discover this until after my SJQ filecleaner process ran, irrevocably deleting each and every one of my EDL and closed caption files for thousands of recordings (since it thought the media file was gone)...
Well, that certainly sucks. Unfortunately, I can't foresee how people are using this outside of sagetv, and, since I don't use sjq, I don't foresee this at all
Reply With Quote
  #7  
Old 03-11-2018, 06:50 PM
EnterNoEscape's Avatar
EnterNoEscape EnterNoEscape is offline
SageTVaholic
 
Join Date: Jun 2010
Location: Harrisburg, PA
Posts: 2,657
Quote:
Originally Posted by awhenry View Post
Note if you still use the (incomparably useful) SJQ, this update breaks it. You'll need to copy the sagex-api.jar file from your SageTV JARs folder to your sjqagent lib folder to restore operation. Unfortunately I did not discover this until after my SJQ filecleaner process ran, irrevocably deleting each and every one of my EDL and closed caption files for thousands of recordings (since it thought the media file was gone)...
Interesting. I updated and my SJQ tasks are still running ok.
__________________
SageTV v9 Server: ASRock Z97 Extreme4, Intel i7-4790K @ 4.4Ghz, 32GB RAM, 6x 3TB 7200rpm HD, 2x 5TB 7200rpm HD, 2x 6TB 7200rpm HD, 4x 256GB SSD, 4x 500GB SSD, unRAID Pro 6.7.2 (Dual Parity + SSD Cache).
Capture: 1x Ceton InfiniTV 4 (ClearQAM), 2x Ceton InfiniTV 6, 1x BM1000-HDMI, 1x BM3500-HDMI.

Clients: 1x HD300 (Living Room), 1x HD200 (Master Bedroom).
Software: OpenDCT :: WMC Live TV Tuner :: Schedules Direct EPG
Reply With Quote
  #8  
Old 03-12-2018, 08:43 AM
awhenry awhenry is offline
Sage User
 
Join Date: Aug 2008
Location: Old Town, ME, US
Posts: 39
Quote:
Originally Posted by EnterNoEscape View Post
Interesting. I updated and my SJQ tasks are still running ok.
In my case the tasks were still running, just whenever they queried any media info from Sage they got back nulls, which in some cases just caused a task to do nothing, but in others caused the task to do something undesirable.

Maybe there are other variables which impact what behavior the update causes, I wouldn't be surprised. I just know what I was seeing, and that updating the sagex-api jar in the SJQ client lib folder restored normal functionality. Probably would be a good idea to update this jar even if you *aren't* having problems right now, as there is no mechanism to automatically update this library and over time it will grow further out of sync with Sage.

Regarding my personal loss of files, I was able to restore about 80% of what I lost using my parity-based file recovery system (snapraid). For the remaining 1500 or so lost files...oh well, guess I'm stuck watching the commercials and missing the CC, at least for the ones I already compressed (which was most of them). Need to get in and tweak the task to abort and issue an alert if it would delete more than 100 files or something (once I remember how to do that, haven't messed with my tasks in years).
__________________
Andrew
Reply With Quote
  #9  
Old 03-12-2018, 02:30 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Quote:
Originally Posted by awhenry View Post
Note if you still use the (incomparably useful) SJQ, this update breaks it. You'll need to copy the sagex-api.jar file from your SageTV JARs folder to your sjqagent lib folder to restore operation. Unfortunately I did not discover this until after my SJQ filecleaner process ran, irrevocably deleting each and every one of my EDL and closed caption files for thousands of recordings (since it thought the media file was gone)...
Can you be a bit more specific on this?

In my instance the sjq-agent folder on my server is \\server\appdata\sagetv\server\plugins\sjq-agent (I am on unRAID) - assuming that I have the correct folder. This folder currently only contains two directories - conf and logs. So I copy the sagex-api.jar file do this folder so that it is the only file (other than the dirs) in this folder?

I also run a sjq client remotely on a separate Win10 PC. On that PC I have a c:\sjqagent folder that contains a bunch of directories - bin, conf, engines, lib and logs. In the lib directory there is an existing sagex-api.jar file. In my instance this file is dated 6/11/2011.

Do I need to update anything on the server or just on the remote client Win PC? And if it is the later then do I have to restart anything after doing this copy?
__________________
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
Reply With Quote
  #10  
Old 03-12-2018, 07:30 PM
EnterNoEscape's Avatar
EnterNoEscape EnterNoEscape is offline
SageTVaholic
 
Join Date: Jun 2010
Location: Harrisburg, PA
Posts: 2,657
Quote:
Originally Posted by awhenry View Post
In my case the tasks were still running, just whenever they queried any media info from Sage they got back nulls, which in some cases just caused a task to do nothing, but in others caused the task to do something undesirable.

Maybe there are other variables which impact what behavior the update causes, I wouldn't be surprised. I just know what I was seeing, and that updating the sagex-api jar in the SJQ client lib folder restored normal functionality. Probably would be a good idea to update this jar even if you *aren't* having problems right now, as there is no mechanism to automatically update this library and over time it will grow further out of sync with Sage.

Regarding my personal loss of files, I was able to restore about 80% of what I lost using my parity-based file recovery system (snapraid). For the remaining 1500 or so lost files...oh well, guess I'm stuck watching the commercials and missing the CC, at least for the ones I already compressed (which was most of them). Need to get in and tweak the task to abort and issue an alert if it would delete more than 100 files or something (once I remember how to do that, haven't messed with my tasks in years).
That makes sense now. The reason I'm not having any issues is because I'm running the agent in the SageTV JVM since I'm using Linux and it keeps things less complicated. I misread what you posted thinking it broke the SJQ server piece, not the agent.
__________________
SageTV v9 Server: ASRock Z97 Extreme4, Intel i7-4790K @ 4.4Ghz, 32GB RAM, 6x 3TB 7200rpm HD, 2x 5TB 7200rpm HD, 2x 6TB 7200rpm HD, 4x 256GB SSD, 4x 500GB SSD, unRAID Pro 6.7.2 (Dual Parity + SSD Cache).
Capture: 1x Ceton InfiniTV 4 (ClearQAM), 2x Ceton InfiniTV 6, 1x BM1000-HDMI, 1x BM3500-HDMI.

Clients: 1x HD300 (Living Room), 1x HD200 (Master Bedroom).
Software: OpenDCT :: WMC Live TV Tuner :: Schedules Direct EPG
Reply With Quote
  #11  
Old 03-13-2018, 07:02 AM
awhenry awhenry is offline
Sage User
 
Join Date: Aug 2008
Location: Old Town, ME, US
Posts: 39
Quote:
Originally Posted by wayner View Post
Can you be a bit more specific on this?

In my instance the sjq-agent folder on my server is \\server\appdata\sagetv\server\plugins\sjq-agent (I am on unRAID) - assuming that I have the correct folder. This folder currently only contains two directories - conf and logs. So I copy the sagex-api.jar file do this folder so that it is the only file (other than the dirs) in this folder?

I also run a sjq client remotely on a separate Win10 PC. On that PC I have a c:\sjqagent folder that contains a bunch of directories - bin, conf, engines, lib and logs. In the lib directory there is an existing sagex-api.jar file. In my instance this file is dated 6/11/2011.

Do I need to update anything on the server or just on the remote client Win PC? And if it is the later then do I have to restart anything after doing this copy?
For sure you will need to update the jar in the lib folder on your Win 10 client (one of my clients is that exact setup). You will then need to restart the client, whether you are running it in the service mode or the application mode.

I have a linux client as well, but it is not unraid (and not my Sage server), so it does have a lib folder under the sjqagent folder where the jar needed updated. It sounds like your setup there might be similar to EnterNoEscape's, in which case you probably don't need to do anything beyond updating the Sage plug-in.
__________________
Andrew
Reply With Quote
  #12  
Old 03-16-2018, 07:13 PM
phelme's Avatar
phelme phelme is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 1,151
Quote:
Originally Posted by awhenry View Post
Note if you still use the (incomparably useful) SJQ, this update breaks it. You'll need to copy the sagex-api.jar file from your SageTV JARs folder to your sjqagent lib folder to restore operation. Unfortunately I did not discover this until after my SJQ filecleaner process ran, irrevocably deleting each and every one of my EDL and closed caption files for thousands of recordings (since it thought the media file was gone)...
Thanks for posting about this BTW. I was wondering why my SJQ suddenly died (though the script failure logs I saw were pointing in this general direction ).
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
sagex api sflamm SageTV v9 Customizations 8 02-21-2017 12:42 AM
sagex-api Plugin MISSING: sagex-api-FAILED http://ubuntone.com/5NNCHGlywxvXBgRw8B3nMr antplugger SageTV v7 Customizations 10 06-10-2014 01:34 AM
sagex-api - how can I tell if it works? gveres SageTV v7 Customizations 2 01-27-2012 10:56 PM


All times are GMT -6. The time now is 05:42 PM.


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