Yeah, I think this is becoming a "just me" problem again. I'm about done trying to use this from Windows, every patch Tuesday becomes a crap shoot as to what new problems will arise.
Unofficial Kodi HDHomeRun DVR PVR Client
Moderator: TVJunkie198
-
- Posts: 1339
- Joined: Wed Oct 01, 2008 8:46 pm
- Device ID: 131EB7F7;131ED0E0
- Location: Elkridge, MD USA
- x 20
Re: Unofficial Kodi HDHomeRun DVR PVR Client
Re: Unofficial Kodi HDHomeRun DVR PVR Client
Is there a way to figure out which recording is making the recording import barf with this log message?
HDHomeRun DVR PVR Client: update_recordings_task failed due to an exception: UNIQUE constraint failed: recording.deviceid, recording.seriesid, recording.recordingid (1555)
HDHomeRun DVR PVR Client: update_recordings_task failed due to an exception: UNIQUE constraint failed: recording.deviceid, recording.seriesid, recording.recordingid (1555)
-
- Posts: 1339
- Joined: Wed Oct 01, 2008 8:46 pm
- Device ID: 131EB7F7;131ED0E0
- Location: Elkridge, MD USA
- x 20
Re: Unofficial Kodi HDHomeRun DVR PVR Client
Not really anymore without the old recorded_files.json output from the previous RECORD engine(s)jasonl wrote: ↑Tue May 26, 2020 6:51 pm Is there a way to figure out which recording is making the recording import barf with this log message?
HDHomeRun DVR PVR Client: update_recordings_task failed due to an exception: UNIQUE constraint failed: recording.deviceid, recording.seriesid, recording.recordingid (1555)

This happened to somebody else that had duplicate seriesids of "UNKNOWN" from manually importing some recordings to the system. I have a somewhat fixed version available as "3.3.1~beta1", linked here: viewtopic.php?p=359428#p359428 (still valid). This should at least get you past the problem. Sorry for not making it formal sooner, I expected this to be extremely rare.
The caveat with the "fix" is that with new RECORD there is no way to get any recording other than the first that has the duplicate seriesid. Since I have to use seriesid now to get any recording information at all, querying the same URL multiple times does no good, you get what you get.
Give the beta version a try if you don't mind to see if that gets you around it for now, let me know if you need a build for Matrix or Leia UWP, otherwise it should work. If not, please let me know, and if you don't mind a copy of the output from the ?DisplayGroupID=root query would help too. I'll look into adding an intermediate step in the discovery to at least log when duplicate seriesids are detected, it would be handy to help explain why somebody's recordings are missing.
Sorry you ran into this, I wish there was a better workaround.
-
- Posts: 57
- Joined: Wed Mar 19, 2008 11:45 am
Re: Unofficial Kodi HDHomeRun DVR PVR Client
This fix worked for me. Prior to the fix no recorded TV would play. Any chance you can fully release so it will automatically update all the rest of my devices?djp952 wrote: ↑Tue May 26, 2020 7:19 pmNot really anymore without the old recorded_files.json output from the previous RECORD engine(s)jasonl wrote: ↑Tue May 26, 2020 6:51 pm Is there a way to figure out which recording is making the recording import barf with this log message?
HDHomeRun DVR PVR Client: update_recordings_task failed due to an exception: UNIQUE constraint failed: recording.deviceid, recording.seriesid, recording.recordingid (1555)It's going to be a problem with duplicate seriesids coming back from ?DisplayGroupID=root, so manually examining the data is the best I can offer at the moment.
This happened to somebody else that had duplicate seriesids of "UNKNOWN" from manually importing some recordings to the system. I have a somewhat fixed version available as "3.3.1~beta1", linked here: viewtopic.php?p=359428#p359428 (still valid). This should at least get you past the problem. Sorry for not making it formal sooner, I expected this to be extremely rare.
The caveat with the "fix" is that with new RECORD there is no way to get any recording other than the first that has the duplicate seriesid. Since I have to use seriesid now to get any recording information at all, querying the same URL multiple times does no good, you get what you get.
Give the beta version a try if you don't mind to see if that gets you around it for now, let me know if you need a build for Matrix or Leia UWP, otherwise it should work. If not, please let me know, and if you don't mind a copy of the output from the ?DisplayGroupID=root query would help too. I'll look into adding an intermediate step in the discovery to at least log when duplicate seriesids are detected, it would be handy to help explain why somebody's recordings are missing.
Sorry you ran into this, I wish there was a better workaround.
-
- Posts: 1339
- Joined: Wed Oct 01, 2008 8:46 pm
- Device ID: 131EB7F7;131ED0E0
- Location: Elkridge, MD USA
- x 20
Re: Unofficial Kodi HDHomeRun DVR PVR Client
Certainly. I'm adding something to expose recent error messages via the Kodi UI to help out the folks on platforms where the Kodi log is hard to get to tonight and giving it a once-over but tonight or tomorrow sometimesccrgoalie1 wrote: ↑Wed May 27, 2020 5:41 pmThis fix worked for me. Prior to the fix no recorded TV would play. Any chance you can fully release so it will automatically update all the rest of my devices?djp952 wrote: ↑Tue May 26, 2020 7:19 pmNot really anymore without the old recorded_files.json output from the previous RECORD engine(s)jasonl wrote: ↑Tue May 26, 2020 6:51 pm Is there a way to figure out which recording is making the recording import barf with this log message?
HDHomeRun DVR PVR Client: update_recordings_task failed due to an exception: UNIQUE constraint failed: recording.deviceid, recording.seriesid, recording.recordingid (1555)It's going to be a problem with duplicate seriesids coming back from ?DisplayGroupID=root, so manually examining the data is the best I can offer at the moment.
This happened to somebody else that had duplicate seriesids of "UNKNOWN" from manually importing some recordings to the system. I have a somewhat fixed version available as "3.3.1~beta1", linked here: viewtopic.php?p=359428#p359428 (still valid). This should at least get you past the problem. Sorry for not making it formal sooner, I expected this to be extremely rare.
The caveat with the "fix" is that with new RECORD there is no way to get any recording other than the first that has the duplicate seriesid. Since I have to use seriesid now to get any recording information at all, querying the same URL multiple times does no good, you get what you get.
Give the beta version a try if you don't mind to see if that gets you around it for now, let me know if you need a build for Matrix or Leia UWP, otherwise it should work. If not, please let me know, and if you don't mind a copy of the output from the ?DisplayGroupID=root query would help too. I'll look into adding an intermediate step in the discovery to at least log when duplicate seriesids are detected, it would be handy to help explain why somebody's recordings are missing.
Sorry you ran into this, I wish there was a better workaround.

-
- Posts: 1339
- Joined: Wed Oct 01, 2008 8:46 pm
- Device ID: 131EB7F7;131ED0E0
- Location: Elkridge, MD USA
- x 20
Re: Unofficial Kodi HDHomeRun DVR PVR Client
edit to above: it looks like "tomorrow" is more realistic, there were recent changes to the Matrix baseline that are causing me some problems. I don't expect them to be hard to resolve, but I won't get there in the next 20 minutes (US EDT), so the release date fir 3.3.1 is going to push to at least May 28th (my time zone).
-
- Posts: 57
- Joined: Wed Mar 19, 2008 11:45 am
Re: Unofficial Kodi HDHomeRun DVR PVR Client
As always thanks very much for your efforts!! Really appreciate the work you do! I just recently tested out the commercial skip functionality and it works great in Leia. First time I've had it working since Media Center days.djp952 wrote: ↑Wed May 27, 2020 8:40 pm edit to above: it looks like "tomorrow" is more realistic, there were recent changes to the Matrix baseline that are causing me some problems. I don't expect them to be hard to resolve, but I won't get there in the next 20 minutes (US EDT), so the release date fir 3.3.1 is going to push to at least May 28th (my time zone).
-
- Posts: 1339
- Joined: Wed Oct 01, 2008 8:46 pm
- Device ID: 131EB7F7;131ED0E0
- Location: Elkridge, MD USA
- x 20
Re: Unofficial Kodi HDHomeRun DVR PVR Client
sccrgoalie1, you're quite welcome! Very glad it's been useful for you!
And with that, my apologies for the slight delay, but I got the Matrix build all squared away this morning ...
Version 3.3.1 (2020.05.28)
Downloads:
This fixes the problem reported by a handful of users after the recent changes to how Recording Discovery needs to work moving forward. Unfortunately, there are cases where the RECORD engine may report duplicate series identifiers for disparate series, which violated a database constraint. The fix only allows Discovery to continue, effectively masking the issue. There isn't anything I can actually do about the duplicate series identifiers and there is no way to get the information for the missing recordings anymore. I added a backlog item to provide some logging if the issue is detected to assist in problem resolution moving forward. This has hit three users that I am aware of so far.
Report HDHomeRun device version information in device discovery logs
Given recent events I thought it would be a good idea to list the version of the tuners / RECORD engine in the log. I think it will help speed up detection of and resolution of new concerns that pop up that might be due to a breaking change or use of a deprecated/obsolete feature within the HDHomeRun ecosystem.
Add "List recent error messages" PVR Client Specific setting
I kinda added this at the last minute, it's not very fancy. The thought process here is that it's hard for many users to access the Kodi log, especially on embedded type devices like a FireTV/Firestick. I'm keeping track of the last 10 PVR specific errors that have been logged and you can view them by (it's awkward) going into Settings / PVR & Live TV / Client specific / Client specific settings and choosing "List recent error messages". They will be listed with the most recent error first. I've found that very often all I need to help solve something is this type of a hint, so I hope this makes it a little easier for folks having a problem to see what's going on without needing to use ADB or SSH or whatever to go retrieve the Kodi log.
As always, I hope it works well for everyone and if not please let me know. Auto-update is set up for both Leia and Matrix; it may take your Kodi up to 48 hours to detect and install it ...
And with that, my apologies for the slight delay, but I got the Matrix build all squared away this morning ...
Version 3.3.1 (2020.05.28)
- Update SQLite database engine to version 3.32.1
- Fix bug preventing recordings from being loaded when duplicate series identifiers exist
- Report HDHomeRun device version information in device discovery logs
- Add "List recent error messages" PVR Client Specific setting
Downloads:
- Kodi 18 "Leia" : https://github.com/djp952/pvr.hdhomerun ... -Kodi-Leia
- Kodi 19 "Matrix" : https://github.com/djp952/pvr.hdhomerun ... odi-Matrix
This fixes the problem reported by a handful of users after the recent changes to how Recording Discovery needs to work moving forward. Unfortunately, there are cases where the RECORD engine may report duplicate series identifiers for disparate series, which violated a database constraint. The fix only allows Discovery to continue, effectively masking the issue. There isn't anything I can actually do about the duplicate series identifiers and there is no way to get the information for the missing recordings anymore. I added a backlog item to provide some logging if the issue is detected to assist in problem resolution moving forward. This has hit three users that I am aware of so far.
Report HDHomeRun device version information in device discovery logs
Given recent events I thought it would be a good idea to list the version of the tuners / RECORD engine in the log. I think it will help speed up detection of and resolution of new concerns that pop up that might be due to a breaking change or use of a deprecated/obsolete feature within the HDHomeRun ecosystem.
Add "List recent error messages" PVR Client Specific setting
I kinda added this at the last minute, it's not very fancy. The thought process here is that it's hard for many users to access the Kodi log, especially on embedded type devices like a FireTV/Firestick. I'm keeping track of the last 10 PVR specific errors that have been logged and you can view them by (it's awkward) going into Settings / PVR & Live TV / Client specific / Client specific settings and choosing "List recent error messages". They will be listed with the most recent error first. I've found that very often all I need to help solve something is this type of a hint, so I hope this makes it a little easier for folks having a problem to see what's going on without needing to use ADB or SSH or whatever to go retrieve the Kodi log.
As always, I hope it works well for everyone and if not please let me know. Auto-update is set up for both Leia and Matrix; it may take your Kodi up to 48 hours to detect and install it ...
Re: Unofficial Kodi HDHomeRun DVR PVR Client
The new version fixed my issue. I have a bunch of old test recordings with bogus headers that apparently cause issues. Thanks!
-
- Posts: 1339
- Joined: Wed Oct 01, 2008 8:46 pm
- Device ID: 131EB7F7;131ED0E0
- Location: Elkridge, MD USA
- x 20
Re: Unofficial Kodi HDHomeRun DVR PVR Client
PSA for Matrix nightly users: Team Kodi has introduced a set of breaking changes to the PVR API that will take some time to work through. The API has been changed from a "C" style API into a class-based C++ API. There are many opportunities here to clean up some ugliness, and that's the approach I'm taking -- do it right, don't hack it up.
The changes themselves appear to be in flux a bit as well, I see a few tweaks to them in the Kodi pipeline already and I have a couple that I would like to propose myself if they aren't handled in a reasonable timeframe by Team Kodi. I expect there will be a few more once I move everything around. Don't get me wrong - they did a fantastic job - I just can't stand compiler warnings
For now, I suggest Matrix users relying on this addon for anything important to stick with the Kodi version you have for a while. If you update to a Kodi version requiring PVR API 7.x.x, I am not in a position to help you out with a new build at this time. I will post back when I think I can change that suggestion ...
The changes themselves appear to be in flux a bit as well, I see a few tweaks to them in the Kodi pipeline already and I have a couple that I would like to propose myself if they aren't handled in a reasonable timeframe by Team Kodi. I expect there will be a few more once I move everything around. Don't get me wrong - they did a fantastic job - I just can't stand compiler warnings

For now, I suggest Matrix users relying on this addon for anything important to stick with the Kodi version you have for a while. If you update to a Kodi version requiring PVR API 7.x.x, I am not in a position to help you out with a new build at this time. I will post back when I think I can change that suggestion ...
Re: Unofficial Kodi HDHomeRun DVR PVR Client
Seems kind of late in the Matrix cycle to be making a massive change like that. I know it's not frozen yet, but it ought to be getting close and a change like that will surely push things back even further.
-
- Posts: 1339
- Joined: Wed Oct 01, 2008 8:46 pm
- Device ID: 131EB7F7;131ED0E0
- Location: Elkridge, MD USA
- x 20
Re: Unofficial Kodi HDHomeRun DVR PVR Client
I wholeheartedly agree with you. Doubly so when the change doesn't add much, if any, value to the end user.
-
- Posts: 1339
- Joined: Wed Oct 01, 2008 8:46 pm
- Device ID: 131EB7F7;131ED0E0
- Location: Elkridge, MD USA
- x 20
Re: Unofficial Kodi HDHomeRun DVR PVR Client
I'm a little over 50% done with the switchover. So far the only glaring problem that needs to be addressed before sending anything out is a limitation with my background task scheduler since it was designed specifically to deal with a "C" style API, but everything else has been more "copypasta" than logic changes. Hopefully something by the end of this week. Hopefully by then Kodi will also have worked out most of their bugs with this.
edit: (06/17) 99% done. Have not addressed the background task scheduler issue yet (hopefully tomorrow), but otherwise the entirety of the PVR functionality has been modified for the new API and appears to work just fine.
edit: (06/19): 99.5% done. Background task scheduler has been mostly addressed, but I see a need to tweak further if possible. As-is it should work like it does in Leia now, but if I can just get this one more thing to work like I want it to ...
edit: (06/21): 100% done. There is a cURL update in 3 days and I'm apparently 3 versions behind on SQLite, so that gives me a few days to try this on Linux, Android, and MacOS. Hang in there for a bit. It works fine on Windows and I backed away from any C++ "tricks" in the end so I don't anticipate any platform specific issues. It's basically done. It sucked, and I have a laundry list for Team Kodi, but it does work.
-
- Posts: 1339
- Joined: Wed Oct 01, 2008 8:46 pm
- Device ID: 131EB7F7;131ED0E0
- Location: Elkridge, MD USA
- x 20
Re: Unofficial Kodi HDHomeRun DVR PVR Client
It occurred to me that I have nothing truly useful to add for a version 3.3.2, short of unnecessary COTS/FOSS updates, so let's get this new Matrix API out of the way. I have found it difficult to find the time/resources to properly test this on anything but Windows, but I think it will be fine on Android/Linux/MacOS based on how I ultimately did it. Current expectation is to release a Matrix-only v3.3.1a once I can verify it's functional on all platforms:
Version 3.3.1a~beta1 (2020.06.22)
If the necessary feedback, or no problematic feedback, is received in 48-72 hours I'll go ahead and let this loose for Matrix as version "3.3.1a". I sincerely appreciate your patience on the delay to adapt to this, and while I found the Kodi changeset imperfect (and have issued 2 of 3 Pull Requests to correct that so far), I can't leave you guys hanging much longer.
A proper version 3.3.2 will likely be in July as opposed to June right now. I have a pretty big promise backlog to get around to, and "real work" has been quite a thing of late that is taking up a great deal of my playtime
Version 3.3.1a~beta1 (2020.06.22)
- Update Matrix baseline for PVR API v7.x.x
- Kodi 19 "Matrix" : https://1drv.ms/u/s!AgEGEEVzGNq-jJJocMU ... w?e=C25N4T
If the necessary feedback, or no problematic feedback, is received in 48-72 hours I'll go ahead and let this loose for Matrix as version "3.3.1a". I sincerely appreciate your patience on the delay to adapt to this, and while I found the Kodi changeset imperfect (and have issued 2 of 3 Pull Requests to correct that so far), I can't leave you guys hanging much longer.
A proper version 3.3.2 will likely be in July as opposed to June right now. I have a pretty big promise backlog to get around to, and "real work" has been quite a thing of late that is taking up a great deal of my playtime

-
- Posts: 2340
- Joined: Fri Apr 05, 2013 9:20 am
- Device ID: 1041A706, 1043EB32, 104BAD9E, 13168DC5, 1322A7AC
- Location: West Rockhill, PA
- x 8
Re: Unofficial Kodi HDHomeRun DVR PVR Client
It seems to be working fine on my RPi2 with LibreELEC Millhouse 0617. Navigating the guide is still sluggish but that's not your fault.djp952 wrote: ↑Mon Jun 22, 2020 8:44 pm I have found it difficult to find the time/resources to properly test this on anything but Windows, but I think it will be fine on Android/Linux/MacOS based on how I ultimately did it. Current expectation is to release a Matrix-only v3.3.1a once I can verify it's functional on all platforms: