Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

mythmessage - what I learned

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


mdupuis at ocg

Jun 24, 2012, 8:14 PM

Post #1 of 17 (874 views)
Permalink
mythmessage - what I learned

based on reading lots of posts, I thought I would summarize for any others interested:
1. The wiki is wrong - the default port in use my mythmessage is 6948 (not 6549)
2. The wiki is wrong - mythmessage won't listen to broadcasts, only packets directed just to that IP
3. The wiki is incomplete - the timeout for messages ONLY applies while playback is in progress. Otherwise, timeout is ignored and an OK button appears and the message stays on screen, and queue up.

And of interest...messages queue up on screen! So if you plan to use mythmessage interface to show CID info, you may find 100 dialog boxes queued up all waiting for an OK click...when you return to the frontend

yuk....

hopefully future versions will allot the timeouw to work even if a menu is onscreen!

________________________________
From: mythtv-users-bounces [at] mythtv [mythtv-users-bounces [at] mythtv] On Behalf Of Michelle Dupuis [mdupuis [at] ocg]
Sent: Sunday, June 24, 2012 6:55 PM
To: Myth TV Users List
Subject: Re: [mythtv-users] MythUtil - can't show a message on frontend

I actually got it working in mythutil by specifying a single IP as the broadcast (strange):

mythutil --message --message_text "Hi There" --timeout 5 -v --bcastaddr 172.31.254.58

but I really want it to work using netcat so I don't have to compile mythutil on other systems which send the message. Any advice on how to make netcat work with this?

Oh...and the 5 second timeout has no effect...I still have to click OK each time onscreen. Hopefully there is a workaround for that too...
________________________________
From: mythtv-users-bounces [at] mythtv [mythtv-users-bounces [at] mythtv] On Behalf Of Michelle Dupuis [mdupuis [at] ocg]
Sent: Sunday, June 24, 2012 6:47 PM
To: Myth TV Users List
Subject: [mythtv-users] MythUtil - can't show a message on frontend

I am trying to show a message onscreen on my .25 frontend. I have tried using mythutil and netcat, but neither works. The syntax (and output) is below of both methods. Can anyone tell me what I'm missing?

Thanks!


nc -v -u -w 0 172.31.254.58 6548 < /tmp/testmess

or


[mythtv [at] mythlivingroo ~]$ mythutil --message --message_text "Hi There" --timeout 5
2012-06-24 18:41:02.969127 C mythutil version: [v0.25] www.mythtv.org<http://www.mythtv.org>
2012-06-24 18:41:02.969160 N Enabled verbose msgs: general
2012-06-24 18:41:02.969209 N Setting Log Level to LOG_INFO
2012-06-24 18:41:02.969391 I Added logging to the console
2012-06-24 18:41:02.969415 I Added database logging to table logging
2012-06-24 18:41:02.969600 N Setting up SIGHUP handler
2012-06-24 18:41:02.970067 N Using runtime prefix = /usr
2012-06-24 18:41:02.970128 N Using configuration directory = /home/mythtv/.mythtv
2012-06-24 18:41:02.970560 I Assumed character encoding: en_US.UTF-8
2012-06-24 18:41:02.971698 N Empty LocalHostName.
2012-06-24 18:41:02.971725 I Using localhost value of mythlivingroom.ocg.ca
2012-06-24 18:41:02.972185 I Testing network connectivity to '172.31.254.84'
2012-06-24 18:41:02.975012 I Starting process manager
2012-06-24 18:41:02.975350 I Starting process signal handler
2012-06-24 18:41:02.981979 I Starting IO manager (read)
2012-06-24 18:41:02.982316 I Starting IO manager (write)
2012-06-24 18:41:03.161003 N Setting QT default locale to en_CA
2012-06-24 18:41:03.161025 I Current locale en_CA
2012-06-24 18:41:03.161169 N Reading locale defaults from /usr/share/mythtv//locales/en_ca.xml
name: message_text -- value: Hi There
name: timeout -- value: 5
output:
<mythmessage version="1">
<text>Hi There</text>
<timeout>5</timeout>
</mythmessage>
Sent UDP/XML packet to IP 255.255.255.255 and port: 6948


gary.buhrmaster at gmail

Jun 24, 2012, 8:40 PM

Post #2 of 17 (861 views)
Permalink
Re: mythmessage - what I learned [In reply to]

On Sun, Jun 24, 2012 at 8:14 PM, Michelle Dupuis <mdupuis [at] ocg> wrote:
> based on reading lots of posts, I thought I would summarize for any others
> interested:
> 1. The wiki is wrong ....
> 2. The wiki is wrong .....
> 3. The wiki is incomplete ....

I have never used mythutil message (and probably never will; my
use of MythTV is different than yours), but if the wiki is wrong
based on your knowledge, *please* update it with the correct
information. It is the only way to make it better for the next
person.

Thanks.

Gary
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


nick.rout at gmail

Jun 24, 2012, 9:40 PM

Post #3 of 17 (865 views)
Permalink
Re: mythmessage - what I learned [In reply to]

On Mon, Jun 25, 2012 at 3:40 PM, Gary Buhrmaster
<gary.buhrmaster [at] gmail> wrote:
> On Sun, Jun 24, 2012 at 8:14 PM, Michelle Dupuis <mdupuis [at] ocg> wrote:
>> based on reading lots of posts, I thought I would summarize for any others
>> interested:
>> 1. The wiki is wrong ....
>> 2. The wiki is wrong .....
>> 3. The wiki is incomplete ....
>
> I have never used mythutil message (and probably never will; my
> use of MythTV is different than yours), but if the wiki is wrong
> based on your knowledge, *please* update it with the correct
> information.  It is the only way to make it better for the next
> person.

People don't seem to get that about wikis. OTOH if you find a whole
lot appears to be wrong it would pay to check others' experience.
Posting to the list saying "X is wrong on the wiki" isn't the way i
would do it, I'd tend to say "in my experience X seems to be wrong, my
findings are Z. Before I change the wiki do others have the same
experience?"
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


mythtv at blandford

Jun 24, 2012, 10:12 PM

Post #4 of 17 (879 views)
Permalink
Re: mythmessage - what I learned [In reply to]

On 06/24/2012 08:14 PM, Michelle Dupuis wrote:
> based on reading lots of posts, I thought I would summarize for any
> others interested:
> 1. The wiki is wrong - the default port in use my mythmessage is 6948
> (not 6549)
> 2. The wiki is wrong - mythmessage won't listen to broadcasts, only
> packets directed just to that IP

Broadcasts work fine for me. I use this in several of my home
automation scripts.

mythutil --message --message_text $message --timeout 5 --bcastaddr
192.168.1.255

My network is 192.168.1.0 w/ 255.255.255.0 as the subnet mask.

I can receive the same message on many frontends.

> 3. The wiki is incomplete - the timeout for messages ONLY applies
> while playback is in progress. Otherwise, timeout is ignored and an
> OK button appears and the message stays on screen, and queue up.

This is true. I do wish it would timeout as well. I have seen many
references to this on the list though. All of my frontends suspend to
ram so I don't usually have frontends running when they aren't being
used so it hasn't been an issue. This definitely should be noted on the
wiki

> And of interest...messages queue up on screen! So if you plan to use
> mythmessage interface to show CID info, you may find 100 dialog boxes
> queued up all waiting for an OK click...when you return to the frontend
> yuk....
> hopefully future versions will allot the timeouw to work even if a
> menu is onscreen!
>


dbadia at gmail

Jun 25, 2012, 5:51 AM

Post #5 of 17 (856 views)
Permalink
Re: mythmessage - what I learned [In reply to]

Nb
On Jun 24, 2012 11:19 PM, "Michelle Dupuis" <mdupuis [at] ocg> wrote:
>
> based on reading lots of posts, I thought I would summarize for any
others interested:
> 1. The wiki is wrong - the default port in use my mythmessage is 6948
(not 6549)
> 2. The wiki is wrong - mythmessage won't listen to broadcasts, only
packets directed just to that IP
> 3. The wiki is incomplete - the timeout for messages ONLY applies while
playback is in progress. Otherwise, timeout is ignored and an OK button
appears and the message stays on screen, and queue up.
>
> And of interest...messages queue up on screen! So if you plan to use
mythmessage interface to show CID info, you may find 100 dialog boxes
queued up all waiting for an OK click...when you return to the frontend
>
> yuk....

I just went through this myself. I tweaked my cid script to query each fe
and only send the message if playback was in progress to avoid messages
piling up on the other fes.

>
> hopefully future versions will allot the timeouw to work even if a menu
is onscreen!
>
> ________________________________
> From: mythtv-users-bounces [at] mythtv [mythtv-users-bounces [at] mythtv]
On Behalf Of Michelle Dupuis [mdupuis [at] ocg]
> Sent: Sunday, June 24, 2012 6:55 PM
> To: Myth TV Users List
> Subject: Re: [mythtv-users] MythUtil - can't show a message on frontend
>
> I actually got it working in mythutil by specifying a single IP as the
broadcast (strange):
>
> mythutil --message --message_text "Hi There" --timeout 5 -v --bcastaddr
172.31.254.58
>
> but I really want it to work using netcat so I don't have to compile
mythutil on other systems which send the message. Any advice on how to
make netcat work with this?
>
> Oh...and the 5 second timeout has no effect...I still have to click OK
each time onscreen. Hopefully there is a workaround for that too...
> ________________________________
> From: mythtv-users-bounces [at] mythtv [mythtv-users-bounces [at] mythtv]
On Behalf Of Michelle Dupuis [mdupuis [at] ocg]
> Sent: Sunday, June 24, 2012 6:47 PM
> To: Myth TV Users List
> Subject: [mythtv-users] MythUtil - can't show a message on frontend
>
> I am trying to show a message onscreen on my .25 frontend. I have tried
using mythutil and netcat, but neither works. The syntax (and output) is
below of both methods. Can anyone tell me what I'm missing?
>
> Thanks!
>
>
> nc -v -u -w 0 172.31.254.58 6548 < /tmp/testmess
>
> or
>
>
> [mythtv [at] mythlivingroo ~]$ mythutil --message --message_text "Hi There"
--timeout 5
> 2012-06-24 18:41:02.969127 C mythutil version: [v0.25] www.mythtv.org
> 2012-06-24 18:41:02.969160 N Enabled verbose msgs: general
> 2012-06-24 18:41:02.969209 N Setting Log Level to LOG_INFO
> 2012-06-24 18:41:02.969391 I Added logging to the console
> 2012-06-24 18:41:02.969415 I Added database logging to table logging
> 2012-06-24 18:41:02.969600 N Setting up SIGHUP handler
> 2012-06-24 18:41:02.970067 N Using runtime prefix = /usr
> 2012-06-24 18:41:02.970128 N Using configuration directory =
/home/mythtv/.mythtv
> 2012-06-24 18:41:02.970560 I Assumed character encoding: en_US.UTF-8
> 2012-06-24 18:41:02.971698 N Empty LocalHostName.
> 2012-06-24 18:41:02.971725 I Using localhost value of
mythlivingroom.ocg.ca
> 2012-06-24 18:41:02.972185 I Testing network connectivity to
'172.31.254.84'
> 2012-06-24 18:41:02.975012 I Starting process manager
> 2012-06-24 18:41:02.975350 I Starting process signal handler
> 2012-06-24 18:41:02.981979 I Starting IO manager (read)
> 2012-06-24 18:41:02.982316 I Starting IO manager (write)
> 2012-06-24 18:41:03.161003 N Setting QT default locale to en_CA
> 2012-06-24 18:41:03.161025 I Current locale en_CA
> 2012-06-24 18:41:03.161169 N Reading locale defaults from
/usr/share/mythtv//locales/en_ca.xml
> name: message_text -- value: Hi There
> name: timeout -- value: 5
> output:
> <mythmessage version="1">
> <text>Hi There</text>
> <timeout>5</timeout>
> </mythmessage>
> Sent UDP/XML packet to IP 255.255.255.255 and port: 6948
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>

Dave


snharris99 at live

Jun 25, 2012, 6:31 AM

Post #6 of 17 (851 views)
Permalink
Re: mythmessage - what I learned [In reply to]

>Nb
>On Jun 24, 2012 11:19 PM, "Michelle Dupuis" <mdupuis [at] ocg> wrote:
>>
>> based on reading lots of posts, I thought I would summarize for any
>> others interested:
>> 1. The wiki is wrong - the default port in use my mythmessage is 6948
>> (not 6549)
>> 2. The wiki is wrong - mythmessage won't listen to broadcasts, only
>> packets directed just to that IP
>> 3. The wiki is incomplete - the timeout for messages ONLY applies while
>> playback is in progress. Otherwise, timeout is ignored and an OK button
>> appears and the message stays on screen, and queue >>up.
>>
>> And of interest...messages queue up on screen! So if you plan to use
>> mythmessage interface to show CID info, you may find 100 dialog boxes
>> queued up all waiting for an OK click...when you return to >the frontend
>>
>> yuk....

>I just went through this myself. I tweaked my cid script to query each fe
>and only send the message if playback was in progress to avoid messages
>piling up on the other fes.

Could you share that script? I have held off on integrating CID info with
my FreePBX / MythTV setup because of the timeout issue. Then I'll just have
to figure out how to have FreePBX execute a script when a call comes in.

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


brent at brentnorris

Jun 25, 2012, 7:10 AM

Post #7 of 17 (854 views)
Permalink
Re: mythmessage - what I learned [In reply to]

On 6/25/2012 8:31 AM, Scott & Nicole Harris wrote:
> Could you share that script? I have held off on integrating CID info
> with my FreePBX / MythTV setup because of the timeout issue. Then
> I'll just have to figure out how to have FreePBX execute a script when
> a call comes in.
If you use the CallerIDSuperfecta module from nerdvittles you can make
it hit custom URLs and things like that when a call comes in. It is a
really nice module.

Brent
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


snharris99 at live

Jun 25, 2012, 7:13 AM

Post #8 of 17 (850 views)
Permalink
Re: mythmessage - what I learned [In reply to]

>> Could you share that script? I have held off on integrating CID info
>> with my FreePBX / MythTV setup because of the timeout issue. Then I'll
>> just have to figure out how to have FreePBX execute a script when a call
>> comes in.
>If you use the CallerIDSuperfecta module from nerdvittles you can make it
>hit custom URLs and things like that when a call comes in. It is a really
>nice module.

>Brent

I have tried that. My PHP being non-existent, I have been unable to produce
a php page that execute mythutil to send on the CID to my frontends.

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


brent at brentnorris

Jun 25, 2012, 7:23 AM

Post #9 of 17 (845 views)
Permalink
Re: mythmessage - what I learned [In reply to]

On 6/25/2012 9:13 AM, Scott & Nicole Harris wrote:
> I have tried that. My PHP being non-existent, I have been unable to
> produce a php page that execute mythutil to send on the CID to my
> frontends.

Since it is just referencing a URL, there is no reason that you need to
use PHP. You can write a shell script and have it do what you want.
You will need to turn CGI scripts on and such like that. You will also
need to get a copy of proccgi most likely.

Brent
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


snharris99 at live

Jun 25, 2012, 9:05 AM

Post #10 of 17 (839 views)
Permalink
Re: mythmessage - what I learned [In reply to]

>>On 6/25/2012 9:13 AM, Scott & Nicole Harris wrote:
>> I have tried that. My PHP being non-existent, I have been unable to
>> produce a php page that execute mythutil to send on the CID to my
>> frontends.

>Since it is just referencing a URL, there is no reason that you need to use
>PHP. You can write a shell script and have it do what you want. You will
>need to turn CGI scripts on and such like that. You will also need to get
>a copy of proccgi most likely.

>Brent

Thanks for the pointers, it's helped. I have configured Apache for CGI
scripts and they're working. I wrote a very basic script to get started...

#!/bin/sh
echo "Content-type: text/html\n"
echo ""
echo "Hello World"
mythutil --message --message_text "Hi There" --timeout 5 -v --bcastaddr
192.168.25.32

If I execute this script directly (./caller-id), it works and the message
pops up on my 192.168.25.32 frontend. However, if I browse to
http://apache-server/cgi-bin/caller-id.sh my browser displays the "Hello
World" message, but nothing pops up on my 192.168.25.32 front end. This is
the same issue I had trying to do it as a php page.

Any suggestions?

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


keemllib at gmail

Jun 25, 2012, 10:12 AM

Post #11 of 17 (843 views)
Permalink
Re: mythmessage - what I learned [In reply to]

On 06/25/2012 11:05 AM, Scott & Nicole Harris wrote:
...
> #!/bin/sh
> echo "Content-type: text/html\n"
> echo ""
> echo "Hello World"
> mythutil --message --message_text "Hi There" --timeout 5 -v --bcastaddr 192.168.25.32
>
> If I execute this script directly (./caller-id), it works and the message pops up on my 192.168.25.32 frontend. However, if I browse to
> http://apache-server/cgi-bin/caller-id.sh my browser displays the "Hello World" message, but nothing pops up on my 192.168.25.32 front end. This
> is the same issue I had trying to do it as a php page.
>
> Any suggestions?

Hi;

Add 2>&1 >> /tmp/cgi-test.out to the mythutil command line.
Then check see whats in /tmp/cgi-test.out. Maybe $PATH
doesn't include mythutil's directory.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


snharris99 at live

Jun 25, 2012, 11:03 AM

Post #12 of 17 (840 views)
Permalink
Re: mythmessage - what I learned [In reply to]

>> #!/bin/sh
>> echo "Content-type: text/html\n"
>> echo ""
>> echo "Hello World"
>> mythutil --message --message_text "Hi There" --timeout 5 -v --bcastaddr
>> 192.168.25.32
>>
>> If I execute this script directly (./caller-id), it works and the message
>> pops up on my 192.168.25.32 frontend. However, if I browse to
>> http://apache-server/cgi-bin/caller-id.sh my browser displays the "Hello
>> World" message, but nothing pops up on my 192.168.25.32 front end. This
>> is the same issue I had trying to do it as a php page.
>>
>> Any suggestions?

>Hi;

>Add 2>&1 >> /tmp/cgi-test.out to the mythutil command line.
>Then check see whats in /tmp/cgi-test.out. Maybe $PATH
>doesn't include mythutil's directory.

>--
>Bill

Thanks Bill, there was some text about unable to find Home folder in the
output of the web page that got me on the right path. I added a line to my
script before the mythutil call and it's working....

# set home directory
export HOME=/home/sharris

Is there a better way to do this?

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


snharris99 at live

Jun 25, 2012, 11:04 AM

Post #13 of 17 (835 views)
Permalink
Re: mythmessage - what I learned [In reply to]

>I actually got it working in mythutil by specifying a single IP as the
>broadcast (strange):

>mythutil --message --message_text "Hi There" --timeout 5 -v --bcastaddr
>172.31.254.58

Does anyone know if there's a way to put a line break in messages?

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


keemllib at gmail

Jun 25, 2012, 12:12 PM

Post #14 of 17 (837 views)
Permalink
Re: mythmessage - what I learned [In reply to]

On 06/25/2012 01:03 PM, Scott & Nicole Harris wrote:
...
> Thanks Bill, there was some text about unable to find Home folder in the output of the web page that got me on the right path. I added a line to
> my script before the mythutil call and it's working....
>
> # set home directory
> export HOME=/home/sharris
>
> Is there a better way to do this?

Not sure its that much better:

HOME=/home/sharris
HOME=$HOME mythutil --message ...

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


brent at brentnorris

Jun 25, 2012, 1:36 PM

Post #15 of 17 (831 views)
Permalink
Re: mythmessage - what I learned [In reply to]

On 6/25/2012 11:05 AM, Scott & Nicole Harris wrote:
> #!/bin/sh
> echo "Content-type: text/html\n"
> echo ""
> echo "Hello World"
> mythutil --message --message_text "Hi There" --timeout 5 -v
> --bcastaddr 192.168.25.32

It is usually a good idea to explicitly set the path to the mythutil
program. You could do something like this

prog=/path/to/mythutil

$prog --message --message_text "Hi There" --timeout 5 -v --bcastaddr
192.168.25.32
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


icicimov at gmail

Jun 25, 2012, 3:47 PM

Post #16 of 17 (828 views)
Permalink
Re: mythmessage - what I learned [In reply to]

<br \>Hi there<br \>
On Jun 26, 2012 4:03 AM, "Scott & Nicole Harris" <snharris99 [at] live>
wrote:

> I actually got it working in mythutil by specifying a single IP as the
>> broadcast (strange):
>>
>
> mythutil --message --message_text "Hi There" --timeout 5 -v --bcastaddr
>> 172.31.254.58
>>
>
> Does anyone know if there's a way to put a line break in messages?
> ______________________________**_________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/**listinfo/mythtv-users<http://www.mythtv.org/mailman/listinfo/mythtv-users>
>


snharris99 at live

Jun 25, 2012, 4:46 PM

Post #17 of 17 (825 views)
Permalink
Re: mythmessage - what I learned [In reply to]

>>>I actually got it working in mythutil by specifying a single IP as the
>>>broadcast (strange):
>>>mythutil --message --message_text "Hi There" --timeout 5 -v --bcastaddr
>>>172.31.254.58

>>Does anyone know if there's a way to put a line break in messages?
><br \>Hi there<br \>

The <br /> tag does not appear to work. It gets discarded (it doesn't show
up in the message), but doesn't provide a line break either.

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.