Channel Changing Script Not Accurate in Mythtv.

For discussion of topics specific to MythTV on linux
Post Reply
Posts: 2
Joined: Sat May 23, 2015 4:06 am
United States of America

Channel Changing Script Not Accurate in Mythtv.

Post by boukmandutty » Fri Aug 21, 2020 6:51 am

Can anyone offer any insight into why this script does work as well in mythtv as it does when i execute it from the shell? Mythtv is set to invoke it whenever a recording starts but it ends up skipping past the channels I set. When i execute the command from the shell it is flawless. I am wondering if there is something in the code that is throwing mythtv off.
RESTART= [Command to start andriod tv application goes here]; sleep 10;"
OK="input keyevent DPAD_CENTER"

if [ $1 = 10248 ]

adb -s $IPAD shell $RESTART "input keyevent DPAD_CENTER"

if [ $1 = 10219 ]
adb -s $IPAD shell $RESTART "input keyevent DPAD_RIGHT; sleep 1; $OK"

if [ $1 = 10220 ]
adb -s $IPAD shell $RESTART "input keyevent DPAD_RIGHT DPAD_RIGHT; sleep1; $OK"
Like I said it works perfectly when run it from the shell but when I set it as a system event mythtv just doesn't execute it accurately. I wondering if it has to do with the fact that I am invoking adb.

User avatar
Posts: 157
Joined: Sun Jun 08, 2014 2:14 am
Location: South Florida
United States of America

Re: Channel Changing Script Not Accurate in Mythtv.

Post by heyted » Sat Aug 22, 2020 1:27 am

Copy it to /tmp/.
Open a terminal.
sudo su mythtv

If the above does not work, then it's something to do with MythTV running the script as the mythtv user.
Ted | My blog

Post Reply