[mythtv-users] Waiting for a HD HomeRun before starting the MythTV backend

Allen Edwards allen.p.edwards at gmail.com
Sat Feb 14 21:05:09 UTC 2009


On Sat, Feb 14, 2009 at 11:03 AM, Jay Summet <jay at summet.com> wrote:

> My mythtv box uses a SiliconDust HDHomeRun external network based tuner.
> Every so often (1 out of 5 boots) the network subsystem (or at least
> DHCP) does not get started up before the mythtv-backend daemon. This
> causes an error where the mythtv-backend does not find the tuner, so it
> can not record any shows.
> [I have my HDHomerun set up with an ethernet crossover cable directly
> plugged into the MythTv box, which is doing the DHCP setup of the
> HDHomerun directly, as opposed to having an external home router that
> does this. I suspect that this is the cause for the race condition.]
>
> To fix this problem, I created a script (wait_for_hdhr) that will wait
> for the HDHomerun device to be found on the network before it exits. I
> call this script from inside the /etc/init.d/mythtv-backend script just
> before it starts up the mythtv-backend.
>
> Now, about 1 out of 5 boots, instead of failing to connect to the tuner,
> my Ubuntu 8.04 based mythtv box will "pause" at the booting status bar
> for five to ten seconds. Then it drops to the text based boot-up
> messages and displays 8 to 12 "No HDHomeRun found yet…" messages before
> continuing with the bootup procedure after the network is initialized
> and the HDHomerun device is found.
>
> Jay
>
> The script:
>
> #!/bin/bash
> #
> # This script polls the network for an HD HomeRun device.
> # While no device is found, it prints a message and tries
> # again.
> #
> # when a device is found, it exits.
> #
> RESULT=`hdhomerun_config discover`
>
> #The -q option to grep suppresses output.
> while  echo "$RESULT" | grep -q "no"
> do
>  echo "No HDHomeRun found yet..."
>  sleep 1
>  #do it again
>  RESULT=`hdhomerun_config discover`
> done
>
> echo "$RESULT"
>


Change your IP to static and the problem goes away.  You probably have it
set to roaming and I am told that if you just change it away from roaming it
is OK but I didn't try that, I just set it to static.

Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20090214/8c552081/attachment-0001.htm>


More information about the mythtv-users mailing list