(OLD) Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Kodi Community Development

Moderator: TVJunkie198

Locked
mxlance
Posts: 70
Joined: Sun Aug 20, 2017 10:28 am

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by mxlance » Sat Dec 01, 2018 5:15 pm

Looks great here on both Krypton and Leia.
Thank you and thank your family. :P

djp952
Posts: 958
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Sat Dec 01, 2018 8:40 pm

gamaru wrote:
Sat Dec 01, 2018 3:14 pm
Just wanted to follow up with what happened the other day to me.

I installed a fresh copy of Krypton on my Ubuntu 18.04 and I still get guide issues.

This is a copy of what I see in my log:

Code: Select all

17:11:34.095 T:139860308391680   ERROR: AddOnLog: HDHomeRun DVR PVR Client: try_getepgforchannel failed due to an exception: http request on [http://api.hdhomerun.com/api/guide?DeviceAuth=xxxxxxxxxxxxxxxxx&Channel=500&Start=1543687879] failed: Timeout was reached (1)
17:11:34.095 T:139860308391680   ERROR: AddOnLog: HDHomeRun DVR PVR Client: GetEPGForChannel: Multiple failures were encountered accessing EPG data; EPG functionality is temporarily disabled
17:11:34.095 T:139860308391680   ERROR: PVR - GetEPGForChannel - addon 'zuki.pvr.hdhomerundvr:api.hdhomerun.com' returned an error: the command failed
17:11:34.095 T:139860308391680   ERROR: PVR - GetEPGForChannel - cannot get EPG for channel 'Barker 6 Quantu' from client '1037099430': the command failed
17:11:34.095 T:139860308391680   ERROR: EPG - Update - failed to update table 'Barker 6 Quantu'
And then it continues with the rest of my channels. Any advice is appreciated!
Is the "Timeout was reached (1)" typically present in the log like above? That indicates that the backend service didn't respond in time, I believe it's set to 5 seconds, and the web request timed out.

A few versions back SiliconDust requested that I put some type of a block in place since the PVR was slamming their backend when the end user wasn't authorized for the DVR subscription or the DeviceAuth codes have gone stale. Kodi was asking for the guide data over and over, and the PVR was trying to satisfy that but couldn't (you would see "HTTP 503: Unauthorized" in the logs, not a timeout). What I did to stop that was to add code that says if Kodi has asked for the same guide data multiple times, the DeviceAuth codes have been refreshed, and the backend still couldn't satisfy the request, stop asking for a while.

You're running into that block, the PVR is encountering errors getting to the guide data over and over so it just gives up for a while. In your case, it will pick up and try again at some point, but if the underlying concern wasn't resolved it will just go the same route on you.

So, let's see if we can figure out why you're timing out. What you can do is take that URL from the log and paste it into a web browser (Firefox is default on Ubuntu, right?) and you should get all kinds of readable text data back. The DeviceAuth codes are volatile and the StartTime has to be close to current, so here's what I suggest:
What happens? Do you get data back quickly, does it timeout, do you get any type of HTTP error? Hopefully it *doesn't* work right, because then we are looking at a systemic issue, perhaps even something as simple as turning off IPv6 or a bug/defect in Ubuntu. If it does work right through Firefox that could be a little harder since then we have a PVR specific issue :)

Let me also ask you this -- any problems with Kodi itself and internet activities like checking for Add-on updates or downloading other add-ons? There isn't much Kodi does out of the box on the Internet over HTTP .. perhaps maybe the Weather section? If you have that configured is it working normally?

Let me know -- I hope it's as easy as an OS configuration thing to solve for you.

djp952
Posts: 958
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Sat Dec 01, 2018 8:52 pm

mxlance wrote:
Sat Dec 01, 2018 5:15 pm
Looks great here on both Krypton and Leia.
Thank you and thank your family. :P
Anytime! I feel kinda bad about my response time on this one, I hope there weren't too many people that missed out on programs they are paying good money to watch this way because I didn't know to check a particular byte in the stream :(

In the future please PM me. I get PM notifications over e-mail. Using GitHub's "Issues" area also generates an e-mail notification for me. I frequently get myself caught up in 'real' work and don't necessarily come here to check on you guys as often as I should.

PS - Got my FireStick 4K today. Looking forward to trying it out, rumor has it that all the Kodi type issues like a lack of deinterlacing support are firmly in the past and this little thing is as good or better than a ShieldTV now for Kodi. Will report back at some point!

gamaru
Posts: 6
Joined: Wed Nov 28, 2018 9:20 am

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by gamaru » Sat Dec 01, 2018 9:05 pm

djp952 wrote:
Sat Dec 01, 2018 8:40 pm
What happens? Do you get data back quickly, does it timeout, do you get any type of HTTP error? Hopefully it *doesn't* work right, because then we are looking at a systemic issue, perhaps even something as simple as turning off IPv6 or a bug/defect in Ubuntu. If it does work right through Firefox that could be a little harder since then we have a PVR specific issue :)

Let me also ask you this -- any problems with Kodi itself and internet activities like checking for Add-on updates or downloading other add-ons? There isn't much Kodi does out of the box on the Internet over HTTP .. perhaps maybe the Weather section? If you have that configured is it working normally?

Let me know -- I hope it's as easy as an OS configuration thing to solve for you.
Thanks for taking time out of your day and with your family for the prompt response.

When I copy the URL with the channels into Chrome, it comes back pretty quickly with the following response:

Code: Select all

[
    {
        "GuideNumber": "507",
        "GuideName": "WABCDT",
        "Affiliate": "ABC",
        "ImageURL": "http://img.hdhomerun.com/channels/US20453.png",
        "Guide": [
            {
                "StartTime": 1543712400,
                "EndTime": 1543725000,
                "Title": "College Football",
                "EpisodeTitle": "ACC Championship: Pittsburgh vs. Clemson",
                "Synopsis": "No. 2 Clemson aims for its fourth-straight ACC championship title when it plays Pittsburgh. The Tigers have made six conference finales, winning four, during the ACC championship game's 14-year history. Clemson seeks its first win versus Pittsburgh.",
                "Team1": "Pittsburgh",
                "Team2": "Clemson",
                "OriginalAirdate": 1543622400,
                "ImageURL": "http://img.hdhomerun.com/titles/C191261ENJPCF.jpg",
                "SeriesID": "C191261ENJPCF",
                "Filter": [
                    "Sports"
                ]
            },
            {
                "StartTime": 1543725000,
                "EndTime": 1543726800,
                "Title": "Eyewitness News at 11",
                "OriginalAirdate": 1485043200,
                "ImageURL": "http://img.hdhomerun.com/titles/C13769039EN0GLG.jpg",
                "SeriesID": "C13769039EN0GLG",
                "Filter": [
                    "News"
                ]
            },
            {
                "StartTime": 1543726800,
                "EndTime": 1543730400,
                "Title": "Wipeout",
                "EpisodeNumber": "S02E04",
                "Synopsis": "Contestants catapult into foam and tackle obstacles like the Gears of Doom and the Zip Line Swing to win the grand prize and title of Wipeout Champion.",
                "OriginalAirdate": 1244592000,
                "ImageURL": "http://img.hdhomerun.com/titles/C186368ENKBOQ.jpg",
                "SeriesID": "C186368ENKBOQ"
            },
            {
                "StartTime": 1543730400,
                "EndTime": 1543734000,
                "Title": "Wipeout",
                "EpisodeNumber": "S05E12",
                "EpisodeTitle": "It's the John Henson Show",
                "Synopsis": "Contestants face obstacles including Henson Headshots, Slappy Meal and the Spin Psycho.",
                "OriginalAirdate": 1342051200,
                "ImageURL": "http://img.hdhomerun.com/titles/C186368ENKBOQ.jpg",
                "SeriesID": "C186368ENKBOQ"
            },
            {
                "StartTime": 1543734000,
                "EndTime": 1543737600,
                "Title": "The World's Funniest Moments",
                "Synopsis": "Hosted by actor Erik Estrada and travel expert Laura McKenzie, \"The World's Funniest Moments\" has a lot to live up to given its title. Combine one part \"America's Funniest Home Videos\" with one part YouTube and mix in a little of the former \"CHiPs\" star, and you get this hourlong program that features funny home videos, short films and commercial parodies -- many of which are sent in by viewers -- with some of the most-popular viral videos on the Internet. Amazing pets, laughing babies, party mishaps -- this show has it all ... or at least pets, babies and party mishaps.",
                "OriginalAirdate": 1284336000,
                "ImageURL": "http://img.hdhomerun.com/titles/C8317033ENEITZ.jpg",
                "SeriesID": "C8317033ENEITZ",
                "Filter": [
                    "Comedy"
                ]
            }
        ]
    }
]
Everything else internet related on Kodi seems to be working fine. I just installed a few random add-ons.

Let me know what other information I can provide to help. Thanks!

gamaru
Posts: 6
Joined: Wed Nov 28, 2018 9:20 am

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by gamaru » Sat Dec 01, 2018 9:24 pm

djp952 wrote:
Sat Dec 01, 2018 8:40 pm
Let me also ask you this -- any problems with Kodi itself and internet activities like checking for Add-on updates or downloading other add-ons? There isn't much Kodi does out of the box on the Internet over HTTP .. perhaps maybe the Weather section? If you have that configured is it working normally?

Let me know -- I hope it's as easy as an OS configuration thing to solve for you.
To follow up on this, I just did some further investigating and even though I am able to download add-ons and stuff, Kodi may not believe that I am connected to the internet.

I just checked the System Info and it says "Internet: Not Connected. Check Network Settings". This baffles me as I am able to do other stuff in Kodi that needs the internet.

You have a clue as to why this is happening?

djp952
Posts: 958
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Sat Dec 01, 2018 9:26 pm

gamaru wrote:
Sat Dec 01, 2018 9:24 pm
djp952 wrote:
Sat Dec 01, 2018 8:40 pm
Let me also ask you this -- any problems with Kodi itself and internet activities like checking for Add-on updates or downloading other add-ons? There isn't much Kodi does out of the box on the Internet over HTTP .. perhaps maybe the Weather section? If you have that configured is it working normally?

Let me know -- I hope it's as easy as an OS configuration thing to solve for you.
To follow up on this, I just did some further investigating and even though I am able to download add-ons and stuff, Kodi may not believe that I am connected to the internet.

I just checked the System Info and it says "Internet: Not Connected. Check Network Settings". This baffles me as I am able to do other stuff in Kodi that needs the internet.

You have a clue as to why this is happening?
I do not, but I will see what I can find out for you! (The gang here will probably beat me to it and solve this well before I can -- they are pretty cool like that!)

gamaru
Posts: 6
Joined: Wed Nov 28, 2018 9:20 am

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by gamaru » Sat Dec 01, 2018 9:29 pm

djp952 wrote:
Sat Dec 01, 2018 9:26 pm
gamaru wrote:
Sat Dec 01, 2018 9:24 pm
djp952 wrote:
Sat Dec 01, 2018 8:40 pm
Let me also ask you this -- any problems with Kodi itself and internet activities like checking for Add-on updates or downloading other add-ons? There isn't much Kodi does out of the box on the Internet over HTTP .. perhaps maybe the Weather section? If you have that configured is it working normally?

Let me know -- I hope it's as easy as an OS configuration thing to solve for you.
To follow up on this, I just did some further investigating and even though I am able to download add-ons and stuff, Kodi may not believe that I am connected to the internet.

I just checked the System Info and it says "Internet: Not Connected. Check Network Settings". This baffles me as I am able to do other stuff in Kodi that needs the internet.

You have a clue as to why this is happening?
I do not, but I will see what I can find out for you! (The gang here will probably beat me to it and solve this well before I can -- they are pretty cool like that!)
I'm going to do some further digging around myself. I think you gave me the best clue as to why stuff isn't working properly though!

djp952
Posts: 958
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Sat Dec 01, 2018 9:41 pm

gamaru wrote:
Sat Dec 01, 2018 9:29 pm
djp952 wrote:
Sat Dec 01, 2018 9:26 pm
gamaru wrote:
Sat Dec 01, 2018 9:24 pm


To follow up on this, I just did some further investigating and even though I am able to download add-ons and stuff, Kodi may not believe that I am connected to the internet.

I just checked the System Info and it says "Internet: Not Connected. Check Network Settings". This baffles me as I am able to do other stuff in Kodi that needs the internet.

You have a clue as to why this is happening?
I do not, but I will see what I can find out for you! (The gang here will probably beat me to it and solve this well before I can -- they are pretty cool like that!)
I'm going to do some further digging around myself. I think you gave me the best clue as to why stuff isn't working properly though!
I'm installing 18.04.1 in a Virtual Machine to see if I can duplicate the concern as well. Googling "Kodi no internet connection Linux" is getting some hits as well. Will let you know if I find anything.

gamaru
Posts: 6
Joined: Wed Nov 28, 2018 9:20 am

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by gamaru » Sat Dec 01, 2018 9:53 pm

Figured it out! For some reason my DNS was defaulting to 127.0.0.53 so I just had to change that and voila it works now.

Thanks again, your info helped me point me to where I needed to look.

djp952
Posts: 958
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Sun Dec 02, 2018 10:11 am

gamaru wrote:
Sat Dec 01, 2018 9:53 pm
Figured it out! For some reason my DNS was defaulting to 127.0.0.53 so I just had to change that and voila it works now.

Thanks again, your info helped me point me to where I needed to look.
Awesome! Nice detective work! (Glad it wasn't a bug!)

TechTaiycho
Posts: 15
Joined: Tue Aug 21, 2018 10:42 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by TechTaiycho » Sun Dec 02, 2018 1:18 pm

djp952 you rock!!! you are the man!!! I LOVE YOU BRO!!! It's working again and your response time (considering you do this for free) was absolutely awesome!!! Zuki is the only way I can watch liveTV the way I want. It's the only solution for HDHR in kodi that I can pause/play/rewind/fforward/record and skin whichever way I want. For me there is NOTHING better.

djp952
Posts: 958
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Sun Dec 02, 2018 10:15 pm

TechTaiycho wrote:
Sun Dec 02, 2018 1:18 pm
djp952 you rock!!! you are the man!!! I LOVE YOU BRO!!! It's working again and your response time (considering you do this for free) was absolutely awesome!!! Zuki is the only way I can watch liveTV the way I want. It's the only solution for HDHR in kodi that I can pause/play/rewind/fforward/record and skin whichever way I want. For me there is NOTHING better.
Why thank you! It's my pleasure, and I'm very glad that you are so enthusiastic about it! Posts like this are the reason I keep going.

FWIW I'm also finally starting to update the wiki on GitHub in preparation for Kodi Leia "18.0". I started with breaking the download page up into three separate ones for Jarvis/Krypton/Leia, the intent being to also put the installation instructions for each platform on the same page. I admit to stealing some OS icons from Kodi's documentation, but I actually hand-created the UWP/XBOX icon you see on the Leia page in Inkscape all by myself :) It's definitely time to make the Leia build a first-class citizen. It will take time to clean up and/or redo the remainder of the wiki. New links:

New Jarvis downloads page: https://github.com/djp952/pvr.hdhomerun ... odi-Jarvis
New Krypton downloads page: https://github.com/djp952/pvr.hdhomerun ... di-Krypton
New Leia downloads page: https://github.com/djp952/pvr.hdhomerun ... -Kodi-Leia

djp952
Posts: 958
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Thu Dec 06, 2018 3:55 pm

Wanted to post some good news:
  • Team Kodi has fixed the video stall on the nVidia Shield in Leia RC2. I just tried it out on a Shield and have no problems switching channels anymore.
  • Team Kodi also changed the implementation for how often to poll the PVR for last played position. Instead of driving the requests from the UI frame rendering rate, it's now limited to once per 10s if the Recorded TV item is highlighted. I can take out the block I put in next release.
Looks like the only thing left for this PVR and Leia is to try and improve the timeshifting UI information, the way I'm doing it isn't very reliable -- if the timestamps on the stream change significantly I stop trying. I'll have to look into either a better way of figuring out exactly where we are in a timeshifted stream or look up how to properly handle the timestamps changing. (it actually happens more than you'd think). It's not a showstopping type of thing, but it would be nice if it was 100% reliable in time for Leia final.

djp952
Posts: 958
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Sun Dec 09, 2018 9:19 pm

Running the risk of talking just to myself here, but that's a good thing - nothing serious must be going wrong! How about a release to try and tide us all over for the holidays? Plenty of Christmas marathons to sit through, if you're into that sort of thing ...

Version 1.3.7 (2018.12.09)
  • Update SQLite database engine to version 3.26.0
  • Update cURL library to version 7.62.0
  • Improve performance of Recorded TV last played (resume) position discovery
  • (Leia) Prevent reporting timeshift buffer information for non-seekable realtime streams
Downloads:
Kodi 16 "Jarvis" : https://github.com/djp952/pvr.hdhomerun ... odi-Jarvis
Kodi 17 "Krypton" : https://github.com/djp952/pvr.hdhomerun ... di-Krypton
Kodi 18 "Leia" : https://github.com/djp952/pvr.hdhomerun ... -Kodi-Leia

This is mainly a "clear out the queue" release, but it does have two items of note:

The first is that there was a way to easily improve the speed and data requirements of getting the 'last played' position for a recording. Kodi asks for this information much more than I originally anticipated and that Leia RC1 change really hammered us. While Team Kodi reeled that change back in for Leia RC2, it illustrated that as the number of recordings we have goes up, this feature/function becomes more and more painful. The change here limits the query against the RECORD engine to only retrieve data about the series the recording belongs to. It very significantly reduces the amount of data returned. Based on how Kodi uses this information there is a further improvement that can be made but in practice it didn't help enough to be worth it right now. It would require a database schema change and a bump to v1.4.0. Maybe later?

The second item of note is I found a Leia-exclusive bug in the PVR that was tricking Kodi into thinking a non-seekable stream (tuner direct stream or Premium TV demo channel) was seekable since I was reporting that there was a timeshift buffer, which there isn't. That has been corrected -- Kodi will again not even let you try to seek a stream that can't be.

This is a recommended release due to the performance enhancement. If v1.3.6 isn't causing you any grief, I suggest updating to v1.3.7. Your RECORD engine will like you better for it :)

I'll continue to work on updating the wiki/documentation as time allows, but I don't anticipate any releases between now and the new year. If I don't talk to you guys until then, thank you for keeping this fun for me for almost 2 full years now … enjoy!!!

johnny_swindle
Posts: 24
Joined: Tue Mar 24, 2015 11:38 am

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by johnny_swindle » Mon Dec 10, 2018 7:06 pm

@djp952

Thank you so much for this add on..........

I am not sure where you live but if you are ever in south Louisiana, send me a PM and let me know. Around of drinks and a meal are on me.

Johnny

Locked