(OLD) Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Kodi Community Development

Moderator: TVJunkie198

Locked
Ken.F
Posts: 2148
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 » Tue Feb 12, 2019 10:30 am

djp952 wrote:
Tue Feb 12, 2019 8:45 am
This has been broken since 1/4/19 and you were the first to notice :)
I don't use Leia very often. Most of the devices in the house are still on Krypton.

djp952
Posts: 938
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 » Tue Feb 12, 2019 10:07 pm

djp952: Proving no software is perfect since 1990 ...

Version 1.3.13 (2019.02.12)
  • Update SQLite database engine to version 3.27.1
  • Update cURL library to version 7.64.0
  • Log detected stream properties (real-time, seekable, etc) for diagnostic purposes
  • Detect and report dropped streams if data transfer rate falls to zero
  • Fix bug that caused a dropped stream to be waited on infinitely for more data to become available
  • (Leia) Log unexpected zero length reads that occur on in-progress streams as errors
  • (Leia) Accurately set the media type (MIME type) stream indicator as reported by the DVR engine
  • (Leia) Fix bug preventing Kodi from calling into SetRecordingLastPlayedPosition()
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

LEIA USERS: THIS PVR VERSION REQUIRES LEIA "18.0" FINAL. IT WILL NOT INSTALL ON RC5.2 OR EARLIER.

As has been the case lately, this is generally a "Leia" release. Krypton and Jarvis pick up a couple minor things, but I have been consciously avoiding changing those platforms too much since most people are happy with them. Let's go over the BOLD items from above …

All versions have been suffering from an inability to detect and kill off dropped streams. This condition should be rare for most people, but this update is now able to detect and kill streams that are "dropped". It takes about 8-9 seconds for it to work, and it will still try very hard to get the data Kodi wants, but if the connection to the DVR engine is truly gone, this won't "lock up" Kodi anymore.

Until Leia, the media type (MIME type) of the stream had to be set as part of the channel/recording metadata. Given that, the MIME type has been hard-coded to "video/mp2t" for quite some time. This change opens the stream from the DVR engine at the point when Kodi is interrogating this data so that the MIME type can be reported as the exact string returned by the DVR engine. My hope here is some pain relief on audio-only streams but I still don't have any of those to work from. For what it's worth, the DVR is now capable of handling a raw MP3 stream when encountered -- it may not solve your problem, but it does open up some Kodi "Radio" possibilities!

The final noteworthy item was reported by Ken.F -- the "last played position" functionality in Kodi 18 has been broken for a while. This is fixed now, but has a (documented) limitation -- in-progress recordings will still not set the "last played position" because I have to treat these streams as "live". I issued a PR to Kodi about this, but ended up cancelling/closing it since it would break a lot of stuff.

That's about it for now, I'll try to get the Windows/Android/OSX auto-update data for 1.3.13 set up tonight -- edit: I think I messed up something here -- will check in the morning.

edit 2: auto-update should be fixed, there was a typo in the paths to get 1.3.13. It may take a while for Kodi to go out and refetch the list, though. Not sure how long that takes, but it's not immediate.

Ken.F
Posts: 2148
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 » Wed Feb 13, 2019 7:43 am

djp952 wrote:
Tue Feb 12, 2019 10:07 pm
Version 1.3.13 (2019.02.12)
Thanks for the update. The LastPlayedPosition fix for recordings is working for me on Win7-64 Leia.
I tried to run the auto update very early this morning but it failed to install. That was about 2:30 am eastern so it was probably before the path fix went out. I downloaded it from github and installed from zip and it completed without any trouble.

lovemyram4x4
Posts: 206
Joined: Thu Jun 02, 2011 5:45 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by lovemyram4x4 » Wed Feb 13, 2019 10:01 am

1.3.13 fails to update from inside Kodi.

I installed from zip, hopefully this version won't crash Kodi on start up so I can leave the add on enable.

djp952
Posts: 938
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 » Wed Feb 13, 2019 6:03 pm

lovemyram4x4 wrote:
Wed Feb 13, 2019 10:01 am
1.3.13 fails to update from inside Kodi.

I installed from zip, hopefully this version won't crash Kodi on start up so I can leave the add on enable.
Yeah I boogered up the XML file. It's a manual process so prone to mistakes. Unfortunately Kodi doesn't seem to go out and check for new XML very frequently, so it's a mistake I have to try harder to avoid.

I saw one commit to Kodi about a deadlock when Recordings are loading, but I think the lock up on auto update is because multiple threads in Kodi are both accessing the PVR and simultaneously unloading it to perform the update. That's just a guess I haven't dug into it much, it's hard to reproduce on demand while in a debugger.

The only way to truly force Kodi to reload the XML when you want is to uninstall and reinstall the add-on, and if you are going to do that may as well just install the new one!

I'm still considering just not doing the auto updates. It's nice to be able to get new code to people without them needing to do anything, especially on Android, but mistakes on my part and (perhaps) bugs in the Kodi binary add-on updater may outweigh that usefulness

I think I can mark you down as "don't use auto updates"? That's like 5 against and none for. Sigh. I try.

djp952
Posts: 938
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 Feb 14, 2019 10:42 pm

Honest question for any remaining Jarvis users here ... are we ready to throw in the towel for this platform?

I spent some time checking the GitHub metadata tonight and Jarvis has officially entered into 'statisical noise' territory. Adding up the past 4 releases there have been a grand total of 12 downloads, and that includes me (I always try a couple links to be sure they are good).

My best estimate is that there are around 1000 users of this code out there and Jarvis has fallen well under the 1% mark.

I would like to know if the PVR on Jarvis is 'good enough' to call it quits or if there are any outstanding items(s) that really need to be addressed first.

I've been planning to move the PVR to version '2.0.0' when Jarvis dies, so if there are no strenuous objections between now and the next version, I think that will be that for Jarvis. Should probably reboot this thread again too, it's at 70 pages now! Wow.

If you are using Jarvis and don't see 1.3.13 as a good stopping point for that version of Kodi please let me know. It hasn't become "problematic" yet but it just can't last forever...

djp952
Posts: 938
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 » Fri Feb 15, 2019 10:10 pm

I spent some time today building out CoreELEC 9.0.0 and trying to come up with a reasonable way for them to get what they want without breaking the formal Kodi "Leia" PVR API version. I ultimately did come up with something quite simple, and I would like to ask the CoreELEC users here to visit that thread and provide any comments you may have: https://discourse.coreelec.org/t/rfi-pv ... 0-4/2818/7. Agreeing with me is 100% not necessary -- I greatly prefer honest feedback as opposed to "nice" feedback :)

Basically what I asked them to do was to revert the Kodi PVR API version change and deal with the custom attribute they want by re-using a mostly (if not completely) defunct PVR channel field instead. This should restore compatibility with third-party PVR addons like this.

The more of you that chime in with them and expose your thoughts the more chance we'll get CoreELEC to restore Kodi API compatibility, if of course that's what you want here :)

djp952
Posts: 938
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 Feb 16, 2019 9:21 pm

Great news from the CoreELEC team. They opted to go with my proposed solution to the incompatibility with the formal Kodi PVR API. I'm extremely glad they did (and a bit surprised the proposal was good enough as-is). It looks like CoreELEC 9.0.0 was formally released today, so it's not in there, but the changes were committed afterwards so I think the CoreELEC users will see this in 9.0.1 or 9.1.0, or whatever is next for them.

Sincere gratitude goes a long way in my experience. I posted a Thank You for them over there, and I suggest doing the same for folks that were hit by this: https://discourse.coreelec.org/t/rfi-pv ... -10-4/2818.

I'd also like to thank timecutter yet again for taking the time and effort to give everyone a suitable version of the PVR to use with CoreELEC 8.99.x and 9.0.0.

Besides, this concern got me to pony up for an ODROID-C2 of my own, and I have to say that it's a much more powerful SPC than the Raspberry Pi. I absolutely recommend both the board and CoreELEC. My only caution is that there is no in-built Wifi nor in-built analog audio output. I picked up a cheap RTL8192EU-based USB Wifi adapter from Amazon for $10, and I already had a USB audio adapter that worked fine with it.

clarkss12
Posts: 1207
Joined: Sat May 11, 2013 11:51 am
Device ID: 104CBEA5 ;1055A951
Location: Michigan, USA
Contact:

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by clarkss12 » Sun Feb 17, 2019 10:45 am

Thank you Djp952 for getting this sorted out...... CoreELEC is a fantastic media player that can be used on very low cost, low powered devices. With your PVR addon, it makes it a one appliance media player, that plays EVERYTHING.........

jachin99
Posts: 85
Joined: Sat Feb 13, 2016 4:18 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by jachin99 » Sun Feb 17, 2019 6:35 pm

@djp952 I sent you a PM earlier about getting this to work in Kodi ds player 17. I hate to admit that I haven't had any luck getting the PVR addon, even with the stream live TV channels setting directly from tuner. I can select a channel from the recent channels list and that channel will play but selecting a channel from the guide, or channels menu will not play any video unless I play a channel via the recent channels list first. As soon as I stop any live TV video, I can't get any video to play unless I pick a channel from the recent channels list again if that makes sense. Under no circumstances can I get LAV or Mad VR to play via your PVR addon as it stands now using the current version. I haven't tried the old version yet, and I still can but judging from your response to my earlier message there isn't much hope that will give me a desirable result. 'm pinged Krusty Returns, who makes the Server WMC PVR client, and he informed me that the filter rules are entirely new to him as well. I'm linking the only information I have about other PVR addons that were said to have worked with Kodi DS 17. Next PVR will not suffice because timeshifiting is broken in kodi 17, and I'm not getting much support from the media portal site. I have never gotten argus to recognize my primes.

NPVR
https://forum.kodi.tv/showthread.php?pi ... pid2090836

ARgus/MP
https://forum.kodi.tv/showthread.php?pi ... pid2111042

If need be I can try to get ahold of the Kodi DS developer but I don't know if I'll have much success. I'm putting this on the open forums as you suggested, and hopefully this somehow comes together into a working solution with a full EPG, and timeshifting. Thanks for the work you do.

djp952
Posts: 938
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 Feb 17, 2019 7:55 pm

I can pretty much guarantee that any version newer than v1.1.1 will not work right with DS Player. Sorry if that wasn't as clear as it could be in the PM, I was trying to remember and look at the old code when replying. v1.1.1 was the last version that used Kodi's built-in streaming capabilities for anything, and DS Player relies upon that.

For DS Player, you will need:
DS Player worked by hooking into/replacing the streaming code in Kodi, so if the PVR bypasses that, as this PVR always does in version 1.2.0 and higher, you can be certain it won't work as expected. I never got DS Player working to my satisfaction back then, but in honesty since I've been working on this I haven't had any Windows-based systems that would benefit from it, either.

Version 1.1.1 of the PVR goes through Kodi for streaming of Live TV if you enable that option. That version always used Kodi for Recorded TV. Unfortunately, enabling that option also prevents timeshifting/seek from working for Live TV. Sending Kodi the URL to the stream in the way necessary for DS Player to "intercept" it won't send the HDHomeRun DVR the necessary HTTP RANGE header, which in turn means you don't get back the response headers necessary to do timeshifting/seeking.

What I would like your help with is seeing if you can get version 1.1.1 working to your satisfaction, within the realm of limitations presented above. You won't get timeshifting/seeking, that will be a given at this point. However, if you can get the basic enhanced rendering functionality working, I'm totally willing to see how much newer stuff can be back-ported into the old 1.1.x Krypton baseline for you, and will see if any new tricks learned along the way might get timeshifting operable.

This one needs to be a team effort :)

djp952
Posts: 938
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 Feb 17, 2019 9:20 pm

A glitch in the Universal Windows Platform build was discovered and corrected by jlenk:

Version 1.3.13a (2019.02.17) - Universal Windows Platform only
  • Fix compilation error allowing debug assertions to be raised in UWP builds (credit: jlenk)
Downloads:
Kodi 18 "Leia" : https://github.com/djp952/pvr.hdhomerun ... -Kodi-Leia

UWP users (Xbox One, maybe perhaps some on Windows 10) will want this one. jlenk submitted a Pull Request to add a missing "NDEBUG" flag to the compilation options for the UWP platforms. The lack of this flag was causing the PVR to pop-up debug assertions on him, and those should never be seen in release builds.

Note that I updated the .APPX versions to the latest available nightly builds from Kodi. For Win32, it's still tagged as "18.0-RC", but for x64 it has been updated to "18.1-RC". There are still no 'formal' builds of Kodi on UWP to use instead of just finding the latest nightly versions when a build comes around. Therefore, the updated file name on x64 with "18.1" in it is not a typo. Nor is the Win32 file name still having "18.0" in it :)

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by mxlance » Mon Feb 18, 2019 7:32 am

@djp952
As always thank you for all your work on this project.
We could not live without your PVR addon now.

I saw your note that "Prepend season/episode number to episode name in EPG"
was removed and that Leia does it now.

however after upgrading to LibreElec 9/Leia i find that the season/episode numbers are not showing in the EPG.
Is there a new setting in Kodi i missed?

thank you again

timstephens24
Posts: 66
Joined: Wed Apr 01, 2015 11:44 am

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by timstephens24 » Mon Feb 18, 2019 8:35 am

Am I missing how to merge my tuners into one? I have multiple of the same channel listed since I have two HDHomeRun Primes. If I'm not missing it, anything I can do to help it get supported?

djp952
Posts: 938
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 » Mon Feb 18, 2019 9:16 am

timstephens24 wrote:
Mon Feb 18, 2019 8:35 am
Am I missing how to merge my tuners into one? I have multiple of the same channel listed since I have two HDHomeRun Primes. If I'm not missing it, anything I can do to help it get supported?
The PVR automatically collapses the channels into one list, it loads everything up into a database and then queries it. Are you using the built-in Kodi "pvr.hdhomerun" addon by chance, or have multiple PVRs enabled?

If you're definitely using "zuki.pvr.hdhomerundvr" and no other PVRs, I would need to see your database file to see why it would return multiple items from a DISTINCT query. Post back with the platform you're using (Windows, Linux, Android, etc) and I can help point you to the proper location to grab that. It's pretty small.

My guess is multiple PVRs are turned on, but I don't want to rule out a defect/bug off the cuff on you.

Locked