QNAP QPKG for DVR Record Engine

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

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

flexo wrote: Sat Apr 10, 2021 2:53 pm Every time I update the QNAP DVR engine past 0.10.7 I lose the Record Engine. Any solutions?
permissions most likely
make sure you check out the post for 1.0.0 viewtopic.php?p=361189#p361189
There are changes that you need to be aware of coming from old releases.

Mr.K
Posts: 10
Joined: Mon Mar 29, 2021 5:33 pm

Re: QNAP QPKG for DVR Record Engine

Post by Mr.K »

demonrik wrote: Tue Jul 07, 2020 10:38 pm NEW PACKAGE AVAILABLE
Big change here - apologies it took so long. Some good news and some bad.. And heads up - you will need to do work to upgrade

Main goal of this release has been to
(a) minimize the support headaches of permissions
(b) streamline the install process for better user experience, and minimize code
(c) remove/reduce duplication with SDs existing interfaces (i.e. recordings)
(d) refactor as much as possible to maximize reuse of scripts and code between the various NAS installers

So good news first
  • Have changed to be similar to the docker image I created and on starting the engine, the script now gets the latest record engine from SDs servers and runs that. This will mean once SD make available a new version of the record engine you will not need to wait for me to release a new QPKG. Just simply stop and start the engine and it will pick it up.
  • To also make it easier, I've added some parameters to the config file I manage for the engine that you can edit. You want to look at BetaEngine parameter, and set this to 1 and it will download from both the beta and the release URLs and then compare to see which is newer and use that.. if BetaEngine is set to anything but 1 it will only download the latest full release.
  • The QPKG now creates a 'hdhomerundvr' user to run the engine under. this user will be removed on uninstalling the package. You can change the user to run as by editing the config file once more and changing the 'RunAs' parameter to the username you want to run as.
  • The QPKG now creates a HDHomeRunDVR share by default and not a standard folder, and then adds the administrators and http groups to it, as well as the new user created above.
  • Installing and Removing the QPKG is logged to /tmp/hdhomerundvr_install.log which should help us understand when things go wrong
  • UI Page now opens direct to the dashboard
  • Since I've reduced the code/scripts considerably and rolling update means less need to do QPKG updates I am finally updating this to version 1.0.0
So now bad news, or things removed
  • Recordings management has been completely removed. This broke recently, and was hitting issues with permissions quite a bit. Also since the SD page for your record engine lists the recordings properly - is better to simply point you there.. and that is possible by clicking the first link for the record engine in the HDHR list in the dashboard.
  • Engine start/stop from the DVR Manager UI has been removed. Running in to permissions issues a lot, and some crazy thing happening on Synology directly was causing the wrappers to get out of whack with the UI.. You can start/stop the service for HDHomeRunDVR via the command line or the App Center anyway, so removing doesn't remove capability, just duplication and simplifies support.
  • Removed the log file management.. Since SD added the cleanup of the log files automatically by the record engine, this features wasn't needed and it cleans up the interface.
  • Wrappers are no longer needed and removed
  • IMPORTANT That change of user means you need to ensure the user has permissions to your existing recordings. Simply add the new user 'hdhomerundvr' to your recordpath share or change the RunAs user once upgraded and you should be good
To move to new package - simply do manual install of new package. But beware of the user/permissions thing above.

new QPKG HDHomeRunDVR-1.0.0.qpkg available in the usual locations Google Drive, DropBox, OneDrive

Code is available on github
https://github.com/Silicondust/dvr_install
S0, What file(s) to I need to install manually on my QNAP TS-251D?
HDHomeRunDVR_0.10.7.qpkg
HDHomeRunDVR_1.0.4.qpkg
HDHomeRunDVR_1.0.4.qpkg.md5
HDHomeRunDVR.conf
HDHomeRunDVR_0.10.7.qpkg.md5

I just uploaded 1.0.4.qpkg tomy Qnap. The Icon showed up on the Main Screen and the apps list. I clicked it and just said HDHomeRunDVR and that's it????

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

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

Mr.K wrote: Fri Apr 23, 2021 8:08 pm

S0, What file(s) to I need to install manually on my QNAP TS-251D?
HDHomeRunDVR_0.10.7.qpkg
HDHomeRunDVR_1.0.4.qpkg
HDHomeRunDVR_1.0.4.qpkg.md5
HDHomeRunDVR.conf
HDHomeRunDVR_0.10.7.qpkg.md5

I just uploaded 1.0.4.qpkg tomy Qnap. The Icon showed up on the Main Screen and the apps list. I clicked it and just said HDHomeRunDVR and that's it????
Just the 1.0.4.qpkg
The md5 hash is provided so I can check if something got corrupted in download, but otherwise not needed.
The older versions I keep in case I or others need to revert for some reason.

Anyway.. can u describe what u see a bit better?
Do you get a web page opened or just a plain dialog window?
Does my.hdhomerun.com contain an entry for your DVR?
Is there a log file in /share/HDHomeRunDVR ?

Mr.K
Posts: 10
Joined: Mon Mar 29, 2021 5:33 pm

Re: QNAP QPKG for DVR Record Engine

Post by Mr.K »

Your HDHomeRun products

HDHomeRun RECORD
Version 20210301

HDHomeRun CONNECT 4K 10812DA7
Version 20210224
66 Channels

Just get a plain blank dialog? window that says HDHomeRunDVR as the lable and whit screen.
I do show a shared folder in Privileges Name: HDHomeRunDVR Size: 1.57 MB Number of folders: 2 Number of files: 5

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

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

Mr.K wrote: Sun Apr 25, 2021 2:05 pm Your HDHomeRun products

HDHomeRun RECORD
Version 20210301
This is an old version. should be newer if you installed recently.. latest is 20210422, and before that was 20210404beta1
So something is possibly staying around from another install?!
Best method is to stop the app in 'App Center'
SSH as admin to the NAS and remove any temporary record engines with the command

Code: Select all

rm -f /tmp/hdhomerun*
Then start the app from the 'AppCenter' once more.
HDHomeRun CONNECT 4K 10812DA7
Version 20210224
66 Channels

Just get a plain blank dialog? window that says HDHomeRunDVR as the lable and whit screen.
the blank dialog is because you're clicking directly on the app's icon.
Below the icon is a blue bar with 'open' and a 'stretched V'
You can click on open to open to the UI.
You can click on the V to open the menu to stop and/or remove the application.
I do show a shared folder in Privileges Name: HDHomeRunDVR Size: 1.57 MB Number of folders: 2 Number of files: 5
Well sounds like it's working then :)
In that folder should be a .log file. It will have most of the info.
But to point above you seem to have some ghost engine running still to be resolved.

flexo
Posts: 16
Joined: Tue May 14, 2019 5:11 pm
Location: New York

Re: QNAP QPKG for DVR Record Engine

Post by flexo »

hi demonrik, thanks for your help with the hdhomerun user permissions. that fixed my issue! recently (today), after a QNAP firmware upgrade I lost the record engine. can you help me with that?

I installed the 0.10.7 version and got the record engine back, for now.

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

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

flexo wrote: Wed Apr 28, 2021 8:18 pm hi demonrik, thanks for your help with the hdhomerun user permissions. that fixed my issue! recently (today), after a QNAP firmware upgrade I lost the record engine. can you help me with that?

I installed the 0.10.7 version and got the record engine back, for now.
if it disappeared after the QNAP update it can be multiple reasons.
On execution of the scripts I log all decisions to /tmp/hdhomerundvr_install.log
If it all runs smoothly there isn't much reported, e.g.

Code: Select all

# cat /tmp/hdhomerundvr_install.log
 Downloading latest release
 Not checking for Beta versions using the Release version
 Downloading latest release
 Downloading latest beta
 Comparing which is newest
 Beta version is newer - selecting as record engine
Worth seeing if there is an error there, and/or from the command line execute the following

Code: Select all

 qpkg_service restart HDHomeRunDVR
and should get a readout of how it progresses, e.g.

Code: Select all

 # qpkg_service restart HDHomeRunDVR
HDHomeRun RECORD stopped
Checking HDHomeRunDVR is enabled
Validating the Config File is available and set up correctly
Config File exists and is writable - is record path and port correct
-- Installing the HDHomeRunDVR Record Engine
Lets remove any existing engine - we're going to take the latest always....
Checking it was deleted - if we can't remove it we can't update
Changing binary owner to hdhomerundvr
Starting the recordengine as hdhomerundvr
HDHomeRun RECORD started
On a NAS update there might be a few things that happen.
1. It might do a check of the drives on reboot which keeps them non-writable, so the download of the record engine fails - should see the error in the logs
2. I've seen sometimes where the permissions are delayed and same issue
3. There are so many checks and things loading the engine load just takes a long long time (I've seen 10mins)

My advice is to wait about 15mins after the reboot before panicking.
If it's not come up.. Try just restart from app center (stop and start), or command line as above.
If it still fails to come up...
Check that App Center is allowing apps without valid digital signature in the app center settings..
Check the Security Counselor rules and make sure 'Does QTS allow the installation of applications without a valid digital signature' is NOT CHECKED
Check permissions haven't changed somewhere

FWIW - I've had no issues with update to latest QNAP OS and running 1.0.4. so is something on your NAS.
I would recommend figuring out why 1.0.4 isn't running on your system rather than relying on 0.10.7

But at this point it might be worth taking out the sledgehammer and get you to a stable system. So my recommendation is to remove all knowledge of the previous installation and start again (saving existing recordings while we do it).
So - this should take about 10-20mins or so. (depends on your experience). Just take your time
  • SSH to the NAS as an Admin.. Select Q to get to a command line
  • From SSH Remove the QPKG with

    Code: Select all

    qpkg_cli -R HDHomeRunDVR
  • From SSH Create a temporary folder and move existing recordings to it (if you keep to same volume as existing RecordPath it will be quick), e.g.

    Code: Select all

    mkdir /share/CACHEDEV1_DATA/Public/SaveMe
    cp -R /share/Recordings/HDHomeRunDVR/* /share/CACHEDEV1_DATA/Public/SaveMe
  • From SSH clean out old record engine

    Code: Select all

    rm -f /tmp/hdhome* 
  • From SSH clean save file of record engine

    Code: Select all

    rm -f /share/CACHEDEV1_DATA/Public/SaveMe/hdhome* 
  • From SSH clean old logs files

    Code: Select all

    rm -f /share/CACHEDEV1_DATA/Public/SaveMe/*.log 
  • From QTS Desktop - remove the RecordingsPath folder and/or Share via Control Panel -> Shared Folders and/or FileStation.
  • From QTS Desktop - install the 1.0.4 QPKG via AppCenter
  • Verify Engine is running - open the UI, check my.hdhomerun.com
  • From SSH Restore the saved recordings to the new RecordPath

    Code: Select all

    cp -R /share/CACHEDEV1_DATA/Public/SaveMe/* /share/HDHomeRunDVR/
  • From SSH Fix ownership on recordings

    Code: Select all

    chown -R hdhomerundvr:administrators /share/CACHEDEV1_DATA/Public/SaveMe/*
  • From SSH Fix permissions on recordings

    Code: Select all

    chmod -R 774 hdhomerundvr:administrators /share/CACHEDEV1_DATA/Public/SaveMe/*

flexo
Posts: 16
Joined: Tue May 14, 2019 5:11 pm
Location: New York

Re: QNAP QPKG for DVR Record Engine

Post by flexo »

I checked this morning and the Record Engine is back. I never had this happen to me in the past and didn't give it enough time I guess... and it was getting late in the night to start troubleshooting. I am sorry you had to type so much!! Either way, thanks for getting back to me and offering all of those useful tips. You rock! :D

321liftoff
Posts: 145
Joined: Sat Apr 17, 2010 4:22 am
x 1

Re: QNAP QPKG for DVR Record Engine

Post by 321liftoff »

Hello @demonrik!

I'm getting this message in my log. It's been this way for a few days. Don't know when it started, but in logs going back to July 4, it's present:

Code: Select all

Recording: myhdhomerun_record authorization error or not subscribed to dvr service
Do you know what next step I could take here?

I've noticed that ALL my tasks are missing, except those that I guess I've added since this issue started. And nothing is actually recording.

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

Re: QNAP QPKG for DVR Record Engine

Post by NedS »

321liftoff wrote: Wed Jul 14, 2021 5:39 pm Hello @demonrik!

I'm getting this message in my log. It's been this way for a few days. Don't know when it started, but in logs going back to July 4, it's present:

Code: Select all

Recording: myhdhomerun_record authorization error or not subscribed to dvr service
Do you know what next step I could take here?

I've noticed that ALL my tasks are missing, except those that I guess I've added since this issue started. And nothing is actually recording.
It looks like your account got de-linked from your HDHomeRun units. Possibly someone clicked on the "Not me" link in the HDHomeRun app account settings. I've e-mailed you the activation link to fix it.

321liftoff
Posts: 145
Joined: Sat Apr 17, 2010 4:22 am
x 1

Re: QNAP QPKG for DVR Record Engine

Post by 321liftoff »

NedS wrote: Wed Jul 14, 2021 11:56 pm
321liftoff wrote: Wed Jul 14, 2021 5:39 pm Hello @demonrik!

I'm getting this message in my log. It's been this way for a few days. Don't know when it started, but in logs going back to July 4, it's present:

Code: Select all

Recording: myhdhomerun_record authorization error or not subscribed to dvr service
Do you know what next step I could take here?

I've noticed that ALL my tasks are missing, except those that I guess I've added since this issue started. And nothing is actually recording.
It looks like your account got de-linked from your HDHomeRun units. Possibly someone clicked on the "Not me" link in the HDHomeRun app account settings. I've e-mailed you the activation link to fix it.
That did it. Thank you for the fantastic support!

toricred6
Posts: 103
Joined: Sat Feb 15, 2020 8:59 am
x 2

Re: QNAP QPKG for DVR Record Engine

Post by toricred6 »

I'm trying to move from my Synology 920+ over to my new QNAP TS-932PX. I can't get the DVR record service to be recognized on the QNAP. It comes up with StorageID Not Set and DVR Version can't be determined. When I try to go to DVR Record it keeps going to the Synology? What am I doing wrong?

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

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

toricred6 wrote: Wed Aug 04, 2021 5:19 pm I'm trying to move from my Synology 920+ over to my new QNAP TS-932PX. I can't get the DVR record service to be recognized on the QNAP. It comes up with StorageID Not Set and DVR Version can't be determined. When I try to go to DVR Record it keeps going to the Synology? What am I doing wrong?
Sounds like a permissions issue on the QNAP.
If there is no storageID being written by the record engine, then it's having issues writing to the CONF file.
Which version did you install, and which QTS version do you have on the QNAP?
Did you already have a version installed on the QNAP before? or first time?

When you say I try to go DVR Record - what do you mean by going to synology?

toricred6
Posts: 103
Joined: Sat Feb 15, 2020 8:59 am
x 2

Re: QNAP QPKG for DVR Record Engine

Post by toricred6 »

So I installed version 1.0.4 of HDHR from your google drive. My QTS is 4.5.4.1741. I did not have a previous version on the QNAP.

When I pull up the web page for controlling HDHR and click on the first link under DVR Record it goes to my old Synology server instead. Is there a way I can change where it has the .conf file so that I can edit it more easily?

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

Re: QNAP QPKG for DVR Record Engine

Post by demonrik »

toricred6 wrote: Wed Aug 04, 2021 5:35 pm So I installed version 1.0.4 of HDHR from your google drive. My QTS is 4.5.4.1741. I did not have a previous version on the QNAP.

When I pull up the web page for controlling HDHR and click on the first link under DVR Record it goes to my old Synology server instead. Is there a way I can change where it has the .conf file so that I can edit it more easily?
ok - 1.0.4 should be right.
Just installed that update to my QNAP while our posts were ping ponging.. so will see if there is any issues I can see based on the QTS version.

By web page for controlling HDHR - what do you mean?
Do you mean my.hdhomerun.com?
If so then this page will show all running DVR recorders.. If there is an issue with the QNAP one running, it won't see it.
If you mean <ip>/HDHomeRunDVR - then make sure to use the IP of your QNAP NAS and not the Synology - the UI will only show the setting for each NAS.
fwiw - if running 2 NAS devices, be aware of how the DVR service works.. It will select the NAS with the most storage by default. If you wish to force it.. you can set the RecordStreamsMax to 0 on the NAS you do not want to record on - leaving the recording that are there, available for all clients to see

Post Reply