Unofficial Kodi HDHomeRun DVR PVR Client

Kodi Community Development

Moderator: TVJunkie198

Post Reply
jbinkley60
Posts: 20
Joined: Wed Aug 22, 2018 11:29 am

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by jbinkley60 » Wed Jun 19, 2019 12:18 am

I've started seeing a problem last night with the addon running on LibreElec 9.0.2 on an Intel NUC where the addon is causing Kodi to continually crash and then eventually go into LibreElec reboot safe mode. I had to manually delete the addon folder to stop the reboots. They appear to be occurring when Kodi boots up and the guide is being processed. Another person saw a similar issue in https://forum.libreelec.tv/thread/17677 ... safe-mode/.

I am running version zuki.pvr.hdhomerundvr-linux-x86_64-leia-2.0.1.7041.zip . After deleting the addon folder, getting Kodi stable, I tried reinstalling the addon. It installed fine. As soon as it started processing the guide again the Kodi crashes started. I suspect something in the guide is triggering it when it parses the data. I did note that 3 addons were automatically updated yesterday:

Universal Artist Scraper
Universal Album Scraper
The Movie Database

I was not in the PVR or watching live TV via HDHomeRun when the problem started. I was just watching a streaming uPNP video from my media server and Kodi started crashing last evening. I am stable right now by not reinstalling the addon. Let me know how I can help troubleshoot.

djp952
Posts: 869
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 Jun 19, 2019 5:12 am

jbinkley60 wrote:
Wed Jun 19, 2019 12:18 am
I've started seeing a problem last night with the addon running on LibreElec 9.0.2 on an Intel NUC where the addon is causing Kodi to continually crash and then eventually go into LibreElec reboot safe mode. I had to manually delete the addon folder to stop the reboots. They appear to be occurring when Kodi boots up and the guide is being processed. Another person saw a similar issue in https://forum.libreelec.tv/thread/17677 ... safe-mode/.

I am running version zuki.pvr.hdhomerundvr-linux-x86_64-leia-2.0.1.7041.zip . After deleting the addon folder, getting Kodi stable, I tried reinstalling the addon. It installed fine. As soon as it started processing the guide again the Kodi crashes started. I suspect something in the guide is triggering it when it parses the data. I did note that 3 addons were automatically updated yesterday:

Universal Artist Scraper
Universal Album Scraper
The Movie Database

I was not in the PVR or watching live TV via HDHomeRun when the problem started. I was just watching a streaming uPNP video from my media server and Kodi started crashing last evening. I am stable right now by not reinstalling the addon. Let me know how I can help troubleshoot.
There was a defect resolved in v2.0.2 that is the likely cause of the crash:

v2.0.2 (2019.05.08)
- Update SQLite database engine to version 3.28.0
- Prevent multiple Kodi threads from simultaneously requesting EPG data
- Prevent individually malformed EPG data request results from aborting all remaining requests
- Fix bug that allowed extraneous EPG entries to be transferred to Kodi
- Fix bug that prevented successfully setting channel visibility flags
- Fix bug in database layer that could cause unhandled exceptions processing NULL column values


I just turned on my LibreELEC x86_64 machine, running version 2.0.3 of the PVR and didn't see anything out of the ordinary happen.

I suggest trying the newest version of the PVR first, let me know if the same thing happens. The backend changed a little on us and nobody can add/modify timers right now; I'll have to fix that first (tonight) and get a v2.0.4 out for everyone. If you are still crashing on v2.0.3 if you can PM me or post the Kodi log that would help, if the issue is obvious enough or I can duplicate it I can fix it at the same time for ya :)

Version 2.0.3 for LibreELEC 9: https://github.com/djp952/pvr.hdhomerun ... leia-2.0.3

PS - Version 2.1 of the PVR will have auto-update support for Linux, so hopefully bugs like this get resolved for people before they cause them this level of grief. Of course, the opposite may be true, a new bug would self-install and mess people up ... it's a mixed bag but generally a good thing.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by timecutter » Wed Jun 19, 2019 5:18 am

Thanks for confirming that it wasn't anything on my end!

jbinkley60
Posts: 20
Joined: Wed Aug 22, 2018 11:29 am

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by jbinkley60 » Wed Jun 19, 2019 7:03 am

Upgrading to v2.0.3 has resolved the problem. I also found out the same issue was occurring on my 2 Vero 4K+ units running the same addon version. I've upgraded all of my devices to 2.0.3 and the problem is resolved. Thanks for the quick feedback. I thought I was keeping up with the updates but apparently not :D

djp952
Posts: 869
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 Jun 19, 2019 7:08 am

jbinkley60 wrote:
Wed Jun 19, 2019 7:03 am
Upgrading to v2.0.3 has resolved the problem. I also found out the same issue was occurring on my 2 Vero 4K+ units running the same addon version. I've upgraded all of my devices to 2.0.3 and the problem is resolved. Thanks for the quick feedback. I thought I was keeping up with the updates but apparently not :D
That's great! Woot!

Hopefully getting auto updates available to you guys on Linux will help in the future :)

djp952
Posts: 869
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 Jun 19, 2019 5:53 pm

Version 2.0.4 (2019.06.19)
  • Adapt to backend API breaking change that caused "DVR Service Subscription Required" errors
Downloads:
Kodi 16 "Jarvis" : https://github.com/djp952/pvr.hdhomerun ... odi-Jarvis
Kodi 17 "Krypton" : https://github.com/djp952/pvr.hdhomerun ... di-Krypton
Kodi 18 "Leia" : https://github.com/djp952/pvr.hdhomerun ... -Kodi-Leia

Release History:
https://github.com/djp952/pvr.hdhomerun ... se-History

This is another QFE (quick-fix engineering if you're not an old timer like me and didn't know that one), limited to just fixing a breaking change in the backend API that is going to cause the PVR to complain and tell you "DVR Service Subscription Required" any time you try to add/delete/modify a Recording Rule (Timer).

Due to the breaking change, only version 2.0.4 will be listed as a valid upgrade target on Windows, Android, and OS/X. (Linux support for updates is coming in the next non-QFE version).

I only smoke-tested this build since it quite literally just changes a string that said "$.DVR" to "$.DvrActive". Let me know if you run into any additional/new problems. I will be performing more extensive testing on additional platforms and checking the auto-update later tonight. It all should work™.

GitHub / Source Code note: I may not merge the QFE branches back into the master branch, since the main development branches have moved well beyond this. To reduce the chances of screwing something up I will probably just make the same changes to the current development branches and delete these QFE branches in a few days. Just FYI if you like to clone the repo :)

Hope this takes care of things for you!

djp952
Posts: 869
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 » Sat Jun 22, 2019 7:33 pm

ddejager wrote:
Sat Jun 15, 2019 7:18 am
I also use ethernet to connect the firesticks in my house, but this is not always practical for some of my friends.

I observe that the HDHomeRun tuners support UDP, RTP and HTTP natively, nothing else is needed, but I understand that you might need a library to connect with something other than HTTP. I'm not sure if the HD record engine also supports more than HTTP. To see the UDP stream I:

Open the HDHomeRun Config GUI on a tuner on a windows machine. Click on one of the tuners. Enter a valid channel number and click on View. In my case this will fire up VLC using a UDP stream from the tuner to VLC on the loopback interface for the PC. I'm not sure if at some time in the past I set up some association between VLC and the stream or not.
Wanted to let you know I haven't forgotten about this, but I did run into some problems trying to implement it. It seems very possible, I'm just having problems getting the tuner to actually send me data back. It's probably me messing up how to ask it for the channel I want based on the information I have. My intention is to still have this in v2.1.0, perhaps as something flagged as 'experimental'.

This feature would be limited to tuner-direct streaming, the RECORD engine does not AFAIK support anything but HTTP. So timeshifting will not be possible; everything will be real-time. My intention would be to make it a sub-setting under the existing "Stream Live TV channels directly from tuner device(s)" setting.

tredman
Posts: 6
Joined: Fri Aug 05, 2016 6:01 am

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by tredman » Sun Jun 23, 2019 4:37 am

Very happy to discover this addon!

Currently doing some testing on my Shield. Channels, EPG & viewing are working fine - but recordings are not. I cannot see any recordings in the Kodi location (testing with the android hdhomerun app shows they are there and I can view them), and any recordings scheduled in Kodi don't take place.

Any ideas on what I am missing?

Thanks for any help.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by ddejager » Sun Jun 23, 2019 6:07 am

djp952 wrote:
Sat Jun 22, 2019 7:33 pm

Wanted to let you know I haven't forgotten about this, but I did run into some problems trying to implement it. It seems very possible, I'm just having problems getting the tuner to actually send me data back. It's probably me messing up how to ask it for the channel I want based on the information I have. My intention is to still have this in v2.1.0, perhaps as something flagged as 'experimental'.
Thanks. This is NOT critical, just an experiment, so do whatever is important first.

djp952
Posts: 869
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 » Sun Jun 23, 2019 7:06 am

tredman wrote:
Sun Jun 23, 2019 4:37 am
Very happy to discover this addon!

Currently doing some testing on my Shield. Channels, EPG & viewing are working fine - but recordings are not. I cannot see any recordings in the Kodi location (testing with the android hdhomerun app shows they are there and I can view them), and any recordings scheduled in Kodi don't take place.

Any ideas on what I am missing?

Thanks for any help.
Hi! If the HDHomeRun app can see your recordings and this add-on can't, the likely reason is that it couldn't find your RECORD engine on the network.

If you go into the PVR add-on settings, under General, try enabling "Use network broadcast for device discovery". That option finds devices the same way the HDHomeRun app does.

The next version of the add-on switches over to this method by default, it's been a problem for some people all along to use the web-based discovery and now that you can have multiple RECORD engines running it's better at knowing when things have been turned on and off. The web-based one will list dead devices for up to 24 hours which can be a problem.

Please let us know if this fixes things!

djp952
Posts: 869
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 » Sun Jun 23, 2019 7:20 pm

Hi everyone, wanted to let you know that there was another change in the recent RECORD engine update that changes how the current version(s) of the PVR group things like "Movies" and "Sports" for you in Recorded TV. As of right now, everything will be showing up as a single flat list without those special folders.

The only new "Category" attributes I have available in my recordings are "series" and "movie", I'm not sure what all the possibilities are, but will ask.

I don't see this as being a critical concern, so my intention is to make the necessary adjustment in the next version. If this is causing you serious grief for any reason and would like a patch release instead let me know. I've been trying to both track down an elusive EPG load bug (crash) that is affecting at least one person that I am aware of and trying to get something in place to support streaming over UDP, but otherwise version 2.1.0 seems pretty good. It does have some refactoring in it, so when the time comes I need to really try and run it through the paces to avoid new bugs. The current upcoming changelog (commits) and backlog (todos) are in the first few posts of this thread.

Thanks!

djp952
Posts: 869
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 Jun 25, 2019 8:02 pm

ddejager wrote:
Sun Jun 23, 2019 6:07 am
djp952 wrote:
Sat Jun 22, 2019 7:33 pm

Wanted to let you know I haven't forgotten about this, but I did run into some problems trying to implement it. It seems very possible, I'm just having problems getting the tuner to actually send me data back. It's probably me messing up how to ask it for the channel I want based on the information I have. My intention is to still have this in v2.1.0, perhaps as something flagged as 'experimental'.
Thanks. This is NOT critical, just an experiment, so do whatever is important first.
Got this mostly working. The trick seems to be that I have to use the 'vchannel' function since I don't know anything other than the virtual channel number. I believe this eliminates older tuners from being able to work this way, but at least on a PRIME it does work.

Here's my initial observations -- tuning is a bit slower, but that could still be me as it's pretty hacked together at the moment. I'm also not seeing any appreciable difference in the overall bandwidth used, but that was expected -- MPEG-TS is MPEG-TS.

I think I'm OK to add a toggle as a child of the "Stream Live TV channels directly from tuner devices" setting that can switch between HTTP (normal) and RTP/UDP (libhdhomerun). Most likely with an "Experimental" tag on it since I really have no way to know if ALL the modern tuners support the virtual channel thing (I think they will, but can't prove). I'll hook up the CONNECT and make sure that tuning ATSC channels also works.

If I find anything to be risky to put in place, I'll send out a beta version you can use to see if it's worth bothering to keep as an option.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by ddejager » Wed Jun 26, 2019 5:30 am

Thanks!

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by signcarver » Wed Jun 26, 2019 9:56 am

Djp952: If you wish to support older devices for live streaming, what you will probably need is someone with an old device to give you their lineup.json (and possibly discover.json as it provides a base url though you may have obtained that through broadcast) which should have the tuning parameters... it might be difficult to test with a prime if one doesn't have clear qam.

As I recall, it gives GuideNumber, GuideName, and URL with the url being hdhomerun://{ip or deviceid}/chxxx000000-yyyy where the xxx after the ch was in MHz (thus why also having the 6 0s after)... i believe very old versions of kodi may have supported this hdhomerun protocol but thought they took it out shortly after the connect's release though i thought they used channel=xxx000000&program=yyyy when such was in xbmc and I don't recall if there was an auto for tuner number as i only recall specifying tuner... its been too long since i have used the legacy methods.


edit: if you wish to work towards that goal prior to getting a lineup from a legacy device, you can add ?tuning at the end of the lineup.json url to get the tuning parameters (won't work on a prime with TA... may still need to use virtual channel for encrypted content from prime) so you can experiment on using frequency/program id rather than virtual channel number.

jasonl
Silicondust
Posts: 13842
Joined: Sun Oct 28, 2007 9:23 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by jasonl » Wed Jun 26, 2019 11:32 am

The old Kodi support specified a tuner in the URL. There was no auto support. It was very rudimentary because it was just loading strm files generated by HDHomeRun Setup and feeding them to libhdhomerun. Now that Kodi has binary add-on support it ought to be possible to build libhdhomerun in to an add-on and use its tuner pooling API to let it automatically pick a device/tuner to use. If someone actually wants to take the time to do that, more power to them :D.

Post Reply