[mythtv-users] mythbackend channel change issues

John Hoyt john.hoyt at gmail.com
Sat Jun 11 21:55:51 UTC 2022


On Sat, Jun 11, 2022 at 5:47 PM Mike Perkins <mikep at randomtraveller.org.uk>
wrote:

> On 11/06/2022 20:55, John Hoyt wrote:
> >>    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
> >   else
> >     logger "ir_channel_change lirc channel change lock file exists…
> exiting"
> >     sleep 10
> >     exit
> >   fi
> >
> > 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.
> >
> In that log snippet you posted, there are actually /three/ channel change
> requests logged, the first
> for ch 510 and the other two for ch 550.
>
> This bug strikes me as either a flag left set or perhaps not initialized
> correctly at boot/reboot -
> maybe at other times. I do not know the code.
>

The call for 510 is the backend completing a to change to my "default"
channel (which I don't think it used to unless commanding live tv).

The call for 550 is the correct channel for the requested recording.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20220611/95cc3703/attachment.htm>


More information about the mythtv-users mailing list