Sitelet https://github.com/crankyoldgit/IRremoteESP8266/issues/1958
Skip to content

MIDEA always sends clean toggle effectively turning off the A/C with any message. Parameters missing/shifted in IRac.cpp line  #1958

Description

@nikolausspence

Version/revision of the library used

version 2.8.4 as included in the latest Tasmota 12.4.0

Describe the bug

IRHVAC command in Tasmota includes two additional special packets. One toggles clean which turns the machine off afterwards. The second message is benign and just re-sends quiet off. I thought this may be an issue with statefulness and using the SENDSTORE option removed the benign message but still included the malicious "clean toggle". Regardless of what setting you send, the machine will be put in self clean mode and turn off afterwards.

To Reproduce

Using version 12.4.0 of tasmota-ir or tasmota32-ir and send the following command at the console:
IRHVAC {"Vendor":"MIDEA", "Power":"On","Mode":"Cool","FanSpeed":4,"Celsius":"Off","Temp":72}

Example code used

IRHVAC {"Vendor":"MIDEA", "Power":"On","Mode":"Cool","FanSpeed":4,"Celsius":"Off","Temp":72}

Expected behaviour

should receive:
Timestamp : 000540.642
Library : v2.8.4

Protocol : MIDEA
Code : 0xA19868FFFF72 (48 Bits)
Mesg Desc.: Type: 1 (Command), Power: On, Mode: 0 (Cool), Celsius: Off, Temp: 21C/70F, On Timer: Off, Off Timer: Off, Fan: 3 (High), Sleep: Off, Swing(V): -, Econo: -, Turbo: -, Quiet: Off, Light: -, Clean: -, 8C Heat: -
uint16_t rawData[199] = {4516, 4462, 594, 1676, 580, 544, 574, 1670, 574, 550, 576, 548, 572, 552, 574, 552, 592, 1650, 582, 1670, 572, 552, 572, 554, 576, 1668, 576, 1668, 586, 540, 582, 548, 572, 552, 572, 552, 570, 1674, 576, 1670, 586, 540, 580, 1662, 572, 554, 574, 552, 574, 550, 580, 1662, 582, 1664, 576, 1666, 574, 1672, 626, 1618, 582, 1662, 582, 1664, 572, 1672, 582, 1662, 586, 1658, 584, 1660, 574, 1672, 598, 1650, 586, 1660, 584, 1660, 574, 1670, 576, 562, 576, 1668, 576, 1650, 602, 1658, 576, 552, 576, 560, 582, 1644, 596, 552, 582, 5566, 4512, 4454, 590, 534, 594, 1652, 596, 532, 602, 1642, 602, 1642, 592, 1652, 598, 1648, 602, 522, 602, 522, 600, 1644, 592, 1670, 572, 552, 574, 550, 610, 1634, 580, 1662, 572, 1676, 570, 1676, 572, 554, 574, 548, 576, 1674, 558, 566, 560, 1684, 560, 1688, 568, 1674, 568, 554, 560, 566, 558, 564, 558, 568, 558, 568, 562, 558, 562, 564, 568, 588, 532, 558, 558, 568, 556, 572, 554, 572, 556, 590, 536, 566, 566, 558, 564, 580, 542, 1704, 534, 566, 560, 590, 532, 570, 560, 1706, 536, 1688, 556, 592, 536, 1710, 534}; // MIDEA A19868FFFF72
uint64_t data = 0xA19868FFFF72;

just one message

Output of raw data from irdumpv3:

first message is fine and second is problematic. This was with the SENDSTORE enabled so the benign quiet off message is not sent.

Timestamp : 006602.195
Library : v2.8.4

Protocol : MIDEA
Code : 0xA1986AFFFF70 (48 Bits)
Mesg Desc.: Type: 1 (Command), Power: On, Mode: 0 (Cool), Celsius: Off, Temp: 22C/72F, On Timer: Off, Off Timer: Off, Fan: 3 (High), Sleep: Off, Swing(V): -, Econo: -, Turbo: -, Quiet: Off, Light: -, Clean: -, 8C Heat: -
uint16_t rawData[199] = {4528, 4446, 638, 1610, 616, 508, 644, 1602, 610, 514, 638, 486, 634, 492, 634, 490, 606, 1642, 608, 1634, 636, 488, 638, 488, 636, 1612, 634, 1610, 604, 520, 634, 488, 636, 488, 634, 490, 638, 1606, 644, 1600, 608, 514, 638, 1606, 632, 496, 632, 1612, 608, 514, 646, 1598, 608, 1636, 638, 1606, 630, 1618, 628, 1618, 604, 1640, 604, 1640, 628, 1618, 608, 1638, 604, 1638, 630, 1618, 626, 1618, 636, 1610, 608, 1634, 628, 1618, 628, 1620, 606, 516, 632, 1614, 630, 1614, 628, 1618, 624, 500, 642, 484, 628, 496, 584, 546, 602, 5564, 4540, 4426, 600, 526, 598, 1648, 596, 530, 598, 1668, 600, 1646, 574, 1672, 572, 1674, 580, 544, 576, 548, 570, 1674, 568, 1678, 562, 562, 560, 566, 562, 1682, 572, 1672, 560, 1686, 558, 1688, 544, 580, 560, 562, 572, 1672, 562, 566, 558, 1686, 560, 566, 548, 1696, 570, 634, 488, 562, 560, 562, 562, 562, 562, 564, 558, 564, 574, 550, 568, 554, 544, 584, 558, 566, 560, 564, 560, 564, 560, 564, 562, 564, 570, 554, 544, 580, 560, 1686, 536, 586, 538, 588, 560, 564, 562, 1684, 570, 1756, 484, 1678, 560, 1686, 546}; // MIDEA A1986AFFFF70
uint64_t data = 0xA1986AFFFF70;

Timestamp : 006602.484
Library : v2.8.4

Protocol : MIDEA
Code : 0xA20DFFFFFF70 (48 Bits)
Mesg Desc.: Type: 2 (Special), Swing(V): -, Econo: -, Turbo: -, Quiet: Off, Light: -, Clean: Toggle, 8C Heat: -
uint16_t rawData[199] = {4474, 4488, 570, 1676, 570, 556, 570, 1676, 570, 552, 578, 630, 492, 554, 568, 1676, 562, 566, 560, 564, 540, 586, 572, 552, 568, 578, 542, 1680, 560, 1684, 560, 564, 550, 1694, 570, 1680, 558, 1680, 560, 1684, 540, 1706, 572, 1672, 570, 1672, 560, 1684, 510, 1736, 566, 1676, 566, 1678, 560, 1684, 560, 1692, 564, 1680, 562, 1682, 560, 1684, 562, 1684, 570, 1698, 544, 1676, 560, 1684, 560, 1684, 562, 1722, 534, 1672, 560, 1686, 560, 1686, 542, 580, 574, 1672, 558, 1684, 544, 1702, 546, 578, 564, 558, 552, 570, 560, 576, 562, 5602, 4486, 4480, 562, 564, 558, 1686, 570, 554, 564, 1680, 564, 1682, 558, 1686, 560, 566, 544, 1698, 568, 1682, 560, 1680, 560, 1684, 550, 1694, 572, 638, 482, 556, 564, 1676, 560, 564, 562, 564, 482, 640, 568, 556, 544, 578, 562, 608, 528, 552, 560, 566, 560, 566, 536, 590, 482, 640, 564, 560, 558, 606, 528, 590, 532, 556, 558, 568, 538, 586, 560, 566, 508, 616, 560, 564, 570, 636, 462, 610, 510, 586, 560, 564, 558, 564, 558, 1686, 564, 560, 560, 608, 528, 612, 506, 1676, 536, 1710, 508, 1734, 540, 1706, 538}; // MIDEA A20DFFFFFF70
uint64_t data = 0xA20DFFFFFF70;

What brand/model IR demodulator are you using?

no-name 5mm IR LED 940nm and no-name IR decoder removed from LED strip controller.

Circuit diagram and hardware used (if applicable)

both ESP8285 and ESP32. IR LED has 50ohm resistor running off 5v switched by BC547 with 1k base resistor.

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

NO

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

No not for this function.

Other useful information

Problem is in IRac.cpp line 3387

Call to IRMideaAC is missing the send.clean argument between send.light and send.sleep. I have modified the code included with Tasmota, compiled both tasmota-ir and tasmota32-ir, and tested both to work perfect if you make this change.

https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/IRac.cpp#L3387

change line 3387 to:
send.clean, send.sleep);

lines 3380-3390
#if SEND_MIDEA
case MIDEA:
{
IRMideaAC ac(_pin, _inverted, _modulation);
midea(&ac, send.power, send.mode, send.celsius, send.degrees,
send.sensorTemperature, send.fanspeed, send.swingv, send.iFeel,
send.quiet, prev_quiet, send.turbo, send.econo, send.light,
send.sleep);
break;
}
#endif // SEND_MIDEA

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions