[mythtv-users] HDHR - occasional "Added 0 devices" / "Unable to find a free device" when attempting to record a show

Klaas de Waal klaas.de.waal at gmail.com
Sun Nov 26 17:32:12 UTC 2023


On Sun, 26 Nov 2023 at 00:47, Will Dormann <wdormann at gmail.com> wrote:

> Hi folks,
>
> Since having relinquished my MythTV box to the basement and having just
> a Fire TV stick connected to the TV, I've noticed that occasionally
> shows will fail to record from my 3-tuner HDHomerun Prime device.
>
> Here's an example selection from my mythbackend.log file:
>
> (UpdateRecStatus) Updating status for "Aqua Teen Forever: Plantasm" on
> cardid [5] (Pending => Recorder Failed)
> (HandleRecordingStatusChange) Tuning recording: "Aqua Teen Forever:
> Plantasm": channel 2757 on cardid [5], sourceid 2
> (HandleReschedule) Reschedule requested for CHECK -9 1703 0
> UpdateRecStatus2 | Aqua Teen Forever: Plantasm |  | Everyone's favorite
> rascals Frylock, Master Shake, Meatwad and Carl fight the corporate
> overlord Amazin, led by tech mogul Neil
>   and his trusty scientist sidekick, Elmer. | MV018741290000
> (InsertProgram)
> RecordingInfo::InsertProgram(ProgramInfo(2757_20231125050000.ts):
> channame(Cartoon Network HD)#012             startts(Sat Nov 25 05:00:00
> 2023 GMT) endts(Sat Nov 25 06:45:00 2023 GMT)#012
> recstartts(Sat Nov 25
> 05:00:00 2023 GMT) recendts(Sat Nov 25 06:45:00 2023 GMT)#012
>   title(Aqua Teen Forever: Plantasm)): recording already exists...
> (HandleStateChange) TVRec[5]: Changing from None to RecordingOnly
> (TuningFrequency) TVRec[5]: TuningFrequency
> (Connect) HDHRSH[5](131F1E8E): Added 0 devices from 131F1E8E
> (Connect) HDHRSH[5](131F1E8E): Unable to find a free device
> (SetChannelByString) DTVChan[5](131F1E8E): SetChannelByString(757):
> Channel object will not open, can not change channels.
> (TunerGet) HDHRSH[5](131F1E8E): Get request failed (not connected)
> (TunerSet) HDHRSH[5](131F1E8E): Set request failed (not connected)
> (TuningFrequency) TVRec[5]: Failed to set channel to 757. Reverting to
> kState_None
> (HandleStateChange) TVRec[5]: Changing from RecordingOnly to None
> (UpdateRecStatus) Updating status for "Aqua Teen Forever: Plantasm" on
> cardid [5] (Tuning => Recorder Failed)
> (ChangeRecordingEnd) Failed to change end time on card 5 to
> 2023-11-25T06:45:00Z
> (HandleReschedule) Reschedule interrupted, will retry
> (HandleReschedule) Reschedule requested for CHECK -9 1703 0
> UpdateRecStatus2 | Aqua Teen Forever: Plantasm |  | Everyone's favorite
> rascals Frylock, Master Shake, Meatwad and Carl fight the corporate
> overlord Amazin, led by tech mogul Neil and his trusty scientist
> sidekick, Elmer. | MV018741290000
> (HandleReschedule) Reschedule requested for PLACE Interrupted
> (HandleReschedule) Scheduled 1657 items in 0.2 = 0.00 match + 0.00 check
> + 0.18 place
> (GetPlaybackURL) ProgramInfo(2757_20231125050000.ts): GetPlaybackURL:
> '2757_20231125050000.ts' should be local, but it can not be found.
> (GetPlaybackURL) ProgramInfo(2757_20231125050000.ts): GetPlaybackURL:
> '2757_20231125050000.ts' should be local, but it can not be found.
> (DoMetadataLookupThread) JobQueue: Metadata Lookup Starting for "Aqua
> Teen Forever: Plantasm" recorded from channel 2757 at 2023-11-25T05:00:00Z
> (GetPlaybackURL) ProgramInfo(2757_20231125050000.ts): GetPlaybackURL:
> '2757_20231125050000.ts' should be local, but it can not be found.
> (GetPlaybackURL) ProgramInfo(2757_20231125050000.ts): GetPlaybackURL:
> '2757_20231125050000.ts' should be local, but it can not be found.
> (DoFlagCommercialsThread) JobQueue: Commercial Detection Starting for
> "Aqua Teen Forever: Plantasm" recorded from channel 2757 at
> 2023-11-25T05:00:00Z
> (GetPlaybackURL) ProgramInfo(2757_20231125050000.ts): GetPlaybackURL:
> '2757_20231125050000.ts' should be local, but it can not be found.
> (GetPlaybackURL) ProgramInfo(2757_20231125050001.ts): GetPlaybackURL:
> '2757_20231125050001.ts' should be local, but it can not be found.
> (GetPlaybackURL) ProgramInfo(2757_20231125050001.ts): GetPlaybackURL:
> '2757_20231125050001.ts' should be local, but it can not be found.
> (DoMetadataLookupThread) JobQueue: Metadata Lookup Starting for "Aqua
> Teen Forever: Plantasm" recorded from channel 2757 at 2023-11-25T05:00:01Z
> (GetPlaybackURL) ProgramInfo(2757_20231125050001.ts): GetPlaybackURL:
> '2757_20231125050001.ts' should be local, but it can not be found.
> (GetPlaybackURL) ProgramInfo(2757_20231125050001.ts): GetPlaybackURL:
> '2757_20231125050001.ts' should be local, but it can not be found.
> (DoFlagCommercialsThread) JobQueue: Commercial Detection Starting for
> "Aqua Teen Forever: Plantasm" recorded from channel 2757 at
> 2023-11-25T05:00:01Z
> (GetPlaybackURL) ProgramInfo(2757_20231125050001.ts): GetPlaybackURL:
> '2757_20231125050001.ts' should be local, but it can not be found.
>
>
> The HDHR device is never terribly busy, but I see in the above:
>   Added 0 devices from 131F1E8E
>   Unable to find a free device
>
> The result is a 0-byte recording attempt in my recorded files.
>
> I don't recall having this problem in the past, but at the same time I
> also used to have a HD-PVR device as well, so perhaps MythTV might
> automatically fall back to using that if the HDHR tuners failed?  The
> other difference is that the MythTV device is now connected via WiFi.
> The signal is good strength, so I don't think it's just that the network
> connection is poor.  Running hdhomerun_config with the "save" option
> produces nothing but '.' characters, so not even a packet is dropped.
>
>
> It's just that it seems that sometimes when a shows is to be recorded,
> MythTV fails to find/open a tuner.  Is there something interently about
> a WiFi-connected MythTV box that might make an HDHR less reliable than
> it should be?  Are there any other tricks for HDHR tuning reliability?
>
> What happens is that the mythbackend thinks that there is a connection to
the HDHR but the HDHR has dropped the connection.

The "Added 0 devices from" message can be reproduced as follows.
I have a mythbackend running on my laptop, connected via Wifi to a
HDHomeRun on the wired network.
It is running EIT on the HDHomeRun to get the guide data.
Closing the lid of the laptop does suspend everything on the laptop
including the mythbackend.
The HDHomeRun now drops the connection after a while.
Opening the lid of the laptop does a resume of everything on the laptop,
including the mythbackend.
Mythbackend thinks that it still has a connection to the HDHomeRun and when
it tries to tune the next EIT channel
the "Added 0 devices from" message is given. After that, tuning the next
channel does succeed.

This suggests that In your case, it can be that the system that runs
mythbackend does a suspend/resume.

Whether you can successfully run a mythbackend with network tuners over
Wifi does depend very much on
the quality of your Wifi network. It works for me when I am near an access
point but I think that a bad
network can also cause the HDHR to drop the connection. As mentioned by
Hika, using a wired connection is preferred.
If it is not possible to make a wired connection then you can consider
adding an access point as close as possible.

It is likely possible to change the HDHomeRun driver in mythbackend so that
it does one or more retries when a connection
unexpectedly fails. This is a non-trivial undertaking and do not hold your
breath waiting for this to happen.

MythTV uses a HDHomeRun library and that iibrary uses UDP to connect to the
HDHomeRun.
This works perfectly with a perfect network but intrinsically less good
with a not-perfect network.
You can try to increase the size of the network buffers with the following
command:
sudo sysctl -w net.core.rmem_max=8000000
as described in the Wiki for SatIP network tuners in paragraph
https://www.mythtv.org/wiki/Channel_Scanning#Scanning_with_Sat.3EIP_tuners

You might want to experiment with accessing the HDHomeRun as an IPTV
device. This uses HTTP/TCP and maybe this
works better for you. There are pros and cons to this approach.
See the description in the Wiki in paragraph
https://www.mythtv.org/wiki/Channel_Scanning#HDHomeRun_Channel_Import_2

Hope this helps,
Klaas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20231126/4e32c8f9/attachment.htm>


More information about the mythtv-users mailing list