[mythtv-users] Script to keep DCT-6xxx boxes alive

Tom Greer trgreer at gmail.com
Thu Jun 28 22:05:20 UTC 2007


I've been using MythTV for a couple of years now.  I absolutely love
it.  My thanks to the developers.

In my home, I have four combo frontend/backend systems.  Three have
Motorola DCT-6xxx boxes attached.  The fourth is connected to an
HDHomeRun unit.

At this point, the system is pretty stable.  However, my most frequent
points of failure are the DCT boxes.  Every couple of days one of the
boxes just decides to stop responding.

Jim Westfall's firewire_tester program was a godsend.  Whenever one of
the boxes would go to sleep, one or two shots of firewire_tester would
bring it back to life.

I figured that a good way to keep the DCT boxes alive was to run
firewire_tester in cron.  The big problem was making sure Myth was not
already streaming from the box.

So I decided to write my first shell script to test whether the boxes
were already busy, and if not, then to execute firewire_tester.

I wanted one script that would run successfully on each of the three
boxes.  In addition, I wanted it to be robust enough to determine
which port connected to the DCT box (the assigned port may change on
reboot).

So the script, first gets the status report output in xml from the
master backend (in order to determine which tuner is connected to this
backend and whether it is busy).

Then it runs plugreport to determine whether which port is active.

Finally, it executes firewire_tester (if the tuner is not in use).

I am posting the script here because it may be of use to people who
are be experiencing the similar problems.  If you have your DCT boxes
daisy-chained or if your node is not always zero, then you will need
to tweak the script.  Otherwise, I believe it will work as it is for
you.

In addition, since this is my first shell script, I'd appreciate some
constructive feedback on form.

Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: keep_dct_alive.sh
Type: application/x-sh
Size: 975 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20070628/1ca32310/attachment.sh 


More information about the mythtv-users mailing list