[mythtv-users] HD-PVR killer and udev

John P Poet jppoet at gmail.com
Thu Oct 6 20:00:07 UTC 2011

Moving this to the users list, in case others want to comment.

On Thu, Oct 6, 2011 at 10:47 AM, Gavin Hurlbut <gjhurlbu at gmail.com> wrote:
> On Oct 6, 2011 8:50 AM, "John P Poet" <jppoet at gmail.com> wrote:
>> I assume you have udev rules setup so you know which HD-PVR you are
>> resetting?  Is it based off of which USB port the device is plugged
>> into, or do the devices have a unique ID?
> It uses the ftdi serial USB chip in gpio mode, so each device has a unique
> id associated with it.  The perl script maps from the mythtv cardid to the
> device id to reset.

Sounds like a good design.

> Currently, the script I have is hooked on the recording started system event (and on the recording ended -- in case we abort the recording, we don't need two power cycles).
> The script will check for 0 byte file, and if it stays 0 bytes for longer than 15s or something like that, and it's on an HDPVR, it will power cycle the HDPVR.

For some reason I assumed that the START_RECORDING event would not be
sent unless the recording was started successfully.  Given the way you
are using it, it is good that that event always gets triggered.

Are there perl bindings which would allow the script to "reactivate"
the recording?  For sports, or for shows that do not have a repeat
showing in the guide, I would want to reactivate the current
recording, after resetting the HD-PVR.  If it is too hard to determine
*when* the recording should be reactivated, I would be tempted to
always reactivate, but then also set the DUPLICATE flag, such that the
show was allowed to be re-recorded.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

More information about the mythtv-users mailing list