Live tv won't play or record - tvheadend with hdhomerun

Hello - I was on vacation and when I returned, my Rpi3 with OSMC will no longer stream or record any TV. I’m using TVheadend and the tuner is the HDhomerun. After I try to play a channel, after about 20 seconds it gives me a message: htsp client no signal

I’ve done logs here (only edited to remove shows as well as passwords):

http://paste.osmc.tv/rafudupequ.xml

One thing I saw in researching this is that the following post had similar errors to mine and related it to a time issue. Not sure if this is relevant but of course Daylight Savings Time ended here in Michigan, USA on November 1st. The channels worked well before this date, and haven’t worked since. Here is the post, although it doesn’t have anything to do with OSMC.

https://tvheadend.org/issues/3316

Also, the HDhomerun works well through the hdhomerun app on my computer, so I am receiving channels using this tuner and it is attached to my network.

Any help will be greatly appreciated. Thank you.

Hi pab11,

I’ve no clue about the HDHomeRun device but I can see that you updated the OSMC device to Debian Buster on

2020-10-19 11:10:39

Now you have two library packages on your system: One that was installed before with Debian Stretch (libhdhomerun3) and one with Debian Buster (libhdhomerun4):

ii  libhdhomerun3                        20161117-2                          armhf        Library for Silicon Dust HD HomeRun
ii  libhdhomerun4:armhf                  20180817-2                          armhf        Library for Silicon Dust HD HomeRun

I’m not sure whether this is the root cause or has anything to do with your issue … but I would remove the libhdhomerun3 package as a try (sudo apt remove libhdhomerun3), reboot and test again.

Addition: For safety, you can re-install libhdhomerun4 in case the removal of libhdhomerun3 breaks anything: sudo apt install --reinstall libhdhomerun4

Thanks for the reply Jim. Unfortunately that didn’t do the trick. I removed libhdhomerun3, rebooted, then tried. Same result. I then reinstalled libhdhomerun4 just in case, rebooted, and tried. Same result. I think I’ll reinstall libhdhomerun3 now since this had no impact on the problem and i don’t know what it does. let me know if you disagree.

any other ideas?

weird. i decided to see if it would work if i tried playing channels three or four times or if i would get the same error message. it worked on the third time. so i rebooted to see again. it worked on the first time. i’ll post back if this issue continues. maybe later today, but just wanted to update to save people from wasting time trying to work on it now.

Unfortunately it stopped accessing live tv again. So, i turned on debugging and restarted.

I tried 1 channel and waited for the error message (htsp client no signal), then did the same thing (4 times total) and finally it played again.

I also tried one channel that i couldn’t play previously and this time it played.

This time i have a log that includes when it didn’t play and then when it did. The last two channels (at 11:47:20 and 11:47:56) played properly. All channels previous to this did not.

Quick note - this is still with libhdhomerun3 not installed (only libhdhomerun4 is installed).

I hope this provides enough details to help here. Please let me know. Thanks for your time.

http://paste.osmc.tv/miwisamadi.xml

This very sounds like a timing issue. Have you checked all the delay and/or grace parameters if you open the tvheadend web page and look at the tuner(s) on the tv adapters treeview?

image

From here someone with the same HDHomeRun device has to continue to help you or you find appropriate instructions how to setup HDHomeRun with tvheadend elsewhere.

Thanks Jim for the reply. I don’t see any paramaters for delay or grace with the tv adaptors. I have it set to advanced. Could it be somewhere else?

no idea; what menu is shown if you click on the parent node HDHomeRun (104 ...) 192.168.0.6?

Addition: Is initial scan active for both tuners? This means tvheadend uses this tuner on start to scan all muxes for services. I’m not sure if a tuner is available as long the initial scan has finished.

Here is the menu for the parent node. I just noticed (after you asked) that the “network type” isn’t selected. I selected “ATSC-T”, saved it, and rebooted, but it didn’t actually save it. Not sure why or if this is a big deal. It’s for OTA in the USA.

Also, initial scan is active for both tuners.

Wish I could give more info here to help you help me, but I can’t think of anything else. If you do (or anyone else), please let me know. Thank you.

Hi @pab11,

I looked again in your logs and obvious this error starts from the beginning:

...
Nov 05 11:43:55 osmc tvheadend[959]: tvhdhomerun: failed to acquire lockkey: }CP
...

The related code I could find at tvheadend/tvhdhomerun_frontend.c at master · tvheadend/tvheadend · GitHub is

...
tvh_mutex_lock(&hfe->hf_hdhomerun_device_mutex);
  res = hdhomerun_device_tuner_lockkey_request(hfe->hf_hdhomerun_tuner, &perror);
  if(res < 1) {
    tvh_mutex_unlock(&hfe->hf_hdhomerun_device_mutex);
    tvherror(LS_TVHDHOMERUN, "failed to acquire lockkey: %s", perror);
    return SM_CODE_TUNING_FAILED;
  }
...

So, instead of meaningful error string we see “}CP” by method hdhomerun_device_tuner_lockkey_request…???

This method belongs to the library libhdhomerun.so.4which is included in the libhdhomerun4 package which comes with tvheadend afaIk.

f# strings libhdhomerun.so.4|grep -i hdhomerun_device_tuner_lock
...
hdhomerun_device_tuner_lockkey_request
...

So, I think you’ve to contact the tvheadend folks and ask for more help in their forum; this could be a good starting point Forums - Tvheadend

Sorry for no better help :disappointed:

Thanks Jim for your reply. I’ve been waiting to reply to you as it has been working again over the past few days. I can’t explain it since I didn’t do anything to fix it. If it stops working, I’ll head over to that forum there. Thanks again for your assistance.

It’s been working off and on, and I’ve discovered some interesting information. I’ll post it here first and hope that someone can look into it. If not, then I’ll try the other forum.

The only time a channel will be able to play is if I play one of three specific channels first. Once I do that, I’m able to play any channel without problem. However, If I don’t play one of the other three channels first, then I get the error message “htsp client no signal” for any other channel I choose to play.

Once I stop playing/streaming any channel for an amount of time that I haven’t determined (could be a couple of hours or more), I have to resort to the same thing (play one of the three channels, then I can play any other channel).

I’m posting a log here where I try to play a channel (other than the three channels), get the error message, and then I play one of the three channels. Hopefully this can show the difference between the two and be of some help.

The three channels that work (hopefully they show up in the log with some helpful details) are:

WMYD-HD
WMYD-AT
WMYD-ES

I have access to 38 stations and these are the only ones that allow me to start watching TV.

Here’s the log:
http://paste.osmc.tv/oluyotevuh.hs

well i have received no joy from posting at the other site.
here is the link to my posts at the other site:
https://tvheadend.org/boards/5/topics/43097
i also noticed another thing in the meantime since i last posted there. i’m going to post it below now so that perhaps someone here can make some sense out of this and help. i’m desperate at this time. thanks.

"Another interesting thing I noticed is that once I got the live tv to work, and I was streaming only one channel, the stream status would show up as streaming two channels. I’ve attached two screenshots. The first shows the stream status with nothing playing. The second shows it with only one channel playing. This is a 2 tuner HDhomerun. Perhaps this can give some input that may lead to it getting fixed?

It’s always at a low bandwidth. Also, unless I’m playing a channel at 509Mhz, 509Mhz is the extra channel."

No Channel Playing:

One Channel Playing (but both tuners being used):

Also, stopping the channel from streaming (live tv) does not stop the hdhomerun config gui from showing both tuners still active.

Another odd item that I cannot seem to change.
In the TV adapters page, for Tuner 0, the linked input is Tuner 1. For Tuner 1, the linked input is Tuner 0. But most importantly both tuners are not available in the linked input as options in the drop down. only one. When i try to change the name to match the linked input, both tuners become linked to the same tuner. not sure if this is important but it’s a change from how i originally set this up.

Isn’t there an option to select “Not Linked” in the drop down?

My hdhomerun adapters (running in DVB mode) are set to Not Linked.

Thank you for your reply. I did see the “not linked” option but i thought that it was required to link each adapter.