Unofficial Kodi HDHomeRun DVR PVR Client

Kodi Community Development

Moderator: TVJunkie198

Post Reply
DornoDios
Posts: 56
Joined: Sat Dec 12, 2020 9:33 pm
Device ID: 107C3D26
x 1

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by DornoDios »

I didn't know the auto update info. That is good to know. Where exactly is the repo in Github? I mean what URL do I have to add as a source in Kodi?

I got a DS220+ NAS and everything is working wonderfully now with your Kodi add-on and the Synology HDHR package hosted on this forum.

The only problem I have at this point is NBC has issues playing back on the Nvidia Shield. Apparently this issue exists on all versions of the hardware. It used to be listed under known issues on Nvidia forum, but it was removed. There is no fix for it and it appears unlikely there will be one as it's supposedly a GPU issue and not a Shield TV software issue. Anyway, it's not the end of the world. I just watch NBC from Windows. It is something to keep in mind if you are considering a Shield. It doesn't impact everyone, but the NBC affiliate in Houston is the station I have issues with.

If you get a Shield TV test the channels you intend to watch. Especially 1080i affiliates with high bitrates.

Once again thanks so much for this add-on. I'm going to update it now and add the repo. Thanks so much for all your help along the way, both on the forum and via e-mail!

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

DornoDios wrote: Sat Feb 06, 2021 6:14 pm I didn't know the auto update info. That is good to know. Where exactly is the repo in Github? I mean what URL do I have to add as a source in Kodi?
That's the beauty part; you don't have to do anything at all! The repo is built into the addon itself. The only (current) platform that can't auto-update is UWP (Xbox). Kodi only goes and checks for a new version every day or two, so there is a delay between when I push a new version and your Kodi will see it, but it will find it for ya.

This morning I actually stepped through Kodi during an upgrade and found I was wrong about it not working because the addon was disabled as incompatible. Kodi actually does go out and look for a new version before disabling it, the trick I missed was that it had to be a NEWER version, number-wise. Hence the Matrix addon is now version 4.x.x :)

I actually did push out v3.4.1 and v4.4.1 earlier today, I just haven't posted about it here yet. Family time.

DornoDios
Posts: 56
Joined: Sat Dec 12, 2020 9:33 pm
Device ID: 107C3D26
x 1

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by DornoDios »

So basically once I manually update to the new version from the zip file I d/l'd it will automatically update to the latest version in the future?

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

DornoDios wrote: Sat Feb 06, 2021 6:54 pm So basically once I manually update to the new version from the zip file I d/l'd it will automatically update to the latest version in the future?
It should already be doing that for you. The change is that you can now upgrade a Leia install to Matrix and instead of the addon being nuked by Kodi, it should download and switch to the Matrix version automatically when it's doing the "Addon migration in progress" step. Note that you'd need to be on the new "3.4.1" on Leia already for it to actually work, it's quite a recent development :)

I've noted some Kodi installs seem to require you to restart it for it to do an update, I don't know why that is. There are some brute-force ways to make it happen, but that defeats the purpose of IJW (It just works).

If you want to make sure it's going to work for you, you can check. Go into the addon properties. Make sure "Auto-update" is on. On Leia the button is called "Update" on Matrix the button is called "Versions". Click that, it should come up with a single version that you can install. If it says no updates are available, we can look at the kodi log to find out why (debug logging needs to be enabled, though).

Right now as of this posting, on Leia you should either see "3.4.0" or "3.4.1" come up. On Matrix it should say "3.4.0" or "4.4.1". It depends on when the last time Kodi went out to check the repository. As long as you see one of those versions, things should be humming along just fine and you should be able to sit back and do ... nothing!

DornoDios
Posts: 56
Joined: Sat Dec 12, 2020 9:33 pm
Device ID: 107C3D26
x 1

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by DornoDios »

When I opened up Kodi on the second device the install of your PVR addon updated automatically to the latest version.

When I picked manual update on mine I think it said 3.4.1, but I wasn't sure what version I had so I assumed it was still linked to the zip file I installed from.

By the way the fix for the EPG data causes a very noticeable improvement in performance on a frequently used FireTV pendant. Importing a day worth of data instead of 14 makes it update much more quickly.
Last edited by DornoDios on Sat Feb 06, 2021 8:03 pm, edited 2 times in total.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

Sorry I didn't post this earlier today for you guys!

Current version: Build 7707 - v3.4.1 / v4.4.1 (2021.02.06)
  • (Leia) Enable in-place addon migration during installation of Kodi Matrix RC1 or later
  • (Matrix) Increment major version number to allow for in-place updates when Kodi version changes
  • Fix bug that allowed startup tasks to execute out of order on systems with a low precision system clock
  • Fix bug that caused all EPG data to be resent to Kodi during startup regardless of a detected change to the data
  • Fix bug that caused "Timer Deleted" toast messages for timers associated with an existing recording
  • Reduce the amount of discovery event logging
MATRIX USERS: Requires Matrix Release Candidate (RC) 1 or later

If you're interested in some detail on the bug fixes, they are talked about here: viewtopic.php?p=369983#p369983. Short version: Works a lot more better on Windows 7, and many thanks for Ken.F for noting the problems and volunteering to test the changes!

(Leia) Enable in-place addon migration during installation of Kodi Matrix RC1 or later
(Matrix) Increment major version number to allow for in-place updates when Kodi version changes
This is cool. I had recently (and incorrectly) told matt77303 that this wasn't possible, and I apologize. The part I was missing was that the addon version number can't be the same on both platforms. The change to Leia was to list both the Leia and Matrix repositories in the addon metadata, with appropriate "minimum" Kodi version numbers for each. On Matrix, all that was needed was to bump it to version 4.x. There are ways this still might fall apart before Matrix 19.0 "final", and if that happens I'll adjust it as best I can -- it's really nice to have this seamless upgrade now.

I hope this doesn't get confusing, the addon version has always been the same across platforms. I might try stressing the "Build Number" more often (I use the number of calendar days since January 1, 2000) but my intention is to keep the minor and revision numbers the same for both platforms. Like with this release, it is "3.4.1" on Leia and "4.4.1" on Matrix.

I also may go back and retcon Jarvis to be v1.x and Krypton to be 2.x for fun and deny all knowledge of tampering with established canon :mrgreen:

Reduce the amount of discovery event logging
Not a lot to say here, the addon has always been extremely "chatty" in the Kodi logs. Instead of logging every single time one of the six discovery tasks kicks off and completes, it's now limited to just during startup and if something interesting happens, like a change to the data or an error. I also added logging of all the addon settings during startup, using that information one can derive what the spammy logs would have said.

Downloads:
Last edited by djp952 on Fri Feb 19, 2021 1:18 pm, edited 1 time in total.

jbinkley60
Posts: 41
Joined: Wed Aug 22, 2018 11:29 am
x 1

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by jbinkley60 »

Thanks for the note about the logging change. I literally thought the software had stopped working over the past couple of days on all my clients. One by one they got "quieter" in the logs as they got the upgrade.


Jeff

rdoac
Posts: 60
Joined: Sun Feb 20, 2011 1:46 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by rdoac »

keen456 wrote: Mon Feb 01, 2021 6:51 pm If you could access the PVR guide remotely over any of the web interface add-ons.
A long time ago when I used MythTV, this was an amazing feature of MythWeb- you could pull up the guide on another machine, and schedule your recordings that way.
Using Chorus2 with Kodi on LibreElec, I can see all of the recordings & watch TV, but I can't see the guide or schedule a new recording.
I ran into this issue too. I really like MythWeb. A good workaround is to run HDHR_DVRUI which you can find here:

https://github.com/demonrik/HDHR-DVRUI

Not really Kodi related - but I think there is/was a thread for this in Third Party Software.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by Ken.F »

rdoac wrote: Mon Feb 08, 2021 9:01 am A good workaround is to run HDHR_DVRUI which you can find here:

https://github.com/demonrik/HDHR-DVRUI
Is it working again? It had been broken for a long time. Last I heard he was still working on getting it updated.
See: viewtopic.php?f=116&t=74891

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by Ken.F »

After Matrix had been shutdown overnight I got the high CPU use again on the first launch of the day. It only happened on the first launch so it's certainly better than before, but not totally fixed like I thought it was.

While checking the log I found an error for an addon that I use called Embuary Info 2.0.7 by sualfred while it was checking for TV episode next airings. Does this addon use the guide data from the PVR? I assumed it only used online sources to check for next airings of shows in the regular TV shows library. It probably doesn't have anything to do with it but I thought I'd mention it anyway.
https://kodi.wiki/view/Add-on:Embuary_Info

Code: Select all

2021-02-08 09:29:45.212 T:5196     INFO <general>: [ script.embuary.info ] Refreshing next airing database
2021-02-08 09:29:45.702 T:5196    ERROR <general>: [ script.embuary.info ] No information found --> https://api.themoviedb.org/3/tv/92461/season/2/episode/9?api_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&language=en&append_to_response=translations
I also found some PVR errors. I have one of my three Connect devices on an antenna while the other two are on QAM. Some of the channels that both sources can receive have different channel names. Maybe that's tripping it up here. I have them set up that way because the antenna gets some channels not available on QAM and there are some QAM channels that I can't get with the antenna. I should probably just disable the overlapping channels on the OTA unit.

Code: Select all

2021-02-08 09:29:54.286 T:2260     INFO <general>: PVR Manager: Started
2021-02-08 09:29:59.100 T:5264     INFO <general>: AddOnLog: pvr.hdhomerundvr: update_listings_task: triggering channel update
2021-02-08 09:29:59.100 T:5264     INFO <general>: AddOnLog: pvr.hdhomerundvr: update_listings_task: execute electronic program guide update
2021-02-08 09:30:03.954 T:5264     INFO <general>: AddOnLog: pvr.hdhomerundvr: update_listings_task: triggering timer update
2021-02-08 09:30:11.922 T:4892    ERROR <general>: PVR::CPVREpg::UpdateFromScraper: Client '-1' not found, can't update
2021-02-08 09:30:11.922 T:4892    ERROR <general>: PVR::CPVREpg::Update: Failed to update table '3.2 StartTV'
2021-02-08 09:30:11.959 T:4892    ERROR <general>: PVR::CPVREpg::UpdateFromScraper: Client '-1' not found, can't update
2021-02-08 09:30:11.960 T:4892    ERROR <general>: PVR::CPVREpg::Update: Failed to update table '10.2 COZI-TV'
2021-02-08 09:30:11.976 T:4892    ERROR <general>: PVR::CPVREpg::UpdateFromScraper: Client '-1' not found, can't update
2021-02-08 09:30:11.976 T:4892    ERROR <general>: PVR::CPVREpg::Update: Failed to update table '10.3 NBCLX'
2021-02-08 09:30:11.995 T:4892    ERROR <general>: PVR::CPVREpg::UpdateFromScraper: Client '-1' not found, can't update
2021-02-08 09:30:11.995 T:4892    ERROR <general>: PVR::CPVREpg::Update: Failed to update table '29.2 Movies!'
2021-02-08 09:30:11.996 T:4892    ERROR <general>: PVR::CPVREpg::UpdateFromScraper: Client '-1' not found, can't update
2021-02-08 09:30:11.997 T:4892    ERROR <general>: PVR::CPVREpg::Update: Failed to update table '65.3 Justice'
OTA:
3.2 StartTV
10.2 COZI-TV
10.3 NBCLX
29.2 Movies!
65.3 Justice

QAM:
3.2 KYW_Sta
10.2 COZI_TV
10.3 WCAU_LX
29.2 WTXF_Mo
65.3 WFPA_Ju

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

I'm not familiar with the skin, but based on the message I'd say it's doing it's own thing from themoviedb :)

The EPG data gets reloaded and retransmitted to Kodi once per day, so there will be the occasional spike on your system. I think we pretty definitively determined that this operation is what was causing the bulk of your grief, but even with the fixes it still needs to happen. At startup, the addon will check if the data is 18 hours old or more and if it is pull the XMLTV down and reprocess it. It then comes up with a somewhat randomized time to do the next update (between 22 and 26 hours).

The errors should be OK, you can ignore them if you want. The Kodi EPG database has a few orphaned channels in it, I get this sometimes too when I've been adding/removing channels in my lineup. To clean it up is pretty easy, you just need to "Clear Data" for the Guide (or the entire PVR subsystem) via the Kodi settings, this will reset and reload the EPG database so the orphans go away. When you see the Client ID as "-1" it basically means there is no PVR addon associated with the channel anymore and it's upset because it can't ask anyone to update the data. It could be a bug in Matrix too, but again it's fairly benign.

The one you'll love in Matrix is when the EPG data has been changed slightly on the backend, say a channel slid all their programming by 2 minutes, Matrix is going to throw a slew of messages in the log about it since the programs overlap. In Leia you'd see this manifest as a weird 2-minute long program in the Guide. It doesn't happen that often but it can be jarring to see in the log when it does :) Also benign!

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by Ken.F »

djp952 wrote: Mon Feb 08, 2021 10:34 am I'm not familiar with the skin, but based on the message I'd say it's doing it's own thing from themoviedb :)
It's not a skin, it's an addon that gives you extended info for items in your library. I don't use the upcoming episodes thing very often. I mostly just use it for detailed actor and movie info.
The EPG data gets reloaded and retransmitted to Kodi once per day, so there will be the occasional spike on your system. I think we pretty definitively determined that this operation is what was causing the bulk of your grief, but even with the fixes it still needs to happen. At startup, the addon will check if the data is 18 hours old or more and if it is pull the XMLTV down and reprocess it. It then comes up with a somewhat randomized time to do the next update (between 22 and 26 hours).

The errors should be OK, you can ignore them if you want.
OK, thanks. At least it's not happening each and every time the PVR starts anymore. :)

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

Actually, Ken.F, I think the -1 error is my fault after all. I went looking to see if I could open an Issue about it and what I found in the data I was going to post wasn't what I was expecting. It appears that I am indeed responsible for sending Kodi EPG data for channels that have disappeared.

If the addon detects a channel lineup change, it triggers all the proper updates, but there is an optimization that says "if a channel was deleted (as opposed to added), don't reload the EPG from the backend". Well, funny thing, that channel is still in the cached EPG data and it still gets sent over. I'm missing a lookup/join against the current list of channels here.

I'll fix this, of course, but I think overall it's benign (Kodi logging concern) and don't intend to rush it. If you disagree with that approach please let me know.

That, and PLEASE keep testing Matrix -- you are finding all kinds of things! If I had a test team, you'd be the first person I would hire :) :)

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by Ken.F »

djp952 wrote: Mon Feb 08, 2021 8:45 pm That, and PLEASE keep testing Matrix -- you are finding all kinds of things! If I had a test team, you'd be the first person I would hire :) :)
You are volunteering your time to make this available to us so I try not to complain too much. :)

But since you asked, the PVR doesn't remember the playback position when stopping playback on a recording in progress if you are within a few minutes of live, it just marks it as watched no matter how much time is remaining before the recording is scheduled to end. I can create a bookmark before stopping playback to work around this problem but the bookmark can only be seen by the Kodi client that created it. I can't use the bookmark to resume watching the recording in a different room the next day.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

Ken.F wrote: Tue Feb 09, 2021 7:27 am But since you asked, the PVR doesn't remember the playback position when stopping playback on a recording in progress if you are within a few minutes of live, it just marks it as watched no matter how much time is remaining before the recording is scheduled to end. I can create a bookmark before stopping playback to work around this problem but the bookmark can only be seen by the Kodi client that created it. I can't use the bookmark to resume watching the recording in a different room the next day.
First off, I was wrong, I do not appear to be at fault for the -1 errors after all :) Trying to think of how to illustrate the problem to Kodi. Kodi deletes the EPG data for the removed channel but adds it back again as if it was valid; I got tripped up since it's subsequently asking me for updates to that data. It won't matter what I respond with; it'll still get re-added. Thankfully this is more of a logging concern than anything else.

To your question; there are a couple things to point out. This does not mean I cannot or will not do something about it, of course.
  • Kodi has some defined delta from the end point of a stream that determines if a recording should be shown as "in-progress" versus "completed", and that alters the data that I receive from it. I could not find an option to control this delta in Kodi and while I did not perform an exhaustive search yet the code location has not been obvious. The problem here for the addon is that this support requires an addon "capability" flag to be set, and those are impossible to control dynamically. The addon either supports it or it doesn't. Adding a setting to control this would become a "reboot required" setting, which I really hate. There is a path forward, but it's ugly. I'd prefer proposing a Kodi change to control this delta as opposed to changing the feature itself.
  • In-progress recordings are a bit weird. If you are watching an in-progress recording Kodi isn't even going to ask to set a resume point. The internal logic in Kodi says that the stream needs to start at a position of zero and be finite in length for this to work. For HDHomeRun, a recording that is in-progress is reported the same way a live channel stream would be, therefore I need to provide Kodi with a wall-clock start time as opposed to a zero start time. I've done my best with this, and feel that any additional changes/tweaks require a different HDHomeRun backend implementation.
Again, not trying to blow you off, but I sincerely think there is nothing I can do better on these.

Post Reply