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
  #61  
Old 10-17-2019, 04:59 PM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 674
Quote:
Originally Posted by jpwegas View Post
Can you post your version of gentuner?
Here's the failing gentuner script. Again: I am at a loss as to how to and where to specify the Tuning Devices such that Sage recognizes the options. The script works as expected from command line ...
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
  #62  
Old 10-17-2019, 05:37 PM
jpwegas jpwegas is offline
Sage Expert
 
Join Date: May 2007
Posts: 502
Quote:
Originally Posted by jchiso View Post
It's running as 'root'


It's gives me an 'Authentication Failure' message, even after entering the password.

  • -rwx--x--x 1 root root 959 Oct 17 01:24 /opt/sagetv/server/gentuner
Shell scripts should be readable by everyone if they have the execute flag on.
Code:
chmod a+r /opt/sagetv/server/gentuner
Can you post the output of:
Code:
id
/opt/sagetv/server/gentuner REMOTES
su - root -c "/opt/sagetv/server/gentuner REMOTES"
Since it sounds like you are logged in as root, the last two commands should be the same.


--John
Reply With Quote
  #63  
Old 10-17-2019, 05:42 PM
jpwegas jpwegas is offline
Sage Expert
 
Join Date: May 2007
Posts: 502
Quote:
Originally Posted by jchiso View Post
Here's the failing gentuner script. Again: I am at a loss as to how to and where to specify the Tuning Devices such that Sage recognizes the options. The script works as expected from command line ...
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
This doesn't look like a gentuner script to me. A gentuner script needs to check for the CAN_TUNE, REMOTES, and TUNE options and respond appropriately as discussed previously. That would explain why you aren't seeing any remotes in Sage.

Perhaps you were using a different tuning plugin before?

--John
Reply With Quote
  #64  
Old 10-17-2019, 06:05 PM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 674
Quote:
Originally Posted by jpwegas View Post

Can you post the output of:
Code:
id
/opt/sagetv/server/gentuner REMOTES
su - root -c "/opt/sagetv/server/gentuner REMOTES"
  • uid=1000(owner) gid=1000(owner) groups=1000(owner),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lpadmin),126(sambashare)
  • /opt/sagetv/server/gentuner: line 25: [: -gt: unary operator expected
  • su: Authentication failure
Reply With Quote
  #65  
Old 10-17-2019, 06:14 PM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 674
Quote:
Originally Posted by jpwegas View Post
This doesn't look like a gentuner script to me ...

Perhaps you were using a different tuning plugin before?
Yes, this had been using the old 32-bit External Tuner Plugin, which operated in conjunction with a separate file (ext-command-tuner-remotes.cfg) that defined the tuning devices.

I was asking what was needed to make the script functional under the gentuner plugin as the old plugin simply passed the two tuning arguments (Tuning Device, Channel Number) to a script the end user defined.
Reply With Quote
  #66  
Old 10-17-2019, 06:20 PM
jpwegas jpwegas is offline
Sage Expert
 
Join Date: May 2007
Posts: 502
Quote:
Originally Posted by jchiso View Post
  • uid=1000(owner) gid=1000(owner) groups=1000(owner),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lpadmin),126(sambashare)
  • /opt/sagetv/server/gentuner: line 25: [: -gt: unary operator expected
  • su: Authentication failure
  • You are logged in as the user "owner".
  • Your script expects two options, the second which must be a number, so it's throwing this error. Your script doesn't recognize the REMOTES option which is required for a gentuner script.
  • You need to enter root's password.

I suggest you take the gentuner.IPSTB and modify it to do the wget tuning that is in your script. You can take most of your script and just stick it in the TUNE section, then in the REMOTES section, add this to announce the remotes you have:

Code:
    echo "DSS1"
    echo "DSS2"
    echo "DSS3"
    echo "DSS4"
    echo "DSS5"
    echo "DSS6"

--John
Reply With Quote
  #67  
Old 10-17-2019, 06:24 PM
jpwegas jpwegas is offline
Sage Expert
 
Join Date: May 2007
Posts: 502
Quote:
Originally Posted by jchiso View Post
I was asking what was needed to make the script functional under the gentuner plugin as the old plugin simply passed the two tuning arguments (Tuning Device, Channel Number) to a script the end user defined.
The two plugins have different requirements for the tuning scripts, they are similar but are not interchangeable.

I suggest you use gentuner.IPSTB as an example and modify it using the code in your script.

--John
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.