LinHES Forums
http://forum.linhes.org/

How To send external command from mythtv
http://forum.linhes.org/viewtopic.php?f=11&t=7903
Page 1 of 1

Author:  jovana [ Mon Jan 16, 2006 6:53 am ]
Post subject:  How To send external command from mythtv

If you are start "watching tv" is it posible to send an extra command to start a external script or program. If you tuned to a new channel than it have to also send the command again.

Thanks for any help or suggestions.

Author:  rusty0101 [ Mon Jan 16, 2006 1:23 pm ]
Post subject: 

Yes. It's possible.

Ah, I detect an interest in 'how to accomplish' the possible as well. That's a bit more work.

The question becomes what's the best point to insert code to accomplish your desired task. First of all remember that selecting to 'watch tv' does not always force a channel change. As a result, kicking off a script to say log to syslog that the viewer started watching TV at this time would be as simple as editing the file that tells MythFrontEnd what to do when you select 'Watch Live TV' off the top menu. There are a few tips and tricks about to edit these files, So I will simply point you at the various forum and Wiki and suggest looking for some of those.

Kicking off an event when you 'change the channel' is a bit more difficult. Basicly you will need to find the code that handles channel changing and do modifications there. As I understand it, channel changing involves a script that basically disconnects the front end from the video stream, tells the back end to change the channel on the tunner being used, (which amoung other things discards the stream file on the cache partition, and creates a new stream file) then attaches the front end to the new video stream. Not all of this is handled by the script, some of it is actually taken care of by the back end.

Have a good one.

-Rusty

Author:  mad_paddler [ Mon Jan 16, 2006 3:52 pm ]
Post subject: 

For channel changing you might want to look at how people with ir blasters do it. I'm fairly sure that launches a script.

Author:  elgordo123 [ Mon Jan 16, 2006 5:59 pm ]
Post subject: 

What are you trying to accomplish? We can give you a better answer? The channel change script simply runs instead of the changing of the tuner's channel, so I dont think would work.
My first guess would be to create an irc event, then just press that key on the remote, depending on what you want to do.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/