[mythtv-users] Automation query

Richard Morton richard.e.morton at gmail.com
Sat Feb 12 17:10:12 UTC 2011


On 12 February 2011 15:08, Ken Bass <kbass at kenbass.com> wrote:
> I am looking for some ideas on how to accomplish something.
>
> Occasionaly, my HD-PVR results in a 0 length recording.  When this
> happens, it seems the only way to recover it is to power cycle the HD-PVR.
>
> I just purchased a USB zwave transmitter and a zwave controlled power
> receptacle. This should allow me to cycle power a powerstrip with all my
> tuners/STB's under software control.
>
> What API / techniques are available that would allow me to determine
> that there are no recording currently being record on ANY/ALL my tuners.
>
> Is there a python method to determine this that I can use from a cron job?
> Would the event system allow this?
>
> I'm thinking have an cron job setup that would allow me to reset the
> powerstrip in the early morning, but only if nothing is recording on any
> of my 5 tuners.
>

You could install the mythtv-status application; on ubuntu it is in a
separate package
sudo apt-get install mythtv-status

/usr/bin/mythtv-status produces

MythTV status for localhost
===========================
Status..........: Sat 12 Feb 2011, 17:04
Total Disk Space: Total space is 1,349.3 GB, with 1,302.1 GB used (96.5%)

Encoders:
myth-server (1) - Idle
myth-server (2) - Idle
myth-server (3) - Idle
myth-server (4) - Idle
myth-server (5) - Idle
myth-server (6) - Idle

Scheduled Recordings:
2011-02-12 17:15:00 - Easy Virtue (BBC 2 Wales)
2011-02-12 17:20:00 - American Idol (ITV2)
2011-02-12 18:25:00 - American Idol (ITV2)
2011-02-12 21:00:00 - South Park (VIVA)
2011-02-12 21:30:00 - South Park (VIVA)
2011-02-12 22:00:00 - South Park (VIVA)
2011-02-12 22:00:00 - The Wire (BBC Radio 3)
2011-02-12 22:30:00 - South Park (VIVA)
2011-02-12 23:00:00 - Shaun of the Dead (ITV1 HD)
2011-02-12 23:35:00 - The Office (SKY THREE)

Disk Space:
Total space for group 1 is 1,349.3 GB, with 1,302.1 GB used (96.5%)

You can check that there are no tuners in use and nothing scheduled
for the next 10 minutes while it boots back up.

I trust this helps

R


More information about the mythtv-users mailing list