Synology SPK for DVR Record Engine

Downloads & Instructions
demonrik
Posts: 794
Joined: Mon May 04, 2015 10:03 am

Re: Synology SPK for DVR Record Engine

Postby demonrik » Tue Feb 06, 2018 2:39 pm

I'm on x86 and get the text describing the wrapper successfully.

It was allowing me to view live channels before so I'm not sure what's changed.

I'm rubbish at vi.
what about the output of ps?
did you try the logfile stuff?
the rest of the web UI works?

will track this down - it's a config issue somewhere that we just need to track down and resolve.
To be sure - these are the only changes you think you've done?
You installed new 0.4.1 package (over 0.3)
You did the user permissions change to http

If you are open to it - I could remotely connect to your PC (with open ssh session) with you later this afternoon and walk through these checks much quicker.. You would be able to monitor the connection. Ping me if interested.

jasonic8
Posts: 110
Joined: Wed Jul 01, 2015 3:03 am
Location: Somerset, UK

Re: Synology SPK for DVR Record Engine

Postby jasonic8 » Tue Feb 06, 2018 2:46 pm

Code: Select all

login as: admin admin@192.168.0.125's password: admin@JasonsServer:~$ ps -ef | grep hdh http 8415 1 0 20:02 ? 00:00:09 /tmp/hdhomerun_record_x64 start --conf /volume1/@appstore/HDHomeRunDVR/etc/HDHomeRunDVR.conf admin 23933 23835 0 21:26 pts/12 00:00:00 grep --color=auto hdh admin@JasonsServer:~$ uname -a Linux JasonsServer 3.10.102 #15254 SMP Fri Jan 26 06:43:28 CST 2018 x86_64 GNU/Linux synology_x86_1511+ admin@JasonsServer:~$ /var/packages/HDHomeRunDVR/target/bin/hdhr_wrapper_x86_64 +===========================================================+ | Simple wrapper for HDHomeRun DVR Record Engine v0.1 | | changes effective user to same user as web engine for the | | web UI to have sufficient privileges to stop/start the | | DVR engine backend without | | Must be run as admin/root user | | This script will not elevate privleges. | +===========================================================+ +===========================================================+ | | | hdhr_wrapper -u <username> -b <binary to execute> | | | +===========================================================+
I removed the logfiles - no new file appeared.
DVR manager webpage works - Port -path not set, and no Recordings found
my.hdhomerun.com looks correct

demonrik
Posts: 794
Joined: Mon May 04, 2015 10:03 am

Re: Synology SPK for DVR Record Engine

Postby demonrik » Tue Feb 06, 2018 3:00 pm

DVR manager webpage works - Port -path not set, and no Recordings found
ding ding...
I think we have the root of the problem here
http 8415 1 0 20:02 ? 00:00:09 /tmp/hdhomerun_record_x64 start --conf /volume1/@appstore/HDHomeRunDVR/etc/HDHomeRunDVR.conf
Engine is definitely running
However the UI is not reporting the contents.
So either the conf file is bad, or the permissions to it are screwed up.

Lets take a look at the conf file..
Again from ssh

Code: Select all

cat /volume1/@appstore/HDHomeRunDVR/etc/HDHomeRunDVR.conf
should look something like

Code: Select all

RecordPath=/volume1/video/HDHomeRunDVR Port=59090 StorageID=be475ae2-7ec6-9efb-2cc0-f5b22f45be80
then

Code: Select all

ls -l /volume1/@appstore/HDHomeRunDVR/etc/HDHomeRunDVR.conf
should be something like:

Code: Select all

-rw-rw-r-- 1 http http 97 Feb 5 17:45 HDHomeRunDVR.conf
and finally - lets check the recordpath in the conf file

Code: Select all

ls -la <conf file reported recordpath>
make sure you do use the recordpath in the conf file and not what you think it should be

jasonic8
Posts: 110
Joined: Wed Jul 01, 2015 3:03 am
Location: Somerset, UK

Re: Synology SPK for DVR Record Engine

Postby jasonic8 » Tue Feb 06, 2018 3:22 pm

Code: Select all

admin@JasonsServer:~$ cat /volume1/@appstore/HDHomeRunDVR/etc/HDHomeRunDVR.conf RecordPath=/volume1/HDHomeRun/ StorageID=e2c2e815-03ed-42d3-9070-3d828d5ba989 admin@JasonsServer:~$ ls -l /volume1/@appstore/HDHomeRunDVR/etc/HDHomeRunDVR.conf -rw-rw-r-- 1 http http 78 Feb 6 17:14 /volume1/@appstore/HDHomeRunDVR/etc/HDHomeRunDVR.conf admin@JasonsServer:~$ ls -la /volume1/HDHomeRun total 1396 drwxrwxrwx+ 55 http http 20480 Feb 6 20:07 . drwxr-xr-x 32 root root 4096 Feb 6 17:07 .. drwxrwxrwx+ 2 http http 4096 Mar 14 2017 Abandoned Engineering drwxrwxrwx+ 2 http http 4096 May 16 2017 Anger Management drwxrwxrwx+ 2 http http 4096 May 9 2017 Asian Provocateur
So the port is missing...

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

Re: Synology SPK for DVR Record Engine

Postby TBlankenheim » Tue Feb 06, 2018 3:29 pm

Here is some additional info to chew on.

Changing the permissions on my RecordPath solved the problem with the log files etc. If I stop and start using the Package Center, no log file is created. However, if I stop and start the RECORD engine via the DVR Manager, everything works as it should.

Hope this helps.

jasonic8
Posts: 110
Joined: Wed Jul 01, 2015 3:03 am
Location: Somerset, UK

Re: Synology SPK for DVR Record Engine

Postby jasonic8 » Tue Feb 06, 2018 3:33 pm

Here is some additional info to chew on.

Changing the permissions on my RecordPath solved the problem with the log files etc. If I stop and start using the Package Center, no log file is created. However, if I stop and start the RECORD engine via the DVR Manager, everything works as it should.

Hope this helps.
Thanks - I'd tried both and neither created log files after the update.

That said - having changed the port path to 59090 and repeating that, I do now have a log and live video - and now recordings are showing.... (scratches head)

demonrik
Posts: 794
Joined: Mon May 04, 2015 10:03 am

Re: Synology SPK for DVR Record Engine

Postby demonrik » Tue Feb 06, 2018 4:10 pm

That said - having changed the port path to 59090 and repeating that, I do now have a log and live video - and now recordings are showing.... (scratches head)
you must have a firewall somewhere preventing the engine from running without the port.
and you probably added the port at some time.
However - I'm clueless as to HOW you lost the Port in the config file.
at least you are now working.
Changing the permissions on my RecordPath solved the problem with the log files etc. If I stop and start using the Package Center, no log file is created. However, if I stop and start the RECORD engine via the DVR Manager, everything works as it should.
a log file will only be created if there is none for that time/date.. if you do stop at package and delete all the logs then start - do you still get none?
I'd like to get an understanding of why this doesn't work for you.. Can you ssh to the NAS and run 'uname -a' and post the response?
TIA

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

Re: Synology SPK for DVR Record Engine

Postby TBlankenheim » Tue Feb 06, 2018 4:24 pm

a log file will only be created if there is none for that time/date.. if you do stop at package and delete all the logs then start - do you still get none?
If I stop the package, delete all of the log files and restart the package, no new log files are created until I stop/start the RECORD engine using the DVR Manager.
I'd like to get an understanding of why this doesn't work for you.. Can you ssh to the NAS and run 'uname -a' and post the response?

Code: Select all

root@TJB-NAS-DS918:~# uname -a Linux TJB-NAS-DS918 4.4.15+ #15254 SMP PREEMPT Fri Jan 26 06:44:33 CST 2018 x86_64 GNU/Linux synology_apollolake_918+ root@TJB-NAS-DS918:~#

drewq
Posts: 1
Joined: Sun Feb 11, 2018 1:41 pm

Re: Synology SPK for DVR Record Engine

Postby drewq » Tue Feb 13, 2018 10:25 pm

tried everything in the most recent update and my hd home run app now says : Unable to play channel DVR failure

any suggesitons

demonrik
Posts: 794
Joined: Mon May 04, 2015 10:03 am

Re: Synology SPK for DVR Record Engine

Postby demonrik » Tue Feb 13, 2018 10:32 pm

tried everything in the most recent update and my hd home run app now says : Unable to play channel DVR failure

any suggesitons
permissions
record engine now runs as http user. make sure t has write permissions to your recordpath
this error happens when the engine cant write to the location for livetv

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

Re: Synology SPK for DVR Record Engine

Postby TBlankenheim » Tue Feb 13, 2018 11:48 pm

a log file will only be created if there is none for that time/date.. if you do stop at package and delete all the logs then start - do you still get none?
If I stop the package, delete all of the log files and restart the package, no new log files are created until I stop/start the RECORD engine using the DVR Manager.
I'd like to get an understanding of why this doesn't work for you.. Can you ssh to the NAS and run 'uname -a' and post the response?

Code: Select all

root@TJB-NAS-DS918:~# uname -a Linux TJB-NAS-DS918 4.4.15+ #15254 SMP PREEMPT Fri Jan 26 06:44:33 CST 2018 x86_64 GNU/Linux synology_apollolake_918+ root@TJB-NAS-DS918:~#
Any additional thoughts on what might be going on here?

Thanks!

demonrik
Posts: 794
Joined: Mon May 04, 2015 10:03 am

Re: Synology SPK for DVR Record Engine

Postby demonrik » Wed Feb 14, 2018 10:04 am

a log file will only be created if there is none for that time/date.. if you do stop at package and delete all the logs then start - do you still get none?
If I stop the package, delete all of the log files and restart the package, no new log files are created until I stop/start the RECORD engine using the DVR Manager.
I'd like to get an understanding of why this doesn't work for you.. Can you ssh to the NAS and run 'uname -a' and post the response?

Code: Select all

root@TJB-NAS-DS918:~# uname -a Linux TJB-NAS-DS918 4.4.15+ #15254 SMP PREEMPT Fri Jan 26 06:44:33 CST 2018 x86_64 GNU/Linux synology_apollolake_918+ root@TJB-NAS-DS918:~#
Any additional thoughts on what might be going on here?

Thanks!
It's a tough one.
One of a few things are happening here I suspect..

1. The wrapper is not working.
you can check this by ssh'ing to the NAS and just executing the wrapper

Code: Select all

/volume1/@appstore/HDHomeRunDVR/bin/hdhr_wrapper
It will either work and display the header or it will complain about an exec format

2. The wrong wrapper is being chosen by the startup routine.
This is harder to debug. Even though I have echo statements in the start/stop script you can't see them.
With the new engine available - 0.4.2 will be available in just a short while.
Change to this.
As part of the start routine there should be a file /tmp/hdhr_arch_choice
What does it show?

3. For some reason RecordPath is not ready when the script is run.
If it's happening even after running the NAS for hours - then it can't be this.

demonrik
Posts: 794
Joined: Mon May 04, 2015 10:03 am

Re: Synology SPK for DVR Record Engine

Postby demonrik » Wed Feb 14, 2018 10:09 am

NEW PACKAGE AVAILABLE
- update to the 20180213beta1 engine
20180213beta1
- startup script (from restart or appcenter) logs to /tmp/hdhr_arch_choice to log the arch detected to help debug.
- now modifies newly created directory for recordpath to be accessible by default by http

new SPK HDHomeRunDVR-0.4.2-20180213.spk available in the usual locations Google Drive, DropBox, OneDrive

Warning: the wrapper (source code is on github) provided has been compiled both for ARM and x86_64. The script should detect the architecture of your NAS and call the appropriate wrapper. I unfortunately do not have an X86 based Synology to test on - just a bunch of PCs, etc. to try the portable binary. Please let me know if you have issues. In some cases, if the platform is not detected the wrapper is not used and the UI controls will not work. Also please let me know which Synology NAS this happens for

Code is available on github
https://github.com/Silicondust/dvr_install

Known Issues
- diagnostics.sh not updated for new api url
- recordpath for existing in conf file doesn't get adjusted for chmod/chown to http

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

Re: Synology SPK for DVR Record Engine

Postby TBlankenheim » Wed Feb 14, 2018 11:57 am

It's a tough one.
One of a few things are happening here I suspect..

1. The wrapper is not working.
you can check this by ssh'ing to the NAS and just executing the wrapper

Code: Select all

/volume1/@appstore/HDHomeRunDVR/bin/hdhr_wrapper
It will either work and display the header or it will complain about an exec format

2. The wrong wrapper is being chosen by the startup routine.
This is harder to debug. Even though I have echo statements in the start/stop script you can't see them.
With the new engine available - 0.4.2 will be available in just a short while.
Change to this.
As part of the start routine there should be a file /tmp/hdhr_arch_choice
What does it show?

3. For some reason RecordPath is not ready when the script is run.
If it's happening even after running the NAS for hours - then it can't be this.
I installed the latest package (HDHomeRunDVR-0.4.2-20180213.spk) and everything works as expected! :D

The RECORD engine starts & stops properly using Package Center or DVR Manager. So whatever you did in the package update seems to have solved the problem.

Thanks!

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

Re: Synology SPK for DVR Record Engine

Postby TBlankenheim » Wed Feb 14, 2018 12:25 pm

- update to the 20180213beta1 engine
20180213beta1
- startup script (from restart or appcenter) logs to /tmp/hdhr_arch_choice to log the arch detected to help debug.
- now modifies newly created directory for recordpath to be accessible by default by http
I may have found a hiccup in the installation of HDHomeRunDVR-0.4.2-20180213.spk. After the installation, HDHomeRunDVR share was no longer accessible. I checked the permissions on /volume1/HDHomeRunDVR/ and they were set to 770 (if I recall correctly). Did a chmod -R 777 "/volume1/HDHomeRunDVR/" (probably overkill) and all was good. Not sure if this is the proper solution to this problem, but it worked for me.


Return to “Downloads & Instructions”

Who is online

Users browsing this forum: No registered users and 4 guests