[mythtv-users] mythbackend channel change issues

James B Huber jbhuber at judahnet.net
Sat Jun 11 19:07:53 UTC 2022

On Fri, 2022-06-10 at 09:09 -0400, John Hoyt wrote:
> On Sun, Jun 5, 2022 at 10:12 AM John Hoyt <john.hoyt at gmail.com>
> wrote:
> > Recently I've been having a random error where my STB records the
> > wrong channel.  I thought the error was on the STB side and tried
> > to modify my channel change script to accommodate new STB features
> > (unsuccessfully of late).
> > Upon digging into the problem deeper, I've discovered that mythtv
> > seems to be semi-randomly sending 8 digits to the channel change
> > script vs the 4 I've set it up to (caught by logging looking at the
> > lirc logging in syslog).  For example, if the channel was supposed
> > to be 0685, mythbackend would provide 00668855.
> Digging into this further this morning, I've eliminated the channel
> change script by adding syslog outputs to the script.  Running as a
> user, the script only ever sends commands once.  The only time I see
> the double send is when mythbackend commands it.
> What I've found is that the channel change script is somehow getting
> called twice as I'm seeing two messages indicating that the script
> was called in syslog (see "Attempting to change channels lines").
> If I've tracked the issue down (if I am guessing right) to lirc
> trying to perform both commands interleaved.  In the log output
> below, the two "Sending: SEND_ONCE Motorola_QIP6200-2 KEY_EXIT"
> demonstrate this as I send the "EXIT" key to way up the STB from it's
> standby state.  In the script, I only issue "EXIT" once then move on
> to channel changes.
> Could this be a bg in mythbackend?  If not, any thoughts on what
> could be issuing the second channel change command?
> Any thoughts on a way to lockout lirc / irsend to only accepting one
> command at a time?
> In the log below, I've highlighted what I believe to be the repeated
> / interleaved irsend requests.
> Thanks as always for the help!
> John
> aaa
  My 2 cents, do a lockout in the external channel changer script. IE
when it starts, check for a flag if the flag is there, just exit.
# start of script
If exists /tmp/channel_changer_running then exit
touch /tmp/channel_changer_running
do your channel changing
# cleanup
if exists  /tmp/channel_changer_running then rm
-f /tmp/channel_changer_running
Just a thought..

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20220611/4b2dc258/attachment.htm>

More information about the mythtv-users mailing list