Wakeup before recording

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
diverseft Offline
Member
Posts: 86
Joined: Feb 2012
Reputation: 0
Post: #1
Hi All

I'm not sure if this should be placed in Mac OS X, PVR or TVHeadend forum but I think its more generic mac script related.

Since setting up the PVR side of things recently I would really like to get "Wakeup before recording" up and running so I can have the box sleeping until a recording is due.

My setup:

OSX: 10.8.2
XBMC: Frodo 12.2
Mac Mini - 2012
TVBackend - TVHeadend (on Synology)

http://wiki.xbmc.org/index.php?title=Settings/Live_TV - I have set the wakeup time to 10 minutes. In theory do I just need to create appropriate script: /usr/bin/setwakeup.sh ? I cant find any examples for OS X but I did find this for linux by a guy called Frank-NL - http://forum.xbmc.org/showthread.php?tid=155128

Code:
#!/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

Has anyone had any success getting this up and running in OS X?
find quote
diverseft Offline
Member
Posts: 86
Joined: Feb 2012
Reputation: 0
Post: #2
Maybe this is better placed in the PVR forum? If so would someone mind moving please

many thanks
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 21,152
Joined: Jan 2011
Reputation: 276
Location: Arizona, USA
Post: #3
I'm not exactly sure, but this might be a lead:
https://developer.apple.com/library/mac/...set.1.html

Under "SCHEDULED EVENT ARGUMENTS"

They also give an example:

Code:
pmset schedule wake "07/04/09 20:00:00"

You can make easy links to the XBMC wiki using double brackets around common XBMC words: [[debug log]] = debug log, [[Video library]] = Video library, [[SMB]] = SMB , [[userdata]] = userdata, etc
find quote
diverseft Offline
Member
Posts: 86
Joined: Feb 2012
Reputation: 0
Post: #4
Ned - Thank you very much for looking into that. Will have to get my thinking cap on tonight and see how this fits in with scheduled recordings. I'm surprised no other OS X users have tried to get this up and running

Thanks again
find quote
diverseft Offline
Member
Posts: 86
Joined: Feb 2012
Reputation: 0
Post: #5
Struggling with this. pmset schedule wake "07/04/09 20:00:00" certainly works. What I cant figure out is how to pass the correct time to the command and also how to run pmset without sudo. There are no examples of this I can find anywhere for OS X.
find quote