OLD: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Kodi Community Development

Moderator: TVJunkie198

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 »

johnny_swindle wrote:
Wed Jun 21, 2017 4:30 pm
I have started encountering an interesting issue.....

Kodi 17.3 and Titian skin version 3.7.56

I can use the PVR client without issue and I use it right before bed. When I come back to use it early in the morning, I notice that all of my recordings are not present and the client won't work. This happens with all the PCs.

A simple restart of Kodi solves the issue.

Anyone else have this issue? Is the lease expiration (router) causing problems? I can set up a task via task scheduler to kill kodi and restart it at midnight if needed. But before I venture down this path, I though I would ask.
It could be, but generally speaking a DHCP server will hand out the same address to the same system, especially if it's not shut down.

When you leave the systems at night, are they set to sleep? When Kodi detects a wait from sleep, it will call into the PVR and I do kick off a big rediscovery of all the data at that time. If it can't find something (or if there is a bug!) it's very possible that it may report a whole lot of nothing back to Kodi that would clear things out and make them break.

The best thing to do is to get the Kodi log file, it will probably have the information we need to figure this out. I'll PM you my e-mail address -- if you want to send me a log file I'll be happy to have a look!

One thing you can try to see if I'm in the right ballpark would be to initiate a clear database operation on the PVR client after it's gone bye-bye. This will delete everything from the client's database and reload it, triggering updates in Kodi along the way. To get to this option, go into the PVR & Live TV Settings. Under Client Specific / Client specific settings, hit the "Reset discovery database" option. It will take a few minutes to purge and reload everything. If the problem is in the PVR client database/code, this may clear it up AND it's a big hint for me if it does :)

johnny_swindle
Posts: 29
Joined: Tue Mar 24, 2015 11:38 am

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by johnny_swindle »

It could be, but generally speaking a DHCP server will hand out the same address to the same system, especially if it's not shut down.

When you leave the systems at night, are they set to sleep? When Kodi detects a wait from sleep, it will call into the PVR and I do kick off a big rediscovery of all the data at that time. If it can't find something (or if there is a bug!) it's very possible that it may report a whole lot of nothing back to Kodi that would clear things out and make them break.

The best thing to do is to get the Kodi log file, it will probably have the information we need to figure this out. I'll PM you my e-mail address -- if you want to send me a log file I'll be happy to have a look!

One thing you can try to see if I'm in the right ballpark would be to initiate a clear database operation on the PVR client after it's gone bye-bye. This will delete everything from the client's database and reload it, triggering updates in Kodi along the way. To get to this option, go into the PVR & Live TV Settings. Under Client Specific / Client specific settings, hit the "Reset discovery database" option. It will take a few minutes to purge and reload everything. If the problem is in the PVR client database/code, this may clear it up AND it's a big hint for me if it does :)
None of the systems are set to sleep, but I will re-check all the setting to ensure nothing has changed. I will monitor and if this happens again, I will clear down the database and report back. If all else fails, I will contact you and will send you a copy of the kodi logn.

Thanks for all of you help.

masonpharmd
Posts: 5
Joined: Sat Jun 17, 2017 6:48 am

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by masonpharmd »

djp,
I would like to try that flavor as soon as you have it ready.
As far as TOS goes, I have paid for the dvr data AND record engine use for 12 months. The DVR data is on the record engine right?
My next year's purchase will be for DVR data AND record engine use for 12 months.

I feel that the website that silicon dust advertises their DVR service states that the subscription service provides 14 days of EPG data, AND will run a record engine on your own NAS AND function within Kodi. I don't feel that their Kodi plugin pause,rewinds,fast forwards live TV well. I was relieved when I saw how well your kodi plugin functions. It actually behaves like a DVR not a VCR.

I would applaud Silicon Dust if they made you an offer for the IP rights for your plugin and adopted it with the 14 days of data they advertise or allowed you code your plugin to allow us to choose how many days of data kodi will see....After all I have already paid them for it, I should be allowed to see it.

Thanks for all that you have done

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 »

masonpharmd wrote:
Fri Jun 23, 2017 6:24 pm
djp,
I would like to try that flavor as soon as you have it ready.
As far as TOS goes, I have paid for the dvr data AND record engine use for 12 months. The DVR data is on the record engine right?
My next year's purchase will be for DVR data AND record engine use for 12 months.

I feel that the website that silicon dust advertises their DVR service states that the subscription service provides 14 days of EPG data, AND will run a record engine on your own NAS AND function within Kodi. I don't feel that their Kodi plugin pause,rewinds,fast forwards live TV well. I was relieved when I saw how well your kodi plugin functions. It actually behaves like a DVR not a VCR.

I would applaud Silicon Dust if they made you an offer for the IP rights for your plugin and adopted it with the 14 days of data they advertise or allowed you code your plugin to allow us to choose how many days of data kodi will see....After all I have already paid them for it, I should be allowed to see it.

Thanks for all that you have done
Thanks for using it (and the props!)

I haven't heard back from SD yet, I assume they get a lot of PMs every day so it may take a bit. I want to be sure they are OK with this as both a courtesy and because I do try to obey the terms for open source or public services. I figure if I ever want to expect someone to respect my terms fair is fair, right? I feel ya, though, you are paying them for the service. What I'd really hate to see happen is for SD to lock down the backend so third-party programs can't use it at all due to abuse :)

Given that we have some time and things are seemingly working OK for (most) everyone, I'm using the opportunity to work on some other things as well. Switching the guide over to be demand-driven and not having the data in my local database forces me to use the backend search capabilities more for things like Timers and Timer Rules, so I'm revisiting them. More on the addition changes as they come, but I hooked up links into the Kodi GUI library so I can pop up messages and selection boxes and things, which could enable me to hook up some of the missing pieces in a reasonable way.

I figure if I haven't heard back from Nick by the time "2.0" is ready for you guys to start playing around with it I can still in good conscience link it up as a beta or a test version for folks to test out.

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 »

Well I still haven't heard back from SD yet (bummer), so by popular demand I have posted a beta/test version of the PVR Client, version 1.1 for you guys to try. The obvious new thing is that the EPG implementation has been completely replaced. Some other minor stuff too ...

>> THIS IS NOT NECESSARILY THE FINAL v1.1.0 IMPLEMENTATION -- FOR TESTING AND FEEDBACK ONLY <<

Link (OneDrive): https://1drv.ms/f/s!AgEGEEVzGNq-id4zhVCTW9X04gQIFA

Installation note: you want to clear your PVR data after installation to trigger the new guide update, otherwise you will still see the old 4/8 hour guide data for quite a while as Kodi may not ask for new data for hours (or days). PVR & Live TV Settings / General / Clear Data. Not sure if I can trigger something on a first-run to do this automatically for you or not.

What's new ...
  • EPG is driven entirely by Kodi now, the settings you have under PVR & Live TV control everything. As a subscriber you can now get your 2 weeks of EPG. I still recommend less than that as it takes a long time to load. The default 3 days seems acceptable to me. It takes a LOT longer to load but once it's in there it becomes much less painful over time.
  • Problems adding timers will now display a proper message box rather than just "an error occurred"
  • Adding a 'Record Series Rule' timer (Timers, Add Timer ...) now presents a selection box with all series found that match and lets you pick. Note that even if there is only one match you'll still get the selection box.
  • Startup discovery task delay setting is now also applied for wake from sleep
  • Bonus: Word on the street is that this finally resolves the mystery deadlocks some still experience; this never triggers an EPG update on it's own anymore so the EPG thread in Kodi seemingly isn't banging into the PVR thread anymore.
  • "Bug fixes and speedy performance enhancements" oh wait that's what Chrome always says - lol
I've also found a Krypton specific bug in Kodi that cannot be fixed in the PVR. In Krypton 17.1 they added some code that messes up the timer selection here and there. You'll notice it when you right-click in the EPG and select "Add Timer". You shouldn't see "Record Series Rule" in that list. The valid options for an EPG timer add are "Record Series" and "Record Once". You can still pick the erroneous one if you want, but it will do a title search rather than using the EPG item you selected. I've submitted a pull request to Kodi to resolve this, but it's a Band-Aid and they aren't thrilled with that. Fixing it for real would break mythtv so they're kicking around a better solution. Jarvis and Krypton 17.0 are not affected.

Love it, hate it, let me know. Be advised it's not really feasible to allow the PVR to do the EPG the old and new ways via a setting. This is a completely different way of handling it! I really hope SD doesn't come back and say this violates the Guide terms of service, but we'll cross that bridge if we come to it.

If you run into big problems, you should be able to roll back to the previous version without incident, but you should consider executing the PVR & Live TV / General / Clear Data afterwards to sync the EPG back up with the addon.

pavlov70
Posts: 24
Joined: Mon Jun 01, 2015 8:13 am

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by pavlov70 »

Cool, looking forward to playing with the new version this evening!

EDIT

Installs and works fine on my Win10 pc. 14 days of guide took 6 minutes to load, not bad considering it's also grabbing the artwork. I think I'll knock it back to 7 days when I roll it out to my libreelec devices.

Props to you. This is exactly what I envisioned when Kodi was announced as a stretch goal during the Kickstarter. Much appreciated!

-rob

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 »

pavlov70 wrote:
Mon Jun 26, 2017 10:58 am
Cool, looking forward to playing with the new version this evening!

EDIT

Installs and works fine on my Win10 pc. 14 days of guide took 6 minutes to load, not bad considering it's also grabbing the artwork. I think I'll knock it back to 7 days when I roll it out to my libreelec devices.

Props to you. This is exactly what I envisioned when Kodi was announced as a stretch goal during the Kickstarter. Much appreciated!

-rob
Awesome! Glad to hear it!

NOTE: I'm having a crash problem with this version on Android that I'm looking into. Seems to happen when Android goes to sleep while the EPG is in the process of being loaded. Not sure if it's a bug in the PVR or something in Kodi, this version has such changed behavior over the last one I'm assuming it's my fault since I don't recall this happening before.

otaku
Posts: 342
Joined: Thu Sep 24, 2015 7:30 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by otaku »

Greetings

Which download would I use for my Nvidia Shield 2017?

thanks!

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by clarkss12 »

Made a short video showing your latest enhancement that uses the full 14 days of guide data. I am using OTA with around 35 or 36 channels, and it did not take long at all to download all the guide data. Everything worked great, just as all the other native Kodi PVR clients. It did not populate with any of my recordings, not sure if it is supposed to, or maybe it will populate later.

https://www.youtube.com/watch?v=Qk4_QXj7rCs

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 »

otaku wrote:
Tue Jun 27, 2017 3:16 pm
Greetings

Which download would I use for my Nvidia Shield 2017?

thanks!
Pretty sure for the newer Shield you would use the "aarch64" Android APK. Please stick with the 'official' (v1.0.10) one for now, link below. The v1.1.0 beta I posted up there a bit ^^^^ definitely has something funky going on in Android I'm chasing down.

https://github.com/djp952/pvr.hdhomerun ... ndroid-apk

otaku
Posts: 342
Joined: Thu Sep 24, 2015 7:30 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by otaku »

Thank You

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 »

clarkss12 wrote:
Tue Jun 27, 2017 5:31 pm
Made a short video showing your latest enhancement that uses the full 14 days of guide data. I am using OTA with around 35 or 36 channels, and it did not take long at all to download all the guide data. Everything worked great, just as all the other native Kodi PVR clients. It did not populate with any of my recordings, not sure if it is supposed to, or maybe it will populate later.

https://www.youtube.com/watch?v=Qk4_QXj7rCs
Sweet! Recordings are supposed to work. Let me know if this continues, definitely not expected. Glad I called this a "beta"

If you want to double-check that the RECORD engine is sending the data you expect over, you can do it manually ... from a browser ...

> http://ipv4.my.hdhomerun.com/discover
> Find the "StorageURL" in the list of things you get back; should be one listed on the item with the "StorageID" tag.
> Browse to that URL (e.g. "http://192.168.0.220:xxxx/recorded_files.json")

When you go to that URL you should get back a ton of JSON text, this is what the PVR reads to populate the recordings:

Code: Select all

[{"Category":"series","ChannelImageURL":"http://img.hdhomerun.com/tmsimg/h3/NowShowing/10171/s10171_h3_aa.png","ChannelName":"DISN","ChannelNumber":"780","EndTime":1498313100,"EpisodeNumber":"S04E05","EpisodeTitle":"The Mystic Isles","FirstAiring":1,"ImageURL":"http://img.hdhomerun.com/tmsimg/assets/p8990588_b_h3_ax.jpg","OriginalAirdate":1498262400,".....

If that doesn't work right, it's the RECORD engine. I expect it does work just fine which means it's the PVR :) Worst case is we check the Kodi log to see if my updates have caused a parsing/database query error or something silly!

pavlov70
Posts: 24
Joined: Mon Jun 01, 2015 8:13 am

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by pavlov70 »

djp952 wrote:
Mon Jun 26, 2017 8:55 pm
NOTE: I'm having a crash problem with this version on Android that I'm looking into. Seems to happen when Android goes to sleep while the EPG is in the process of being loaded. Not sure if it's a bug in the PVR or something in Kodi, this version has such changed behavior over the last one I'm assuming it's my fault since I don't recall this happening before.
I installed it on one of my intel nucs running Libreelec. Unfortunately I have had kodi crash on me a few times. I've gone back and forth between the previous and new versions and it only crashes on me with the new version. I'm going to try the i686 compile and see if that helps.

thanks
rob

NYPlayer
Posts: 3538
Joined: Fri Apr 17, 2009 11:45 am
Device ID: 104112F4,104162C4,10438DAD,10438DF5,10701381,13147C7B,131A192A
Location: Portland OR, 97217

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by NYPlayer »

First time trying this very impressive works great on my Shield.

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 »

pavlov70 wrote:
Tue Jun 27, 2017 6:29 pm
djp952 wrote:
Mon Jun 26, 2017 8:55 pm
NOTE: I'm having a crash problem with this version on Android that I'm looking into. Seems to happen when Android goes to sleep while the EPG is in the process of being loaded. Not sure if it's a bug in the PVR or something in Kodi, this version has such changed behavior over the last one I'm assuming it's my fault since I don't recall this happening before.
I installed it on one of my intel nucs running Libreelec. Unfortunately I have had kodi crash on me a few times. I've gone back and forth between the previous and new versions and it only crashes on me with the new version. I'm going to try the i686 compile and see if that helps.

thanks
rob
Was it at the end of the guide load by chance? The issue I'm tracking down in Android seems to happen when it goes to sleep during the guide load, or right after it does the last channel in my list, just up and dies with a SIGSEGV. It would help a lot if it happens on Linux too, if I can't get anywhere with Android specifically I'll give Libreelec a go. Extremely helpful information - THANK YOU!!

edit: Ha, of course it stops crashing as soon as I get the piece in there to help debug it. I suppose that's a clue in and of itself, perhaps it's the guide data. Might explain why it's not happening to everyone. I'll monkey around dorking up the guide data in various ways I guess and see what happens. Frustrating.
Last edited by djp952 on Tue Jun 27, 2017 7:48 pm, edited 1 time in total.

Locked