momceras
Posts: 11
Joined: Sun Mar 31, 2013 2:52 pm

LIrc to Relay

Mon Jun 17, 2013 1:55 pm

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 ?

User avatar
DaveDriesen
Posts: 113
Joined: Sun Mar 31, 2013 8:28 pm
Location: Top of the food chain
Contact: Website

Re: LIrc to Relay

Mon Jun 17, 2013 2:09 pm

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

momceras
Posts: 11
Joined: Sun Mar 31, 2013 2:52 pm

Re: LIrc to Relay

Mon Jun 17, 2013 2:40 pm

Thank you,
I will try to learn about it.

momceras
Posts: 11
Joined: Sun Mar 31, 2013 2:52 pm

Re: LIrc to Relay

Mon Jun 17, 2013 4:14 pm

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 ?

momceras
Posts: 11
Joined: Sun Mar 31, 2013 2:52 pm

Re: LIrc to Relay

Mon Jun 17, 2013 6:27 pm

Solved.

Saved file on /root/.lircrc

Thank you

Return to “Automation, sensing and robotics”