Mailing List Archive

Power off from remote
I got around to setting up wake-on-lan, and I have a widget on my
phone to easily turn on my frontend, but now I need a way to get my IR
remote to turn off the frontend. What's the best way to do this? Is
there an existing keybinding that can be used to immediately shut down
or suspend a front-end? Perhaps I could set it up as a keystroke
event handler, and have mythtv's lircrc create that keystroke.
Alternatively, I could do it outside of mythtv with irexec, but I
already run irexec on demand when I use mythgames, and running a
separate one with a separate config file just to shut down my machine
seems excessive if mythtv could already do it. I'm curious how other
people are handling this.

Thanks,
Joel
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Power off from remote [ In reply to ]
On 8/10/2012 01:11, Joel Ebel wrote:
> I already run irexec on demand when I use mythgames

That doesn't sound right. Do you mean irxevent?
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Power off from remote [ In reply to ]
Joel Ebel wrote:
> I got around to setting up wake-on-lan, and I have a widget on my
> phone to easily turn on my frontend, but now I need a way to get my IR
> remote to turn off the frontend. What's the best way to do this? Is
> there an existing keybinding that can be used to immediately shut down
> or suspend a front-end? Perhaps I could set it up as a keystroke
> event handler, and have mythtv's lircrc create that keystroke.
> Alternatively, I could do it outside of mythtv with irexec, but I
> already run irexec on demand when I use mythgames, and running a
> separate one with a separate config file just to shut down my machine
> seems excessive if mythtv could already do it. I'm curious how other
> people are handling this.


cat /home/mythtv/.lirc/irexec
# LIRCRC Auto Generated by Mythbuntu Lirc Generator
# Author(s): Mario Limonciello, Nick Fox, John Baab
# Created for use with Mythbuntu

begin
remote = mceusb
prog = irexec
button = Clear
config = /path/to/script1
repeat = 2
delay = 3
end

begin
remote = mceusb
prog = irexec
button = Power
config = /path/to/script2
repeat = 0
delay = 0
end
.
.
.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Power off from remote [ In reply to ]
On Fri, Aug 10, 2012 at 2:33 AM, Raymond Wagner <raymond@wagnerrp.com> wrote:
> On 8/10/2012 01:11, Joel Ebel wrote:
>>
>> I already run irexec on demand when I use mythgames
>
>
> That doesn't sound right. Do you mean irxevent?

I set it up over 5 years ago, so it may not be optimal, but I wrap
each emulator in a script which starts something like "irexec -d -n
sdlmame" and disables the screensaver. Then lircrc contains entries
like:

begin
prog = sdlmame
button = Exit
config = xmacroplay-keys :0 Escape
end

At the time irxevent wouldn't work with sdl applications like sdlmame.
I'll investigate if that has changed.

However, that's not really relevant to my question, which is: Is there
a simple and respected way to get mythtv to call it's HaltCommand or
some other shutdown command/script from an LIRC signal without using a
separate application?

Joel
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Power off from remote [ In reply to ]
On 08/10/2012 09:57 AM, Thomas Boehm wrote:
> Joel Ebel wrote:
>> I got around to setting up wake-on-lan, and I have a widget on my
>> phone to easily turn on my frontend, but now I need a way to get my IR
>> remote to turn off the frontend. What's the best way to do this? Is
>> there an existing keybinding that can be used to immediately shut down
>> or suspend a front-end? Perhaps I could set it up as a keystroke
>> event handler, and have mythtv's lircrc create that keystroke.
>> Alternatively, I could do it outside of mythtv with irexec, but I
>> already run irexec on demand when I use mythgames, and running a
>> separate one with a separate config file just to shut down my machine
>> seems excessive if mythtv could already do it. I'm curious how other
>> people are handling this.
>
>
> cat /home/mythtv/.lirc/irexec
> # LIRCRC Auto Generated by Mythbuntu Lirc Generator
> # Author(s): Mario Limonciello, Nick Fox, John Baab
> # Created for use with Mythbuntu
>
> begin
> remote = mceusb
> prog = irexec
> button = Clear
> config = /path/to/script1
> repeat = 2
> delay = 3
> end
>
> begin
> remote = mceusb
> prog = irexec
> button = Power
> config = /path/to/script2
> repeat = 0
> delay = 0
> end


You are partway there. This has been discussed before. You will need a
key on your remote to dedicate for this. You can use the same key to
toggle the frontend on and off. The scripts are given in this thread:

http://www.gossamer-threads.com/lists/mythtv/users/488979?search_string=newbury%20remote%20irexec;#488979


G


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Power off from remote [ In reply to ]
On Fri, Aug 10, 2012 at 12:13 PM, R. G. Newbury <newbury@mandamus.org> wrote:
> You are partway there. This has been discussed before. You will need a key
> on your remote to dedicate for this. You can use the same key to toggle the
> frontend on and off. The scripts are given in this thread:
>
> http://www.gossamer-threads.com/lists/mythtv/users/488979?search_string=newbury%20remote%20irexec;#488979

I understand how I would make irexec work, should that be the correct
solution. I was just hoping there was a keybinding I could use to
make mythtv do this without having to run a separate process. Since
there doesn't appear to be one, I think I'll experiment with a system
event handler for a keypress event before I go the irexec route,
unless someone is aware of a reason this is not the best solution.

Joel
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Power off from remote [ In reply to ]
On 10/08/2012 3:11 PM, Joel Ebel wrote:
> I got around to setting up wake-on-lan, and I have a widget on my
> phone to easily turn on my frontend, but now I need a way to get my IR
> remote to turn off the frontend. What's the best way to do this? Is
> there an existing keybinding that can be used to immediately shut down
> or suspend a front-end? Perhaps I could set it up as a keystroke
> event handler, and have mythtv's lircrc create that keystroke.
> Alternatively, I could do it outside of mythtv with irexec, but I
> already run irexec on demand when I use mythgames, and running a
> separate one with a separate config file just to shut down my machine
> seems excessive if mythtv could already do it. I'm curious how other
> people are handling this.
>
> Thanks,
> Joel
>
I use a script that automatically turns off the frontend after a
predefined time of inactivity. I use xscreensaver with a 5 min delay to
protect screen from burn in, and after the screen saver has been active
for 20 minutes, it shuts down the frontend cleanly, and powers off the
machine.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users