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

OSD email notify
http://forums.linhes.org/viewtopic.php?f=3&t=7968
Page 2 of 3

Author:  declanh [ Mon Jan 28, 2008 2:42 am ]
Post subject: 

mjl wrote:
mjl wrote:
Hi,

Looks to be a rather cool "feature" :)

Only thing that may not have been clear is:
Code:
open CONFIG,"</usr/declan/popcheck.rc";

needs to be set for the individuals setup

You did hint to put popcheck.rc into popcheck/ folder which is a good location for both the popcheck.pl & popcheck.rc
ie,
/home/mythtv/popcheck/popcheck.rc

I think it does need a test message available in case there isn't any mail when you first run it as it just exits gracefully if nothing has arrived so one can only assume all is well.

Thank you :)
Mike
I do see this error if I add the #!/usr/bin/perl -w
Name "main::q" used only once: possible typo at popcheck.pl line 40.


Seems to run, however I see no osd on the tv... what did I mis.....


you should only see the OSD display if you actually have emails in your pop mailbox.


$q was a variable used for limit the depth of the number of lines inspected in the message

the line


Code:
#last if $q++ > 18;


which is commented out with the hash at the start of the line used to limit the probe to 18 lines - I commented this out, althought I cannot really remember why :-)

Author:  mjl [ Mon Jan 28, 2008 7:12 am ]
Post subject: 

hi,
.
Quote:
if you actually have emails
That was a poke in the eye with a sharp stick...

Since I am using the pvr-350 for my tv out, I was thinking it doesn't make the journey to the screen. I also assume that as long as there is mail in the box that it is suppose to keep showing every x time that the cycle to run a check.

i will try again on a non tv out setup.

Mike

Author:  victor97 [ Mon Jan 28, 2008 12:40 pm ]
Post subject: 

mjl, I do see messages on my TV. In my mailbox I have 4 new messages. For some of them I see only the From field, for other I see the Subject and From field. Why is the subject not always shown on the TV, the subject is filled in.

My Gmail account is not working :(

Author:  mjl [ Mon Jan 28, 2008 1:17 pm ]
Post subject: 

Hi victor97,

Are you using the pvr-350 for tv out? I have not tried via a vga or dvi monitor connection, yet.

Thanks
Mike

Author:  declanh [ Mon Jan 28, 2008 1:56 pm ]
Post subject: 

victor97 wrote:
mjl, I do see messages on my TV. In my mailbox I have 4 new messages. For some of them I see only the From field, for other I see the Subject and From field. Why is the subject not always shown on the TV, the subject is filled in.

My Gmail account is not working :(

ok, try this from the unix command line

Code:
/usr/bin/mythtvosd --template=alert --alert_text="testing OSD"


this should put a message on the screen directly without the above script.

does this work ?

Author:  declanh [ Mon Jan 28, 2008 2:07 pm ]
Post subject: 

victor97 wrote:
mjl, I do see messages on my TV. In my mailbox I have 4 new messages. For some of them I see only the From field, for other I see the Subject and From field. Why is the subject not always shown on the TV, the subject is filled in.

My Gmail account is not working :(


this is probably due to the headers in the email being a bit different

this bit of the code


Code:
     foreach $z (@$message)
       {
         if ($z=~m/^From: (.*?)$/)
         {$t.=",f=$1";}
         if ($z=~m/^Subject: (.*?)$/)
         { $t.=",s=$1";
           $spam="yes" if $z=~m/SPAM/;
         }
         if ($z=~m/^To: (.*?)$/)
         {$t.=",t=$1";}
         #last if $q++ > 18;
       }

searches the message for lines beginning with From:
or Subject: or To

if you post the headers of one of the messages that not working I might be able to tell you why

To be honest I got fed up with all the to,from,subject notifications so i have since changed the script to just display the number of new emails as a total.

If anyone wants to do this just add return as indicated below

Code:
  $nmc="$username has $mc emails";
  $x=`/usr/bin/mythtvosd --template=alert --alert_text="$nmc"`;
  print "$nmc\n";
  sleep 3;
# ADD THE BIT BELOW THIS LINE
  return
#ADD THE BIT ABOVE THIS LINE
  foreach $msgid (keys %$messages) {
      $message = $pop->get($msgid);
      unless (defined $message) {
          warn "Couldn't fetch $msgid from server: $!\n";
          next;
      }

[/b]

Author:  mjl [ Mon Jan 28, 2008 3:29 pm ]
Post subject: 

Hi,

Appreciate the assistance and look forward to getting it to work. Anyway your test doesn't work on the 350 tv out.

/usr/bin/mythtvosd --template=alert --alert_text="testing OSD"
Sent UDP/XML packet to IP 255.255.255.255 and port: 6948

but no display on screen
I normally have to export DISPLAY=:0 to get osd, especially if I have ssh'd into the box but I don't see where that is an option.

Thanks
Mike

Author:  declanh [ Mon Jan 28, 2008 4:35 pm ]
Post subject: 

mjl wrote:
Hi,

Appreciate the assistance and look forward to getting it to work. Anyway your test doesn't work on the 350 tv out.

/usr/bin/mythtvosd --template=alert --alert_text="testing OSD"
Sent UDP/XML packet to IP 255.255.255.255 and port: 6948

but no display on screen
I normally have to export DISPLAY=:0 to get osd, especially if I have ssh'd into the box but I don't see where that is an option.

Thanks
Mike

ok its more fundamental than the popcheck.pl script then looks like OSD is broken

check what the port is set to in the playback settings withing mythtv - it should be set to the same port as above.....

if its not that then i dont know - perhaps the tvout from your tvcard goes straight to the screen ? I presume you can still see the normal menus etc ?

Author:  cfr131 [ Mon Jan 28, 2008 6:48 pm ]
Post subject: 

mjl wrote:
Hi,

Appreciate the assistance and look forward to getting it to work. Anyway your test doesn't work on the 350 tv out.

/usr/bin/mythtvosd --template=alert --alert_text="testing OSD"
Sent UDP/XML packet to IP 255.255.255.255 and port: 6948

but no display on screen
I normally have to export DISPLAY=:0 to get osd, especially if I have ssh'd into the box but I don't see where that is an option.

Thanks
Mike


Mike,

When I tried this command, it killed the front end. but when I added

--bcastaddr=192.168.2.62

to get:

Code:
/usr/bin/mythtvosd --template=alert --alert_text="YOUR TEXT"  --bcastaddr=192.168.2.62

of course you need to use your own ip address
it worked. I am not sure where it is picking up the 255.255....

Tony

Author:  mjl [ Mon Jan 28, 2008 9:17 pm ]
Post subject: 

Hi Tony,

Thanks for the try but so far I see nothing for an osd... I have one more place to try as I have been stretching things by doing on a tv out system and I just tried it on my Cool 7 box. May be need to run on something newer....

However, did find the perl error, cure is, # $q=0;

Will keep trying :)
Thanks
Mike

Author:  mjl [ Mon Jan 28, 2008 9:36 pm ]
Post subject: 

Hi,

Now I'm getting irritated, a least a little. I just ran the test line on F27 and again nothing. What additional item(s) requirement is needed beyond a stock install? Does a switch needs to be checked somewhere?

Thanks
Mike

Author:  declanh [ Thu Jan 31, 2008 2:31 am ]
Post subject: 

mjl wrote:
Hi,

Now I'm getting irritated, a least a little. I just ran the test line on F27 and again nothing. What additional item(s) requirement is needed beyond a stock install? Does a switch needs to be checked somewhere?

Thanks
Mike

when you are testing it is mythtv actually playing a recording or watching livetv ?

If you are testing with just the mythtv menus running i dont think this works.

Its the mythtv playback bit that gathers the message and displays it on screen. Hope that makes sense.

D

Author:  mjl [ Sun Feb 03, 2008 9:32 pm ]
Post subject: 

Hi declanh,

You are correct, it does the display while watching tv. I haven't tried it watching a recording yet, but will for now assume that is also correct.

Question is how do we make work at any time? Maybe turn it into a 40 character line and feed it to an osd script instead as that works on any display.

Thanks
Mike

Author:  Kirk [ Mon Feb 04, 2008 3:43 pm ]
Post subject: 

Howdy,

Try using /usr/bin/osd_cat to display your messages.. should work at any time that way.

Regards,
Kirk.

Author:  mjl [ Tue Feb 05, 2008 11:02 pm ]
Post subject: 

Hi,

No, it didn't work as a direct sub but that may be the basic path to try. I will need to play with some of the details but my skills with perl are very very limited so is going to take me awhile.

Thanks for the hint! :)
Mike

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