No channels found

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

Unfortunately, epg will have to be sourced elsewhere.

You can grab the xmltv epg link from Matt huisman’s site (above), but I believe he sources that from http://freepg.tv/, so best to go straight to the source. You then need to link up the channels manually, but once it’s set up, it’s set up.

(The below is assuming you’ve obtained a freepg.tv link)

Okay, so once you have an XMLTV epg .xml link file, you’ll want to get it into TVH. Do do so, you’ll need to set up a cron to download it on a regular basis. SSH into your CE box, then:

crontab -e

then:

00 3 * * * wget -O '/storage/downloads/au_epg.gz' 'http://Full_Link_Given_By_Freepg' && gunzip -c '/storage/downloads/au_epg.gz' > '/storage/.kodi/userdata/au_epg.xml'

It’s set to download once a day at 3am (the second number). If your machine isn’t on 24/7, pick a time (24 hr time 00-23) that it is reliably or replace “00 3 * * *” to @reboot and it’ll run every time the box is turned on.

Save and quit. Then run this once to get your initial XMLTV file:

wget -O '/storage/downloads/au_epg.gz' 'http://Full_Link_Given_By_Freepg' && gunzip -c '/storage/downloads/au_epg.gz' > '/storage/.kodi/userdata/au_epg.xml'

From there, you need to get TVH to see that file. If you go into the TVH server Addon settings, under the XMLTV setting, set “XMLTV Service Type” to file and enter “XMLTV File Location” to:

/storage/.kodi/userdata/au_epg.xml

From within the TVHeadend webui:

Under Configuration->Channel / EPG->EPG Grabber, click “Re-run Internal EPG Grabbers”.

Now, if your services are set to “automatically link EPG data to the channel…”, you should have most or all the channels with EPG data. But sometimes errors happen and things don’t get linked, or get linked to the wrong channel. Once the run is completed (you’ll see it happen in the log pane), you can manually link the EPG channels to the HDHR channels in Configuration->Channel / EPG->EPG Grabber. Remember to save changes.

Note: Getting the EPG loaded and recognized may require a reboot of the box or a restart of the TVH server—disable (don’t uninstall) and then re-enable the Addon.

Just a note that the EPG data from freepg is far more robust than most OTA Epg stuff is.

@zang74 - Thanks once again for documenting all this for me to follow. I will give it a shot over the weekend and let you know how it goes.

Once again many thanks.

Greg

Got my XMLTV epg .xml link file and ran wget and the au_epg.xml file was created. Changed the XMLTV type and set the file location.

Clicked on “re-run internal EPG Grappers” but nothing appears in the TvH log. Rebooted and repeated and still nothing in TvH log and naturally no EPG data.

What could I be missing?

EDIT: Found the Internal XMLTV Grapper Module under EPG Grapper Modules was not enabled. Now getting the following in the TvH log:

2019-06-15 08:23:07.331 spawn: Executing "/storage/.kodi/addons/service.tvheadend42/bin/tv_grab_file"

2019-06-15 08:23:07.416 xmltv: /storage/.kodi/addons/service.tvheadend42/bin/tv_grab_file: grab took 0 seconds

2019-06-15 08:23:07.525 xmltv: /storage/.kodi/addons/service.tvheadend42/bin/tv_grab_file: parse took 0 seconds

2019-06-15 08:23:07.525 xmltv: /storage/.kodi/addons/service.tvheadend42/bin/tv_grab_file:  channels   tot=   27 new=    0 mod=    0

2019-06-15 08:23:07.525 xmltv: /storage/.kodi/addons/service.tvheadend42/bin/tv_grab_file:  brands     tot=    0 new=    0 mod=    0

2019-06-15 08:23:07.525 xmltv: /storage/.kodi/addons/service.tvheadend42/bin/tv_grab_file:  seasons    tot=    0 new=    0 mod=    0

2019-06-15 08:23:07.525 xmltv: /storage/.kodi/addons/service.tvheadend42/bin/tv_grab_file:  episodes   tot=  684 new=  684 mod=  684

2019-06-15 08:23:07.525 xmltv: /storage/.kodi/addons/service.tvheadend42/bin/tv_grab_file:  broadcasts tot=  684 new=  684 mod=  684

But still no EPG Data in Kodi.

BTW - How is the data that’s downloaded from freepg.tv matched to the correct channels that I have enabled. Service Name, Channel Name or…

Your network should have looked something like this

[click for full sized image]

Note, in particular, the Generic Aus pre-defined mux for DVT transmissions.

You never showed that you got this set up correctly … or else I misunderstood.

Yes, I did set this to Generic Aus pre-defined, but after to close that window and it creates the muxes that setting is not there if you re-open that window.

OK, that explains why I thought it was not done.

Your pic also shows that Skip startup scan is enabled.
You should disable this and save.

As there are a lot of muxes to be dealt with, the scanning could take some time.
Ensure that both tuners (TV Adapters) have the OTA network (or whatever name you used) listed in the entry box and that each tuner is individually enabled. The scan will be quicker with both tuners working.

Already done, thanks.

Yep that is also done too.

My thought is it’s a driver issue of some sort, that’s why I asked a few questions up if anyone has TvH Server running on an N2 with HDHR.

I have the tvh server running on a Tanix 3 905W and connected to a HDHomerun Quattro and the clients on other devices including a second Tanix.

I have it also running on a Tanix TX92, but it does not mean it will run on an N2 as they have different kernels for a start.

The log shows it’s finding the channels within the xml file. Those channels then need to be linked to TVH services. If it’s not doing it automatically (I believe “automatically link EPG…” is on by default), then the XML channel listings need to be linked up with your TVH channels manually. This can be done on the Channels tab, or within EPG grabber. Once they’re linked up, rerunning the grabber will then get the episode data. That way, only identified and linked channels will get episode info (saves TVH from caching vast amounts of data for channels in the XML file that are unused in TVH).

Have got the XML file linked up correctly and I’m getting EPG data for some of the channels.

My problem is where I live I can pick up channels to the north and south of me which are classed as different regions by freepg.tv. While there maybe channels is my region with the same EPG as say a region north of me I have no way of knowing which ones are the same as the channel names are different.

Hope this makes sense.