Saturday, March 2, 2013

LIRC RasPi remote control configuration for GE Air Conditioner

I set up lirc_rpi so that I can use my RaspberryPi as an infrared remote control. As detailed nicely here, the process has been much simplified, at least if you're on Raspbian. Note, as I commented there, you'll probably want to add --listen to your LIRC_ARGS in hardware.conf so that you can connect to the LIRC daemon from your home network. This allows you to send IR remote control signals out from the RasPi by connecting from any computer. There's also a nice Android app called Amote, probably there are good ones for iOS as well.

I found that our Samsung BN59-00857A remote worked fine with an existing lircd.conf configuration file for the BN59-00856A. (Actually the 00856 includes a few additional buttons not on the 00857; several of these work for controlling our TV even though they're not on our OEM remote!)

When it came to controlling our GE air conditioner, I didn't find any existing configuration file. The process of getting a working config file together was a little more involved than I expected, so I'm detailing it here and posting the resulting config (also sent it to the LIRC maintainers, but didn't hear anything back).

I knew from running mode2 that raw signals from the AC remote were being received correctly. But I wasn't able to get irrecord to pick up the AC remote signals even when forcing it into raw mode. It turns out that the GE AC remote has an unusually long code length, 48 bits, so maybe that was part of the issue. I'm also not clear on whether my irrecord was going into raw mode correctly; seemed to behave exactly like non-raw mode so maybe there's a problem with the version built for Raspbian?

Anyway, to get a config file, I had to pipe the mode2 raw data to text files and then manually pull the text into a raw conf file and filter out the "pulse" and "space" text (thanks vim). I confirmed that the resulting raw file works for controlling the AC through LIRC. Then I used irrecord -a to retroactively convert the raw codes into a more succinct config file. Looking at the various wall mount ACs GE sells, it seems likely to me that these codes will work for any unit since the controls all look the same. (If you have a heat+cool unit then you'll be missing the "heat" button since my AC doesn't have that.)

Hope it's useful. If you want the raw version of the conf file for some reason, just ping me for it.

# 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

Tuesday, January 15, 2013

CDC Infant Growth Curves in Google Docs/Drive Spreadsheet

I thought other parents, etc. might find this useful. I copied the CDC's 2000 Infant Growth Chart data (weight-for-age, length-for-age, head-circumference-for-age, weight-for-length) into a Google Docs/Drive Spreadsheet. I'll probably keep adding to this to give Imperial units and maybe put in charts.