[mythtv-users] Sleep mythfrontend from remote

Tim Draper veehexx at zoho.com
Tue Jan 20 17:16:40 UTC 2015



---- On Tue, 20 Jan 2015 16:42:32 +0000 Josu Lazkano  wrote ---- 
>Hello list, 
> 
>I have a frontend in the bedroom and I want to configure to shutdown 
>in a certain time (30/60/90 minutes). Maybe a bash script executed 
>with a remote key. 
> 
>Anyone got it? 
> 
>Regards. 
> 
>-- 
>Josu Lazkano 

not anything exact, but my lirc script to run an external program is this:

---
sudo nano ~/.lirc/mythtv
	begin
	remote = mceusb
	prog = irexec
	button = KEY_POWER
	config = sudo pm-suspend
	end
---

edit the 'button' and 'config' lines appropriately.
irw and irexec could come in useful here if your unsure.
/etc/sudoers file has the @mythtv group to allow no password prompt for certain commands.

Im not sure if linux 'sleep' command has a max value, but you could simply do 'config = sleep 1800' for 30mins (60sec * 30min = 1800sec), that would do it.
if getting fancy is your thing, you could use 1 button which runs a script, which changes value every launch between 0 and 3. 0 off, 1 is 30min, 2 is 60min, 3 is 90min. script would then set the sleep duration and could also use a gui overlay notify to prompt you what your set to.



More information about the mythtv-users mailing list