SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v9 Customizations

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 10-16-2021, 03:14 PM
jusjoken jusjoken is offline
SageTVaholic
 
Join Date: Dec 2005
Location: Strathmore, AB
Posts: 2,698
Migrating Web Apps - any interest?

I wanted something different to learn so I have been looking into updating the webapp solution for SageTV to Jetty 9.x. The current VERY outdated version is 6.x so this is a LARGE change and the solution is pretty much a rewrite rather than an update. And I have NO Jetty experience and limited web development experience but that's never stopped me before

Jetty 9.x supports a minimum Java version of 1.8 (8) and supports all the way up to 16 and higher and is fully supported still (even though there is a Jetty 10 and 11 now). This should give us a good foundation and still allow 1.8 to be the minimum version.

Once Jetty is working within SageTV then each of the current webapps will need updating as well. BMT I can likely do as the source is available on GitHub. I will need to find the source for the other webapps (mobile and the main web app) and or reach out to anyone who has recently modified them to see if I can work with them to get them updated.

This may amount to nothing or may be part of bringing SageTV interface into the "here and now" and allow growth in the web UI space (something all the competition do really well).

So...what web based apps do you use and feel need to be migrated to a new Jetty base ?

K
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page
Reply With Quote
  #2  
Old 10-16-2021, 04:38 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,469
First off - thanks so much for doing this!

Here is what I have and still use that build from the Jetty server.
  1. Sage Recording extender - SRE. This is crucial for those of us that watch sports. (Base URL localhost:8080/livepvrdata/events) written by Slugger, now maintained by skiingwiz
  2. SageAlert would also be useful. (Base URL localhost:8080/sagealert/) written by Slugger
  3. The SageX API web server. (Base URL localhost:8080/sagex/api)
  4. The SageX web server API documentation. (Base URL localhost:8080/sagex/apidocs)
  5. The SJQ additions to the menu of the main web page written by Slugger
In one of his last updates of the Web page, Slugger allowed the last point on this list. He also allowed you to use Groovy to write additional Sage WebUI pages. I created something I call Sage Client Manager that let's me see the status of all of the SageTV clients (extenders, PlaceShifter, Client, Android) that have ever connected to the PC. It would be great if this functionality still existed and I could then release this for others as well.

There would probably be future functionality people would like to have, like the ability to be able to play back content from the web UI.

Feature Requests
I believe that stuckless was planning to essentially merge BMT with the main UI. But then he decided to move away from Sage before he ever did that. If you were feeling really energetic that could be an idea.

It would also be nice to be able to do other tasks from the web UI, like everything available in the Setup menus of the UI. Especially stuff like adding/deleting channels. Essentially any configuration should be able to be done from the Web UI. Right now that is not really the case, although you can do a log of config stuff through BMT.

I have a backup server and I could turn on another test server as well so I can help doing beta testing that won't F up a system.
__________________
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
  #3  
Old 10-16-2021, 05:14 PM
AlphaCrew AlphaCrew is offline
Sage Aficionado
 
Join Date: May 2010
Location: Whosevile
Posts: 300
I use the web app quite a bit.
Reply With Quote
  #4  
Old 10-17-2021, 03:50 AM
VCRUser VCRUser is offline
Sage Aficionado
 
Join Date: Jan 2008
Posts: 429
I would prefer that the new app wouldn't replace the current web apps (since I have some issues with Java 1.8+ in some cases), but would be a separate app so that users could use either the old or the new. For a new app, the most important feature for me would be the ability to at least run a preview of recordings, including recordings in progress. Essentially, I sometimes have a need to do a quick check to make sure a recording is going ok (the show didn't start late or run late, and wasn't mistuned) - essentially anything that would require an intervention to fix the problem. In that vein, it would be really cool to be able to tell my server to resend the tuning command. I use USBUIRT to send IR codes to my tuners, and sometimes they miscommunicate, giving me channel 4 or 488 instead of 48, for example.
__________________
Server: Windows 8.1 4gb RAM; 4TB SATA + others. Homebrew quad core AMD. Inputs: Haup. 980, 850 & 950Q on ATSC; Haup 1600 on ATSC & Comcast 2 DTAs with USBUIRT for NTSC. Haup 1800 on ATSC. HDHR Dual (ATSC). Sage 9.22 64 bit.
Reply With Quote
  #5  
Old 10-17-2021, 05:10 AM
jusjoken jusjoken is offline
SageTVaholic
 
Join Date: Dec 2005
Location: Strathmore, AB
Posts: 2,698
Quote:
Originally Posted by VCRUser View Post
I would prefer that the new app wouldn't replace the current web apps (since I have some issues with Java 1.8+ in some cases), but would be a separate app so that users could use either the old or the new. For a new app, the most important feature for me would be the ability to at least run a preview of recordings, including recordings in progress. Essentially, I sometimes have a need to do a quick check to make sure a recording is going ok (the show didn't start late or run late, and wasn't mistuned) - essentially anything that would require an intervention to fix the problem. In that vein, it would be really cool to be able to tell my server to resend the tuning command. I use USBUIRT to send IR codes to my tuners, and sometimes they miscommunicate, giving me channel 4 or 488 instead of 48, for example.
I understand the desire to keep them separate and so I will look into this but it has its issues including current users that don't frequent the forum would not be aware of the update.

Curious what the 1.8 issues are...i thought the main issue for those staying on 1.7 was the web app solution ?

K
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page
Reply With Quote
  #6  
Old 10-17-2021, 10:20 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,469
FYI - I have been on Java 8 for a long time and I don't have any issues. It is possible that there is an issue with the Mobile app, but I don't use that.
__________________
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
  #7  
Old 10-20-2021, 08:21 AM
waynedunham waynedunham is offline
Sage Icon
 
Join Date: Sep 2004
Posts: 1,469
Quote:
Originally Posted by AlphaCrew View Post
I use the web app quite a bit.
I do also, it's critical for me when I'm spending a month up at my camp in Maine. I have to keep an eye on what's scheduled, what IR "thinks" I want to record, etc.

Several options in the SageTV web app are "broken" in Java 1.8. Any time you try to search the EPG it fails. Dang, I can't recall offhand what other things are broken, but there are a few that I use from time to time.

I know there's at least one that doesn't work in the Mobile Web App that still work in the old remote app, and I think search is one of them.
__________________
Wayne Dunham
Reply With Quote
  #8  
Old 10-20-2021, 09:06 AM
tvmaster2's Avatar
tvmaster2 tvmaster2 is offline
SageTVaholic
 
Join Date: Jun 2005
Location: tarana
Posts: 4,193
Quote:
Originally Posted by waynedunham View Post
I do also, it's critical for me when I'm spending a month up at my camp in Maine. I have to keep an eye on what's scheduled, what IR "thinks" I want to record, etc.

Several options in the SageTV web app are "broken" in Java 1.8. Any time you try to search the EPG it fails. Dang, I can't recall offhand what other things are broken, but there are a few that I use from time to time.

I know there's at least one that doesn't work in the Mobile Web App that still work in the old remote app, and I think search is one of them.
When you say "old remote app", are you talking about what was branded as the
"Phoenix Remote" app in the Android store at one point?
That's the one I've always used, although it's Java and Jetty have been outdated so things like Guide listings and Search do not function anymore.
But it's design was really nice.
__________________
Sage 9 server = Gigabyte AMD quad-core - 4 gigs - integrated ATI HD4200 chipset - SSD boot, Hitachi Deskstar show drives. HD-PVR - Colossus - Win7 32 bit. HD200/300’s networked. HDHomerun tuner. "If you've given up on Weird Al, you've given up on life" - Homer Simpson
Reply With Quote
  #9  
Old 10-20-2021, 12:43 PM
jusjoken jusjoken is offline
SageTVaholic
 
Join Date: Dec 2005
Location: Strathmore, AB
Posts: 2,698
Quote:
Originally Posted by waynedunham View Post
I do also, it's critical for me when I'm spending a month up at my camp in Maine. I have to keep an eye on what's scheduled, what IR "thinks" I want to record, etc.

Several options in the SageTV web app are "broken" in Java 1.8. Any time you try to search the EPG it fails. Dang, I can't recall offhand what other things are broken, but there are a few that I use from time to time.

I know there's at least one that doesn't work in the Mobile Web App that still work in the old remote app, and I think search is one of them.
Adding this comment here from your other post so I can keep this together....

Code:
Oh, one other thing I'd love to see in the Mobile Web App is something that is in the older remote app. Being able to restart SageTV from the menu. Right now I have to browse to the old app to do that. Sure would be nice to be able to do it from the newer "formatted for my tablet" Mobile Web App.
Can you let me know what this "older remote app" is as they are ALL old...

K
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page
Reply With Quote
  #10  
Old 10-20-2021, 01:27 PM
tvmaster2's Avatar
tvmaster2 tvmaster2 is offline
SageTVaholic
 
Join Date: Jun 2005
Location: tarana
Posts: 4,193
Quote:
Originally Posted by jusjoken View Post
Adding this comment here from your other post so I can keep this together....

Code:
Oh, one other thing I'd love to see in the Mobile Web App is something that is in the older remote app. Being able to restart SageTV from the menu. Right now I have to browse to the old app to do that. Sure would be nice to be able to do it from the newer "formatted for my tablet" Mobile Web App.
Can you let me know what this "older remote app" is as they are ALL old...

K
This is the Android app I’ve always used, and kept the .apk, because it appears to be gone from the Android Store. Still the best, quickest small-screen SageTV interface:

https://forums.sagetv.com/forums/showthread.php?t=59248
__________________
Sage 9 server = Gigabyte AMD quad-core - 4 gigs - integrated ATI HD4200 chipset - SSD boot, Hitachi Deskstar show drives. HD-PVR - Colossus - Win7 32 bit. HD200/300’s networked. HDHomerun tuner. "If you've given up on Weird Al, you've given up on life" - Homer Simpson
Reply With Quote
  #11  
Old 10-21-2021, 04:59 AM
waynedunham waynedunham is offline
Sage Icon
 
Join Date: Sep 2004
Posts: 1,469
Quote:
Originally Posted by jusjoken View Post
Adding this comment here from your other post so I can keep this together....

Code:
Oh, one other thing I'd love to see in the Mobile Web App is something that is in the older remote app. Being able to restart SageTV from the menu. Right now I have to browse to the old app to do that. Sure would be nice to be able to do it from the newer "formatted for my tablet" Mobile Web App.
Can you let me know what this "older remote app" is as they are ALL old...

K
Yeah, I guess at this point they are all "old".

The two I'm referring to:

The "old" one is SageTV Plugin: SageTV Web Interface (accessed by browser at "server"colon"port/sage/Home")

The "new" one is SageTV Plugin: SageTv Mobile Web Interface (accessed by browser at "http://server"colon"port/sagem/m/

Note: had to put the colon character in quotes since colonP shows at a smiley face

I just checked and both of the Mobile Web main menu search functions return an error message, something about a servlet error "arrays can't be resolved", and unable to compile class for JSP PWC6199"
Both of these search functions work fine in the older web interface

Also, same error message in Mobile Web if you try to edit or create a favorite. Same message in the same class.
This also works fine in the older Web Interface

Again, all this happened when I upgraded Java to 1.8 which is what I'm currently running (32bit SageTV)

There may be more that I haven't run into. But the errors I've pointed out all seem to be in that one "class"
__________________
Wayne Dunham
Reply With Quote
  #12  
Old 10-20-2021, 01:10 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,469
Quote:
Originally Posted by waynedunham View Post
I do also, it's critical for me when I'm spending a month up at my camp in Maine. I have to keep an eye on what's scheduled, what IR "thinks" I want to record, etc.

Several options in the SageTV web app are "broken" in Java 1.8. Any time you try to search the EPG it fails. Dang, I can't recall offhand what other things are broken, but there are a few that I use from time to time.

I know there's at least one that doesn't work in the Mobile Web App that still work in the old remote app, and I think search is one of them.
Search EPG works for me in the web UI with Java 8 on both Windows 10 and unRAID.
__________________
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
  #13  
Old 10-20-2021, 01:23 PM
tvmaster2's Avatar
tvmaster2 tvmaster2 is offline
SageTVaholic
 
Join Date: Jun 2005
Location: tarana
Posts: 4,193
Quote:
Originally Posted by wayner View Post
Search EPG works for me in the web UI with Java 8 on both Windows 10 and unRAID.
When you say “web ui”, is this what you’re using:

“youripaddress:8080/sage/“
__________________
Sage 9 server = Gigabyte AMD quad-core - 4 gigs - integrated ATI HD4200 chipset - SSD boot, Hitachi Deskstar show drives. HD-PVR - Colossus - Win7 32 bit. HD200/300’s networked. HDHomerun tuner. "If you've given up on Weird Al, you've given up on life" - Homer Simpson
Reply With Quote
  #14  
Old 10-21-2021, 09:09 PM
jusjoken jusjoken is offline
SageTVaholic
 
Join Date: Dec 2005
Location: Strathmore, AB
Posts: 2,698
Quote:
Originally Posted by wayner View Post
First off - thanks so much for doing this!

Here is what I have and still use that build from the Jetty server.
  1. The SageX API web server. (Base URL localhost:8080/sagex/api)
  2. The SageX web server API documentation. (Base URL localhost:8080/sagex/apidocs)
Do you have any sample calls/scripts for the sagex api i could use to see what may need updating ?

Is there a plugin for the api docs?

K
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page
Reply With Quote
  #15  
Old 10-21-2021, 09:35 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,469
Quote:
Originally Posted by jusjoken View Post
Do you have any sample calls/scripts for the sagex api i could use to see what may need updating ?

Is there a plugin for the api docs?

K
On the first question, here is the top of the page that shows some documentation:

Quote:
Sage API - 9.1.7.0

NOTE: If the command arg expects a sage object, such mediafile, ariing, playlist, channel, show, plugin, favorite, series, etc, then you can still pass a reference to sage object, using mediafile:MEDIAFILE_ID, airing:AIRING_ID, playlist:PLAYLIST_NAME, channel:CHANNEL_NUMBER, show:EXTERNAL_ID, series:SERIES_INFO_ID, favorite:FAVORITE_ID, plugin:PLUGIN_ID, playlist:PLAYLIST_NAME, widget:SYMBOL, etc.

Example: /sages/api?c=IsMediaFileObject&1=mediafile:3231112
Url Format: /sagex/api?command=SAGE_COMMAND&1=arg1&2=arg2...&start=#&size=#&context=SAGE_UI_CONTEXT&encoder=xml|json|nielm|image|raw&jsoncallback=functionName&filter=Field1|Field2|Field3|...&raw_content_type=audio/x-mpegurl
command SageTV Command (can also use c= as a short form)
start If the return type is an array, start at this element (0 is the first element)
size If the return type is an array, return this # of elements
context SageTV UI Context (only needed for UI Commands)
encoder Which encoder to use for encoding the results. xml is default.
jsoncallback (json only) The callback function name if you want to return the result as a JSONP string rather than a normal JSON string
filter (json and xml only) A pipe(|) separated list of field names that will be returned. When present ONLY field names matching the list supplied will be returned.
raw_content_type (raw only) Sets the content type reply header to the be value you specify here.
Example /sagex/api?c=GetMediaFiles&start=10&size=20&filter=IsLocalFile|MediaTitle|MediaFileID
Example /sagex/api?c=GetMediaFiles&1=T
Example /sagex/api?c=GetMediaFiles&1=T&encoder=nielm
Example /sagex/api?c=EvaluateExpression&1=Sort(GetMediaFiles("T"),false,"Intelligent")
On the second question, I don't see a plugin. I am guessing that this installed automatically with the SageX API.

The SageX API was written by Stuckless and was last updated on 3/4/2018
__________________
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
  #16  
Old 10-30-2021, 07:54 AM
jusjoken jusjoken is offline
SageTVaholic
 
Join Date: Dec 2005
Location: Strathmore, AB
Posts: 2,698
Making some progress on Jetty 9

This project is going to take some time as I have lots to learn and Jetty 9 is VERY different from Jetty 6...however, I thought I would provide a progress report...
  • I have the build environment setup for JettyStarter and mostly converted to Jetty 9
  • I have a Jetty 9 webserver running within SageTV 9
  • I have BMT working with only minimal changes but not fully tested
  • I have the build environment setup for SageTV Mobile Web App and mostly converted to Jetty 9
  • I have the SageTV Mobile Web App running now under SageTV 9 and Jetty 9...lots of testing yet as I am sure code changes will still be needed for much of the functionality...the web remote works well though!!
  • I have the login/security migrated to Jetty 9 so it forces a login for any of the webapps (this one took a LOT of time to get working)

And LOTS still to do to make this testable by others and validate what may need to change to support the other webapps.

Stay tuned.

K
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page
Reply With Quote
  #17  
Old 10-30-2021, 08:30 AM
tvmaster2's Avatar
tvmaster2 tvmaster2 is offline
SageTVaholic
 
Join Date: Jun 2005
Location: tarana
Posts: 4,193
Quote:
Originally Posted by jusjoken View Post
This project is going to take some time as I have lots to learn and Jetty 9 is VERY different from Jetty 6...however, I thought I would provide a progress report...
  • I have the build environment setup for JettyStarter and mostly converted to Jetty 9
  • I have a Jetty 9 webserver running within SageTV 9
  • I have BMT working with only minimal changes but not fully tested
  • I have the build environment setup for SageTV Mobile Web App and mostly converted to Jetty 9
  • I have the SageTV Mobile Web App running now under SageTV 9 and Jetty 9...lots of testing yet as I am sure code changes will still be needed for much of the functionality...the web remote works well though!!
  • I have the login/security migrated to Jetty 9 so it forces a login for any of the webapps (this one took a LOT of time to get working)

And LOTS still to do to make this testable by others and validate what may need to change to support the other webapps.

Stay tuned.

K
Excellent, sounds like you’re making lots of progress
__________________
Sage 9 server = Gigabyte AMD quad-core - 4 gigs - integrated ATI HD4200 chipset - SSD boot, Hitachi Deskstar show drives. HD-PVR - Colossus - Win7 32 bit. HD200/300’s networked. HDHomerun tuner. "If you've given up on Weird Al, you've given up on life" - Homer Simpson
Reply With Quote
  #18  
Old 12-01-2021, 07:45 PM
jusjoken jusjoken is offline
SageTVaholic
 
Join Date: Dec 2005
Location: Strathmore, AB
Posts: 2,698
Quote:
Originally Posted by wayner View Post
On the second question, I don't see a plugin. I am guessing that this installed automatically with the SageX API.

The SageX API was written by Stuckless and was last updated on 3/4/2018
@wayner.. re sagex

I am working on getting this working on Jetty 9 - I am close I think.

sagex/api does provide the api docs...so that's good and I tried a few calls that seem to work.

Can you tell me if sagex itself returns any web page...

http://localhost:8080/sagex

Let me know what the results of that are.

Thanks
Ken
__________________
If you wish to see what I am up to and support my efforts visit my Patreon page
Reply With Quote
  #19  
Old 12-01-2021, 08:59 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,469
For that call I get a 404 error:
Code:
HTTP ERROR 404
Problem accessing /sagex/. Reason:

    No Sage Handler Specified.
Powered by Jetty://
I get this same error message from both Win32 version of Sage and from my unRAID version of Sage - although with unRAID I can't use localhost as the docker doesn't have an internal browser so I have to call the web page from a different IP address, or from another docher/VM on that server.

But if I go to http://localhost:8080/sagex/api (or http://192.168.1.99:7070/sagex/api on my unRAID server) then I get the proper SageX API page
__________________
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
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Interest in New SMM? PLUCKYHD Sage My Movies 43 06-22-2016 05:21 PM
external apps blwegrzyn SageTV v7 Customizations 9 10-30-2010 04:59 PM
PDA Cell Phone Apps electrofex SageTV Customizations 1 01-04-2010 08:27 AM
Switching between apps? Skybolt SageMC Custom Interface 3 11-24-2008 09:27 PM
Playing .TS with other apps Mike Young SageTV Beta Test Software 12 10-20-2005 08:46 PM


All times are GMT -6. The time now is 03:12 PM.


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