[mythtv-users] Before I tear my hair out can a slave BE...

Michael T. Dean mtdean at thirdcontact.com
Thu Feb 5 06:41:20 UTC 2009

On 02/04/2009 10:12 PM, glenhawk wrote:
> Chris Pinkham wrote:
>> * On Wed Feb 04, 2009 at 05:57:41PM -0800, Clay wrote:
>>> If the slave machine supports WOL (wake on lan) the master can wake up
>>> the slave... or, at least it says so in the docs. I haven't actually set it up.
>>> http://www.mythtv.org/wiki/Wake-on-LAN
>> I don't see where that page says the master can wakeup the slave
>> on demand which is what the OP is asking for.
>> I'm working on a patch to do just that.  I have tested it on my
>> dev system with a WOL slave but haven't run it in production yet.
>> I'm actually compiling and installing a new version on some of
>> my production systems tonight so I can do some more testing on this.
> thanks mate, reading between the lines you are saying that this feature does not yet exist (or perhaps as far as you know it doesn't exist)

Not to speak for Chris, but (speaking for Chris ;), he's saying it 
/definitely/ does not yet exist.  (The confusion was over the 
interpretation of the words on the wiki page, which to Clay implied that 
the master backend could wake the slave backend when required.  If the 
wiki page does, in fact, say so, the wiki page is wrong.)

>  and you are working to remedy this.

He is.  It will be in MythTV 0.22 at the soonest.

> That is the answer I was looking for, it will save me some valuable time otherwise spent trying to figure out how to set-up a non-existent feature ;-)

You could actually do it very easily with existing 0.21-fixes stuff...

Set a cron job on the master backend to run the attached script, say 
once per hour at 55 after.  Read the comments in the script and edit 
values of variables as required.  The script will output a nice message, 

$ ./wakeup_remote_backend
Found 2 conflicts within 60 minutes.  Waking remote MythTV backend.
Conflict - 2/5, 8:00 PM, WESH-DT, My Name Is Earl, Randy's List Item
Conflict - 2/5, 8:00 PM, WFTV-HD, Ugly Betty, Kissed Off
Sending magic packet to with 00:01:02:AA:BB:CC

in the event there are conflicts (meaning you need more tuners), but no 
message when there are no conflicts.  So, if you don't want the output 
in your syslogs and/or e-mail from cron, redirect it to /dev/null.

Make sure you run the script to test it out.  You will need the Perl 
bindings installed and configured (meaning you /must/ have a valid 
${HOME}/.mythtv/config.xml) and you'll need the 
myth_upcoming_recordings.pl script (which is in the 
contrib/misc_status_info directory of the source install).  It's also 
available at 

If you have more than 1 remote backend, you can stagger runs of the 
script where the first wakes up the first remote backend, then a few 
minutes later, the second script checks if more capture cards are 
required and then wakes the second remote backend, etc.

It's not pretty and Chris's approach is much better, but this will work 
until he gets it done.

Note that this script won't shut down the computer for you.  I think 
you'll need mythshutdown for that.  

Oh, and kudos for doing power-efficient the right way--turning off the 
computer when it's not in use.

Mike "Would it really be so bad if you pulled all your hair out" Dean
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: wakeup_remote_backend
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20090205/a527db45/attachment.txt>

More information about the mythtv-users mailing list