[mythtv-users] Sleep timer

Jason Livingston dergibjl2-nospam at yahoo.com
Wed Feb 25 11:29:39 EST 2004


The recent post about implementing dpms standby/on in lirc irexec gave
me an idea: implementing a sleep timer. I thought about this option
since one of the main drawbacks (for me) to using a non-TV device (ie
VGA monitor, etc) for TV display, is the lack of a sleep timer.

Would something like this work? (Sorry to ask, but I don't have any
remote working with lirc yet, and if this would work, it would
definitely be a reason to invest in one). My goal is to have a sleep
timer that turns off the video and audio after a certain time, set in
increments of 30 minutes.

begin 
prog = irexec 
button = [some unused button]
repeat = 5 
config = sleep 1800; xset dpms force standby; amixer set Master mute
config = sleep 3600; xset dpms force standby; amixer set Master mute
config = sleep 5400; xset dpms force standby; amixer set Master mute
config = sleep 7200; xset dpms force standby; amixer set Master mute
config = [do nothing]
end  

Also I'd have to modify the command for the OFF button to mute & unmute
the audio. 

begin 
prog = irexec 
button = OFF 
repeat = 2 
config = xset dpms force standby; amixer set Master mute 
config = xset dpms force on; xset -dpms s off; amixer set Master unmute
end 

(Yes, I realize that after the sleep timer has kicked in, you'd need to
hit the OFF button twice to turn it back on, any way around that?)

My only question is, when stepping through the different levels of the
timer, does each command line get executed immediately, or does lirc
wait until the button is released for the last time, and then execute
the correct line? Hmm, its something to think about. It won't work if
each command line was executed sequentially. Anyone want to try it and
tell me if it works? :)

Oh, and then I'd just need to add an indicator to the OSD to show the
sleep timer settings/minutes left... :)

Thanks :)
Jason



More information about the mythtv-users mailing list