Synology SPK for DVR Record Engine

Downloads & Instructions
Post Reply
MNOiSY
Posts: 90
Joined: Sun Oct 16, 2016 6:17 pm

Re: Synology SPK for DVR Record Engine

Post by MNOiSY »

It's been a minute and honestly didn't even see that demonik stopped development. Now I feel bad for asking 😒

I will check out the docket install later this week! Is there a thread for it you recommend?

NedS
Silicondust
Posts: 3146
Joined: Mon Dec 10, 2018 12:38 pm
x 163

Re: Synology SPK for DVR Record Engine

Post by NedS »

MNOiSY wrote: Wed Mar 02, 2022 9:04 pm It's been a minute and honestly didn't even see that demonik stopped development. Now I feel bad for asking 😒

I will check out the docket install later this week! Is there a thread for it you recommend?
It's more like an evolution, it made sense to move the different NAS packages over to a single docker image :)

viewtopic.php?t=73757

IIRC, there's some complications with Synology units using ARM processors, but I'm in that boat (DS218j), so I'm about to find out tonight what is required to set it up.

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

Re: Synology SPK for DVR Record Engine

Post by MNOiSY »

HDHR support just replied that they are already working on an update as well.

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

Re: Synology SPK for DVR Record Engine

Post by MNOiSY »

After speaking with SD, I was able to get it working on the 1.1.1 package! The problem was actually MUCH simpler than we all thought.

The first good news is that a new package is already being developed by SD and will be an installable APK for Synology. I will excitedly hold my breath. They also shared the cause...
-------------------
The Synology 7.1 update disables running executable code from the /tmp/ directory, which is how the HDHomeRun DVR works. The HDHomeRun DVR binary is actually a combination of the DVR for all platforms, and the processor-specific version is extracted and launched from the tmp directory. This breaks how we package the DVR, but it is a good idea from a security perspective. We are in the process of creating a new 7.1-friendly package, that will also install like a normal Synology app and be much easier to update and control, and we hope to have that out soon.
----------------
In the meantime, you can temporarily change the tmp directory back to being executable, which will allow the DVR to run again. This isn't a long-term solution, as it will get reset when the Synology reboots.

SSH into your Diskstation and:

Code: Select all

sudo -i
mount -o remount,exec /tmp
cd /volume1/HDHomeRun/
./hdhomerun_record stop
./hdhomerun_record start
And voilà, DVR along with demoniks app is working again.

Zorg
Posts: 117
Joined: Tue Sep 04, 2018 10:56 am

Re: Synology SPK for DVR Record Engine

Post by Zorg »

MNOiSY wrote: Wed Mar 23, 2022 7:11 pm ...
In the meantime, you can temporarily change the tmp directory back to being executable, which will allow the DVR to run again. This isn't a long-term solution, as it will get reset when the Synology reboots.

SSH into your Diskstation and:

Code: Select all

sudo -i
mount -o remount,exec /tmp
cd /volume1/HDHomeRun/
./hdhomerun_record stop
./hdhomerun_record start
And voilà, DVR along with demoniks app is working again.
Great advice, and thank you for offering the workaround! This worked for me.

To get around the reset-at-boot /tmp permissions, I created a Synology task to re-run your script on boot as root. Seems to work. I get two output messages in the task log...
HDHomeRun RECORD not running
HDHomeRun RECORD started

Makes sense. It wouldn't be able to start at boot with /tmp reverted to no exec, then appears to be good. And clients can see & schedule recordings without needing to re-run anything.

Looking forward to native 7.1 compatibility, but this workaround works on DSM 7.1-42661 Update 1

jasonl
Silicondust
Posts: 16801
Joined: Sun Oct 28, 2007 9:23 pm
x 56

Re: Synology SPK for DVR Record Engine

Post by jasonl »

We're working through the packaging and signing requirements as well as getting our developer account set up with Synology in order to do official DVR packages for DSM 7+. Not exactly the easiest platform to package for.

karlh
Posts: 4
Joined: Fri Feb 24, 2017 2:14 pm
x 1

Re: Synology SPK for DVR Record Engine

Post by karlh »

impatiently waiting, it seams every time I update my DS216Play, some gets broke, or rendered useless, or features removed

bakerg
Posts: 13
Joined: Thu Feb 15, 2007 6:34 pm
Location: Midland

Re: Synology SPK for DVR Record Engine

Post by bakerg »

Nick, Any progress on this issue?

calavera24
Posts: 12
Joined: Mon Jan 04, 2021 11:51 am
x 2

Re: Synology SPK for DVR Record Engine

Post by calavera24 »

Well, it did work with DSM 7.1-42661 Update 1

It does not work anymore with Update 4.
It is just me, or the script does not work for others too?

PS: any new about an official DVR package, as reported in this thread? Thanks a lot!


Zorg wrote: Tue May 24, 2022 6:21 pm
MNOiSY wrote: Wed Mar 23, 2022 7:11 pm
To get around the reset-at-boot /tmp permissions, I created a Synology task to re-run your script on boot as root. Seems to work. I get two output messages in the task log...
HDHomeRun RECORD not running
HDHomeRun RECORD started

Makes sense. It wouldn't be able to start at boot with /tmp reverted to no exec, then appears to be good. And clients can see & schedule recordings without needing to re-run anything.

Looking forward to native 7.1 compatibility, but this workaround works on DSM 7.1-42661 Update 1

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

Re: Synology SPK for DVR Record Engine

Post by MNOiSY »

I haven't seen or heard any updates since SD communicated that to me.

Unfortunately, the delays seem fairly common when big software updates are promised, but the workaround is still functioning properly for me with the latest DSM update. I used the workaround I shared and created a task as Zorg suggested, and it is still working great.

signcarver
Expert
Posts: 11079
Joined: Wed Jan 24, 2007 1:04 am
Device ID: 10A05954 10802091 131B34B7 13231F92 1070A18E 1073ED6F 15300C36
x 35

Re: Synology SPK for DVR Record Engine

Post by signcarver »

calavera24 wrote: Mon Aug 22, 2022 1:44 pm Well, it did work with DSM 7.1-42661 Update 1

It does not work anymore with Update 4.
It is just me, or the script does not work for others too?

PS: any new about an official DVR package, as reported in this thread? Thanks a lot!
You have two options for synology (a 3rd if you consider docker on some systems) Either make /tmp exec or copy the "real" record engine out of /tmp and put it in a place that it can run from and run that.

As far as "official" package see viewtopic.php?p=384829#p384829 (SD was rejected for a developer account as synology seems to think they already offer such service but that doesn't really work in the US).

Beerman
Posts: 1642
Joined: Thu May 21, 2015 7:05 pm
x 5

Re: Synology SPK for DVR Record Engine

Post by Beerman »

"It unfortunately looks like we will not be able to officially support Synology NAS products. Unofficial operation as today remains possible."

Hopefully, an unofficial operation comes soon(ish)!

calavera24
Posts: 12
Joined: Mon Jan 04, 2021 11:51 am
x 2

Re: Synology SPK for DVR Record Engine

Post by calavera24 »

signcarver wrote: Mon Aug 22, 2022 2:25 pm
You have two options for synology (a 3rd if you consider docker on some systems) Either make /tmp exec or copy the "real" record engine out of /tmp and put it in a place that it can run from and run that.
[/quote]

Thank you very much for the info. Thus it should be something wrong on my side. What's weird is that it worked with update 1, following the instructions found on this forum, but then it didn't work anymore after update 4 (I did not change anything). What happens is that after sheduling, the recordings are saved on my Mac hard drive, rather than on the synology NAS. But the recording path is correct and points to the NAS.
I know I am asking a lot, but since not many of us are experts in using these commands (I am maybe the worst!), could you, or whoever is willing to do so, write down a sort of "tutorial" which explains, step by step, how to setup everything from scratch? I know I did it with update 1, but I guess I was just lucky, and now I am not able to make it work or to understand what's wrong.
Thanks anyway!

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 »

I also would like to see a new tutorial for those on DSM 7. My old Synology NAS blew up in a lightning storm and now with my new Synology I'm forced into DSM 7.

jasonl
Silicondust
Posts: 16801
Joined: Sun Oct 28, 2007 9:23 pm
x 56

Re: Synology SPK for DVR Record Engine

Post by jasonl »

calavera24 wrote: Tue Aug 23, 2022 3:22 am
signcarver wrote: Mon Aug 22, 2022 2:25 pm You have two options for synology (a 3rd if you consider docker on some systems) Either make /tmp exec or copy the "real" record engine out of /tmp and put it in a place that it can run from and run that.
Thank you very much for the info. Thus it should be something wrong on my side. What's weird is that it worked with update 1, following the instructions found on this forum, but then it didn't work anymore after update 4 (I did not change anything). What happens is that after sheduling, the recordings are saved on my Mac hard drive, rather than on the synology NAS. But the recording path is correct and points to the NAS.
I know I am asking a lot, but since not many of us are experts in using these commands (I am maybe the worst!), could you, or whoever is willing to do so, write down a sort of "tutorial" which explains, step by step, how to setup everything from scratch? I know I did it with update 1, but I guess I was just lucky, and now I am not able to make it work or to understand what's wrong.
Thanks anyway!
The logs indicate that the last time the DVR was started on the NAS (2022-08-21 22:43:11 UTC), the DVR did not have a config path specified, which usually means that either it was executed from a different directory and the config file path was not specified, or the config file was missing. If you run it as like /path/to/hdhomerun_record, you should add ' --conf /path/to/hdhomerun.conf' (without the quotes) to explicitly tell it where to find the conf file.

Post Reply