[mythtv-users] Mythwelcome and ACPI wake up

fb517255 at skynet.be fb517255 at skynet.be
Thu Dec 20 12:12:14 UTC 2007


Gents,

Thank you all for the great support. As it working I will try to
document everything to help other users.

so first; these are the settings recommended by mythtv (see
http://www.mythtv.org/wiki/index.php/Mythwelcome)

1. Set wakeuptime command: mythshutdown --setwakeup $time
2. Server halt command: mythshutdown --shutdown

Now let's see what those commands are doing;

Command 1: checks if a wake-up time should be set, if yes it will write
to the mythdb the required wake-up fields and after that it will
executes the command mentioned under nvram-wakeup command with the
required time parameter in Unix time stamp.If you don't set those time
values in the DB, mythwelcome will never be able to know that it was a
scheduled wake-up.

In clear, mythshutdown --setwakeup $time executes nvram-wakeup command +
UnixTimeStamp.

Command 2: will check in mythwelcome if you have set a daily wakeup and
if yes it will check if it has to set this as wakeup time (depending on
recordings etc). If it has to set the wakeup time it will use again the
nvram wakeup command with the unixtimestamp. After timestamps are set it
will execute the command: Command to Shutdown.

In clear, mythshutdown --shutdown executes nvram-wakeup command
UnixTimeStamp + Command to shutdown.

If I explained everything correctly you should have found that the key
to make everything work is the script you put in nvram-wakeup command.

You can use the MythWakeSet script mentioned in the wiki for that.
I hope this is clear, if not don't hesitate to let me know.


PS: A good tip is to execute both command with the verbose switch. You
will set everything the command is trying to do.

regards,

Matthews


On Wed, 2007-11-14 at 23:27 +0000, Paul Harrison wrote:
> 
> fb517255 at skynet.be wrote:
> > even when I run it as mythtv user I got this output (verbose log)
> >
> > 2007-11-14 22:18:55.317 MSqlQuery: SELECT data FROM settings WHERE value
> > = 'MythShutdownNextScheduled' AND hostname IS NULL;
> > 2007-11-14 22:18:55.317 no recording time is set
> > 2007-11-14 22:18:55.317 no wake up time set and no scheduled program
> > 2007-11-14 22:18:55.324 MSqlQuery: DELETE FROM settings WHERE value =
> > 'MythShutdownWakeupTime';
> > 2007-11-14 22:18:55.325 MSqlQuery: INSERT INTO settings ( value, data )
> > VALUES ( 'MythShutdownWakeupTime', NULL );
> > 2007-11-14 22:18:55.326 MSqlQuery: SELECT data FROM settings WHERE value
> > = 'MythShutdownNvramRestartCmd' AND hostname = 'wsubu' ;
> > 2007-11-14 22:18:55.326 everything looks fine, shutting down ...
> > 2007-11-14 22:18:55.327 MSqlQuery: SELECT data FROM settings WHERE value
> > = 'MythShutdownPoweroff' AND hostname = 'wsubu' ;
> > 2007-11-14 22:18:55.327 ..
> > 2007-11-14 22:18:55.327 .
> > 2007-11-14 22:18:55.327 shutting down ...
> > QSqlQuery::exec: database not open
> > QSqlQuery::exec: database not open
> > mythshutdown: Could not initialize myth context. Exiting.
> > 2007-11-14 22:19:34.631 SSDPCache - Destructor
> > 2007-11-14 22:19:34.636 UPnpDeviceDesc - Destructor
> >
> >
> > At least we see that the value 'MythShutdownWakeupTime' is set correctly
> > in the verbose log but the system doesn't shutdown.
> >
> > I could write a script to execute the mythshutdown and then do a normal
> > shutdown command but this isn't really a cleanway to do it.
> >
> > Regards,
> >
> > Matthews
> >   
> 
> On the MythWelcome settings  page you should be using the normal  Power
> Off and Reboot comands and not be calling mythshutdown.
> 
> http://www.mythtv.org/wiki/index.php/Mythwelcome
> 
> Paul H.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users



More information about the mythtv-users mailing list