[mythtv-users] Automatically pausing playback

Eloy Paris peloy at chapus.net
Mon Oct 11 17:08:18 UTC 2010


On Fri, Sep 10, 2010 at 08:32:08AM -0500, Chris Gentle wrote:

> I have a little home-grown application that I use to pop up caller
> id information on my mythtv machine whenever a phone call comes into
> my asterisk box. I'm basically broadcasting a UDP packet with the
> caller id information from the asterisk machine and have a listener
> running on my mythtv box. When it receives the packet it pops up a
> dialog showing who is calling. Pretty simple. However,

[...]

Apologies for the late response but I am just catching up with some old
mythtv-users mail. I read this thread and got interested. I do see that
others have provided nice solutions via the telnet interface but when
you mentioned "home-grown application" I wondered -- are you not using
mythtvosd? mythtvosd does the UDP broadcasting, and the frontend already
has a listener for the type of traffic generated by mythtvosd. Your
"home-grown application" seems to be duplicating this functionality.

Here's what I have set up for this in my Asterisk server:

----------------------------------------------------------------------
exten => s,1,NoOp(Start s)

; Send CallerID information to MythTV frontends
exten => s,n,System(/usr/local/bin/mythtvosd --template=cid --caller_name="${CALLERID(name)}" --caller_number="${CALLERID(num)}" --caller_date="${STRFTIME(${EPOCH},,%x)}" --caller_time="${STRFTIME(${EPOCH},,%X)}")
----------------------------------------------------------------------

The only problem with this is that this only works during playback,
and if the frontend is doing something else no CallerID information is
displayed, which leads to Wayne's reply in this thread:

On Fri, Sep 10, 2010 at 05:09:16PM +0200, Wayne Thomas wrote:
> >> >From the shell:
> >>    echo -e "key p\nexit\n" | netcat your_frontend_hostname 6546
> >>
> 
> > But if playback hasn't started, won't this start it?
> 
> echo -e "play speed pause\nexit\n" | nc your_frontend_hostname 6546
> 
> or you could use "query location" first to check if it is playing back
> or not and carry out the appropriate action.  This is how I display
> the volume of my amp when I change it; if playback is underway I use
> mythtvosd, if in any other screen I use osd_cat (mythtvosd only works
> during playback and osd_cat doesn't clear during playback).

This is nice. I'll give XOSD/osd_cat a try.

Cheers,

Eloy Paris.-


More information about the mythtv-users mailing list