SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Linux > SageTV for unRAID/Docker
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV for unRAID/Docker Discussion related to SageTV for unRAID/Docker. Questions, issues, problems, suggestions, etc. relating to SageTV for unRAID/Docker should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-17-2021, 02:26 AM
loomdog32's Avatar
loomdog32 loomdog32 is offline
Sage Advanced User
 
Join Date: Jun 2008
Location: West Texas
Posts: 229
YAY!! Just found this after not using SageTV for several years...

Old User doing some snooping...

I recently built a new UnRaid box and discovered the SageTV app.
I am shocked and excited all at the same time. I haven't used SageTV since the Google buyout and move back to CA where EVERYTHING on Comcast was copy protected...

Looks like this place still has some activity even.

I super wish this existed the last time I built an UnRaid and Sage Server. This is exactly what I wished for then. A single box solution. Not the 2 box solution that I ended up building (UnRaid and WHS).

Now to pull out my old HDHR and see what I can see with this!!

Now for the actual question.

I noticed there was 4 different versions, java7-java10.
Is there any differences between these?
What ver is recommended for a fresh install?

Thanx!! Looking forward to seeing some old faces and some new ones!!
Reply With Quote
  #2  
Old 03-17-2021, 06:40 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
I am not 100% sure but IMO you should use Java8 or Java9. The nice thing with Docker containers is that you can run a couple of them. I believe the issue with Java10 is that some of the plugins don't work with Java 10. Java 7 is pretty old. I have been running the Java 8 version for many years. I am not sure if there are any issues with Java9.
__________________
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 03-17-2021, 12:20 PM
loomdog32's Avatar
loomdog32 loomdog32 is offline
Sage Advanced User
 
Join Date: Jun 2008
Location: West Texas
Posts: 229
8 or 9. Gotcha.

Yeah, I remember Sage being 32bit and the Java pool being basically limited to 2gb because of that. I assume this hasn't changed? Giving 2 dedicated CPU cores and 3gb RAM is not much anymore...
Reply With Quote
  #4  
Old 03-17-2021, 01:00 PM
KeithAbbott KeithAbbott is online now
Sage Icon
 
Join Date: Oct 2009
Location: Southeastern Michigan
Posts: 1,375
Quote:
Originally Posted by loomdog32 View Post
Yeah, I remember Sage being 32bit and the Java pool being basically limited to 2gb because of that. I assume this hasn't changed? Giving 2 dedicated CPU cores and 3gb RAM is not much anymore...
Not sure what the current limitations are, but the SageTV docker running on Unraid is not this restrictive.
__________________
Server: MSI Z270 SLI Plus ATX Motherboard, Intel i7-7700T CPU, 32GB Memory, Unraid 6.11.5, sagetvopen-sagetv-server-opendct-java11 Docker (version 2.0.7)
Tuners: 2 x SiliconDust HDHomeRun Prime Cable TV Tuners, SiliconDust HDHomeRun CONNECT 4K OTA Tuner
Clients: Multiple HD300 Extenders, Multiple Fire TV Stick 4K Max w/MiniClient
Miscellaneous: Multiple Sony RM-VLZ620 Universal Remote Controls
Reply With Quote
  #5  
Old 03-17-2021, 01:03 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
SageTV on unRAID is 64 bit. That makes it more stable, especially if you connect a lot of clients. I have given my JVM a heap size of 3GB which is probably overkill. I have (for fun) connected about 10 miniclients (extenders or SageTV Placeshifter) simultaneously and had them all play content. I have 9 clients connected right now, but only one is actively playing content - I now boot up all of my extenders on a cron job after my unRAID server restarts after backing up all dockers on Monday morning. That speeds up using these extenders as they don't have to take a minute to power on. I don't have to worry about running out of JVM heap.

For Windows there is now also a 64 bit version.
__________________
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
  #6  
Old 03-17-2021, 09:21 PM
Striker:WG Striker:WG is offline
Sage Aficionado
 
Join Date: Oct 2008
Posts: 472
Vote +1 for Java 8 docker.

Wayne, any chance you can share your cron job? I'm interested in setting up something similar to restart my extenders after a reboot.
Reply With Quote
  #7  
Old 03-17-2021, 10:44 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Here you go - It is python code that runs some telnet scripts. You will have to change the extenders list to the IP addresses that are used by your extenders.

If it throws an error about telnetlib you might have to install telnetlib with "pip install telnetlib" or "python -m pip install telnetlib"

I run this in a cron job a little while after my weekly backups are done as the unRAID backup routine has to shut down all dockers. You could also run it daily at 6am or whatever time just to make sure your extenders are on.
Code:
# sagetvextbasic_on.py
import telnetlib
import errno

Extenders = ["192.168.1.48","192.168.1.50","192.168.1.51" ,"192.168.1.52","192.168.1.56" ,"192.168.1.58","192.168.1.59","192.168.1.143"] #,"192.168.1.57"

for Extender in Extenders:

    try:
        tn = telnetlib.Telnet(Extender)
        tn.read_until(b"login: ")
        tn.write(b"root\n")
        a=tn.read_until(b"\n")

        tn.write(b"killall waitpower\n") #this is the command to turnon an extender
        tn.write(b"exit\n")

        out1 = tn.read_all().decode('ascii')
        outlines=out1.split('\r\n')
        print ("outlines is ",out1)

        print("Able to connect to extender at: "+Extender) 
        
    except OSError as e:
        print ("Can't connect to host at "+Extender+" due to "+str(e))
__________________
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
  #8  
Old 03-19-2021, 10:17 AM
Striker:WG Striker:WG is offline
Sage Aficionado
 
Join Date: Oct 2008
Posts: 472
so how does that work with a reboot of the Unraid server?

I thought all the libraries are essentially dumped and reloaded from the Unraid USB at boot, so anything that you load during a session is lost at reboot?

I'm also assuming this is running as a cron job in Unraid and not in the Sage docker itself?
Reply With Quote
  #9  
Old 03-19-2021, 10:35 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
After the unRAID server reboots, or whenever the SageTV docker stops, the clients do lose the connection I believe that causes the extenders to shut off, as if you hit the power button.

This python script just starts a telnet session with each extender and acts like turning the power on from the remote control - it doesn't communicate with the server at all, just with the extenders which run a slimmed down OS called busybox Linux. Assuming that you have autoconnect turned on then as the extender powers up it should reconnect to the server.

I have this running in an Ubuntu VM that I have running on my unRAID server. You might be able to do it in a cron job from the unRAID OS but I think doing stuff like that is frowned upon. There is a plugin for unRAID called CA User Scripts. You could probably use that, however there may not be a version of python installed in the core unRAID Linux - so then it may fail due to no Python installed.

But maybe this could be rewritten as a shell script? That might make more sense. You could then run this as a script that executes whenever the SageTV docker restarts - there is a facility to run a script upon the start of the SageTV docker. That would be the optimal way to do it, assuming that you can do this in a way that it gives the docker enough time to get up and running before trying to connect. That way whenever you restart the docker all of the connectors can restart.

Let me work on that this weekend. Problme is that it is hard to test this as I need a maintenance window when the kids aren't using SageTV!
__________________
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-19-2021, 02:32 PM
Striker:WG Striker:WG is offline
Sage Aficionado
 
Join Date: Oct 2008
Posts: 472
ahh, a Linux VM, that makes more sense based on everything you've described and how I understand the inner workings of Unraid.

I currently have a Windows VM that I could probably do something similar with. I'd hate to run a Linux VM just for this one function.

I like your idea of incorporating it with the SageTV docker though! That would be optimal. Then anytime the docker restarts, the signal would be sent to the extenders to automatically power on.
Reply With Quote
  #11  
Old 03-19-2021, 04:26 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
So good and bad news. You can run it from inside a docker. The bad news is that you need to install telnet inside the docker to do that. You can do that manually but I think it will get nuked. I will have to try to figure out who builds the docker these days and how I can get this added to the core docker build.

Do you want me to post it for now?
__________________
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
  #12  
Old 03-19-2021, 04:56 PM
loomdog32's Avatar
loomdog32 loomdog32 is offline
Sage Advanced User
 
Join Date: Jun 2008
Location: West Texas
Posts: 229
Quote:
Originally Posted by wayner View Post
SageTV on unRAID is 64 bit. That makes it more stable, especially if you connect a lot of clients. I have given my JVM a heap size of 3GB which is probably overkill. I have (for fun) connected about 10 miniclients (extenders or SageTV Placeshifter) simultaneously and had them all play content. I have 9 clients connected right now, but only one is actively playing content - I now boot up all of my extenders on a cron job after my unRAID server restarts after backing up all dockers on Monday morning. That speeds up using these extenders as they don't have to take a minute to power on. I don't have to worry about running out of JVM heap.

For Windows there is now also a 64 bit version.
Quote:
Vote +1 for Java 8 docker.
This is good info!! Thanx!! I haven't had any time to play with Sage yet, . Still getting data moved over to the unRaid box. I will see about getting v9J8 installed and play with it some.

I should still have my old HDHRv1 around somewhere. I sold both the HDHRCC3 (Everything here is copy protected) and HDPVR (never could get it to work correctly on 64bit OS also no cable boxes now) a while back as both were basically unusable for me. I do have a composite and HDMI capture device; Both are USB tho (used for streaming NES games). From what reading I have done it appears devices like this will not work with the Docker ver of Sage...
Reply With Quote
  #13  
Old 03-19-2021, 05:01 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
USB devices can work but they have to be supported by the DVB version of unRAID. I am running unRAID 6.4.1 which is way behind as the current version is 6.9 and the way the DVB edition works has recently changed. But Striker has been working with one of the folks that is supported the DVB edition.

Network devices like the HDHR are eaiser though.
__________________
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
  #14  
Old 03-19-2021, 05:29 PM
Striker:WG Striker:WG is offline
Sage Aficionado
 
Join Date: Oct 2008
Posts: 472
Quote:
Originally Posted by wayner View Post
So good and bad news. You can run it from inside a docker. The bad news is that you need to install telnet inside the docker to do that. You can do that manually but I think it will get nuked. I will have to try to figure out who builds the docker these days and how I can get this added to the core docker build.

Do you want me to post it for now?
I'm pretty sure the Docker environment only gets nuked on an update, and for the frequency that Sage updates are coming out these days, it probably wouldn't hurt to post it until something more permanent can be figured out.
Reply With Quote
  #15  
Old 03-19-2021, 05:31 PM
Striker:WG Striker:WG is offline
Sage Aficionado
 
Join Date: Oct 2008
Posts: 472
Quote:
Originally Posted by wayner View Post
USB devices can work but they have to be supported by the DVB version of unRAID. I am running unRAID 6.4.1 which is way behind as the current version is 6.9 and the way the DVB edition works has recently changed. But Striker has been working with one of the folks that is supported the DVB edition.

Network devices like the HDHR are eaiser though.
Yeah, it's pretty simple. Just install the DVB Driver plugin as there is no DVB edition of Unraid anymore.

If you are going to do Firewire channel changing of STB's, then you also need to install the Firewire Driver plugin.

Once those are installed, give your Unraid a reboot for good measure and the drivers should be available to your Sage docker.
Reply With Quote
  #16  
Old 03-20-2021, 10:38 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Quote:
Originally Posted by Striker:WG View Post
I like your idea of incorporating it with the SageTV docker though! That would be optimal. Then anytime the docker restarts, the signal would be sent to the extenders to automatically power on.
I have this working now so that all extenders in a list get powered on when the docker starts and it seems to work ok. However one issue that I haven't be able to test is what happens when SageTV restarts, like is required when you install some SageTV plugins. That might cause an issue.

Unfortunately the folks available to answer some of my questions don't seem to be around anymore. But I may try sending them a dm.

But I will start a new thread on how to do that and post a link back here.
__________________
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
  #17  
Old 03-22-2021, 04:17 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
See this thread: https://forums.sagetv.com/forums/sho...472#post629472

On how to automatically have your extender start when your Docker starts.
__________________
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)
 

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
Who will still be using SageTV in five years? briankeys The SageTV Community 48 07-10-2013 02:19 PM
After 7 years with SageTV, It may just be over mightyt SageTV Software 51 06-19-2011 05:49 PM
6+ years, my SageTV server died steingra SageTV Software 9 01-23-2011 11:48 PM
SageTV - 2 years - 4 versions - better off? michaeldjcox SageTV Software 53 04-27-2009 12:17 AM
SageTV light years ahead of BeyondTV roxy99 General Discussion 19 03-31-2006 02:15 PM


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


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