OLD: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Kodi Community Development

Moderator: TVJunkie198

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

OLD: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Postby djp952 » Sun Feb 12, 2017 10:48 pm

Hi all! I wanted to let you folks know that I have written a Kodi PVR Client for the HDHomeRun DVR service. I think it works pretty well and have been using it exclusively for a month or so now -- it has even gained the holy grail of "WAF" in our house. I had to dump Windows Media Center once and for all, and (sorry SD) we really didn't like the official HDHomeRun app/plugin options available to us.

This is different than the official Kodi HDHomeRun PVR Client -- this specifically works with the DVR service, and exposes as much of that back end as I deemed possible. If you don't subscribe to the DVR service or have older tuner device(s) that don't work with the DVR service -- this is not for you -- use the official Kodi HDHomeRun options available to you.

It supports:
  • Streaming and timeshifting Live TV through the HDHomeRun RECORD engine (SEEK operation works!)
  • Accessing the recordings on the HDHomeRun RECORD engine
  • Accessing the Electronic Program Guide
  • Manipulating the backend Recording Rules (Timers)
It of course does not support DRM channels, and it never will. Please don't ask for that. It goes so far as to hide those channels with no way to turn them on. Would there even be a point to that if they can't work?

It's available for Kodi 16.1 "Jarvis" and Kodi 17.0 "Krypton" (RC4 or final) on Windows, Windows Store (Krypton only), 32-bit Linux and 64-bit Linux. Tested on Windows 7, Windows 10, Ubuntu 16.04.1 LTS and Ubuntu 16.10, but I see no reason that it wouldn't work on most PC-based Linux distributions. No ARM/Android/iOS/macOS support.

I've written a great deal of documentation since not everything is completely intuitive, which I invite you to read through and provide feedback on if it's not enough or worse yet -- way too much. I provided installation instructions, a "How-To" section to deal with non-obvious implementation details, a list of all the options it currently supports, a list of options I recommend you use in Kodi, and some additional details on how it works, especially when it comes to the HDHomeRun Recording Rules -> Kodi Timers implementation.

Version 1.0.0 for the aforementioned platforms is available right now. I look forward to hearing what you think about it and if you run into any problems that need to be fixed. I have no forum to use, I hope SiliconDust is OK with us discussing it a little here but preferably use the GitHub "Issues" area if you are comfortable with that.

Links; please at minimum read through the Known Issues and Limitations before installing ...

Download Page:
https://github.com/djp952/pvr.hdhomerun ... /Downloads

Main Documentation Page (GitHub Wiki)
https://github.com/djp952/pvr.hdhomerundvr/wiki

How-To Page:
https://github.com/djp952/pvr.hdhomerundvr/wiki/How-To

Known Issues and Limitations Page:
https://github.com/djp952/pvr.hdhomerun ... imitations

Like I said, I've been using this exclusively during development (which I expected to take a weekend and took two months) and I thought it turned out very well and was worth sharing with the world. If enough people like/use it, I could be persuaded to try and get Kodi to adopt it as an official add-on or perhaps even better try to pawn it off on somebody else :)

Have at it, let me know what you think....
Last edited by djp952 on Mon Jul 31, 2017 8:10 pm, edited 1 time in total.

clarkss12
Posts: 1190
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

Postby clarkss12 » Mon Feb 13, 2017 8:09 am

Wow!!!!!!!!! that is a fantastic addon..

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Postby djp952 » Mon Feb 13, 2017 5:29 pm

Wow!!!!!!!!! that is a fantastic addon..
Thanks! I really hope it comes in handy for some folks! Debating on posting it on Kodi's forums, since I did it "my way", also don't want to steal any thunder from their add-on...

furstt
Posts: 5
Joined: Sun Jul 10, 2016 8:21 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Postby furstt » Tue Feb 14, 2017 2:03 pm

Thanks for this - I will be testing tonight. Being able to record just new episodes is something I needed since moving off Windows Media Center. Thanks for calling that out in your docs.

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Postby djp952 » Tue Feb 14, 2017 7:21 pm

Thanks for this - I will be testing tonight. Being able to record just new episodes is something I needed since moving off Windows Media Center. Thanks for calling that out in your docs.
Nice! I thought of a pretty important tip about scheduling that I added to the Wiki just now. It will save you potentially hours of frustration getting series recordings set up:

>TIP: Use the official SiliconDust HDHomeRun VIEW application's "DISCOVER" interface to schedule series recordings. The search functionality is far better. Once the series is scheduled, you can then subsequently adjust the parameters of the rule (channel, new or recent only, etc.) via this PVR Client. You may want to restart Kodi after you add rules this way to have them show up immediately -- the default interval to discover them is 2 hours -- (this can be adjusted lower - see the Options (https://github.com/djp952/pvr.hdhomerundvr/wiki/Options) page.

Kodi doesn't have a good search interface to work with finding things not in the EPG; the tip is to use SiliconDust's app to get them scheduled, then you can make adjustments through Kodi. This is what I did here at chez djp952 -- waiting for something to be in the small EPG window or knowing exactly what to type was really annoying. All set through HDHomeRun VIEW, then set the specific channel I wanted and the "new only" flags through Kodi.

I also have a (Windows only) PVR client I made for me here that integrates old MCE recordings by just specifying where the old Recorded TV folder is. It's not polished at all, but if you are like me and have a ton of those lying around still I think it would be a nice option to add, or I can share that PVR client as-is. Doesn't work on Linux -- I don't know how to read the metadata from the .WTV files outside of Windows :) My goal has been to watch them all and then just throw away that PVR Client. Side effect: having multiple PVR Clients installed negates the "use channel numbers from backend" setting in Kodi -- hence the option I added to "prepend channel numbers to channel names" since that affects me too!

ssyspro
Posts: 20
Joined: Thu Sep 29, 2016 3:14 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Postby ssyspro » Wed Feb 15, 2017 11:00 am

Linux client is giving unknown error can't load dll for Jarvis build both 32 and 64. I could be wrong but I am pretty sure linux should be using so's and not dll's.

Can you also do a build for Android arm, please.

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Postby djp952 » Wed Feb 15, 2017 12:00 pm

Linux client is giving unknown error can't load dll for Jarvis build both 32 and 64. I could be wrong but I am pretty sure linux should be using so's and not dll's.

Can you also do a build for Android arm, please.
It should absolutely be using .so files. Did you download the Linux zip(s) or the Windows zip? It could be the Kodi error message just says "DLL" in all cases (pretty likely).

I used Ubuntu 16.x when testing, which Linux distro are you using, I can check it out. There could be a dependency that isn't as standard as I expected. OpenSSL comes to mind as a reasonable choice there. I don't think the Kodi log will be helpful in this case if it hasn't gotten far enough to load the .so successfully there probably won't be anything of value in there.

Let me know what Linux to install, and I'll get back to you ASAP :D

Android/ARM is a possibility, but if it's not working on regular Linux I may have a ways to go there. I'll look into it, I think my Android tablet can run Kodi :)

ssyspro
Posts: 20
Joined: Thu Sep 29, 2016 3:14 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Postby ssyspro » Wed Feb 15, 2017 12:34 pm

I am using kodi 16 Jarvis so I tried both linux builds for Jarvis.
OS is Sabayon 64 its a variant of gentoo.

Here is a snip of the log may help.

Code: Select all

14:36:34 T:140233131669248 NOTICE: PVRManager - starting up 14:36:34 T:140231881778944 ERROR: Unable to load /home/build/.kodi/addons/pvr.hdhomerundvr/zuki.pvr.hdhomerundvr.so, reason: /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/build/.kodi/addons/pvr.hdhomerundvr/zuki.pvr.hdhomerundvr.so) 14:36:34 T:140231881778944 WARNING: UpdateAndInitialiseClients - failed to create add-on HDHomeRun DVR PVR Client, status = 6 14:36:34 T:140231881778944 WARNING: UpdateAndInitialiseClients - failed to load the dll for add-on HDHomeRun DVR PVR Client, disabling it 14:36:46 T:140235956607104 ERROR: GetDirectory - Error getting addons://disabled/xbmc.pvrclient 14:36:46 T:140235956607104 ERROR: CGUIMediaWindow::GetDirectory(addons://disabled/xbmc.pvrclient) failed 14:36:55 T:140235956607104 NOTICE: PVRManager - stopping

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Postby djp952 » Wed Feb 15, 2017 7:30 pm

I am using kodi 16 Jarvis so I tried both linux builds for Jarvis.
OS is Sabayon 64 its a variant of gentoo.

Here is a snip of the log may help.

Code: Select all

14:36:34 T:140233131669248 NOTICE: PVRManager - starting up 14:36:34 T:140231881778944 ERROR: Unable to load /home/build/.kodi/addons/pvr.hdhomerundvr/zuki.pvr.hdhomerundvr.so, reason: /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/build/.kodi/addons/pvr.hdhomerundvr/zuki.pvr.hdhomerundvr.so) 14:36:34 T:140231881778944 WARNING: UpdateAndInitialiseClients - failed to create add-on HDHomeRun DVR PVR Client, status = 6 14:36:34 T:140231881778944 WARNING: UpdateAndInitialiseClients - failed to load the dll for add-on HDHomeRun DVR PVR Client, disabling it 14:36:46 T:140235956607104 ERROR: GetDirectory - Error getting addons://disabled/xbmc.pvrclient 14:36:46 T:140235956607104 ERROR: CGUIMediaWindow::GetDirectory(addons://disabled/xbmc.pvrclient) failed 14:36:55 T:140235956607104 NOTICE: PVRManager - stopping
It would appear that the problem is that you need a newer version of the GCC libraries. I installed Sabayon 16.11 (amd64), and it ships with GCC 4.9.3, which includes CXXABI_1.3.8. The library was compiled with GCC 5 (5.4.0 to be exact). This isn't something I realized could be a problem, I used the latest GCC when building the libraries. (Windows guy here, if that wasn't painfully obvious by now). I was working on the impression that any reasonably current set of GCC libraries would be fine. Totally my oversight.

The required library version for CXXABI_1.3.9 is libstdc++.so.6.0.21, my test Sabayon install only goes up to libstdc++.so.6.0.20 (/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3). You can try to update the GCC version, but I see a lot of cautionary tales out there regarding Gentoo and updating GCC. Please use caution, don't break your system just for this! GCC 5 looks like it's not considered stable for Gentoo: https://packages.gentoo.org/packages/sys-devel/gcc.

I will look into building against an older CXXABI. IIRC I had some problems with GCC 4 early on, but anything can be worked around. I'll let you know -- hang tight. Could be a couple/few days.

edit: Sent you a PM with links to an updated version to test. Seems to have had no ill effects, so it will probably be published to the GitHub repository tonight or early tomorrow regardless :) Thanks again!!

ssyspro
Posts: 20
Joined: Thu Sep 29, 2016 3:14 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Postby ssyspro » Thu Feb 16, 2017 9:07 am

Awesome it works now.

Thank you very much for fixing this so quickly.

Now I will keep my fingers crossed for Android so I can use it on the TV's also.


I believe it maybe needed at some point anyway if you plan to have this officially added to Kodi and I do hope your pursuing that, so this request may already on your todo list but could you include cmake files with the source?

stickly
Posts: 8
Joined: Tue Jan 03, 2017 8:34 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Postby stickly » Tue Feb 21, 2017 4:12 pm

Add me to the list of people who would LOVE to see an Android implemenation of this. I am running all android boxes and an NAS so I don't have to keep computers running in the house, and we are very not happy with the SD DVR implementation as-is. Thanks!!!

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Postby djp952 » Tue Feb 21, 2017 10:40 pm

Add me to the list of people who would LOVE to see an Android implemenation of this. I am running all android boxes and an NAS so I don't have to keep computers running in the house, and we are very not happy with the SD DVR implementation as-is. Thanks!!!
I've been actively working on it; just tonight I managed to get everything built without errors for Android (ARM and ARM64), but haven't tested it in any way, shape or form yet. I hope to get a couple emulators up and running tomorrow to see if the builds work at all :D Mainly had to figure out how to deal with SSL (https://), and that seems pretty much wrapped up.

Question: what Android device(s) and Kodi version (16.1 "Jarvis" or 17.0 "Krypton") are you running? If possible I'd like to make sure I'm at least barking up the right tree and test the right things here. At the moment I've only been working on Android support for 17.0 "Krypton", I don't think Jarvis is available for Android?

I'll definitely let you guys know when I think it's ready to try. Hoping for this week!!

ssyspro
Posts: 20
Joined: Thu Sep 29, 2016 3:14 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Postby ssyspro » Wed Feb 22, 2017 10:33 am

I am using Jarvis 16.1 on my Android devices.

I noticed you are using ndk r13b not sure if it would be an issue but kodi uses ndk 12b.

stickly
Posts: 8
Joined: Tue Jan 03, 2017 8:34 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Postby stickly » Wed Feb 22, 2017 3:34 pm

Great to hear! I am using a mix of Krypton 17.0 and Jarvis 16.1 currently across 1 Nvidia Shield and 3 Amazon Fire TVs. If it would only work on Krypton, it would not be a big deal to update all my devices.

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Postby djp952 » Wed Feb 22, 2017 9:13 pm

I am using Jarvis 16.1 on my Android devices.

I noticed you are using ndk r13b not sure if it would be an issue but kodi uses ndk 12b.
So far so good with the r13b NDK, the build tools themselves haven't changed and I am targeting the same Android platform as Kodi does(android-21), but I learned my lesson with GCC 5 and will probably use r12 for final versions :) I'm switching openssl and zlib to static linking on regular Linux too so they should all behave exactly the same regardless of newer/older versions on the target system. All build properly, blowing away the build environment and doing it again to check all the steps.


Return to “Kodi Community Development”

Who is online

Users browsing this forum: No registered users and 0 guests