tvheadend, ATSC and epg...

  • This is brilliant! Many thanks for all the work. As a rookie user, I got brave last night and installed the script on my NUC w/LibreELEC 7.0.3 on USB2 and after a little configuration on the TVHeadEnd web screen I was overjoyed! I also have a tuner and TVHeadEnd (v.4.0.9) installed on an older Intel motherboard that I use running Ubuntu 16.04LTS Desktop with Samba to serve my library and OTA (antenna TV streams) to other laptops on the network and attempted the script installation there (yes, I understand that the script is for Open/Libre and NOT other Kodi platforms such as this.) Things look fine until I ask for the XMLTV module under TVHeadEnd web page at Configuration>Channel/EPG>EPG Grabber>Module. Available there is 'Disabled' and 32 other XMLTV listings, but 'tv_grab_zap2xml' doesn't show. I understand that I may be asking for the impossible here, but would there possibly be a simple fix so that the module would show and the EPG be available to the laptops? I know that this is asking a lot and is somewhat unrelated to the thread here, but... if you don't ask, the answer is always 'no'. Many thanks again.

  • @pvchandler glad it worked for you!

    To get the grabber running on a non-LE system...I think the key is determining where to install the grabber file and making sure it is executable. Do a search on the ubuntu system for the tv_grab_zap2xml file. If it is installed in the appropriate kodi addon folder it is likely just an issue with permissions. Check to see if the file is executable. If not, use the chmod +x command to make the file executable. Then reboot and see if the grabber shows up in tvheadend.

    Edited once, last by edit4ever (April 25, 2017 at 11:33 PM).


  • @pvchandler glad it worked for you!

    To get the grabber running on a non-LE system...I think the key is determining where to install the grabber file and making sure it is executable. Do a search on the ubuntu system for the tv_grab_zap2xml file. If it is installed in the appropriate kodi addon folder it is likely just an issue with permissions. Check to see if the file is executable. If not, use the chmod +x command to make the file executable. Then reboot and see if the grabber shows up in tvheadend.


    Thanks for the quick reply!
    Searching (Nautilus) for hidden files/folders from any given point (CTRL-H) shows...

    On the known good LibreELEC 7.0.3/USB drive, find: /media/paul/Storage/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml. Looking at permissions here, under 'owner' and 'group' it shows 'root' and the check mark for 'Execute'.

    On the Ubuntu 16.04LTS Desktop, find: /home/paul/.kodi/addons/script.module.zap2xml/bin/tv_grab_zap2xml. Location is probably correct, and permissions show Owner as Me, and Group as Paul; all 'Read and write' and I was able to simply click the box for the check mark (Execute: x Allow executing file as a program). I believe that this check box is the same as 'chmod +x'.

    TVHeadEnd still not pulling in the new module.

    Two guesses here: either file needs to be changed to 'root' (I don't know how to to that) or these 32 other XMLTV listings are interfering (unknown how they got there or how to delete.)

    Another offshoot idea I've had (might try tomorrow) is to create a new USB drive for that 'Desktop/server' computer; bootable running LibreElec, and share drives/files from there via its internal Samba, then having the laptops point there for shared files and TV stream. In other words, I'm not demanding that that computer run Ubuntu as it currently is. Thanks again,
    Paul.

  • You're probably correct on the permissions issue. Tvheadend is pretty particular on that. You could try to search for one of the other (32) grabber files and see what the permission settings are on that.

    If you're only using the system as a tv/streaming backend - I think installing LE would serve you well as it is lighter weight than a full ubuntu install. I use my raspberry pi for my tvheadend and video file backend and stream it to many different devices. You can customize the samba share so that you can easily access any files/folders you want.

    Of course - the other option is to run the zap2xml addon on a different syste and just tell your ubuntu install to look at that other system for the xmltv.xml file. Lots of options. :)


  • You're probably correct on the permissions issue. Tvheadend is pretty particular on that. You could try to search for one of the other (32) grabber files and see what the permission settings are on that.

    If you're only using the system as a tv/streaming backend - I think installing LE would serve you well as it is lighter weight than a full ubuntu install. I use my raspberry pi for my tvheadend and video file backend and stream it to many different devices. You can customize the samba share so that you can easily access any files/folders you want.

    Of course - the other option is to run the zap2xml addon on a different syste and just tell your ubuntu install to look at that other system for the xmltv.xml file. Lots of options. :)

    Just a quick update... I ditched the Ubuntu idea (Ubuntu remains on HD,) and created a new LE stick (just a 2G USB2) which lets me 'serve' from that desktop, and still have Ubuntu which I will continue to use for my weekly backups and other functions. With that computer and it's tuner card running LE 8.0.1 I'm even getting used to Estuary! All of my media is now served from this small/light OS, and also serves the TV streams and now the EPG. Of course all of the addresses (links) needed to be updated, as well as cleaning/rebuilding libraries, but certainly worth the effort. I'll use another desktop in the bedroom which will not only deliver all the media, but allows me to have a (mostly) zero cost TV tuner for an old analog-tube TV, and with this one machine it will stream all media. Your script 'completes the package' making LE/Kodi a full media system.
    During the summer I enjoy movies/TV while sunbathing, and having my laptop(s) point to this new server function, its now better than ever and I'm thrilled.
    My living room media player is an older desktop, and because I fell in love with the Neon skin (sounds like that won't be updated to the newer Kodi versions (but there are lots of skins...)) so I have OE6.0.3 w/Kodi 15.2 and Neon running there on USB. The script hasn't failed on any of these installations, so I'll agree with the others that it's where it needs to be and I (personally) would like to see it published for the users in U.S. Thanks again and congratulations (to all) on some truly impressive software. I'm indebted.... ;)

  • Been a while, but thought I'd check in once more just to confirm with you.....

    My tvguide.xml file has been updating without any issues. My guess is this is a releasable version (assuming you haven't already done so).

    Great work and appreciate the effort.

    Thx again and cheers....


  • Thanks. I didn't realize this is for when the tvh server runs on the kodi box. Mine runs on my synology. Is there a way to get this to work on there?

  • My xmltv.xml was generated but stopped in middle. All channels were printed, but only couple of lines of programs got printed.

    I got this error in zap2xml.log

    Edited once, last by HighAvail (May 10, 2017 at 2:52 AM).

  • If this is the first time you are trying to run this - try turning off the xtra details option for now. It seems there is some bad data in there, so let's make sure you can first get a standard grid loaded.

    Would also help to know how many days you're trying to download, what lineup your using and how many channels.


  • If this is the first time you are trying to run this - try turning off the xtra details option for now. It seems there is some bad data in there, so let's make sure you can first get a standard grid loaded.

    Would also help to know how many days you're trying to download, what lineup your using and how many channels.

    Yes first time.

    Here is channel line up (Chicago OTA broadcast). 7 Days. All (not just faves). Extra details enabled.

    I will enable faves only, also reduce number of days (currently 7) to 5 and disable extra details and try.
    [hr]
    Here are two more observations.
    - xmltv.xml got populated overnight (probably on second run). This was with: all channels (faves only disabled), 7 days, with extra details.
    - I then enabled 'faves only', set to 5 days, disabled extra details. The xmltv.xml got updated successfully.

    So the zap2it add on is working now. Probably it was bad data which threw python off track.

    I then uninstalled the tvheadend4.2 (service) and deleted the userdata for tvheadend42. Re configured the tvheadend (service) 4.2. This time I disabled all OTA grabbers and kept zap2it enabled. The EPG grid in TV->Guide is empty even though xmltv.xml is populated. I am probably missing some setting. I will read rest of the posts here to find, but if you have quick tip help.

    Awesome add-on by the way, in xmltv.xml, i can see the guide data, lot of good data pulled in by addon.
    Thanks and appreciate your effort.

    Edited once, last by HighAvail (May 10, 2017 at 2:10 PM).

  • I read your thread from beginning and found the solution. I went to Configuration->EPG/Channels. I found that that EPG Source options were empty initially. After couple of reboots (or perhaps just waiting 10-15 min), I saw EPG Source options were populated. I set a few channels to Zap2it. But the TV->Guide was still empty. After annother couple of boots (or waiting a few minutes, not sure which) the TV-Guide got populated.

    Awesome, Awesome. I have now enabled extra details, also increased days to 7. No issues till now, I can see details in TV->Guide. I have still kept "faves only" enabled and I have about 30 channels as favorite on Zap2it site (so pulling data of 30 channels instead of 80+).

    Thanks

    Edited once, last by HighAvail (May 10, 2017 at 8:12 PM).

  • Glad to hear it's working! The epg in kodi sometimes needs a reboot in order to update after a manual grab of the guide in tvheadend - but it looks like you've discovered that.

    As an FYI - the grabber will run again everytime you reboot (usualy within a few minutes) - you can also change the times that it runs automatically in tvheadend. By default it runs twice a day at 00:04 and 12:04 - which is more than enough to keep stable updates running. I usually recommend that folks slightly adjust those numbers so we all don't hit the server at the same time! You do that in the tvheadend web interface under the CONFIGURATION > CHANNEL/EPG > EPG GRABBER tab in the multi-cron area that contains this:

    Code
    # Default config (00:04 and 12:04 everyday)
    4 */12 * * *

    For reference - the digits are as follows:

    Code
    # * * * * * command to execute
    # ┬ ┬ ┬ ┬ ┬
    # │ │ │ │ │
    # │ │ │ │ │
    # │ │ │ │ └───── day of week (0 - 6 or Sunday - Saturday)
    # │ │ │ └────────── month (1 - 12)
    # │ │ └─────────────── day of month (1 - 31)
    # │ └──────────────────── hour (0 - 23)
    # └───────────────────────── min (0 - 59)

    Just change the hour and/or minute in the cron multi-line to adjust and then hit save. (note the hour is currently set to twice a day by using */12 - star means any match - more details here: EPG Grabber - Tvheadend 4.0)

    I'm just started working on a kodi addon to setup and configure tvheadend without having to use the web interface. This will make it a lot easier for people - but I'm having to figure out all the tvh apis as there isn't any documentation. Hoping to have something for folks to test in the next few weeks.

    Edited once, last by edit4ever (May 11, 2017 at 6:40 AM).

  • Just a heads up... if you're running OSMC, then you could have just installed pearl, then the regular zap2xml and needed files. I believe edit4ever's version is specifically for LibreELEC/OenELEC, where you can't install pearl.