Unofficial Kodi HDHomeRun DVR PVR Client

Kodi Community Development

Moderator: TVJunkie198

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 » Wed Sep 11, 2019 7:14 pm

For the brave souls that trust me ... new beta!

Version 2.3.0~beta1
  • Update cURL library to version 7.66.0
  • Fix bug that caused "DVR Service Subscription Required" errors when a storage engine (HDHomeRun SERVIO) is the only DVR authorized device
  • Remove specific tuner/storage distinction from device discovery to allow for devices that are both types (HDHomeRun SCRIBE)
Downloads (OneDrive): https://1drv.ms/u/s!AgEGEEVzGNq-i_04bMj ... A?e=jGbmhe

>> Remove specific tuner/storage distinction from device discovery to allow for devices that are both types (HDHomeRun SCRIBE)

This is one that worries me enough to make it available as a beta release. In order to properly support SERVIO and SCRIBE I did away with an entire database column that tracked if a device was a tuner or a storage engine and instead use the presence/absence of a DeviceID/StorageID to make that determination. Basically this builds upon what was done for starslayer74's SERVIO in the hopes that SCRIBE will also work right. To my knowledge, nobody using this PVR has a SCRIBE, at least nobody has complained that it doesn't work right :)

Failure here should be pretty obvious, if I got something wrong you'll find yourself lacking channels and/or recordings pretty much immediately. I didn't run into any problems and did a code step-through for each affected function so while I don't anticipate failure, please be advised that since this is a version bump (2.3 instead of 2.2), your previous PVR database file will be left intact and you can roll back any time. You can even use the in-built Kodi "Update" function to go backwards for the platforms that support it (all but UWP/XBox at this point)

Thanks for being brave, shout out if things get weird. I'd really like to knock off at least one item from the ol' backlog but making sure SERVIO and SCRIBE are happy is a good reason for an update too!

PS - A thousand thanks to JasonL for his assistance with what to expect from a SCRIBE device!

jasonl
Silicondust
Posts: 14739
Joined: Sun Oct 28, 2007 9:23 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by jasonl » Thu Sep 12, 2019 1:12 pm

Quick test of my SCRIBE looks OK for live and recorded TV.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 » Thu Sep 12, 2019 7:49 pm

jasonl wrote:
Thu Sep 12, 2019 1:12 pm
Quick test of my SCRIBE looks OK for live and recorded TV.
That's good enough for me, thank you sir! I'll go ahead and get this out so anybody using SERVIO and/or SCRIBE can become functional .. the backlog items can wait :)

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 » Thu Sep 12, 2019 8:25 pm

Let's give a big welcome to SERVIO and SCRIBE users! These are pretty cool devices, I'm happy to make some adjustments here and there to ensure they will work right if those folks end up walking this way ...

Version 2.3.0 (2019.09.12)
  • Update cURL library to version 7.66.0
  • Fix bug that caused "DVR Service Subscription Required" errors when a storage engine (HDHomeRun SERVIO) is the only DVR authorized device
  • Remove specific tuner/storage distinction from device discovery to allow for devices that are both types (HDHomeRun SCRIBE)
Downloads: This is a minor release overall with nothing Earth-shattering for existing users -- the goal is compatibility with SERVIO and SCRIBE devices. The minor version (.3) was bumped up due to a database schema change the requires a new PVR addon database file to be created. Auto-update manifests (Leia) have been published, for the platforms that support this (everything except UWP/XBox) you should automatically get the update within a day or two.

I apologize that this isn't a more meaty release overall, but the complaints/issues/problems are as low as I think they ever were and my backlogged items are relatively difficult and time consuming to implement (let alone not extremely useful to the end users)

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by clarkss12 » Fri Sep 13, 2019 7:35 am

Unfortunately,, I can't help myself. I updated to Kodi 19, and now your PVR client won't work.. Any thoughts on working on that?
BTW, you have created some awesome work. Your PVR client works on ALL of my differnent OS's and hardware.........
Truly amazing,, thanks.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 » Fri Sep 13, 2019 7:47 am

I have been keeping a Matrix baseline up to date but I haven't tried it in a while. It needs some fundamental changes still (like different Android SDK/NDK versions). I can provide a test version relatively soon since it's now desired, let me see how far off it is from functional and get back to you.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by clarkss12 » Fri Sep 13, 2019 10:24 am

djp952 wrote:
Fri Sep 13, 2019 7:47 am
I have been keeping a Matrix baseline up to date but I haven't tried it in a while. It needs some fundamental changes still (like different Android SDK/NDK versions). I can provide a test version relatively soon since it's now desired, let me see how far off it is from functional and get back to you.
Thanks, but don't put yourself out just for me.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 » Fri Sep 13, 2019 12:24 pm

clarkss12 wrote:
Fri Sep 13, 2019 10:24 am
djp952 wrote:
Fri Sep 13, 2019 7:47 am
I have been keeping a Matrix baseline up to date but I haven't tried it in a while. It needs some fundamental changes still (like different Android SDK/NDK versions). I can provide a test version relatively soon since it's now desired, let me see how far off it is from functional and get back to you.
Thanks, but don't put yourself out just for me.
Please, you know I love doing this otherwise I would have stopped a long time ago! After updating the requisite dependency version numbers, the as-is code (2.3.0~beta1) seems generally fine on Windows. So ...

Version 2.3.0~beta1 for Matrix (Kodi 19) - 9/12/2019 nightly (ref:ac532152)
NOTE: Universal Windows (UWP/XBox) packages are NOT available

(OneDrive Link) https://1drv.ms/u/s!AgEGEEVzGNq-i_1VdHZ ... Q?e=ShAraZ

The only obvious glitch I ran into was that my channel orders were all muffed up in the EPG, I had to do a Clear Data to correct them. The latest PVR API change they made allows me to specify the order the channels will appear, I'll probably take advantage of that one and perhaps even add an option to let you choose how to sort them.

Let me know what kind of problems you run into, I haven't paid much attention to Matrix lately. Been trying to knock off my main backlog item (trigger discovery when demanded by Kodi instead of during startup), but I've not been pleased with how that's panned out yet.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by clarkss12 » Fri Sep 13, 2019 1:14 pm

Working perfectly on Kodi 19... Awesome, thank you.

This is running on my newest "test" box, the Beelink GT1 mini 2 with the newest Amlogic S905X3 SoC. Android 9.

bds3151
Posts: 18
Joined: Fri May 11, 2012 7:59 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by bds3151 » Thu Sep 19, 2019 5:54 am

On resume from s3 sleep, I cannot play channels until I manually disable/enable pvr plugin. Win10/Intel NUC platform on Kodi 18 Leia.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 » Thu Sep 19, 2019 4:30 pm

bds3151 wrote:
Thu Sep 19, 2019 5:54 am
On resume from s3 sleep, I cannot play channels until I manually disable/enable pvr plugin. Win10/Intel NUC platform on Kodi 18 Leia.
I believe this is a general issue with something in Kodi (I gave up on Sleep on my NUC a long time ago), but will see if there is something I can do.

The main issue as I recall is that Kodi doesn't actually send the PVR the sleep command until after the system resumes, which caused me problems. I had some pointless code at one point to respond to it but took it out a while back.

I might be able to use the wake callback to reset things internally to the PVR depending on what the issue is.

Any chance I can get the Kodi logs for the event? I'd like to see what errors the PVR is encountering trying to establish the stream.

bds3151
Posts: 18
Joined: Fri May 11, 2012 7:59 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by bds3151 » Sat Sep 21, 2019 1:52 pm

Sorry but I have it waking from sleep ok now and don't have the old logs. I changed the Win10 powercfg to not hibernate and the intel bios to not s5. That seemed to cure the issue. I also had another problem where the nuc I had connected with powerline devices was buffering quite alot. I changed the DVR read and ring buffer size to 8kib/mib and it seemed to stop the buffering. I don't have a lot of viewing time since changing these parameters so I am not totally sure the problems are gone. I'll keep you posted. Thanks for responding.

bds3151
Posts: 18
Joined: Fri May 11, 2012 7:59 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by bds3151 » Mon Sep 23, 2019 7:09 am

I guess I spoke too soon as my wake from sleep problem has returned. I have to disable/enable the PVR to watch any channels after sleep. Do I send the log to you via email?

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 » Mon Sep 23, 2019 7:56 am

bds3151 wrote:
Mon Sep 23, 2019 7:09 am
I guess I spoke too soon as my wake from sleep problem has returned. I have to disable/enable the PVR to watch any channels after sleep. Do I send the log to you via email?
That works! I'll PM you an e-mail address to use (not that it's a secret)

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 » Mon Sep 23, 2019 11:00 am

bds3151 wrote:
Mon Sep 23, 2019 7:09 am
I guess I spoke too soon as my wake from sleep problem has returned. I have to disable/enable the PVR to watch any channels after sleep. Do I send the log to you via email?
Thank you for the log file. I see what is going wrong.

What's happening here is that the system is having a problem getting out to the Internet immediately upon wake-up; the request to discover your devices via HTTP is failing. In the particular case you sent me, more than 24 hours have elapsed since the last successful device discovery, so the old authorization codes have been purged (by design). But, since it couldn't get any new authorization codes, everything starts to fall apart. Effectively, the PVR is self-purging since it thinks you have no HDHomeRun devices anymore.

There are a couple things we can do short-term here:

The first thing to try is to turn off HTTP discovery in the PVR advanced settings. This re-enables UDP broadcast discovery, which doesn't need to go out to the internet to get data, it stays on your local network. This may or may not work any better, it depends on if your PC's network is actually "up" or not -- if it's just taking a long time to establish an Internet connection this may help a lot.

The second thing I would try is to see if there is a way to prevent your network adapter from going to sleep. I am unfamiliar with Powerline networking, but typical Wifi and hard-wired drivers do usually have an option in the device settings to disable sleep. If your powerline network adapter is USB-based, you can also look up "USB Selective Suspend" and see if disabling that helps.

You can also restart Kodi as opposed to disabling/enabling the PVR, and there is a way to force disovery to occur when you want in the "Client Settings" area of PVR & Live TV settings, but I don't have a simple "redo everything" link (at least not yet?). So I think that would be much more tedious.

I need to put some thought into a long-term solution for you. What I used to have in the sleep/wake was intended to deal with things like this, but it was ultimately useless since Kodi doesn't actually notify when the system is going to sleep, you get both sleep and wake after the fact. In your case it wouldn't have helped anyway, since it would have been immediate and your network isn't fully up yet. The next major version of the PVR will have all-new discovery logic that would be better suited for this, but I can come up with something that should help.

Post Reply