Automatically open Live TV to specific channel?

User avatar
Mugsy

Posts: 179
Joined: Tue Oct 15, 2013 11:29 am
Location: Houston

HTPC Specs: Show details

Automatically open Live TV to specific channel?

#1

Post by Mugsy » Tue Oct 15, 2013 11:56 am

There HAS to be a way to solve this.

I need the TV in WMC to open to a particular channel on demand/schedule. So far, all the "solutions" I have found for this are less than satisfying.

One "solution" I found was to modify the Registry:

Code: Select all

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\VideoSettings]
"_tvChannel"="13.1"
"_tvChannelID"="7881299348792537"
(Your ID my differ.) Then, the next time WMC opens, it opens to the preset channel.

Problem with this "solution" is manifold: One, you can't "automatically" run a .reg file from a Timer or the Task Scheduler. Second, the Registry is only loaded at startup, so any changes to the Registry typically (but not always) go ignored until the next reboot. So this is no solution.

The second "solution" I found was to use the Guide to schedule programs for recording in advance, then use the Win7 Task Scheduler to open the TV at the time the program starts. Having only one tuner, Live TV will already be tuned into the channel that's being recorded. This is the "solution" I'm using now, but it means tons of unnecessary recordings getting mixed in with Recordings I wish to keep (keeping fewer files in the history for fewer days saves drive space, but means recordings I'm saving to watch later would be deleted sooner). So this is not a "solution" either.

Opening Live TV itself on schedule is no problem. I just call it from the Task Manager (inelegant, but works). I was hoping there might be a plug-in out there that allows you to "pre-tune" Live TV to a specific channel so I don't miss my favorite programs when they come on?

Thx.

barnabas1969

Posts: 5738
Joined: Tue Jun 21, 2011 7:23 pm
Location: Titusville, Florida, USA

HTPC Specs: Show details

#2

Post by barnabas1969 » Tue Oct 15, 2013 1:43 pm

You could use any number of Windows automation/scripting tools to send the keyboard keys to change the channel to the desired channel (a few seconds after your scheduled task opens live TV).

The following tools come to mind:

Event Ghost
Auto-It!
WinBatch

In all cases, your scheduled task would need a 2nd action that triggers the automation script. The automation script would then need to pause/sleep/wait for a few seconds, and then simply send the keyboard command (e.g. "13.1 ENTER").

User avatar
mark1234

Posts: 872
Joined: Mon Jun 06, 2011 9:49 pm
Location: UK

HTPC Specs: Show details

#3

Post by mark1234 » Tue Oct 15, 2013 1:46 pm

What are you actually trying to achieve here?

Sounds like you are trying to implement a reminder type feature. ie, change channel without recording anything. Media Centre doesn't support that. The way it works you set everything to record. You can still watch live if you want, and if you've only got one tuner then, if you've got live TV playing, you'll see the change. You can set the series settings to only keep a small number of these shows so your disk doesn't become cluttered.
Windows Media Centre - Abandoned by Microsoft

barnabas1969

Posts: 5738
Joined: Tue Jun 21, 2011 7:23 pm
Location: Titusville, Florida, USA

HTPC Specs: Show details

#4

Post by barnabas1969 » Tue Oct 15, 2013 1:56 pm

I'm not sure what the OP really wants to do, but it does seem strange. I agree with Mark. The whole purpose of a DVR is to record your shows and watch them on your own schedule. No need to "remember" to watch them. Media Center will do the remembering for you.

User avatar
mark1234

Posts: 872
Joined: Mon Jun 06, 2011 9:49 pm
Location: UK

HTPC Specs: Show details

#5

Post by mark1234 » Tue Oct 15, 2013 3:56 pm

barnabas1969 wrote:The whole purpose of a DVR is to record your shows and watch them on your own schedule.
Absolutely. I can't imagine watching TV any other way now.
Windows Media Centre - Abandoned by Microsoft

barnabas1969

Posts: 5738
Joined: Tue Jun 21, 2011 7:23 pm
Location: Titusville, Florida, USA

HTPC Specs: Show details

#6

Post by barnabas1969 » Tue Oct 15, 2013 4:02 pm

It's definitely a change of mindset. I had a DVR supplied by my cable company for about 6 years, but even that isn't the same. It could only store 20 hours of HD video, so I had to watch my recordings soon after they were recorded or they would be deleted. Having 4TB of storage space and 10 tuners opens up a whole new world. I can record entire seasons of shows now, and I can watch them during the "off season" while all the TV networks are showing re-runs.

bmblank

Posts: 254
Joined: Mon Jan 23, 2012 3:00 am
Location:

HTPC Specs: Show details

#7

Post by bmblank » Tue Oct 15, 2013 4:02 pm

I could see this in the morning. Personally i wake up and turn on the morning news. I don't care about the news enough to record it, i have better stuff to watch queen i actually sit down to watch tv, its more or less for the "company". This is the only situation if be interested in it.

blueiedgod

Posts: 726
Joined: Fri Jul 15, 2011 3:02 pm
Location: Amherst, NY

HTPC Specs: Show details

#8

Post by blueiedgod » Tue Oct 15, 2013 4:33 pm

You can program a Harmony remote to open live TV and tune to a channel of your liking.

barnabas1969

Posts: 5738
Joined: Tue Jun 21, 2011 7:23 pm
Location: Titusville, Florida, USA

HTPC Specs: Show details

#9

Post by barnabas1969 » Tue Oct 15, 2013 5:50 pm

bmblank wrote:I could see this in the morning. Personally i wake up and turn on the morning news. I don't care about the news enough to record it, i have better stuff to watch queen i actually sit down to watch tv, its more or less for the "company". This is the only situation if be interested in it.
Sure, if you have a way for the PC to control the TV (using an IR blaster or RS-232/Ethernet/HDMI-CEC), you could use your TV as an alarm clock.

richard1980

Posts: 2623
Joined: Wed Jun 08, 2011 3:15 am
Location:

HTPC Specs: Show details

#10

Post by richard1980 » Tue Oct 15, 2013 7:18 pm

Mugsy wrote:Problem with this "solution" is manifold: One, you can't "automatically" run a .reg file from a Timer or the Task Scheduler.
Yes you can:

Code: Select all

REGEDIT.EXE Path/to/filename.reg
Mugsy wrote: Second, the Registry is only loaded at startup, so any changes to the Registry typically (but not always) go ignored until the next reboot. So this is no solution.
You can reload the registry on-demand by running:

Code: Select all

RUNDLL32.EXE USER32.DLL, UpdatePerUserSystemParameters, 1, True

User avatar
holidayboy

Posts: 2840
Joined: Sun Jun 05, 2011 1:44 pm
Location: Northants, UK

HTPC Specs: Show details

#11

Post by holidayboy » Tue Oct 15, 2013 8:40 pm

^ that's an awesome tip for reloading the registry Richard, I don't think I've seen that before (I've never needed it up until now but I'm making a note of it for sure!).
Rob.

TGB.tv - the one stop shop for the more discerning Media Center user.

richard1980

Posts: 2623
Joined: Wed Jun 08, 2011 3:15 am
Location:

HTPC Specs: Show details

#12

Post by richard1980 » Tue Oct 15, 2013 11:24 pm

richard1980 wrote:

Code: Select all

REGEDIT.EXE C:\Path\to\filename.reg
Corrected command.
richard1980 wrote:

Code: Select all

RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters , 1, True
Corrected command (proper spacing is important).

I originally ran across this command when I was trying to change mouse cursors on the fly, but this didn't work for that purpose, so I ended up going a different route (ended up using an SPI call instead).

Sorry for not paying more attention to what I was typing earlier. I always hate seeing errors in my typing.

User avatar
CyberSimian

Posts: 516
Joined: Mon Jun 20, 2011 5:52 pm
Location: Southampton, UK

HTPC Specs: Show details

#13

Post by CyberSimian » Wed Oct 16, 2013 10:05 am

richard1980 wrote:

Code: Select all

REGEDIT.EXE C:\Path\to\filename.reg
I use a BAT file to reset some Media Center settings, and that BAT file uses REGEDIT to load those settings from a ".reg" file. But the disadvantage of this method is that Windows displays a confirmatory window, something like "Do you really want to do this?", and you then have to click "Yes" or "Cancel".

An alternative to REGEDIT.EXE is REG.EXE, which describes itself as the "Console registry tool for Windows". I would assume that you can perform registry operations that do not result in the confirmatory dialogue, but I have not yet got around to identifying what the command would be for my usage, so I may have misunderstood the purpose of REG.EXE.

-- from CyberSimian in the UK

User avatar
tony_park

Posts: 261
Joined: Fri Jun 10, 2011 12:01 pm
Location: South Yorkshire

HTPC Specs: Show details

#14

Post by tony_park » Wed Oct 16, 2013 10:45 am

My concern with starting live tv on a particular channel, when you only have 1 tuner, is what happens if you're currently recording another program, on a different channel?

richard1980

Posts: 2623
Joined: Wed Jun 08, 2011 3:15 am
Location:

HTPC Specs: Show details

#15

Post by richard1980 » Wed Oct 16, 2013 11:31 am

CyberSimian wrote:I use a BAT file to reset some Media Center settings, and that BAT file uses REGEDIT to load those settings from a ".reg" file. But the disadvantage of this method is that Windows displays a confirmatory window, something like "Do you really want to do this?", and you then have to click "Yes" or "Cancel".
You can suppress the dialog by using the /s switch on regedit.exe.

Also, I'm not sure if you are aware of this, but you can make the command prompt window invisible by running a VBS that launches the .bat file instead of running the .bat file directly. Save the following as a .vbs file:

Code: Select all

CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
Now run the .vbs file and provide the .bat file as an argument. As an example, if you call it invisible.vbs, you would run:

Code: Select all

invisible.vbs C:\path\to\file.bat

volfan6415

Posts: 180
Joined: Thu Jun 16, 2011 8:26 pm
Location:

HTPC Specs: Show details

#16

Post by volfan6415 » Wed Oct 16, 2013 1:53 pm

bmblank wrote:I could see this in the morning. Personally i wake up and turn on the morning news. I don't care about the news enough to record it, i have better stuff to watch queen i actually sit down to watch tv, its more or less for the "company". This is the only situation if be interested in it.
We do this with the Today show, my wife likes to watch/listen to it while she is getting ready. However, we have media center set to only keep 3 recordings of it. This way it is already on and recording and she can skip over commercials etc. Also has the added side effect of alleviating the slow wake up availability of the infiniTV4 from sleep because the PC has already turned on and started recording before we are up and ready to use the HTPC.

User avatar
CyberSimian

Posts: 516
Joined: Mon Jun 20, 2011 5:52 pm
Location: Southampton, UK

HTPC Specs: Show details

#17

Post by CyberSimian » Thu Oct 17, 2013 1:33 pm

richard1980 wrote:You can suppress the dialog by using the /s switch on regedit.exe.
Thanks for that -- I was not aware of that option. (I browse TGB from a WinXP laptop, and whereas "reg /?" displays help info, "regedit /?" does not.)
richard1980 wrote:Also, I'm not sure if you are aware of this, but you can make the command prompt window invisible by running a VBS that launches the .bat file instead of running the .bat file directly.
Although I can write BAT files, and also a much more capable scripting language (REXX), I never got around to learning VBS, so thanks for example; I have filed it away for future use!

-- from CyberSimian in the UK

User avatar
Mugsy

Posts: 179
Joined: Tue Oct 15, 2013 11:29 am
Location: Houston

HTPC Specs: Show details

#18

Post by Mugsy » Thu Oct 17, 2013 6:29 pm

Thanks for the replies to everyone. Sorry for the late reply.

Some people don't seem to understand the issue and/or benefit of what I'm looking for. Solutions that involve "sending keystrokes" using another program, that then need to be timed just right are not practical.

Simply Recording the program to watch it later" is a waste of time and drive space since I'm sitting down to watch TV *now* and don't need to sit around doing nothing waiting on the recording to finish so I can watch it "later". Yes, I can watch it *while* it s recording. THAT'S WHAT I'M DOING NOW. Tell me why I need to record a program *while* I'm watching it? And WMC can't cancel a recording without canceling all future recordings of the series. A "PVR" is great if you are doing something else when the show is on and can't watch it until later, but I'm not looking to "watch it later". And as I already said, I'm not looking to fill my Recording directory with files I don't need.

Spending $100 on a Harmony remote isn't practical and definitely overkill.

richard1980, doing it that way still produces an alert in Win7. I tried the "/s" switch and creating the VBS file. I'm still prompted for permission when run.

Hope that clears things up. Thx.

barnabas1969

Posts: 5738
Joined: Tue Jun 21, 2011 7:23 pm
Location: Titusville, Florida, USA

HTPC Specs: Show details

#19

Post by barnabas1969 » Thu Oct 17, 2013 6:43 pm

Mugsy wrote:Solutions that involve "sending keystrokes" using another program, that then need to be timed just right are not practical.
I disagree. If you use a tool like Event Ghost (free), you can make it work 100% reliably. I'd be happy to help guide you in the setup. Event Ghost (EG) even has a WMC plugin that allows you to send commands directly to Media Center, not just by "sending keystrokes". As an example, in EG, you could create a macro that does this:

1) Start Media Center in Live TV.
2) Wait for the Media Center window to become active/foreground.
3) Send the desired numeric commands, followed by Enter/OK.

Then, you have two choices: A) Use the Windows Task Scheduler to fire the EG event that triggers your macro, or B) Use EG's scheduler plugin to trigger the macro. The advantage of "A" is that the Task Scheduler can also wake the PC. EG can't wake the PC. So, if you never put the PC in standby, either will work fine. If you put the PC in standby, then you need to use the Task Scheduler to wake the PC.
Mugsy wrote:Tell me why I need to record a program *while* I'm watching it?
There are some advantages to recording the show while you watch it. First, you can do something else for the first 15 minutes of the show... and then skip the commercials while you watch the show. This allows you to watch a 1-hour program in about 45 minutes. Secondly, recording while you watch allows you to rewind all the way to the beginning of the show if desired (or pause it for as long as you want). In other words, it removes the limitation of the live TV buffer length. It also gives you the ability to change channels, and then go back to the show you were watching without losing part of the show. You see, if you change channels while watching Live TV, the buffer will be lost, and you will have missed part of your show.

Imagine this scenario: You're watching Live TV, and something interrupts you (the phone rings, someone knocks at the door, you have to go to the bathroom, etc). So, you press PAUSE. You come back a few minutes later, and press PLAY. All is well with the world. But then, you accidentally press a button on the remote (channel up/down, OK/enter, numeric, etc) and the channel changes. Oops! You just lost your Live TV buffer, and missed part of your show. If you had been recording the show while watching it, then you could have gone back to where you left off. Trust me... this has happened to many of us (me too).
Mugsy wrote:And WMC can't cancel a recording without canceling all future recordings of the series.
That is incorrect. You can cancel a single recording which is part of a series recording shedule.
Mugsy wrote:And as I already said, I'm not looking to fill my Recording directory with files I don't need.
And, as others have already said, you can setup a series recording that only keeps the most recent "X" episodes. Disk is cheap.

richard1980

Posts: 2623
Joined: Wed Jun 08, 2011 3:15 am
Location:

HTPC Specs: Show details

#20

Post by richard1980 » Thu Oct 17, 2013 10:57 pm

Mugsy wrote:richard1980, doing it that way still produces an alert in Win7. I tried the "/s" switch and creating the VBS file. I'm still prompted for permission when run.
The /s switch will suppress the dialog that is generated by Regedit. It sounds like what you are seeing is actually a UAC prompt. To suppress the UAC prompt, you have to run regedit from an elevated account. So on your scheduled task settings, check the box that says "Run with highest privileges". It's located in the General tab, at the bottom of the security section.

Post Reply