Midea not decoding properly · Issue #1173 · crankyoldgit/IRremoteESP8266 (original) (raw)

Version/revision of the library used

2.7.7

Expected behavior

Midea decoding more reliable

Actual behavior

currently it takes 5-10 tried to get it to decode, and sometimes after wards will decode properly for 5-10 successive then stops again.

Output of raw data from IRrecvDumpV2.ino (if applicable)

Below are 2 outputs from the same value on remote control, just once with it actually decoding and the other where it fails to decode.
Expected:
Protocol : MIDEA
Code : 0xA1A072FFFF54 (48 Bits)
Mesg Desc.: Power: On, Mode: 0 (Cool), Celsius: Off, Temp: 27C/80F, Fan: 0 (Auto), Sleep: Off, Swing(V) Toggle: Off
uint16_t rawData[199] = {4716, 4116, 844, 1318, 818, 264, 782, 1376, 762, 314, 736, 342, 736, 340, 716, 362, 694, 1462, 682, 1476, 676, 408, 658, 1498, 644, 432, 628, 450, 616, 458, 610, 466, 606, 472, 592, 484, 586, 1566, 594, 1560, 584, 1572, 582, 494, 596, 478, 592, 1564, 584, 492, 584, 1568, 586, 1570, 586, 1568, 592, 1562, 590, 1566, 586, 1568, 586, 1566, 590, 1564, 598, 1556, 594, 1562, 590, 1558, 588, 1568, 590, 1564, 582, 1572, 594, 1560, 590, 1562, 586, 490, 594, 1562, 608, 470, 590, 1566, 584, 488, 594, 1562, 592, 488, 590, 482, 584, 5168, 4458, 4374, 588, 486, 590, 1566, 586, 488, 592, 1564, 584, 1568, 594, 1558, 596, 1556, 588, 488, 604, 472, 598, 1558, 596, 478, 594, 1562, 596, 1554, 590, 1566, 596, 1558, 590, 1562, 590, 1564, 592, 484, 598, 478, 586, 490, 592, 1562, 600, 1554, 590, 486, 600, 1556, 582, 490, 602, 476, 594, 482, 600, 474, 584, 492, 590, 486, 584, 492, 590, 486, 592, 486, 594, 484, 588, 488, 584, 492, 592, 484, 586, 492, 596, 480, 586, 490, 598, 1554, 588, 490, 590, 1564, 586, 490, 586, 1568, 588, 488, 592, 1560, 592, 1562, 600}; // MIDEA A1A072FFFF54
uint64_t data = 0xA1A072FFFF54;

Getting:
Protocol : UNKNOWN
Code : 0x9D743BAA (100 Bits)
uint16_t rawData[199] = {4718, 4116, 852, 1300, 854, 222, 852, 1302, 854, 222, 860, 218, 860, 218, 856, 222, 852, 1318, 816, 1342, 784, 294, 762, 1396, 736, 340, 730, 348, 708, 368, 704, 374, 678, 408, 668, 416, 646, 1506, 638, 1520, 626, 1524, 624, 452, 608, 470, 594, 1560, 586, 492, 584, 1568, 600, 1554, 596, 1558, 588, 1568, 598, 1554, 586, 1570, 582, 1568, 580, 1574, 588, 1568, 580, 1574, 578, 1574, 584, 1572, 582, 1572, 588, 1564, 594, 1560, 584, 1570, 600, 476, 592, 1560, 602, 478, 592, 1558, 600, 476, 600, 1556, 600, 476, 586, 488, 592, 5164, 4458, 4370, 596, 480, 594, 1560, 602, 474, 596, 1558, 588, 1564, 602, 1554, 600, 1554, 592, 484, 594, 484, 604, 1550, 594, 478, 592, 1562, 582, 1570, 588, 1568, 594, 1560, 584, 1570, 594, 1562, 596, 482, 586, 488, 586, 492, 592, 1560, 590, 1566, 598, 478, 590, 1564, 598, 478, 598, 478, 592, 486, 594, 484, 590, 484, 580, 496, 588, 490, 598, 476, 596, 482, 594, 484, 584, 490, 590, 486, 586, 492, 606, 470, 602, 476, 592, 486, 586, 1564, 594, 484, 598, 1554, 604, 474, 592, 1562, 584, 494, 596, 1560, 592, 1564, 594}; // UNKNOWN 9D743BAA

Another variant (adjusted temp down by 1 degree)
Expected:
Protocol : MIDEA
Code : 0xA1A071FFFF57 (48 Bits)
Mesg Desc.: Power: On, Mode: 0 (Cool), Celsius: Off, Temp: 26C/79F, Fan: 0 (Auto), Sleep: Off, Swing(V) Toggle: Off
uint16_t rawData[199] = {4602, 4250, 716, 1434, 704, 376, 692, 1462, 680, 402, 658, 424, 646, 434, 626, 454, 614, 1538, 618, 1538, 596, 482, 588, 1562, 592, 486, 582, 494, 582, 496, 588, 486, 584, 494, 584, 492, 580, 1572, 580, 1572, 592, 1562, 588, 488, 584, 492, 590, 490, 580, 1572, 592, 1560, 588, 1568, 580, 1572, 586, 1570, 588, 1564, 580, 1574, 596, 1558, 588, 1568, 598, 1554, 594, 1558, 588, 1568, 604, 1546, 600, 1554, 592, 1560, 598, 1556, 598, 1558, 584, 494, 586, 1564, 588, 488, 588, 1566, 592, 484, 592, 1562, 594, 1562, 594, 1560, 592, 5160, 4458, 4372, 604, 472, 590, 1566, 584, 492, 584, 1570, 580, 1576, 588, 1564, 592, 1558, 580, 500, 588, 488, 586, 1566, 584, 492, 604, 1550, 586, 1568, 596, 1558, 598, 1556, 596, 1558, 596, 1558, 592, 484, 586, 490, 582, 496, 588, 1566, 592, 1560, 582, 1574, 586, 490, 578, 498, 586, 490, 578, 500, 588, 488, 584, 494, 588, 488, 580, 494, 582, 494, 594, 484, 592, 486, 580, 496, 590, 486, 586, 492, 582, 496, 582, 492, 592, 484, 590, 1564, 588, 488, 588, 1568, 582, 494, 588, 1566, 582, 494, 588, 490, 586, 490, 582}; // MIDEA A1A071FFFF57
uint64_t data = 0xA1A071FFFF57;

Frequently decoded as:
Protocol : UNKNOWN
Code : 0x802C6E48 (100 Bits)
uint16_t rawData[199] = {4714, 4114, 856, 1300, 856, 216, 864, 1298, 850, 220, 860, 218, 854, 222, 850, 234, 818, 1350, 784, 1372, 764, 316, 730, 1428, 726, 350, 718, 360, 696, 380, 698, 386, 676, 400, 676, 406, 658, 1502, 630, 1524, 622, 1530, 616, 464, 612, 464, 608, 466, 598, 1556, 592, 1562, 594, 1558, 588, 1566, 604, 1550, 606, 1550, 598, 1556, 594, 1562, 594, 1562, 580, 1572, 586, 1568, 590, 1566, 592, 1562, 592, 1564, 600, 1552, 592, 1562, 582, 1576, 598, 478, 598, 1558, 580, 496, 600, 1554, 602, 476, 586, 1566, 604, 1552, 590, 1564, 586, 5170, 4460, 4372, 586, 488, 584, 1570, 588, 490, 594, 1560, 596, 1560, 590, 1564, 592, 1558, 588, 490, 584, 492, 592, 1562, 592, 484, 590, 1564, 590, 1564, 580, 1574, 598, 1558, 586, 1566, 586, 1568, 596, 482, 596, 478, 580, 496, 596, 1560, 586, 1568, 598, 1556, 598, 482, 586, 488, 598, 480, 580, 498, 600, 476, 590, 488, 590, 486, 586, 492, 596, 480, 578, 496, 588, 488, 602, 478, 590, 484, 582, 494, 596, 480, 586, 492, 584, 490, 588, 1566, 582, 496, 590, 1562, 586, 492, 586, 1564, 592, 486, 590, 486, 586, 490, 592}; // UNKNOWN 802C6E48

Steps to reproduce the behavior

Press Power button on remote multiple times. (keeping all other settings same)

Example code used

IRrecvDumpV2 & V3.

Circuit diagram and hardware used (if applicable)

ESP32 connected to VS1838B decoder, with breakout that provides 120ohm pullup, and directly using enableirin(true) to set esp32 internal pullup's
Have used GPIO 12 and 13.
Set kCaptureBufferSize to 2048 also, even though never got any overflow errors.

I have followed the steps in the Troubleshooting Guide & read the FAQ

YES

Has this library/code previously worked as expected for you?

No.

Other useful information

Tried the following also:
kMideaTolerance = 50 , this helps it decode more often, but still randomly.