[mythtv-users] Help Using Linksys router and OpenWRT to wakeup my Myth box

McNally mcnallychris at pobox.com
Mon Dec 11 13:26:05 UTC 2006

Glenn Harris wrote:
> On 12/3/06, McNally <mcnallychris at pobox.com> wrote:
>> I need some help / scripts to run on my router to receive the next
>> wakeup time from MythTV.
>> I flashed my Linksys WRT54G to run Linux/OpenWRT instead of the standard
>> Firmware. Adding WebIf  (browser UI) and wol and now I can wake up my
>> MythTv box using Wake-On-LAN. I've tested this by shutting down the Myth
>> Backed (Fedora Core 4) using the 'poweroff' command and I have been able
>> to start it by SSH shelling to my router and issuing the wol command to
>> start the Myth box and it works!
>> All of that was quite easy. I really want to be able to wake up the
>> MythBox and let it shutdown when it's not recording. What I assume I
>> need is some command that can be issued from the Myth box as part of its
>> "set wakeuptime command" which would schedule a cron job on my Router.
>> This command would tell the router to send the wol command at the
>> specified time. I assume someone on this list has written shell scripts
>> to do this. I don't have a clue where to start. The way I imagine it,
>> the myth "set wakeup time command" would have to start ssh, shell to the
>> router, and insert a cron job to wake up at the appointed time to run
>> the wol command.
>> I would appreciate any help with this and I will put up a wiki page for
>> everyone when I get it working.
>> Thanks!
>> Chris M.
> I was looking into this a couple of weeks ago.  There are some scripts
> that handle all of that in the main howto, section 11.5 [1].
> Basically it uses xinetd to run a shell script that sets up an 'at'
> job to run wakeup script at the specified time.  I got most of it
> working, up to the 'at' command.. which I could not find for openwrt.
> I figure the next step would be to either recompile 'at' for the
> linksys router or write a script to add an entry to crontab [2], then
> remove it.  But I haven't gotten that far yet.
> Oh, and make sure you are setting the time when the router is reset,
> using either rdate or ntp [3].
> Some useful links:
> 1 - waking master backend with wol:
> http://www.mythtv.org/docs/mythtv-HOWTO-11.html#ss11.5
> 2 - openwrt cron: http://wiki.openwrt.org/HowtoEnableCron
> 3 - openwrt time:
> http://wiki.openwrt.org/OpenWrtDocs/Configuration#head-4c50bab13524d13a4d33b3ccf41057eeacf6cd5f 
> Good luck!
> --Glenn

I've written up a howto for using the Linksys router and OpenWRT to wake 
up the Mythbackend with WOL.  Thanks to everyone for the help and 
especially to the wiki writers whose instructions I followed.  It's just 
thrown together so edit as you see fit of course.


More information about the mythtv-users mailing list