FYI - I had an issue where the website would not load through the admin interface or via the direct URL. This turned out to be a script error in the dvrui_hdhrjson.php file where it said it had an unexpected '.' on line 5.
The changes i made to get this working are below, once these were made this worked in both the admin interface and direct URL.
modified line 5 to:
private $myhdhrurl = ''; //DVRUI_Vars::DVRUI_apiurl . 'discover';
and then in public function DVRUI_HDHRjson() {
changed:
$hdhr_data = getJsonFromUrl($this->myhdhrurl);
to:
$hdhr_data = getJsonFromUrl(DVRUI_Vars::DVRUI_apiurl . 'discover');
QNAP QPKG for DVR Record Engine
Re: QNAP QPKG for DVR Record Engine
If I remember rightly this error is because of an older php installation.Sorbo78 wrote: ↑Mon Oct 22, 2018 6:52 pm FYI - I had an issue where the website would not load through the admin interface or via the direct URL. This turned out to be a script error in the dvrui_hdhrjson.php file where it said it had an unexpected '.' on line 5.
The changes i made to get this working are below, once these were made this worked in both the admin interface and direct URL.
modified line 5 to:
private $myhdhrurl = ''; //DVRUI_Vars::DVRUI_apiurl . 'discover';
and then in public function DVRUI_HDHRjson() {
changed:
$hdhr_data = getJsonFromUrl($this->myhdhrurl);
to:
$hdhr_data = getJsonFromUrl(DVRUI_Vars::DVRUI_apiurl . 'discover');
Which PHP version is installed on your NAS?
Is an ok change to make since we only use the URL once in that script.
Re: QNAP QPKG for DVR Record Engine
Hello demonrik,
Question concerning version 0.9.34. When checked the md5 returned doesn't match the qpkg.md5 posted on google drive.
Thanks,
upfwnv03
Question concerning version 0.9.34. When checked the md5 returned doesn't match the qpkg.md5 posted on google drive.
Thanks,
upfwnv03
Re: QNAP QPKG for DVR Record Engine
confirming I can see it too.
Not sure what happened.
FWIW - the original file on my local storage md5sum is
Code: Select all
afe1cb335361ca35bfd69adcb2ff4133 HDHomeRunDVR_0.9.34.qpkg
am in the middle of changing up the UI a little bit, so can't quite roll back to 0.9.34 to do a rebuild.
So will hold off until next release but will remove the md5 file for now..
Re: QNAP QPKG for DVR Record Engine
On the latest version and when I try to open the HDHomeRunDVR app on my QNAP it says refused to connect.
Re: QNAP QPKG for DVR Record Engine
connection refused is all about gaining access to the webserver
If using remotely - make sure you have port forwarded the webserver port of the qnap
Make sure the webserver is running and configured correctly
If using https - check the https ports
Re: QNAP QPKG for DVR Record Engine
The direct url works. I was trying to open the app in QNAP app center and that is when I get a refused to connect.
I checked the iframe and it says
<iframe id="ext-gen361HDHomeRunDVR" class="wait" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" src="http://192.168.1.200:80/HDHomeRunDVR?wi ... "></iframe>
When I go directly to http://192.168.1.200:80/HDHomeRunDVR?wi ... 0.9.34& it loads up the DVR MAnager without a problem.
Re: QNAP QPKG for DVR Record Engine
Decided to update the record engine today to see if it works any better now a days. Was on qpkg 0.9.24 and did a manual install and it said it updated it OK to 0.9.34. However the record engine doesn't start anymore nor does it create a log file.
If I try to start manually using HDHomeRunDVR.sh I get
./HDHomeRunDVR.sh: line 27: /share/MD0_DATA/.qpkg/HDHomeRunDVR/hdhr_wrapper_arm: No such file or directory
All the files in the record directory are set to httpdusr:administors and running the diagnostics.sh doesn't show any errors, all the directories are found.
Not sure where to go from there since it is previously working alright along with HDHRDVR UI. Any help appreciated.
Thanks,
If I try to start manually using HDHomeRunDVR.sh I get
./HDHomeRunDVR.sh: line 27: /share/MD0_DATA/.qpkg/HDHomeRunDVR/hdhr_wrapper_arm: No such file or directory
All the files in the record directory are set to httpdusr:administors and running the diagnostics.sh doesn't show any errors, all the directories are found.
Not sure where to go from there since it is previously working alright along with HDHRDVR UI. Any help appreciated.
Thanks,
Re: QNAP QPKG for DVR Record Engine
that's a long time between updates.. lots changed in those versions..darqnova wrote: ↑Tue Dec 25, 2018 4:32 pm Decided to update the record engine today to see if it works any better now a days. Was on qpkg 0.9.24 and did a manual install and it said it updated it OK to 0.9.34. However the record engine doesn't start anymore nor does it create a log file.
If I try to start manually using HDHomeRunDVR.sh I get
./HDHomeRunDVR.sh: line 27: /share/MD0_DATA/.qpkg/HDHomeRunDVR/hdhr_wrapper_arm: No such file or directory
All the files in the record directory are set to httpdusr:administors and running the diagnostics.sh doesn't show any errors, all the directories are found.
Not sure where to go from there since it is previously working alright along with HDHRDVR UI. Any help appreciated.
Thanks,
first off permissions is key.
To get around the fact that the record engine will run as root at boot I had to implement a workaround to wrap it for the http user so we could start/stop from the UI.
That wrapper is what you see the error about.
Can you login to the NAS as an admin and see if that file does exist?
ie..
Code: Select all
ls -l /share/MD0_DATA/.qpkg/HDHomeRunDVR
If the file is there - just try running it and see what it says..
Re: QNAP QPKG for DVR Record Engine
Thanks for the quick reply.
Files are all there
-rw-rw-r-- 1 admin administ 100 Aug 26 2017 HDHomeRunDVR.conf
-rwxr-xr-x 1 admin administ 1666 Dec 25 17:23 HDHomeRunDVR.sh*
-rwxr-xr-x 1 admin administ 2543 Aug 3 18:04 diagnostics.sh*
-rwxr-xr-x 1 admin administ 1527038 Aug 17 15:32 hdhomerun_record_linux*
-rwxr-xr-x 1 admin administ 8916 Feb 5 2018 hdhr_wrapper_arm*
-rwxr-xr-x 1 admin administ 10432 Feb 5 2018 hdhr_wrapper_x86_64*
drwxr-xr-x 7 httpdusr administ 4096 Dec 25 16:50 ui/
sudo ./hdhr_wrapper_arm
sudo: unable to execute ./hdhr_wrapper_arm: No such file or directory
sudo ./hdhomerun_record_linux start
HDHomeRun RECORD started
It starts, and the firetv finds the engine. But no recordings show up and I just get protocol error when trying to tune in a live station. Then ran this
sudo ./hdhomerun_record_linux start --conf HDHomeRunDVR.conf
And all seems right, live TV and recorded programs show up and play again. Also it creates the log file. HDHomeRun DVR UI displays all the records and what not again as well.
Thanks,
Files are all there
-rw-rw-r-- 1 admin administ 100 Aug 26 2017 HDHomeRunDVR.conf
-rwxr-xr-x 1 admin administ 1666 Dec 25 17:23 HDHomeRunDVR.sh*
-rwxr-xr-x 1 admin administ 2543 Aug 3 18:04 diagnostics.sh*
-rwxr-xr-x 1 admin administ 1527038 Aug 17 15:32 hdhomerun_record_linux*
-rwxr-xr-x 1 admin administ 8916 Feb 5 2018 hdhr_wrapper_arm*
-rwxr-xr-x 1 admin administ 10432 Feb 5 2018 hdhr_wrapper_x86_64*
drwxr-xr-x 7 httpdusr administ 4096 Dec 25 16:50 ui/
sudo ./hdhr_wrapper_arm
sudo: unable to execute ./hdhr_wrapper_arm: No such file or directory
sudo ./hdhomerun_record_linux start
HDHomeRun RECORD started
It starts, and the firetv finds the engine. But no recordings show up and I just get protocol error when trying to tune in a live station. Then ran this
sudo ./hdhomerun_record_linux start --conf HDHomeRunDVR.conf
And all seems right, live TV and recorded programs show up and play again. Also it creates the log file. HDHomeRun DVR UI displays all the records and what not again as well.
Thanks,
Automatically start the record engine?
First, I haven’t read this entire thread so this may have already been covered.
Second, I like the package and have it installed and working on my TS-231. Thanks
However, when I restart the NAS the record engine must be started
manually. I don’t see any option to start the engine automatically.
I found this method of running a startup script and “installed” it.
https://forum.qnap.com/viewtopic.php?f=45&t=130345
This is my current script to start the record engine.
[/share/CACHEDEV1_DATA/.system/autorun/scripts] # cat 030-myscript
The script successfully starts the engine. However, I cannot view live TV or
control the record engine with the hdhrun app on my shield TV. It appears
that this is because the engine is running as “admin” and not “httpdusr”.
Is there a better way to automatically start the record engine?
Second, I like the package and have it installed and working on my TS-231. Thanks
However, when I restart the NAS the record engine must be started
manually. I don’t see any option to start the engine automatically.
I found this method of running a startup script and “installed” it.
https://forum.qnap.com/viewtopic.php?f=45&t=130345
This is my current script to start the record engine.
[/share/CACHEDEV1_DATA/.system/autorun/scripts] # cat 030-myscript
Code: Select all
#!/bin/sh
rm /tmp/mlog*
touch /tmp/mlog1
/share/CACHEDEV1_DATA/.qpkg/HDHomeRunDVR/hdhomerun_record_linux start &
touch /tmp/mlog2
exit
control the record engine with the hdhrun app on my shield TV. It appears
that this is because the engine is running as “admin” and not “httpdusr”.
Is there a better way to automatically start the record engine?
Re: QNAP QPKG for DVR Record Engine
jim_a
Looks kind of similar to the issue I am currently having. To get you going for now try starting it with the --conf option when ssh in.
hdhomerun_record_linux start --conf HDHomeRunDVR.conf
This started the record engine and everything seems to work normally for me when I ran it from the same directory as long as your conf file is in there already.
Waiting for demonrik on a real solution. But the above might get you by in the mean time at least.
Looks kind of similar to the issue I am currently having. To get you going for now try starting it with the --conf option when ssh in.
hdhomerun_record_linux start --conf HDHomeRunDVR.conf
This started the record engine and everything seems to work normally for me when I ran it from the same directory as long as your conf file is in there already.
Waiting for demonrik on a real solution. But the above might get you by in the mean time at least.
Re: QNAP QPKG for DVR Record Engine
Sorry late with follow up reply - internet is crap here, and had to pay attention to family for the day.darqnova wrote: ↑Tue Dec 25, 2018 5:18 pm Thanks for the quick reply.
Files are all there
-rw-rw-r-- 1 admin administ 100 Aug 26 2017 HDHomeRunDVR.conf
-rwxr-xr-x 1 admin administ 1666 Dec 25 17:23 HDHomeRunDVR.sh*
-rwxr-xr-x 1 admin administ 2543 Aug 3 18:04 diagnostics.sh*
-rwxr-xr-x 1 admin administ 1527038 Aug 17 15:32 hdhomerun_record_linux*
-rwxr-xr-x 1 admin administ 8916 Feb 5 2018 hdhr_wrapper_arm*
-rwxr-xr-x 1 admin administ 10432 Feb 5 2018 hdhr_wrapper_x86_64*
drwxr-xr-x 7 httpdusr administ 4096 Dec 25 16:50 ui/
sudo ./hdhr_wrapper_arm
sudo: unable to execute ./hdhr_wrapper_arm: No such file or directory
Anyway,
that's strange - you have the wrapper, but is not executing it..
even if something had changed in the linker I would still expect it to execute and say invalid format.
So either the file is corrupt in the package or something else is happening on the qnap that's changed.
I see you using sudo. I didn't think that was standard for QNAP. You install? Or did it come in a recent update?
BTW- which NAS model and firmware version?
Maybe try downloading the arm binary directly to some other path
Code: Select all
wget http://www.irish-networx.com/hdhr_wrapper/hdhr_wrapper_arm
chmod a+x hdhr_wrapper_arm
./hdhr_wrapper_arm
Try logging in as an admin user and not use sudo to execute
Do you have any other security apps running which may limit the executable permissions of files?
EDIT: BTW - did you try start from the UI?
That's how you run it.. Without the --conf the record engine will try create one with a recordpath set to current folder and obviously permissions won't allow you to record anything to it..sudo ./hdhomerun_record_linux start
HDHomeRun RECORD started
It starts, and the firetv finds the engine. But no recordings show up and I just get protocol error when trying to tune in a live station. Then ran this
sudo ./hdhomerun_record_linux start --conf HDHomeRunDVR.conf
And all seems right, live TV and recorded programs show up and play again. Also it creates the log file. HDHomeRun DVR UI displays all the records and what not again as well.
Thanks,
So when you added -cconf you get it working, but now is running as root user.
root user will allow you to use everything perfectly, but now all your recordings will be as root.. so a) you can't use the stop/start controls in the UI, and b) once we get the wrapper working again you will need to fix permissions of all the recordings again to httpdusr
Last edited by demonrik on Wed Dec 26, 2018 11:02 am, edited 1 time in total.
Re: QNAP QPKG for DVR Record Engine
darqnova
My issue may be related to yours.
However, I am using the qpkg gui interface to manually start and stop the recorder with no problems.
Basically , I am trying to get the record engine to start when the NAS starts without logging into the NAS.
My issue may be related to yours.
However, I am using the qpkg gui interface to manually start and stop the recorder with no problems.
Basically , I am trying to get the record engine to start when the NAS starts without logging into the NAS.
Re: QNAP QPKG for DVR Record Engine
Could be same issue as @darqnova
From autostart you need the arm binary.. From UI start it's not needed since is already running as right user.
you seem familiar with command console - can you do like @darqnova and check if you can run the arm wrapper binary on your system?