DVR on FreeNAS not found - kjacques1

Help and support for HDHomeRun DVR and HDHomeRun software for Windows 10, Mac, Android, XBox, etc.
Post Reply
kjacques1
Posts: 5
Joined: Fri Dec 30, 2016 8:07 am

DVR on FreeNAS not found - kjacques1

Post by kjacques1 » Sat Apr 06, 2019 9:24 am

Hi,

I have set the DVR up in a Freenas Jail. Everything works great but sometimes if a reboot is done the DVR is no longer accessible. The status check command shows the DVR is running and the jail can ping out to my.hdhomerun.com. The only way I can solve the issue is to delete the storage id in the conf file and restart the DVR service. Am I missing something?

jasonl
Silicondust
Posts: 13828
Joined: Sun Oct 28, 2007 9:23 pm

Re: DVR on FreeNAS not found - kjacques1

Post by jasonl » Sun Apr 07, 2019 1:46 pm

What is the device ID for your HDHomeRun, and what was a date/time when this happened so we can check the logs and see what was occurring?

kjacques1
Posts: 5
Joined: Fri Dec 30, 2016 8:07 am

Re: Linux Setup (Advanced)

Post by kjacques1 » Wed Apr 17, 2019 5:18 pm

Hi,

I have installed the DVR in a FreeNas jail and scripted it to start at boot. After rebooting, I verified the service is running but none of my devices can watch TV or DVR. Just gives an configuration error when I try to view a channel and the only way I can get it to work is to delete the StorageID in the hdhomerun.conf file and restart the DVR service.

Below is the conf file:

RecordPath=/mnt/Raid/iocage/jails/HDHomerun/HDHomerunDVR/Recordings

StorageID=9f80038b-9cd9-d2cb-8f6b-0075473af957

End of conf file

Below is the startup script.

#!/bin/sh
#
# PROVIDE: hdhomerun_record
# KEYWORD: stop
#
# Add the following line to /etc/rc.conf[.local] to enable RECORD:
#
# hdhomerun_record_enable="YES"

. /etc/rc.subr<br>

name=hdhomerun_record
rcvar=hdhomerun_record_enable
config_file=/mnt/Raid/HDHomerunDVR/Recordings/hdhomerun.conf
load_rc_config $name

hdhomerun_record_enable=${hdhomerun_record_enable-"NO"}

command=/mnt/Raid/HDHomerunDVR/Recordings/hdhomerun_record
command_args="start foreground
--conf=/mnt/Raid/HDHomerunDVR/Recordings/hdhomerun.conf"

run_rc_command "$1"


load_rc_config $name

hdhomerun_record_enable=${hdhomerun_record_enable-"NO"}

End of startup script


Does anybody have an idea?

kjacques1
Posts: 5
Joined: Fri Dec 30, 2016 8:07 am

Re: DVR on FreeNAS not found - kjacques1

Post by kjacques1 » Wed Apr 17, 2019 6:04 pm

Two extends:

Device ID: 1054B903
Device ID: 10555D07

Rebooted the DVR today around 7:15 PM today.

jasonl
Silicondust
Posts: 13828
Joined: Sun Oct 28, 2007 9:23 pm

Re: DVR on FreeNAS not found - kjacques1

Post by jasonl » Thu Apr 18, 2019 10:41 am

(Post from other thread moved into this thread)

Here's what I see in the logs:
DVR restarted at 6:56, started without config file so it could not work. DVR restarted at 6:69, worked normally. DVR restarted at 7:15, worked normally. DVR restarted at 7:19, no config file so it could not work. DVR restarted at 7:22, worked normally.

What is the exact error you're getting in the HDHomeRun app? There is no indication of an error in the DVR. I do see you have a very old version of the DVR running on a Mac, which could be causing some issues. To get rid of that, on the Mac, open Terminal and run:

Code: Select all

sudo /Users/HDHomeRun/uninstall

kjacques1
Posts: 5
Joined: Fri Dec 30, 2016 8:07 am

Re: DVR on FreeNAS not found - kjacques1

Post by kjacques1 » Thu Apr 18, 2019 4:27 pm

Hmmm, I might have tested on my macbook a long time ago and forgot about it. The command sudo /Users/HDHomeRun/uninstall did nothing but I went ahead and removed the folder.

As for the freenas machine when the machine is done rebooting and I launch the HDHomerun APP, I get an unable to play channel error.

Just did a reboot a short time ago.

jasonl
Silicondust
Posts: 13828
Joined: Sun Oct 28, 2007 9:23 pm

Re: DVR on FreeNAS not found - kjacques1

Post by jasonl » Thu Apr 18, 2019 6:00 pm

Your startup script is weird. Try this as /usr/local/etc/rc.d/hdhomerun_record

Code: Select all

#!/bin/sh
#
# REQUIRE: NETWORKING FILESYSTEMS
# PROVIDE: hdhomerun_record
#

. /etc/rc.subr

name="hdhomerun_record"
desc="HDHomeRun DVR"
rcvar="${name}_enable"
start_cmd="${name}_start"
stop_cmd="${name}_stop"
command="/usr/local/bin/${name}"

hdhomerun_record_start()
{
	${command} start --conf ${hdhomerun_dvr_conf}
}

hdhomerun_record_stop()
{
	${command} stop
}

load_rc_config $name
run_rc_command "$1"
Then in your /usr/local/etc/rc.conf:

Code: Select all

hdhomerun_record_enable="YES"
hdhomerun_record_conf="/usr/local/etc/hdhomerun.conf"
And put the hdhomerun_record binary in /usr/local/bin and the config file in /usr/local/etc. They're put in the recording directory on NASes since a lot of them don't preserve the root filesystem across reboots, but there's no particular reason to do that on a proper OS.

kjacques1
Posts: 5
Joined: Fri Dec 30, 2016 8:07 am

Re: DVR on FreeNAS not found - kjacques1

Post by kjacques1 » Fri Apr 19, 2019 9:44 am

Is it correct to assume that this script needs to be placed in the FreeNas jail? My first crack at your script disappeared upon reboot.

jasonl
Silicondust
Posts: 13828
Joined: Sun Oct 28, 2007 9:23 pm

Re: DVR on FreeNAS not found - kjacques1

Post by jasonl » Sun Apr 21, 2019 12:26 pm

I've never used jail, so I'm not sure how that would work.

Post Reply