Unofficial Kodi HDHomeRun DVR PVR Client

Kodi Community Development

Moderator: TVJunkie198

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by Ken.F »

djp952 wrote: Sat Aug 21, 2021 8:42 pm I don't currently think this will be backported to Leia since the PVR API contract is fundamentally different. If this will be a problem for anyone please let me know so I can work something up.
Do you plan to abandon Leia altogether or just not add this feature? LibreELEC still doesn't have a stable Matrix release available so a lot of people are stuck with Leia. I personally don't care if you don't add new features to Leia as long as it gets critical updates.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

Ken.F wrote: Sun Aug 22, 2021 6:29 am Do you plan to abandon Leia altogether or just not add this feature? LibreELEC still doesn't have a stable Matrix release available so a lot of people are stuck with Leia. I personally don't care if you don't add new features to Leia as long as it gets critical updates.
Not at all, in this case the Leia implementation would be different enough to require divergence of how some locking works and how the streams themselves are handled. I've found I tend to make more mistakes back-porting changes when this happens, I miss things and cause bugs that I shouldn't :) In Matrix, Kodi asks a different question than Leia. Matrix asks "what are the signal statistics for this one specific channel?". Leia asks "what are the current signal statistics for the PVR?". Kodi doesn't synchronize these questions with playback, they can come anytime -- before, during, after. Knowing what channel it's looking for allowed me to just answer the question without caring about what's actually going on with the stream. The Leia version of the question can't be answered without some new locking and more state management (like keeping track of what channel number is actively streaming).

If it's really of value on Leia, I could still backport it. I understand, and also suffer from, this extended period of time for all the kit distros to move on to Matrix.

theb0b0
Posts: 5
Joined: Thu Aug 19, 2021 3:17 pm
Device ID: 107503AA
x 1

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by theb0b0 »

djp952 wrote: Sat Aug 21, 2021 3:24 pm theb0b0, Ken.F, does this work for you:

Image

Image

Looks good to me as well! Excited to try out the beta soon

Thanks!

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

theb0b0 wrote: Sun Aug 22, 2021 11:25 am Looks good to me as well! Excited to try out the beta soon
Thanks!
Sorry for the delay, I've run into problems updating cURL to the latest version (v7.78.0) on Universal Windows (UWP). All other platforms appear to be fine.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

Here you are gents, figured out what the problem was with UWP and cURL 7.78.0 ...

Build 7905 - v3.6.0~beta1 / v4.6.0~beta1 (2021.08.23)
  • Update SQLite database engine to version 3.36.0
  • Update cURL library to version 7.78.0
  • Fix bug causing full refresh of guide data during startup if there are 'Unknown' channels in the lineup
  • (Matrix) Add reporting of Live TV tuner signal status information
  • (Matrix) Add new "Disable reporting of active Live TV tuner signal status" Interface option
Fix bug causing full refresh of guide data during startup if there are 'Unknown' channels in the lineup
When I hooked up my old HDHomeRun EXTEND, which is usually in a box, to verify the signal status enhancement for OTA, it managed to pick up a VHF channel during a scan but not well enough to decode it's PSIP. As a result it showed up as "5000 Unknown" in the lineup. The addon will implicitly re-download the XMLTV EPG data at Kodi startup if it notes that there is a lineup channel that does not exist in the cached EPG data. Since there will never be EPG data for an Unknown channel this cycle would continue unabated. The change exempts any channel with a number of 5000 or higher from the "are there missing channels" test.

(Matrix) Add reporting of Live TV tuner signal status information
By request, the addon is now capable of reporting signal status information to Kodi to be displayed in the "PVR info" pop-up in the player (press "o" during playback to open this). For the percentages displayed, "Signal Quality" maps to the HDHomeRun "Signal Strength" metric, and "SNR" maps to the HDHomeRun "Signal Quality" metric. This is accomplished by finding all the valid tuners for the requested channel in the lineup(s) and asking them each to report their status. The *first* tuner that is found tuned to the requested channel will be used here; there is no guarantee that the actual tuner serving the stream will be selected, but that will usually (perhaps always for DVR users) be the case. Note: Kodi asks for this information "out of band" from the streaming itself, so it may momentarily show you data for a previously tuned channel if you're fast enough with that "o" key :) Given how this information is queried I was also able to avoid any new locking or things that might cause a performance problem, so I changed my mind and made it enabled by default. The next item gives you an out if that was a bad decision ...

(Matrix) Add new "Disable reporting of active Live TV tuner signal status" Interface option
Just in case I'm wrong about the signal status implementation not being capable of causing any performance problems :)

Downloads (MS OneDrive):
https://1drv.ms/u/s!AgEGEEVzGNq-jJ1JLHD ... w?e=qp28Dh

As a reminder, installing an ~alphaX or ~betaX does not disqualify your system from automatically receiving the final version when it's published. Rollback to the prior published release is also possible via the Kodi "Update" (Leia) or "Versions" (Matrix) button in the Kodi addon configuration page for the PVR.

Let me know what you think, no hurry on this but I would like to resolve the "Unknown" channel EPG thing soon, not cool to download unnecessary data from SD.

edit:While generally pointless in nature, I just now tracked down why Matrix/Nexus aren't showing "zuki.pvr.hdhomerundvr:api.hdhomerun.com" in the PVR info dialog like Leia did; during the major Matrix API change I implemented the wrong function :( This will be in 4.6.0 final. So meaningless, but still a bug!

theb0b0
Posts: 5
Joined: Thu Aug 19, 2021 3:17 pm
Device ID: 107503AA
x 1

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by theb0b0 »

Installed 4.6.0~beta1 on win64 and (non-UWP) and surfed for a bit without any issues. Checked signal of a handful of stations and checked against the HDHR status page and everything matched up. No lags noticed but it was my most powerful machine running Kodi.

Going to install on the shield TVs and GTV Chromecasts and try it out over the next day or two. Might dig out an rpi as well to see how that works.

I will let you know if I see any bugs or slowdowns.

Thanks Again!

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by Ken.F »

Tested 3.6.0 beta1 on Win7-64 and 4.6.0 beta1 on Linux-64, both working fine.

I expected to see the broadcast RF channel or frequency listed in the Mux field instead of virtual channel number but I guess there's no way to get that from info the backend.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

Ken.F wrote: Tue Aug 24, 2021 5:46 am Tested 3.6.0 beta1 on Win7-64 and 4.6.0 beta1 on Linux-64, both working fine.

I expected to see the broadcast RF channel or frequency listed in the Mux field instead of virtual channel number but I guess there's no way to get that from info the backend.
I can switch that up to show the frequency in MHz instead of the virtual channel number after the virtual channel name if you'd like.

Thought: Would showing the frequency as part of "Device Status" make more sense? Instead of the static text "Active", perhaps "Active: 507.0 MHz", or something like that?

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by Ken.F »

djp952 wrote: Tue Aug 24, 2021 6:40 am I can switch that up to show the frequency in MHz instead of the virtual channel number after the virtual channel name if you'd like.

Thought: Would showing the frequency as part of "Device Status" make more sense? Instead of the static text "Active", perhaps "Active: 507.0 MHz", or something like that?
I think it makes more sense to have the frequency in the Mux field instead of Device Status but either way is fine as long as you can see the frequency somewhere. The virtual channel name and number are already visible in the OSD at the top of the screen whenever the PVR info screen is open so it seems less important to repeat it inside the PVR info screen.

theb0b0
Posts: 5
Joined: Thu Aug 19, 2021 3:17 pm
Device ID: 107503AA
x 1

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by theb0b0 »

I agree with Ken it'd be nice to have frequency somewhere in there - either place is fine - I'm guessing the status would almost always be Active if the stream is playing? So putting it there also isn't a bad idea otherwise that field is static and kind of pointless.

jasonl
Expert
Posts: 15664
Joined: Sun Oct 28, 2007 9:23 pm
x 32

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by jasonl »

Your change for channels > 5000 might have some unintended consequences. There are some DVB services (OTA in Spain and some cable providers in Germany and elsewhere in Europe) that don't use channel numbers but do have names and enough other metadata in the stream to map guide listings.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

jasonl wrote: Tue Aug 24, 2021 6:31 pm Your change for channels > 5000 might have some unintended consequences. There are some DVB services (OTA in Spain and some cable providers in Germany and elsewhere in Europe) that don't use channel numbers but do have names and enough other metadata in the stream to map guide listings.
Good to know, thank you! I shall add a clause that the name needs to be "Unknown" as well

Thanks for keeping a watchful eye, sir! (miss you out here)

edit: fixed. Thanks again!
Last edited by djp952 on Wed Aug 25, 2021 8:05 pm, edited 1 time in total.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

theb0b0 wrote: Tue Aug 24, 2021 9:26 am I agree with Ken it'd be nice to have frequency somewhere in there - either place is fine - I'm guessing the status would almost always be Active if the stream is playing? So putting it there also isn't a bad idea otherwise that field is static and kind of pointless.
Do you guys also want the modulation/video codec/audio codec info displayed somewhere?

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by Ken.F »

djp952 wrote: Tue Aug 24, 2021 7:54 pm Do you guys also want the modulation/video codec/audio codec info displayed somewhere?
That could be helpful. Where would you put it?

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by djp952 »

Ken.F wrote: Wed Aug 25, 2021 3:40 am
djp952 wrote: Tue Aug 24, 2021 7:54 pm Do you guys also want the modulation/video codec/audio codec info displayed somewhere?
That could be helpful. Where would you put it?
Probably in parentheses somewhere, knowing me :) Those would be "mux" properties, so maybe there?

Mux: VirtualChannelName (v572/auto/MPEG-2/AC3)

?

edit: OK, modulation (8vsb/auto/etc) is more of a tuning thing. That value maybe should go with the frequency, like 500MHz (8vsb)?

Post Reply