(OLD) Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Kodi Community Development

Moderator: TVJunkie198

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by ddejager » Fri Sep 28, 2018 5:50 am

Two items:
First, 1.3.4 also fixes for me the KODI crash on OSMC on RPi that I was having previously with corrupted recordings. Great job and thanks!

Second, I have installed this system for some people who have very limited knowledge technically. I'm concerned that if you automatically and permanently switch from the record engine to the live stream directly from the device, they will have no idea how to get back to the record engine once it is available again. Perhaps the switch that you propose should be temporary, only until KODI is restarted, or only for the current show, until play is stopped. In this case you could automatically switch to direct device playback with merely a log entry made and perhaps a message displayed only if someone tries to rewind or pause/start the playback about what has [temporarily] happened.

Hardax
Posts: 48
Joined: Wed Aug 09, 2017 11:01 am

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by Hardax » Fri Sep 28, 2018 7:06 am

djp952 wrote:
Thu Sep 27, 2018 4:09 pm
Have an enhancement idea I wanted to run by you guys before I dive into it. I want to make sure this won't adversely affect anyone:

https://github.com/djp952/pvr.hdhomerundvr/issues/42
Given the prevalence of people that have the problem with HTTP discovery not finding their RECORD engine, I think it would be nicer to add some logic to fall back to broadcast automatically.
Here's my current plan:
If HTTP discovery is ON and no RECORD engine was found, try a broadcast discovery
If broadcast found a RECORD engine, auto-enable the broadcast setting and notify the user
If broadcast did not find a RECORD engine, do nothing. Discard the broadcast discovery results and leave HTTP ON
I think this is a pretty good way to handle it, it should help the people that first install this thing and have to research out or ask why it's not working, while at the same time not interfering with the people that legitimately don't have a RECORD engine running -- they should see no difference at all.
The HTTP discovery not listing a RECORD engine has been such a problem all along for many people (still unsure why that would be), so my idea here is to finally just deal with it. It wouldn't be hard to just execute a test broadcast discovery and see if that found a RECORD engine, and switch you over to that mechanism automatically.

I would notify you with a message of some kind (probably cryptic, you know, developer-speak), and you would only see that message once since the setting would be switched on you after that. I would never change your settings without letting you know, that's just bad form.

This test/switch/message would only be done at startup, I wouldn't put something in there that would interrupt you while you're happily watching your favorite program.

I think the only real annoyance factor would be if your HTTP discovery has been happy all along and then didn't work once for some reason while you're firing up Kodi. Today you just wouldn't see any recordings/etc, and probably just restart Kodi and forget all about it if it worked the next time. With this change, you would be switched to broadcast discovery (and notified!) and you would have to manually go in and switch back to HTTP if it was indeed a transient condition.

Thoughts? Concerns? Risk vs. Reward sound OK on this?

edit: Wanted to give props to user jlippold for not only using the PVR addon, but for giving me pause to think about a better way to handle this for everyone. I don't want anyone else new to be frustrated by this particular quirk.
Will this affect timeshifting playback at all? I really only use the record engine for time shifting. I havent as of yet used to to record anything.

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Fri Sep 28, 2018 8:39 pm

I think the proposed change is a little misunderstood :) Or, perhaps I misunderstand the concerns!

The idea is to give new users a seamless way to get from HTTP to broadcast discovery, since it's a common problem. It wouldn't actually change any behaviors (timeshifting, seek, etc) other than how the PVR figures out where your devices are on the network, specifically the RECORD engine. Other than this optional UDP broadcast device discovery, this PVR already relies exclusively on the HDHomeRun HTTP interfaces.

I don't think that switching the default discovery over to UDP from HTTP is a general improvement for a couple reasons. First, the HTTP API returns slightly more information than UDP discovery does, and is undoubtedly the place where SiliconDust will add new data elements if they become available -- they haven't touched libhdhomerun in a meaningful way in quite some time, and I don't expect them to. Second, and perhaps more importantly, the HTTP API is supposed to return ALL your devices regardless of if they are on the same subnet or not. UDP broadcast will never find anything on another subnet.

I really don't want to mess with the defaults that insofar as I know do work well for the vast majority of users, my idea was to throw some love over to the folks that aren't in that majority and prevent them from needing to ask or research why it's not working out of the box for them.

If we go this way, the ONLY place it would apply is during initial device discovery when you start up Kodi. It may add a few milliseconds if the RECORD engine wasn't found over HTTP, but otherwise should be extremely unintrusive to you!

ringerlin
Posts: 10
Joined: Fri Sep 07, 2018 2:35 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by ringerlin » Fri Sep 28, 2018 10:32 pm

First, thank you again for working so hard improving this addon.
Recently, I've been trying to figure out a way to remotely manage the recording tasks while I'm away. I found Yatse remote app on Android seems to be a good tool. It does work fine for recording a live program. However, if I try to add a timer, it always pick the wrong channel. After contacting Yatse customer service, they gave me the following answer:
"Yes it appears there's a know bug / limitation in Kodi about that. API does not allow to select channels only program ID and they are not unique :( Won't be fixed before v19 so you need to ask your PVR addon author to ensure IDs are unique until they fix it."

So is this something that can be improved in the future? I don't have to remotely manage the recording very often. But this is going to be a very handy feature for folks who need to travel a lot.
Thank you.

riviera128
Posts: 28
Joined: Tue Jun 19, 2018 7:01 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by riviera128 » Sat Sep 29, 2018 7:13 am

I really don't want to mess with the defaults that insofar as I know do work well for the vast majority of users, my idea was to throw some love over to the folks that aren't in that majority and prevent them from needing to ask or research why it's not working out of the box for them.
It seems odd that there would be many people having difficulties where the record engine insn't discovered via HTTP on a simple home network. There currently is an option to use UDP broadcast discovery in the client, isn't there? In your experience has turning that option on fixed the issue for those where HTTP isn't working? I'm just wondering if there is more than just HTTP discovery at work for people having difficulties. That's why I was wondering if adding an option to directly input the record engine device's IP address may help troubleshoot- maybe separate out discovery issues vs some other problems with the record engine (unless you've seen that UDP discovery is fixing the issue for everyone).

Regardless, it doesn't sound like your proposed change should adversely affect anyone.

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by Ken.F » Sat Sep 29, 2018 7:19 am

djp952 wrote:
Thu Sep 27, 2018 4:09 pm
I would notify you with a message of some kind (probably cryptic, you know, developer-speak), and you would only see that message once since the setting would be switched on you after that. I would never change your settings without letting you know, that's just bad form.
IMHO any setting that the user has access to should never be changed automatically. If broadcast discovery is turned off it should stay off until the user changes it.

If you want to add an automatic fail-safe you could have it attempt HTTP first on every launch and temporarily fall back to broadcast if necessary, or the other way around. Or you could give the user complete control by offering four options for discovery method order.

1. HTTP, Broadcast
2. Broadcast, HTTP
3. HTTP only
4. Broadcast only

I have no idea how hard it would be to add discovery method options but I would very much prefer that over settings getting changed automatically.

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Sat Sep 29, 2018 9:27 am

Ken.F wrote:
Sat Sep 29, 2018 7:19 am
djp952 wrote:
Thu Sep 27, 2018 4:09 pm
I would notify you with a message of some kind (probably cryptic, you know, developer-speak), and you would only see that message once since the setting would be switched on you after that. I would never change your settings without letting you know, that's just bad form.
IMHO any setting that the user has access to should never be changed automatically. If broadcast discovery is turned off it should stay off until the user changes it.

If you want to add an automatic fail-safe you could have it attempt HTTP first on every launch and temporarily fall back to broadcast if necessary, or the other way around. Or you could give the user complete control by offering four options for discovery method order.

1. HTTP, Broadcast
2. Broadcast, HTTP
3. HTTP only
4. Broadcast only

I have no idea how hard it would be to add discovery method options but I would very much prefer that over settings getting changed automatically.
Good points. Making multiple methods wouldn't be hard, actually. But what if I took away the settings change part and scale the idea back a bit?

- User is on HTTP discovery and no RECORD engine was found
- Do a RECORD engine only search over UDP
- If that finds a RECORD engine use that information, but only that information

This could be a generalized discovery change as well this way, anytime no RECORD engine was found over HTTP see if we can find it over UDP. Since so many things rely on the RECORD engine working, seems reasonable?

The expanded methods could also work, but perhaps just three would be necessary. If we were to use multiple methods I would merge the results together so the order wouldn't matter. HTTP+UDP would yield the same results as UDP+HTTP. Unless this would incur some performance penalty on the users (it really wouldn't, both methods are very fast) that might be a better default.

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Sat Sep 29, 2018 9:33 am

ringerlin wrote:
Fri Sep 28, 2018 10:32 pm
First, thank you again for working so hard improving this addon.
Recently, I've been trying to figure out a way to remotely manage the recording tasks while I'm away. I found Yatse remote app on Android seems to be a good tool. It does work fine for recording a live program. However, if I try to add a timer, it always pick the wrong channel. After contacting Yatse customer service, they gave me the following answer:
"Yes it appears there's a know bug / limitation in Kodi about that. API does not allow to select channels only program ID and they are not unique :( Won't be fixed before v19 so you need to ask your PVR addon author to ensure IDs are unique until they fix it."

So is this something that can be improved in the future? I don't have to remotely manage the recording very often. But this is going to be a very handy feature for folks who need to travel a lot.
Thank you.
I'll grab Yatse and see how it works (never heard of it before now). I'm not familiar with Kodi's HTTP interface (I'm guessing that what it uses), but it sounds like whatever method adds recordings doesn't have the option for specifying the channel.

It may be easier to propose a change to Kodi to fix/add the necessary parts, they are pretty cool about it and unless it would break something it probably wouldn't need to wait for Kodi 19. Kodi 18.1, perhaps.

Thinking out loud, Kodi will go through the PVR to add the timer anyway, if there is no way to actually do this there may be some possible trickery by using Favorite channels or something. It would require knowing what channel(s) the series is available on so it would need to be accessible via the backend EPG, and perhaps if one of those channels is marked as a Favorite on your HDHomeRun the PVR could default to that channel instead of "Any Channel" when the timer is added.

Will see what I can find out for you.

edit: OK, installed Yatse and looked at what it was asking the PVR to do. There is definitely a disconnect somewhere before the PVR on the channel number assignment. For example, I asked Yatse to record a program on channel 26 and it requested channel 460. I tried 260 and it asked for … 260. I would have to compile Kodi to be able to step back through and see why it asked for the wrong channel, which is a possibility later today or tomorrow :)

On the surface, however, it appears that Yatse is simply asking for the wrong channel. I didn't see any way to search for/record a program on 'any channel', I clicked the program in the Yatse guide and selected 'record'. It specified the channel, it just specified the wrong channel!
Last edited by djp952 on Sat Sep 29, 2018 10:14 am, edited 1 time in total.

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Sat Sep 29, 2018 9:37 am

riviera128 wrote:
Sat Sep 29, 2018 7:13 am
I really don't want to mess with the defaults that insofar as I know do work well for the vast majority of users, my idea was to throw some love over to the folks that aren't in that majority and prevent them from needing to ask or research why it's not working out of the box for them.
It seems odd that there would be many people having difficulties where the record engine insn't discovered via HTTP on a simple home network. There currently is an option to use UDP broadcast discovery in the client, isn't there? In your experience has turning that option on fixed the issue for those where HTTP isn't working? I'm just wondering if there is more than just HTTP discovery at work for people having difficulties. That's why I was wondering if adding an option to directly input the record engine device's IP address may help troubleshoot- maybe separate out discovery issues vs some other problems with the record engine (unless you've seen that UDP discovery is fixing the issue for everyone).

Regardless, it doesn't sound like your proposed change should adversely affect anyone.
It's a curiosity for me as well, I've never had any problems with the HTTP services listing all my devices. People's tuners don't seem to be a hassle as much as the DVR/RECORD engine. IIRC nobody has ever complained that their tuner wasn't showing up, but of course this PVR does everything through the RECORD engine by default, so if that isn't listed it gets ugly quick.

The ONLY thing that's ever been annoying for me with the HTTP discovery is when I turn a tuner off it takes a while for it to not be listed anymore. This makes perfect sense, the backend has to wait for a device to not check in with it before it would know it's gone. I think it takes about 15 or so minutes for a device to drop off the list. I imagine I'm probably the only one that intentionally turns tuners on and off, of course - they aren't very useful if they aren't plugged in!

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by Ken.F » Sat Sep 29, 2018 9:59 am

djp952 wrote:
Sat Sep 29, 2018 9:27 am
This could be a generalized discovery change as well this way, anytime no RECORD engine was found over HTTP see if we can find it over UDP. Since so many things rely on the RECORD engine working, seems reasonable?
Sounds good to me.

jsthomps
Posts: 7
Joined: Fri Sep 18, 2015 12:23 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by jsthomps » Sat Sep 29, 2018 11:59 am

Hi Newbie here ... which apk do I use for new nVidia Shield?
Thanks,
Scott

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Sat Sep 29, 2018 12:26 pm

jsthomps wrote:
Sat Sep 29, 2018 11:59 am
Hi Newbie here ... which apk do I use for new nVidia Shield?
Thanks,
Scott
"aarch64". The Shield is an ARM64 Android device.

Krypton 1.3.4 Release: https://github.com/djp952/pvr.hdhomerun ... pton-1.3.4
  • kodi-17.6-zuki.pvr.hdhomerundvr-aarch64-1.3.4.6838.apk

jsthomps
Posts: 7
Joined: Fri Sep 18, 2015 12:23 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by jsthomps » Sat Sep 29, 2018 5:23 pm

Thanks for your help!

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by djp952 » Sat Sep 29, 2018 5:50 pm

jsthomps - you're quite welcome!

Gang, I was poking around on the Kodi forum and see that the stream stalling when first starting a channel on Leia on the nVidia Shield is something that seems to affect all the PVRs out there, not just this one. I didn't make any real headway on the issue regardless but this pretty much confirms that it's something systemic to Leia on the nVidia Shield right now.

Hopefully Team Kodi will get this sorted out before Leia releases, me poking around in that part of Kodi isn't likely to bear much fruit, I have little to no knowledge of how A/V decoders work. The log error "stream stalled" we get only happens in one place, so I know it's having trouble with the Audio portion of the stream, but why it decides it needs to stop is above my pay grade :)

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

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by ddejager » Mon Oct 01, 2018 7:00 pm

Not sure if this is the PVR client or not since I also recently replaced my old EXTEND (which died) with a CONNECT QUATRO while also upgrading to the latest PVR Client (1.3.4). I'm running on OSMC on a RPi......

Ever since upgrading to 1.3.4 I observe that after watching a live or recorded show for a while (between 10 and 20 minutes) the sound starts dropping out for a half second or so...the video continues correctly. Once this starts, it happens frequently and intermittently about every 10 to 20 seconds or more often, until I stop the playback (or live show) and restart where I left off...then the problem goes away for another 10 to 25 minutes before it starts again. The audio problem is not in the recording....if I skip back 30 seconds and start playing the missed audio will play, but the intermittent problem continues until I stop and restart.

My record engine is on a windows 10 PC, connected to the network with a gigabit ethernet. The RPi is also connected via ethernet, so it is not a WiFi problem.

I also have a Firestick on the network running Kodi. I've not yet tried to reproduce the problem on the Firestick.

Locked