Page 1 of 1

LIrc to Relay

Posted: Mon Jun 17, 2013 1:55 pm
by momceras
Hi,

I was able to setup raspbian with lirc to control xbmc. Now I would like to control a rele on gpio using lirc. In that way I think I need some kind of TSR to trap the lirc event and set the bit of the GPIO.

Anyone was able to get this working ?
Any help ?

Re: LIrc to Relay

Posted: Mon Jun 17, 2013 2:09 pm
by DaveDriesen
Hi -- I don't think you would need to code a TSR for this.. ?

irexec is part of the lirc suite of tools and allows you to do exactly this.

Dave Driesen
Linux dev and oldskool elite

Re: LIrc to Relay

Posted: Mon Jun 17, 2013 2:40 pm
by momceras
Thank you,
I will try to learn about it.

Re: LIrc to Relay

Posted: Mon Jun 17, 2013 4:14 pm
by momceras
I'm trying to get working

created a file lircrc with

Code: Select all

begin
 prog = irexec
 button = PRG1
 config = sudo poweroff
end
I tryed

Code: Select all

irexec -n /etc/lirc/irexec
but have no answer from it

Any ideas ?

Re: LIrc to Relay

Posted: Mon Jun 17, 2013 6:27 pm
by momceras
Solved.

Saved file on /root/.lircrc

Thank you