Unofficial Kodi HDHomeRun DVR PVR Client

Kodi Community Development

Moderator: TVJunkie198

Post Reply
djp952
Posts: 989
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 Nov 27, 2019 10:06 pm

Sometimes change is easy! Many thanks to CubsWin for the suggestion here; I love this one.

Version 2.4.2~beta1
  • Add "Use Original Air Date timestamp for Recorded TV programs" setting
I only built this for Leia but when v2.4.2 goes live it will also be in Krypton and Matrix ... if you want this change for those Kodi versions available sooner, it's not a big deal so LMK.

Downloads for Leia (OneDrive): https://1drv.ms/u/s!AgEGEEVzGNq-jIcQvtS ... Q?e=9emgqi

This adds a really nice setting into the PVR for you to test out -- "Use Original Air Date timestamp for Recorded TV programs". When enabled the Original Air Date timestamp (if available) will be reported to Kodi as the recording timestamp for Recorded TV programs. If a program aired in 2012, but you recorded it in 2019, it would show up with that 2012 timestamp in Kodi instead of the 2019 date. I like this new option a lot and intend to enable it here at chez djp952!

Changing this option will trigger a recording update, so Kodi should respond within a few seconds and update your Recorded TV library to reflect the altered timestamps. Switching back will exhibit the same behavior -- Recorded TV will go back to "normal" within a few seconds after turning this off.

CubsWin, you should download/install the "android-aarch64" .zip file for the nVidia Shield. The other two Android .zips will not work on that device.

What a great suggestion!

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by signcarver » Thu Nov 28, 2019 5:09 am

Though i would probably never use such, i can't but wonder if programs marked as news (or possibly even those recordings marked as FirstAiring for some other potential conflicts ) should always get record date as they have the same original airdate.

djp952
Posts: 989
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 » Thu Nov 28, 2019 7:36 am

signcarver wrote:
Thu Nov 28, 2019 5:09 am
Though i would probably never use such, i can't but wonder if programs marked as news (or possibly even those recordings marked as FirstAiring for some other potential conflicts ) should always get record date as they have the same original airdate.
A good idea, I have an "audio" category recording from the UK I was using to test something, which is actually a news program, and it shows up with an Original Air Date of 2002. My guess is that news probably does the same. I should be able to get programs of all the categories I know about recorded and see how they tend to show up.

gamaru
Posts: 10
Joined: Wed Nov 28, 2018 9:20 am

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by gamaru » Fri Nov 29, 2019 6:42 pm

So I have been on an insanely old version of the add-on, 1.3.10 to be exact. I just finally upgraded to 2.4.1 since Kodi 18.5 was being a little weird with my PVR today and now none of my channels want to work at all.

By the way I am on Ubuntu 18.04. Here is the part of the log that I just don't quite understand:

Code: Select all

2019-11-29 20:31:21.263 T:139990398707456  NOTICE: PVR Manager: Starting
2019-11-29 20:31:21.266 T:139991698626688  NOTICE: starting upnp server
2019-11-29 20:31:21.266 T:139991698626688  NOTICE: starting upnp renderer
2019-11-29 20:31:21.267 T:139987974563584  NOTICE: ES: Starting UDP Event server on port 9777
2019-11-29 20:31:21.267 T:139991698626688   ERROR: JSONRPC Server: Failed to connect to sdpd
2019-11-29 20:31:21.268 T:139987974563584  NOTICE: UDP: Listening on port 9777 (ipv6 : true)
2019-11-29 20:31:21.513 T:139988058490624  NOTICE: AddOnLog: HDHomeRun DVR PVR Client: wait_for_network_task: IPv4 network connectivity detected
2019-11-29 20:31:21.513 T:139988058490624  NOTICE: AddOnLog: HDHomeRun DVR PVR Client: discover_devices: initiated local network device discovery (method: broadcast)
2019-11-29 20:31:21.932 T:139988058490624   ERROR: AddOnLog: HDHomeRun DVR PVR Client: scheduled task failed due to an exception: discover_devices: no tuner devices were discovered; aborting device discovery
2019-11-29 20:31:21.932 T:139988058490624  NOTICE: AddOnLog: HDHomeRun DVR PVR Client: discover_lineups: initiated local tuner device lineup discovery
2019-11-29 20:31:21.933 T:139988058490624  NOTICE: AddOnLog: HDHomeRun DVR PVR Client: discover_guide: initiated guide metadata discovery
2019-11-29 20:31:21.933 T:139988058490624  NOTICE: AddOnLog: HDHomeRun DVR PVR Client: discover_guide: no tuners with valid authorization were discovered; skipping guide metadata discovery
2019-11-29 20:31:21.933 T:139988058490624  NOTICE: AddOnLog: HDHomeRun DVR PVR Client: discover_recordingrules: initiated recording rule discovery
2019-11-29 20:31:21.933 T:139988058490624  NOTICE: AddOnLog: HDHomeRun DVR PVR Client: discover_recordingrules: no tuners with valid DVR authorization were discovered; skipping recording rule discovery
2019-11-29 20:31:21.933 T:139988058490624  NOTICE: AddOnLog: HDHomeRun DVR PVR Client: discover_episodes: initiated recording rule episode discovery
2019-11-29 20:31:21.933 T:139988058490624  NOTICE: AddOnLog: HDHomeRun DVR PVR Client: discover_episodes: no tuners with valid DVR authorization were discovered; skipping recording rule episode discovery
2019-11-29 20:31:21.933 T:139988058490624  NOTICE: AddOnLog: HDHomeRun DVR PVR Client: discover_recordings: initiated local storage device recording discovery
2019-11-29 20:31:21.936 T:139988033312512  NOTICE: PVR Manager: Started
The HDHomeRun works fine with my Plex Server at the moment. It works fine with the mobile app on my phone as well so I just don't know whats going on. Reverting back to 1.3.10 works fine for now but I think I should probably keep myself up to date as possible.

Any help would be greatly appreciated. Thanks!

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by signcarver » Fri Nov 29, 2019 7:34 pm

Did you try setting it to http discovery (instead of broadcast, though personally i would make sure broadcast discovery works)

gamaru
Posts: 10
Joined: Wed Nov 28, 2018 9:20 am

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by gamaru » Fri Nov 29, 2019 7:46 pm

I did, I tried both turning it on and off.

I've done some digging through posts on this thread and it also seems that http://ipv4-api.hdhomerun.com/discover gives me just a page with a set of empty brackets.

djp952
Posts: 989
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 » Fri Nov 29, 2019 8:44 pm

gamaru wrote:
Fri Nov 29, 2019 7:46 pm
I did, I tried both turning it on and off.

I've done some digging through posts on this thread and it also seems that http://ipv4-api.hdhomerun.com/discover gives me just a page with a set of empty brackets.
Sorry for the delay in response ... it definitely sounds like your devices aren't visible for some reason. Here's why it works when you revert -- if the PVR doesn't find *any* devices, it keeps whatever it has in the database. That feature was meant for folks that have intermittent network issues, but the side-effect is that it kinda works forever like that so you don't really know something has gone wrong. When you upgrade the PVR to a revision that needed a new database file, the old one isn't deleted, so when you rolled back the file was still there and it picked up where it left off. Not being able to find any devices via broadcast (as noted above, the default was switched to this from HTTP a while back) OR via the HTTP API, which you proved in the browser is going to be a show-stopper for the PVR.

Before I talk too much and solve nothing - on the devices where Kodi is working, do you get the same blank response from http://ipv4-api.hdhomerun.com/discover? The problem may lie with the specific device, perhaps due to being on a different subnet?

This may need SiliconDust's help to resolve, they may ask you to enable debugging on your tuner(s) so they can see what's going on, but some causes I can think of might be a firewall at your router preventing UDP (broadcast) on your local network and blocking the tuner(s) from communicating with SiliconDust (HTTP). If you go to just "my.hdhomerun.com" you should get a page that says "Your HDHomeRun products" at the top and has a box for each device with some details. I'm betting this will be blank on you. That should be sufficient in and of itself to ask for help from SD if you want to go that route.

If you want us to see if we can help figure it out here, I think more details on the network configuration may help. Can you describe how the Kodi device is connected to your local network, and how the HDHomeRun tuner(s) are as well?

Some other thoughts/questions:
  • Can you ping the tuner(s) from the Kodi device? If Linux/Android you may need to SSH into it first to test.
  • Do you have a router (wifi or hard-wired) that everything ends up connecting to, or perhaps just a switch (hub)?
  • If the Kodi device is hard-wired, is it possible to connect it to the same switch as the tuner(s) and/or the router ports to test?
  • Have you rebooted the tuner(s) recently?
  • If Wifi is involved, have you set up any DMZ-type sandbox for public/guest access that the device(s) may be trying to use?
I wish there was a silver bullet to pull out for you here, but this really sounds like a network issue that popped up sometime between when you installed 1.3.10 and now. "Features" in the code prevented you from knowing about it :(

djp952
Posts: 989
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 » Fri Nov 29, 2019 9:16 pm

Also of note for those watching this thread, it is with a slightly heavy heart that I'm planning on retiring support for Kodi 17 "Krypton" with the v2.4.x cycle of updates. It makes me a little sad since Krypton is where this all started (Jarvis was a back-port), and truth be told it's still my favorite Kodi version.

It's not just that I don't want to anymore, there are a few mitigating factors leading to this decision. First, based solely on download statistics (there are no analytics or "phone home" features in the PVR), Krypton has now fallen under 1% usage (approximately 25-30 total users?). Second, I've been making mistakes on Krypton -- active development/changes take place on Leia and it's happened more than once in the past few months that I screwed up a back-port of something to Krypton forgetting how it differs. Finally, due to Krypton support the build toolset(s) for Linux have stagnated and aren't in step with Kodi anymore. I really need to start using GCC 5.x instead of GCC 4.9 for those environments, for example.

All good things must come to an end at some point. I will give you the same promise I did when I decided Jarvis had to go -- if something truly "breaking" happens and it's possible to resolve it on Krypton post-retirement, I will absolutely do so for you. I may wait for somebody to ask me for it, though :)

Sorry Krypton!

gamaru
Posts: 10
Joined: Wed Nov 28, 2018 9:20 am

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by gamaru » Fri Nov 29, 2019 9:58 pm

djp952 wrote:
Fri Nov 29, 2019 8:44 pm
gamaru wrote:
Fri Nov 29, 2019 7:46 pm
I did, I tried both turning it on and off.

I've done some digging through posts on this thread and it also seems that http://ipv4-api.hdhomerun.com/discover gives me just a page with a set of empty brackets.
Sorry for the delay in response ... it definitely sounds like your devices aren't visible for some reason. Here's why it works when you revert -- if the PVR doesn't find *any* devices, it keeps whatever it has in the database. That feature was meant for folks that have intermittent network issues, but the side-effect is that it kinda works forever like that so you don't really know something has gone wrong. When you upgrade the PVR to a revision that needed a new database file, the old one isn't deleted, so when you rolled back the file was still there and it picked up where it left off. Not being able to find any devices via broadcast (as noted above, the default was switched to this from HTTP a while back) OR via the HTTP API, which you proved in the browser is going to be a show-stopper for the PVR.

Before I talk too much and solve nothing - on the devices where Kodi is working, do you get the same blank response from http://ipv4-api.hdhomerun.com/discover? The problem may lie with the specific device, perhaps due to being on a different subnet?

This may need SiliconDust's help to resolve, they may ask you to enable debugging on your tuner(s) so they can see what's going on, but some causes I can think of might be a firewall at your router preventing UDP (broadcast) on your local network and blocking the tuner(s) from communicating with SiliconDust (HTTP). If you go to just "my.hdhomerun.com" you should get a page that says "Your HDHomeRun products" at the top and has a box for each device with some details. I'm betting this will be blank on you. That should be sufficient in and of itself to ask for help from SD if you want to go that route.

If you want us to see if we can help figure it out here, I think more details on the network configuration may help. Can you describe how the Kodi device is connected to your local network, and how the HDHomeRun tuner(s) are as well?

Some other thoughts/questions:
  • Can you ping the tuner(s) from the Kodi device? If Linux/Android you may need to SSH into it first to test.
  • Do you have a router (wifi or hard-wired) that everything ends up connecting to, or perhaps just a switch (hub)?
  • If the Kodi device is hard-wired, is it possible to connect it to the same switch as the tuner(s) and/or the router ports to test?
  • Have you rebooted the tuner(s) recently?
  • If Wifi is involved, have you set up any DMZ-type sandbox for public/guest access that the device(s) may be trying to use?
I wish there was a silver bullet to pull out for you here, but this really sounds like a network issue that popped up sometime between when you installed 1.3.10 and now. "Features" in the code prevented you from knowing about it :(
Not a problem at all with your response, I know this weekend is going to consist of a lot of family time. I'll answer your questions as best as I can.

* http://ipv4-api.hdhomerun.com/discover renders only a page with blank brackets.
* Both the HDHomerun Prime and the box that has Kodi are on the same subnet.
* my.hdhomerun.com tells me that I have no products detected
*The Kodi device and the HDHomeRun device are both connected wired to the same router on my network.
* I did reboot the tuner and also received a firmware upgrade that I missed from months earlier.
* No-wifi is involved on either of the devices.

Any help you could point me towards would be great even if I may have to speak to SD about debugging this. My setup works in the mean time but I'd love to ensure that it works in the future in case I have to migrate devices.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by johnny_swindle » Sat Nov 30, 2019 10:13 am

Raspberry pi 4
Libreelec 9.2 (Kodi 18.5)
zuki.pvr.hdhomerundvr-raspbian-armhf-leia-2.4.1.7256.zip


I have noticeable lag between the audio and video when using the PVR client.

Any tips/hints on where to begin to resolve this issue?

Thanks.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by signcarver » Sat Nov 30, 2019 12:02 pm

http://ipv4-api.hdhomerun.com/discover renders only a page with blank brackets.
To show up the above and my.hdhomerun.com (which uses such) the hdhomerun devices must have internet access. There have been some routers that prevent such without a reboot. The client, browser, or whatever is trying to use such must also connect from the same public ip address so no proxy, vpn, etc.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by johnny_swindle » Sat Nov 30, 2019 1:48 pm

@signcarver

Thanks for the idea. I rebooted the router, but unfortunately it had no effect. I think it may be an issue with the way rPi4/Libreelec handles ts streams. I saw a few threads on Libreelec of people having issues. BTW, it play all other items from my library without issue, just the live tv.

As a side note, the HDRomeRun official add-on from Kodi will not install...for what ever that is worth.

Johnny

djp952
Posts: 989
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 Nov 30, 2019 3:40 pm

Hi Johnny, signcarver was trying to help with gamaru's issue.

I don't have a Pi 4 to test with, but I think it doesn't have hardware acceleration for MPEG anymore, so LibreELEC is doing everything via the CPU. You may be able to play with the Audio and Video settings a bit, but your best bet is probably going to be to ask the LibreELEC folks. The TS stream has timestamps intended to keep the audio in sync with the video but it's up to the decoder (probably ffmpeg in this case) to make that happen.

I'd bet you aren't the first one to see this, poking around over there may yield an answer. It won't be something specific to the PVR, it will be some general MPEG decoding concern.

I'll see what I can find out for you as time allows. Perhaps even order up a Pi 4 :)

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by johnny_swindle » Sat Nov 30, 2019 6:35 pm

@djp952

Thanks. I will make a post over in the Libreelec forums.

PM me your mailing address.....I will gift you one of the rPi 4s that I have. It will be my contribution to further development.

Johnny
djp952 wrote:
Sat Nov 30, 2019 3:40 pm
Hi Johnny, signcarver was trying to help with gamaru's issue.

I don't have a Pi 4 to test with, but I think it doesn't have hardware acceleration for MPEG anymore, so LibreELEC is doing everything via the CPU. You may be able to play with the Audio and Video settings a bit, but your best bet is probably going to be to ask the LibreELEC folks. The TS stream has timestamps intended to keep the audio in sync with the video but it's up to the decoder (probably ffmpeg in this case) to make that happen.

I'd bet you aren't the first one to see this, poking around over there may yield an answer. It won't be something specific to the PVR, it will be some general MPEG decoding concern.

I'll see what I can find out for you as time allows. Perhaps even order up a Pi 4 :)

djp952
Posts: 989
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 Nov 30, 2019 9:04 pm

johnny_swindle wrote:
Sat Nov 30, 2019 6:35 pm
@djp952

Thanks. I will make a post over in the Libreelec forums.

PM me your mailing address.....I will gift you one of the rPi 4s that I have. It will be my contribution to further development.

Johnny
Oh! Um, I very very sincerely appreciate the offer but I just wouldn't feel right accepting any donations for this project. How about "borrowing" it to see if I can help you replicate/resolve the issue you're having for a bit, and then send it back? I would be fine with that :) I'm PM you.

Post Reply