Hi, this is the story how I installed lirc and IR receiver to Volumio on Raspberry PI
IR Receiver from http://www.ebay.com/itm/260944290485?ru=http%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_sacat%3D0%26_from%3DR40%26_nkw%3D260944290485%26_rdc%3D1
First connect the TSOP4838 IR Receiver to Raspberry Pi like in the picture
Log in with ssh as:
user: pi
password: raspberry
sudo apt-get update
sudo apt-get install lirc
Now we need to configure lirc hardware:
sudo nano /etc/lirc/hardware.conf
β¦
LIRCD_ARGS="βuinput"
β¦
DRIVER=βdefaultβ
β¦
DEVICE="/dev/lirc0"
β¦
MODULES=βlirc_rpiβ
Now save all this ctrl+x and Y.
Now we need to learn lirc with IR commands:
sudo /etc/init.d/lirc stop
irrecord -n -d /dev/lirc0 ~/lircd.conf
#follow the instructions on the screen
#just learn a few button. Do the rest once everything is working.
#now copy this newly created conf file
sudo mv ~/lircd.conf /etc/lirc/lircd.conf
#start lirc
sudo /etc/init.d./lirc start
#now run irw to check everything
irw
#now press the button on the remote you just learned. The commands should appear on the screen
We need to create a file in /home/pi folder with the name .lircrc and put this in:
begin
prog = irexec
button = pause
config = mpc toggle
end
begin
prog = irexec
button = nextsong
config = mpc next;mpc play
end
begin
prog = irexec
button = prevsong
config = mpc prev;mpc play
end
begin
prog = irexec
button = stop
config = mpc stop
end
Again ctrl+x and Y to save this.
Next we need to run irexec as a background process:
irexec -d
Now we have to add irexec to rc.local to startup after every reboot:
sudo nano /etc/rc.local
and add this before exit 0:
(sleep 3;
sudo -u pi irexec -d
)&
and again save with ctrl+x and Y.
and reboot with sudo reboot. When the Pi is up again check dmesg for errors about lirc and lirc modules loaded lsmod
References : http://mightyohm.com/forum/viewtopic.php?f=2&t=3420#p5621