Unofficial Kodi HDHomeRun DVR PVR Client

Kodi Community Development

Moderator: TVJunkie198

Post Reply
starslayer74
Posts: 11
Joined: Thu Jul 06, 2017 2:50 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by starslayer74 » Sat Sep 07, 2019 3:45 pm

signcarver wrote:
Sat Sep 07, 2019 2:18 pm
One thing I can think of is a Servio also has a DeviceAuth even though it is a Storage engine and does not have tuners so perhaps the tuner isn't returning the DvrActive.

For troubleshooting I would also try to switch discover methods.

Edit: also what model is your tuner as legacy models aren't supported by the DVR (you said you can record so this shoudn't be an issue)
Ok, update, I did switch my discover method - now I can schedule recordings in Kodi - however, the timers I'm setting up don't show up in Kodi when I'm go to my timers listings, and my recordings don't show up in Kodi's recordings area.

If I go to my HDHomerun app and look at timers, it shows what I set up to record on Kodi, and it shows that it is actively recording, but when it finishes recording, it doesn't save it anywhere that I can find it.

If I record it in the HDHomerun app, it doesn't show up on Kodi but it does show up on the app.

starslayer74
Posts: 11
Joined: Thu Jul 06, 2017 2:50 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by starslayer74 » Sat Sep 07, 2019 3:56 pm

signcarver wrote:
Sat Sep 07, 2019 2:47 pm
To test my theory what i would do is get the DeviceAuth of the prime by retrieving it's discover.json

If there are any special characters it can become tricky as they should be url encoded (i.e. lately I have been getting a / in my auths and that would need to be changed to %2F (many characters don't need to be changed but I usually change anything that isn't a letter or number)

Then go to https://api.hdhomerun.com/api/account?DeviceAuth=xxx
where xxx is your DeviceAuth.

It should return something like your email address and registered devices as well as DvrActive
I don't know how to find discover.json. I apologize.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by signcarver » Sat Sep 07, 2019 5:04 pm

If the tuner shows up at my.hdhomerun.com, the easiest way would probably be to click the deviceID then add /discover.json to the end of the url that is the ip address of your tuner (i.e. 192.168.0.1/discover.json). Personally I know the ip addresses of every device on my network so I usually just enter the url directly.

Edit: didn't realize you had two posts in there as I actually went by notification... I would probably switch your discovery method back if it showed your recordings. Most likely when you made such switch it showed the DeviceAuth of the Servio as it has a DeviceID and DeviceAuth and StorageID and when they use the other method it may decide based on what it saw first...
Last edited by signcarver on Sat Sep 07, 2019 5:26 pm, edited 1 time in total.

starslayer74
Posts: 11
Joined: Thu Jul 06, 2017 2:50 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by starslayer74 » Sat Sep 07, 2019 5:25 pm

signcarver wrote:
Sat Sep 07, 2019 5:04 pm
If the tuner shows up at my.hdhomerun.com, the easiest way would probably be to click the deviceID then add /discover.json to the end of the url that is the ip address of your tuner (i.e. 192.168.0.1/discover.json). Personally I know the ip addresses of every device on my network so I usually just enter the url directly.
I knew the IP address I just wasn't sure how to find the json file. I found it now, and went to the link, this is the response I got:

{
"AccountEmail": null,
"AccountDeviceIDs": [
"1325D5CE",
"15300503"
]
}

When I look at the other device (My servio) I get the following:

{
"AccountEmail": null,
"AccountDeviceIDs": [
"1325D5CE",
"15300503"
],
"DvrActive": 1,
"AccountState": "Active"
}

I'm thinking that the prime isn't showing DvrActive and thats whats causing the issue....I emailed tech support to see if theres anything they can do about that part.

starslayer74
Posts: 11
Joined: Thu Jul 06, 2017 2:50 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by starslayer74 » Sat Sep 07, 2019 5:41 pm

signcarver wrote:
Sat Sep 07, 2019 5:04 pm
If the tuner shows up at my.hdhomerun.com, the easiest way would probably be to click the deviceID then add /discover.json to the end of the url that is the ip address of your tuner (i.e. 192.168.0.1/discover.json). Personally I know the ip addresses of every device on my network so I usually just enter the url directly.

Edit: didn't realize you had two posts in there as I actually went by notification... I would probably switch your discovery method back if it showed your recordings. Most likely when you made such switch it showed the DeviceAuth of the Servio as it has a DeviceID and DeviceAuth and StorageID and when they use the other method it may decide based on what it saw first...
Switching discovery back does show my recordings that I intiiated in the official app - but I still can't schedule recordings or see timers in Kodi. So I'm back where I started on that front.

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

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by signcarver » Sat Sep 07, 2019 5:43 pm

The servio is probably self activated... this may require nickk, nateb or NedS to look into though djp952 should be able to make sure to use the deviceAuth of the servio as well (if you can humor me if you paste both deviceAuths back to back (nothing in between) does it report DvrActive (you had posted the second as I began to write this as I had lots of other things to say)... I do know currently there is an "issue" with those that have the DVR "forever" that the servio/scribe activation hasn't "officially" extended anything yet as they were still working such out (our subscriptions haven't started yet) and it may be similar as needing an email address associated with the account.


Note to djp952, in case you need it, here is an example of what gets sent for a servio from http discovery and it's discover.json (I x'd a bunch out) and you might have some logic that overlooks sending the servio's DeviceAuth expecting it not to have one and/or it may be that "everyone" else doesn't just have a servio/scribe and/or they had already activated their tuners as I expect at least for right now, a Servio is active even without activation (I can't remember what happened when I installed one as I have had the DVR and tuners for so long, I believe I just had to click continue on the HDHomeRun App).

Code: Select all

{
DeviceID: "15300C36",
LocalIP: "192.168.0.x",
BaseURL: "http://192.168.0.x",
DiscoverURL: "http://192.168.0.x/discover.json",
StorageID: "xxxxxxxx",
StorageURL: "http://192.168.0.x/recorded_files.json"
},

Code: Select all

{
FriendlyName: "HDHomeRun SERVIO",
ModelNumber: "HHDD-2TB",
FirmwareName: "hdhomerun_hdd",
FirmwareVersion: "20190815beta1",
DeviceID: "15300C36",
DeviceAuth: "xxxxx",
BaseURL: "http://192.168.0.x:80",
StorageID: "xxxxxxxxxx",
StorageURL: "http://192.168.0.x:80/recorded_files.json",
TotalSpace: 1999421038592,
FreeSpace: 1163474509824
}

djp952
Posts: 920
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 Sep 07, 2019 6:18 pm

Got it, thank you both for the information, I know what the problem is. I specifically only retrieve device authorization codes from devices flagged as "tuner".

I will make an update tonight and send it out via link here as a beta for you try, if it works I can push a formal emergency release out for everyone.

djp952
Posts: 920
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 Sep 07, 2019 7:19 pm

Version 2.2.3~beta1 (2019.09.07)
  • Fix bug that caused "DVR Service Subscription Required" errors when only storage engines are DVR authorized
Link to .zip files (OneDrive):
https://1drv.ms/u/s!AgEGEEVzGNq-i_wmJrq ... w?e=mKocn2

This is a Beta release that intends to resolve the problem being experienced by starslayer74 -- only tuner devices were being checked for valid authorization codes, and subsequently only those tuner codes were used to check the DVR subscription status. The new SERVIO device also exposes a device authorization code that can and should be used as part of subscription status check.

starslayer74, you should also probably get your PRIME hooked up to your account so it will also be able to participate in subscription status check. Both of your devices should have come back with "DvrActive" as 1. The addon would have worked properly in spite of itself if the PRIME was "DvrActive". (But if you did we would never know about this limitation!!)

Please let me know if this resolves your problem, or of course if it causes any new problems. If it's all good I can make v2.2.3 official tomorrow evening.

starslayer74
Posts: 11
Joined: Thu Jul 06, 2017 2:50 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by starslayer74 » Sat Sep 07, 2019 8:11 pm

djp952 wrote:
Sat Sep 07, 2019 7:19 pm
Version 2.2.3~beta1 (2019.09.07)
  • Fix bug that caused "DVR Service Subscription Required" errors when only storage engines are DVR authorized
Link to .zip files (OneDrive):
https://1drv.ms/u/s!AgEGEEVzGNq-i_wmJrq ... w?e=mKocn2

This is a Beta release that intends to resolve the problem being experienced by starslayer74 -- only tuner devices were being checked for valid authorization codes, and subsequently only those tuner codes were used to check the DVR subscription status. The new SERVIO device also exposes a device authorization code that can and should be used as part of subscription status check.

starslayer74, you should also probably get your PRIME hooked up to your account so it will also be able to participate in subscription status check. Both of your devices should have come back with "DvrActive" as 1. The addon would have worked properly in spite of itself if the PRIME was "DvrActive". (But if you did we would never know about this limitation!!)

Please let me know if this resolves your problem, or of course if it causes any new problems. If it's all good I can make v2.2.3 official tomorrow evening.
I emailed support so I'm hoping they can tie my prime to my account.

It is definitely an improvement. I can now schedule recordings from Kodi and the scheduled recordings show up in my Recorded shows folder on Kodi.

Two things I noticed, and I don't know if they were known issues yet:

1. Timers are not showing up in Kodi (when I press "B" it isn't showing anything that is scheduled.
2. There is no indicator on the EPG view to show that a show is scheduled/recording. I think that's a PVR feature since I've had it show up when I was using NextPVR (literally just earlier today)

Those are both minor issues, I'm just happy to have recording functionality working at this point.

I really appreciate how quickly you jumped on this issue! Thanks!

djp952
Posts: 920
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 Sep 07, 2019 8:51 pm

Fantastic!

Yeah ... the way timers work with HDHomeRun takes some getting used to. When you schedule a Timer Rule, the backend will tell me what airings *might* be recorded, it's not a definitive sort of thing. I do the best I can to make it reasonable for Kodi but you really can't trust the Timers list, and subsequently the EPG recording indicator. Most of the time the complaint is the opposite ... All kinds of Timers for shows that aren't going to be recorded.

This info is a little out of date, but does a moderately good job of explaining how it works:

https://github.com/djp952/pvr.hdhomerun ... imer-Rules

HDHomeRun is just a little ... different :)

djp952
Posts: 920
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 » Sun Sep 08, 2019 6:55 pm

FYI, I'm going to hold off on releasing a formal v2.2.3 in lieu of a v2.3.0. I am going to change some additional things for SCRIBE and SERVIO compatibility, including the database schema (slightly), and there is a cURL update coming in 3 days. A database change requires a full MAJOR.MINOR version bump.

It won't be a big change, per-se, but up until now I've been tracking if a device is specifically a tuner or a storage device, so I'm assuming that SCRIBE users are going to get dorked up since a SCRIBE is both. So instead of tracking the type of the device, I'm going to use the presence of a "Lineup URL" and/or the presence of a "Storage URL" in the discovery data instead. This is similar in what I did for the 2.2.3 beta above to solve the problem with the SERVIO being the only DVR authorized device.

starslayer74
Posts: 11
Joined: Thu Jul 06, 2017 2:50 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by starslayer74 » Mon Sep 09, 2019 8:17 am

I heard back from support, they aren't going to link my two devices together. The reasoning is that if I pulled my Servio then I would still have access to the DVR service, which I somewhat understand.

I emailed back to find out what happens when I get to the end of my included year and I want to renew, which device the renewal goes to, and am awaiting their response.

djp952
Posts: 920
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 » Mon Sep 09, 2019 1:19 pm

starslayer74 wrote:
Mon Sep 09, 2019 8:17 am
I heard back from support, they aren't going to link my two devices together. The reasoning is that if I pulled my Servio then I would still have access to the DVR service, which I somewhat understand.

I emailed back to find out what happens when I get to the end of my included year and I want to renew, which device the renewal goes to, and am awaiting their response.
Thanks! All the more reason for me to slow down and try to make sure it will be right for both SERVIO and SCRIBE users. I posted a question to the dev forum about discovery, but otherwise I think it won't be difficult to get right so everyone 'just works'.

jasonl
Silicondust
Posts: 14249
Joined: Sun Oct 28, 2007 9:23 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by jasonl » Mon Sep 09, 2019 2:30 pm

The devices are linked, it's just that the subscription from a SCRIBE/SERVIO device only shows up under that device, not under other devices associated with it. Checking against the concatenated DeviceAuths is the correct way to handle that. These subscriptions are handled differently from the standalone ones because they are inherently tied to the specific device. If someone gets rid of that device, the subscription goes away with it, vs. a separately purchased subscription, where someone may decide to cut the cord and switch from a PRIME to a CONNECT Quatro, but they can keep their existing standalone subscription and just move it over to the new device.

starslayer74
Posts: 11
Joined: Thu Jul 06, 2017 2:50 pm

Re: Unofficial Kodi HDHomeRun DVR PVR Client

Post by starslayer74 » Mon Sep 09, 2019 5:04 pm

jasonl wrote:
Mon Sep 09, 2019 2:30 pm
The devices are linked, it's just that the subscription from a SCRIBE/SERVIO device only shows up under that device, not under other devices associated with it. Checking against the concatenated DeviceAuths is the correct way to handle that. These subscriptions are handled differently from the standalone ones because they are inherently tied to the specific device. If someone gets rid of that device, the subscription goes away with it, vs. a separately purchased subscription, where someone may decide to cut the cord and switch from a PRIME to a CONNECT Quatro, but they can keep their existing standalone subscription and just move it over to the new device.
I understand the thinking behind that and I have some thoughts about it but I'm not going to muddy up this conversation with that discussion. I appreciate the quick responsiveness from all involved.

Post Reply