Unofficial Kodi HDHomeRun DVR PVR Client

Kodi Community Development

Moderator: TVJunkie198

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

cncb wrote:
Sun Apr 19, 2020 3:55 pm
I was able to get the log from when this happened last night. We started watching the in-progress recording "One World Together at Home" about an hour after it started recording. We were watching and skipping ahead until about 10 when the recording was scheduled to end and the playback unexpectedly stopped (we had about 20 minutes left in the recording to watch). I see this line in the log:

2020-04-18 22:03:41.127 T:1688 ERROR: AddOnLog: HDHomeRun DVR PVR Client: SeekRecordedStream: seek operation failed with exception: HTTP 416: Range Not Satisfiable

I'm not sure I used paste.kodi.tv properly but here is a link: https://paste.kodi.tv/elatipadex.kodi
Used it perfectly, thank you! This is also a great piece of additional information, I think I know what to do to duplicate this now. Seek operations actually stop and restart the stream, and typically Kodi needs more than one seek to get where it wants to go, I'm betting the transition of the response headers from infinite (live) to finite (recorded) is either tripping me or RECORD up. My guess is that this will be a pretty rare circumstance in practice, but now I know what to do to break it. Definitely opening a GitHub issue for this, it may take a bit of time to fix:

https://github.com/djp952/pvr.hdhomerundvr/issues/66

gregeeh
Posts: 28
Joined: Thu Apr 09, 2020 8:27 pm
Location: Sydney, Australia

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by gregeeh »

Hi,

Can someone please let me know how I can setup a series to be recorded without any duplicates via the EPG? I've tried many variations and I still cannot only get the first showing of each tv show.

TIA

Greg

signcarver
Expert
Posts: 8991
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 »

That is a function of the DVR engine not this client, and typically anything is a candidate... though this client does expose more features than the HDHomeRun App. One possible way would be to set an AfterOriginalAirdateOnly to same date in the future (though personally I suggest using "now") then the engine will only see episodes marked as "new"... I don't know if this project allows such but even if it does, and if it does I forget if you have to use "linux time" or if it allows date entry (in looking briefly it looks like it allows All, Recent, or New but I am unsure how dvp952 chose to implement "New" (Edit: looks like it uses midnight UTC of today). Episodes marked as "new" (FirstAiring) will always record regardless of settings unless you manual schedule each episode. Typically that attribute is only seen within 4 hours of airing... I do believe there have been improvements to the guide that allow one to "guess" it is "new". For most people just using "recent" (this season) will suffice as it only records anything that originally aired in the past 90 days (at time it actually considers to record it). There will be cases if you don't specify Channel Only that it will come on as "New" on another channel.

I would feel more comfortable answering in a section about the DVR not Kodi as the engine is what actually decides if something records, but describe your situation (shows, channels, etc) as the engine should only record one of each episode. If it is not doing such, that is usually an issue with guide data or deleting the wrong way... one thing you must do though is make sure if you delete that you use an app that deletes through the engine and you don't specify re-record otherwise it will rerecord.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

Just to expound a little on signcarver's response (and he's right, for general DVR functionality the regular software forum is probably the best place) ..

In this PVR, when adding a timer/rule from the Kodi EPG you have two options:

The first, "Record", will just set that one episode of a program to record on that specific channel. Even if the program has been recorded and deleted before, it will (should) still record for you.

The second option, "Add Timer", is there the flexibility lies. When selected, you will be presented with a dialog box with some options in it:
  • Type - Record Series (default), or Record Once. Record Series sets up a typical multi-episode rule for the series, whereas Record Once sets up a one-time recording
  • Name - self-explanatory and it doesn't matter if you edit this or not - the field has to be there, but the value isn't used for anything
  • Channel - This allows you to limit the series to record on just the specified channel (default), "Any Channel", or any other specific channel. I have no way to limit the channels you see here, so if you pick a channel the series will never air on, nothing will ever get recorded.
  • Prevent duplicate episodes - Record all episodes (default) says that you want every episode that has or will ever air for this series recorded. Note that as signcarver indicated, once an episode is recorded successfully if it is subsequently deleted without "Delete and Re-Record", it will never record again. Record only new episodes sets the rule to indicate only episodes of the series that air this calendar day or later should be recorded. Record only recent episodes indicates to just record the current (and subsequent) season(s) of the series.
  • Start padding time / End padding time - Adds the specified number of minutes to either before the start of the recording or after the end of the recording. You can also set up a default for these in Kodi itself, the PVR obeys that, so it's typically set to zero, which in reality equates to 30 seconds of padding.
That's kind of the nickel tour on how to set up via the EPG. Setting up via Timer Rules is similar, but you need to enter a series name to search for, and potentially choose from a list of matches. Otherwise the basic options are the same.

One thing we can't currently do with series rules is cancel a specific episode of a series, although the HDHomeRun app's UI kind of implies that feature may be coming at some point. One common new user complaint/concern is that you can't do that. Unfortunately the best answer I have at this time if that comes up is to let it record and just delete it later.

It's also important to note that this PVR addon doesn't actually record anything; it's merely a conduit to the HDHomeRun DVR services. Everything you do here will also be accessible and editable from the HDHomeRun app, and vice-versa. If the options are set the way you want and they aren't behaving as expected, I can help make sure it's not a bug/defect in this code, and perhaps help to narrow it down, but most issues with things recording or not recording will likely need to be passed onto SD for triage. That's not a cop-out, I always assume problems are mine to fix first, but there will be times I may have to pass the proverbial buck :)

gregeeh
Posts: 28
Joined: Thu Apr 09, 2020 8:27 pm
Location: Sydney, Australia

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by gregeeh »

@djp952 - Thanks for the great explanation. So to summarise the 'Prevent Duplicate Episodes':

Record all episodes - Will record current and all episodes including past, present and duplicates.

Record only new episodes - Will record current episode and new episodes, including repeats of any episodes past the current episode for the current series.

Record only recent episodes - Will record current episode plus any other episodes in the current season and future seasons, including repeats.

So if my understanding is correct, and please correct me if I'm wrong, if I have a program whose new episodes are start between 7:30PM and 8:30PM, on Channel 10 every Monday and run for 2 hours with repeats several times that day and the following week there is no way to just record that one program once per week using the options above.

What I have asked to do in the program example above is not unusual at all. Many programs are aired only once per week and repeated several times after the initial showing, with new episodes each week.

Again, thanks for all your input.

Greg

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

gregeeh wrote:
Mon Apr 20, 2020 10:34 pm
So if my understanding is correct, and please correct me if I'm wrong, if I have a program whose new episodes are start between 7:30PM and 8:30PM, on Channel 10 every Monday and run for 2 hours with repeats several times that day and the following week there is no way to just record that one program once per week using the options above.
It should only be recording one instance of any given series episode. There must be something different about the metadata for each airing that would cause the DVR to record it more than once. If this is happening, you should likely contact SiliconDust about it, the DVR isn't supposed to behave that way. They would be the experts to look at the data and provide the proper explanation.

signcarver
Expert
Posts: 8991
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 »

Though djp952 does a fairly good job of tracking potential recordings, typically anything that matches the rule is a potential candidate to record and may show a timer or some other indication of a recording that won't actually take place. It is the engine itself at the time of recording that decides whether or not to make the recording. If it has the episode it shouldn't record another of the same episode regardless of any of those settings an exception would be the engine no longer having the episode and such was deleted by something not using the engine to delete or using the engine and specifying to rerecord. Also it will record any episode marked as "new" as if it is new, you don't have it yet but the api doesn't really display that "new" tag as well as it "should" (the xml guide data "might", I haven't looked at it that closely but have seen some recording indicators that often "suggest" that it is new but the only sure fire way is only in the 4 hours prior to the start of the recording is to behave like an engine and retrieve the rules of what to record in the next few hours).
Also be weary of New and Recent cause issues of nothing being recorded for that series, particularly for news programs and shows that may have an original air date prior to 90 days (recent) or when you set up the recording (new) unless it actually has a "new" tag. Also keep in mind that "new" is new from when you set up the recording and a year from now anything that originally aired in the past year matches the rule until you set up the recording again.

My suggestion is to pay little attention to what "might" record but to look at what actually records and if multiples of the same episode actually get recorded bring it to the attention of SD and be specific as to what series and times the engine actually recorded.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

Thanks, signcarver, I didn't consider it may be the "Timers" view that's confusing as opposed to programs actually being recorded more than once.

I can probably add another filter to that view to only show the first occurrence of any given program flagged to record. This area has always been a bit of a square peg in a round hole.

edit: Confirmed. I added a new series rule for something on Disney where they repeat things constantly and if an episode is flagged as "RecordIfNotRecorded" it will show up in Timers multiple times. Once it's recorded, the extra instances will fall out of Timers automatically. Adding a to-do.

edit 2: It's now a to-done. Will be in next version and/or Beta release. Have one more thing to work on before sending something new out. Now only the first instance of an otherwise duplicate Timer will be shown. "Duplicate" is based on a combination of the Program Identifier, Original Air Date and Episode Number. Not all programs report both Original Air Date and Episode Number, so it will be possible to see a duplicate if different information is reported for what is technically the same episode. I believe this will be rare.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

A couple final changes to test if you want before the next version goes live. Everything looks pretty good to me so far ...

Version 3.2.2~beta3 - April 21, 2020
  • Update cURL library to version 7.69.1
  • Adapt to HDHomeRun RECORD engine 20200318 breaking changes
  • Apply recording rule start and end time padding deltas to the reported start and end times for timer instances
  • Omit reporting of original air date for programs of type News/Current Affairs unless a specific season/episode is specified
  • De-duplicate the list of reported timer instances so that only the first airing of an unrecorded program is shown
  • Add "Disable blocking of DRM protected channel streams" advanced option
De-duplicate the list of reported timer instances so that only the first airing of an unrecorded program is shown
This change is based on the recent commentary surrounding yet more potential confusion how the Kodi "Timers" area works for this PVR. What this does is de-duplicate the Timers that may be reported for programs that will air multiple times before they are actually recorded by the DVR engine. The selection is arbitrary in nature, you should now only see the first airing of any given program in the list, regardless of channel(s) that it may air on. I fear this may cause a bit more confusion for Timer Rules set to "Any Channel" as the channel the PVR opts to flag might not be the one that the program actually records on, but "that's why we have betas!".

Add "Disable blocking of DRM protected channel streams" advanced option
This is a fairly odd duck of a setting with a specific purpose in mind -- if a channel is improperly flagged as DRM by the HDHomeRun tuner(s), there is currently no way to access it via this PVR. This setting DOES NOT ALLOW DRM CHANNELS TO WORK VIA KODI. If you have channel(s) that you believe are improperly flagged as DRM when they are not, I strongly suggest contacting SiliconDust to figure out why that is. But, in the meantime, if you are willing to jump through a few hoops I think I've got ya covered now. Here's what you will have to do:
  • Enable the General option "Show DRM protected channels in channel lineups"
  • Enable the Advanced option "Stream Live TV channels directly from tuner device(s)"
  • Enable the Advanced option "Disable blocking of DRM protected channel streams"
I have no way to test this particular setting myself; all my channels flagged as DRM are truly DRM. This has been a very rare circumstance over the years, but I hope that it provides a temporary path forward for people that find themselves in this situation (looking at you, Spectrum Cable!).

As with all Betas, you must install manually from the provided .zip file as if it were a new installation of the addon. You can roll back to the previous formal version (v3.2.1) via the Kodi addon "Update" function if desired. If you are happy with the code as-is, it will automatically update to the formal version when available.

Link to Kodi 18 "Leia" installation files (OneDrive):
https://1drv.ms/u/s!AgEGEEVzGNq-jJFrFb5 ... w?e=a0cMiQ

I hope this can close out the bulk of the recent concerns with the PVR addon, and I always appreciate feedback, be it positive or negative. Thank you all for using my little project!!

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

FYI on a Kodi PR that looks like it will go through. I know this is a nit-pick item but it definitely has come up multiple times and if it bugs you it seems to REALLY bug you so ...

https://github.com/xbmc/xbmc/pull/17740

This fixes the channel name you see during "Importing guide from clients ..." without needing to clear data to reset it if the channel name has changed. For this addon, the channel name(s) come from the tuners initially and are replaced with the EPG data names, which is why you see the different names in that banner. When you Clear Data, the addon already has the EPG data names, so it gets set everywhere and the problem goes away. Looks like a go for Matrix, I asked about back-porting for Leia 18.7, I doubt that will be a problem.

Truth in motivation: I had stumbled upon some article about this addon and me from a couple years ago, and the author complained about this too. Said it was my fault this happened so I thought I should finally try to do something about it so I could prove him wrong :)

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

Because it "works fine on my PC" -- thank you to everyone here this release is pretty much exclusively feedback driven in nature.

Version 3.2.2 (2020.04.23)
  • Update cURL library to version 7.69.1
  • Adapt to HDHomeRun RECORD engine 20200318 breaking changes
  • Apply recording rule start and end time padding deltas to the reported start and end times for timer instances
  • Omit reporting of original air date for programs of type News/Current Affairs unless a specific season/episode is specified
  • De-duplicate the list of reported timer instances so that only the first airing of an unrecorded program is shown
  • Add "Disable blocking of DRM protected channel streams" advanced option
Download Links: Auto-update is live, if enabled Kodi should update the addon automatically for you within the next 24-48 hours. No need to uninstall/downgrade one of the beta releases, they will also self-update to the release version.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

FYI, I also found what I think is the root cause for new channels screwing up the EPG in Leia and submitted a PR for that as well, hopefully the criticism will be light and it can make it into Leia 18.7. The PR to fix the channel labels during "Importing guide" ended up as Matrix-only, but it was merged.

The problem with Leia will occur when new channels were added on your HDHomeRun tuner(s) while Kodi wasn't running. When Kodi starts up and the new channel list is provided, it's EPG database isn't open yet so the internal indexes for the channel EPGs will start over from zero, ultimately overwriting what used to be at those indexes and causing grief. This explains why channels near the start got more screwed up than near the end. This has bugged me for quite some time!

For now, like with the channel labels during "Importing guide", the only way to recover from this is to "Clear Data" in Kodi after it's all started up and fully loaded.

I plan on building myself a Leia with BOTH changes in it, for Windows x64 only, LMK if you want me to share the .EXE. I can't build Kodi for any other platforms (sorry).

jrpatx
Posts: 54
Joined: Mon Sep 04, 2017 12:46 pm
Device ID: 1056BDB2, 10727095

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by jrpatx »

Anyone know of any compatibility issues between the latest version of the PVR add-on (v 3.2.2) and Ubuntu 20.04 LTS? I had been running the Krypton-compatible version of the add-on with Ubuntu 18.04 LTS for some time with no issues. When I upgraded to Ubuntu 20.04 LTS, which includes Kodi Leia 18.6 in its repository, Kodi reported that the PVR add-on was not compatible. I uninstalled the older Krypton-compatible version, and installed the newer Leia-compatible version (v -linux-x86_64-leia-3.2.2.7418). No more compatibility warnings, and the add-on launches and shows Live TV, Guide Info, and Timers no problem, but the Recordings tab shows an empty folder.

The official version of the Kodi plugin still works, displaying the full contents of the DVR folder (running on a WDMyCloud NAS). I tried reinstalling the PVR add-on as well as reinstalling Kodi itself, but result is always the same. I also tried both UDP broadcast as well as http cloud-based discovery, no change. All of this is with the Leia 18.6 version of Kodi from the ubuntu-focal-universe. There is also a Leia 18.5 version available via flatpak that I have not tried yet.

Any ideas are much appreciated!

Thanks!
John

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by Ken.F »

jrpatx wrote:
Wed Apr 29, 2020 8:29 pm
Anyone know of any compatibility issues between the latest version of the PVR add-on (v 3.2.2) and Ubuntu 20.04 LTS?
3.2.2 is working fine for me on Ubuntu 20.04 running in VirtualBox. No problem playing recordings from the DVR.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

jrpatx wrote:
Wed Apr 29, 2020 8:29 pm
Anyone know of any compatibility issues between the latest version of the PVR add-on (v 3.2.2) and Ubuntu 20.04 LTS? I had been running the Krypton-compatible version of the add-on with Ubuntu 18.04 LTS for some time with no issues. When I upgraded to Ubuntu 20.04 LTS, which includes Kodi Leia 18.6 in its repository, Kodi reported that the PVR add-on was not compatible. I uninstalled the older Krypton-compatible version, and installed the newer Leia-compatible version (v -linux-x86_64-leia-3.2.2.7418). No more compatibility warnings, and the add-on launches and shows Live TV, Guide Info, and Timers no problem, but the Recordings tab shows an empty folder.

The official version of the Kodi plugin still works, displaying the full contents of the DVR folder (running on a WDMyCloud NAS). I tried reinstalling the PVR add-on as well as reinstalling Kodi itself, but result is always the same. I also tried both UDP broadcast as well as http cloud-based discovery, no change. All of this is with the Leia 18.6 version of Kodi from the ubuntu-focal-universe. There is also a Leia 18.5 version available via flatpak that I have not tried yet.

Any ideas are much appreciated!

Thanks!
John
Hi jrpatx, no specific concerns that I am aware of, my guess based on the symptoms is that the PVR is having problems finding or chatting with the RECORD engine. I would like to request the Kodi log file, it will show us what device(s) have been discovered and any errors that have been encountered by the PVR. I'll PM you an e-mail address you can use, or since it's a Kodi log it should be OK to use http://paste.kodi.tv.

A questions about related behavior -- when watching Live TV, do you have the ability to seek? If you can seek, the RECORD engine was found and is working so it's likely we'll find a recordings specific error. If you can't seek, the PVR didn't find the RECORD engine for some reason.

Let's start with the log and see where that leads us!

Post Reply