(OLD) Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Kodi Community Development

Moderator: TVJunkie198

Locked
usafle
Posts: 49
Joined: Sun Sep 17, 2017 5:51 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by usafle » Thu Nov 29, 2018 3:58 pm

Kodi Krypton will not decode premium TV channels. That's why it works in the official app and not this addon. Apparently there is supposed to be support for it in the next Kodi release (Leia) - unless someone corrects me.....
mxlance wrote:
Thu Nov 29, 2018 2:32 pm
Sorry to report an issue with the unofficial pvr addon. OTA channels play but not Premium TV channels.
They do play in the Official SD Addon.

This is happening in both kodi 17 and 18

thank you

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by mxlance » Thu Nov 29, 2018 4:29 pm

Thank for the reply
version 1.3.5 of this addon has been working great in kodi 17.x and Kodi 18 for weeks.

I suspect a change on the SD Premium TV side. Unless I am the only one having this issue.

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by TechTaiycho » Thu Nov 29, 2018 9:23 pm

I suspect the same thing. Nate, Nick? Wanna chime in?

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

Re: My system is fried

Post by djp952 » Thu Nov 29, 2018 9:48 pm

jhford wrote:
Wed Nov 28, 2018 8:58 am
My single drive WD MyCloud NAS self-updated over a month ago and the PVR stopped saving recordings to the NAS. I have tried a couple of things suggested here.

1. I ran the following SSH commands listed on "DVR Install - WD My Cloud Single-Disk Manual Install" with the following results:

wget -O /tmp/hdhomerun_dvr.apkg http://download.silicondust.com/hdhomer ... Cloud.apkg: SUCCESS

upload_apkg -d -s 1 -p ../../../../../tmp/hdhomerun_dvr.apkg: SUCCESS

/mnt/HD/HD_a2/Nas_Prog/hdhomerun_dvr/start.sh: FAILURE

Here is the command and output:
root@WDMyCloud root # /mnt/HD/HD_a2/Nas_Prog/hdhomerun_dvr/start.sh
/usr/bin/hdhomerun_dvr: line 10: /tmp/hdhomerun_record_arm: Permission denied

2. I downloaded the HDHR Windows installation software and re-ran it, including the NAS update button, if I got the name right, on the DVR tab.

I then reloaded Kodi and watched the progress and #2 seemed to be working. But I was wrong. Now nothing works including live TV, which was working before I did #2, even though the recordings we not being saved to the NAS.

I love this PVR client and want to use it again and into the future.

Any help will be greatly appreciated.
Uhhh… this one is a little out of my wheelhouse. Seems that the installation for the DVR/RECORD engine went awry? In general Live TV comes from the RECORD engine when available so that you can pause/resume live programming (and having a valid and working RECORD engine is technically a requirement for this PVR). I'm afraid I can't be of much help, but you should definitely ping SD about the installation issues for the RECORD engine. Sorry!

djp952
Posts: 961
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 Nov 29, 2018 9:52 pm

mxlance wrote:
Thu Nov 29, 2018 2:32 pm
Sorry to report an issue with the unofficial pvr addon. OTA channels play but not Premium TV channels.
They do play in the Official SD Addon.

This is happening in both kodi 17 and 18

thank you
I won't be able to set up anything that can use the Premium TV (demo) channels until this weekend to verify whatever is going wrong, but I can confirm that nothing has changed on this end. Last time this happened it was a backend issue. I'm afraid I just don't have any information to share with you right now, but I do hope this is a short transient problem for you guys. Please post back if the problem resolves itself -- if it's not by the time I can get Premium TV set up again I will see what I can find out and ask SD what needs to be done.

I really hope they didn't enable DRM on us; that would be the end of the road for this particular feature via Kodi :(

edit: From nick in "Premium TV" forum:
We have confirmed a major outage upstream. Our infrastructure is working (the alert system a little too well... flood of alerts about the upstream issue from both redundant paths).
Hang tight gang and let SD work on this for a bit. "major outage" is kind of self-explanatory!

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by TechTaiycho » Fri Nov 30, 2018 8:49 am

I just checked, KODI is still crashing on PTV channels. Is this a rights or policy issue? I would really like if Nate or Nick could please chime in. How do we fix this?

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by mxlance » Fri Nov 30, 2018 9:30 am

+1 here

djp952
Posts: 961
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 11:18 am

Got the EXTEND hooked up and enabled a couple demo PTV channels. I didn't see a problem with Krypton, but on Leia it starts to slow down, churn, and crashes out. Is this what you guys are seeing? Is Krypton still an issue?

I'll have to build Leia Kodi to investigate further, it takes a few hours to get that all set up. Family is doing "Christmas" today so I'll fit it in as best I can for you guys.

Let me know about Krypton.

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 12:47 pm

Yes still a problem on Krypton and Leia both are crashing with in a few seconds in to a premium channel.
thank you for looking into this for us.

merry chritmas/happy holidays

djp952
Posts: 961
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 1:03 pm

mxlance wrote:
Sat Dec 01, 2018 12:47 pm
Yes still a problem on Krypton and Leia both are crashing with in a few seconds in to a premium channel.
thank you for looking into this for us.

merry chritmas/happy holidays
Good to know, thank you. As long as the symptoms are the same trying to debug via Leia should reveal whatever it will reveal :) All built and set up, just need to squeeze in some debug time between the toddler/mommy meltdowns :)

edit: good news and bad news. Good news, it appears to be my fault. Bad news, it appears to be my fault. The internal packet filter is getting tripped up badly by something in the stream and causing an access violation. It will take a little time to discern what it is and guard against it, the packet filter reads the MPEG-TS packets looking for a certain piece of data that trips up Kodi, but it makes assumptions that it knows what it's reading.

If this will take an extended period of time (like beyond tonight) to figure out, I'll build you guys a Leia and a Krypton with the packet filter completely disabled to get you over the hump.

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 2:30 pm

thank you for the update.
The SD HDHR app is working, not ideal, but working so do put your family first. we are getting by.
thanks again

djp952
Posts: 961
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 3:01 pm

I see what the problem is gang. While I am no MPEG-TS decoding expert, it looks like the Program Association Tables in the stream go "bad" after a little bit. This could totally be to spec and I just didn't understand what to look for, but from my interpretation of the specifications the streams aren't right. The packet says there is a PAT payload but there isn't, it's all stuffing bytes. Since each byte is set to 255 my code is trying to find things that don't exist, and ultimately poops on itself.

I need to play around a bit and do some more research to make sure I'm fixing it right, but I have 2 quick-fixes in mind:

First, disable the packet filter for these 'tuner-direct' streams that never come from the RECORD engine. Since you can't seek on them anyway, we don't need the timestamps and they are unlikely to have the 'poison' packets I filter out. Second, watch for 0xFF bytes immediately following the TS header for program 0x0000 :) These are the things I don't think should be there.

I had a handful of things queued up for v1.3.6 but can revert back to the last baseline and just patch these items since they are easy to test. This gives me more time to see if I'm misinterpreting the spec or to ask SD for advice if need be.

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 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=RAZO8o9q19stqCEDh4Ia3l9A&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!

djp952
Posts: 961
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 4:25 pm

Fixed it:

Version 1.3.6 (2018.12.01)
  • Fix bug in DVR stream packet filter causing an access violation if a PSI packet with a table ID of 0xFF is encountered
Downloads:
https://github.com/djp952/pvr.hdhomerun ... /Downloads

Leia 1.3.6: https://github.com/djp952/pvr.hdhomerun ... leia-1.3.6

The problem with Premium TV was indeed on my end, I apologize. The MPEG-TS spec I have been working from didn't mention that there could be a 0xFF table ID in a PSI packet. The "documentation" on Wikipedia of all places pointed out that that can happen and when it does the rest of the packet should be ignored since it will be stuffed with nothing but 0xFF bytes. My packet filter was trying to actually use this data and it messed up a whole bunch of things, ultimately causing an access violation.

Looks good here on both Krypton and Leia, I wanted to get this out to you ASAP so I didn't test Jarvis or Android/Linux, but I made no other code changes so I don't anticipate you will have any issues.

I'm not sure why the PTV streams stop sending the PAT data after a few seconds and starts sending stuffing bytes but it seems legit to do so and now it's handled. Ugh...

Online
Ken.F
Posts: 2153
Joined: Fri Apr 05, 2013 9:20 am
Device ID: 1041A706, 1043EB32, 104BAD9E, 13168DC5, 1322A7AC
Location: West Rockhill, PA

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by Ken.F » Sat Dec 01, 2018 5:01 pm

djp952 wrote:
Sat Dec 01, 2018 4:25 pm
Looks good here on both Krypton and Leia, I wanted to get this out to you ASAP so I didn't test Jarvis or Android/Linux, but I made no other code changes so I don't anticipate you will have any issues.
I would test them for you since I run Krypton and Leia on most of the platforms you build for but I let my PTV subscription go last week.
I'm not sure why the PTV streams stop sending the PAT data after a few seconds and starts sending stuffing bytes but it seems legit to do so and now it's handled. Ugh...
SD recently made some changes regarding PAT packets. Maybe that's what tripped you up. If you ask Nick he'd probably tell you exactly what they did.
See: viewtopic.php?f=129&t=70311

Locked