I captured infrared codes from an air conditioner remote to realize each code contains the entire state (i.e. temperature, mode, fan speed, etc.) every time a button is pressed. I believe this is so if one or more button press are missed the system remains in sync (ex.: hide the IR emitter and press the temp up a few times).
Now instead of capturing every possible combination by cycling through all the modes and options and pressing all the buttons one by one I thought it might be wiser to try to understand the logic behind managing the state myself.
Below are some codes captured in the same mode/fan speed. Only the temperature, on/off and louver function were triggered. I divided bits to isolate the groups I could identify.
- First group appears to be constant across and includes an init code showing as "2" (the constant sections below may contain other settings like mode/fan speed which were not captured)
- Second group is the power button (on-20/off-20 is the on/off button pressed at 20 degrees)
- Third group is constant
- Fourth group is the temperature truncated at 4 bits (and the bits are reversed - I am assuming endianess)
- Fifth group is constant
- Sixth group is the louver on/off (3 bits)
- Seventh group is constant
- Eighth group appears to be a checksum (not sure)
I think it should be trivial enough identifying each group but what I am not sure about is the last group which appears to be a checksum, but what kind of checksum, and a checksum of which group?
*FUNC********* *1***************************************** 2 *3*********** *4** *5***** *6* *7******************************** *8******
16: 2001110110010110010011011011111111111111111 0 1101100111111 0000 1111111 111 1111111111111111111111111111111111 00101101
17: 2001110110010110010011011011111111111111111 0 1101100111111 1000 1111111 111 1111111111111111111111111111111111 10101101
18: 2001110110010110010011011011111111111111111 0 1101100111111 0100 1111111 111 1111111111111111111111111111111111 01101101
19: 2001110110010110010011011011111111111111111 0 1101100111111 1100 1111111 111 1111111111111111111111111111111111 11101101
20: 2001110110010110010011011011111111111111111 0 1101100111111 0010 1111111 111 1111111111111111111111111111111111 00011101
21: 2001110110010110010011011011111111111111111 0 1101100111111 1010 1111111 111 1111111111111111111111111111111111 10011101
22: 2001110110010110010011011011111111111111111 0 1101100111111 0110 1111111 111 1111111111111111111111111111111111 01011101
23: 2001110110010110010011011011111111111111111 0 1101100111111 1110 1111111 111 1111111111111111111111111111111111 11011101
24: 2001110110010110010011011011111111111111111 0 1101100111111 0001 1111111 111 1111111111111111111111111111111111 00111101
25: 2001110110010110010011011011111111111111111 0 1101100111111 1001 1111111 111 1111111111111111111111111111111111 10111101
26: 2001110110010110010011011011111111111111111 0 1101100111111 0101 1111111 111 1111111111111111111111111111111111 01111101
27: 2001110110010110010011011011111111111111111 0 1101100111111 1101 1111111 111 1111111111111111111111111111111111 11111101
28: 2001110110010110010011011011111111111111111 0 1101100111111 0011 1111111 111 1111111111111111111111111111111111 00000011
29: 2001110110010110010011011011111111111111111 0 1101100111111 1011 1111111 111 1111111111111111111111111111111111 10000011
30: 2001110110010110010011011011111111111111111 0 1101100111111 0111 1111111 111 1111111111111111111111111111111111 01000011
ON-20: 2001110110010110010011011011111111111111111 0 1101100111111 0010 1111111 111 1111111111111111111111111111111111 00011101
OFF-20: 2001110110010110010011011011111111111111111 1 1101100111111 0010 1111111 111 1111111111111111111111111111111111 00111101
LOUVER-ON-20: 2001110110010110010011011011111111111111111 0 1101100111111 0010 1111111 000 1111111111111111111111111111111111 00000001
LOUVER-OFF-20: 2001110110010110010011011011111111111111111 0 1101100111111 0010 1111111 111 1111111111111111111111111111111111 00011101
2
.