Hi Jens,
in current HG SD card you will find this code in /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.
snd-bcm2835
lirc_dev
lirc_rpi gpio_in_pin=18 gpio_out_pin=17
also the following file must be present in order to make HG work with lirc (that is usually auto-generated by HG):
pi@raspberrypi ~ $ sudo cat /root/.lircrc
begin
prog = homegenie
button = KEY_1
repeat = 3
config = KEY_1
end
As long as you keep IR input on GPIO18, HG IR receiving will work.
So IR input is going through GPIO18. But currently HG do not handle IR output so, the driver should be improved to support this.
It shouldn't be difficult.
The source code of HG lirc handler can be viewed here:
http://sourceforge.net/p/homegenie/code/HEAD/tree/trunk/MIG/MIG/Interfaces/Controllers/LircRemote.csWhat should be done there is to add HG interface command for sending IR codes in the function
...
public object InterfaceControl (MIGInterfaceCommand request)
{
...
switch (request.command) {
....
case "Remotes.IrSend":
// call lirc irsend by calling ShellCommand("irsend", "SEND_ONCE "" + request.GetOption(0) + " " + request.GetOption(1) + """);
// where request.GetOption(0) is the IrSend argument (eg. "mceusb/VolUp")
// see C# automation program example later on this message
break;
....
}
}
...
Then it will be possible using HG automation wizard scripting or c# program to control the lirc interface for sending ir codes, eg:
var lirc = Modules.InDomain("Controllers.LircRemote").WithName("IR");
lirc.Command("Remotes.IrSend").Execute("mceusb/VolUp");