hardware.json
To alter the default hardware usage of the daemon, a settings file can be created / edited. The default location of this file is /etc/pilight/hardware.json
. Some options are listed below:
{ "none": { } }
{ "433lirc": { "socket": "/dev/lirc0" } }
note1)
{ "433gpio": { "sender": 1, "receiver": 0 } }
Before you can use the lirc_rpi kernel module, you have to run the following command (for kernels with disabled “Device tree support”):
sudo modprobe lirc_rpi gpio_in_pin=18 gpio_out_pin=17
To make sure this is done every reboot, edit /etc/modules
and add the following line:
lirc_rpi gpio_in_pin=18 gpio_out_pin=17
If you have enabled “Device tree support” (since Raspbian with kernel 3.18 it's the default configuration), you have to add the following line to /boot/config.txt
:
dtoverlay=lirc-rpi,gpio_in_pin=18,gpio_out_pin=17
This will load the module lirc_rpi, so you don't have to add lirc_rpi
to /etc/modules
or run sudo modprobe lirc_rpi
.