tobitobsta wrote: 
> i used MythTV for a while but now using tvheadend.
You should be able to do this fairly easily as long as you have a way to
get the time for the next video recording in epochtime from tvheadend. 
The approach I would take would be to write a custom suspend script and
configure SrvrPowerCtrl to use that instead of the standard pm-suspend. 
In the script, get the time for the next recording (in epoch time) from
tvheadend.  Then compare this value with the wakealarm value that
SrvrPowerCtrl exposes via the CLI:

srvrpowerctrl getwakealarm

SrvrPowerCtrl will return something like:

wakealarm:1354093800

In a bash script, using netcat as the CLI communication tool, you could
do something like:


Code:
--------------------
    
  NEXT_RTC_ALARM=$(printf "srvrpowerctrl getwakealarm\nexit\n" | nc -w1 
127.0.0.1 9090 | sed -n -e 's/^.*%3A\([[:digit:]]*\).*$/\1/p')
  
--------------------


That gives you the epochtime value of the next SrvrPowerCtrl scheduled
system wake as an epochtime value that you can compare against the time
of your next recording.

If your next recording time is earlier, then call
/usr/local/sbin/spc-wakeup.sh yourself with the new recording time
value.

/usr/local/sbin/spc-wakeup.sh 1354093000


------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=48521

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to