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
  #21  
Old 11-08-2015, 07:45 PM
turak's Avatar
turak turak is offline
Sage Expert
 
Join Date: Sep 2003
Location: Miami
Posts: 560
I forked and cloned the git repo. I successfully ran ./buildall.sh. I moved my current installation. I laid down the new .tar.gz that I built. I copied my Wiz.bin and Sage.properties files into the new installation folder. I installed the .deb. I copied in the Gentuner object and my script. I started Sage...

Same thing. It core dumps when I try to use the Generic Tuner and It core dumps when I stop recording with the HDPVR. I watched all of "Ride Along" with the HDPVR and everything was cool until I hit stop. Then it core dumped again.
Reply With Quote
  #22  
Old 11-08-2015, 08:43 PM
turak's Avatar
turak turak is offline
Sage Expert
 
Join Date: Sep 2003
Location: Miami
Posts: 560
Quote:
Originally Posted by stuckless View Post
BTW, are you running this as root, or a normal sagetv user?

Just for fun I decided to see if SageTV would run as a normal user. I created a sagetv user and group. chown'd everything to the new user (including the media directories and files). Changed /var/run/sagetv.pid to /var/tmp/sagetv.pid in the start and stop scripts. Then I added "su sagetv -c" in the /etc/init.d/sagetv where it calls the start and stop scripts.


It seemed to run fine as a non-root user. I did get a "warning: -XX:ThreadPriorityPolicy requires root privilege on Linux" from java. My HDHomeRuns recorded and played back just fine. Everything seemed to work.

Until I tried to add my HDPVR as a source. It looks like SageTV needs root to control the HDPVR. So I changed it back to root.
Reply With Quote
  #23  
Old 11-08-2015, 11:45 PM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 674
I have not used v9 yet, but I have a pretty simple script that executes channel changes for me using cURL:
Code:
#!/bin/bash

chanraw=$2
useSTB=$1
# printf 'Enter the Video Source Designation: '
# read useSTB
# printf 'Enter the channel: '
# read chanraw

case $useSTB in
     DSS1)
	IPVAL="31" ;;
     DSS2)
	IPVAL="32" ;;
     DSS3)
	IPVAL="33" ;;
     DSS4)
	IPVAL="34" ;;
     DSS5)
	IPVAL="35" ;;
     DSS6)
	IPVAL="36" ;;
        *)
        IPVAL="37" ;;
esac
if [ $chanraw -gt 999 ]; then
   chanpre=${chanraw:1:3}
   chansub=${chanraw:4:1}
   tunecmd=http://192.168.1.$IPVAL:8080/tv/tune?major=$chanpre"&"minor=$chansub
else
   tunecmd=http://192.168.1.$IPVAL:8080/tv/tune?major=$chanraw
fi
wget -q -O \dev\null $tunecmd
echo chanraw: $chanraw >TuneHold.txt
echo chanpre: $chanpre >>TuneHold.txt
echo chansub: $chansub >>TuneHold.txt
echo tunecmd: $tunecmd >>TuneHold.txt
echo useSTB: $useSTB >>TuneHold.txt
Reply With Quote
  #24  
Old 11-09-2015, 12:36 AM
turak's Avatar
turak turak is offline
Sage Expert
 
Join Date: Sep 2003
Location: Miami
Posts: 560
Quote:
Originally Posted by jchiso View Post
I have not used v9 yet, but I have a pretty simple script that executes channel changes for me using cURL:
I wrote a script that uses curl as well. The problem is that SageTV crashes any time it calls the Generic Tuner plugin. I think it's an issue with the 64bit build of SageTV. It also crashes if I select the Firewire Tuner plugin.
Reply With Quote
  #25  
Old 11-09-2015, 05:04 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by turak View Post
Just for fun I decided to see if SageTV would run as a normal user. I created a sagetv user and group. chown'd everything to the new user (including the media directories and files). Changed /var/run/sagetv.pid to /var/tmp/sagetv.pid in the start and stop scripts. Then I added "su sagetv -c" in the /etc/init.d/sagetv where it calls the start and stop scripts.


It seemed to run fine as a non-root user. I did get a "warning: -XX:ThreadPriorityPolicy requires root privilege on Linux" from java. My HDHomeRuns recorded and played back just fine. Everything seemed to work.

Until I tried to add my HDPVR as a source. It looks like SageTV needs root to control the HDPVR. So I changed it back to root.
Well, I do hope that you figure this out I run SageTV as a normal user, but currently I haven't moved from 32 to 64 bit. I run the 7x version of sagetv with the v9 jar, but my goal was to do a full upgrade to the 64bit version over the xmas holidays.

Hopefully Jeff can take a look at your crash report and provide some feedback.
Reply With Quote
  #26  
Old 11-09-2015, 07:53 AM
turak's Avatar
turak turak is offline
Sage Expert
 
Join Date: Sep 2003
Location: Miami
Posts: 560
I'd gladly run 32bit if it solved these issues. I don't have a V7 Linux license (though I have multiple windows licenses) and I haven't seen anyone post a 32bit build of V9.
Reply With Quote
  #27  
Old 11-09-2015, 09:32 AM
turak's Avatar
turak turak is offline
Sage Expert
 
Join Date: Sep 2003
Location: Miami
Posts: 560
So I installed the V7 32bit version and dropped in the Sage.jar from the windows installation section of the V9 FAQ. It's now changing channels perfectly without crashing. It's also no longer crashing when I stop recording with the HDPVR.

I'll keep my 64bit version around in case Jeff wants to troubleshoot these issues and needs someone to test.
Reply With Quote
  #28  
Old 11-09-2015, 09:55 AM
turak's Avatar
turak turak is offline
Sage Expert
 
Join Date: Sep 2003
Location: Miami
Posts: 560
Now that it's working, I converted it back to a non-root sagetv user. I had to add the user to the 'video' group to give it access to the HDPVR.
Reply With Quote
  #29  
Old 11-09-2015, 07:48 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Geez, 64 bit and tuning seem to not fit together well. Firewire drivers don't exist for 64 bit so if you go to a 64 bit OS your days of tuning via firewire have come to an end - at least that is the case on Windows.
__________________
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
  #30  
Old 02-04-2016, 05:26 PM
troll5501 troll5501 is offline
Sage Advanced User
 
Join Date: Jun 2006
Posts: 136
Quote:
Originally Posted by turak View Post
Same thing. It core dumps when I try to use the Generic Tuner and It core dumps when I stop recording with the HDPVR. I watched all of "Ride Along" with the HDPVR and everything was cool until I hit stop. Then it core dumped again.
I came across this thread today after I ran into the same issues and was looking for a solution. After several hours of digging through the code, I may have identified what is causing both of these crashes. Slugger appears to be correct that the problem is related to some pointer and integer data types.

I'm going to do more testing later tonight and I'll let you know how it goes.
__________________
Server: HP DL380 G6, VMware ESXi 5.0 with HW passthrough for USB and Firewire, 4 x HD-PVR, ZFS storage
SageTV: Production: 7.1.9+Java 1.6.0_32 on XP, Test: 9.0.4.291+Java 1.8.0_72 on Linux 64-bit
Clients: 2 x Sage HD200 Extender, 1 x Sage HD100 Extender
Sources: 4 x Motorola DCH-3200 (firewire channel changing), HD Homerun Prime, OpenDCT 0.5.7
Reply With Quote
  #31  
Old 02-05-2016, 02:33 PM
troll5501 troll5501 is offline
Sage Advanced User
 
Join Date: Jun 2006
Posts: 136
For anyone not following the other thread related to HD-PVR crashes on 64-bit Linux, the following code commit should fix that as well as the tuner plugin crashes:

https://github.com/google/sagetv/pull/75
__________________
Server: HP DL380 G6, VMware ESXi 5.0 with HW passthrough for USB and Firewire, 4 x HD-PVR, ZFS storage
SageTV: Production: 7.1.9+Java 1.6.0_32 on XP, Test: 9.0.4.291+Java 1.8.0_72 on Linux 64-bit
Clients: 2 x Sage HD200 Extender, 1 x Sage HD100 Extender
Sources: 4 x Motorola DCH-3200 (firewire channel changing), HD Homerun Prime, OpenDCT 0.5.7
Reply With Quote
  #32  
Old 06-07-2016, 01:17 PM
bialio's Avatar
bialio bialio is offline
SageTVaholic
 
Join Date: May 2007
Location: Frisco, TX
Posts: 3,445
This script is working well for me turak - thanks for sharing!

One thing I have noticed on some other threads is that the genie mini can be controlled via HTTP also - just need an extra parameter to the url.
Code:
&clientAddr=MAC_ADDRESS_OF_GENIE_MINI"
It appears that you can pass in a 0 if you want to aim at the main genie itself. So to answer your question from the other thread - maybe a genie mini would do what you need? you'd have to get the component breakout cable.

btl.

Quote:
Originally Posted by turak View Post
Here is my gentuner perl script for controlling my DirecTV Genie (HR44) if anyone wants it or if you want to add it to github. I added .txt extension so the forums would let me upload it.






Attachment 14953

EDIT:
- I updated this to support multiple STB's
- I was missing a : in the poweron command
__________________
PHOENIX 3 is here!
Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient
Reply With Quote
  #33  
Old 06-07-2016, 03:09 PM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 674
Quote:
Originally Posted by bialio View Post
...
It appears that you can pass in a 0 if you want to aim at the main genie itself. So to answer your question from the other thread - maybe a genie mini would do what you need? you'd have to get the component breakout cable...
That's good to know. Unfortunately, the 4K capable (C61K) mini client is HDMI video out only, so if one is looking for a client to do double duty as a Sage STB then the earlier versions are better options ...
Reply With Quote
  #34  
Old 06-07-2016, 08:00 PM
turak's Avatar
turak turak is offline
Sage Expert
 
Join Date: Sep 2003
Location: Miami
Posts: 560
Quote:
Originally Posted by bialio View Post
This script is working well for me turak - thanks for sharing!

One thing I have noticed on some other threads is that the genie mini can be controlled via HTTP also - just need an extra parameter to the url.
Code:
&clientAddr=MAC_ADDRESS_OF_GENIE_MINI"
It appears that you can pass in a 0 if you want to aim at the main genie itself. So to answer your question from the other thread - maybe a genie mini would do what you need? you'd have to get the component breakout cable.

btl.
That's cool. I ended up getting a H24 though. I'm glad to hear that my script is working well for you.
Reply With Quote
  #35  
Old 08-30-2016, 11:21 PM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
Quote:
Originally Posted by bialio View Post
This script is working well for me turak - thanks for sharing!

One thing I have noticed on some other threads is that the genie mini can be controlled via HTTP also - just need an extra parameter to the url.
Code:
&clientAddr=MAC_ADDRESS_OF_GENIE_MINI"
It appears that you can pass in a 0 if you want to aim at the main genie itself. So to answer your question from the other thread - maybe a genie mini would do what you need? you'd have to get the component breakout cable.

btl.
I'm trying to use this with the unRAID docker sean created and I'm not getting a list of remotes. I modified the gentuner.ipstb file with the script below and nothing.

Anyone have any advice for a novice linux guy?
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA
Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60
Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u
Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup.
Reply With Quote
  #36  
Old 08-31-2016, 05:54 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by panteragstk View Post
I'm trying to use this with the unRAID docker sean created and I'm not getting a list of remotes. I modified the gentuner.ipstb file with the script below and nothing.

Anyone have any advice for a novice linux guy?
Did you do this step from the GenTuner wiki

Code:
cp gentuner.LOCAL gentuner
where gentuner.LOCAL is your script... ie, gentuner plugin ONLY looks for a file called "gentuner" in the sagetv root directory.

https://github.com/jwittkoski/GenericTunerPlugin
Reply With Quote
  #37  
Old 09-06-2016, 03:03 PM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
Quote:
Originally Posted by stuckless View Post
Did you do this step from the GenTuner wiki

Code:
cp gentuner.LOCAL gentuner
where gentuner.LOCAL is your script... ie, gentuner plugin ONLY looks for a file called "gentuner" in the sagetv root directory.

https://github.com/jwittkoski/GenericTunerPlugin
Yes. i have a gentuner and a gentuner.LOCAL file in the root sagetv directory, the server directory, and the gentuner directory and it isn't picking up my tuners.

Maybe there is an issue with my script?
Attached Files
File Type: txt gentuner.ipstb.txt (2.7 KB, 237 views)
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA
Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60
Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u
Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup.
Reply With Quote
  #38  
Old 09-06-2016, 04:36 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by panteragstk View Post
Yes. i have a gentuner and a gentuner.LOCAL file in the root sagetv directory, the server directory, and the gentuner directory and it isn't picking up my tuners.

Maybe there is an issue with my script?
That particular script seems OK... the question is whether or not the "gentuner" script is the same as this one... ie, the GenTuner plugin will only execute a script with the name "gentuner". Scripts like gentuner.ipstb is a "sample script that must be renamed/copied to gentuner before it will work.

If you have some linux experience you can run the docker container in interactive mode (ie, ssh into your server, and then run the docker command...

Code:
# docker exec -ti stuckless-sagetv-server-java8 /bin/bash
or stuckless-sagetv-server-java7 is you are running the java7 version.

this gives you a shell into your sagetv environment.

Code:
# cd /opt/saget/server/
# ./gentuner REMOTES
If that fails, then we start to figure out why.
Reply With Quote
  #39  
Old 09-08-2016, 03:13 PM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
Quote:
Originally Posted by stuckless View Post
That particular script seems OK... the question is whether or not the "gentuner" script is the same as this one... ie, the GenTuner plugin will only execute a script with the name "gentuner". Scripts like gentuner.ipstb is a "sample script that must be renamed/copied to gentuner before it will work.

If you have some linux experience you can run the docker container in interactive mode (ie, ssh into your server, and then run the docker command...

Code:
# docker exec -ti stuckless-sagetv-server-java8 /bin/bash
or stuckless-sagetv-server-java7 is you are running the java7 version.

this gives you a shell into your sagetv environment.

Code:
# cd /opt/saget/server/
# ./gentuner REMOTES
If that fails, then we start to figure out why.
It was a permissions thing. gentuner permissions were set to "nobody". I added root as a user and it found my boxes now. Thanks for the help.

Any advice on keeping the permissions in order? Setting as root doesn't sound like the best idea.
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA
Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60
Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u
Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup.
Reply With Quote
  #40  
Old 09-09-2016, 05:17 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by panteragstk View Post
It was a permissions thing. gentuner permissions were set to "nobody". I added root as a user and it found my boxes now. Thanks for the help.

Any advice on keeping the permissions in order? Setting as root doesn't sound like the best idea.
What was the permission issue? The whole container runs as "nobody" and the permissions are set to nobody when the container starts. Just wondering what your specific issue was... maybe I need to tweak something there.
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
External Command Tuner Plugin for Linux stuckless SageTV Linux 36 05-16-2017 03:11 PM
Plugin Request: Run external command on error tedson SageTV v7 Customizations 10 06-14-2010 07:32 PM
Adding custom command for launching external program dinki SageMC Custom Interface 14 01-22-2010 08:16 AM
Getting the status after running an external command pedz25 SageMC Custom Interface 0 04-05-2009 06:55 AM
Fail to launch PowerDVD Ultra as external command basset SageTV Customizations 4 12-20-2007 11:59 AM


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


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