Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoding Panasonic A/C problem #525

Closed
pandemixxx opened this issue Sep 25, 2018 · 32 comments
Closed

Decoding Panasonic A/C problem #525

pandemixxx opened this issue Sep 25, 2018 · 32 comments
Assignees
Labels
enhancement Hacktoberfest Hacktoberfest participation more info

Comments

@pandemixxx
Copy link

pandemixxx commented Sep 25, 2018

Hi, I'm currently trying to sniff Panasonic AC signal with IRrecvDumpV2 and here's what I'm getting

Timestamp : 000099.145
Encoding  : UNKNOWN
Code      : 40B6FE46 (220 bits)
Not Mitsu AC.
Library   : v2.5.0

Raw Timing[439]:
   +  3582, -  1686,    +   488, -   378,    +   488, -  1238,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   384,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -  1242,    +   486, -   378, 
   +   488, -   384,    +   488, -   378,    +   488, -   378,    +   488, -   380, 
   +   486, -   382,    +   484, -   382,    +   484, -  1264,    +   464, -  1266, 
   +   460, -  1272,    +   462, -   378,    +   488, -   406,    +   460, -  1266, 
   +   462, -   380,    +   488, -   382,    +   484, -   388,    +   478, -   406, 
   +   462, -   410,    +   462, -   404,    +   462, -   406,    +   462, -   396, 
   +   470, -   406,    +   462, -   404,    +   462, -   406,    +   460, -   404, 
   +   462, -   410,    +   462, -   404,    +   462, -   404,    +   462, -   406, 
   +   464, -   406,    +   462, -   404,    +   462, -   406,    +   462, -   404, 
   +   462, -   410,    +   462, -   404,    +   462, -   406,    +   462, -   404, 
   +   462, -   404,    +   462, -   404,    +   462, -   406,    +   460, -   406, 
   +   462, -   410,    +   462, -   404,    +   462, -  1264,    +   484, -  1244, 
   +   486, -   382,    +   482, -   382,    +   486, -   382,    +   486, -   378, 
   +   486, -   382,    +   488, -  9924,    +  3554, -  1686,    +   488, -   378, 
   +   490, -  1240,    +   486, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   382,    +   484, -   386,    +   486, -   378, 
   +   488, -   382,    +   486, -   378,    +   488, -   382,    +   486, -   382, 
   +   484, -  1242,    +   486, -   380,    +   488, -   386,    +   484, -   382, 
   +   486, -   380,    +   486, -   382,    +   486, -   380,    +   486, -   380, 
   +   486, -  1242,    +   486, -  1242,    +   484, -  1248,    +   484, -   380, 
   +   488, -   382,    +   484, -  1242,    +   486, -   382,    +   484, -   382, 
   +   484, -   382,    +   484, -   382,    +   486, -   386,    +   484, -   382, 
   +   486, -   382,    +   484, -   382,    +   486, -   382,    +   486, -   380, 
   +   484, -   382,    +   486, -   382,    +   488, -   380,    +   486, -   382, 
   +   484, -   380,    +   462, -   406,    +   488, -   376,    +   484, -  1246, 
   +   482, -  1246,    +   460, -   404,    +   480, -   392,    +   484, -   386, 
   +   482, -  1244,    +   484, -   382,    +   484, -   382,    +   484, -  1242, 
   +   482, -  1244,    +   484, -   382,    +   464, -   410,    +   460, -   404, 
   +   462, -   406,    +   462, -   404,    +   462, -   404,    +   470, -   396, 
   +   462, -   406,    +   462, -   404,    +   462, -  1286,    +   460, -  1268, 
   +   458, -  1268,    +   460, -  1266,    +   460, -  1266,    +   460, -   406, 
   +   460, -  1266,    +   462, -   406,    +   460, -  1272,    +   462, -   406, 
   +   460, -   406,    +   460, -   406,    +   460, -   406,    +   462, -   404, 
   +   462, -   406,    +   460, -   406,    +   462, -   410,    +   462, -   404, 
   +   462, -   406,    +   460, -   406,    +   460, -   406,    +   462, -   404, 
   +   462, -   406,    +   460, -   406,    +   460, -   410,    +   462, -   406, 
   +   460, -  1268,    +   460, -  1266,    +   460, -   404,    +   460, -   406, 
   +   462, -   406,    +   460, -   406,    +   460, -   412,    +   456, -   410, 
   +   460, -   410,    +   438, -   428,    +   460, -   410,    +   456, -   410, 
   +   456, -  1272,    +   436, -  1288,    +   438, -   434,    +   438, -   428, 
   +   438, -   428,    +   438, -   428,    +   438, -   428,    +   438, -   428, 
   +   438, -   428,    +   438, -   428,    +   438, -   434,    +   438, -   428, 
   +   438, -   428,    +   438, -   428,    +   438, -   428,    +   438, -   428, 
   +   440, -   428,    +   438, -   428,    +   438, -   432,    +   438, -   428, 
   +   438, -   428,    +   438, -   428,    +   438, -   428,    +   438, -   428, 
   +   438, -   428,    +   438, -   430,    +   438, -  1294,    +   438, -   428, 
   +   438, -   428,    +   438, -   428,    +   438, -   428,    +   438, -   428, 
   +   438, -   428,    +   438, -   428,    +   438, -   434,    +   438, -   428, 
   +   438, -  1288,    +   438, -  1290,    +   438, -   428,    +   438, -   428, 
   +   438, -   428,    +   438, -   428,    +   438, -   432,    +   438, -  1288, 
   +   438, -  1290,    +   438, -   430,    +   438, -   428,    +   438, -   428, 
   +   438, -   428,    +   438, -   428,    +   438, -  1292,    +   438

uint16_t rawData[439] = {3582, 1686,  488, 378,  488, 1238,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 384,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 1242,  486, 378,  488, 384,  488, 378,  488, 378,  488, 380,  486, 382,  484, 382,  484, 1264,  464, 1266,  460, 1272,  462, 378,  488, 406,  460, 1266,  462, 380,  488, 382,  484, 388,  478, 406,  462, 410,  462, 404,  462, 406,  462, 396,  470, 406,  462, 404,  462, 406,  460, 404,  462, 410,  462, 404,  462, 404,  462, 406,  464, 406,  462, 404,  462, 406,  462, 404,  462, 410,  462, 404,  462, 406,  462, 404,  462, 404,  462, 404,  462, 406,  460, 406,  462, 410,  462, 404,  462, 1264,  484, 1244,  486, 382,  482, 382,  486, 382,  486, 378,  486, 382,  488, 9924,  3554, 1686,  488, 378,  490, 1240,  486, 378,  488, 378,  488, 378,  488, 378,  488, 382,  484, 386,  486, 378,  488, 382,  486, 378,  488, 382,  486, 382,  484, 1242,  486, 380,  488, 386,  484, 382,  486, 380,  486, 382,  486, 380,  486, 380,  486, 1242,  486, 1242,  484, 1248,  484, 380,  488, 382,  484, 1242,  486, 382,  484, 382,  484, 382,  484, 382,  486, 386,  484, 382,  486, 382,  484, 382,  486, 382,  486, 380,  484, 382,  486, 382,  488, 380,  486, 382,  484, 380,  462, 406,  488, 376,  484, 1246,  482, 1246,  460, 404,  480, 392,  484, 386,  482, 1244,  484, 382,  484, 382,  484, 1242,  482, 1244,  484, 382,  464, 410,  460, 404,  462, 406,  462, 404,  462, 404,  470, 396,  462, 406,  462, 404,  462, 1286,  460, 1268,  458, 1268,  460, 1266,  460, 1266,  460, 406,  460, 1266,  462, 406,  460, 1272,  462, 406,  460, 406,  460, 406,  460, 406,  462, 404,  462, 406,  460, 406,  462, 410,  462, 404,  462, 406,  460, 406,  460, 406,  462, 404,  462, 406,  460, 406,  460, 410,  462, 406,  460, 1268,  460, 1266,  460, 404,  460, 406,  462, 406,  460, 406,  460, 412,  456, 410,  460, 410,  438, 428,  460, 410,  456, 410,  456, 1272,  436, 1288,  438, 434,  438, 428,  438, 428,  438, 428,  438, 428,  438, 428,  438, 428,  438, 428,  438, 434,  438, 428,  438, 428,  438, 428,  438, 428,  438, 428,  440, 428,  438, 428,  438, 432,  438, 428,  438, 428,  438, 428,  438, 428,  438, 428,  438, 428,  438, 430,  438, 1294,  438, 428,  438, 428,  438, 428,  438, 428,  438, 428,  438, 428,  438, 428,  438, 434,  438, 428,  438, 1288,  438, 1290,  438, 428,  438, 428,  438, 428,  438, 428,  438, 432,  438, 1288,  438, 1290,  438, 430,  438, 428,  438, 428,  438, 428,  438, 428,  438, 1292,  438};  // UNKNOWN 40B6FE46

I'm not sure if Panasonic library included and how can I use this data, is there anything different should be done with Panasonic IR signal?

@crankyoldgit
Copy link
Owner

In short, the library (as of 2.5.0) does not support Panasonic A/C messages. i.e. No special send/decode functions for that protocol you captured. You will have to use the sendRaw() method until it does. (see the example code for how)

Longer answer:
I ran the rawData you supplied through the analyse script. The results are below.
It looks like it has two sections of data. 8 bytes + 19 bytes (total of 27 bytes/216 bits)
Some of those bytes may be redundant, as 0x4004 is a standard preamble for the Panasonic protocol. I'll need some more data (samples) to be sure.
In theory, it should be fairly easy to add basic decoding and sending support, but if you want detailed decoding and construction of messages (i.e. setting temps/modes/etc), you will need to do a lot of leg work (analysis) after the basic stuff is done.

IRremoteESP8266/tools$ ./auto_analyse_raw_data.py -f /tmp/issue_525 
Found 439 timing entries.
Potential Mark Candidates:
[3582, 490]
Potential Space Candidates:
[9924, 1686, 1294, 434]

Guessing encoding type:
Looks like it uses space encoding. Yay!

Guessing key value:
kHdrMark   = 3568
kHdrSpace  = 1686
kBitMark   = 465
kOneSpace  = 1262
kZeroSpace = 401
kSpaceGap = 9924

Decoding protocol based on analysis so far:

kHdrMark+kHdrSpace+0100000000000100000001110010000000000000000000000000000001100000GAP(9924)
  Bits: 64
  Hex:  0x4004072000000060 (MSB first)
        0x0600000004E02002 (LSB first)
  Dec:  4612819752354578528 (MSB first)
        432345564309364738 (LSB first)
  Bin:  0b0100000000000100000001110010000000000000000000000000000001100000 (MSB first)
        0b0000011000000000000000000000000000000100111000000010000000000010 (LSB first)
kHdrMark+kHdrSpace+01000000000001000000011100100000000000000000110001001100000000011111010100000000000000000110000000000110000000000000000000000001000000000110000011000001
  Bits: 152
  Hex:  0x40040720000C4C01F5000060060000010060C1 (MSB first)
        0x83060080000060060000AF8032300004E02002 (LSB first)
  Dec:  1427598566361800644592691388272474788781383873 (MSB first)
        2921920464864293261250805234523445123210027010 (LSB first)
  Bin:  0b01000000000001000000011100100000000000000000110001001100000000011111010100000000000000000110000000000110000000000000000000000001000000000110000011000001 (MSB first)
        0b10000011000001100000000010000000000000000000000001100000000001100000000000000000101011111000000000110010001100000000000000000100111000000010000000000010 (LSB first)

Total Nr. of suspected bits: 216

@pandemixxx
Copy link
Author

Thank you for quick response. I'll handle it with raw data then to make it work faster.

But if any further testing or additional data needed for adding this protocol, will be happy to contribute.

@crankyoldgit
Copy link
Owner

crankyoldgit commented Sep 26, 2018

Cool. For starters. Some samples like you gave but with full descriptions of what is on the remote (i.e. it's state: Power on, cool mode, temp 25, fan auto, sleep off, ...). Several of those., plus some power on and off signals.
Sometimes the power on/off/fan swing etc are different structures, so a few of those will confirm if the single example you provided is typical or not.

@huexpub
Copy link

huexpub commented Sep 27, 2018

maybe Transformation from https://github.com/ToniA/ESPEasy/tree/HeatpumpIR/lib/HeatpumpIR for panasonic ac?

@crankyoldgit
Copy link
Owner

crankyoldgit commented Sep 28, 2018

Nice find. It looks like it might be the same protocol that was supplied. i.e. Correct structure of 8 + 19 = 27 bytes Can you confirm if that HeatpumpIR software works for your device?

crankyoldgit added a commit that referenced this issue Sep 29, 2018
* sendPanasonicAC(), decodePanasonicAC(), & IRPanasonicAc class added.
* Unit tests for those.
* Code HEAVILY influenced by the work done at:
  https://github.com/ToniA/ESPEasy/blob/HeatpumpIR/lib/HeatpumpIR/PanasonicHeatpumpIR.cpp
* Should support LKE/DKE/JKE/NKE series units.
* Updated example code as required.

Ref: #525
@crankyoldgit crankyoldgit self-assigned this Sep 29, 2018
@crankyoldgit
Copy link
Owner

@pandemixxx Can you please test the panasonic_ac branch? It should work as it seems to decode the rawData you provided.

Hat tip to @huexpub for the suggestion of code to look at. That helped immensely.

@pandemixxx
Copy link
Author

Wow guys, this is actually beyond amazing
Power on:

Timestamp : 000013.108
Encoding  : PANASONIC_AC
Code      : 0220E004000000060220E00400402A80310000066000008000060D (216 bits)
Mesg Desc.: Model: 4 (JKE), Power: Off, Mode: 4 (HEAT), Temp: 21C, Fan: 0 (MIN), Swing (Vertical): 1 (Full Up), Quiet: Off, Powerful: Off
Library   : v2.5.0

Raw Timing[439]:
   +  3576, -  1710,    +   464, -   402,    +   464, -  1262,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   402,    +   464, -   402, 
   +   464, -   408,    +   464, -   402,    +   464, -   402,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -  1262,    +   464, -   402, 
   +   464, -   406,    +   464, -   402,    +   466, -   402,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -  1264,    +   462, -  1262, 
   +   464, -  1268,    +   462, -   404,    +   462, -   402,    +   464, -  1264, 
   +   464, -   402,    +   464, -   402,    +   464, -   402,    +   464, -   402, 
   +   464, -   406,    +   464, -   402,    +   466, -   402,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   402,    +   464, -   402, 
   +   464, -   406,    +   464, -   402,    +   464, -   402,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   402,    +   464, -   402, 
   +   466, -   406,    +   464, -   402,    +   464, -   402,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   402,    +   464, -   402, 
   +   464, -   408,    +   464, -   402,    +   464, -  1266,    +   462, -  1262, 
   +   464, -   402,    +   464, -   402,    +   464, -   402,    +   464, -   402, 
   +   464, -   406,    +   462, -  9946,    +  3528, -  1710,    +   464, -   402, 
   +   464, -  1264,    +   464, -   404,    +   462, -   402,    +   464, -   402, 
   +   466, -   402,    +   464, -   402,    +   464, -   408,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   402,    +   464, -   404, 
   +   462, -  1264,    +   464, -   402,    +   464, -   406,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   402,    +   464, -   402, 
   +   464, -  1266,    +   460, -  1264,    +   464, -  1268,    +   464, -   402, 
   +   464, -   402,    +   464, -  1262,    +   464, -   402,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   408,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   402,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   408,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   402,    +   464, -   402, 
   +   464, -   404,    +   460, -  1266,    +   462, -   408,    +   464, -   402, 
   +   464, -  1264,    +   464, -   402,    +   464, -  1264,    +   464, -   402, 
   +   464, -  1264,    +   464, -   402,    +   464, -   406,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   402,    +   464, -   402, 
   +   464, -   402,    +   464, -   404,    +   464, -  1284,    +   460, -  1264, 
   +   462, -   404,    +   464, -   402,    +   464, -   402,    +   464, -  1266, 
   +   460, -  1264,    +   464, -   402,    +   464, -   406,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   404,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   408,    +   462, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   402,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   406,    +   464, -   404, 
   +   464, -  1264,    +   462, -  1264,    +   464, -   402,    +   464, -   404, 
   +   464, -   402,    +   464, -   402,    +   464, -   410,    +   462, -   402, 
   +   464, -   404,    +   462, -   402,    +   464, -   404,    +   464, -   402, 
   +   464, -  1266,    +   460, -  1264,    +   462, -   408,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   406,    +   460, -   406, 
   +   460, -   402,    +   464, -   402,    +   464, -   412,    +   460, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   402,    +   464, -   404, 
   +   462, -   402,    +   464, -   402,    +   464, -   410,    +   460, -   408, 
   +   460, -   406,    +   460, -   406,    +   462, -   402,    +   464, -   406, 
   +   460, -   406,    +   460, -   402,    +   464, -  1270,    +   462, -   402, 
   +   464, -   402,    +   464, -   404,    +   462, -   402,    +   464, -   404, 
   +   464, -   402,    +   464, -   404,    +   462, -   410,    +   462, -   402, 
   +   464, -  1264,    +   462, -  1264,    +   462, -   402,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   410,    +   460, -  1266, 
   +   462, -   402,    +   464, -  1266,    +   458, -  1266,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   406,    +   462

uint16_t rawData[439] = {3576, 1710,  464, 402,  464, 1262,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 408,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 1262,  464, 402,  464, 406,  464, 402,  466, 402,  464, 402,  464, 402,  464, 402,  464, 1264,  462, 1262,  464, 1268,  462, 404,  462, 402,  464, 1264,  464, 402,  464, 402,  464, 402,  464, 402,  464, 406,  464, 402,  466, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 406,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  466, 406,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 408,  464, 402,  464, 1266,  462, 1262,  464, 402,  464, 402,  464, 402,  464, 402,  464, 406,  462, 9946,  3528, 1710,  464, 402,  464, 1264,  464, 404,  462, 402,  464, 402,  466, 402,  464, 402,  464, 408,  464, 402,  464, 402,  464, 402,  464, 402,  464, 404,  462, 1264,  464, 402,  464, 406,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 1266,  460, 1264,  464, 1268,  464, 402,  464, 402,  464, 1262,  464, 402,  464, 402,  464, 402,  464, 402,  464, 408,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 408,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 404,  460, 1266,  462, 408,  464, 402,  464, 1264,  464, 402,  464, 1264,  464, 402,  464, 1264,  464, 402,  464, 406,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 404,  464, 1284,  460, 1264,  462, 404,  464, 402,  464, 402,  464, 1266,  460, 1264,  464, 402,  464, 406,  464, 402,  464, 402,  464, 402,  464, 404,  464, 402,  464, 402,  464, 402,  464, 408,  462, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 406,  464, 404,  464, 1264,  462, 1264,  464, 402,  464, 404,  464, 402,  464, 402,  464, 410,  462, 402,  464, 404,  462, 402,  464, 404,  464, 402,  464, 1266,  460, 1264,  462, 408,  464, 402,  464, 402,  464, 402,  464, 406,  460, 406,  460, 402,  464, 402,  464, 412,  460, 402,  464, 402,  464, 402,  464, 402,  464, 404,  462, 402,  464, 402,  464, 410,  460, 408,  460, 406,  460, 406,  462, 402,  464, 406,  460, 406,  460, 402,  464, 1270,  462, 402,  464, 402,  464, 404,  462, 402,  464, 404,  464, 402,  464, 404,  462, 410,  462, 402,  464, 1264,  462, 1264,  462, 402,  464, 402,  464, 402,  464, 402,  464, 410,  460, 1266,  462, 402,  464, 1266,  458, 1266,  464, 402,  464, 402,  464, 402,  464, 406,  462};  // PANASONIC_AC
uint8_t state[27] = {0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, 0x20, 0xE0, 0x04, 0x00, 0x40, 0x2A, 0x80, 0x31, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x80, 0x00, 0x06, 0x0D};

Temperature Up:

Timestamp : 000123.643
Encoding  : PANASONIC_AC
Code      : 0220E004000000060220E00400402C80310000066000008000060F (216 bits)
Mesg Desc.: Model: 4 (JKE), Power: Off, Mode: 4 (HEAT), Temp: 22C, Fan: 0 (MIN), Swing (Vertical): 1 (Full Up), Quiet: Off, Powerful: Off
Library   : v2.5.0

Raw Timing[439]:
   +  3598, -  1666,    +   506, -   360,    +   488, -  1240,    +   486, -   376, 
   +   490, -   376,    +   490, -   378,    +   488, -   378,    +   488, -   378, 
   +   490, -   382,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -  1238,    +   488, -   378, 
   +   488, -   384,    +   486, -   378,    +   488, -   378,    +   488, -   380, 
   +   486, -   380,    +   488, -   378,    +   488, -  1238,    +   488, -  1240, 
   +   486, -  1246,    +   486, -   378,    +   488, -   378,    +   488, -  1240, 
   +   488, -   380,    +   486, -   380,    +   486, -   378,    +   488, -   378, 
   +   488, -   382,    +   490, -   378,    +   488, -   380,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   382,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   490, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   490, -   382,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   382,    +   488, -   378,    +   488, -  1240,    +   488, -  1240, 
   +   486, -   380,    +   486, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   382,    +   486, -  9920,    +  3552, -  1686,    +   486, -   380, 
   +   488, -  1240,    +   486, -   380,    +   486, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   380,    +   488, -   382,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   380,    +   488, -   378, 
   +   488, -  1238,    +   488, -   380,    +   486, -   384,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -  1240,    +   488, -  1240,    +   486, -  1246,    +   486, -   378, 
   +   488, -   378,    +   488, -  1240,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   384,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   380,    +   488, -   378,    +   488, -   384,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -  1238,    +   488, -   384,    +   488, -   378, 
   +   488, -   378,    +   488, -  1238,    +   488, -  1240,    +   486, -   378, 
   +   488, -  1240,    +   486, -   380,    +   486, -   384,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -  1258,    +   490, -  1240, 
   +   486, -   378,    +   488, -   380,    +   486, -   378,    +   488, -  1240, 
   +   486, -  1242,    +   486, -   378,    +   488, -   382,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   384,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   384,    +   488, -   378, 
   +   488, -  1244,    +   484, -  1240,    +   488, -   380,    +   486, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   384,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   380, 
   +   484, -  1240,    +   488, -  1240,    +   486, -   384,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   386,    +   484, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   380,    +   488, -   384,    +   488, -   380, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -  1248,    +   484, -   380, 
   +   488, -   380,    +   488, -   378,    +   488, -   378,    +   488, -   380, 
   +   488, -   378,    +   488, -   378,    +   488, -   408,    +   464, -   378, 
   +   488, -  1240,    +   488, -  1240,    +   486, -   378,    +   488, -   380, 
   +   486, -   380,    +   488, -   378,    +   488, -   384,    +   488, -  1240, 
   +   488, -  1240,    +   486, -  1240,    +   486, -  1240,    +   486, -   380, 
   +   486, -   380,    +   488, -   378,    +   486, -   384,    +   486

uint16_t rawData[439] = {3598, 1666,  506, 360,  488, 1240,  486, 376,  490, 376,  490, 378,  488, 378,  488, 378,  490, 382,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 1238,  488, 378,  488, 384,  486, 378,  488, 378,  488, 380,  486, 380,  488, 378,  488, 1238,  488, 1240,  486, 1246,  486, 378,  488, 378,  488, 1240,  488, 380,  486, 380,  486, 378,  488, 378,  488, 382,  490, 378,  488, 380,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 382,  488, 378,  488, 378,  488, 378,  490, 378,  488, 378,  488, 378,  488, 378,  490, 382,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 382,  488, 378,  488, 1240,  488, 1240,  486, 380,  486, 378,  488, 378,  488, 378,  488, 382,  486, 9920,  3552, 1686,  486, 380,  488, 1240,  486, 380,  486, 378,  488, 378,  488, 378,  488, 380,  488, 382,  488, 378,  488, 378,  488, 378,  488, 380,  488, 378,  488, 1238,  488, 380,  486, 384,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 1240,  488, 1240,  486, 1246,  486, 378,  488, 378,  488, 1240,  488, 378,  488, 378,  488, 378,  488, 378,  488, 384,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 380,  488, 378,  488, 384,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 1238,  488, 384,  488, 378,  488, 378,  488, 1238,  488, 1240,  486, 378,  488, 1240,  486, 380,  486, 384,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 1258,  490, 1240,  486, 378,  488, 380,  486, 378,  488, 1240,  486, 1242,  486, 378,  488, 382,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 384,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 384,  488, 378,  488, 1244,  484, 1240,  488, 380,  486, 378,  488, 378,  488, 378,  488, 384,  488, 378,  488, 378,  488, 378,  488, 378,  488, 380,  484, 1240,  488, 1240,  486, 384,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 386,  484, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 380,  488, 384,  488, 380,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 1248,  484, 380,  488, 380,  488, 378,  488, 378,  488, 380,  488, 378,  488, 378,  488, 408,  464, 378,  488, 1240,  488, 1240,  486, 378,  488, 380,  486, 380,  488, 378,  488, 384,  488, 1240,  488, 1240,  486, 1240,  486, 1240,  486, 380,  486, 380,  488, 378,  486, 384,  486};  // PANASONIC_AC
uint8_t state[27] = {0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, 0x20, 0xE0, 0x04, 0x00, 0x40, 0x2C, 0x80, 0x31, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x80, 0x00, 0x06, 0x0F};

Air Swing:

Timestamp : 000167.300
Encoding  : PANASONIC_AC
Code      : 0220E004000000060220E00400402C803200000660000080000610 (216 bits)
Mesg Desc.: Model: 4 (JKE), Power: Off, Mode: 4 (HEAT), Temp: 22C, Fan: 0 (MIN), Swing (Vertical): 2, Quiet: Off, Powerful: Off
Library   : v2.5.0

Raw Timing[439]:
   +  3584, -  1682,    +   488, -   374,    +   492, -  1238,    +   488, -   376, 
   +   492, -   374,    +   492, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   382,    +   490, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   490, -   378,    +   488, -  1238,    +   488, -   378, 
   +   488, -   392,    +   480, -   378,    +   488, -   378,    +   492, -   374, 
   +   488, -   378,    +   488, -   378,    +   490, -  1260,    +   466, -  1240, 
   +   486, -  1244,    +   488, -   378,    +   488, -   378,    +   488, -  1240, 
   +   488, -   378,    +   488, -   378,    +   488, -   402,    +   464, -   402, 
   +   464, -   406,    +   466, -   396,    +   472, -   400,    +   466, -   402, 
   +   466, -   402,    +   464, -   402,    +   464, -   402,    +   466, -   402, 
   +   464, -   406,    +   464, -   404,    +   462, -   406,    +   462, -   402, 
   +   466, -   400,    +   466, -   378,    +   488, -   402,    +   464, -   402, 
   +   464, -   410,    +   460, -   402,    +   466, -   402,    +   464, -   402, 
   +   464, -   402,    +   464, -   402,    +   464, -   404,    +   462, -   402, 
   +   464, -   410,    +   462, -   402,    +   462, -  1266,    +   462, -  1264, 
   +   462, -   402,    +   464, -   404,    +   460, -   406,    +   440, -   426, 
   +   460, -   410,    +   438, -  9970,    +  3506, -  1734,    +   440, -   424, 
   +   440, -  1286,    +   440, -   426,    +   440, -   426,    +   440, -   426, 
   +   440, -   426,    +   440, -   426,    +   440, -   434,    +   438, -   426, 
   +   440, -   428,    +   438, -   426,    +   440, -   428,    +   438, -   428, 
   +   438, -  1290,    +   438, -   426,    +   440, -   434,    +   438, -   430, 
   +   438, -   428,    +   438, -   428,    +   438, -   430,    +   438, -   428, 
   +   438, -  1286,    +   440, -  1286,    +   440, -  1292,    +   440, -   426, 
   +   440, -   426,    +   440, -  1288,    +   440, -   426,    +   440, -   426, 
   +   440, -   430,    +   436, -   426,    +   440, -   434,    +   438, -   428, 
   +   438, -   428,    +   438, -   428,    +   438, -   428,    +   438, -   428, 
   +   438, -   426,    +   440, -   428,    +   438, -   432,    +   438, -   428, 
   +   438, -   430,    +   438, -   428,    +   438, -   428,    +   438, -   428, 
   +   438, -   428,    +   438, -  1290,    +   436, -   434,    +   436, -   430, 
   +   438, -   426,    +   440, -  1290,    +   436, -  1288,    +   440, -   426, 
   +   440, -  1286,    +   442, -   424,    +   440, -   434,    +   438, -   426, 
   +   440, -   428,    +   438, -   428,    +   438, -   428,    +   454, -   410, 
   +   440, -   426,    +   440, -   428,    +   458, -  1286,    +   466, -   402, 
   +   458, -  1272,    +   460, -   406,    +   458, -   406,    +   460, -  1266, 
   +   460, -  1264,    +   462, -   406,    +   460, -   410,    +   462, -   406, 
   +   460, -   406,    +   460, -   406,    +   460, -   406,    +   460, -   406, 
   +   460, -   406,    +   462, -   406,    +   460, -   410,    +   460, -   402, 
   +   464, -   406,    +   468, -   396,    +   464, -   406,    +   482, -   382, 
   +   484, -   382,    +   486, -   382,    +   470, -   400,    +   484, -   382, 
   +   484, -  1242,    +   486, -  1242,    +   484, -   380,    +   488, -   380, 
   +   486, -   378,    +   488, -   378,    +   488, -   384,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -  1240,    +   488, -  1240,    +   486, -   384,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   382,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   384,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   490, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -  1244,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   490, -   378,    +   488, -   378, 
   +   490, -   378,    +   488, -   378,    +   488, -   382,    +   488, -   378, 
   +   488, -  1238,    +   488, -  1240,    +   486, -   380,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   382,    +   488, -   378, 
   +   488, -   378,    +   490, -   378,    +   488, -   378,    +   488, -  1238, 
   +   488, -   380,    +   486, -   378,    +   488, -   382,    +   486

uint16_t rawData[439] = {3584, 1682,  488, 374,  492, 1238,  488, 376,  492, 374,  492, 378,  488, 378,  488, 378,  488, 382,  490, 378,  488, 378,  488, 378,  488, 378,  490, 378,  488, 1238,  488, 378,  488, 392,  480, 378,  488, 378,  492, 374,  488, 378,  488, 378,  490, 1260,  466, 1240,  486, 1244,  488, 378,  488, 378,  488, 1240,  488, 378,  488, 378,  488, 402,  464, 402,  464, 406,  466, 396,  472, 400,  466, 402,  466, 402,  464, 402,  464, 402,  466, 402,  464, 406,  464, 404,  462, 406,  462, 402,  466, 400,  466, 378,  488, 402,  464, 402,  464, 410,  460, 402,  466, 402,  464, 402,  464, 402,  464, 402,  464, 404,  462, 402,  464, 410,  462, 402,  462, 1266,  462, 1264,  462, 402,  464, 404,  460, 406,  440, 426,  460, 410,  438, 9970,  3506, 1734,  440, 424,  440, 1286,  440, 426,  440, 426,  440, 426,  440, 426,  440, 426,  440, 434,  438, 426,  440, 428,  438, 426,  440, 428,  438, 428,  438, 1290,  438, 426,  440, 434,  438, 430,  438, 428,  438, 428,  438, 430,  438, 428,  438, 1286,  440, 1286,  440, 1292,  440, 426,  440, 426,  440, 1288,  440, 426,  440, 426,  440, 430,  436, 426,  440, 434,  438, 428,  438, 428,  438, 428,  438, 428,  438, 428,  438, 426,  440, 428,  438, 432,  438, 428,  438, 430,  438, 428,  438, 428,  438, 428,  438, 428,  438, 1290,  436, 434,  436, 430,  438, 426,  440, 1290,  436, 1288,  440, 426,  440, 1286,  442, 424,  440, 434,  438, 426,  440, 428,  438, 428,  438, 428,  454, 410,  440, 426,  440, 428,  458, 1286,  466, 402,  458, 1272,  460, 406,  458, 406,  460, 1266,  460, 1264,  462, 406,  460, 410,  462, 406,  460, 406,  460, 406,  460, 406,  460, 406,  460, 406,  462, 406,  460, 410,  460, 402,  464, 406,  468, 396,  464, 406,  482, 382,  484, 382,  486, 382,  470, 400,  484, 382,  484, 1242,  486, 1242,  484, 380,  488, 380,  486, 378,  488, 378,  488, 384,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 1240,  488, 1240,  486, 384,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 382,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 384,  488, 378,  488, 378,  488, 378,  488, 378,  490, 378,  488, 378,  488, 378,  488, 1244,  488, 378,  488, 378,  488, 378,  490, 378,  488, 378,  490, 378,  488, 378,  488, 382,  488, 378,  488, 1238,  488, 1240,  486, 380,  488, 378,  488, 378,  488, 378,  488, 382,  488, 378,  488, 378,  490, 378,  488, 378,  488, 1238,  488, 380,  486, 378,  488, 382,  486};  // PANASONIC_AC
uint8_t state[27] = {0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, 0x20, 0xE0, 0x04, 0x00, 0x40, 0x2C, 0x80, 0x32, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x80, 0x00, 0x06, 0x10};

Cool Mode:

Timestamp : 000240.167
Encoding  : PANASONIC_AC
Code      : 0220E004000000060220E00400302E803200000660000080000602 (216 bits)
Mesg Desc.: Model: 4 (JKE), Power: Off, Mode: 3 (COOL), Temp: 23C, Fan: 0 (MIN), Swing (Vertical): 2, Quiet: Off, Powerful: Off
Library   : v2.5.0

Raw Timing[439]:
   +  3580, -  1684,    +   490, -   376,    +   490, -  1240,    +   486, -   376, 
   +   490, -   378,    +   488, -   378,    +   488, -   380,    +   488, -   378, 
   +   488, -   384,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -  1240,    +   488, -   378, 
   +   488, -   382,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -  1238,    +   488, -  1240, 
   +   486, -  1246,    +   486, -   380,    +   486, -   378,    +   488, -  1240, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   382,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   382,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   382,    +   490, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   384,    +   488, -   378,    +   488, -  1240,    +   488, -  1240, 
   +   486, -   378,    +   486, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   380,    +   488, -  9922,    +  3552, -  1686,    +   488, -   380, 
   +   486, -  1240,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   380,    +   484, -   380,    +   490, -   382,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -  1238,    +   488, -   378,    +   488, -   382,    +   488, -   380, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -  1240,    +   488, -  1240,    +   486, -  1246,    +   486, -   378, 
   +   488, -   378,    +   488, -  1240,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   382,    +   488, -   380, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   386,    +   486, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -  1240, 
   +   488, -  1240,    +   486, -   378,    +   488, -   384,    +   488, -   380, 
   +   488, -  1240,    +   488, -  1240,    +   486, -  1240,    +   486, -   378, 
   +   488, -  1240,    +   486, -   378,    +   488, -   382,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   406, 
   +   462, -   378,    +   488, -   378,    +   488, -  1258,    +   486, -   380, 
   +   488, -  1240,    +   488, -   378,    +   488, -   378,    +   488, -  1240, 
   +   486, -  1240,    +   486, -   380,    +   486, -   384,    +   488, -   380, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   384,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   380,    +   486, -   378,    +   488, -   410,    +   460, -   382, 
   +   486, -  1266,    +   460, -  1264,    +   464, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   384,    +   488, -   380, 
   +   488, -   406,    +   460, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -  1240,    +   486, -  1264,    +   462, -   384,    +   488, -   380, 
   +   484, -   406,    +   462, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   410,    +   460, -   380, 
   +   488, -   378,    +   488, -   406,    +   460, -   406,    +   462, -   378, 
   +   488, -   382,    +   484, -   380,    +   488, -   410,    +   462, -   380, 
   +   486, -   402,    +   464, -   382,    +   486, -   378,    +   486, -   406, 
   +   460, -   382,    +   486, -   404,    +   462, -  1248,    +   484, -   380, 
   +   488, -   402,    +   464, -   378,    +   488, -   406,    +   460, -   384, 
   +   484, -   406,    +   460, -   406,    +   460, -   384,    +   486, -   406, 
   +   460, -  1266,    +   460, -  1264,    +   462, -   404,    +   462, -   380, 
   +   488, -   378,    +   488, -   380,    +   486, -   410,    +   460, -   382, 
   +   484, -  1266,    +   460, -   380,    +   488, -   378,    +   488, -   402, 
   +   464, -   402,    +   464, -   406,    +   460, -   406,    +   462

uint16_t rawData[439] = {3580, 1684,  490, 376,  490, 1240,  486, 376,  490, 378,  488, 378,  488, 380,  488, 378,  488, 384,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 1240,  488, 378,  488, 382,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 1238,  488, 1240,  486, 1246,  486, 380,  486, 378,  488, 1240,  488, 378,  488, 378,  488, 378,  488, 378,  488, 382,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 382,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 382,  490, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 384,  488, 378,  488, 1240,  488, 1240,  486, 378,  486, 378,  488, 378,  488, 378,  488, 380,  488, 9922,  3552, 1686,  488, 380,  486, 1240,  488, 378,  488, 378,  488, 378,  488, 380,  484, 380,  490, 382,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 1238,  488, 378,  488, 382,  488, 380,  488, 378,  488, 378,  488, 378,  488, 378,  488, 1240,  488, 1240,  486, 1246,  486, 378,  488, 378,  488, 1240,  488, 378,  488, 378,  488, 378,  488, 378,  488, 382,  488, 380,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 386,  486, 378,  488, 378,  488, 378,  488, 378,  488, 1240,  488, 1240,  486, 378,  488, 384,  488, 380,  488, 1240,  488, 1240,  486, 1240,  486, 378,  488, 1240,  486, 378,  488, 382,  488, 378,  488, 378,  488, 378,  488, 378,  488, 406,  462, 378,  488, 378,  488, 1258,  486, 380,  488, 1240,  488, 378,  488, 378,  488, 1240,  486, 1240,  486, 380,  486, 384,  488, 380,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 384,  488, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 380,  486, 378,  488, 410,  460, 382,  486, 1266,  460, 1264,  464, 378,  488, 378,  488, 378,  488, 378,  488, 384,  488, 380,  488, 406,  460, 378,  488, 378,  488, 378,  488, 1240,  486, 1264,  462, 384,  488, 380,  484, 406,  462, 378,  488, 378,  488, 378,  488, 378,  488, 378,  488, 410,  460, 380,  488, 378,  488, 406,  460, 406,  462, 378,  488, 382,  484, 380,  488, 410,  462, 380,  486, 402,  464, 382,  486, 378,  486, 406,  460, 382,  486, 404,  462, 1248,  484, 380,  488, 402,  464, 378,  488, 406,  460, 384,  484, 406,  460, 406,  460, 384,  486, 406,  460, 1266,  460, 1264,  462, 404,  462, 380,  488, 378,  488, 380,  486, 410,  460, 382,  484, 1266,  460, 380,  488, 378,  488, 402,  464, 402,  464, 406,  460, 406,  462};  // PANASONIC_AC
uint8_t state[27] = {0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, 0x20, 0xE0, 0x04, 0x00, 0x30, 0x2E, 0x80, 0x32, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x80, 0x00, 0x06, 0x02};

Fan Auto:

Timestamp : 000340.855
Encoding  : PANASONIC_AC
Code      : 0220E004000000060220E00400322E80A200000660000080000674 (216 bits)
Mesg Desc.: Model: 1 (LKE), Power: Off, Mode: 3 (COOL), Temp: 23C, Fan: 7 (AUTO), Swing (Vertical): 2, Swing (Horizontal): 0 (UNKNOWN), Quiet: Off, Powerful: Off
Library   : v2.5.0

Raw Timing[439]:
   +  3602, -  1664,    +   510, -   358,    +   508, -  1220,    +   488, -   378, 
   +   510, -   356,    +   510, -   356,    +   490, -   380,    +   486, -   378, 
   +   488, -   384,    +   488, -   378,    +   488, -   378,    +   488, -   380, 
   +   488, -   380,    +   486, -   380,    +   488, -  1240,    +   486, -   380, 
   +   486, -   384,    +   486, -   380,    +   488, -   378,    +   488, -   380, 
   +   486, -   380,    +   488, -   378,    +   488, -  1240,    +   486, -  1238, 
   +   488, -  1244,    +   488, -   378,    +   488, -   380,    +   486, -  1240, 
   +   488, -   378,    +   488, -   378,    +   488, -   380,    +   486, -   378, 
   +   488, -   384,    +   486, -   380,    +   488, -   378,    +   488, -   380, 
   +   486, -   380,    +   486, -   380,    +   488, -   378,    +   488, -   380, 
   +   486, -   384,    +   488, -   378,    +   488, -   380,    +   488, -   378, 
   +   488, -   378,    +   488, -   380,    +   486, -   380,    +   486, -   380, 
   +   488, -   384,    +   488, -   378,    +   488, -   380,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   380,    +   486, -   380, 
   +   488, -   384,    +   488, -   380,    +   488, -  1240,    +   486, -  1238, 
   +   488, -   380,    +   486, -   380,    +   484, -   380,    +   490, -   378, 
   +   488, -   380,    +   488, -  9926,    +  3550, -  1684,    +   488, -   378, 
   +   488, -  1238,    +   488, -   380,    +   486, -   380,    +   486, -   380, 
   +   486, -   380,    +   488, -   378,    +   488, -   384,    +   488, -   380, 
   +   488, -   378,    +   488, -   380,    +   488, -   378,    +   488, -   380, 
   +   488, -  1240,    +   486, -   380,    +   488, -   384,    +   488, -   378, 
   +   488, -   380,    +   488, -   378,    +   488, -   378,    +   488, -   378, 
   +   488, -  1242,    +   486, -  1240,    +   486, -  1244,    +   488, -   380, 
   +   486, -   380,    +   488, -  1238,    +   488, -   380,    +   486, -   380, 
   +   488, -   378,    +   488, -   380,    +   486, -   384,    +   488, -   378, 
   +   488, -   378,    +   488, -   380,    +   486, -   380,    +   486, -   380, 
   +   486, -   380,    +   488, -   380,    +   486, -   384,    +   488, -   378, 
   +   488, -  1242,    +   486, -   380,    +   486, -   378,    +   486, -  1242, 
   +   486, -  1238,    +   488, -   380,    +   486, -   384,    +   488, -   378, 
   +   488, -  1242,    +   486, -  1240,    +   488, -  1240,    +   488, -   380, 
   +   486, -  1240,    +   488, -   380,    +   486, -   384,    +   486, -   380, 
   +   488, -   378,    +   488, -   378,    +   488, -   380,    +   488, -   378, 
   +   488, -   378,    +   486, -   380,    +   488, -  1260,    +   486, -   380, 
   +   486, -  1242,    +   484, -   380,    +   488, -   378,    +   488, -   378, 
   +   488, -  1242,    +   486, -   380,    +   486, -  1246,    +   486, -   380, 
   +   486, -   380,    +   486, -   380,    +   488, -   378,    +   488, -   380, 
   +   488, -   378,    +   488, -   378,    +   488, -   384,    +   488, -   380, 
   +   484, -   380,    +   488, -   378,    +   488, -   380,    +   486, -   380, 
   +   488, -   378,    +   488, -   380,    +   488, -   384,    +   488, -   378, 
   +   488, -  1242,    +   486, -  1242,    +   484, -   380,    +   488, -   380, 
   +   486, -   380,    +   486, -   380,    +   486, -   384,    +   488, -   378, 
   +   488, -   378,    +   488, -   378,    +   488, -   378,    +   488, -   380, 
   +   488, -  1240,    +   486, -  1242,    +   484, -   384,    +   486, -   380, 
   +   486, -   380,    +   488, -   378,    +   486, -   380,    +   488, -   380, 
   +   488, -   378,    +   488, -   378,    +   488, -   384,    +   488, -   380, 
   +   486, -   380,    +   488, -   380,    +   486, -   380,    +   488, -   378, 
   +   488, -   378,    +   488, -   380,    +   488, -   384,    +   488, -   378, 
   +   488, -   380,    +   486, -   380,    +   486, -   402,    +   464, -   380, 
   +   486, -   380,    +   486, -   380,    +   488, -  1246,    +   486, -   380, 
   +   486, -   380,    +   486, -   406,    +   460, -   380,    +   488, -   378, 
   +   488, -   378,    +   488, -   380,    +   486, -   384,    +   488, -   378, 
   +   488, -  1264,    +   462, -  1242,    +   484, -   380,    +   486, -   380, 
   +   488, -   380,    +   486, -   380,    +   486, -   410,    +   460, -   380, 
   +   488, -   380,    +   486, -  1242,    +   486, -   380,    +   486, -  1242, 
   +   486, -  1266,    +   462, -  1240,    +   486, -   382,    +   488

uint16_t rawData[439] = {3602, 1664,  510, 358,  508, 1220,  488, 378,  510, 356,  510, 356,  490, 380,  486, 378,  488, 384,  488, 378,  488, 378,  488, 380,  488, 380,  486, 380,  488, 1240,  486, 380,  486, 384,  486, 380,  488, 378,  488, 380,  486, 380,  488, 378,  488, 1240,  486, 1238,  488, 1244,  488, 378,  488, 380,  486, 1240,  488, 378,  488, 378,  488, 380,  486, 378,  488, 384,  486, 380,  488, 378,  488, 380,  486, 380,  486, 380,  488, 378,  488, 380,  486, 384,  488, 378,  488, 380,  488, 378,  488, 378,  488, 380,  486, 380,  486, 380,  488, 384,  488, 378,  488, 380,  488, 378,  488, 378,  488, 378,  488, 380,  486, 380,  488, 384,  488, 380,  488, 1240,  486, 1238,  488, 380,  486, 380,  484, 380,  490, 378,  488, 380,  488, 9926,  3550, 1684,  488, 378,  488, 1238,  488, 380,  486, 380,  486, 380,  486, 380,  488, 378,  488, 384,  488, 380,  488, 378,  488, 380,  488, 378,  488, 380,  488, 1240,  486, 380,  488, 384,  488, 378,  488, 380,  488, 378,  488, 378,  488, 378,  488, 1242,  486, 1240,  486, 1244,  488, 380,  486, 380,  488, 1238,  488, 380,  486, 380,  488, 378,  488, 380,  486, 384,  488, 378,  488, 378,  488, 380,  486, 380,  486, 380,  486, 380,  488, 380,  486, 384,  488, 378,  488, 1242,  486, 380,  486, 378,  486, 1242,  486, 1238,  488, 380,  486, 384,  488, 378,  488, 1242,  486, 1240,  488, 1240,  488, 380,  486, 1240,  488, 380,  486, 384,  486, 380,  488, 378,  488, 378,  488, 380,  488, 378,  488, 378,  486, 380,  488, 1260,  486, 380,  486, 1242,  484, 380,  488, 378,  488, 378,  488, 1242,  486, 380,  486, 1246,  486, 380,  486, 380,  486, 380,  488, 378,  488, 380,  488, 378,  488, 378,  488, 384,  488, 380,  484, 380,  488, 378,  488, 380,  486, 380,  488, 378,  488, 380,  488, 384,  488, 378,  488, 1242,  486, 1242,  484, 380,  488, 380,  486, 380,  486, 380,  486, 384,  488, 378,  488, 378,  488, 378,  488, 378,  488, 380,  488, 1240,  486, 1242,  484, 384,  486, 380,  486, 380,  488, 378,  486, 380,  488, 380,  488, 378,  488, 378,  488, 384,  488, 380,  486, 380,  488, 380,  486, 380,  488, 378,  488, 378,  488, 380,  488, 384,  488, 378,  488, 380,  486, 380,  486, 402,  464, 380,  486, 380,  486, 380,  488, 1246,  486, 380,  486, 380,  486, 406,  460, 380,  488, 378,  488, 378,  488, 380,  486, 384,  488, 378,  488, 1264,  462, 1242,  484, 380,  486, 380,  488, 380,  486, 380,  486, 410,  460, 380,  488, 380,  486, 1242,  486, 380,  486, 1242,  486, 1266,  462, 1240,  486, 382,  488};  // PANASONIC_AC
uint8_t state[27] = {0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, 0x20, 0xE0, 0x04, 0x00, 0x32, 0x2E, 0x80, 0xA2, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x80, 0x00, 0x06, 0x74};

If any further testing needed, I'm here to assist.
Thank You so much!

@crankyoldgit
Copy link
Owner

Interesting. When you set Fan to Auto, it detected it as a different model of A/C Unit. I'll see if I can work out what triggered that.

Btw: Can you please tell me what Model the A/C unit is, and what model the remote is too please?

P.S. Thanks for testing/confirming it works.

@crankyoldgit
Copy link
Owner

Oh, they all list as the power is "Off". Can you give me some with the power on, and then off, and then on again. All for the same settings, and tell me what those settings are on the remote. ;-)

@pandemixxx
Copy link
Author

@crankyoldgit Yes, Didn't have access to the unit, now I do.

AC model: CS-YW9MKD
Remote model: A75C3747

Power On:

Timestamp : 000017.515
Encoding  : PANASONIC_AC
Code      : 0220E004000000060220E00400412C803100000660000080000610 (216 bits)
Mesg Desc.: Model: 4 (JKE), Power: On, Mode: 4 (HEAT), Temp: 22C, Fan: 0 (MIN), Swing (Vertical): 1 (Full Up), Quiet: Off, Powerful: Off
Library   : v2.5.0

Raw Timing[439]:
   +  3584, -  1684,    +   486, -   380,    +   488, -  1240,    +   488, -   376, 
   +   490, -   376,    +   488, -   380,    +   484, -   384,    +   486, -   380, 
   +   472, -   398,    +   490, -   402,    +   464, -   380,    +   464, -   402, 
   +   486, -   380,    +   464, -   426,    +   442, -  1262,    +   464, -   400, 
   +   468, -   430,    +   440, -   404,    +   464, -   402,    +   464, -   426, 
   +   440, -   402,    +   464, -   426,    +   442, -  1284,    +   442, -  1286, 
   +   440, -  1292,    +   440, -   398,    +   468, -   398,    +   466, -  1286, 
   +   442, -   426,    +   440, -   426,    +   460, -   404,    +   442, -   404, 
   +   464, -   430,    +   440, -   426,    +   440, -   426,    +   440, -   426, 
   +   440, -   404,    +   464, -   426,    +   440, -   426,    +   440, -   426, 
   +   442, -   430,    +   440, -   426,    +   440, -   426,    +   440, -   426, 
   +   442, -   426,    +   440, -   426,    +   440, -   426,    +   440, -   422, 
   +   446, -   430,    +   442, -   426,    +   440, -   426,    +   440, -   426, 
   +   440, -   426,    +   440, -   426,    +   440, -   426,    +   440, -   426, 
   +   442, -   430,    +   442, -   426,    +   440, -  1286,    +   442, -  1286, 
   +   440, -   426,    +   440, -   426,    +   442, -   424,    +   440, -   426, 
   +   440, -   426,    +   442, -  9970,    +  3506, -  1730,    +   440, -   426, 
   +   440, -  1286,    +   442, -   426,    +   440, -   426,    +   440, -   426, 
   +   440, -   426,    +   440, -   426,    +   440, -   430,    +   440, -   426, 
   +   440, -   426,    +   442, -   426,    +   440, -   426,    +   442, -   426, 
   +   440, -  1286,    +   442, -   426,    +   440, -   430,    +   442, -   426, 
   +   440, -   426,    +   440, -   426,    +   442, -   426,    +   440, -   426, 
   +   442, -  1284,    +   442, -  1286,    +   440, -  1290,    +   440, -   426, 
   +   440, -   426,    +   440, -  1286,    +   442, -   426,    +   440, -   426, 
   +   440, -   426,    +   442, -   426,    +   440, -   430,    +   442, -   426, 
   +   440, -   426,    +   440, -   426,    +   440, -   426,    +   440, -   426, 
   +   440, -   426,    +   440, -   426,    +   440, -   430,    +   442, -  1286, 
   +   442, -   426,    +   440, -   426,    +   440, -   426,    +   440, -   426, 
   +   440, -   426,    +   440, -  1286,    +   442, -   430,    +   440, -   426, 
   +   440, -   426,    +   440, -  1286,    +   440, -  1286,    +   440, -   426, 
   +   440, -  1286,    +   440, -   426,    +   440, -   430,    +   440, -   426, 
   +   440, -   426,    +   440, -   426,    +   442, -   426,    +   440, -   426, 
   +   442, -   426,    +   440, -   426,    +   440, -  1308,    +   438, -  1286, 
   +   440, -   426,    +   440, -   426,    +   440, -   426,    +   440, -  1284, 
   +   442, -  1288,    +   438, -   426,    +   440, -   432,    +   440, -   426, 
   +   440, -   426,    +   440, -   426,    +   440, -   426,    +   440, -   426, 
   +   440, -   426,    +   442, -   426,    +   440, -   430,    +   440, -   426, 
   +   440, -   426,    +   442, -   426,    +   440, -   426,    +   440, -   426, 
   +   442, -   426,    +   442, -   424,    +   440, -   430,    +   442, -   426, 
   +   440, -  1288,    +   436, -  1286,    +   442, -   426,    +   440, -   426, 
   +   440, -   426,    +   440, -   426,    +   440, -   430,    +   442, -   426, 
   +   440, -   426,    +   442, -   424,    +   442, -   426,    +   440, -   426, 
   +   440, -  1286,    +   442, -  1286,    +   440, -   432,    +   440, -   426, 
   +   440, -   426,    +   440, -   426,    +   442, -   426,    +   440, -   426, 
   +   440, -   426,    +   440, -   426,    +   440, -   430,    +   442, -   426, 
   +   440, -   426,    +   440, -   426,    +   440, -   426,    +   442, -   426, 
   +   440, -   426,    +   440, -   426,    +   440, -   430,    +   442, -   426, 
   +   440, -   426,    +   440, -   426,    +   442, -   426,    +   440, -   426, 
   +   442, -   426,    +   440, -   424,    +   442, -  1290,    +   442, -   426, 
   +   438, -   426,    +   440, -   426,    +   440, -   426,    +   440, -   426, 
   +   440, -   426,    +   440, -   426,    +   440, -   430,    +   440, -   426, 
   +   442, -  1286,    +   440, -  1286,    +   440, -   426,    +   440, -   426, 
   +   440, -   426,    +   442, -   426,    +   440, -   430,    +   442, -   426, 
   +   440, -   426,    +   440, -   426,    +   442, -   426,    +   440, -  1286, 
   +   440, -   426,    +   440, -   426,    +   440, -   430,    +   438

uint16_t rawData[439] = {3584, 1684,  486, 380,  488, 1240,  488, 376,  490, 376,  488, 380,  484, 384,  486, 380,  472, 398,  490, 402,  464, 380,  464, 402,  486, 380,  464, 426,  442, 1262,  464, 400,  468, 430,  440, 404,  464, 402,  464, 426,  440, 402,  464, 426,  442, 1284,  442, 1286,  440, 1292,  440, 398,  468, 398,  466, 1286,  442, 426,  440, 426,  460, 404,  442, 404,  464, 430,  440, 426,  440, 426,  440, 426,  440, 404,  464, 426,  440, 426,  440, 426,  442, 430,  440, 426,  440, 426,  440, 426,  442, 426,  440, 426,  440, 426,  440, 422,  446, 430,  442, 426,  440, 426,  440, 426,  440, 426,  440, 426,  440, 426,  440, 426,  442, 430,  442, 426,  440, 1286,  442, 1286,  440, 426,  440, 426,  442, 424,  440, 426,  440, 426,  442, 9970,  3506, 1730,  440, 426,  440, 1286,  442, 426,  440, 426,  440, 426,  440, 426,  440, 426,  440, 430,  440, 426,  440, 426,  442, 426,  440, 426,  442, 426,  440, 1286,  442, 426,  440, 430,  442, 426,  440, 426,  440, 426,  442, 426,  440, 426,  442, 1284,  442, 1286,  440, 1290,  440, 426,  440, 426,  440, 1286,  442, 426,  440, 426,  440, 426,  442, 426,  440, 430,  442, 426,  440, 426,  440, 426,  440, 426,  440, 426,  440, 426,  440, 426,  440, 430,  442, 1286,  442, 426,  440, 426,  440, 426,  440, 426,  440, 426,  440, 1286,  442, 430,  440, 426,  440, 426,  440, 1286,  440, 1286,  440, 426,  440, 1286,  440, 426,  440, 430,  440, 426,  440, 426,  440, 426,  442, 426,  440, 426,  442, 426,  440, 426,  440, 1308,  438, 1286,  440, 426,  440, 426,  440, 426,  440, 1284,  442, 1288,  438, 426,  440, 432,  440, 426,  440, 426,  440, 426,  440, 426,  440, 426,  440, 426,  442, 426,  440, 430,  440, 426,  440, 426,  442, 426,  440, 426,  440, 426,  442, 426,  442, 424,  440, 430,  442, 426,  440, 1288,  436, 1286,  442, 426,  440, 426,  440, 426,  440, 426,  440, 430,  442, 426,  440, 426,  442, 424,  442, 426,  440, 426,  440, 1286,  442, 1286,  440, 432,  440, 426,  440, 426,  440, 426,  442, 426,  440, 426,  440, 426,  440, 426,  440, 430,  442, 426,  440, 426,  440, 426,  440, 426,  442, 426,  440, 426,  440, 426,  440, 430,  442, 426,  440, 426,  440, 426,  442, 426,  440, 426,  442, 426,  440, 424,  442, 1290,  442, 426,  438, 426,  440, 426,  440, 426,  440, 426,  440, 426,  440, 426,  440, 430,  440, 426,  442, 1286,  440, 1286,  440, 426,  440, 426,  440, 426,  442, 426,  440, 430,  442, 426,  440, 426,  440, 426,  442, 426,  440, 1286,  440, 426,  440, 426,  440, 430,  438};  // PANASONIC_AC
uint8_t state[27] = {0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, 0x20, 0xE0, 0x04, 0x00, 0x41, 0x2C, 0x80, 0x31, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x80, 0x00, 0x06, 0x10};

Power Off:

Timestamp : 000132.796
Encoding  : PANASONIC_AC
Code      : 0220E004000000060220E00400402C80310000066000008000060F (216 bits)
Mesg Desc.: Model: 4 (JKE), Power: Off, Mode: 4 (HEAT), Temp: 22C, Fan: 0 (MIN), Swing (Vertical): 1 (Full Up), Quiet: Off, Powerful: Off
Library   : v2.5.0

Raw Timing[439]:
   +  3584, -  1682,    +   490, -   376,    +   490, -  1236,    +   490, -   376, 
   +   488, -   376,    +   492, -   374,    +   490, -   376,    +   490, -   376, 
   +   490, -   380,    +   490, -   376,    +   490, -   376,    +   490, -   376, 
   +   490, -   376,    +   490, -   376,    +   492, -  1240,    +   486, -   378, 
   +   488, -   382,    +   490, -   376,    +   490, -   376,    +   490, -   376, 
   +   490, -   376,    +   490, -   376,    +   490, -  1240,    +   486, -  1238, 
   +   490, -  1242,    +   490, -   376,    +   490, -   376,    +   492, -  1238, 
   +   488, -   376,    +   490, -   376,    +   490, -   376,    +   490, -   376, 
   +   492, -   380,    +   490, -   376,    +   490, -   376,    +   490, -   376, 
   +   490, -   376,    +   490, -   376,    +   490, -   376,    +   490, -   376, 
   +   490, -   384,    +   488, -   376,    +   490, -   380,    +   486, -   376, 
   +   490, -   376,    +   490, -   376,    +   490, -   376,    +   490, -   376, 
   +   490, -   382,    +   490, -   376,    +   490, -   376,    +   490, -   376, 
   +   490, -   376,    +   490, -   376,    +   490, -   376,    +   490, -   376, 
   +   490, -   384,    +   486, -   378,    +   490, -  1240,    +   488, -  1260, 
   +   466, -   376,    +   490, -   376,    +   490, -   376,    +   490, -   376, 
   +   490, -   380,    +   488, -  9920,    +  3552, -  1686,    +   486, -   376, 
   +   490, -  1242,    +   486, -   376,    +   490, -   376,    +   490, -   376, 
   +   490, -   376,    +   490, -   376,    +   490, -   386,    +   486, -   376, 
   +   490, -   380,    +   486, -   376,    +   490, -   380,    +   486, -   376, 
   +   490, -  1240,    +   488, -   376,    +   488, -   384,    +   488, -   380, 
   +   486, -   380,    +   486, -   380,    +   488, -   378,    +   488, -   380, 
   +   486, -  1240,    +   488, -  1238,    +   488, -  1246,    +   486, -   376, 
   +   490, -   376,    +   490, -  1240,    +   486, -   376,    +   490, -   376, 
   +   490, -   380,    +   486, -   376,    +   490, -   408,    +   464, -   380, 
   +   488, -   376,    +   490, -   378,    +   488, -   380,    +   486, -   380, 
   +   486, -   380,    +   486, -   380,    +   486, -   408,    +   464, -   376, 
   +   490, -   380,    +   486, -   380,    +   486, -   380,    +   486, -   380, 
   +   486, -   380,    +   486, -  1262,    +   464, -   408,    +   464, -   380, 
   +   486, -   380,    +   486, -  1240,    +   486, -  1252,    +   476, -   376, 
   +   490, -  1240,    +   486, -   376,    +   490, -   408,    +   464, -   380, 
   +   486, -   380,    +   486, -   380,    +   486, -   380,    +   486, -   380, 
   +   486, -   380,    +   486, -   380,    +   486, -  1258,    +   488, -  1264, 
   +   462, -   376,    +   490, -   380,    +   486, -   380,    +   486, -  1262, 
   +   464, -  1264,    +   462, -   378,    +   490, -   382,    +   490, -   380, 
   +   486, -   380,    +   486, -   398,    +   468, -   380,    +   486, -   380, 
   +   486, -   404,    +   462, -   380,    +   486, -   408,    +   464, -   402, 
   +   464, -   380,    +   486, -   380,    +   486, -   380,    +   486, -   380, 
   +   486, -   380,    +   486, -   380,    +   486, -   408,    +   462, -   380, 
   +   486, -  1264,    +   464, -  1264,    +   464, -   376,    +   488, -   378, 
   +   488, -   380,    +   486, -   380,    +   486, -   408,    +   464, -   378, 
   +   488, -   402,    +   462, -   380,    +   486, -   380,    +   486, -   380, 
   +   486, -  1264,    +   462, -  1266,    +   462, -   408,    +   462, -   378, 
   +   488, -   380,    +   486, -   380,    +   486, -   402,    +   464, -   380, 
   +   486, -   380,    +   486, -   380,    +   486, -   408,    +   464, -   380, 
   +   486, -   380,    +   486, -   404,    +   464, -   402,    +   464, -   404, 
   +   462, -   380,    +   488, -   386,    +   482, -   408,    +   462, -   380, 
   +   486, -   402,    +   464, -   402,    +   464, -   402,    +   464, -   402, 
   +   464, -   402,    +   464, -   380,    +   486, -  1268,    +   464, -   380, 
   +   486, -   402,    +   462, -   404,    +   464, -   402,    +   464, -   380, 
   +   486, -   402,    +   464, -   402,    +   464, -   408,    +   464, -   404, 
   +   464, -  1262,    +   464, -  1264,    +   462, -   380,    +   486, -   404, 
   +   462, -   404,    +   464, -   380,    +   486, -   408,    +   464, -  1264, 
   +   464, -  1264,    +   462, -  1264,    +   462, -  1240,    +   486, -   382, 
   +   484, -   404,    +   464, -   402,    +   464, -   380,    +   488

uint16_t rawData[439] = {3584, 1682,  490, 376,  490, 1236,  490, 376,  488, 376,  492, 374,  490, 376,  490, 376,  490, 380,  490, 376,  490, 376,  490, 376,  490, 376,  490, 376,  492, 1240,  486, 378,  488, 382,  490, 376,  490, 376,  490, 376,  490, 376,  490, 376,  490, 1240,  486, 1238,  490, 1242,  490, 376,  490, 376,  492, 1238,  488, 376,  490, 376,  490, 376,  490, 376,  492, 380,  490, 376,  490, 376,  490, 376,  490, 376,  490, 376,  490, 376,  490, 376,  490, 384,  488, 376,  490, 380,  486, 376,  490, 376,  490, 376,  490, 376,  490, 376,  490, 382,  490, 376,  490, 376,  490, 376,  490, 376,  490, 376,  490, 376,  490, 376,  490, 384,  486, 378,  490, 1240,  488, 1260,  466, 376,  490, 376,  490, 376,  490, 376,  490, 380,  488, 9920,  3552, 1686,  486, 376,  490, 1242,  486, 376,  490, 376,  490, 376,  490, 376,  490, 376,  490, 386,  486, 376,  490, 380,  486, 376,  490, 380,  486, 376,  490, 1240,  488, 376,  488, 384,  488, 380,  486, 380,  486, 380,  488, 378,  488, 380,  486, 1240,  488, 1238,  488, 1246,  486, 376,  490, 376,  490, 1240,  486, 376,  490, 376,  490, 380,  486, 376,  490, 408,  464, 380,  488, 376,  490, 378,  488, 380,  486, 380,  486, 380,  486, 380,  486, 408,  464, 376,  490, 380,  486, 380,  486, 380,  486, 380,  486, 380,  486, 1262,  464, 408,  464, 380,  486, 380,  486, 1240,  486, 1252,  476, 376,  490, 1240,  486, 376,  490, 408,  464, 380,  486, 380,  486, 380,  486, 380,  486, 380,  486, 380,  486, 380,  486, 1258,  488, 1264,  462, 376,  490, 380,  486, 380,  486, 1262,  464, 1264,  462, 378,  490, 382,  490, 380,  486, 380,  486, 398,  468, 380,  486, 380,  486, 404,  462, 380,  486, 408,  464, 402,  464, 380,  486, 380,  486, 380,  486, 380,  486, 380,  486, 380,  486, 408,  462, 380,  486, 1264,  464, 1264,  464, 376,  488, 378,  488, 380,  486, 380,  486, 408,  464, 378,  488, 402,  462, 380,  486, 380,  486, 380,  486, 1264,  462, 1266,  462, 408,  462, 378,  488, 380,  486, 380,  486, 402,  464, 380,  486, 380,  486, 380,  486, 408,  464, 380,  486, 380,  486, 404,  464, 402,  464, 404,  462, 380,  488, 386,  482, 408,  462, 380,  486, 402,  464, 402,  464, 402,  464, 402,  464, 402,  464, 380,  486, 1268,  464, 380,  486, 402,  462, 404,  464, 402,  464, 380,  486, 402,  464, 402,  464, 408,  464, 404,  464, 1262,  464, 1264,  462, 380,  486, 404,  462, 404,  464, 380,  486, 408,  464, 1264,  464, 1264,  462, 1264,  462, 1240,  486, 382,  484, 404,  464, 402,  464, 380,  488};  // PANASONIC_AC
uint8_t state[27] = {0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, 0x20, 0xE0, 0x04, 0x00, 0x40, 0x2C, 0x80, 0x31, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x80, 0x00, 0x06, 0x0F};

btw question, do I send uint8_t state[27] with sendPanasonic?

crankyoldgit added a commit that referenced this issue Sep 29, 2018
* Panasonic has a Fan mode that requires the temp to be 27C.
* Some code lint improvements.
* Detail models supported etc.

Ref #525
@crankyoldgit
Copy link
Owner

Thanks for the extra data. Odd. All the earlier ones were marked as "Power: Off". These two look fine. DId you just capture them (previous ones) all with the remote in the "Off" setting? Anyway, those two seem to match your descriptions, so .. shrug .. nothing to fix there.

btw question, do I send uint8_t state[27] with sendPanasonic?

No. Use sendPanasonicAC() instead.
e.g. For the last message you gave:

uint8_t state[27] = {0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, 0x20, 0xE0, 0x04, 0x00, 0x40, 0x2C, 0x80, 0x31, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x80, 0x00, 0x06, 0x0F};
irsend.sendPanasonicAC(state);

P.S. I've just added another commit to that branch, so do a git pullon that branch and it should include some subtle improvements.

@pandemixxx
Copy link
Author

Yes, previously I sniffed signals from remote without AC. Now I did it in front of AC, so it went "On". If I need to do more in front of AC, just tell ;)

@crankyoldgit
Copy link
Owner

If you could test sendPanasonicAC() and confirm the AC unit acts accordingly, that'd be great.

@MikkelTb
Copy link

Hi.
I'm welly interesting in this, and so happy that somebody has decode the remote control.

I have a Panasonic Multi-split aircon.
I also have the capability to test "Sleep Timer" "Timer on" and "Timer off".

And I can test it on my Aircon.

@crankyoldgit
Copy link
Owner

Hi @MikkelTb Feel free to try and decode what bits/bytes of the state[] are used for the timer functions.

I suggest you create a google sheets spreadsheet to track what data you collect and so others (e.g. me) can see the latest data you've worked out.
Basically, you need to keep the other remote settings the same, and only modify the sleep/timer functions to see what "changes" in the state[] variable.
Once you've tracked down what changes for what functions, then it's try to work out what the data means.
Typically for timers, there are number of encoding for the time. Some systems just use a simple counter for "minutes since midnight", some count "how many 15 min periods there have been since midnight",
some store the "hours since midnight" in one byte, and "minutes since the start of the hour" in another.

Basically, record what's on the remote, try to change as little as possible per sample. i.e. start only on one function, and try to find the difference between one minute and the next minute in sequence, or the next hour in the sequence.

Hopefully the pattern will emerge. When you've got some state[] data and idea of the format, I can try to write the code to decode it and recreate it.

Oh, an important fact is also to let us know what model number it is. It could be something we haven't seen yet.

@pandemixxx
Copy link
Author

If you could test sendPanasonicAC() and confirm the AC unit acts accordingly, that'd be great.

Yap, going to test it, I'll report all tested messages a little bit later today

@pandemixxx
Copy link
Author

Just tested 2 commands I posted before - Power On and Power Off

uint8_t stateon[27] = {0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, 0x20, 0xE0, 0x04, 0x00, 0x41, 0x2C, 0x80, 0x31, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x80, 0x00, 0x06, 0x10};

uint8_t stateoff[27] = {0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, 0x20, 0xE0, 0x04, 0x00, 0x40, 0x2C, 0x80, 0x31, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x80, 0x00, 0x06, 0x0F};

Both sent with irsend.sendPanasonicAC(state) - everything seems OK, works well!

If any further testing needed, I'm here for you.

@pandemixxx
Copy link
Author

I have a question, or maybe there's some information here I couldn't find, please link if so.
Is it possible to separate on/off command from fan power, mode or temperature? Just like if I got 23 on my AC and I just want to send a signal to change mode or fan position without changing temperature data or it don't work like that and every signal I send should contain all info?

@MikkelTb
Copy link

AC Remote Info.xlsx

I have collected the follow information.
For the 1h/2h/3h..7h Sleep timer, it look like, it send a packet, there is not like the On/Off and temperatur.
Mine remote control, the On/Off is a Toggel, and a single button.

For The on and Off settings, i can not figure out, how the value for time is calculated in the byte string.

@crankyoldgit
Copy link
Owner

@MikkelTb
Yeah, the data looks weird.
For the "Sleep" ones. e.g. Ark6 (Sleep 1h) and Ark7 (Sleep 2h) there doesn't appear to be a difference in the code sent. Unless its a placebo in that there is not unit operation difference between those remote settings, then I don't know how that info is being transmitted.

For the timer data (Ark17 etc), it looks like On & Off timers are controlled by the 2nd and 3rd least significant bits of state[13] i.e. (state[13] & 0b00000010) Non-zero is the On Timer is active, 0 is it is On timer is off/cancelled. Ditto for the Off Timer, except use 0b00000100 instead.

What is the time setting resolution for those settings? i.e .Can you set the timer down to any exact minute, or is it only to the nearest 5 or 10 minute mark?

I also assume there is a Clock (current time) on the remote as well, we need to track down which bytes those are stored in and record the "time on the remote" when you capture the message.

General FYIs:
You don't need to keep/record the "Raw Timing[]:" +/- data.
You only need to keep the uint16_t rawData[] = {...]; line IF it detects it as UNKNOWN.
The most important data from IRrecvDumpV2 for this project is just the uint8_t state[] = {...}; line.

Oh, another [q], does your unit support Horizontal swing control via the remote?

@crankyoldgit
Copy link
Owner

Looking at the time encoding, I'd suggest looking at time values of "00:00", "00:01" or "00:10" (if it does it in 10 mins steps), & "01:00", "01:10" etc. That may help making it easier to decode how the timer times are stored.
Ditto for the "clock" setting, assuming there is one on the remote.

@crankyoldgit
Copy link
Owner

@pandemixxx Thanks for that. That's excellent news.

@crankyoldgit
Copy link
Owner

@pandemixxx

Is it possible to separate on/off command from fan power, mode or temperature? Just like if I got 23 on my AC and I just want to send a signal to change mode or fan position without changing temperature data or it don't work like that and every signal I send should contain all info?

No, and yes (sort of).

A/C protocols typically send the entire settings with each transmission. Simplified, the A/C Unit is dumb, and the remote has the "memory". (I'm excluding time and timers here. ;)

For Panasonic, this seems to be the case. i.e. The entire "requested state" is sent in each message.
There is no "Just change mode to Cool, and change nothing else" command/message that I'm aware of in it's protocol.

That said, I try to do what you want in the IRPanasonicAc class object.
It tries to emulate the remote. i.e. You can change attributes of the overall state, and it remembers.
e.g. This test code gives you an idea. https://github.com/markszabo/IRremoteESP8266/blob/panasonic_ac/test/ir_Panasonic_test.cpp#L713-L734

Note however, that apparently "Fan" mode for Panasonic is special, it requires the temp to be set to 27C for some reason. No idea why etc. I could set up the C++ class to try to remember the previous temp settings so it doesn't "lose" it when it goes from say "Cool" to "Fan" then back to "Cool" etc. But unless you are going to use the IRPanasonicAc class and only interact with the unit via it, then there doesn't seem a lot of point.
If you do, sure. I can add it.

All that class tries to do is emulate the button interactions on the physical remote in a way. Given how most people seem to use this library, they want to control the A/C via some home automation system. Those are far more powerful and probably can easily help you store your desired state more easily. However, that is far far above the scope of this library. This is just a tool to help generate/produce the IR message that the device understands.

@MikkelTb
Copy link

MikkelTb commented Oct 1, 2018

      Looking at the time encoding, I'd suggest looking at time values of "00:00", "00:01" or "00:10" (if it does it in 10 mins steps), & "01:00", "01:10" etc. That may help making it easier to decode how the timer times are stored.

Ditto for the "clock" setting, assuming there is one on the remote.

Hi.

The on/Off can be change in 10 minuts step, And on or Off can not have the same time.
On the remote there is a Clock, but when i change the clock on the remote, is does not seem that the remote send that value to the AC.

Last thing, my AC does not have a Horizontal swing

@pandemixxx
Copy link
Author

@crankyoldgit Thank you for shared info, saved a lot of time for me.

@crankyoldgit
Copy link
Owner

@MikkelTb Okay, so (24hr * 60min) / 10min = 144 units, which can easily fit in a single byte (<= 256). So the time(r)s can possibly reside in a single byte, maybe.

Odd that it doesn't transmit the remote's time with each message. That may mean that the timer values are relative to the time on the remote.
e.g. Remote's clock say "13:50" ... and if you set an OFF timer for 14:30. Then it may be saying "Hey AC unit, please set an OFF timer for in 40 minutes (4 units) time."

Other than that, I'm out of ideas with out lots more data (inc. the clock time on the remote)

@MikkelTb
Copy link

MikkelTb commented Oct 1, 2018

@crankyoldgit When i come home from work, i will try to look at the data and try some more test, with on and off timer.

But this with the "Turn Off in in 40 minutes from now" maby it do that. The reason is, the data i got at the morning, was not the same as the evening.
But i think at the timer, is send every time, you change settings in the remote (Temperatur up/down, On/Off and so on.)

@crankyoldgit
Copy link
Owner

That would make sense if it is behaving like an offset/relative time to what is on the remote. Lets see what your testing reveals.

@crankyoldgit
Copy link
Owner

@MikkelTb I also STRONGLY recommend using Google Sheets for the spreadsheet. It saves me having to download and convert the spreadsheet (I don't have Excel ;-) You can also allow people to comment on it too and it's always up to date in real-time. ;-)

crankyoldgit added a commit that referenced this issue Oct 1, 2018
* Make the class remember the set temp, so Fan mode doesn't overwrite it.
* Adjust unit tests to cover that.
* Update unit test Makefile to include protocol header files for dependencies.

Ref: #525 (comment)
crankyoldgit added a commit that referenced this issue Oct 2, 2018
* Experimental support for Panasonic A/C messages.
* sendPanasonicAC(), decodePanasonicAC(), & IRPanasonicAc class added.
* Unit tests for those.
* Code HEAVILY influenced by the work done at:
  https://github.com/ToniA/ESPEasy/blob/HeatpumpIR/lib/HeatpumpIR/PanasonicHeatpumpIR.cpp
* Should support LKE/DKE/JKE/NKE series units.
* Updated example code as required.
* Panasonic AC: Improve model detect and Fan mode.
* Panasonic has a Fan mode that requires the temp to be 27C.
* Some code lint improvements.
* Detail models supported etc.
* Make the class remember the set temp, so Fan mode doesn't overwrite it.
* Adjust unit tests to cover that.
* Update unit test Makefile to include protocol header files for dependencies.

Ref: #525 (comment)

* Update sendPanasonicAC() status to confirmed.
@crankyoldgit crankyoldgit added the Hacktoberfest Hacktoberfest participation label Oct 2, 2018
@crankyoldgit
Copy link
Owner

FYI, I've merged the pansonic branch into master. It will thus make it into the next release.

@pandemixxx
Copy link
Author

Thank you @crankyoldgit , that's great news, should I close this issue?

@crankyoldgit
Copy link
Owner

crankyoldgit commented Oct 2, 2018

FYI, v2.5.1 has been released and includes the work we've done thus far.

@pandemixxx Yeah, we should probably close it.
@MikkelTb Can you please create a new issue if you get any progress on the timer stuff?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Hacktoberfest Hacktoberfest participation more info
Projects
None yet
Development

No branches or pull requests

4 participants