Feature #6038
HDhomerun channel scan
0%
Description
I'm using two HDhomerun (quatro and duo) which been working quite well with tvheadend.
In tvheadend the pre-defined muxes does not provide an exaustive list of all the channels that are available in my area. As such channel scanning is a bit painful (I ended-up generating my own dvb_channel.list using wscan + dvbv5-scan)
I tried Jellyfin a few weeks ago and was surprised by its ease of use (although I prefer tvheadend as more reliable). One interesting thing was how it manage hdhomerun: it has the ability to fetch the channel list from the remote adapter. As such it does not need to "scan" for muxes at all, it simply use the already scanned list using the devices API. Option are to use all channels or only favorites or discard disabled ones (as favorites & disable can be done from the admin web page on the hdhomerun).
All in all, it would be great if tvheadend had a similar behavior built-in which would simplify and futher automate the configuration and usage significantly.
History
Updated by th0ma7 ^ over 3 years ago
I was looking at various alternatives to automate this.
The easiest would be the following:
- Use IPTV automatic
- Use hdhomerun json mapping URL such as http://<IP>/lineup.json
- Modify TVH to support JSON on top of M3U
Other alternative could be:
- Create a .js script similar to https://gist.github.com/caseyavila/f37abe5490d4abfc83a75e65056bda6c
- Have the ability to call that page from the IPTV Automatic using http://localhost:9981/hdhomerun.html
- that page would provide a M3U listing of all LAN hdhomerun for TVH to use
The two options would alleviate the need of an added cron job to generate an M3U file, from which the IPTV Automatic setting is pointing to file://<path>
I've looked at the code and, I'm definitively not a C-coder... sigh.
I could probably create something such as a webpage with a .js script type-thing.
Interest from a developper to add JSON format to accepted URL would be just great.
Much thnx in advance for considering such feature.
Updated by th0ma7 ^ over 3 years ago
Hi all,
If within src/input/mpegts/iptv/iptv_auto.c:
Just before: if (!strncmp(data, "#EXTM3U", 7))
We could check if data if JSON type (such as using json-c):
if (json_tokener_parse(data) != NULL)
If it is then convert to M3U similar to jq query:
$ echo "#EXTM3U" && curl -s http://192.168.80.9/lineup.json | jq -r '.[] | "#EXTINF:-1 tvg-chno=\"\(.GuideNumber)\" tvg-name=\"\(.GuideName)\",\(.GuideName)", "\(.URL)?duration=7200"' #EXTM3U #EXTINF:-1 tvg-chno="2.1" tvg-name="CBFT-DT",CBFT-DT http://192.168.80.9:5004/auto/v2.1?duration=7200 #EXTINF:-1 tvg-chno="3.1" tvg-name="WCAX-HD",WCAX-HD http://192.168.80.9:5004/auto/v3.1?duration=7200 #EXTINF:-1 tvg-chno="3.2" tvg-name="Movies!",Movies! http://192.168.80.9:5004/auto/v3.2?duration=7200 #EXTINF:-1 tvg-chno="3.3" tvg-name="Circle",Circle http://192.168.80.9:5004/auto/v3.3?duration=7200 #EXTINF:-1 tvg-chno="3.4" tvg-name="StartTV",StartTV http://192.168.80.9:5004/auto/v3.4?duration=7200 #EXTINF:-1 tvg-chno="3.5" tvg-name="ION TV",ION TV http://192.168.80.9:5004/auto/v3.5?duration=7200 #EXTINF:-1 tvg-chno="5.1" tvg-name="WPTZ-HD",WPTZ-HD http://192.168.80.9:5004/auto/v5.1?duration=7200 #EXTINF:-1 tvg-chno="5.3" tvg-name="Me TV",Me TV http://192.168.80.9:5004/auto/v5.3?duration=7200 #EXTINF:-1 tvg-chno="6.1" tvg-name="CBMT-DT",CBMT-DT http://192.168.80.9:5004/auto/v6.1?duration=7200 #EXTINF:-1 tvg-chno="10.1" tvg-name="CFTM-HD",CFTM-HD http://192.168.80.9:5004/auto/v10.1?duration=7200 #EXTINF:-1 tvg-chno="12.1" tvg-name="CFCF",CFCF http://192.168.80.9:5004/auto/v12.1?duration=7200 #EXTINF:-1 tvg-chno="15.1" tvg-name="CKMI",CKMI http://192.168.80.9:5004/auto/v15.1?duration=7200 #EXTINF:-1 tvg-chno="17.1" tvg-name="CIVM-DT",CIVM-DT http://192.168.80.9:5004/auto/v17.1?duration=7200 #EXTINF:-1 tvg-chno="22.1" tvg-name="WVNY-DT",WVNY-DT http://192.168.80.9:5004/auto/v22.1?duration=7200 #EXTINF:-1 tvg-chno="22.2" tvg-name="Laff",Laff http://192.168.80.9:5004/auto/v22.2?duration=7200 #EXTINF:-1 tvg-chno="22.3" tvg-name="Grit",Grit http://192.168.80.9:5004/auto/v22.3?duration=7200 #EXTINF:-1 tvg-chno="22.4" tvg-name="Quest",Quest http://192.168.80.9:5004/auto/v22.4?duration=7200 #EXTINF:-1 tvg-chno="24.1" tvg-name="CIVS-HD",CIVS-HD http://192.168.80.9:5004/auto/v24.1?duration=7200 #EXTINF:-1 tvg-chno="31.1" tvg-name="WNNE-HD",WNNE-HD http://192.168.80.9:5004/auto/v31.1?duration=7200 #EXTINF:-1 tvg-chno="33.1" tvg-name="VPBS-1",VPBS-1 http://192.168.80.9:5004/auto/v33.1?duration=7200 #EXTINF:-1 tvg-chno="33.2" tvg-name="VPBS-2",VPBS-2 http://192.168.80.9:5004/auto/v33.2?duration=7200 #EXTINF:-1 tvg-chno="33.3" tvg-name="VPBS-3",VPBS-3 http://192.168.80.9:5004/auto/v33.3?duration=7200 #EXTINF:-1 tvg-chno="33.4" tvg-name="VPBS-4",VPBS-4 http://192.168.80.9:5004/auto/v33.4?duration=7200 #EXTINF:-1 tvg-chno="35.1" tvg-name="CFJP-DT",CFJP-DT http://192.168.80.9:5004/auto/v35.1?duration=7200 #EXTINF:-1 tvg-chno="44.1" tvg-name="WFFF-DT",WFFF-DT http://192.168.80.9:5004/auto/v44.1?duration=7200 #EXTINF:-1 tvg-chno="44.2" tvg-name="CourtTV",CourtTV http://192.168.80.9:5004/auto/v44.2?duration=7200 #EXTINF:-1 tvg-chno="44.3" tvg-name="Bounce",Bounce http://192.168.80.9:5004/auto/v44.3?duration=7200 #EXTINF:-1 tvg-chno="44.4" tvg-name="Antenna",Antenna http://192.168.80.9:5004/auto/v44.4?duration=7200 #EXTINF:-1 tvg-chno="47.1" tvg-name="CFHD-DT",CFHD-DT http://192.168.80.9:5004/auto/v47.1?duration=7200 #EXTINF:-1 tvg-chno="57.1" tvg-name="MLPBSHD",MLPBSHD http://192.168.80.9:5004/auto/v57.1?duration=7200 #EXTINF:-1 tvg-chno="57.2" tvg-name="NHK-WOR",NHK-WOR http://192.168.80.9:5004/auto/v57.2?duration=7200 #EXTINF:-1 tvg-chno="57.3" tvg-name="MLKIDS",MLKIDS http://192.168.80.9:5004/auto/v57.3?duration=7200 #EXTINF:-1 tvg-chno="62.1" tvg-name="CJNT",CJNT http://192.168.80.9:5004/auto/v62.1?duration=7200
Updated by th0ma7 ^ over 3 years ago
Heads-up, I had also sent out a support request to sillicondust in order to modify hdhomerun firmware to have a lineup.m3u page on top of the existing lineup.json.
I've received a positive return on my request which will be passed along to the development team and see if it can be accomodated.
So never know, in turn this feature request in TVH may not be needed afterwads? I'll follow-up if things turns out positively.
Updated by th0ma7 ^ about 2 years ago
Thnx for your feedback @pierra but, as I wrote more than a year ago SilliconDust had said they would look into it, and indeed they did Look for Release 20221023 info at https://www.silicondust.com/support/downloads/firmware-changelog/
It is now possible to connect to HDhomeRun using native IPTV with http://<IP>/lineup.m3u from tvheadend. This in turns allows auto-detecting channels and with the recent patch from Michael Marley https://github.com/tvheadend/tvheadend/commit/1a437c88ea35d28e235b76bf890b227d60e84db4 it even finds the channel number properly. As such, nothing specific is needed anymore to fetch data properly from TVH which honestly is fantastic!
Over the last week I've updated Synology builds using the latest snapshot in order to make this default https://synocommunity.com/package/tvheadend
All in all, to me the problem is entirely resolved at source with no change needed anymore in TVH. Cheers!
Updated by Mark Clarkstone about 2 years ago
- Status changed from New to Fixed
th0ma7, you were hit by spam that I removed, sorry about that. However as you've said this feature has now been implemented I'll mark it as fixed
Updated by Pierrea suncion about 2 years ago
The easiest would be the following:
- Use IPTV automatic
- Use hdhomerun json mapping URL such as http://<IP>/lineup.json
- Modify TVH to support JSON on top of M3U
Other alternative could be:
- Create a .js script similar to https://gist.github.com/caseyavila/f37abe5490d4abfc83a75e65056bda6c/ https://www.myccpay.win/
- Have the ability to call that page from the IPTV Automatic using http://localhost:9981/hdhomerun.html
- that page would provide a M3U listing of all LAN hdhomerun for TVH to use