For my home automation project (using Hejmo), I’m using a remote made for Windows Media Center. I also have a Logitech Z-680 5.1 sound system, which I control using the LIRC « irsend » command. For all of this to work, here are the necessary steps…
First, I’ve installed LIRC:
$ sudo apt-get install lirc lirc-modules-source
This command asks for the remote model ; I couldn’t find mine in the list but I knew exactly which configuration file I needed, so I’ve simply answered « None ».
Next, I’ve modified the following files…
In /etc/lirc/hardware.conf, I’ve modified the following lines:
REMOTE="Windows Media Center Transceivers/Remotes (all)" REMOTE_MODULES="lirc_dev lirc_mceusb" REMOTE_DEVICE="/dev/lirc0" START_LIRCD="true"
I’ve replaced the /etc/lirc/lircd.conf file (which was empty) by the following:
#Configuration for the Windows Media Center Transceivers/Remotes (all) remote:
include "/usr/share/lirc/remotes/mceusb/lircd.conf.mceusb"
begin remote
name Logitech
bits 16
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100
header 9041 4412
one 604 1620
zero 604 494
ptrail 610
repeat 9042 2174
pre_data_bits 16
pre_data 0x10EF
gap 107692
toggle_bit_mask 0x0
begin codes
test 0xA05F
power 0x08F7
input 0x906F
effect 0xB847
settings 0xF807
sub+ 0xC03F
sub- 0x807F
center+ 0x40BF
center- 0x609F
surround+ 0x00FF
surround- 0x20DF
mute 0x6897
+ 0x58A7
- 0x708F
end codes
end remote
Then, I just needed to start LIRC:
sudo /etc/init.d/lircd start
Finally, to check everything went right, I’ve used the following commands:
- irw to check the remote reception (it displays the keys pressed on the remote)
- irsend SEND_ONCE Logitech power to check the Logitech Z-680 control (it controls the system power)
Catégorie : Home automation, in english...