SageTV Community  

Go Back   SageTV Community > Hardware Support > Hardware Support
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

Hardware Support Discussions related to using various hardware setups with SageTV products. Anything relating to capture cards, remotes, infrared receivers/transmitters, system compatibility or other hardware related problems or suggestions should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #321  
Old 07-09-2020, 10:57 AM
boukmandutty boukmandutty is offline
Sage Advanced User
 
Join Date: Oct 2011
Location: Norman OK
Posts: 199
I sent out a few PMs but it seems people might not be around. I need some help creating some kind of script to control live tv on my android box.

I already figured out how to change the channel on the box via adb command.
Now I need something to execute that command when sagetv selects a channel.

I know the key is exemultitunerplugin. The problem is that the adb command does not include numbers in this case. It involves a sequence of button presses. I think i could have eventghost do those commands but I was looking for something a bit more elegant.
Reply With Quote
  #322  
Old 07-09-2020, 11:17 AM
EnterNoEscape's Avatar
EnterNoEscape EnterNoEscape is offline
SageTVaholic
 
Join Date: Jun 2010
Location: Harrisburg, PA
Posts: 2,657
Quote:
Originally Posted by boukmandutty View Post
I sent out a few PMs but it seems people might not be around. I need some help creating some kind of script to control live tv on my android box.

I already figured out how to change the channel on the box via adb command.
Now I need something to execute that command when sagetv selects a channel.

I know the key is exemultitunerplugin. The problem is that the adb command does not include numbers in this case. It involves a sequence of button presses. I think i could have eventghost do those commands but I was looking for something a bit more elegant.
You might be able to create a batch file/PowerShell script to parse the number from SageTV and translate it into a bunch of goto statements/functions for the correct button presses for each number.
__________________
SageTV v9 Server: ASRock Z97 Extreme4, Intel i7-4790K @ 4.4Ghz, 32GB RAM, 6x 3TB 7200rpm HD, 2x 5TB 7200rpm HD, 2x 6TB 7200rpm HD, 4x 256GB SSD, 4x 500GB SSD, unRAID Pro 6.7.2 (Dual Parity + SSD Cache).
Capture: 1x Ceton InfiniTV 4 (ClearQAM), 2x Ceton InfiniTV 6, 1x BM1000-HDMI, 1x BM3500-HDMI.

Clients: 1x HD300 (Living Room), 1x HD200 (Master Bedroom).
Software: OpenDCT :: WMC Live TV Tuner :: Schedules Direct EPG
Reply With Quote
  #323  
Old 07-09-2020, 11:38 AM
Zogg's Avatar
Zogg Zogg is offline
Sage Aficionado
 
Join Date: May 2011
Location: Frisco, TX
Posts: 428
Quote:
Originally Posted by boukmandutty View Post
I sent out a few PMs but it seems people might not be around. I need some help creating some kind of script to control live tv on my android box.

I already figured out how to change the channel on the box via adb command.
Now I need something to execute that command when sagetv selects a channel.

I know the key is exemultitunerplugin. The problem is that the adb command does not include numbers in this case. It involves a sequence of button presses. I think i could have eventghost do those commands but I was looking for something a bit more elegant.
I just responded to your PM with some long winded info that is basically what ENE just posted. Some examples would help to determine the best way to do what you want.
Reply With Quote
  #324  
Old 07-13-2020, 01:47 PM
boukmandutty boukmandutty is offline
Sage Advanced User
 
Join Date: Oct 2011
Location: Norman OK
Posts: 199
Ok, thanks to Zogg and EnE for the leads I needed to get this going.

I am now able to tune and record a channel from any live tv app on android tv, using any capture device. Those apps tend not to have real channel numbers since they are iptv and so tuning takes a sequence of simulated button presses.

The trick is to find the command to get app started make note of the sequence that gets you to live tv, and then to the channel you want to record from.

Yes these apps do have cloud dvr but the commercials you have to endure are crazy, especially when you have been spoiled by Sagetv.

My batch file looks like this.

Quote:
@echo off
set "myvar2=%2"
set "myvar=%1"
if "%myvar%"=="" set /p "myvar=Enter Value: " || set "myvar=Default Value"
goto %myvar%

rem first device ip
:192.168.1.171
goto %myvar2%
goto end.

rem second device ip
:192.168.1.215
goto %myvar2%
goto end

:731
rem TBS
adb -s %myvar% shell (commands for button sequence to tune channel goes here)
exit

:730
rem TNT
adb -s %myvar% shell (commands for button sequence to tune channel goes here)
exit
Reply With Quote
  #325  
Old 07-13-2020, 08:22 PM
Zogg's Avatar
Zogg Zogg is offline
Sage Aficionado
 
Join Date: May 2011
Location: Frisco, TX
Posts: 428
Good job, boukmandutty. Simple but it works.
Reply With Quote
  #326  
Old 07-19-2020, 10:04 PM
Zogg's Avatar
Zogg Zogg is offline
Sage Aficionado
 
Join Date: May 2011
Location: Frisco, TX
Posts: 428
I'm trying to set up WMC in a VM and running into DCA issues. Does anyone have a copy of OverrideDigitalCableAdvisor.cmd from Missing Remote? The file doesn't seem to be on the site anymore.
Reply With Quote
  #327  
Old 07-20-2020, 06:09 AM
UgaData's Avatar
UgaData UgaData is offline
Sage Aficionado
 
Join Date: Sep 2005
Posts: 447
Enjoy
Attached Files
File Type: zip OverrideDigitalCableAdvisor.zip (724 Bytes, 149 views)
__________________
"Unencumbered by the thought process"

The only constant in the Universe is change.
Reply With Quote
  #328  
Old 07-20-2020, 07:34 AM
Zogg's Avatar
Zogg Zogg is offline
Sage Aficionado
 
Join Date: May 2011
Location: Frisco, TX
Posts: 428
Quote:
Originally Posted by UgaData View Post
Enjoy
Thanks so much!
Reply With Quote
  #329  
Old 08-27-2020, 08:46 AM
Zogg's Avatar
Zogg Zogg is offline
Sage Aficionado
 
Join Date: May 2011
Location: Frisco, TX
Posts: 428
Has anyone ever figured out how to get SageTV to send the STOP command to the WMC Live Tuner if you're using a native tuner like a Colossus or HDPVR?

OpenDCT handles this when using an IP capture device, but SageTV doesn't seem to have this capability.
__________________
-----
AMD Ryzen 5 3600, B450 m/b, 32Gig, lots of disks, Unraid, 2x HDPVR2 tuners, HDHomeRun Prime, HDHomeRun HDHR4 OTA, Windows Live Tuner, SageTV docker, OpenDCT docker, Win8.1 VM, EventGhost
Reply With Quote
  #330  
Old 08-27-2020, 03:28 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Quote:
Originally Posted by Zogg View Post
Has anyone ever figured out how to get SageTV to send the STOP command to the WMC Live Tuner if you're using a native tuner like a Colossus or HDPVR?

OpenDCT handles this when using an IP capture device, but SageTV doesn't seem to have this capability.
That is a great question. We have not figured out a good way to do this, however I could also use a solution for this if anyone has a good idea.
Reply With Quote
  #331  
Old 08-28-2020, 05:48 PM
Zogg's Avatar
Zogg Zogg is offline
Sage Aficionado
 
Join Date: May 2011
Location: Frisco, TX
Posts: 428
Quote:
Originally Posted by KryptoNyte View Post
That is a great question. We have not figured out a good way to do this, however I could also use a solution for this if anyone has a good idea.
For now I've brute-forced a script that pauses for 3 hours, using nircmd for the timer, and then issues the stop command.

I've also looked some at how to get the tuner name at the start and stop of a recording to know to stop playback. The info is in the sagealert log file although it doesn't get sent in an alert message. Maybe you could have sagealert start a script that then pulls the last few lines from the log file and searches them for the tuner and keywords to figure it out.

I might play with that some in my spare time.
__________________
-----
AMD Ryzen 5 3600, B450 m/b, 32Gig, lots of disks, Unraid, 2x HDPVR2 tuners, HDHomeRun Prime, HDHomeRun HDHR4 OTA, Windows Live Tuner, SageTV docker, OpenDCT docker, Win8.1 VM, EventGhost
Reply With Quote
  #332  
Old 08-29-2020, 05:56 PM
Zogg's Avatar
Zogg Zogg is offline
Sage Aficionado
 
Join Date: May 2011
Location: Frisco, TX
Posts: 428
method to stop WMC Live TV playback

Quote:
Originally Posted by KryptoNyte View Post
That is a great question. We have not figured out a good way to do this, however I could also use a solution for this if anyone has a good idea.
Okay I have a method that seems to be working using SageAlert to run a script when a recording is stopped, the Process Executor feature. It's working with the Unraid docker and will probably work with Linux. The logic would work under Windows but the script would need to be re-written in a batch file or possibly VBscript.

The script uses tail to get the last 5 lines of the sagealert log file, that has the tuner name in it and the status. Then using grep it searches for the WMC tuner name, then "stopped", and if it sees both then it will send the STOP command.

Code:
# wmc-stop	Script to automatically stop a WMC Live Tuner when a recording is completed
#
# Set the TUNER variable to the name of the tuner used to capture from the WMC Live Tuner. 
#
# Set the IP address of your WMC system

IP="192.168.1.13:40510"
TUNER="Siena Video Capture #2"
STATUS="stopped"
FILE1="tunertest.txt"

cd /opt/sagetv/server/plugins/sagealert
date > testlog.txt

tail -5 sagealert.log > $FILE1

if grep -q "$TUNER" $FILE1; then
   if grep -q "$STATUS" $FILE1; then
	 echo "tuner found sending STOP" >> testlog.txt
         wget -q "http://192.168.1.13:40510/stop" > /dev/null 2>&1
   else
     echo "tuner not stopped" >> testlog.txt
   fi
else
   echo "not found" >> testlog.txt
fi
rm stop
__________________
-----
AMD Ryzen 5 3600, B450 m/b, 32Gig, lots of disks, Unraid, 2x HDPVR2 tuners, HDHomeRun Prime, HDHomeRun HDHR4 OTA, Windows Live Tuner, SageTV docker, OpenDCT docker, Win8.1 VM, EventGhost

Last edited by Zogg; 08-30-2020 at 10:08 AM. Reason: added "rm stop" to end to remove files that wget sometimes generates
Reply With Quote
  #333  
Old 08-29-2020, 05:58 PM
Zogg's Avatar
Zogg Zogg is offline
Sage Aficionado
 
Join Date: May 2011
Location: Frisco, TX
Posts: 428
Here's more info on how to set it up.

The command in the writeup will leave small output files from wget. Use this command instead:

wget -O/dev/null -q "http://192.168.1.13:40510/stop"
Attached Files
File Type: txt wmc-stop-info.txt (1.7 KB, 154 views)
__________________
-----
AMD Ryzen 5 3600, B450 m/b, 32Gig, lots of disks, Unraid, 2x HDPVR2 tuners, HDHomeRun Prime, HDHomeRun HDHR4 OTA, Windows Live Tuner, SageTV docker, OpenDCT docker, Win8.1 VM, EventGhost

Last edited by Zogg; 05-26-2021 at 03:11 PM.
Reply With Quote
  #334  
Old 08-29-2020, 06:29 PM
mgpaulus mgpaulus is offline
Sage Advanced User
 
Join Date: Mar 2011
Location: Colorado Springs, CO
Posts: 193
Since that is a standard sh/bash script it would be real easy to port over and run under Cygwin on a windows box. No VB needed 😎
Reply With Quote
  #335  
Old 08-29-2020, 07:44 PM
Zogg's Avatar
Zogg Zogg is offline
Sage Aficionado
 
Join Date: May 2011
Location: Frisco, TX
Posts: 428
Quote:
Originally Posted by mgpaulus View Post
Since that is a standard sh/bash script it would be real easy to port over and run under Cygwin on a windows box. No VB needed 😎
Nice. I have run individual commands under Cygwin before but never an entire script. I should have guessed you could do that though.
__________________
-----
AMD Ryzen 5 3600, B450 m/b, 32Gig, lots of disks, Unraid, 2x HDPVR2 tuners, HDHomeRun Prime, HDHomeRun HDHR4 OTA, Windows Live Tuner, SageTV docker, OpenDCT docker, Win8.1 VM, EventGhost
Reply With Quote
  #336  
Old 09-06-2020, 04:16 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
How do I add a missing channel to WMC7? The "add missing channel" feature in the Settings > Guide no longer exists.

This is using a Ceton Infinitv6 pcie with cablecard.
Reply With Quote
  #337  
Old 09-08-2020, 11:28 AM
egeller egeller is offline
Sage Aficionado
 
Join Date: Feb 2006
Location: Drexel Hill, PA
Posts: 334
Quote:
Originally Posted by KryptoNyte View Post
How do I add a missing channel to WMC7? The "add missing channel" feature in the Settings > Guide no longer exists.

This is using a Ceton Infinitv6 pcie with cablecard.
How are you getting your guide data? Are you using EPG123?
If yes, then in the EPG123 software I would think.

When the guide data disappeared from WMC, I remember setting up EPG123 to feed Schedules Direct data to WMC. The good news is that it works unattended. The bad news is that, if I had to triage a problem, I'd have to hope I kept notes as I do not remember what I did.
__________________
Server:UnRaid;2x Intel Xeon E5; SuperMicro moboard;Also:BM3000 w/ WMC; 2x Ceton ETH 6; OpenDCT
SageTV Extender:3x HD200 1x HD300 1xFireTV
Sage TV: 9.2 on Java 11, Standard STVi, Comskip Playback, Web Interface, 24 Hour Clock, SRE, Playon
All in lovely Drexel Hill, PA
Reply With Quote
  #338  
Old 09-08-2020, 05:04 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Actually, I was using the original WMC7 guide data, and when Microsoft killed it, the guide pretty much froze where it was with no new data and channel list as it was. The point was made a while ago that we could operate WMC for the Live Tuner without guide data if Sage was actually controlling the channel changing operation, which it is. The problem of course is that if Sage tries to change the channel to something WMC doesn't recognize in its guide, it just defaults back to the previous WMC channel.

I wasn't sure where to go from there as the add missing channel setting no longer appears to exist. I downloaded and installed EPG123, associated the correct lineup, and it is seeing the (2) channels that I'm looking for in EPG123's channel list and is checked, but for some reason those new channels will not appear in the WMC7 guide, and there's no way to add them as far as I can tell.

The guide is now populated with shows, it just doesn't seem to adopt the new channels into WMC.
Reply With Quote
  #339  
Old 09-18-2020, 07:13 AM
egeller egeller is offline
Sage Aficionado
 
Join Date: Feb 2006
Location: Drexel Hill, PA
Posts: 334
Quote:
Originally Posted by KryptoNyte View Post
The guide is now populated with shows, it just doesn't seem to adopt the new channels into WMC.
Sorry for the delay in getting back to you. The issue you are seeing is that, without guide data, WMC won't let you tune the channels it does not know exists.

Set up EPG123. The data will come from Schedules Direct (assuming you already have an account there), and flow to WMC. In the one-time setup you will tell it which channels to pull. That should solve your problem.

I went through this several months ago and have not had to touch it since.
__________________
Server:UnRaid;2x Intel Xeon E5; SuperMicro moboard;Also:BM3000 w/ WMC; 2x Ceton ETH 6; OpenDCT
SageTV Extender:3x HD200 1x HD300 1xFireTV
Sage TV: 9.2 on Java 11, Standard STVi, Comskip Playback, Web Interface, 24 Hour Clock, SRE, Playon
All in lovely Drexel Hill, PA
Reply With Quote
  #340  
Old 09-18-2020, 06:01 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
I did go ahead and get EPG123 running 10 days ago. The images attached are the results with Lineup 2 as the only active lineup, saved and executed. I just can't see how to get channel 1116 active in WMC.

I will mention that I have since discovered that I am on some undocumented Spectrum package that apparently provides Hallmark channels 1113 and 1117, but not 1116, so not sure it's worth pursuing until the holidays when Hallmark Drama may be worth upgrading for.
Attached Images
File Type: jpg epg123.jpg (229.0 KB, 160 views)
File Type: jpg WMCguide.jpg (195.3 KB, 159 views)
Reply With Quote
Reply

Tags
tuner setup, tuning, windows media center, wmc


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
Tuner Priority w/Live TV will SageTV Software 12 03-04-2018 03:25 PM
Live TV with 2 extenders, 1 tuner dibs SageTV Software 3 03-07-2009 02:37 PM
Reserve a Tuner for Live TV mbowling SageTV Software 3 11-10-2008 08:36 AM
Switching tuner on live tv appelm SageTV Software 1 02-06-2006 01:38 PM
Can a tuner be dedicated to live TV? GTwannabe General Discussion 2 01-09-2005 12:44 AM


All times are GMT -6. The time now is 04:40 AM.


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