No channels found

Hi all,

I’m trying to get TvH and HDHomeRun working on my Odroid N2, but I’m not have much luck. I can scan for channels using the HDHR Web GUI and it finds 73 channels. I can also watch those 73 channels via the Windows HDHR App.

However when I scan the for channels via the TvH Web GUI it only finds 1 channel. For known channels the TvH log shows “scan no data, failed”.

Don’t know if it was necessary but I also installed the HDHR Add-on in CE (nightly 20190611) too.

I feel I’m missing something very basic, so any help greatly appreciated.

EDIT: Just noticed the HDHR Add-on does not run at all. So that can’t be a good thing…

EDIT2: Here is a debug. Enabled debug, rebooted and tried to run the HDHR add-on:
debug file.

TIA

Greg

You don’t need the Kodi Add-on to run the HDHR on TVHeadend. Uninstall it for the sake of avoiding confusion. I don’t believe it works, anyways. I seem to remember talk about that on the Kodi forums.

That said, TVH has HDHR support built in.

So what exactly are you getting? Is it showing up as an HDHomeRun under “Configuration->DVB Inputs->TV adapters”? Is it listing all the tuners (depending on the model; mine has two — see pic)?

53%20PM

If you’re seeing something like that, it’s likely it’s a “Network (configuration tab in TVH)” problem. TVH doesn’t import channels from the HDHR device. As far as it’s concerned, it’s just a dumb tuner at its whim.

You need to set up a “network” for TVH to use with the HDHR from the Configuration->DVB Inputs->Networks tab. You need to create a network with your specific type (ATSC/DVB/yougetthepicture). You should also make sure that if you’re using pre-defined muxes, they’re appropriate to your region. Once you’ve set up a network, you then need to link it to the HDHR. That means going back to the TV Adapters tab and making sure that each tuner of the HDHR is set to use the Network you created.


Connect them, make sure “initial scan” is checked and save. Then return to the “Networks” tab.

One thing to note: make sure “max input streams” in your new network is equal to the number of tuners the adapter using it has. In my case, it’s set to two.

Select your network and then click “force scan”.

If you’ve done all of the above and are still getting only one channel, let me know.

Yep, that’s exactly what I have done. And, only one channel.

BTW - Cannot find this setting “max input streams”. Seems it is only available on IPTV Networks.

https://i.vgy.me/fLjrdy.jpg

https://i.vgy.me/mkrjir.jpg

https://i.vgy.me/SPiUlY.jpg

Sorry about that. You’re right about IPTV. I saw your post just as I was about to head to bed and thought I’d get on it right away. I probably should’ve slept on it.

So I know that you’re not using a pre-defined set of location muxes, but you’re not even using a generic DVB scan table. This means TVH doesn’t know what frequencies to look for using the tuner (as I said, it treats the HDHR as a dumb tuner, incapable of finding things itself).

It looks like you’re in Australia. TVH has a number of pre-defined location muxes (though, they can sometimes be outdated). Try using a pre-defined Australian DVB-T mux for on your OTA network and force a scan to see if it picks up more. I thought there was a “generic” scan table for Australia, I was wrong. So you’ll need to try a pre-defined one.

As an aside (and because I watch/record a bunch of AU/NZ tv myself from here in Canada), Matt Huisman has done a brilliant job getting Australian Freeview into TVH and Kodi.

https://www.matthuisman.nz/2019/02/libreelec-tvheadend-iptv-freeview-au.html

If you want a couple of “extra tuners” for most of those channels, you can add an IPTV network with Matt’s TVH source, and merge the Services (that is add multiple services to a single channel) with your HDHR’s OTA network. You could then use the IPTV for recording, or supplementing channels with poor reception. Adjust the priority per service in relative to your needs.

But, first, lets get your OTA working properly.

@zang74, Thanks for your reply.

I have not used pre-defined muxes before when using USB tuners here in Australia and TvH has worked just fine. However, I have taken your suggestion and tried a few of the pre-defined ones all with the same result.

It is interesting that the only channel that’s found is an in-house private channel that’s in the village where I live. It’s not a commercial FTA channel at all, it’s only available to people in this village. Whether this is helpful I don’t know.

Yes, I was aware of Matt’s IPTV but I’m not really interested as 2 channels is enough and they will not effect my download data limits. Unlike Matt’s option.

I also noticed that in the status tab that the SNR is always 0% when the Mux Scan is happening, there are many times the Signal Strength goes above 50% but the SNR stays at 0%. That is until the in-house channel is found when the SNR does get a reading above 0%.

Any other thoughts?

TIA

Greg

I know the channel list comes up on the HDHR app. And you’re sure you’re able to watch those channels? I know HDHR pulls up local channel lists and lists them regardless of reception levels (I’ve got channels listed in my app that I’ve never been able to receive).

How big is your antenna, btw?

Also, I’ve noticed that you have “Remove scrambled bits:” unchecked on your tuners; can you turn it on and give it a try.

I find this all very odd; unless CE has messed with the HDHR drivers, I don’t see why it should be different reception levels between the app and TVH. Can you run a scan with the log pane open (and set to debug) and cut and paste (or pastebin) the results?

I am able to watch all the channels via the Windows HDHR app.

It’s a commercial TV Antenna for the village that everyone uses.

Will do.

Will do this at the same time I uncheck the Scrambled Bits.

This is all so weird as it should be very straight forward. Maybe it’s worth uninstalling TvH Server and installing again?

That’s what’s made me wonder if there isn’t some kind of scrambling going on. If the logs don’t show anything, reinstalling the server (and deleting all its data) is a good option. How long ago was it installed?

I’m assuming your talking about the Antenna.

2 years ago. Used it a couple of months ago to build a CE box for a friend using a USB tuner and it worked just fine. Also works fine on our TV.

I think the re-install cannot do any harm so I think I will try that.

Done a reinstall of TvH Server and there’s no difference.

Here’s the debug log of the scan.

Actually, I meant how long ago was the TVH server installed. There were add-on update failures with CE-installed addons in some of the nightlies. Clearing something out that’s old might be a good idea. Do you have a free SBC or PC you can install the TVHeadend Server on to test it; at least temporarily?

I have nearly the same setup here (HDHR Connect hooked up to TVHeadend, running on CoreELEC on an N2) and it works beautifully. The difference in my case is that TVHeadend is running on a dedicated Odroid C2, instead of on the N2.

Are you running the built-in firewall on CE? If so, try turning that off. Also, are there any IP limitations set for the HDHR on your router?

Another option to test is a direct stream to Kodi. For that, we’d need to create an m3u playlist with a few (3) direct stream links in it.

Create an empty text file named test.m3u. If you go into the web server of the HDHR (http://IP.of.HD.HR/lineup.html), right click on some of the listed channels, copy the URL of 3 of the streams that you know work in the desktop app and paste them into a text document formatted like this:

#EXTM3U

#EXTINF:1, Test 1
URLofStream1

#EXTINF:2, Test 2
URLofStream2

#EXTINF:3, Test 3
URLofStream3

Save the file, then copy it over to Playlists folder in the Userdata SMB share. Try opening the streams by going into Kodi’s video playlists. By all means this should work, but then I can’t test it at the moment to guarantee it (it works fine in VLC however). If the streams don’t work, it might be that something on your network is blocking things to the N2.

That M3U file can then be added as an IPTV network to your TVHeadend server. If it works there, it makes me think there’s something weird going on with the HDHR driver in TVH.

One thing I hadn’t thought of is setting the network up as DVB-C instead of DVB-T. I know it’s an antenna system, but it may be distributed through a cable-tv style setup.

M3U file plays just fine in the playlist folder.

Do not think I know how to do that. Sorry.
EDIT: Just worked out how to do this and the IPTV works fine.
Starting to look like a HDHR driver issue to me.

Indeed. Did you try adding the network as DVB-C as I suggested?

I did, but then I don’t get any Australian pre-defined muxes and there is no generic one.

Okay. So, in searching around, I’ve seen stories of TVH/HDHR systems taking issues with not locking onto frequencies if they’re not “perfect”. I also found a few things; a video basically describing what I mentioned above: taking the direct stream links and using them in TVH. You may have to use that method to bypass the apparent problems you’ve seen.

He enters them manually, but that’s a PITA. Better to go the route of playlist. But hand creating a playlist might just be as much a PITA, but I found a python script that’ll do it. If you’re familiar with running python that is. I’ve modded it a bit to output a file (vs printing to screen); I’ve updated it for python3, tested it and it works just fine. It’ll give you an M3U that you can use as an IPTV source for TVH (make sure you actually do set the number of input streams to match the number of tuners!).

#!/usr/bin/env python3
# -*- coding: UTF-8 -*-

#
# this script will convert the hdhomerun listings (channels) to
# m3u format for use with external media players. before running
# this script, be sure to modify the <<config>> variable settings
# below.
#
# Suggested Usage: This script should be run on a cron to keep
# the channel lineup to date. Below is an example of how to execute this script:
# python /path/to/script/hdhomerun-prime-listings-to-m3u.py > /path/to/playlist.m3u
#
# @author Josh Kastang (josh[dot]kastang[at]gmail[dot]com)
# @tested Python 2.7, but should work with Python 2.6 as well.
#

import requests
import json
from pprint import pprint

# * hdhr-ip: ip address of your hdhr prime unit
# * duration: the duration the stream should play for. some
# players seem to require this while others do not. default
# is set for 7200 minutes (2 hours)
config = {
    'hdhr-ip'   : 'IP.OF.HD.HR',
    'duration'  : '7200',
}

saveloc = '/path/to/wherever/tvh-local.m3u'
m3ufile = open(saveloc, 'w+')

hdhr_url        = "http://{0}/lineup.json?show=unprotected".format(config['hdhr-ip'])
response_obj    = requests.get(hdhr_url)
listings_res    = response_obj.text

m3ufile.write("#EXTM3U\n\n# ======================\n# LOCAL TV M3U\n# ======================\n\n")
listings = json.loads(listings_res)
for l in listings:
    channel = l['GuideNumber']
    name    = l['GuideName']

    m3ufile.write("#EXTINF:{0},{1}: {2}".format(channel,channel, name))
    m3ufile.write("\nhttp://{0}:5004/auto/v{1}?duration={2}\n\n".format(
            config['hdhr-ip'],
            channel,
            config['duration']
    ))
m3ufile.close()

Thank you very much for helping me and taking the time to provide this information for me, it is greatly appreciated.

I busy for the next couple of hours but will give it a shot and let you know how it goes.

Thanks again,

Greg

Just thought I would run the script and see how it works but I’m getting this error.

Traceback (most recent call last):
File “/storage/.kodi/userdata/hdhomerun-prime-listings-to-m3u.py”, line 18, in
import requests
ImportError: No module named requests

Yeah, you won’t be able to run the script on stock CE, as its python doesn’t have the requests module.

If you install the entware package manager, you should then be able to install the requests module.

Alternatively, you can just run the script on another machine on your network with python on it.

M3U file created and added it as an IP source. All the muxes have been created and mapped too. Channel list appears in TvH Client however there’s no EPG.

Thanks again,

Greg