LinHES Forums http://forum.linhes.org/ |
|
IR Blaster works at command line, but not in MythTV http://forum.linhes.org/viewtopic.php?f=6&t=15802 |
Page 1 of 1 |
Author: | Das Hammer [ Sat Jul 07, 2007 8:02 am ] |
Post subject: | IR Blaster works at command line, but not in MythTV |
Title pretty much says it. I know the hardware is working because I can execute /etc/irblaster/channel_change.sh 123 and the STB will change channels. I entered this script location into the "external channel change command" field. I went to Input connections then /dev/video0 (S-Video 1). I created the channel with the channel editor rather than importing them from listings from the Video Sources menu (zap2it seems to be down right now). I first tried executing the /etc/irblaster/channel_change.sh script with the mythtv user and it worked, so it is not a permission problem. I also made my own script /etc/irblaster/bogus.sh which just outputs the date and time into /etc/irblaster/bogusoutput.log I can execute this script at the command line and the bogusoutput.log is populated with the date/time of every time that I execute it. However, if I use that script as my external channel change command, it does not execute when I change channels in MythTV. I'm using a serial IR blaster, but have a PVR150 with the receiver/blaster. I ran /usr/local/bin/lirc-reconfig.sh and selected the PVR150 Gray remote (the one without the IR blaster) just to see if it was trying to use the other blaster by default. I don't know what else to look for at this point. I may try using the PVR150's blaster instead. |
Author: | tjc [ Sat Jul 07, 2007 9:35 am ] |
Post subject: | |
Any time you have a script which works when run interactively but "doesn't work" in some other circumstance, the first thing to ask yourself is "what's different"? The #1 culprit is usually your environment variables. (Secondary things include "Am I running it as the same user?", "Am I specifying the full pathname to the script?", "Is it being run in a different directory?") To debug differences in the environment variables: 1) Capture the stdout/stderr output of the script somehow. One way is to add a line like this near the beginning of the script: Code: exec >/tmp/mydebugging.log 2>&1 This is for a shell scripts. For Perl, Python, ... you need to do something equivalent. 2) Record the current environment in that log. This means adding a line like this after the exec line shown above: Code: env Or possibly like this to make comparisons easier: Code: env | sort 3) For the "where am I really" issue alluded to above add a line like this after the exec: Code: pwd
Once you determine what the differences are you can fix them, in the script, as "bad assumptions about ..." |
Author: | bruce_s01 [ Sat Jul 07, 2007 4:07 pm ] |
Post subject: | |
Perhaps I'm asking the stupidly obvious question ![]() Bruce S. |
Author: | tjc [ Sat Jul 07, 2007 8:53 pm ] |
Post subject: | |
Knew I'd forgotten something... ![]() 4) To see that add a line like this after the exec: Code: echo "Args: $*"
|
Author: | Das Hammer [ Sat Jul 07, 2007 9:33 pm ] |
Post subject: | |
bruce_s01 wrote: Perhaps I'm asking the stupidly obvious question
![]() Bruce S. I'm glad you asked that, sir, because I did not. I thought the "Channel Number" on the first screen took care of that. Thank you! I just tried your suggestion and it worked. tjc, I thank you for your help as well; not only on this topic, but my other ir blaster issue. You have helped me learn a lot more than I planned on, but it was worth it. |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |