Synology SPK for DVR Record Engine

Downloads & Instructions
Post Reply
ppasteur
Posts: 133
Joined: Thu Sep 05, 2019 3:54 pm
x 2

Re: Synology SPK for DVR Record Engine

Post by ppasteur »

Thanks for your patience!!!

PP

NTC
Posts: 71
Joined: Sat Apr 13, 2019 2:26 pm
Device ID: 10751B42, 108007F1

Re: Synology SPK for DVR Record Engine

Post by NTC »

Finally eliminated my http 405 error when attempting to access the dashboard using the HDHomeRunDVR UI. I had to modify slightly one of the paths in the PHP settings in open_basedir. Had to add the directory "target" to /var/packages/HDHomeRunDVR (instructed in second post).

So in addition to /volume1/HDHomeRunDVR, I now use /var/packages/HDHomeRunDVR/target

Posting this in case someone else encounters the error 405 using the UI.

netmation
Posts: 6
Joined: Mon Feb 03, 2014 8:52 pm

Re: Synology SPK for DVR Record Engine

Post by netmation »

Noticed my Synology has PHP 7.3 currently and the original post stated to run PHP 7.2, does it matter if we use the latest?

I installed this SPK over the current installation of SiliconDust software for the Synology that was not working properly. I assume this should now work even though I did no uninstalling? Seems to be ok and is currently working. Thanks for making this available.

jetlounge
Posts: 3
Joined: Sun Mar 03, 2019 9:48 am

Re: Synology SPK for DVR Record Engine

Post by jetlounge »

Installed the latest version and "Dashboard" tab is totally blank. I'm running Php 7.2.

Recordings tab works, as does the gear icon for settings. But when I click "Dashboard" absolutely nothing displays below.

What am I doing wrong?

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: Synology SPK for DVR Record Engine

Post by demonrik »

jetlounge wrote: Sun Oct 27, 2019 1:11 pm Installed the latest version and "Dashboard" tab is totally blank. I'm running Php 7.2.

Recordings tab works, as does the gear icon for settings. But when I click "Dashboard" absolutely nothing displays below.

What am I doing wrong?
Try doing a hard reload of the page in your web browser.
My suspicion is it's not loading up newer javascript required for the dashboard

.willow.
Posts: 10
Joined: Mon Oct 28, 2019 12:24 am

Re: Synology SPK for DVR Record Engine

Post by .willow. »

Hi all,

Having issues which I am troubleshooting in another thread viewtopic.php?f=119&t=72613&p=352864#p352864

Long story short, can't get the recording service to start on a DS413.

At the bottom of the dashboard screen I get the text "HDHomeRun RECORD not running | 0x1000040c"

Anyone got any idea what this code means?

Thanks in advance!

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: Synology SPK for DVR Record Engine

Post by demonrik »

.willow. wrote: Wed Oct 30, 2019 2:04 am At the bottom of the dashboard screen I get the text "HDHomeRun RECORD not running | 0x1000040c"

Anyone got any idea what this code means?
Will add my voice to the other thread - but first on this question...
The first bit is when the web server accesses the binary from SD and it shows the engine is not running.
The code is unfamiliar. The right side of the | is meant to be the latest line in the log, so the code checks the RecordPath for the latest log file (*.log) and reads the newest line.
Looking at your other link you mention a fault log file... am guessing it's picking this up and reading the last line which you show is this code.

MNOiSY
Posts: 90
Joined: Sun Oct 16, 2016 6:17 pm

Re: Synology SPK for DVR Record Engine

Post by MNOiSY »

Trying to learn about compilation from github source with new 20200121beta1 firmware but taking longer than expected to figure out. I figured I would reach out to see if anyone has compiled it on their own yet?

Thank you!

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: Synology SPK for DVR Record Engine

Post by demonrik »

MNOiSY wrote: Sun Jan 26, 2020 5:03 pm Trying to learn about compilation from github source with new 20200121beta1 firmware but taking longer than expected to figure out. I figured I would reach out to see if anyone has compiled it on their own yet?

Thank you!
synology makefile is just creating a tarball - no real compilation unless you compile the wrappers.
it does download the engine, and the wrappers (tiny) so could be an issue if wget isn't finding the URLs properly.

Am happy to try and explain things.

MNOiSY
Posts: 90
Joined: Sun Oct 16, 2016 6:17 pm

Re: Synology SPK for DVR Record Engine

Post by MNOiSY »

demonrik wrote: Sun Jan 26, 2020 5:20 pm
MNOiSY wrote: Sun Jan 26, 2020 5:03 pm Trying to learn about compilation from github source with new 20200121beta1 firmware but taking longer than expected to figure out. I figured I would reach out to see if anyone has compiled it on their own yet?

Thank you!
synology makefile is just creating a tarball - no real compilation unless you compile the wrappers.
it does download the engine, and the wrappers (tiny) so could be an issue if wget isn't finding the URLs properly.

Am happy to try and explain things.
Finding a step by step guide specific to the Synology has been difficult so far. It would be awesome if you could share that on this thread. Or if feeling lazy, or extra kind, post it up with/without the new spk.

Thanks again!!

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: Synology SPK for DVR Record Engine

Post by demonrik »

MNOiSY wrote: Sun Jan 26, 2020 5:44 pm Finding a step by step guide specific to the Synology has been difficult so far. It would be awesome if you could share that on this thread. Or if feeling lazy, or extra kind, post it up with/without the new spk.
What step by step are you asking for?
  1. How to build SPKs?
  2. How to install SPK?
  3. How to add to the UI?
  4. How to use the AI?
  5. How to build this SPK
1 is best dealt with via the synology developer resources. What I have here is a small subset since I don't build any binaries specific to the synology. Ultimately it comes down to tar file which includes some scripts, info and the app in another tar file. So you first create the tar ball of the app (in this case the UI, wrappers, record engine and conf file) then you place that and the scripts and INFO file into another tar file.. The synology then unpacks and starts to process the INFO and scripts files which are preset.

2 is explained in the very first post of this thread and is simple.

3 is a little more complex - but relatively straight forward. Largely based on Model-View-Controller pattern.. where the Model php files are in the includes folder for each aspect of the model as well as some helper functions. This model is what queries and builds the data for the Controller php which is in the main folder and pulls from the different data models and uses the View (the .html in style) to create the presentation of the UI. Connecting the server to the client is a Ajax (Asynchronous Javascript and XML).. Start at index.php - it builds out the starting point, registers the controller functions with the Ajax subsystem, then builds the initial page, etc.

4 I should do that at some point.. When I started it, it was pretty straight forward.. but probably needs a little explanation now. Maybe next (next) release.

5 need to add - is very easy, so will add in next (next) release. Main binaries you need are Make and wget along with tar and cp - all readily available in most linux distributions (I have never tried to get this to work on windows). The Makefile is easy enough to break down.. Think of it like a dependency tree.. To build the SPK I need the UI (so I copy it), the scripts, and the app package, so I build the app package which needs the wrappers and the record engine and use wget to download those, etc..

There really isn't any compilation going on EXCEPT for the wrapper binaries. You don't need to compiled them, I've already done so and the Makefiles pull them down via wget.. Code is really simple and I use generic ARM/X86 cross compilers to create static binaries (no dependency on libraries) so it can run on ANY ARM or x86 NAS (which is all that is supported)

MNOiSY
Posts: 90
Joined: Sun Oct 16, 2016 6:17 pm

Re: Synology SPK for DVR Record Engine

Post by MNOiSY »

demonrik wrote: Mon Jan 27, 2020 7:46 am What step by step are you asking for?
  1. How to build SPKs?
  2. How to install SPK?
  3. How to add to the UI?
  4. How to use the AI?
  5. How to build this SPK
1 is best dealt with via the synology developer resources. What I have here is a small subset since I don't build any binaries specific to the synology. Ultimately it comes down to tar file which includes some scripts, info and the app in another tar file. So you first create the tar ball of the app (in this case the UI, wrappers, record engine and conf file) then you place that and the scripts and INFO file into another tar file.. The synology then unpacks and starts to process the INFO and scripts files which are preset.

2 is explained in the very first post of this thread and is simple.

3 is a little more complex - but relatively straight forward. Largely based on Model-View-Controller pattern.. where the Model php files are in the includes folder for each aspect of the model as well as some helper functions. This model is what queries and builds the data for the Controller php which is in the main folder and pulls from the different data models and uses the View (the .html in style) to create the presentation of the UI. Connecting the server to the client is a Ajax (Asynchronous Javascript and XML).. Start at index.php - it builds out the starting point, registers the controller functions with the Ajax subsystem, then builds the initial page, etc.

4 I should do that at some point.. When I started it, it was pretty straight forward.. but probably needs a little explanation now. Maybe next (next) release.

5 need to add - is very easy, so will add in next (next) release. Main binaries you need are Make and wget along with tar and cp - all readily available in most linux distributions (I have never tried to get this to work on windows). The Makefile is easy enough to break down.. Think of it like a dependency tree.. To build the SPK I need the UI (so I copy it), the scripts, and the app package, so I build the app package which needs the wrappers and the record engine and use wget to download those, etc..

There really isn't any compilation going on EXCEPT for the wrapper binaries. You don't need to compiled them, I've already done so and the Makefiles pull them down via wget.. Code is really simple and I use generic ARM/X86 cross compilers to create static binaries (no dependency on libraries) so it can run on ANY ARM or x86 NAS (which is all that is supported)
My main concern was #5. I come from a web development background so familiarity is with ubuntu and limited to CLI pull from git, deployments, etc, etc. so I thought this would be no problem to tackle for a quick update. I saw a video (https://www.youtube.com/watch?v=IjqGgBeNAlA) which looked like a GUI interface to create SPK's but couldn't find that anywhere. After trying a few ways online, including the docker spksrc install, I figured I would seek guidance.

I was hoping to get a step by step guide; from what to install and how to how to create the spk. installation and set up of the spk and HDHomeRun platform is not needed since its already running great. I appreciate your help but I wouldn't expect you to waste your time creating a detailed guide like that for users like me. Is it at least possible for you to upload the new spk's with the new software for us?

Thank you tons!

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: Synology SPK for DVR Record Engine

Post by demonrik »

MNOiSY wrote: Mon Jan 27, 2020 9:43 am
demonrik wrote: Mon Jan 27, 2020 7:46 am
  • How to build this SPK
...
5 need to add - is very easy, so will add in next (next) release. Main binaries you need are Make and wget along with tar and cp - all readily available in most linux distributions (I have never tried to get this to work on windows). The Makefile is easy enough to break down.. Think of it like a dependency tree.. To build the SPK I need the UI (so I copy it), the scripts, and the app package, so I build the app package which needs the wrappers and the record engine and use wget to download those, etc..
My main concern was #5. I come from a web development background so familiarity is with ubuntu and limited to CLI pull from git, deployments, etc, etc. so I thought this would be no problem to tackle for a quick update. I saw a video (https://www.youtube.com/watch?v=IjqGgBeNAlA) which looked like a GUI interface to create SPK's but couldn't find that anywhere. After trying a few ways online, including the docker spksrc install, I figured I would seek guidance.
That is a tool that person put together.. it didn't exist when I started, and just quick look it seems to add a few things to make URLs available from desktop etc..
I was hoping to get a step by step guide; from what to install and how to how to create the spk. installation and set up of the spk and HDHomeRun platform is not needed since its already running great. I appreciate your help but I wouldn't expect you to waste your time creating a detailed guide like that for users like me. Is it at least possible for you to upload the new spk's with the new software for us?
Thank you tons!
I normally do make them available quickly (sometimes before the changelog even comes out ;) - but am having issues with my push out from NAS. I have latest ready, but have been busy lately and not had a chance to go fix the upload.. Will look in to it tonite.

As to this SPK..
The makefile is the key as I mentioned https://github.com/Silicondust/dvr_inst ... y/Makefile
first creating the app package at line 51

Code: Select all

$(TMP_SPK_PATH)/$(TMP_PKG_NAME): $(TMP_BIN_PATH)/$(DVR_BIN) all_wrappers prep_dirs
	@cp -R etc $(TMP_PKG_PATH)
	@cp -R web $(TMP_PKG_PATH)
	@cp -R $(UI_IN_PATH)/* $(TMP_PKG_PATH)/web
	@tar cfz $(TMP_SPK_PATH)/package.tgz -C $(TMP_PKG_PATH) bin etc web
As you can see it doesn't do much, mostly copy and tar (with gzip).. and is dependent on 3 rules
  • $(TMP_BIN_PATH)/$(DVR_BIN)
  • all_wrappers
  • pre_dirs
First one pulls down the latest engine via wget (line 58) - uses wget and chmod binaries.
Second pulls down the latest wrappers (line 89) - uses wget and chmod binaries.
Last creates the necessary temporary folder structure (line 83) - uses mkdir binary

Once the app package is ready - then there is the SPK stage on line 43

Code: Select all

$(BUILD_OUT_PATH)/$(SPK_NAME): $(TMP_SPK_PATH)/$(TMP_PKG_NAME)
	@cp -R scripts $(TMP_SPK_PATH)
	@cp icons/* $(TMP_SPK_PATH)
	@cp INFO $(TMP_SPK_PATH)
	@echo "Building $(SPK_NAME)"
	@tar cf $(BUILD_OUT_PATH)/$(SPK_NAME) -C $(TMP_SPK_PATH) INFO PACKAGE_ICON_256.PNG PACKAGE_ICON.PNG package.tgz scripts
starts by copying the scripts, icons, and the INFO file.
scripts - these are what is run on installation, update, boot, removal
icons - you have to have a certain amount of different sizes, etc.
INFO - this is what contains the version number, the description, etc.
Then it creates the final tar (no gzip) file - the SPK.

So.. to create a new SPK it's really straight forward assuming you are on a linux system with make, tar, wget installed. (cp, chmod, mkdir should already be available)
  • clone from git (or git pull in root folder if previously cloned) https://github.com/Silicondust/dvr_install.git
  • cd to the synology folder
  • if you've run before.. 'make clean' will ensure we clean up previous
  • Modify the version number in the INFO file to your needs - suggest do something easily identifiable as yours
  • execute the 'make', and it will put the SPK in the build folder

demonrik
Posts: 1591
Joined: Mon May 04, 2015 10:03 am
Device ID: 108042A1, 10814D8E
x 38

Re: Synology SPK for DVR Record Engine

Post by demonrik »

Removed - see OP for correct version and link
Last edited by demonrik on Fri Oct 01, 2021 4:29 pm, edited 1 time in total.

MNOiSY
Posts: 90
Joined: Sun Oct 16, 2016 6:17 pm

Re: Synology SPK for DVR Record Engine

Post by MNOiSY »

demonrik wrote: Tue Jan 28, 2020 3:50 pm NEW PACKAGE AVAILABLE To move to new package - simply do manual install of new package

new SPK HDHomeRunDVR-0.8.1.spk available in the usual locationsGoogle Drive, DropBox, OneDrive

Code is available on github
https://github.com/Silicondust/dvr_install
Working perfectly so far! Thank you!!!!!

Post Reply