HDHR-DVRUI - A PHP/Web Interface to your HDHR DVR Setup

Help and support with third-party TV software.
Windows Media Center, J River Media Center, Next PVR, MythTV, InstaTV, etc.
Post Reply
demonrik
Posts: 1139
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377

Re: HDHR-DVRUI - A PHP/Web Interface to your HDHR DVR Setup

Post by demonrik » Sun Jun 02, 2019 7:30 am

Ken.F wrote:
Sun Jun 02, 2019 5:43 am
Axxel wrote:
Sat Jun 01, 2019 8:32 pm
- Both the UI and diagnostics page show the tuner device.
- The web UI shows rules (if I add them).
- No recordings are shown.
- my.hdhomerun.com shows both tuner and DVR without issues.
- HDHR apps have no problem finding the DVR.
demonrik wrote:
Sun Jun 02, 2019 2:27 am
if the DVRUI is detecting the tuners it should be detecting the DVR engine.
The DVRUI was written for multiple record engines, so does work with the latest versions. However, the change to deleting recordings and poking the engine is needed for the interface change. Plan to get to that next weekend when I return to the US.
Try looking at api.hdhomerun.com/discover and see if the record engine(s) are listed. If they're not there then something is up.
I have the same problem as Axxel. Last week I wanted to try out the new record engine running on multiple machines so I upgraded to 20190516beta2. Everything seemed to work fine. A few days later I noticed the HDHR-DVRUI could see my rules and display upcoming recordings but would not see any of my recorded programs. I figured the problem had something to do with switching to record engine 20190516beta2 so I switched back to 20190417 but the HDHR-DVRUI still doesn't see my recordings.

On the machine running the web server I found php-dvrui.log in /temp. It has a bunch of PHP notices and warnings. I tried to copy relevant parts in a code box but Cloudflare won't let me post it on the forum. I uploaded the log to Google drive if you want to take a look.
https://drive.google.com/open?id=1O52Tl ... 5-MJ5cyM_p
Just one Q to clarify - both of you can see the DVR engine listed in the dashboard, or is it missing also?

looking at log - thanks for doing this (turn debug to true in the vars.php file) - it does help :)
interesting.. the main warning being reported is valid.. but it's been there a very long time.
So I suspect a php update on your system(s) which is now flagging the problem.
The fix is easy - but am not in the US at the moment and unable to verify...
so here's what I just uploaded to the github repo..
open 'app/includes/dvrui_recordings.php' to line 33 and replace

Code: Select all

	private $recordings_list = array();
with

Code: Select all

	private $recordings = array();
I think this might fix the issue. You can grab latest from github or make the changes yourself.

From your log - There may be another issue in 'Upcoming'.. but I need to be on a system to debug (next weekend when I return) as it's not making sense why it used to work but doesn't now.
handyd wrote:
Sun Jun 02, 2019 6:53 am
All the machines are on the internet and running. HDHR-DVRUI is not seeing the recording engine and it' been 2 days. I have rebooted several times as well.
can you open the diagnostics page (gear wheel on the right) and post back results.
Also - if you turn on DVRUI_DEBUG in the vars.php you fill find a php-dvrui.log file in temporary filesystem folder of your OS (/tmp for linux). open dashboard and recordings tabs and either post here or send me link.
if you try http://api.hdhomerun.com/discover - what do you get?

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

Re: HDHR-DVRUI - A PHP/Web Interface to your HDHR DVR Setup

Post by Ken.F » Sun Jun 02, 2019 8:25 am

I don't know if it makes any difference but I'm running 20190516beta2 on two devices again.
demonrik wrote:
Sun Jun 02, 2019 7:30 am
Just one Q to clarify - both of you can see the DVR engine listed in the dashboard, or is it missing also?
No engines, it only lists my tuner devices.
On the diagnostic page it does list the auth string under HDHR DVR ENGINES.
looking at log - thanks for doing this (turn debug to true in the vars.php file) - it does help :)
I don't see a debug line in vars.php file located in the app folder on version 0.6.4. I did find and change that line in version 0.6.5.
https://drive.google.com/open?id=1-Jsdd ... rLET0KO9Jw

The fix is easy - but am not in the US at the moment and unable to verify...
so here's what I just uploaded to the github repo..
open 'app/includes/dvrui_recordings.php' to line 33 and replace

Code: Select all

	private $recordings_list = array();
with

Code: Select all

	private $recordings = array();
I think this might fix the issue. You can grab latest from github or make the changes yourself.
I tried changing line 33 in version 0.6.4 but it didn't help.
I downloaded 0.6.5 from github but that one works the same as 0.6.4.

If I run http://api.hdhomerun.com/discover it lists my tuner devices and my record engines
From your log - There may be another issue in 'Upcoming'.. but I need to be on a system to debug (next weekend when I return) as it's not making sense why it used to work but doesn't now.
No problem.

Axxel
Posts: 14
Joined: Mon Feb 20, 2017 11:59 am

Re: HDHR-DVRUI - A PHP/Web Interface to your HDHR DVR Setup

Post by Axxel » Sun Jun 02, 2019 9:22 am

OK, I managed to isolate the issue, in dvrui_hdhrjson.php there is a check to verify the storage UUID has not changed. This fails because the main API discovery response returns a storage UUID with uppercase letters, whereas the discovery for the DVR returns the same UUID in lowercase.

Modifying to use case insensitive compare allows the DVR to appear. I can't post the code to the forum without being blocked, but this is strcmp to strcasecmp on line 61.

I'm still receiving warnings about no Countables for rules (dvrui_rules.php on line 70). Again, can't post the exact warning, but that doesn't appear to be fatal (I have no rules on this engine at present).

TBlankenheim
Posts: 75
Joined: Wed May 27, 2015 9:15 am

Re: HDHR-DVRUI - A PHP/Web Interface to your HDHR DVR Setup

Post by TBlankenheim » Sun Jun 02, 2019 10:38 am

Axxel wrote:
Sun Jun 02, 2019 9:22 am
OK, I managed to isolate the issue, in dvrui_hdhrjson.php there is a check to verify the storage UUID has not changed. This fails because the main API discovery response returns a storage UUID with uppercase letters, whereas the discovery for the DVR returns the same UUID in lowercase.

Modifying to use case insensitive compare allows the DVR to appear. I can't post the code to the forum without being blocked, but this is strcmp to strcasecmp on line 61.
I was having this issue as well in both the DVRUI and the Synology DVR Manager. This solved my problem! Thank You for researching this issue!

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

Re: HDHR-DVRUI - A PHP/Web Interface to your HDHR DVR Setup

Post by Ken.F » Sun Jun 02, 2019 10:55 am

Axxel wrote:
Sun Jun 02, 2019 9:22 am
...in dvrui_hdhrjson.php there is a check to verify the storage UUID has not changed.

Modifying to use case insensitive compare allows the DVR to appear. I can't post the code to the forum without being blocked, but this is strcmp to strcasecmp on line 61.
Thanks. That fixed the recordings not being displayed for me as well.

If anyone else is following along the dvrui_hdhrjson.php file is located in the "includes" directory.
The part that needs to be changed is on line 61 on versions 0.6.3 and newer and line 59 on previous versions. I prefer the list view so I mostly use version 0.5.14.

Edit: This appears to also fix the rules deletion problem.

TBlankenheim
Posts: 75
Joined: Wed May 27, 2015 9:15 am

Re: HDHR-DVRUI - A PHP/Web Interface to your HDHR DVR Setup

Post by TBlankenheim » Sun Jun 02, 2019 12:02 pm

Axxel wrote:
Sun Jun 02, 2019 9:22 am
...in dvrui_hdhrjson.php there is a check to verify the storage UUID has not changed. This fails because the main API discovery response returns a storage UUID with uppercase letters, whereas the discovery for the DVR returns the same UUID in lowercase.

Modifying to use case insensitive compare allows the DVR to appear. I can't post the code to the forum without being blocked, but this is strcmp to strcasecmp on line 61.
So here is an interesting side effect of this problem on version 0.6.5. I record some of my local newscasts as a series:

News 3 Now at Ten
Priority: 2 Start: 60 End: 180
Channel: Channel3.1
Schedule: All Episodes
Recordings: 2 1 upcoming


When using the original version of dvrui_hdhrjson.php with version 0.6.5, these newscasts are listed on the Upcoming tab. This is when the recordings and DVR engine are missing. After making the change to dvrui_hdhrjson.php so that recordings and DVR enging show up again, these newscasts are missing from the Upcoming tab. This is not a problem on version 0.5.14. I seem to recall that this was an issue with version 0.6.5 before the dvrui_hdhrjson.php issue appeared.

I know demonrik has been busy and as long as version 0.5.14 has an accurate Upcoming Recordings list, this is not a big deal. Just thought I would bring this issue up so that it can be looked at in the future. I'll be more than happy to supply what ever information you require when time allows you to look at this problem.

I really appreciate this UI since it allows me to setup recording rules that are not possible with the SD application. Thank You!

handyd
Posts: 255
Joined: Mon Mar 22, 2010 5:38 am
Device ID: 131092F3, 13122223, 13136631

Re: HDHR-DVRUI - A PHP/Web Interface to your HDHR DVR Setup

Post by handyd » Sun Jun 02, 2019 2:29 pm

Axxel wrote:
Sun Jun 02, 2019 9:22 am
OK, I managed to isolate the issue, in dvrui_hdhrjson.php there is a check to verify the storage UUID has not changed. This fails because the main API discovery response returns a storage UUID with uppercase letters, whereas the discovery for the DVR returns the same UUID in lowercase.

Modifying to use case insensitive compare allows the DVR to appear. I can't post the code to the forum without being blocked, but this is strcmp to strcasecmp on line 61.

I'm still receiving warnings about no Countables for rules (dvrui_rules.php on line 70). Again, can't post the exact warning, but that doesn't appear to be fatal (I have no rules on this engine at present).
Thank you for fixing the issue. Made the change and it worked perfectly.

demonrik
Posts: 1139
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377

Re: HDHR-DVRUI - A PHP/Web Interface to your HDHR DVR Setup

Post by demonrik » Sun Jun 02, 2019 11:48 pm

TBlankenheim wrote:
Sun Jun 02, 2019 12:02 pm
So here is an interesting side effect of this problem on version 0.6.5. I record some of my local newscasts as a series:

News 3 Now at Ten
Priority: 2 Start: 60 End: 180
Channel: Channel3.1
Schedule: All Episodes
Recordings: 2 1 upcoming


When using the original version of dvrui_hdhrjson.php with version 0.6.5, these newscasts are listed on the Upcoming tab. This is when the recordings and DVR engine are missing. After making the change to dvrui_hdhrjson.php so that recordings and DVR enging show up again, these newscasts are missing from the Upcoming tab. This is not a problem on version 0.5.14. I seem to recall that this was an issue with version 0.6.5 before the dvrui_hdhrjson.php issue appeared.

I know demonrik has been busy and as long as version 0.5.14 has an accurate Upcoming Recordings list, this is not a big deal. Just thought I would bring this issue up so that it can be looked at in the future. I'll be more than happy to supply what ever information you require when time allows you to look at this problem.

I really appreciate this UI since it allows me to setup recording rules that are not possible with the SD application. Thank You!
is a known bug with upcoming trying to guess what the engine will record. for these types of programs it looks like its already recorded and hence removed from upcoming.
i think i've worked out the fix now though.

as to the storage ID fix... since i am 4000 miles from my setup i can only see what is posted. seems odd it changed, so will need to confirm with SD to commit permanent fix

demonrik
Posts: 1139
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377

Re: HDHR-DVRUI - A PHP/Web Interface to your HDHR DVR Setup

Post by demonrik » Sun Jun 02, 2019 11:57 pm

Axxel wrote:
Sun Jun 02, 2019 9:22 am
OK, I managed to isolate the issue, in dvrui_hdhrjson.php there is a check to verify the storage UUID has not changed. This fails because the main API discovery response returns a storage UUID with uppercase letters, whereas the discovery for the DVR returns the same UUID in lowercase.

Modifying to use case insensitive compare allows the DVR to appear. I can't post the code to the forum without being blocked, but this is strcmp to strcasecmp on line 61.

I'm still receiving warnings about no Countables for rules (dvrui_rules.php on line 70). Again, can't post the exact warning, but that doesn't appear to be fatal (I have no rules on this engine at present).
good catch and fix.
have made the change in github for ppl to grab.

i see the issue with rules - should be fixed in github also.

Beerman
Posts: 1461
Joined: Thu May 21, 2015 7:05 pm

Re: HDHR-DVRUI - A PHP/Web Interface to your HDHR DVR Setup

Post by Beerman » Sat Jun 08, 2019 6:54 am

Recently, Recordings are showing nothing in the DVRUI. Everything else is perfectly fine. Is this because I'm running the HDHR beta?

demonrik
Posts: 1139
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377

Re: HDHR-DVRUI - A PHP/Web Interface to your HDHR DVR Setup

Post by demonrik » Sat Jun 08, 2019 8:58 am

Beerman wrote:
Sat Jun 08, 2019 6:54 am
Recently, Recordings are showing nothing in the DVRUI. Everything else is perfectly fine. Is this because I'm running the HDHR beta?
yes.. see above about storageID

back in the country now and will roll out updates this weekend

demonrik
Posts: 1139
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377

Re: HDHR-DVRUI - A PHP/Web Interface to your HDHR DVR Setup

Post by demonrik » Wed Jul 10, 2019 2:15 pm

Apologies all..
Work getting the better of me and not been able to get as much time as I would like on this.
Also want to overhaul the build system more in line with what I do with the DVR Manager packages and that's why I haven't done any new releases yet.
Line of sight to getting some time real soon, so fingers crossed.

In mean time - has anyone tried this with Servio or Scribe?
Interested in your findings..
Would also appreciate some discover dumps of those devices (Can't afford to just keep buying SD gear for fun ;)). If any one has time - please message me here on discord with your discovery outputs.

Beerman
Posts: 1461
Joined: Thu May 21, 2015 7:05 pm

Re: HDHR-DVRUI - A PHP/Web Interface to your HDHR DVR Setup

Post by Beerman » Wed Jul 10, 2019 2:24 pm

I love your program and use it multiple times a day. I thank you lots for your time and hard work on this. I wouldn't mind making a donation but I don't see a way to do that.

demonrik
Posts: 1139
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377

Re: HDHR-DVRUI - A PHP/Web Interface to your HDHR DVR Setup

Post by demonrik » Thu Jul 11, 2019 10:15 pm

Beerman wrote:
Wed Jul 10, 2019 2:24 pm
I love your program and use it multiple times a day. I thank you lots for your time and hard work on this. I wouldn't mind making a donation but I don't see a way to do that.
thanks @Beerman
I know from others that you're not alone.
TBH I've felt awkward adding anything around that, and in particular putting anything here.
For the most part I look at this for 2 thing.. a) I need it anyway for my mgmt of my DVR system, and b) I need coding projects to keep my skills relevant :)
And thus everyone just benefits from my selfish needs
maybe in future revs I'll add a buy me a beer donation link into it...

Beerman
Posts: 1461
Joined: Thu May 21, 2015 7:05 pm

Re: HDHR-DVRUI - A PHP/Web Interface to your HDHR DVR Setup

Post by Beerman » Fri Jul 12, 2019 1:51 pm

demonrik wrote:
Thu Jul 11, 2019 10:15 pm
Beerman wrote:
Wed Jul 10, 2019 2:24 pm
I love your program and use it multiple times a day. I thank you lots for your time and hard work on this. I wouldn't mind making a donation but I don't see a way to do that.
thanks @Beerman
I know from others that you're not alone.
TBH I've felt awkward adding anything around that, and in particular putting anything here.
For the most part I look at this for 2 thing.. a) I need it anyway for my mgmt of my DVR system, and b) I need coding projects to keep my skills relevant :)
And thus everyone just benefits from my selfish needs
maybe in future revs I'll add a buy me a beer donation link into it...
Please don't hesitate to ask since I will likely not notice a link for a donation. And I'd gladly buy you a beer!

Post Reply