xmltv grabber solution for Tvh and North America...


  • You can try deleting the sdcache.db that should be in the folder. That may be holding on to the old channel list.

    Also - if youre manually running this, the xmltv.xml file is going to be generated in the main addon folder (.kodi/addons/tools.module.sd2xmltv). When you run it from within tvh - that file will be placed under the userdata/addon_data/tools.module.sd2xmltv folder. tvh won't read the one in the main folder. However, as a test - you can copy it over from the main folder to the user_data folder - then restart and see if tvh can see the epg source in the channels tab.

    I think your on to something there with the xmltv.xml file needing to be in the TVH folder. I re-ran the code for local channels only but included the -o tag to output the file directly to the TVH folder, versus moving it over after the fact. I checked TVH again and the log showed it was successful in pulling the xmltv.xml file.

    I did delete the sdcache.db file and re-ran the code with the Verizon channel list, but it once again froze in place with the RPI having a constant RED/GREEN LED on. I feel like we are close....


  • what happens if you run the internal grabber within tvh?

    Thats what I did. Within the TVH interface, under Internal Grabber > Module > there is Disabled and XMLTV for sd2xmltv.

    The TVH log was successful in pulling the data from the xmltv.xml file that was generated from the python script with the OTA EPG data.

    I have no idea what to do next though to test to see if I can even see the EPG data.

    As it stands right now, I have exceeded the maximum amount of attempts to retrieve guide data from SD - which is currently 6. I must now wait 24 hours before I can re-attempt the Verizon EPG pull using the script.

    Alas, the issue will rest until tomorrow.

  • If you don't want to wait to continue testing - you could use a second email to start a 7 day trial.

    As far as the next steps - in tvh do you know how to connect the channel to the epg source?

    If not, go to the web interface, go to the CONFIGURATION > CHANNEL/EPG > CHANNELS tab
    Then for a given channel row, double click the epg source column area and a drop will show up with the available channels that were loaded from the xmltv.xml file.

    You can look about 6 minutes into this video to see what the data field should look like for the epg source. (this example is using zap2xml not sd2xmltv - but the concept is the same) Installing zap2it grabber in OpenELEC - YouTube

    If you let me know your zip code - I can try to download a verizon sample xmltv.xml file and send it to you to test. That way you can put it in the main sd2xmltv folder and setup the channels - then you can see it the system starts populating tomorrow.


  • If you don't want to wait to continue testing - you could use a second email to start a 7 day trial.

    As far as the next steps - in tvh do you know how to connect the channel to the epg source?

    If not, go to the web interface, go to the CONFIGURATION > CHANNEL/EPG > CHANNELS tab
    Then for a given channel row, double click the epg source column area and a drop will show up with the available channels that were loaded from the xmltv.xml file.

    You can look about 6 minutes into this video to see what the data field should look like for the epg source. (this example is using zap2xml not sd2xmltv - but the concept is the same) Installing zap2it grabber in OpenELEC - YouTube

    If you let me know your zip code - I can try to download a verizon sample xmltv.xml file and send it to you to test. That way you can put it in the main sd2xmltv folder and setup the channels - then you can see it the system starts populating tomorrow.

    Thank you, I pm'ed you

  • Let's try this version and run the command line info for the hdhomerun channel filtering: forum.libreelec.tv/core/attachment/790/  use version in post LibreELEC

    If you know the ip address of your hdhomerun...try to ssh in and run the command line as follows (from the main tools.module.sd2xmltv folder) :

    python sd2xmltv.py -u sdusername -p sdpassword -v ###.###.###.###

    Where the numbers represent the ip address of your hdhomerun. If you don't know the address replace the numbers with the word discover

    If that works - we'll just need to change the grabber to run with the -v command.

    If that doesn't work - I'll try to send you a version of the sd2xmltv.py file with a few whitelisted call signs and we can see if that works.

    Edited once, last by edit4ever (January 4, 2017 at 3:35 PM).

  • script.schedules.direct is an interesting addon. I downloaded and set it up and it was able to get basic schedule info - program title and description. Schedules direct has a lot more information in their metadata (season info, genre, original air date, etc) so I've asked the author if he plans to implement those. I've also pinged the author of sd2xmltv to see if he could incorporate the kodi addon features of script.schedules.direct. If I get time in the next few weeks - I may attempt to combine them.

    As for the automation - I saw that the settings screen for script.schedules.direct has an update feature. I set mine to 6 hours - I'll let you know if it updates on it's own. The tvh cron is already setup for updating every 12 hours, so you shouldn't have to do anything there.

    You don't have to move the xmltv file - you can let the system just put it in the script.schedules.direct userdata folder. The key to automatically connecting this to your tvh setup is in the tvh addon settings. But first you need to turn on the ability to see hidden files/directories in kodi. If you're running kodi 17 it's under media settings > general. Once you turn on hidden files/directories you can go back to the tvh addon settings and select the xmltv source as file and then navigate to the /storage/.kodi/userdata/adonn_data/script.schedules.direct folder. After that, just make sure that the internal xmltv grabber is enabled in the tvh web interface and when you rerun the internal grabber it should load the xmltv.xml file and then you can set the channels epg source.

    If we can get the the full info available in the sd2xmltv addon combined with the easy to use kodi interface of the script.schedules.direct addon - this will be a very powerful and legitimate way to get great tv guide data!

  • updated beta with missing utils folder.

    forum.libreelec.tv/core/attachment/795/    use version in next post

    There is an hdhomerun feature that will filter channels based on your hdhomerun configuration. Run the command as:

    python sd2xmltv.py -u USERNAME -p PASSWORD --hdhomerun discover

    If this works for you, you can edit the tv_grab_sd2xmltv file changing line 32 to:

    python $ADDON_DIR/sd2xmltv.py -u $USERID -p $PASSWORD --hdhomerun discover> sd2xmltv.log 2>&1

    Or replace discover with your hdhomerun ip address if you know it.


    I'm working on configuring a kodi settings setup for this similar to what I did with zap2xml.

    Edited once, last by edit4ever (January 4, 2017 at 3:34 PM).

  • I've created a test version of Astrilchuk's sd2xmltv addon with the following additional kodi options:

    • set number of days to download
    • enable hdhomerun channel filtering
    • enable file based channel filtering


    These options existed in the command line version of sd2xmltv - but this is easier for most people to configure.

    Here is test version: tools.module.sd2xmltv-0.1.3beta.zip

    To use the hdhomerun channel filtering:

    • Install the addon
    • Open the configure screen
    • Enter your SD login credentials
    • Set the number of days to download from 1-14
    • Set the hdhomerun option to discover or ip (discover searches your network for your hdhomerun)
    • If you know your hdhomerun ip address, select ip and you can enter it
    • Continue normal grabber setup in tvheadend for the sd2mltv grabber (may require a reboot to see grabber)


    -- you may need to follow the lineup configuration mentioned in this post: LibreELEC

    To use the file based channel filtering:

    • Install the addon
    • Open the configure screen
    • Enter your SD login credentials
    • Leave the number of days to download at 0
    • Continue normal grabber setup in tvheadend for the sd2mltv grabber (may require a reboot to see grabber)
    • -- you may need to follow the lineup configuration mentioned in this post: LibreELEC
    • Once grabber has run it will not generate program listings - but will pull the lineup channels
    • A new file called filter.cfg will be created in the /userdata/addon_data/tools.module.sd2xmltv folder
    • Open this file with a text editor and follow the included instructions to move channels to to either included or excluded section
    • Save and close the file
    • You can return to the kodi sd2xmltv addon configure screen and set the number of days to download from 1-14
    • From the tvheaded web interface - rerun the internal grabber or reboot - this should now download program data for the channels you moved to the included list in the filter.cfg file

    I'm hoping if this works (please post if you have errors) so I can move on to building a kodi configure screen for the filter.cfg file. Then channels can be added and removed from within kodi.

    * One additional note - for testing I had to hardcode the the logging.cfg path due to issues I was having. I don't believe this will cause any issues for LE users.

    Edited once, last by edit4ever (January 4, 2017 at 6:39 PM).

  • I'm new here but I can't get this to work. I'm using the latest stable release of LE and I have a HDhomerun Prime setup as an automatic IPTV network. I'm getting the following error when I try to run the grabber. It looks like the file is not being created. How can I tell if the add-on is accessing SD to pull the xml file?

    2017-01-04 09:26:48.323 spawn: Executing "/storage/.kodi/addons/tools.module.sd2xmltv/bin/tv_grab_sd2xmltv"
    2017-01-04 09:26:50.793 spawn: cat: can't open 'xmltv.xml': No such file or directory
    2017-01-04 09:26:50.794 xmltv: /storage/.kodi/addons/tools.module.sd2xmltv/bin/tv_grab_sd2xmltv: no output detected
    2017-01-04 09:26:50.794 xmltv: /storage/.kodi/addons/tools.module.sd2xmltv/bin/tv_grab_sd2xmltv: grab returned no data

    Edited once, last by djn04 (January 4, 2017 at 5:32 PM).


  • Can you share the contents of the sd2xmltv.log file in the userdata/addon_data/tools.module.sdxmltv folder?

    The file exists, but it's empty. Is there something that needs to be done to run the script from within koi? I just enabled it and then enter my SD credentials. I've tried disabling and enabling it, but nothing seems to happen.

    Thanks.

  • The file exists, but it's empty. Is there something that needs to be done to run the script from within koi? I just enabled it and then enter my SD credentials. I've tried disabling and enabling it, but nothing seems to happen.


    You need to log into the tvheadend web interface and setup the sd2xmltv grabber as enabled. Then reboot - the grabber should run after a few minutes (you can watch the log window at the bottom) when it finishes, you will need to connect the epg source for the channels under the CONFIGURATION > CHANNELS/EPG > CHANNELS tab. Once you have connected the epg source for each channel you can rerun the internal grabber from the CONFIGURATION > CHANNELS/EPG > EPG GRABBER tab and it should donwload the program data.

  • You need to log into the tvheadend web interface and setup the sd2xmltv grabber as enabled. Then reboot - the grabber should run after a few minutes (you can watch the log window at the bottom) when it finishes, you will need to connect the epg source for the channels under the CONFIGURATION > CHANNELS/EPG > CHANNELS tab. Once you have connected the epg source for each channel you can rerun the internal grabber from the CONFIGURATION > CHANNELS/EPG > EPG GRABBER tab and it should donwload the program data.

    Thanks for all the help here. I looked at the log file again. Here are the contents. It looks like SD is reporting not subscribed to any lines, but I have added my lineup to my account.

    2017-01-04 09:46:10,332 sd2xmltv INFO Getting SchedulesDirect token.
    2017-01-04 09:46:10,974 sd2xmltv INFO Getting SchedulesDirect status.
    2017-01-04 09:46:11,406 sd2xmltv WARNING Account will expire on 2017-01-07 16:09:06 (2 days).
    2017-01-04 09:46:11,408 sd2xmltv INFO SchedulesDirect last update at 2017-01-04 13:40:57 (4 hours 5 minutes ago).
    2017-01-04 09:46:11,408 sd2xmltv INFO Message: No known issues.
    2017-01-04 09:46:11,409 sd2xmltv INFO Not subscribed to any lineups, exiting.

  • OK I see - this grabber uses a different lineup as it pulls from the SD JSON service. There are two ways to set this up.

    First - if you know how to ssh into your system - navigate to the /storage/.kodi/addons/tools.module.sd2xmltv folder and run the following command:

    python sd2xmltv.py - u USERNAME - p PASSWORD -m (replace USERNAME and PASSWORD with your credentials)

    This should bring up the lineup configuration prompts...just follow along and when you are done you can exit and rerun the internal grabber from the tvh web interface.

    The second way is to temporarily add a different addon that has a kodi based lineup configuration for schedules direct. I'm going to try to work this into the sd2xmltv addon - but for now you can load the addon, run the lineup setup and then disable the addon when finished. It will have saved the lineup settings in the SD json servers. -- note you may want to set the number of days to download to 0 or 1 as you don't really want this addons data.

    Here is the link to that addon: script.schedules.direct-master.zip

    One of those two methods should get your lineup setup in the SD servers.

    Edited once, last by edit4ever (January 4, 2017 at 6:16 PM).

  • Also on the Account Support page at SD it says "Warning - Unable to fetch SD-JSON lineups."
    [hr]
    I'm making some progress. Here is the log contents. Could it be that I've reached the maximum download requests?

    2017-01-04 10:39:08,685 sd2xmltv INFO Getting SchedulesDirect token.
    2017-01-04 10:39:09,360 sd2xmltv INFO Getting SchedulesDirect status.
    2017-01-04 10:39:09,846 sd2xmltv WARNING Account will expire on 2017-01-07 16:09:06 (2 days).
    2017-01-04 10:39:09,848 sd2xmltv INFO SchedulesDirect last update at 2017-01-04 13:40:57 (4 hours 58 minutes ago).
    2017-01-04 10:39:09,848 sd2xmltv INFO Message: No known issues.
    2017-01-04 10:39:09,850 sd2xmltv INFO Getting station/channel mappings for 1 lineups.
    2017-01-04 10:39:10,586 sd2xmltv INFO Getting schedule hashes...
    Killed

    Edited once, last by djn04 (January 4, 2017 at 6:57 PM).

  • OK - the killed message has to do with too much data trying to be downloaded. I'm guessing you have a cable channel lineup (likely hundreds of channels) -- you'll need to use the channel filter to lower the number. Now that you have a lineup set - you can disable the script.schedules.direct addon and return to setting up the sd2xmltv grabber.

    In the kodi addons - set the sd2xmltv days to download to 0. Since you're using an HDHomerun - you can set that channel filter to discover. Now since I don't have one of those devices - I've been unable to test this setting...but let's see what happens. File based channel filter should be off.

    In the tvh web interface - try to run the sd2xmltv grabber and see what happens.

  • I'm getting the same results. It returns the same log.

    The Tvheadend logs show:

    2017-01-04 14:33:34.985 spawn: Executing "/storage/.kodi/addons/tools.module.sd2xmltv/bin/tv_grab_sd2xmltv"
    There seems to be a problem with the live update feed from Tvheadend.
    Trying to reconnect...Reconnected to Tvheadend
    2017-01-04 14:40:03.564 spawn: cat: can't open 'xmltv.xml': No such file or directory
    2017-01-04 14:40:03.593 xmltv: /storage/.kodi/addons/tools.module.sd2xmltv/bin/tv_grab_sd2xmltv: no output detected
    2017-01-04 14:40:03.593 xmltv: /storage/.kodi/addons/tools.module.sd2xmltv/bin/tv_grab_sd2xmltv: grab returned no data

    Edited once, last by djn04 (January 4, 2017 at 10:42 PM).