<br><br><div class="gmail_quote">On Fri, May 11, 2012 at 6:09 AM, Mike Perkins <span dir="ltr">&lt;<a href="mailto:mikep@randomtraveller.org.uk" target="_blank">mikep@randomtraveller.org.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 11/05/12 01:52, Aaron wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am trying to get my Harmony remote to start/stop the mythfrontend to make<br>
it simpler for my family to do different things. I am on Mythbuntu 12.04<br>
32bit. I have setup a irexec file, and made sure its running in daemon<br>
mode. It all seems to kinda work, but not really sure what I&#39;m missing to<br>
make it run 100%. Here are my files, I think I just need another pair of<br>
eyes to help me see what I am missing.<br>
<br>
The parts I can&#39;t easily show are I have my Harmony remote set to run two<br>
different activities. First one is &quot;Watch TV&quot; , second is &quot;Watch Movies&quot;.<br>
The watch TV activity is set to use the TV for audio (HDMI); then the<br>
movies activity is set to use SPDIF to my receiver. I have it set to send<br>
KEY_BLUE and KEY_YELLOW as the power on/off sequence from the remote. I<br>
have verified it is sending them with irw.<br>
<br>
The reason behind all this is my wife seems to get easily confused, so I am<br>
trying to eliminate all &quot;hassles&quot; with switching applications. I should<br>
mention when I run these scripts by hand they run flawlessly. So I&#39;m not<br>
really sure where or why its not running correctly. The results are<br>
baffling. If I press &quot;Watch TV&quot; MythTV will pop up then close, then XBMC<br>
will open. If I press &quot;Watch Movies&quot; it does the opposite. At first I<br>
thought I had the Blue and Yellow wrong in the remote, but I&#39;ve verified it<br>
many times. I have also switched KEY_BLUE and KEY_YELLOW in the irexec<br>
file, but it didn&#39;t seem to make a difference. Any incite would be much<br>
appreciated.<br>
<br>
~/.lirc/irexec<br>
# MythTV<br>
begin<br>
      remote = mceusb<br>
      prog = irexec<br>
      button = KEY_BLUE<br>
      config = ~/scripts/mythtv_start.sh&amp;<br>
end<br>
<br>
# XBMC<br>
begin<br>
      remote = mceusb<br>
      prog = irexec<br>
      button = KEY_YELLOW<br>
      config = ~/scripts/xbmc_start.sh&amp;<br>
end<br>
<br>
~/scripts/mythtv_start.sh<br>
#!/bin/bash<br>
# Test to see if XMBC is running first<br>
if ps -ef | grep xbmc.bin | grep -v grep<br>
then<br>
killall -v -s9 xbmc.bin<br>
fi<br>
# Now to see if MythTV is running<br>
if ps -ef | grep mythfrontend | grep -v grep<br>
then<br>
# Do nothing<br>
echo “MythTV already Running!”<br>
else<br>
# Startup MythTV<br>
mythfrontend<br>
fi<br>
exit<br>
<br>
~/scripts/xbmc_start.sh<br>
#!/bin/bash<br>
# Test to see if MythTV is running<br>
if ps -ef | grep mythfrontend | grep -v grep<br>
then<br>
         killall -v -s9 <a href="http://mythfrontend.re" target="_blank">mythfrontend.re</a><br>
fi<br>
# Now to see if XBMC is running<br>
if ps -ef | grep -v grep | grep -i xbmc.bin<br>
then<br>
# Do nothing<br>
echo “XBMC already Running!”<br>
else<br>
# Startup XBMC<br>
xbmc<br>
fi<br>
exit<br>
<br>
</blockquote></div></div>
You don&#39;t say which model of Harmony remote. That might be significant.<br>
<br>
I would add this comment, based on my own experiences: Make sure that both the Harmony and *all* your devices are in the same, known, consistent state before you do any testing. Harmony remotes have an internal idea of what state each device is supposed to be in; if for example something is powered up when the remote thinks it should be off (or vice versa) then it is very easy to get into a confused state.<br>

<br>
My system is a Harmony 600, TV, cable box, mythtv front end and DVD player. Currently I don&#39;t allow the remote to control the power on the cable box or the front end. The cable box is always on (standby saves nothing) and the TV gets confused switching inputs when the frontend powers up so we do that manually.<br>

<br>
Try eliminating issues like power commands and just test a basic system. Switch everything on and get the TV to change inputs properly first. You can always add extras later.<span class="HOEnZb"><font color="#888888"><br>

<br>
-- <br>
<br>
Mike Perkins<br>
<br>
______________________________<u></u>_________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/<u></u>listinfo/mythtv-users</a><br>
</font></span></blockquote></div><br><div>Thank you, I have a harmony one. I did eliminate the power commands last night and it&#39;s working as designed now. When I was watching the output from irw I noticed it would re-send the KEY_BLUE after all the other commands so I told the remote to leave the devices (xbmc and mythtv) on at all times; disable power commands. Then I realized from the irw output that I could just use the switch input keys that the remote was sending (now I use RecTV for MythTV and KEY_HOME for XBMC). Now everything is working perfectly. I did disable the corresponding keys on each action, so MyhTV no longer has a media key (KEY_HOME) and xbmc doesn&#39;t have RecTV key. I did this just so they don&#39;t press it and get everything confused.</div>
<div><br></div><div>I have two activities one Watch TV and then Watch Movies, the wife and kids are very happy.</div><div><br></div><div>Thanks Greg G. I will try that!</div>