Unofficial Kodi HDHomeRun DVR PVR Client

Kodi Community Development

Moderator: TVJunkie198

Post Reply
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 11:24 am

Thanks. I think it is that the sleep- resume is slow on the powerline devices as I have one device that works fine with a permanently connected ethernet line.

djp952
Posts: 958
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:34 am

and ... a couple other things.

You can also set the discovery intervals significantly lower (particularly devices) to combat this a bit, the PVR will self-resolve once these tasks run again. The sticking point here is that since there are no auth codes, the EPG will be disabled for 10 minutes (non-configurable) so this may be pointless.

The real reason for replying again is that there is a relatively simple method in Windows to determine the network connectivity state, I'll play with that tonight. It looks like something that can be added relatively quickly and can be incorporated into the "new" discovery stuff more permanently when that's ready. I can make a windows-only change to restore the OnWake() callback and have it sit there and wait for a reasonable amount of time for the network to become available, then execute a full re-discovery like the PVR does at startup.

I'll see what I can come up with for you.

djp952
Posts: 958
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 9:20 pm

Because I have been doing software beta releases since before it was cool ....

Version 2.3.1~beta1 (2019.09.23)
  • Fix potential for a race condition in background task scheduler when synchronously executing a task
  • Improve performance of backend series episode (timers) discovery
  • (Windows) Wait for IPv4 network connectivity to become available before executing wakeup discovery tasks
Link to .zip files (OneDrive):
https://1drv.ms/u/s!AgEGEEVzGNq-i_5E6gM ... Q?e=BaXuNY


The intention of this Beta release is to see how well (or if) the problems being experienced by bds3151 are solvable on Windows platforms. While the implementation is intended to be temporary due to pending discovery changes in v2.4.0, v2.3.1~beta1 on Windows takes it's time to ensure that the network is "up" after a sleep/wake event pair. On Android/*nix/OSX platforms I expect little to no difference, but the "OnSystemWake" scheduled task that re-discovers everything under the sun has been put back.

On Windows, v2.3.1 will now enter a loop of sorts waiting for the IPv4 network to become available after a system WAKE event. The other changes are minor/inconsequential and intend to resolve an extremely unlikely race condition in the task scheduler and speed up the worst performing discovery task (series episodes).

The Windows changes are considered temporary since I'd like to do the same thing on Android/Linux/OSX if possible, but I was unable to easily find any way to accomplish it in C/C++ on any platform except Windows.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by bds3151 » Tue Sep 24, 2019 3:38 pm

Thanks very much for the fast response. The beta release is working fine so far.

djp952
Posts: 958
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 » Tue Sep 24, 2019 3:44 pm

If you don't mind I would love to see a Kodi log again with the new network wait. Or you can just look too. Hopefully there will be a couple/few entries like 'IPV4 Network not available' followed by one that says it is. I set the retry for 1 second, so if you see something like 'previous message repeated 50 times' I set that way too low. My guess is that we only need 2 or 3 seconds before the network comes back up all the way.

Oh, and thank you for testing it! As long as it works for you consider it a permanent feature :) I appreciate every time I can do something that solves a problem!!

timecutter
Posts: 17
Joined: Mon Aug 20, 2018 5:12 am

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by timecutter » Wed Sep 25, 2019 3:56 pm

EDL - multiple record engines

If we have multiple record engines, current EDL implementation only allows for one EDL location. Haven't looked at the code due to laziness, would it be possible to add multiple locations for it to look for the EDL files in. Like check location 1, if no then check 2 and then punt if not in either.

EDL works well for us here otherwise.

thanks

ddejager
Posts: 122
Joined: Tue May 06, 2014 2:26 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by ddejager » Wed Sep 25, 2019 4:41 pm

Why is it that some of my timer rules can only be viewed, while most can be edited? I just set up a record once rule for a show tonight and want to change it to record series, but there is no option to edit that rule, only to view it.

signcarver
Expert
Posts: 8460
Joined: Wed Jan 24, 2007 1:04 am
Device ID: 131B34B7 13231F92 1070A18E 1073ED6F 15300C36

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by signcarver » Wed Sep 25, 2019 4:48 pm

Most likely because of this from SD's documentation...
It is not possible to convert between a Series, Movie, Team, or DateTimeOnly rule. It is not possible to modify the TeamOnly property of the DateTimeOnly property.
What this usually means is one creates a (new) series rule. This may delete the oneoff rule but that behavior has been changed a few times.

Though I haven't looked at what this addon does, you should be able to edit things like padding on oneoff rules.

djp952
Posts: 958
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 25, 2019 6:00 pm

timecutter wrote:
Wed Sep 25, 2019 3:56 pm
EDL - multiple record engines

If we have multiple record engines, current EDL implementation only allows for one EDL location. Haven't looked at the code due to laziness, would it be possible to add multiple locations for it to look for the EDL files in. Like check location 1, if no then check 2 and then punt if not in either.

EDL works well for us here otherwise.

thanks
Good idea! Never thought of that, will add it to the backlog sir!

ddejager
Posts: 122
Joined: Tue May 06, 2014 2:26 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by ddejager » Wed Sep 25, 2019 6:18 pm

signcarver wrote:
Wed Sep 25, 2019 4:48 pm
Most likely because of this from SD's documentation...
It is not possible to convert between a Series, Movie, Team, or DateTimeOnly rule. It is not possible to modify the TeamOnly property of the DateTimeOnly property.
What this usually means is one creates a (new) series rule. This may delete the oneoff rule but that behavior has been changed a few times.

Though I haven't looked at what this addon does, you should be able to edit things like padding on oneoff rules.
I simply set up an attempt to record a show that was not being recorded. I did this by selecting the show from the guide and then clicking on record. Then I decided I wanted to change it from a one off to record a series. Shouldn't this be possible?

djp952
Posts: 958
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 25, 2019 6:20 pm

ddejager wrote:
Wed Sep 25, 2019 4:41 pm
Why is it that some of my timer rules can only be viewed, while most can be edited? I just set up a record once rule for a show tonight and want to change it to record series, but there is no option to edit that rule, only to view it.
signcarver is spot-on as always, there are limitations to what we can do on both the SD backend web services and also within Kodi. Kodi is designed for a more traditional PVR set of operations (i.e. Windows Media Center), HDHomeRun has it's own rules and ways of doing things.

A "Record Series" Timer Rule can be edited, but a "Record Once" currently cannot. Technically speaking, the backend would allow us to modify the rule to an extent, we can change at least the channel number, the start padding, and the end padding. The PVR actually has to code to do that, in fact. Unfortunately there is no support in Kodi to let me be that granular. Editing a Timer Rule in Kodi is an all-or-nothing proposition, I would need to remove the ability for you to view the Day and Start Time in Kodi to allow editing of the other fields, again it's all or nothing. To that end, I've never been a huge fan of using Day and Start Time for these timer rules, but it's as close as Kodi gets. It just doesn't have the UI support right now to let me show you the end time without messing other things up. I did look into adding the things we would need, but I was pushing my luck with what they did accept from me for Leia, since it truly only benefited this particular PVR addon.

So while in reality you CAN edit these timer rules to an extent, there just isn't the support in Kodi to allow that.

If this is something you think is important enough to reconsider pushing for Kodi 19, I can have another look. I personally find it easy enough to just delete the rule and make a new one, but I don't want to presume that's how everyone else feels about it :)

djp952
Posts: 958
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 25, 2019 6:22 pm

ddejager wrote:
Wed Sep 25, 2019 6:18 pm
signcarver wrote:
Wed Sep 25, 2019 4:48 pm
Most likely because of this from SD's documentation...
It is not possible to convert between a Series, Movie, Team, or DateTimeOnly rule. It is not possible to modify the TeamOnly property of the DateTimeOnly property.
What this usually means is one creates a (new) series rule. This may delete the oneoff rule but that behavior has been changed a few times.

Though I haven't looked at what this addon does, you should be able to edit things like padding on oneoff rules.
I simply set up an attempt to record a show that was not being recorded. I did this by selecting the show from the guide and then clicking on record. Then I decided I wanted to change it from a one off to record a series. Shouldn't this be possible?
Hmmm... that would be a rather cool feature, actually. There might be a menu hook option for the timers area in Kodi I could potentially use to provide such a thing. Let me get back to you on this particular detail. Previous post explains why they can't be edited in and of themselves ...

edit: my thinking here is that the PVR could add a new series rule based on the date/time rule (conversion is not allowed, per signcarver's post), and then if successful delete the date/time rule. Not considering trying to do the impossible :)
Last edited by djp952 on Wed Sep 25, 2019 6:26 pm, edited 1 time in total.

ddejager
Posts: 122
Joined: Tue May 06, 2014 2:26 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by ddejager » Wed Sep 25, 2019 6:23 pm

Thanks. So what is the "correct" (and easy) way to record a series when you click on a show in the guide? I must be missing something simple....

djp952
Posts: 958
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 25, 2019 6:28 pm

ddejager wrote:
Wed Sep 25, 2019 6:23 pm
Thanks. So what is the "correct" (and easy) way to record a series when you click on a show in the guide? I must be missing something simple....
Right-click on the entry, choose "Add Timer". It should default to "Record Series", if not the very first line item is the timer type, you can choose between "Record Series" and "Record Once". The "Record" right-click option in the EPG will always create a date/time only (once) timer, similar to pressing the red RECORD button if you are watching a program in the player. Kodi actually calls the same function for both operations.

djp952
Posts: 958
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 25, 2019 6:40 pm

djp952 wrote:
Wed Sep 25, 2019 6:22 pm
Hmmm... that would be a rather cool feature, actually. There might be a menu hook option for the timers area in Kodi I could potentially use to provide such a thing. Let me get back to you on this particular detail. Previous post explains why they can't be edited in and of themselves ...
Unfortunately, this wouldn't work out very well. I can add a menu hook for every Timer-related right-click menu, but I have no way to only have it visible for a specific timer rule type like it would need. Something like "Convert to Series Rule" would show up in every menu, and would need to raise an error or just do nothing if you weren't in a Date/Time Only rule when you selected it.

It would need a lot of Kodi changes to be effective IMO; an entirely new menu hook category and a way to make menu hooks conditional.

sorry.

Post Reply