QNAP QPKG for DVR Record Engine

Downloads & Instructions
Post Reply
psuKinger
Posts: 86
Joined: Tue Nov 10, 2015 7:22 am
Device ID: 13254099; 13219F42

Re: QNAP QPKG for DVR Record Engine

Post by psuKinger »

demonrik wrote: Thu Jul 16, 2020 4:36 pm Ahh.. I understand the confusion.
You can open the UI before you stop if your using the app center to open it.. just stop before you edit the recordpath.
You can also reach the UI via browsing to http://nas_ip_address/HDHomeRunDVR directly
If I open the app within QTS, and then go back to App Manager and close the app, the window automatically closes.
If I open the UI by visiting http://nas_ip_address/HDHomeRunDVR directly, that window WILL stay open if I then close the app within QTS... I can change the "RecordPath" in the GUI
from: /share/CACHEDEV1_DATA/HDHomeRunDVR
to: /share/Recordings/HDHomeRunDVR

And then I can click "update the DVR Engine config file", close out the GUI, and then restart the app within QTS... and if I reopen the GUI, the old ("/share/CACHEDEV1_DATA/HDHomeRunDVR") path is still there and not updated.

In Filestation I currently have an "HDHomeRunDVR" share at the top level of my shares (along with "Multimedia", "Public", etc), that I don't really want to use (but can if that just *fixes* all of this). And I have a "Recordings" share, with an "HDHomeRunDVR" subfolder within that share, where all my old (previous record engine) recordings are stored...

My dashboard says "Storage ID Not Set" - does that mean anything?

demonrik
Posts: 1343
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377, 108042A1
x 7

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

psuKinger wrote: Thu Jul 16, 2020 6:32 pm
demonrik wrote: Thu Jul 16, 2020 4:36 pm Ahh.. I understand the confusion.
You can open the UI before you stop if your using the app center to open it.. just stop before you edit the recordpath.
You can also reach the UI via browsing to http://nas_ip_address/HDHomeRunDVR directly
If I open the app within QTS, and then go back to App Manager and close the app, the window automatically closes.
If I open the UI by visiting http://nas_ip_address/HDHomeRunDVR directly, that window WILL stay open if I then close the app within QTS... I can change the "RecordPath" in the GUI
from: /share/CACHEDEV1_DATA/HDHomeRunDVR
to: /share/Recordings/HDHomeRunDVR

And then I can click "update the DVR Engine config file", close out the GUI, and then restart the app within QTS... and if I reopen the GUI, the old ("/share/CACHEDEV1_DATA/HDHomeRunDVR") path is still there and not updated.

In Filestation I currently have an "HDHomeRunDVR" share at the top level of my shares (along with "Multimedia", "Public", etc), that I don't really want to use (but can if that just *fixes* all of this). And I have a "Recordings" share, with an "HDHomeRunDVR" subfolder within that share, where all my old (previous record engine) recordings are stored...

My dashboard says "Storage ID Not Set" - does that mean anything?
Did you remove the current version first?
A clean install.. not upgrade, will work with this method
So remove the package from appcenter, and just in case remove the created share HDHomeRunDVR afterwards.
One you do the new install of 1.0.2 you should have a storage ID in the new UI.. if not we've a different problem

scheb
Posts: 52
Joined: Wed May 27, 2015 8:27 am

Re: QNAP QPKG for DVR Record Engine

Post by scheb »

demonrik wrote: Wed Jul 15, 2020 10:11 pm
jumbleknot wrote: Wed Jul 15, 2020 5:34 pm Thanks demonrik. I have run the command. The output is below:
Image
well - that looks identical to what I have.. :(

something is up with your webserver/php config - but I don't know what.
apart from restoring default config for BOTH the Web Server -> Maintenance, and Web Server -> PHP

maybe check if something is up with denying the host, so check the Control Panel -> Security -> Allow/Deny List ?
I had identical symptoms to jumbleknot and I've read through this entire thread. :oops: After I restored both Web Server and PHP to default, and unchecked Do not allow Web Server embedding in IFrames, I was still prompted for auth. What fixed it for me was disabling WebDAV by unchecking the following box and clicking Apply.

Image

I'm running QTS 4.4.3 on a TS-451+.

HTH!

PS: Also changed HTTPS port to 443 before disabling WebDAV - for better or worse, i need something to respond on 443.

scheb
Posts: 52
Joined: Wed May 27, 2015 8:27 am

Re: QNAP QPKG for DVR Record Engine

Post by scheb »

demonrik wrote: Thu Jul 16, 2020 9:46 pm
psuKinger wrote: Thu Jul 16, 2020 6:32 pm
demonrik wrote: Thu Jul 16, 2020 4:36 pm Ahh.. I understand the confusion.
You can open the UI before you stop if your using the app center to open it.. just stop before you edit the recordpath.
You can also reach the UI via browsing to http://nas_ip_address/HDHomeRunDVR directly
If I open the app within QTS, and then go back to App Manager and close the app, the window automatically closes.
If I open the UI by visiting http://nas_ip_address/HDHomeRunDVR directly, that window WILL stay open if I then close the app within QTS... I can change the "RecordPath" in the GUI
from: /share/CACHEDEV1_DATA/HDHomeRunDVR
to: /share/Recordings/HDHomeRunDVR

And then I can click "update the DVR Engine config file", close out the GUI, and then restart the app within QTS... and if I reopen the GUI, the old ("/share/CACHEDEV1_DATA/HDHomeRunDVR") path is still there and not updated.

In Filestation I currently have an "HDHomeRunDVR" share at the top level of my shares (along with "Multimedia", "Public", etc), that I don't really want to use (but can if that just *fixes* all of this). And I have a "Recordings" share, with an "HDHomeRunDVR" subfolder within that share, where all my old (previous record engine) recordings are stored...

My dashboard says "Storage ID Not Set" - does that mean anything?
Did you remove the current version first?
A clean install.. not upgrade, will work with this method
So remove the package from appcenter, and just in case remove the created share HDHomeRunDVR afterwards.
One you do the new install of 1.0.2 you should have a storage ID in the new UI.. if not we've a different problem
Sigh.. fixed one problem, found another. Now seeing same issue as psuKinger. I'm unable to persist the RecordPath, the StorageID is StorageID not Set, and Record Engine Version is Unable to discover DVR version.

I did a clean install from 0.10.7 to 1.0.2. I am not logged into the QTS GUI with the admin user - would that make a difference?

Interesting - after doing another clean install - making sure no remnants of the package exist (shares, users, etc. - after remove and before reinstall), Record engine version is displayed, but StorageID is still not Set.

I can change the RecordPath in the GUI (https://<ip address>/HDHomeRunDVR) and click the Update the DVR Engine Config File button and I see the changes reflected in the GUI, but i'm not seeing it change on disk. I know the GUI is updated because I see the correct list of Record Engine Logs. But in my SSH connection, I still see the default path in the /share/CACHEDEV1_DATA/.qpkg/HDHomeRunDVR/HDHomeRunDVR.conf file. The file is owned by admin, I wonder if that's why it's not getting updated?

So changing the RecordPath in the HDHomeRunDVR.conf file via SSH allowed the RecordPath change to persist. Reading this: https://info.hdhomerun.com/info/dvr:advanced, it says The record engine will automatically create and add a StorageID to the conf file if it has write access to the file.. Aha! It doesn't have write access to the file since it's owned by admin! So this is a bug.

Changing ownership... Voila! I have a Storage ID. and look at that - HDHomeRun RECORD is back in Discovered HDHomerun Devices. Interesting though, even though file ownership has changed, clicking the Update the DVR Engine Config File button still isn't updating the HDHomeRunDVR.conf file contents. So another bug.

But it's OK - i can live with this for now. I'm using App Center to restart the service and I see changes persisting.

THANK YOU demonrik for the rewrite - pulling the latest engine from silicondust is brilliant. Means less updates for both of us (packaging for you, app center upgrades for us).
Last edited by scheb on Fri Jul 17, 2020 12:15 pm, edited 1 time in total.

demonrik
Posts: 1343
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377, 108042A1
x 7

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

scheb wrote: Fri Jul 17, 2020 11:13 am I had identical symptoms to jumbleknot and I've read through this entire thread. :oops: After I restored both Web Server and PHP to default, and unchecked Do not allow Web Server embedding in IFrames, I was still prompted for auth. What fixed it for me was disabling WebDAV by unchecking the following box and clicking Apply.
Nice find - I will look in to this.. I would have thought it shouldn't impact it - but maybe there is some setting needed to make it work alongside.
scheb wrote: Fri Jul 17, 2020 11:35 am Sigh.. fixed one problem, found another. Now seeing same issue as psuKinger. I'm unable to persist the RecordPath, the StorageID is StorageID not Set, and Record Engine Version is Unable to discover DVR version.

I did a clean install from 0.10.7 to 1.0.2. I am not logged into the QTS GUI with the admin user - would that make a difference?
the DVR Manager UI doesn't care who you log in as.. so that's not the problem.

The Unable to Discover DVR version - the httpdusr is unable to execute the record engine binary for some reason.
The Storage ID not being set means either the httpdusr can't read the conf file, OR the hdhomerundvr user can't write to the conf file.

How far into the process are you - the new install, or have you changed the RecordPath already?

to be honest I'm stumped why it works for some and not for others. I really need time on someones NAS to play around with settings to see what is happening. If anyone wants to volunteer doing a teamviewer session with me please DM me. Would mean organizing a time to do it, installing and running teamviewer once you have an open SSH session and browser to the NAS and you will oversee everything I do.

demonrik
Posts: 1343
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377, 108042A1
x 7

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

demonrik wrote: Fri Jul 17, 2020 11:57 am
scheb wrote: Fri Jul 17, 2020 11:13 am I had identical symptoms to jumbleknot and I've read through this entire thread. :oops: After I restored both Web Server and PHP to default, and unchecked Do not allow Web Server embedding in IFrames, I was still prompted for auth. What fixed it for me was disabling WebDAV by unchecking the following box and clicking Apply.
Nice find - I will look in to this.. I would have thought it shouldn't impact it - but maybe there is some setting needed to make it work alongside.
Yep - that explains it.
By just turning on, it first matches the requested URL against the shared folders.
so nas.ip/HDHomeRunDVR will first match against the share /share/HDHomeRunDVR and the web server will ask you to login, and then of course there is no HTML files in place for the web server to actually use - hence forbidden.
But if I change either one - i.e. create new share (and delete /share/HDHomeRunDVR) and point to that in the conf file and restart, or change the link name in /share/web it works because it doesn't find it as a share and opens the html page.

IF you need WebDAV and this.. you either should set up the specific WebDAV ports and/or use specific WebDav permissions and not just the general share Permissions.

demonrik
Posts: 1343
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377, 108042A1
x 7

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

demonrik wrote: Fri Jul 17, 2020 11:57 am
scheb wrote: Fri Jul 17, 2020 11:35 am Sigh.. fixed one problem, found another. Now seeing same issue as psuKinger. I'm unable to persist the RecordPath, the StorageID is StorageID not Set, and Record Engine Version is Unable to discover DVR version.

I did a clean install from 0.10.7 to 1.0.2. I am not logged into the QTS GUI with the admin user - would that make a difference?
the DVR Manager UI doesn't care who you log in as.. so that's not the problem.

The Unable to Discover DVR version - the httpdusr is unable to execute the record engine binary for some reason.
The Storage ID not being set means either the httpdusr can't read the conf file, OR the hdhomerundvr user can't write to the conf file.
...
Found another bug - this will fixes the storage ID issue and ability to write to the conf file
Basically in moving the config file generation to a different routine I forgot to also move the permission adjustment.
1.0.3 will have that real soon (uploading now)

In meantime the easy fix is

Code: Select all

chmod 664 /share/CACHEDEV1_DATA/.qpkg/HDHomeRunDVR/HDHomeRunDVR.conf
chown hdhomerundvr /share/CACHEDEV1_DATA/.qpkg/HDHomeRunDVR/HDHomeRunDVR.conf
Don't know whats going on with the unable to discover DVR version yet

scheb
Posts: 52
Joined: Wed May 27, 2015 8:27 am

Re: QNAP QPKG for DVR Record Engine

Post by scheb »

demonrik wrote: Fri Jul 17, 2020 12:18 pm
demonrik wrote: Fri Jul 17, 2020 11:57 am
scheb wrote: Fri Jul 17, 2020 11:35 am Sigh.. fixed one problem, found another. Now seeing same issue as psuKinger. I'm unable to persist the RecordPath, the StorageID is StorageID not Set, and Record Engine Version is Unable to discover DVR version.

I did a clean install from 0.10.7 to 1.0.2. I am not logged into the QTS GUI with the admin user - would that make a difference?
the DVR Manager UI doesn't care who you log in as.. so that's not the problem.

The Unable to Discover DVR version - the httpdusr is unable to execute the record engine binary for some reason.
The Storage ID not being set means either the httpdusr can't read the conf file, OR the hdhomerundvr user can't write to the conf file.
...
Found another bug - this will fixes the storage ID issue and ability to write to the conf file
Basically in moving the config file generation to a different routine I forgot to also move the permission adjustment.
1.0.3 will have that real soon (uploading now)

In meantime the easy fix is

Code: Select all

chmod 664 /share/CACHEDEV1_DATA/.qpkg/HDHomeRunDVR/HDHomeRunDVR.conf
chown hdhomerundvr /share/CACHEDEV1_DATA/.qpkg/HDHomeRunDVR/HDHomeRunDVR.conf
Don't know whats going on with the unable to discover DVR version yet
should have wrote a new reply instead of editing my second one. Go ahead and read my update - you and i were on the same path! Check out both the bugs i found. You hit upon the permission one, but i didn't see the "clicking button in gui isn't writing changes to the file".

demonrik
Posts: 1343
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377, 108042A1
x 7

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

scheb wrote: Fri Jul 17, 2020 12:28 pm should have wrote a new reply instead of editing my second one. Go ahead and read my update - you and i were on the same path! Check out both the bugs i found. You hit upon the permission one, but i didn't see the "clicking button in gui isn't writing changes to the file".
thanks for your sleuthing :)
the chmod 644 fixes the last one.. it gives the group "administrators" the rights to write to the file.
That's why it wasn't updating from the GUI.
Is also fixed in 1.0.3 which is now live on the shares.
scheb wrote: Fri Jul 17, 2020 11:35 am THANK YOU demonrik for the rewrite - pulling the latest engine from silicondust is brilliant. Means less updates for both of us (packaging for you, app center upgrades for us).
No worries - that's the goal..
Some pain now to make sure it's firing on all cylinders, but should mean no waiting for me to come back from wherever the next time SD release an engine - although not much travel this days with COVID anyway

scheb
Posts: 52
Joined: Wed May 27, 2015 8:27 am

Re: QNAP QPKG for DVR Record Engine

Post by scheb »

demonrik wrote: Fri Jul 17, 2020 12:32 pm
scheb wrote: Fri Jul 17, 2020 12:28 pm should have wrote a new reply instead of editing my second one. Go ahead and read my update - you and i were on the same path! Check out both the bugs i found. You hit upon the permission one, but i didn't see the "clicking button in gui isn't writing changes to the file".
thanks for your sleuthing :)
the chmod 644 fixes the last one.. it gives the group "administrators" the rights to write to the file.
That's why it wasn't updating from the GUI.
Is also fixed in 1.0.3 which is now live on the shares.
scheb wrote: Fri Jul 17, 2020 11:35 am THANK YOU demonrik for the rewrite - pulling the latest engine from silicondust is brilliant. Means less updates for both of us (packaging for you, app center upgrades for us).
No worries - that's the goal..
Some pain now to make sure it's firing on all cylinders, but should mean no waiting for me to come back from wherever the next time SD release an engine - although not much travel this days with COVID anyway
Confirmed fixed.

demonrik
Posts: 1343
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377, 108042A1
x 7

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

scheb wrote: Fri Jul 17, 2020 12:44 pm Confirmed fixed.
yay :D
Now just need to hear from @psuKinger, @jumbleknot and @ppilot to hopefully confirm all good on their ends.
I think we resolved @punch-card early on..
Only outstanding is @JWylds who has yet to respond to my Q, but I suspect is just the unchecking 'Do not allow Web Server embedding in iFrames' in the Web Server configuration.

ppilot
Posts: 104
Joined: Mon Dec 17, 2007 7:33 pm

Re: QNAP QPKG for DVR Record Engine

Post by ppilot »

demonrik wrote: Thu Jul 16, 2020 7:50 am
psuKinger wrote: Thu Jul 16, 2020 3:48 am
demonrik wrote: Wed Jul 15, 2020 1:51 pm ok - time to create a new file.

Set Record Path to what you need it to be - but here's the template

Code: Select all

cat > /share/CACHEDEV1-DATA/.qpkg/HDHomeRunDVR/HDHomeRunDVR.conf
RecordPath=/share/HDHomeRunDVR
Port=59090
RecordStreamsMax=16
BetaEngine=1
RunAs=hdhomerundvr
I modified that to:
RecordPath=/share/Recordings/HDHomeRunDVR

As I have my Y: drive (mapped) to Recordings/HDHomeRunDVR. Here's what I got back.

[~] # cat > /share/CACHEDEV1-DATA/.qpkg/HDHomeRunDVR/HDHomeRunDVR.conf
-sh: /share/CACHEDEV1-DATA/.qpkg/HDHomeRunDVR/HDHomeRunDVR.conf: No such file or directory
[~] # RecordPath=/share/Recordings/HDHomeRunDVR
[~] # Port=59090
[~] # RecordStreamsMax=16
[~] # BetaEngine=1
[~] # RunAs=hdhomerundvr
[~] # login as: admin

Is this because I didn't update the record path correctly? Or is that the anticipated response and everything is ok? It doesn't seem like this went the way it should have?
uggh - my bad again.. I have to stop doing support for you guys on my phone (Trying to separate work/personal life during this COVID time - so after 9hrs on computer for work, I try not to boot it up again beyond 5pm)
It's not CACHEDEV1-DATA it should be CACHEDEV1_DATA

So please try again with

Code: Select all

cat > /share/CACHEDEV1_DATA/.qpkg/HDHomeRunDVR/HDHomeRunDVR.conf
RecordPath=/share/Recordings/HDHomeRunDVR
Port=59090
RecordStreamsMax=16
BetaEngine=1
RunAs=hdhomerundvr
Do the above commands get copy and pasted into putty all at once? I tried that and then hitting Control D and the file still is not there.

demonrik
Posts: 1343
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377, 108042A1
x 7

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

ppilot wrote: Fri Jul 17, 2020 8:35 pm Do the above commands get copy and pasted into putty all at once? I tried that and then hitting Control D and the file still is not there.
At this point do clean install of 1.0.3 is best option. i.e. remove currently installed, then install new, and then update the recordpath

psuKinger
Posts: 86
Joined: Tue Nov 10, 2015 7:22 am
Device ID: 13254099; 13219F42

Re: QNAP QPKG for DVR Record Engine

Post by psuKinger »

demonrik wrote: Fri Jul 17, 2020 12:56 pm
scheb wrote: Fri Jul 17, 2020 12:44 pm Confirmed fixed.
yay :D
Now just need to hear from @psuKinger, @jumbleknot and @ppilot to hopefully confirm all good on their ends.
I think we resolved @punch-card early on..
Only outstanding is @JWylds who has yet to respond to my Q, but I suspect is just the unchecking 'Do not allow Web Server embedding in iFrames' in the Web Server configuration.
First, thanks so much for all the support and effort on this. And because I'm not sure how much of this is user error on my part, I thought it best to maybe log step-by-step everything I did and try to provide insight on what I see as I do it:

So here's what I did, step by step:
- I logged into QTS, opened the "App Center", hit the blue down arrow below the "HD 1.0.2" icon, hit "remove," and then clicked "OK" at the dialogue box that pops up.
- In QTS, I went over to File Station to see if it removed that "top level" HDHomeRunDVR" folder that I think I don't want, and I see this:
Image
https://imgur.com/8cJheE4
It doesn't look like that top level HDHomeRunDVR folder is gone.
And I know this is just an embarrassing shortcoming on my part, but obviously, I'm not in windows right now, and this doesn't behave like Windows... and I'm looking for a way to delete that folder, I'm right-clicking on it, I'm looking at all the "drop-down" buttons across the top, trying to find something that will allow me to delete it... and I just don't see anything.
So I think this is a problem. One I'm not sure how to solve. So I'll proceed on, noting that this might be where I went astray...

- I go to the first post in this thread, take your link to Google Drive, navigate to QPKG 1.0.3 for QNAP, and download it.
- I go back to the QTS app center, and "install manually" 1.0.3.
- Once installed, I now "open" it to see the Dashboard. My default StorageID path is: /share/CACHEDEV1_DATA/HDHomeRunDVR
- I exit out of Dashboard, and STOP the engine from QTS.
- I navigate to my NAS via 192.168.x.xxx/HDHomeRunDVR to have the Dashboard Open while the engine is stopped.
- I change the default StorageID path to: /share/Recordings/HDHomeRunDVR
- I hit the button to "update the DVR Engine Config File"
- I close the window with the dashboard in it.
- I go back to QTS and START "HD 1.0.3". I open up the Dashboard, and THERE IT IS. My desired DVR path is updated in the dashboard!! This is very good news, I'd think? Optimism abounds.

So I open the HDHomeRun app on my PC, and navigate to my Recorded tab across the top, and I get a message saying "Your HDHomeRun DVR wasn't found."
I open up my.hdhomerun.com and I see a note saying No HDHomeRunDVR connected. But it does see my two HDHomeRun Primes.
Account Information within the HDHomeRun app on Windows still indicates that I have an "ACTIVE" DVR account.

Thanks again.

demonrik
Posts: 1343
Joined: Mon May 04, 2015 10:03 am
Device ID: 10736454, 1073A35A, 1075C377, 108042A1
x 7

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

We're close.
Did you add the user hdhomerundvr to your other share once you reinstalled?
The user is removed and access to your share when you removed 1.0.2, so u need to add again. Then stop/start once more.
Tip: remove all log files in the recordpath folder while the engine is stopped and once it starts again you should see a new log file created to indicate is working. No log file, something is wrong.

fwiw.. removing share you open control panel->privilege->shared folders.
Select the folder and remove

Post Reply