[mythtv-users] mythbackend channel change issues

John Hoyt john.hoyt at gmail.com
Sat Jun 11 19:55:30 UTC 2022

>   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.
> CONECPT  code
> # 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..

Jim, thanks for the suggestion!  I actually implemented this this morning
with the following code:

# Check is Lock File exists, if not create it and set trap on exit
 if { set -C; 2>/dev/null >~/channelchange.lock; }; then
   trap "rm -f ~/channelchange.lock" EXIT
   logger "ir_channel_change lirc channel change lock file exists… exiting"
   sleep 10

I've noticed that the double channel change occurs every time I restart the
backend.  I think it also semi-randomly occurs when the backend goes days
without recording - but this is wild speculation (and could have had some
updates via apt-get in between causing a backend restart).

I've actually been seeing the issue for months via wrong channel changes -
just hadn't seen it occur nearly as regularly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20220611/2224ba60/attachment.htm>

More information about the mythtv-users mailing list