2013-11-22, 08:00
Created /usr/bin/setwakeup.sh which contains:
#!/bin/sh
#$1 is the first argument to the script. It is the time in seconds since 1970
#this is defined in mythtv-setup with the time_t argument
echo 0 > /sys/class/rtc/rtc0/wakealarm #this clears your alarm.
echo $1 > /sys/class/rtc/rtc0/wakealarm #this writes your alarm
But when hibernate, it does not wake up.
Mythbackend.log shows:
Nov 22 14:46:41 MythTV mythbackend: mythbackend[2351]: N Scheduler scheduler.cpp:2934 (ShutdownServer) Running the command to set the next scheduled wakeup time :-#012#011#011#011#011#011#011/usr/bin/setwakeup.sh 1385108100
Nov 22 14:46:41 MythTV mythbackend: mythbackend[2351]: E Scheduler scheduler.cpp:2940 (ShutdownServer) SetWakeuptimeCommand failed, shutdown aborted
Nov 22 14:48:08 MythTV mythbackend: mythbackend[2351]: I ProcessRequest mainserver.cpp:1420 (HandleAnnounce) MainServer::ANN Monitor
I tried adding
xbmc ALL = NOPASSWD: /usr/bin/setwakeup.sh, /usr/sbin/pm-suspend
using sudo visudo
but it says it saved visudo.tmp (although I cannot see this file).
I updated the livetv settings in xbmc to include sudo setwakeup.sh
Thanks
#!/bin/sh
#$1 is the first argument to the script. It is the time in seconds since 1970
#this is defined in mythtv-setup with the time_t argument
echo 0 > /sys/class/rtc/rtc0/wakealarm #this clears your alarm.
echo $1 > /sys/class/rtc/rtc0/wakealarm #this writes your alarm
But when hibernate, it does not wake up.
Mythbackend.log shows:
Nov 22 14:46:41 MythTV mythbackend: mythbackend[2351]: N Scheduler scheduler.cpp:2934 (ShutdownServer) Running the command to set the next scheduled wakeup time :-#012#011#011#011#011#011#011/usr/bin/setwakeup.sh 1385108100
Nov 22 14:46:41 MythTV mythbackend: mythbackend[2351]: E Scheduler scheduler.cpp:2940 (ShutdownServer) SetWakeuptimeCommand failed, shutdown aborted
Nov 22 14:48:08 MythTV mythbackend: mythbackend[2351]: I ProcessRequest mainserver.cpp:1420 (HandleAnnounce) MainServer::ANN Monitor
I tried adding
xbmc ALL = NOPASSWD: /usr/bin/setwakeup.sh, /usr/sbin/pm-suspend
using sudo visudo
but it says it saved visudo.tmp (although I cannot see this file).
I updated the livetv settings in xbmc to include sudo setwakeup.sh
Thanks