Raspberry Pi2 with a TSOP4838 IR Receiver to Raspberry Pi, connected to 3.3v, ground and Data to pin 18
PART 1 :
First install volumio 2.0.31 to get a lircd.conf and lircrc file using winscp
this is works perfectly for me >
u:volumio
p:volumio
sudo apt-get update
sudo apt-get install lirc
sudo nano /etc/lirc/hardware.conf
>>
LIRCD_ARGS="--uinput"
..........
DRIVER="default"
...........
DEVICE="/dev/lirc0"
...........
MODULES="lirc_rpi"
>>
sudo nano /boot/config.txt
>> dtoverlay=lirc-rpi,gpio_in_pin=18
ls /dev
You should see a list of /dev entries. Search for '/lirc0' entry. If you see it, you've got it. Now let's if it is working properly…
sudo modprobe lirc_rpi
mode2 -d /dev/lirc0
test some buttons ?
sudo /etc/init.d/lirc stop
irrecord -n -d /dev/lirc0 ~/lircd.conf
sudo mv ~/lircd.conf /etc/lirc/lircd.conf
sudo /etc/init.d/lirc start
irw
test some more buttons
sudo nano /etc/lirc/lircrc
>>
begin
prog = irexec
button = KEY_PLAY
config = mpc toggle
end
begin
prog = irexec
button = KEY_NEXT
config = mpc next
end
begin
prog = irexec
button = KEY_PREVIOUS
config = mpc prev
end
begin
prog = irexec
button = KEY_VOLUMEUP
config = mpc volume +5
repeat = 4
end
begin
prog = irexec
button = KEY_VOLUMEDOWN
config = mpc volume -5
repeat = 4
end
begin
prog = irexec
button = KEY_STOP
config = mpc toggle
end
begin
prog = irexec
button = KEY_FWD
config = mpc seek +00:00:15
repeat = 0
end
begin
prog = irexec
button = KEY_RWD
config = mpc seek -00:00:15
repeat = 0
end
begin
prog = irexec
button = KEY_SHUFFLE
config = mpc random
repeat = 0
end
>>
Make sure to get the lircd.conf and lircrc files using winscp !!
PART 2 :
user: root
password: rune
nano /boot/config.txt
find this uncomment the 2 lines
>>
dtoverlay=lirc-rpi
#dtparam=gpio_out_pin=17
dtparam=gpio_in_pin=18
#dtparam=gpio_in_pull=down
>>
nano /etc/conf.d/lircd.conf
>>
LIRCD_ARGS="--uinput"
DRIVER="default"
DEVICE="/dev/lirc0"
MODULES="lirc_rpi"
>>
systemctl reboot
copy volumio conf > here, overwrite if needed
/etc/lirc/lircd.conf.d/lirc.conf (updated 12/02/2017)
systemctl start lircd
irw
(you should see output like this if your lucky)
[root@runeaudio ~]# irw
000000037ff00be9 00 KEY_PLAY /home/volumio/lircd.conf
000000037ff00be5 00 KEY_NEXT /home/volumio/lircd.conf
000000037ff00be4 00 KEY_PREVIOUS /home/volumio/lircd.conf
000000037ff00bea 00 KEY_RWD /home/volumio/lircd.conf
000000037ff00beb 02 KEY_FWD /home/volumio/lircd.conf
000000037ff00bef 02 KEY_VOLUMEUP /home/volumio/lircd.conf
000000037ff00bee 00 KEY_VOLUMEDOWN /home/volumio/lircd.conf
000000037ff00bdb 04 KEY_SHUFFLE /home/volumio/lircd.conf
systemctl enable lircd
copy lircrc from volumio> here, again overwrite to /etc/conf.d/lircrc
nano /usr/lib/systemd/system/irexec.service
>>
[Unit]
Description=Start irexec daemon
Wants=lircd.service
After=network.target
[Service]
Type=simple
ExecStartPre=/usr/bin/sh -c "sleep 3"
ExecStart=/usr/bin/irexec /etc/conf.d/lircrc
[Install]
WantedBy=multi-user.target
>>
systemctl enable irexec.service