SageTV Community  

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

Notices

SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-28-2017, 09:34 AM
graywolf's Avatar
graywolf graywolf is offline
Sage Icon
 
Join Date: Oct 2009
Location: NC
Posts: 1,389
Upgrade SageTV V6 to V9 - my upgrade guide

First off, the hardest part was putting the plan together and for precautions, getting all the prep steps done. I also went thru the steps on a test/vm image to catch any gotcha's I may have missed. Also, the plan was to have the same "V6 UI" feel on the extenders (WAF). May slowly move to Gemstone on one of the extenders and get it how WAF won't be affected.

The Validations in the post-V7 upgrade didn't find any issues. There as a better safe than sorry item.

Those moving from V7 to V9 could check my Prep Steps then go to the V7 to V9 steps.

I have not switched from SageTV EPG to SD EPG at this time. Later project.

Here is what I did, hope it helps.

Prep Steps

1. Gather List of All Settings, Both HTPC-LR PC (server) & LR HD300 connected to HTPC-LR (extender/client)
Settings in:
a. Detailed Setup
b. Setup Video Sources
c. SageTV Recording Filters
d. Program Guide Options
e. Favorites (LR HD300 only)
f. V6 Screen shots of Guide, Recordings (show both individual, group/folder, and inside Show group/folder), Future Airings, Scheduled Recordings. Anything that might want to validate the look is the same.


HTPC-LR Production Steps – SageTV V6 to V7 Upgrade (all on HTPC-LR)
1. Spot check a few specific Recordings (can be done days/nights before). Have list so same can be checked after upgrades.

2. Shutdown SageTV V6

3. Take full folder backup of SageTV folders at D:\SageBackups\SageTV6-preupgrade

4. Start SageTV V6 after backup completes

5. Set the User Interface ( SageTV Application Package) to default SageTV V6 in menu options; Setup => Detailed Setup => Advanced => SageTV Application Package (.STV or .XML File). C:\SageTV\SageTV\STVs\SageTV3\SageTV3.XML

6. Get Show counts for each SageTV Recordings view (All, Recordings, Archives, Movies). Include episode counts for major groups

7. Execute wiz.bin listing for HTPC-LR on PC C:\Groovy\Scripts\Wizbin_Listing_LR.bat (listing of flag settings, show title, episode, filename, etc info.

8. Get list of Scheduled Recordings to include padding factors

9. Shutdown SageTV V6

10. Take full folder backup of SageTV folders at D:\Sage-Backups\SageTV6-preupgrade-default_ui

11. Execute SageTV V7 installer in \\TOWER\SageTV\Software\Windows\SageTV_V7_1_9Setup.exe

12. Start SageTV7 after installation is complete
NOTE: Duration is dependent upon number of Recordings. SageTV will update all Recording files to insert the meta-data into the files themselves. Get a coffee, take your dog for a walk, etc. (Was about 2hrs for me but we have tons of recordings on a NAS)

13. Validate Remote Controls work

14. On HTPC-LR, Install and configure SageTV 3 UI in Setup => SageTV Plugins => All Available Plugins (Full UI tab)

15. On HD300 in LR, Check/Set the User Interface (Full UI Package) to default SageTV V6 in menu options for SageTV V6 look; Setup => Detailed Setup => Advanced => Full UI Package (.STV or .XML File). C:\SageTV\SageTV\STVs\SageTV3\SageTV3.XML

16. Validate Show counts for each SageTV Recordings view (All, Recordings, Archives, Movies) and episode counts for selected Shows

17. Spot check a few specific Recordings that were checked prior to upgrade

18. Validate Settings from V6 list by:
1. Detailed Setup
2. Setup Video Sources
3. SageTV Recording Filters
4. Program Guide Options
5. Favorites
6. Scheduled Recordings

19. Other Validations
1. Recordings play – CC & Sound
2. Watch Live from Grid
3. Perform test Scheduled Recording & Play it once completed. CC & Sound

20. Shutdown SageTV V7

21. Take full folder backup of SageTV folders at D:\Sage-Backups\SageTV7-with-UI-plugin


HTPC-LR Production Steps - SageTV V7 to V9 Upgrade (on HTPC-LR)

1. On HTPC-LR, execute SageTV V9 installer in \\TOWER\SageTV\Software\Windows\SageTVSetup_9.0.13.536_R1.011.exe
a. Choose Options then set to current Sage install directory (C:\SageTV)

2. Start SageTV V9 after installation completes
a. During this time, wiz.bin will be converted to V9 format

3. Stop SageTV V9 after Sage Menu comes up

4. Take full folder backup of SageTV folders at D:\Sage-Backups\SageTV9-postupgrade-V6UI-plugin

5. Enter HTPC-LR license key for EPG/Grid in C:\SageTV\SageTV\activkey file (create if not exist)[This is for the SageTV EPG server]

6. Reboot HTPC-LR

7. Validate Remote Controls work

8. Check SageTV 3 UI plugin - Reinstall/configure if needed

9. Check/Set the User Interface (Full UI Package) to default SageTV V6 in menu options; Setup => Detailed Setup => Advanced => Full UI Package (.STV or .XML File). C:\SageTV\SageTV\STVs\SageTV3\SageTV3.XML

10. Validate Show counts for each SageTV Recordings view (All, Recordings, Archives, Movies) to include episode counts for selected Shows

11. Spot check a few specific Recordings that were checked prior to upgrade

12. Validate Settings from V6 list by:
a. Detailed Setup
b. Setup Video Sources
c. SageTV Recording Filters
d. Program Guide Options
e. Favorites
f. Scheduled Recordings

13. Other Validations
a. Recordings play – CC & Sound
b. Watch Live from Grid
c. Perform test Scheduled Recording & Play it once completed. CC & Sound

14. Shutdown SageTV V9 and perform full folder backup of SageTV folders at D:\Sage-Backups\SageTV9-settings-pre-STUDIO-mods

15. Start SageTV V9

16. Use STUDIO to make changes needed for screens. Items to do:
a. Switch Channel Logo to Channel Name & Number for Recordings
NOTE: Change If GetChannelLogo(Airing) != null to If GetChannelLogo(Airing) == null
b. Note any other changes between V6 screen shots
c. Refer to Studio manual at \\TOWER\SageTV\Software\Manuals\SageTV_V7_Studio_UserGuide.pdf

17. Review Plug-In Manager for any additional plug-ins to install at Setup => SageTV Plugins => All Available Plugins Examples:
a. Jetty
b. BMT
c. Sage Web Interface
d. Sage Job Queue

18. Validate scheduled/recurring scripts work on PC
a. C:\Groovy\Scripts\ForceEPGUpdate.bat
b. C:\Groovy\Scripts\Wizbin_Listing_LR.bat
c. C:\Groovy\Scripts\WatchedFolder\ListWatchedVideos_LR.bat
d. C:\Groovy\Scripts\SetAllManualRecord\SetAllManualRecord_LR.bat




SageTV V9 to V6 Backout (on HTPC-LR Production Windows)

1. Uninstall SageTV V9 software

2. Install SageTV V6 software (at \\TOWER\SageTV\Software\Windows\SageTV_V6_6_2Setup.exe )

3. Stop SageTV V6

4. Copy SageTV V6 folders backup (pre-V7 upgrade) to SageTV folder.

5. Start SageTV V6

6. Validations
a. Recordings play – CC & Sound
b. Watch Live from Grid
c. Perform test Scheduled Recording & Play it once completed. CC & Sound
Reply With Quote
  #2  
Old 03-06-2017, 01:01 PM
brandypuff brandypuff is offline
Sage Aficionado
 
Join Date: Mar 2008
Location: Berlin, MA
Posts: 378
where do i find Wizbin_Listing_LR.bat ?
__________________
- James M -

Capture Devices: HDHomerunXTEND, HDHomerunPrime
Reply With Quote
  #3  
Old 03-07-2017, 07:16 AM
graywolf's Avatar
graywolf graywolf is offline
Sage Icon
 
Join Date: Oct 2009
Location: NC
Posts: 1,389
Quote:
Originally Posted by brandypuff View Post
where do i find Wizbin_Listing_LR.bat ?
That is something I wrote which does a groovy script on PC which connects to the SageTV machine. Not essential for the upgrade plan. Just a listing of recordings and the flag settings to check if any issues arose which it did not.

In addition to having groovy installed, needed to copy the sagex-api.jar file into the groovy lib directory.

Wizbin_Listing_LR.bat
Code:
@ECHO ON

for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (
   set DayOfWeek=%%i
   set Month=%%j
   set Day=%%k
   set Year=%%l
   set Date=%%l%%j%%k
)

C:\Groovy\Groovy-2.3.7\bin\groovy.bat \Groovy\Scripts\Wizbin_Listing_LR.groovy > "C:\Documents and Settings\<userid>\My Documents\SageTV\Listing_LR_%Date%.csv" 2>&1

Wizbin_Listing_LR.groovy
Code:
    import java.io.*;
    import java.util.*;
    import java.text.SimpleDateFormat;
    import sagex.remote.rmi.*;
    import sagex.SageAPI ;
    import static groovy.io.FileType.*;
    import sagex.api.*;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    import org.apache.commons.io.FileUtils;
    import javax.mail.internet.MimeMessage;

public class EmailSettings {
    static def sendMail = true                   // Set this to false to just dump the alert msg to stdout instead of emailing it
    static def host = '<smtp-server>'
    static def user = '<e-mail user>'
    static def pwd  = '<e-mail password>'
    static def port = '25'
    static def from = '<from address>'  //user  // Gmail will reject mail via SMTP if the from addr != user id so no point in changing this
    static def to   = '<ot e-mail address>' // Sometimes Gmail won't send an email addressed to yourself, try a plus address at the end; YMMV
    static def ssl  = 'false'                     // Gmail requires SSL, other SMTP servers may or may not; this is a STRING setting!
}

    private RMISageAPI parseRmiSetting() {
        String host, port;
        host = "htpc-lr";  // SageTV pc/server name or put in static IP
        port = "1098";
        return new RMISageAPI(host, Integer.parseInt(port));
    }


    public String convertTime(long time){
        Date date = new Date(time);
        DateFormat format = new SimpleDateFormat("EEE MM/dd hh:mm a yyyy");
        return format.format(date).toString();
    }

    public String reportDate(){
        Date date = new Date();
        DateFormat format = new SimpleDateFormat("yyyyMMdd");
        return format.format(date).toString();
    }

    public static void main(String[] args)
    {
        String isArchived ;
        String isWatched ;
        String dontLike ;
        Boolean testing = false ;
        Boolean testingCopy = false ;
        Boolean matchID = false ;

        RMISageAPI api = parseRmiSetting();
        if(api != null) {
            SageAPI.setProvider(api);
            System.err.println("sagex-services manually set to '" + api.toString() + "'");
        } // end if

    println ("Archive Status | Watch Status | Like Status  | Show Title | Episode Title | Start Date Time | Channel Name | Channel Number | File Name");

    for(Object mf : MediaFileAPI.GetMediaFiles("T")) {
        if( MediaFileAPI.IsLibraryFile(mf) == true ) {
            isArchived = "Archived" ;
        } else {
            isArchived = "Unarchived" ;
        } // end if
        if( AiringAPI.IsWatched(mf) == true ) {
            isWatched = "Watched" ;
        } else {
            isWatched = "Unwatched" ;
        } // end if
        if(  AiringAPI.IsDontLike(mf) == true ) {
            dontLike = "Don't Like" ;
        } else {
            dontLike = "Like" ;
        } // end if
        println ( ""  + isArchived + " | " + isWatched + " | " + dontLike + " | " + ShowAPI.GetShowTitle(mf).replace('.',' ').replace(',',' ') + " | " + ShowAPI.GetShowEpisode(mf).replace('.',' ').replace(',',' ') + " | " + convertTime(AiringAPI.GetAiringStartTime(mf)) + " | " + AiringAPI.GetAiringChannelName(mf) + " | " + AiringAPI.GetAiringChannelNumber(mf) + " | "  + MediaFileAPI.GetFileForSegment(mf,0)  ) ;

    }  // end for

    println("* END *");
    
    def msg = new StringBuilder()
    msg.append("Database Listing located at C:\\Users\\<userid>\\Documents\\SageTV\\Listing_LR_" + reportDate() + ".cvs")
    msg.append('\n')
//    sendMail("Database Listing located at C:\\Users\\<userid>\\Documents\\SageTV ")
    sendMail(msg.toString())
} // end public main

def sendMail(def msg) {
   def today = new Date()
   def subjdate = today.format("MM/dd/yyyy")
   def subj = "SUCCESS: SAGETV - HTPC-LR Database Listing for $subjdate "
   def ant = new AntBuilder()
   ant.mail(mailhost: EmailSettings.host, mailport: EmailSettings.port, subject: subj, user: EmailSettings.user, password: EmailSettings.pwd, ssl: EmailSettings.ssl) {
       from(address: EmailSettings.from)
       to(address: EmailSettings.to)
       message(msg)   
   }
}
Reply With Quote
  #4  
Old 03-07-2017, 08:01 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Man you guys like to make things complicated.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #5  
Old 03-07-2017, 09:09 AM
graywolf's Avatar
graywolf graywolf is offline
Sage Icon
 
Join Date: Oct 2009
Location: NC
Posts: 1,389
Quote:
Originally Posted by Fuzzy View Post
Man you guys like to make things complicated.
Always open to suggestions. If recall, did that early in learning "groovy" and probably based it upon some other code and then added piece by piece from other examples.

Definitely not a professional coder....just know enough to get by
Reply With Quote
  #6  
Old 03-07-2017, 11:00 AM
Tiki's Avatar
Tiki Tiki is offline
Sage Icon
 
Join Date: Feb 2005
Location: Southwest Florida, USA
Posts: 2,009
Quote:
Originally Posted by graywolf View Post
Always open to suggestions. If recall, did that early in learning "groovy" and probably based it upon some other code and then added piece by piece from other examples.

Definitely not a professional coder....just know enough to get by
I don't think he was critiquing your coding skills. I think he was referring to the whole upgrade process. 90% of the steps you took should not be required for most people. But they allow you to be really certain of how things were before so you can get back if you run into problems.

For most people I would say:
1. Stop Sage and the Sage service.
2. Make an image backup of your boot drive including the Sage installation, using backup software.
3. Make an additional copy of the Sage installation folder (just in case).
4. Run the installer.
5. If you run into trouble, refer to the backup Sage folder or just restore your image backup.

Nothing wrong with the extra steps you laid out, just a bit complicated for most people.
__________________
Server: Ryzen 2400G with integrated graphics, ASRock X470 Taichi Motherboard, HDMI output to Vizio 1080p LCD, Win10-64Bit (Professional), 16GB RAM
Capture Devices (7 tuners): Colossus (x1), HDHR Prime (x2)
,USBUIRT (multi-zone)
Source:
Comcast/Xfinity X1 Cable
Primary Client: Server Other Clients: (1) HD200, (1) HD300
Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE,
HDHR, HVR-2250, HD-PVR
Reply With Quote
  #7  
Old 03-07-2017, 01:50 PM
graywolf's Avatar
graywolf graywolf is offline
Sage Icon
 
Join Date: Oct 2009
Location: NC
Posts: 1,389
lol. yes...if it was just myself, I would have done the shorten version.
All those "extra" steps were for WAF and her ease of mind.

Especially since WAF wanted V9 to look just like she was used to in V6.
Neither of us are big into the Fan Art and like the simplicity of the V6 list type with Show info on Top vs Left Side.

Last edited by graywolf; 03-07-2017 at 01:52 PM.
Reply With Quote
  #8  
Old 06-17-2017, 04:25 AM
kiserjm kiserjm is offline
New Member
 
Join Date: Aug 2008
Posts: 1
Code Request

Could I get a copy of some of the scripts you are using??

C:\Groovy\Scripts\ForceEPGUpdate.bat
C:\Groovy\Scripts\WatchedFolder\ListWatchedVideos_LR.bat
C:\Groovy\Scripts\SetAllManualRecord\SetAllManualRecord_LR.bat
Reply With Quote
  #9  
Old 06-17-2017, 08:46 AM
graywolf's Avatar
graywolf graywolf is offline
Sage Icon
 
Join Date: Oct 2009
Location: NC
Posts: 1,389
Quote:
Originally Posted by kiserjm View Post
Could I get a copy of some of the scripts you are using??

C:\Groovy\Scripts\ForceEPGUpdate.bat
C:\Groovy\Scripts\WatchedFolder\ListWatchedVideos_LR.bat
C:\Groovy\Scripts\SetAllManualRecord\SetAllManualRecord_LR.bat

Attached.
Of course you will need Groovy installed and will need to put your particular info into the scripts.
Attached Files
File Type: zip graywolf-scripts.zip (2.3 KB, 139 views)
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
Cannot upgrade to SageTV 9 Spartan SageTV Github Development 16 02-18-2017 02:14 PM
HD-200 --> HD-300 upgrade. Is worth the upgrade for me? mkanet SageTV Media Extender 7 12-22-2010 08:42 AM
To upgrade or not to upgrade - That is the question.... scoful SageTV Software 3 05-31-2007 05:35 AM
How to upgrade SageTv? Steve52 SageTV Software 5 01-25-2006 07:17 PM
Issues with TV Guide on Upgrade eric SageTV Software 2 10-29-2003 11:45 PM


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


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