LIRC Setup for Openhab2 on the pi


#1

Hi guys. Here are instructions for controlling IR appliances.

Materials:

IR LED (940nm)
IR receiver
Wires to connect the IR LED
Breadboard or Protoboard
Your openHAB setup

  1. Follow the instructions here to setup LIRC on your Raspberry Pi.
  2. In PaperUI, open the Bindings tab in extensions, and install the LIRC binding.
  3. SSH into your Pi.
  4. Open /etc/rc.local with an editor, and add
    killall lircd
    lircd --listen=9001
    before the line that says exit 0.
  5. In paperUI, add an item from the LIRC binding (manually).
    a. For the host, put localhost if you are using lirc on the openhab pi, or the other linux device’s hostname.
    b. For the port put 9001

If you have already added remotes with irrecord, then they should automatically show up. Here are a few of my LIRC configs which you can add to the end of lircd.conf in /etc/lirc

GE A/C Config
# this config file was automatically generated
# using lirc-0.9.0-pre1(emulation) on Sat Mar  2 14:09:22 2013
#
# contributed by Peter Li
#
# brand: GE
# model no. of remote control: 
# devices being controlled by this remote: All the GE wall mount air 
# conditioners look like they have very similar controls, so I would guess this 
# will work for all.  It will probably also work for the Heat/Cool wall models,
# other than the missing heat button, but I haven't tried that.
#

begin remote

    name  GE_AirConditioner
    bits           48
    flags SPACE_ENC
    eps            30
    aeps          100

    header       3388  1678
    one           430  1257
    zero          430   412
    ptrail        428
    gap          40991
    toggle_bit_mask 0x0

    begin codes
        on_stop                  0x555AF308598F
        cool                     0x555AF3081D8F
        fan                      0x555AF3085D8B
        tempup                   0x555AF308D987
        tempdown                 0x555AF308198B
        timeron                  0x555AF308D58B
        timeroff                 0x555AF308958F
        hi                       0x555AF308DD83
        mid                      0x555AF3083D8D
        low                      0x555AF308BD85
       sleep                    0x555AF3085583
    end codes

end remote


#2

This is awesome! Gotta give it a try sometime during summer. Also, will any IR LED work as long as it’s 940nm?


#3

Yes. It should work.