Schedules Direct for Tvheadend addon


  • Nothing to forgive - we were all noobies once!

    Unfirtunatley, my addon is built for a kodi system running as the backend for tvheadend. {snip}

    "I see" said the blind man as the teeter-totter tilted...

    For some mistaken reason I always thought of Kodi as a front end, and never considered it for a back end. Perhaps it's because of all the add-ons people keep saying that are needed for Kodi to do this or that.

    Anyway, thanks for straightening out how the animals are caged in the zoo.

  • For a media server/pvr Kodi and LE make a great back end. Nice lightweight install, you can still ssh in if you run headless and if you want, you can use it as both backend and frontend for your system - which gives you an extra viewing device.

    Good luck!

  • I'm having an issue with this addon. It doesn't seem to be picking up anything.

    I ran the addon on my backend computer and set all of the options. I then reboot my backend three or four times.

    I then went into TVH and set TV_GRAB_SD4TVH as the only active grabber and set it's priority to 1.

    I then reboot the backend a couple of more times.

    Back in TVH when I look at the log I see this:

    2017-06-17 09:20:48.000 xmltv: /storage/.kodi/addons/script.module.sd4tvh/bin/tv_grab_sd4tvh: grab /storage/.kodi/addons/script.module.sd4tvh/bin/tv_grab_sd4tvh

    2017-06-17 09:20:48.007 spawn: Executing "/storage/.kodi/addons/script.module.sd4tvh/bin/tv_grab_sd4tvh"

    2017-06-17 09:20:51.125 spawn: cat: can't open 'xmltv.xml': No such file or directory

    2017-06-17 09:20:51.126 xmltv: /storage/.kodi/addons/script.module.sd4tvh/bin/tv_grab_sd4tvh: no output detected

    2017-06-17 09:20:51.126 xmltv: /storage/.kodi/addons/script.module.sd4tvh/bin/tv_grab_sd4tvh: grab returned no data

    If I look at EPG grabber channels I only see my old zap2xml channels.

    I'm kinda stuck.

    ***update***

    I found the sd4tvh.log. Here it is

    2017-06-17 09:35:47,248 sd4tvh INFO Getting SchedulesDirect token.

    2017-06-17 09:35:47,546 sd4tvh INFO Getting SchedulesDirect status.

    2017-06-17 09:35:47,682 sd4tvh WARNING Account will expire on 2017-06-24 12:38:38 (6 days).

    2017-06-17 09:35:47,682 sd4tvh INFO SchedulesDirect last update at 2017-06-17 06:18:47 (7 hours 17 minutes ago).

    2017-06-17 09:35:47,683 sd4tvh INFO Message: No known issues.

    2017-06-17 09:35:47,684 sd4tvh INFO Getting station/channel mappings for 1 lineups.

    2017-06-17 09:35:47,698 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,699 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,699 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,700 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,701 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,701 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,702 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,704 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,705 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,706 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,707 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,708 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,709 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,711 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,712 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,713 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,714 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,714 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,715 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,716 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,716 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,717 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,717 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,718 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,719 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,719 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,720 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,720 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,721 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,722 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,722 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,723 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,723 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,724 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,725 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,725 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,726 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,727 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,727 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,728 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,728 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,729 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,730 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,730 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,731 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,732 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,732 root WARNING Key(s) not processed for Station: stationLogo

    2017-06-17 09:35:47,755 sd4tvh INFO Getting schedule hashes...

    Traceback (most recent call last):

    File "/storage/.kodi/addons/script.module.sd4tvh/sd4tvh.py", line 407, in <module>

    main()

    File "/storage/.kodi/addons/script.module.sd4tvh/sd4tvh.py", line 403, in main

    app.process()

    File "/storage/.kodi/addons/script.module.sd4tvh/sd4tvh.py", line 112, in process

    schedule_hash_list = self._sd.get_schedule_hash_list(station_ids)

    File "/storage/.kodi/addons/script.module.sd4tvh/libschedulesdirect/schedulesdirect.py", line 201, in get_schedule_hash_list

    schedule_hash_list = [(station_id, parse_date(date), result[station_id][date]["md5"]) for station_id in result for date in result[station_id]]

    File "/storage/.kodi/addons/script.module.sd4tvh/libschedulesdirect/__init__.py", line 17, in parse_date

    return date(*map(int, d_str.split(u"-")))

    TypeError: Required argument 'month' (pos 2) not found

  • The log shows an error in trying to grab a specific station schedule...it seems that the date format got messed up - which is weird.

    Nothing on the schedules direct site has indicated that they made a change. I will do some testing.

    Can you provde the zip and name of the lineup that you are using so I can check the data?

  • The log shows an error in trying to grab a specific station schedule...it seems that the date format got messed up - which is weird.

    Nothing on the schedules direct site has indicated that they made a change. I will do some testing.

    Can you provde the zip and name of the lineup that you are using so I can check the data?

    I'm at 28203 and I'm using the antenna listings. But I made these changes (from the initial post) and things seem to be working now.

    If you have an HDHomerun setup

    select Discover or IP in the HDHomerun Channel Filter

    Discover - should find your device on the network

    IP - if you know the hdhomerun ip address you can enter it here

    Disable the File Based Channel Filter setting

    I also changed the days to 1 and ran it.

    Now I'm getting ten days of schedule.

    Sorry for the possible false alarm.

    Could you explain why I had to configure it for my HDHOMERUN?

  • If you have an HDhomerun - the script gets the lineup/channel listing from the HDhomerun instead of using the schedules direct settings for lineup. That also means the channel filter option is not necessary as you have created your channel list with the hdromerun itself.

    When you get a chandce - please try adding more days and mnake sure the error doesn't return.

    Thanks!

  • Hi edit4ever it's time for my nightly done something wrong post.

    I have spent some time this evening trying to set this up. I have followed all of the steps and seem to be failing at some point. I have an active sub at SD have installed your addon input my postal code (zip) selected my provider, selected channels i want to include and those that I don't i do not appear to have any errors or nothing that the addon showed me. but when I follow the tvheadend settings my log shows the below

    Code
    2017-07-17 22:35:15.000 xmltv: /storage/.kodi/addons/script.module.sd4tvh/bin/tv_grab_sd4tvh: grab /storage/.kodi/addons/script.module.sd4tvh/bin/tv_grab_sd4tvh
    Code
    2017-07-17 22:35:15.008 spawn: Executing "/storage/.kodi/addons/script.module.sd4tvh/bin/tv_grab_sd4tvh"
    Code
    2017-07-17 22:35:48.302 subscription: 0001: "epggrab" unsubscribing
    Code
    2017-07-17 22:38:46.656 spawn: cat: can't open 'xmltv.xml': No such file or directory
    Code
    2017-07-17 22:38:46.658 xmltv: /storage/.kodi/addons/script.module.sd4tvh/bin/tv_grab_sd4tvh: no output detected
    Code
    2017-07-17 22:38:46.658 xmltv: /storage/.kodi/addons/script.module.sd4tvh/bin/tv_grab_sd4tvh: grab returned no data
    Code
    2017-07-17 22:44:30.815 xmltv: /storage/.kodi/addons/script.module.sd4tvh/bin/tv_grab_sd4tvh: grab /storage/.kodi/addons/script.module.sd4tvh/bin/tv_grab_sd4tvh
    Code
    2017-07-17 22:44:30.822 spawn: Executing "/storage/.kodi/addons/script.module.sd4tvh/bin/tv_grab_sd4tvh"

    The last one of the above messages has been the last entry in the log for over ten minutes,

    Any ideas where I might have gone wrong?

    Thanks for you patience with a newbie.

  • I assume you have a very large channel list as you have a cable/satellite lineup?

    Couple of things first - I assume you have set the username and password in the sd4tvh addon settings?

    Also - to get up and running for testing - go ahead and set the number of days to download to 1 - so the amount of data is limited for now.

    And make sure you have File based Channel filter enabled in the addon setting as well.

    Assuming all of those things are true...check in the tvh settings (using either my tvh2kodi addon or in the tvhweb interface) to see if you can select an epg source for any a channel. Doesn't matter what channel for this test.

    One final thing - do you know how to grab your kodi.log file? There may be some more information in there.

  • in that case - ignore my suggestions above!!! :)

    Glad you have it going. Schedules DIrect is the best data set!! At some point I have to go back to that addon and put int he xtra details option that I built for my zap2xml addon. This allows you to put extra info into the description field, so you can see things like original airdate/new/live/etc in the Estuary skin.

  • Hi edit4ever

    I have a problem where if I run with one provider I.E virgin all works ok but if I add a second one in I.E BSKYB then it stops working, if I remove the second one it starts working again, any ideas

    Thanks

  • Possibly an issue with the channel filter - I don't think I had checked if that works with multiple lineups. Any chance you can turn off the channel filter option and see if it that solves it?

  • edit4ever

    I have just installed TVHeadend and your two addons on my both my Raspberry pi’s, as I needed schedules direct and an easier way to scan channels. It now completes the setup as being a set top box. Many many thanks to you for your addons, as this makes the whole setup seamless.

    I know this is meant for support, but wanted to give thanks where it’s due

  • alimac01 one other thing - if you want to use the channel filter (to speed up downloads) just make sure your set it up for each lineup you add. When you go into the add/remove channels function of the addon - it will ask you which lineup you want to edit. You will need to run it for all lineups in order for it to work. Ii may have defaulted to excluding all channels in one of your lineups when you added the other.