Synology SPK for DVR Record Engine

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

Synology SPK for DVR Record Engine

Postby demonrik » Thu Nov 23, 2017 12:57 pm

Requirements
  • Your Synology NAS must be running DSM 6.0 or newer
  • You must have the WebStation app installed for the PHP UI to work
SPK Installation Instructions
  1. Download the latest .spk file from Google Drive, DropBox, OneDrive, or advanced users can build from source (see below). The .md5 file allows advanced users to verfiy that the file has not been modified in transit but is otherwise not needed.
  2. Open a browser to your Synology desktop and login as an admin user
  3. Open the 'Package Center'
  4. Click on 'Manual Install'
  5. Browse to the location of the SPK file and select it
  6. Click Next
  7. You will be presented with information about the package.. Ensure you have the 'Run after installation' box checked and hit 'Apply'
  8. After a few minutes the package will be installed and available in the 'Package Center'

--------------------------
Support
Support for my prebuilt packages will be done via this thread or via discord channel
https://discord.gg/0uzKaTiMjCwvanxM
Just ask and I will do my best to answer as quickly as I can :)


-------------------------
About
Similar to my QNAP QPKG (here) here is a project to build a custom Synology SPK package for installation on your Synology NAS.
Provides similar benefits
- integrated UI to manage the configuration file
- integrated into the Synology desktop package manager
- makes the log files viewable
- easy installation/update without requiring new shares or even a separate PC
- automatic restart when the NAS restarts (after update for example)

All sources are located in the silicondust DVR installer project on github
https://github.com/Silicondust/dvr_install

This project is simply the SPK sources to build the SPK. The project does not contain a copy of SiliconDust's HDHomeRun DVR Record Engine Binary. Builders must get this binary separately from the SiliconDust forums (script provided)

License of the SPK sources is public domain. License of the HDHomeRun DVR Record Engine remains the property of SiliconDust and use of this SPK sources does in no way permit the user the right to redistribute the binaries without SiliconDust's permission and/or permit any breaking of SiliconDust's license restrictions on the DVR record engine.
Last edited by demonrik on Sat Feb 10, 2018 4:33 pm, edited 7 times in total.

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

Re: Synology SPK for DVR Record Engine

Postby demonrik » Thu Nov 23, 2017 12:58 pm

Known Issues/Workarounds

No UI -> open_basedir
By Default Synology installs PHP with the open_basedir directive set in the php.ini to restrict the directories. To workaround this you have 2 choices. Either
  • a) Remove the restriction
    b) add all directories to the open_basedir list
For both..
  1. Open a Browser to your Synology DSM
  2. Open the 'Webstation' App
  3. Under PHP Settings you will have a dialog showing the ability to 'Customize PHP open_basedir'
  4. First check which PHP version you have selected in the top drop down box.. Typically newer Synology uses PHP 7.0..
  5. My recommendation is to modify the open_basedir to be the same for BOTH 5.6 and 7.0
    For
    a) simply leave the check box for 'Customize PHP open_basedir' checked and remove everything in the text box below
    or
    b) add the following and adjust for any changes you may make to the list
    • /var/packages/HDHomeRunDVR - base package location to allow access to the binaries and config file
    • /volume1/HDHomeRunDVR - default recording directory
Error 500 when loading UI webpage
Error 500 is shown when the webserver on the NAS cannot show the webpage because something has thrown an error.
In many cases the fix is to ensure you select PHP 7.0 with the instructions below:
1. Open the WebStation app on your DSM desktop
2. Select the 'General Settings' tab
3. For PHP, ensure 'Default Profile ( PHP 7.0 )' is selected
4. Hit Apply

Error running the engine with a previously created shared folder
When setting the RecordPath to a shared folder you previously created you get an error, and the record engine fails to start
This has to do with the way Synology sets the share permissions versus folder permissions. Unfortunately at this time there is no automated fix, however you can get it working. Please follow these steps to add the 'http' group as permitted to write to the folder.
1. Go to the 'Shared Folder' tool in your Control Panel
2. Select the shared folder you wish to use for the DVR
3. Make sure 'Restrict access to administrators only' is not selected/ticked.
4. Hit 'Edit' to edit it's permissions
5. Select the 'Permissions' Tab
6. Where you see 'Local users' select the drop down to 'Local groups'
7. Select the Check Mark for 'Read/Write' access for the 'http' group
8. Select OK
Last edited by demonrik on Mon Jun 11, 2018 4:16 pm, edited 5 times in total.

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

Re: Synology SPK for DVR Record Engine

Postby demonrik » Thu Nov 23, 2017 12:58 pm

Reserved for future

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

Re: Synology SPK for DVR Record Engine

Postby demonrik » Thu Nov 23, 2017 12:59 pm

Howto transition from SiliconDust installer to the new SPK

Stop the Current Record Engine
  1. SSH as an administrator to the NAS
  2. When using the SD installer you had to create a 'HDHomeRun' share - this is typically located on the system as /volumeX/HDHomeRun where X is the number for the volume you installed it on.
  3. Change to that directory and stop the engine with

    Code: Select all

    #> cd /volumeX/HDHomeRun #> ./hdhomerun_record stop
Install the new Record Engine SPK
With the engine stopped lets switch to the DSM Web Page. Log in as an admin user and install the New engine through the Package Center -> Manual install
(remember to update the PHP open_basedir if needed - see here)

Stop the new Record Engine
  1. Select the HDHomeRun DVR Manager app in the Package Center
  2. Under the action drop down, select STOP
Move the Config File
Now back to SSH again..
Move the old CONF file to the new location
Note: You must do this as 'root'
  1. Locate the original CONF file - should be in /volumeX/HDHomeRun/hdhomerun.conf
  2. and move it to the new location

    Code: Select all

    #> sudo mv /volumeX/HDHomeRun/hdhomerun.conf /var/packages/HDHomeRunDVR/target/etc/HDHomeRunDVR.conf
Start the new Record Engine
You can now start the engine through the DSM Web Frontend
Stop the new Record Engine
  1. Log in as an admin user
  2. Select the HDHomeRun DVR Manager app in the Package Center
  3. Under the action drop down, select Run
If you click on the URL in the App's info for Package Center it should take you to the Manager UI.. And should state that the engine is running and you can go look at log files and recordings.

CleanUp tasks.....
  1. Stop the engine using instructions above for the new Record Engine
  2. ssh to the NAS as an admin user
  3. remove or backup the log files
  4. remove the record_linux binary
DO NOT REMOVE the Share through the 'Shared Folder Control Panel'
Doing so will remove your recordings!!!!
To remove the share - you MUST move the recordings to another folder.. so stop the engine, update the RecordPath and then start the engine again.
Last edited by demonrik on Wed Nov 29, 2017 2:15 pm, edited 3 times in total.

jjwatmyself
Posts: 79
Joined: Fri Jan 18, 2013 9:13 pm

Re: Synology SPK for DVR Record Engine

Postby jjwatmyself » Fri Nov 24, 2017 7:53 am

Loving the 3rd party innovation that this represents. Such a great contribution to the community. I will watch this space with great interest.

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

Re: Synology SPK for DVR Record Engine

Postby demonrik » Fri Nov 24, 2017 3:28 pm

New Version available - 0_2-20171118
Fixes
- Now detects the volume the package is installed on, and tries to locate the record path on that volume
- Detects upgrading (preserves the HDHomeRun configuration file)
- Fixes permissions on the configuration file
- minor tweaks in other places.

Big issues still to resolve
- get recordings list to work
- start/stop of the engine from the UI

poorman
Posts: 12
Joined: Sat Oct 10, 2015 11:29 am

Re: Synology SPK for DVR Record Engine

Postby poorman » Mon Nov 27, 2017 4:03 pm

Awesome, this is great. I'm very happy someone is working on this.

Installed and running. Can't find the interface tho.

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

Re: Synology SPK for DVR Record Engine

Postby demonrik » Mon Nov 27, 2017 10:56 pm

Awesome, this is great. I'm very happy someone is working on this.

Installed and running. Can't find the interface tho.
If you look at the app in the application center you will see the admin URL.

I have recordings list working.. just a few things to clean up before I upload new package

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

Re: Synology SPK for DVR Record Engine

Postby jasonic8 » Tue Nov 28, 2017 4:35 am

What's the SD status on this - should we wait or use this?

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

Re: Synology SPK for DVR Record Engine

Postby Beerman » Tue Nov 28, 2017 5:29 am

Thanks for doing this, it sounds great!
If I'm already running HDHomerun on my Synology, do I have to do anything to it first?

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

Re: Synology SPK for DVR Record Engine

Postby demonrik » Tue Nov 28, 2017 3:01 pm

New Version available - 0_3-20171118
Fixes
- Now same functionality as QNAP - recordings working.. same issues with stop/start.

Big issues still to resolve
- start/stop of the engine from the UI

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

Re: Synology SPK for DVR Record Engine

Postby demonrik » Tue Nov 28, 2017 3:20 pm

Thanks for doing this, it sounds great!
If I'm already running HDHomerun on my Synology, do I have to do anything to it first?
TBH I never used the installer so I'm not 100% sure.
Here's what I think is the procedure - if someone wants to try and see if it works, please let me know.
You will need an SSH shell to the NAS

<instructions moved to here>
Last edited by demonrik on Wed Nov 29, 2017 2:03 pm, edited 2 times in total.

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

Re: Synology SPK for DVR Record Engine

Postby demonrik » Tue Nov 28, 2017 3:23 pm

What's the SD status on this - should we wait or use this?
this is me helping SD out.
All the code is provided free to SD for their use. I just do the work and create the packages for you.
Support of the package at this time is with me.. Support of the DVR engine is with SD.

As to should you wait or use.
It depends on your needs. Personally I hate having exposed shares that aren't needed, and prefer to have updates that work independent of SMB share issues, as well as having the engine restart once I update the NAS.
If that's not a concern - then do not install.

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

Re: Synology SPK for DVR Record Engine

Postby jasonic8 » Wed Nov 29, 2017 2:05 am

this is me helping SD out.
All the code is provided free to SD for their use. I just do the work and create the packages for you.
Support of the package at this time is with me.. Support of the DVR engine is with SD.
Thanks for the clarification and for sharing this then. I agree the points you mention are a pain.

poorman
Posts: 12
Joined: Sat Oct 10, 2015 11:29 am

Re: Synology SPK for DVR Record Engine

Postby poorman » Wed Nov 29, 2017 4:21 pm

Howto transition from SiliconDust installer to the new SPK

Stop the Current Record Engine

<SNIP>

To remove the share - you MUST move the recordings to another folder.. so stop the engine, update the RecordPath and then start the engine again.[/i]
I have tried these steps and report that it works ... mostly. When on the HDHomerunDVD DSM page I select action run or stop, your software does stop or start the record engine (./hdhomerun_record status). However when I follow the URL, in my case is http://nas/HDHomeRunDVR/, i receive a 500 There is an error while processing this request.

Maybe I have the open_basedir incorrect. I'm unsure of the delimiter between the two entries. I have "/var/packages/HDHomeRunDVR:/volume1/HDHomeRunDVR". Should it be a colon : ? Both paths have been verified.

No worries here though, I know it is in development so I can patiently await the next version and try again.


Return to “Downloads & Instructions”

Who is online

Users browsing this forum: No registered users and 3 guests