View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 7 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Mon Mar 31, 2008 6:29 pm 
Offline
Joined: Sun Feb 25, 2007 11:17 am
Posts: 5
Location: New Jersey, USA
First, thanks to all for the great writeups on ACPI Wakeup.
I have been attempting to get ACPI wakeup along with Mythshutdown/Mythwelcome working and I am almost there. My myth box will start itself based on the time set in /proc/acpi/alarm and will then shut itself down. BUT the time of the next scheduled recording is not getting set in /proc/acpi/alarm. In myth setup I have Shutdown/Wakeup options -> Set wakeuptime command to "sudo mythshutdown --setwakeup $time". Here, I believe, $time gets passed to the /usr/bin/setwakeup.sh shell script that is called by mythshutdown when it is used with the --setwakeup option. HOW DOES $time GET SET? I believe it should be based on the time of the next scheduled recording but how does this happen? Is there any way to test the value of $time is set?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2008 9:29 pm 
Offline
Joined: Sun Sep 04, 2005 7:48 pm
Posts: 264
Location: Perth, Australia
Gday ilmonstro,

From memory,
1) Mythwelcome asks for the status of the backend/frontend to determine if its time to shutdown
2) Once it determines that nothing is running, it uses the parameters you set in the backend to start the shutdown process

I believe that myth recognises the $TIME keyword and replaces it with funny seconds-since-1970..

The way i figured it out was to echo at each step of the setwakeup.sh to a file to see what was being passed...

I can post my setup if you like to see if theres any thing in there that can help... im at work, so cant do that for a few hours..

Let me know if theres anything i can assist with..

Cheers,

Nathan

_________________
LinHES: R6 | MB: Asus M3N-H/HDMI | CPU: AMD ??Mhz
Capture: 2xHDHR DVB-T
Graphics: Onboard 8300|PSU: Corsair vx450w
Cooling: Zalman cu?,
Display: Benq xx projector


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 1:23 am 
Offline
Joined: Mon Jun 21, 2004 5:28 am
Posts: 700
Location: Germany
One clarification. It is actually the backend that starts the whole process.

The backend calls mythshutdown --setwakeup $time when it is idle. Since the backend knows when it will need to record again, it knows the $time.

Mythshutdown converts this into seconds-since-1970 and calls its configured "nvram-wakeup command" (in your case, setwakeup.sh). Note that mythshutdown may modify the time if there is a daily wakeup period set.

As nmcaullay suggests, the easiest way to debug is to edit the "nvram-wakeup command" script with debug commands like "echo $time >> /tmp/debug.txt".

How are you shutting down the box? The only way this works is if the backend does the shutdown. Ex. If you exit the frontend to mythwelcome, see the "myth is shutting down in xxx seconds" countdown go to zero and then the box shuts down.

_________________
ASUS AT3N7A-I (Atom 330)
TBS 8922 PCI (DVB-S2)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 9:06 pm 
Offline
Joined: Sun Feb 25, 2007 11:17 am
Posts: 5
Location: New Jersey, USA
Good idea! I have annotated my script as suggested, the output follows:

Inputs --settime 1207130400
Current time -> Tue Apr 1 22:29:45 EDT 2008
Requested machine up by 2008-04-02 06:00:00 -0400
Will wake up at 2008-04-02 05:58:00 -0400
Sleep for 0 days 7:28:15

What is happening is the $time value 1207130400 in the case above is the Period 1 start time (which I have set to 06:00) on the MythWelcome Settings. Yet when I look at Upcoming Recordings, the next scheduled recording is 4/1 11:00 PM, therefore the value passed into the script should have been 1207105200 (which is 7 hours [25300 seconds] earlier than the value actually sent). Any thoughts or hints appreciated!

_________________
ASUS K8N-VM
Turion MT37
MSI NX7100GS-TD256E
Kingstom KVR400x64C3A
Haupauge 350 PVR


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 02, 2008 1:04 am 
Offline
Joined: Mon Jun 21, 2004 5:28 am
Posts: 700
Location: Germany
Hmmmm.... I've never had that problem. The times were always magically right for me.

You might try clearing the daily wakeups to see what you get.

The only other thing I can think of is that the backend isn't passing the time correctly to mythshutdown -setwakeup. In particular, check the time format in myth setup:
Code:
Wakeup time format:         yyyy-MM-ddThh:mm
Set wakeup time command:    sudo mythshutdown --setwakeup $time

_________________
ASUS AT3N7A-I (Atom 330)
TBS 8922 PCI (DVB-S2)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 26, 2008 10:44 pm 
Offline
Joined: Mon Mar 21, 2005 1:43 pm
Posts: 388
Location: Nanaimo BC
not trying to hijack the thread but I have a similar problem. My wake up time is getting set an hour later than it should. According to date my timezone is correct. I am assuming it has to do with daylight savings time but I do not know how to correct this, any suggestions?

Thanks

Craig


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 27, 2008 8:17 am 
Offline
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1530
Location: California
iscraigh wrote:
not trying to hijack the thread but I have a similar problem. My wake up time is getting set an hour later than it should. According to date my timezone is correct. I am assuming it has to do with daylight savings time but I do not know how to correct this, any suggestions?

Thanks

Craig


Craig, I've provide I response to this question on your original thread on this topic at http://mysettopbox.tv/phpBB2/viewtopic. ... 534#110534

Marc


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu