[mythtv-users] mythbackend channel change issues
Mike Perkins
mikep at randomtraveller.org.uk
Sat Jun 11 21:46:24 UTC 2022
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.
--
Mike Perkins
More information about the mythtv-users
mailing list