OLD: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Kodi Community Development

Moderator: TVJunkie198

Locked
rah32d
Posts: 5
Joined: Mon May 08, 2017 8:52 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by rah32d »

djp952 wrote: Tue May 23, 2017 9:25 pm Best guess is the wrong version of the .zip file, Linux gets angry when you try to load code for a different platform. OpenELEC 8 on a Pi 2 is probably "armhf", but I would have to install it to be certain. Which .zip file did you download?

You can try both the "armhf" and "armel", one of them is likely the right one. Trying to install the wrong one doesn't do anything but raise an error (as you found out!), it should be harmless to try more than one.
It's included with the OpenElec build, so I didn't download one or the other. I updated BerryBoot and the new OpenElec was available through it, so I installed it that way. The builds are specifically for Raspbian.

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 »

rah32d wrote: Wed May 24, 2017 9:50 am
djp952 wrote: Tue May 23, 2017 9:25 pm Best guess is the wrong version of the .zip file, Linux gets angry when you try to load code for a different platform. OpenELEC 8 on a Pi 2 is probably "armhf", but I would have to install it to be certain. Which .zip file did you download?

You can try both the "armhf" and "armel", one of them is likely the right one. Trying to install the wrong one doesn't do anything but raise an error (as you found out!), it should be harmless to try more than one.
It's included with the OpenElec build, so I didn't download one or the other. I updated BerryBoot and the new OpenElec was available through it, so I installed it that way. The builds are specifically for Raspbian.
Try the download for "Raspbian JESSE for Raspberry Pi 2/3". Raspbian is just different enough that it needed a special build separate from the regular GNU/Linux builds.

So wait, this PVR was in OpenELEC by default? Not that I mind (I would be flattered, actually), it's just surprising.

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 »

timnop wrote: Wed May 24, 2017 6:24 am One more newly discovered problem. First my setup. HDHR Prime on Spectrum cable. Windows 10 PC hosting HDHR setup and recordings. My main TV's are using Amazon Fire TV's second generation. When viewing live TV directly from the HDHR app all is good. When viewing live TV within Kodi and the HDHR addon it's also good. When viewing live TV with the PVR addon it has become unwatchable with pixelation and audio skipping, but recordings play just fine. This is a real bummer for me, because we like the grid guide for deciding what to watch next when we decide to change channels. Any ideas what the problem could be?
Hmmm... I'm not sure if the HDHR app hits the tuners directly or hits the RECORD engine, but that would be my best guess based on the symptoms -- the RECORD engine isn't keeping up. I've never set up the RECORD on Windows, just my NAS. What speed is the Windows 10 PC connected to the network, and how are the FireTVs connecting -- Wifi or hard-wired?

There is a setting you can change to try and narrow it down, if you go into the PVR Configuration and find the "Advanced" tab there is a toggle that says "Stream Live TV channels directly from tuner device(s)". If you enable that (and restart Kodi), LiveTV will come directly from the HDHomeRun Tuners instead of coming through the RECORD engine.

The other thing that may be going wrong is that I have a custom stream implementation for the normal stream path through the RECORD engine so I can send the right commands for placeshifting and whatnot. I have some performance problems on Android as well, but I've written that off as being over 802.11g Wifi in my case. I will try the regular HDHomeRun App tonight and see if the performance is notably better on the same tablet. It's very possible that my code just doesn't work well enough on Android. If this is the case, switching that setting should also alleviate it for now since the custom stream code is bypassed.

Or ... it could be a combination of both! Maybe RECORD engine isn't keeping up and when it does the PVR code can't handle it?

I'll see what I can do on my end to check if the PVR stream code is any slower than Kodi's on Android, should be easy enough to at least prove. I'm really thinking it's more likely the Windows 10 PC or the network connection but you never know until you look!

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 »

lovemyram4x4 wrote: Tue May 23, 2017 9:51 pm I'm not sure how long it actually takes(I'm guess that sometime after the initial load of guide data that is loaded on start up) but pretty much anytime I try to open the guide Kodi either locks up or the guide is blank(more often locks up). I also stop seeing the heads up notifications for recordings started/ended(not that they really mean anything since they are for any rule that's currently in the guide even if not being recorded and they don't pop up at the correct time)

End of Kodi log after trying to open guide when Kodi locked up has about 10 lines saying:
hdhomerun pvr client: void discover_devices_task(constscalar_condition<bool>$): initiated local network discovery
hdhomerun pvr client: void discover_devices_task(constscalar_condition<bool>$): scheduling next device discovery to initiate in 3(6)00sec
While very possible it's the PVR client causing some Kodi grief, this sounds more like a Kodi problem on the surface. When you are in the log, do you see the discovery for the guide entries come and go? The one you posted is a frequent task, that is checking your network for HDHomeRun devices. There should also be on the left side the time stamps for when the actions occurred; the guide can take a while, but it's all done in the background and only tells Kodi about it when it's been completed. Recent versions will also report if any errors occurred during discovery.

There was another user that had similar UI concerns a while back (sorry guys I forget which one), and we were never able to resolve it. It definitely went away when the PVR was uninstalled, but nothing jumped out as problematic; made a handful of changes based on guesswork but none panned out for him.

So I don't really have anything concrete for you on this right now; sorry. The behavior kinda suggests that there is a thread running amok in Kodi bogging everything down, possibly from the PVR -- have you looked at the system CPU usage while Kodi is behaving badly, does it spike up to like 100% and stay that way?

I turn off those annoying timer messages myself -- not having a way to know what is actually recording is a real detriment. I hope SD enhances the RECORD engine in the future to provide that level of detail.

timnop
Posts: 7
Joined: Thu May 18, 2017 3:00 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by timnop »

If I stream directly from the tuners will I lose the ability to record? My Windows PC and all streaming devices are on wifi. The Host PC wifi speed fluctuates between 86 and 144 mbps, but mostly around 130-144. I will test the streaming option in the pvr and let you know the result.


Thanks.

timnop
Posts: 7
Joined: Thu May 18, 2017 3:00 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by timnop »

Streaming directly from the tuners now and looks good so far...

rah32d
Posts: 5
Joined: Mon May 08, 2017 8:52 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by rah32d »

djp952 wrote: Wed May 24, 2017 10:08 am
rah32d wrote: Wed May 24, 2017 9:50 am
djp952 wrote: Tue May 23, 2017 9:25 pm Best guess is the wrong version of the .zip file, Linux gets angry when you try to load code for a different platform. OpenELEC 8 on a Pi 2 is probably "armhf", but I would have to install it to be certain. Which .zip file did you download?

You can try both the "armhf" and "armel", one of them is likely the right one. Trying to install the wrong one doesn't do anything but raise an error (as you found out!), it should be harmless to try more than one.
It's included with the OpenElec build, so I didn't download one or the other. I updated BerryBoot and the new OpenElec was available through it, so I installed it that way. The builds are specifically for Raspbian.
Try the download for "Raspbian JESSE for Raspberry Pi 2/3". Raspbian is just different enough that it needed a special build separate from the regular GNU/Linux builds.

So wait, this PVR was in OpenELEC by default? Not that I mind (I would be flattered, actually), it's just surprising.
I had no problems with previous versions of OpenElec and Kodi. I suppose something may have changed in the builds though.

And yes, it is being included by default, or rather it's an addon included in the addon manager.

timnop
Posts: 7
Joined: Thu May 18, 2017 3:00 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by timnop »

As I have made a few recordings now, I have noticed that only the original recordings show in the list. I am using "mcebuddy" to convert the originals to a smaller MP4 format and strip the commercials out. Then the originals are deleted. The converted files do not show up in the recordings list. I looked through the pvr configuration for a setting but there isn't one. I have also cancelled a few timers and found that they recorded anyway.

Thanks for your help!

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 »

timnop wrote: Wed May 24, 2017 10:58 am If I stream directly from the tuners will I lose the ability to record? My Windows PC and all streaming devices are on wifi. The Host PC wifi speed fluctuates between 86 and 144 mbps, but mostly around 130-144. I will test the streaming option in the pvr and let you know the result.


Thanks.
You won't lose the ability to record; that's controlled by the RECORD engine. This PVR is really just a front-end of sorts, it doesn't perform anything truly useful on its own :)

Wifi on the record PC may not be the best choice here, and I think it's likely the root of the problem.

Let me explain -- when you go through the RECORD engine to watch something, it's actually streaming it from the tuner, caching it, and then re-streaming it to Kodi. So it's requiring twice the bandwidth; up to maybe 40Mb/s would be needed, which is a lot to ask from Wifi reliably. When you stream directly from the tuner(s), the only bandwidth required is the one stream, or at most around 20Mb/s. Watching a recorded program would also only need the bandwidth for one stream.

I think you'll probably run into problems recording programs eventually as well; Wifi is really only going to work for one stream reliably (if then), so you'll be limited to recording one program and not watching anything recorded or re-streaming at the time.

I'm definitely going to play around and see if I can improve anything for you, but I'm betting in the Kodi log you're seeing a lot of "zero-length read" errors from the PVR, this means it ran out of source data and the end result is buffering and stuttering and other ugliness. I built in a really big data buffer, but that works on the assumption that the source can supply data faster than Kodi can use it, it doesn't help for the opposite situation :(

In the end you'd probably be a lot happier and be able to do a lot more if you hooked up the tuners and the RECORD system on a hard-wired 1000BaseT switch.

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 »

timnop wrote: Wed May 24, 2017 2:26 pm As I have made a few recordings now, I have noticed that only the original recordings show in the list. I am using "mcebuddy" to convert the originals to a smaller MP4 format and strip the commercials out. Then the originals are deleted. The converted files do not show up in the recordings list. I looked through the pvr configuration for a setting but there isn't one. I have also cancelled a few timers and found that they recorded anyway.

Thanks for your help!
This one is unfortunately out of my control -- the HDHomeRun RECORD engine decides what to show as recordings and to the best of my knowledge there is no way to ask it to add external files like that.

One thing you could perhaps do is point the Kodi Videos library at the path to the MP4 files. Completely different interface, of course.

----------------

Here's an ambitious and likely long-winded thought -- I wrote a special PVR for myself to have my old Media Center recordings show up as regular recorded TV alongside the HDHomeRun files. The code is public, but I never publicized it/documented it, it was intended as a temporary thing just for me :D I don't know how well it would work out of the box for MP4 files, it's hard-coded to use .WTV files in a single folder (ala Media Center "Recorded TV"). I imagine it might do something, just likely missing all the metadata (air date, plot, etc).

I probably can't get to it tonight, but I can see what happens with .MP4 files renamed to .WTV. It probably wouldn't require a lot of tweaks to get it to work enough to actually play the files, and perhaps I could do something with the file names themselves to get some metadata.

You are of course welcome to install it (Windows only!) and see what happens as well. https://github.com/djp952/pvr.mcerecordings/releases

Few quick notes if you do install that:

- It's very likely Kodi will lock up when you install it; wait a few seconds, kill Kodi, restart. Multiple PVR clients tend to do that. Same with uninstall, expect Kodi to lock up.
- The Kodi "use channel numbers from backend" setting does not work when you have multiple PVR clients, they will be back to 1, 2, 3, etc. Doesn't matter if the second PVR has channels or not.
- You should pre-add the network location in Kodi (go into any library, add, add network location, etc, cancel out when done)
- The only configuration option is that path and you can't type in there, this is why you have to pre-add it
- It's hard-coded to look for .WTV files in a single folder, absolutely no clue if it will accept a renamed .MP4 or not
- It takes a LONG TIME to scan all the files for metadata; none will show up until the scan is done
- It does not currently auto-refresh it's except on Kodi startup - again, my intent was only for old .WTV files I wasn't adding new ones

You'll quickly see why I never publicized this client - LOL. Works for me!

lovemyram4x4
Posts: 206
Joined: Thu Jun 02, 2011 5:45 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by lovemyram4x4 »

djp952 wrote: Wed May 24, 2017 10:35 am
lovemyram4x4 wrote: Tue May 23, 2017 9:51 pm I'm not sure how long it actually takes(I'm guess that sometime after the initial load of guide data that is loaded on start up) but pretty much anytime I try to open the guide Kodi either locks up or the guide is blank(more often locks up). I also stop seeing the heads up notifications for recordings started/ended(not that they really mean anything since they are for any rule that's currently in the guide even if not being recorded and they don't pop up at the correct time)

End of Kodi log after trying to open guide when Kodi locked up has about 10 lines saying:
hdhomerun pvr client: void discover_devices_task(constscalar_condition<bool>$): initiated local network discovery
hdhomerun pvr client: void discover_devices_task(constscalar_condition<bool>$): scheduling next device discovery to initiate in 3(6)00sec
While very possible it's the PVR client causing some Kodi grief, this sounds more like a Kodi problem on the surface. When you are in the log, do you see the discovery for the guide entries come and go? The one you posted is a frequent task, that is checking your network for HDHomeRun devices. There should also be on the left side the time stamps for when the actions occurred; the guide can take a while, but it's all done in the background and only tells Kodi about it when it's been completed. Recent versions will also report if any errors occurred during discovery.

There was another user that had similar UI concerns a while back (sorry guys I forget which one), and we were never able to resolve it. It definitely went away when the PVR was uninstalled, but nothing jumped out as problematic; made a handful of changes based on guesswork but none panned out for him.

So I don't really have anything concrete for you on this right now; sorry. The behavior kinda suggests that there is a thread running amok in Kodi bogging everything down, possibly from the PVR -- have you looked at the system CPU usage while Kodi is behaving badly, does it spike up to like 100% and stay that way?

I turn off those annoying timer messages myself -- not having a way to know what is actually recording is a real detriment. I hope SD enhances the RECORD engine in the future to provide that level of detail.
I don't think CPU spikes to 100%, aside from Kodi everything seems to be working without issue. Kodi also has been working without issue except for if I try to open the guide and it's been a long time since the last(which since I don't watch much live TV is pretty much every time). Last night after force closing and restarting Kodi guide opened fine then this morning after Kodi had sat idle over night it locked up.

In the past I've seen Kodi/SPMC lock up in the same way for other reasons(Not for quite awhile now) basically unresponsive and if you go to home or another app then back to Kodi it has a dark screen(sometimes white if it repeat a few times). I've also seen when it was trigger from other things sometimes if you waited long enough it would go back to normal(maybe this could be the case with the guide but I've never tried letting sit more than several min-I'll try before going to bed and see if it's still locked in the AM).

I thought about looking through the logs to see if/when the PVR stopped showing updates but the log files was huge when I checked it past night(took a while just to get to bottom using page down). I'll try taking a look at the current one once I get it fail to open guide again(I'm guess sometime after the current guide data has ran out-11PM).

I've pretty much had this problem since I started using the PVR client and I'm the most release prior to yesterday. I hasn't bother too much since I don't really watch much live TV but it has made it hard for me to try and figure out if wrong guide data is because it's just the wrong times or totally wrong(not that it will make any difference since I still have to get SD to look at and fix it which from all of my experience so far with SD is unlikely).

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 »

Quick update for you folks, I've updated the Android APKs for Krypton to the newly released 17.3 version (5/25/2017). No changes to the PVR client itself, still version 1.0.8:

https://github.com/djp952/pvr.hdhomerun ... /Downloads

By the sound of it, I'm glad I missed 17.2! Seemingly some problems with binary addons?

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

17.3 Kodi for windows breaks guide option when streaming

Post by johnny_swindle »

Just finished upgrading to 17.3. Fired up the PVR client and started watching live TV. Decided to use the guide option to see what else was on........a blank screen was displayed. TV channel option unaffected. Tested on multiple systems....same result. Downgraded to 17.1 and the guide was there when streaming.

I know that 17.3 addresses a potential security risk, but it seems to not play nice with this portion of the PVR addon.

Johnny

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 »

17.3 Kodi for windows breaks guide option when streaming
The problem seems to intermittent...........not sure what is going on....but I am certain that 17.3 has some impact on the add-on.

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 »

johnny_swindle wrote: Thu May 25, 2017 6:19 pm
17.3 Kodi for windows breaks guide option when streaming
The problem seems to intermittent...........not sure what is going on....but I am certain that 17.3 has some impact on the add-on.
Well drat! Dang you Kodi! It worked for me on an Android 5.0.2 tablet (ARM), let me set up an emulator. For now, I'll revert the main Downloads page back to 17.1.

THANK YOU for the report!!

Locked