OLD: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Kodi Community Development

Moderator: TVJunkie198

Locked
djp952
Posts: 1263
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 »

agressiv wrote: Mon Apr 10, 2017 11:13 am Out of curiosity, I tried the latest libreelec and openelec builds, neither were successful with the linux plugin:
17:56:13.803 T:140363675662080 ERROR: AddOnLog: HDHomeRun DVR PVR Client: ADDON_Create failed due to an unhandled exception: no such table: json_each: (1) SQL logic error or missing database
Tried moving over the .kodi directory as a means of installation (along with the DB) as well as wiping the db to see if it would recreate it.

SQLLite3 is installed:
LibreELEC:/ # /usr/bin/sqlite3 --version
3.15.2 2016-11-28 19:13:37 bbd85d235f7037c6a033a9690534391ffeacecc8
Guessing something else is missing. If I drop HBO, this will probably be the desired HTPC for me since I won't need the protected content of the Win10 app anymore.
Alright, I finally got x86_64 LibreELEC installed. Had to just give up on a VM and pop a drive in my desktop :) Everything seems to work fine for me?? Addon loaded and installed normally, no SQLite errors. I see SQLite 3.15.2 same as you in /usr/bin, but it's not in the default path. That SQLite cannot query the database manually as expected, it doesn't have the JSON extension. So that helps confirm that part I suppose.

Here's what I did, are you adding anything else I should add or changing anything that I should change? I really don't have any idea why the local SQLite 3.15.2 would be loading; I triple-checked that it's no longer exported in v1.0.7, the dynamic linker shouldn't even know about it, let alone load it. Clearly I'm missing something :shock:

  • Installed LibreELEC 8.0.1 x86_64 via USB drive (LibreELEC-Generic.x86_64-8.0.1.img.gz)
  • Enabled SSH during initial run
  • SSHed into the box, wget the addon (zuki.pvr.hdhomerundvr-linux-x86_64-krypton-1.0.7.6301.zip)
  • Installed the addon through Kodi
  • Everything seems to work normally
FWIW, if LibreELEC can support an old Radeon Mobility 4330 chipset I'm a total convert for the basement HTPC (old Dell Zino HD). Been using Ubuntu 15.10 since it can't handle MPEG2 through Windows/DirectX, nor can it use Ubuntu 16.x thanks to the "new" drivers for legacy Radeon. I really like how LibreELEC just does it's thing no muss no fuss. Takes all of 2 minutes to install and get up and running!

agressiv
Posts: 20
Joined: Sun Apr 17, 2016 9:00 am

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by agressiv »

I'll try it again. To be honest, I probably scp'ed my entire .kodi directory from a working ubuntu machine first, but the addon install didn't work at all after that.

GGRussell
Posts: 1403
Joined: Mon Dec 31, 2012 3:08 pm
Device ID: 131F5AA2 ; 1325E5E9

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by GGRussell »

Just installed Kodi 17 to try this out. First thing I noticed is the channel numbers are all wrong. I have disabled 1-109 which are standard definition. Yet the PVR add on is using those numbers. Is this to be expected?

djp952
Posts: 1263
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 »

GGRussell wrote: Fri Apr 21, 2017 6:56 pm Just installed Kodi 17 to try this out. First thing I noticed is the channel numbers are all wrong. I have disabled 1-109 which are standard definition. Yet the PVR add on is using those numbers. Is this to be expected?
By default Kodi assigns all channels a number of it's own choice. This can be overridden in Kodi 17 by enabling the following option:

Settings/PVR & Live TV/General/Use channel numbers from backend

That should let the channel numbers from the HDHomeRun be used for the Guide and Channel List :D

GGRussell
Posts: 1403
Joined: Mon Dec 31, 2012 3:08 pm
Device ID: 131F5AA2 ; 1325E5E9

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by GGRussell »

Thanks, is that the same thing as 'synchronize channel groups from backend'? I don't see any other choice. (Kodi 17.1)
That setting didn't make a difference. Can't use the add on if the channels aren't what I'm used to using.
----
Really odd. After closing and opening Kodi a few times, two other options finally showed up.

djp952
Posts: 1263
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 »

GGRussell wrote: Fri Apr 21, 2017 9:13 pm Thanks, is that the same thing as 'synchronize channel groups from backend'? I don't see any other choice. (Kodi 17.1)
That setting didn't make a difference. Can't use the add on if the channels aren't what I'm used to using.
----
Really odd. After closing and opening Kodi a few times, two other options finally showed up.
Most of the fun Kodi options require you to change the option at the bottom to "Advanced" or "Expert" (or something like that). Most of the PVR options are pretty benign, not sure why they hide so many of them.

So you are OK, are you seeing the channel numbers now? If not, there is also an option cooked into this PVR Client to prepend the number to the name for situations where Kodi refuses to use it. If you are stuck getting Kodi to cooperate, I have a wiki page that explains what all the custom PVR options are (including this one) and how to get to them: https://github.com/djp952/pvr.hdhomerundvr/wiki/Options. Prepending the number to the name doesn't remove the Kodi numbers, so you'd see something like "34 | 511 WBALDT" for cable or "18 | 22.1 WMPTDT" for OTA. Kodi does seem to keep them all in the right order, though.

It's probably worth scanning through the wiki pages regarding how recordings work as well, not everything is as intuitive as I would have preferred it to be, the way Kodi works and the way the HDHomeRun DVR service work differ just enough to make it difficult here and there. It might save some future frustrations for ya

If you have any suggestions for things, please let me know as well. I've got nothing on the todo list at the moment... :D

GGRussell
Posts: 1403
Joined: Mon Dec 31, 2012 3:08 pm
Device ID: 131F5AA2 ; 1325E5E9

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by GGRussell »

ONly thing I found odd was the 'rules' list. (all channels) followed by the Show name seems backwards. If I'm looking through my rules, most likely looking for a particular show or movie. Also the word 'timers' confused me a little.

My biggest issue is with Kodi in general. Constantly jumping back and forwards looking for settings. I can never remember where things are located. :lol: Wish I could get the NextPvr plug in working because that can use my old Hauppauge cable card tuner too.

swamprat96
Posts: 6
Joined: Sun May 14, 2017 3:29 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by swamprat96 »

Awesome work thankyou

testing this on my windows test box before I load the shield. Any Idea why its adding an "S" to all the station names?.
https://1drv.ms/i/s!Akif8uCvrtSRlh0MSRGhWK6YEehZ

Also- is there any plan to add this as a Kodi Addon? Uninstalling Kodi from my shield to add this version means I lose all my settings. Its also not very update friendly in this package?

djp952
Posts: 1263
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 »

swamprat96 wrote: Sun May 14, 2017 3:35 pm Awesome work thankyou

testing this on my windows test box before I load the shield. Any Idea why its adding an "S" to all the station names?.
https://1drv.ms/i/s!Akif8uCvrtSRlh0MSRGhWK6YEehZ

Also- is there any plan to add this as a Kodi Addon? Uninstalling Kodi from my shield to add this version means I lose all my settings. Its also not very update friendly in this package?
That is pretty peculiar! Unless there is a defect/bug, it should be reporting whatever the HDHomeRun backend service reports for the channel names. Here's how you can check! It's a bit involved, bear with me ...

- Visit http://my.hdhomerun.com/discover from your browser
- For each TUNER device you see in the data, copy out the DiscoverURL values (i.e., "http://{ipaddr}:80/discover.htm")
- Visit each DiscoverURL from your browser, copy out the DeviceAuth string for each (i.e., "cCzHZJO+5o24etf1dI3d9l0I")
- Combine each DeviceAuth string into a single string
- Access your guide by adding the combined DeviceAuth string to the end of:

http://ipv4.my.hdhomerun.com/api/guide?DeviceAuth=

For example, using the fictional DeviceAuth above, I would browse to:

http://ipv4.my.hdhomerun.com/api/guide? ... f1dI3d9l0I

What you get back is a JSON (data) representation of the program guide. Each channel has a "GuideNumber" and "GuideName" that you can use to find each channel. As an example, the first one I get back is ...

"GuideNumber": "26",
"GuideName": "WETADT",
"Affiliate": "PBS"

The GuideName is what should be showing up in the UI. If there is a trailing "S" on each one, you'll have to ping the SiliconDust guys to figure out why. If they look normal in this data then it's more likely a weird defect in the code. Let me know, if you are OK with sending me a copy of the PVR database (no identifiable info other than the [volatile] DeviceAuth strings) I can look at what it thinks the tuner specific and guide channel names are and try to duplicate your concern.

As far as making it an official addon, I'm sorry but probably not anytime soon. I don't have the ambition/time to support so many users, at least not right now. Ideally I've been hoping that the Kodi guys see this and can use bits/pieces to augment their PVR to work better with the HDHomeRun DVR service and multiple devices, sadly their forum rules prevent 'advertising', which is what it would be if I posted this out there. I also don't follow their addon code and build system rules. Never say never, though!!

The Kodi android guys/gals were at one point working on a way for an addon to be a separate android .APK, which would be ideal. It is a lot to ask of people to replace one Kodi fork with another just to get one addon. And, as you pointed out, you end up stuck on updates waiting for somebody like me to both a) notice there is an update and b) build/deploy it.

This addon seems to have pretty much reached the folks it's going to reach exclusively via this forum, I'm actually kind of surprised to see a new post! I do think it has value for Kodi at large, I just need to find the ambition to move it forward through Kodi officially (and toughen up some thick skin - the folks on the Kodi forums can be brutal!!) LOL

swamprat96
Posts: 6
Joined: Sun May 14, 2017 3:29 pm

Re: Unofficial Kodi PVR Client for HDHomeRun DVR subscribers

Post by swamprat96 »

yep its the data they send- the "S" is in there. THanks for that

I'm thinking the other option to use your code is to root the shield and then apply your files. But then I lose OTA right?


Damn- fine work and I suspect not enough of a user base to push Kodi. It works so well........

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 »

I just installed this today and the HD HomeRun Backend after my computer that housed my NextPVR backend crashed and corrupted the NextPVR database. It would require me to re-configure the app all over again. The first time was a pain...not interested in more pain.

So far this install for both has gone without issue and I am continuing to test..........so far I am very happy and look forward to future development.

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 »

Well things are not good at present. Thunderstorm took out my pc that was housing the HD backend. Rebuilt, re-installed backend.

I can see the guide but when I select "switch", nothing happens. Even when I change the setting of stream directly from tuners.

I am sure it is something simply I am overlooking but for the life of me I don't know what it could be.

Any ideas??

djp952
Posts: 1263
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 »

Hi gang! Sorry I was offline for a few days here. Glad there wasn't a Kodi 17.2 update or anything!
swamprat96 wrote: Mon May 15, 2017 2:56 pm I'm thinking the other option to use your code is to root the shield and then apply your files. But then I lose OTA right?
OTA for the Shield? To be honest I have no idea, I don't have one, but in my experience with Android you pretty much get borked on updates if you permanently root it. If there is a temporary root for the Shield that doesn't change anything on the /system partition it may not mess you up. The manual hack install only needs access to the /data partition. If there is a way that you can get write access to /data without even getting access to /system it should be perfectly safe (or so I am guessing).

djp952
Posts: 1263
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: Mon May 22, 2017 5:57 pm Well things are not good at present. Thunderstorm took out my pc that was housing the HD backend. Rebuilt, re-installed backend.

I can see the guide but when I select "switch", nothing happens. Even when I change the setting of stream directly from tuners.

I am sure it is something simply I am overlooking but for the life of me I don't know what it could be.

Any ideas??
Hmmmm.... this is an interesting one for sure. I can envision some ways this could happen with the "direct stream" option enabled, for example if the addon couldn't find/talk to the tuners to get updated stream URLs (and something like the IP addresses changed). With that option disabled, it goes to the HDHomeRun RECORD engine, but now that I think about it I suppose the same problem could happen if that can't be found. In the event of a 'discovery' problem I leave whatever was in the database in the database. Stale information?

There are a couple things we can do here. If you check the Kodi log, you should see something like this for each channel tune request (successful or not):

Code: Select all

NOTICE: AddOnLog: HDHomeRun DVR PVR Client: OpenLiveStream: streaming channel 731 via url http://192.168.0.220:57019/auto/v731?ClientID=2aeec362-ed07-4d50-a8ee-a0742a72496e&SessionID=D1618970C4D32C86EBD9715966B25099
If the IP address in the URL doesn't match what your RECORD engine (or tuner(s) if "direct" is on) is configured with, there's the problem. If this is the case, you should see some ERROR: logs in there from the addon with hopefully a clue why discovery didn't work.

The other thing we can do is play with the backend itself and get the URLs to try. Do you have VLC (or are willing to download it) ?? If so ... we can do what the addon does manually ...
  • From your browser, navigate to http://my.hdhomerun.com/discover
  • You should see a text list (JSON) that has entries for each of your tuners and the RECORD engine
Let's try the tuner(s) first, pick one that has a "DeviceID" and copy the "LineupURL"
  • Navigate to that "LineupURL" from the browser
  • The output is a bit daunting here, but this is a list of all your channels and the URL to stream them
  • Pick a channel, copy the "URL" (for example, "http://192.168.0.160:5004/auto/v464")
  • From VLC, go to Media/Open Network Stream and paste that URL. Does it work?
Now we can try the RECORD engine: If that all worked through VLC, compare the URLs you used with what you see in the Kodi log from the addon. If the addresses are different than the addon database is no good and is probably having problems discovering new data. If none of that worked, I got nuthin'.

Side question: Does the SiliconDust app (Windows) or official python addon (Windows/Linux) work?

Let me know what you find out! If there is a bug I'd love to squash it.

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 »

There are a couple things we can do here. If you check the Kodi log, you should see something like this for each channel tune request (successful or not):
Thanks for the rapid reply. While I was waiting for a reply, I did a little experiment. On my desktop (never has had Kodi installed) I installed Kodi....did not configure any libraries, added the skin I was using, and then installed the PVR Client.

PVR Client worked flawlessly....all the functionality present....live streaming, etc.

So the backend is functioning (tried the native SD app as well....it works). So as you suspected, something is amiss in the add-on database (stale information I believe you called it).

So should I go ahead and try the VLC option or some how remove the "stale information" from the add-on database? I can do a clean install of Kodi should that be necessary.

Thanks....

Johnny

Locked