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

not able to controll swing on LG AC #1651

Closed
zolonn opened this issue Oct 25, 2021 · 8 comments
Closed

not able to controll swing on LG AC #1651

zolonn opened this issue Oct 25, 2021 · 8 comments
Assignees

Comments

@zolonn
Copy link

zolonn commented Oct 25, 2021

Version/revision of the library used

Tasmota 10.0.0

Describe the bug

Using tasmota-ir 10.0.0 on YTF IR Bridge I'm unable to controll swing on my LG AC (all other stuff is working fine) - is just ignoring the HVAC command. My AC remote model is: AKB73315611, indoor unit is: MS05SQ NW0

What brand/model IR demodulator are you using?

YTF IR Bridge

Circuit diagram and hardware used (if applicable)

YTF IR Bridge using Tasmota-ir 10.0.0 controlled via MQTT IRhvac commands from Node-RED

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

Tried....

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

No

Other useful information

older Tasmota version (9.1.0) was completely unable to decode SwingV commands from my remote - shows always "SwingV":"Off"
Tasmota 10.0.0 is able to decode the commands from remote - shows "SwingV":"Off"/"SwingV":"Auto" - but unable to reproduce it

@crankyoldgit
Copy link
Owner

You've not provided enough information or data for us to be able to help you. The library supports different models which have different ways of controlling vertical swing. So without detailed information, we can't help you.
e.g. We need every Tasmota JSON setting you are using for the A/C. e.g. Protocol, Model, Mode, Temp, Fan Speed. Even then we have to make a guess at what Tasmota is doing. See below.

Please read: https://github.com/crankyoldgit/IRremoteESP8266/wiki/Troubleshooting-Guide#reporting-an-issue

See also from the template you edited:

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

Include some serial text of the raw dumps of what the device saw.

Note: Output from Tasmota is not acceptable. We can't easily use their raw format.

Also, it is very hard for us to diagnose problems via Tasmota. Hence we ask you to use our tools, that way we can be certain there is no issues introduced by third party software (e.g. Tasmota)

@zolonn
Copy link
Author

zolonn commented Oct 27, 2021

hi crankyoldgit,

unfortunately, currently I don't have any HW to run the IRrecvDumpVx.ino - I have only two YTF bridges running Tasmota.
the JSONs returned by Tasmota 10.0.0 when listening to IR remote:

Swing off:
10:00:32.076 MQT: tele/T-IR2/RESULT = {"IrReceived":{"Protocol":"LG","Bits":28,"Data":"0x881315A","DataLSB":"0x10818C5A","Repeat":0,"IRHVAC":{"Vendor":"LG2","Model":3,"Mode":"Auto","Power":"On","Celsius":"On","Temp":15,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}}

Swing on:
10:00:40.017 MQT: tele/T-IR2/RESULT = {"IrReceived":{"Protocol":"LG","Bits":28,"Data":"0x8813149","DataLSB":"0x10818C92","Repeat":0,"IRHVAC":{"Vendor":"LG2","Model":3,"Mode":"Auto","Power":"On","Celsius":"On","Temp":15,"FanSpeed":"Max","SwingV":"Auto","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}}

when I send the same JSON back via IRhvac command, all is accepted and executed - except the SwingV parameter.

small notice:
all functions of AC are controlled by LG, Model 1 protocol except swing, which is controlled by LG2 Model 3 one.
and when I send out "SwingV":"Auto" command, the AC unit beeps 3x - command not recognised?

apparently I have to build an IR decoder for deeper investigation

@NiKiZe
Copy link
Collaborator

NiKiZe commented Oct 27, 2021

If you put your ac into swing mode, then send swing off with tasmota, does that work?

@crankyoldgit
Copy link
Owner

Thanks @zolonn That is at least enough info & data for us to start looking for the issue.

crankyoldgit added a commit that referenced this issue Oct 27, 2021
Confirm non-issue with how `IRac` handles LG(2) swingv by reproducing what Tasmota _should_ be doing with user input.

For #1651
Ref #1513
@crankyoldgit
Copy link
Owner

FWIW, this was added, "fixed", and tested in #1513 / #1530

I believe this is a Tasmota issue. i.e. How they are using our library, not a problem with the our library per se.
So, you probably need to raise an issue with them. I think the issue is with how they store the "previous" state of the A/C, if they are doing that at all. That's just an educated guess. Not confirmed in any way.

I've previously simulated & tested this non-issue in:

// Ref:
// https://github.com/crankyoldgit/IRremoteESP8266/issues/1513#issuecomment-877960010
// https://docs.google.com/spreadsheets/d/1zF0FI2ENvbLdk4zaWBY9ZYVM3MB_4oxro9wCM7ETX4Y/edit#gid=348220307&range=A49:C49
TEST(TestIRac, Issue1513) {
// Simulate sending a state with a SwingV auto, then followed by a SwingV Off.
IRLgAc ac(kGpioUnused);
IRac irac(kGpioUnused);
IRrecv capture(kGpioUnused);
ac.begin();
// IRhvac {"Vendor":"LG2", "Model": 3, "Power": "On", "Mode": "Heat",
// "Temp": 26, "FanSpeed": "min", "SwingV": "Auto", "Light": "On"}
ac._irsend.reset();
irac.lg(&ac,
lg_ac_remote_model_t::AKB74955603, // Model
true, // Power
stdAc::opmode_t::kHeat, // Mode
26, // Degrees C
stdAc::fanspeed_t::kMin, // Fan speed
stdAc::swingv_t::kAuto, // Vertical swing
stdAc::swingv_t::kHighest, // Vertical swing (previous)
stdAc::swingh_t::kOff, // Horizontal swing
true); // Light
ac._irsend.makeDecodeResult();
// All sent, we assume the above works. Just need to switch to swing off now.
ac._irsend.reset();
ac.stateReset();
ac.send();
// IRhvac {"Vendor":"LG2", "Model": 3, "Power": "On", "Mode": "Heat",
// "Temp": 26, "FanSpeed": "min", "SwingV": "Off", "Light": "On"}
ac._irsend.makeDecodeResult();
ac._irsend.reset();
irac.lg(&ac,
lg_ac_remote_model_t::AKB74955603, // Model
true, // Power
stdAc::opmode_t::kHeat, // Mode
26, // Degrees C
stdAc::fanspeed_t::kMin, // Fan speed
stdAc::swingv_t::kOff, // Vertical swing
stdAc::swingv_t::kAuto, // Vertical swing (previous)
stdAc::swingh_t::kOff, // Horizontal swing
true); // Light
ac._irsend.makeDecodeResult();
// There should only be two messages.
EXPECT_EQ(121, ac._irsend.capture.rawlen);
// First message should be normal.
EXPECT_TRUE(capture.decode(&ac._irsend.capture));
ASSERT_EQ(LG2, ac._irsend.capture.decode_type); // Not "LG"
ASSERT_EQ(kLgBits, ac._irsend.capture.bits);
ASSERT_EQ(
"Model: 2 (AKB75215403), Power: On, Mode: 4 (Heat), Temp: 26C,"
" Fan: 0 (Quiet)",
IRAcUtils::resultAcToString(&ac._irsend.capture));
// The next should be a SwingV Off.
EXPECT_TRUE(capture.decodeLG(&ac._irsend.capture, 61));
ASSERT_EQ(LG2, ac._irsend.capture.decode_type); // Not "LG"
ASSERT_EQ(kLgBits, ac._irsend.capture.bits);
EXPECT_EQ(kLgAcSwingVOff, ac._irsend.capture.value);
ASSERT_EQ("Model: 3 (AKB74955603), Swing(V): 21 (Off)",
IRAcUtils::resultAcToString(&ac._irsend.capture));
}

However, I've constructed yet another test to simulate your exact scenario just to make sure.
It confirms the library is doing what it should be doing.
e.g.

// Ref:
// https://github.com/crankyoldgit/IRremoteESP8266/issues/1651#issuecomment-952811720
TEST(TestIRac, Issue1651) {
// Simulate sending a state with a SwingV off, then followed by a SwingV Auto.
IRLgAc ac(kGpioUnused);
IRac irac(kGpioUnused);
IRrecv capture(kGpioUnused);
ac.begin();
// IRhvac {"Vendor":"LG2","Model":3,"Mode":"Auto","Power":"On","Celsius":"On",
// "Temp":15,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off",
// "Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On",
// "Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}
ac._irsend.reset();
irac.lg(&ac,
lg_ac_remote_model_t::AKB74955603, // Model
true, // Power
stdAc::opmode_t::kAuto, // Mode
15, // Degrees C (Note: 16C is min)
stdAc::fanspeed_t::kAuto, // Fan speed
stdAc::swingv_t::kOff, // Vertical swing
stdAc::swingv_t::kOff, // Vertical swing (previous)
stdAc::swingh_t::kOff, // Horizontal swing
true); // Light
ac._irsend.makeDecodeResult();
// As we are not making a change of the SwingV state, there should only be
// one message. (i.e. 60 + 1)
EXPECT_EQ(61, ac._irsend.capture.rawlen);
EXPECT_TRUE(capture.decode(&ac._irsend.capture));
ASSERT_EQ(LG2, ac._irsend.capture.decode_type); // Not "LG"
ASSERT_EQ(kLgBits, ac._irsend.capture.bits);
ASSERT_EQ(
"Model: 2 (AKB75215403), Power: On, Mode: 3 (Auto), Temp: 16C, "
"Fan: 5 (Auto)",
IRAcUtils::resultAcToString(&ac._irsend.capture));
ac._irsend.reset();
ac.stateReset();
ac.send();
// IRhvac {"Vendor":"LG2","Model":3,"Mode":"Auto","Power":"On","Celsius":"On",
// "Temp":15,"FanSpeed":"Max","SwingV":"Auto","SwingH":"Off",
// "Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On",
// "Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}
ac._irsend.makeDecodeResult();
ac._irsend.reset();
irac.lg(&ac,
lg_ac_remote_model_t::AKB74955603, // Model
true, // Power
stdAc::opmode_t::kAuto, // Mode
15, // Degrees C (Note: 16C is min)
stdAc::fanspeed_t::kMax, // Fan speed
stdAc::swingv_t::kAuto, // Vertical swing
stdAc::swingv_t::kOff, // Vertical swing (previous)
stdAc::swingh_t::kOff, // Horizontal swing
true); // Light
ac._irsend.makeDecodeResult();
// There should only be two messages.
EXPECT_EQ(121, ac._irsend.capture.rawlen);
// First message should be normal.
EXPECT_TRUE(capture.decode(&ac._irsend.capture));
ASSERT_EQ(LG2, ac._irsend.capture.decode_type); // Not "LG"
ASSERT_EQ(kLgBits, ac._irsend.capture.bits);
ASSERT_EQ(
"Model: 2 (AKB75215403), Power: On, Mode: 3 (Auto), Temp: 16C, "
"Fan: 4 (Maximum)",
IRAcUtils::resultAcToString(&ac._irsend.capture));
// The next should be a SwingV Off.
EXPECT_TRUE(capture.decodeLG(&ac._irsend.capture, 61));
ASSERT_EQ(LG2, ac._irsend.capture.decode_type); // Not "LG"
ASSERT_EQ(kLgBits, ac._irsend.capture.bits);
EXPECT_EQ(kLgAcSwingVSwing, ac._irsend.capture.value);
ASSERT_EQ("Model: 3 (AKB74955603), Swing(V): 20 (Swing)",
IRAcUtils::resultAcToString(&ac._irsend.capture));
}

small notice:
all functions of AC are controlled by LG, Model 1 protocol except swing, which is controlled by LG2 Model 3 one.
and when I send out "SwingV":"Auto" command, the AC unit beeps 3x - command not recognised?

Correct. All the Model 3 (AKB74955603) normal commands are the exact same as Model 1 commands. That is to be expected. You should continue to use Model 3 for all your settings. From decoding an incoming IR message, there is no way for us to know what model produced it, unless it includes some settings/features/bits that make it special. The swingV feature is exactly that.

As for the multiple beeps. That is to be expected. The LG2/AKB74955603 message to change the swing is a special code that doesn't include any normal settings. So, for the library to know it is setting the A/C to all the values you've requested, it sends a normal settings message, plus as many special command messages to know it has set the A/C to all the desired modes/settings. In the case of swingv. This means a normal + a swing message. i.e. Two messages.
To avoid extra beeps, the library offers the programmer the ability to remember the previous settings, and only send the second swing message if the swing setting changes. This may be the area Tasmota is tripping over, but that is not my problem/area/etc. You will need to raise it with them to investigate, and for them to get back to me if they think there is a problem elsewhere in this library.

@crankyoldgit crankyoldgit self-assigned this Oct 27, 2021
crankyoldgit added a commit that referenced this issue Oct 28, 2021
Confirm non-issue with how `IRac` handles LG(2) swingv by reproducing what Tasmota _should_ be doing with user input.

For #1651
Ref #1513
@zolonn
Copy link
Author

zolonn commented Nov 2, 2021

hi crankyoldgit,
thank you for your preliminary explanation. I would like to dive little bit deeper into it and build an IR-Receiver for your debug IRrecvDump app. let see what it brings.

crankyoldgit added a commit that referenced this issue Nov 19, 2021
_v2.8.0 (20211119)_

**[Bug Fixes]**
- Fix compilation issue when using old 8266 Arduino Frameworks. (#1639 #1640)
- Fix potential security issue with `scrape_supported_devices.py` (#1616 #1619)

**[Features]**
- SAMSUNG_AC
  - Change `clean` setting to a toggle. (#1676 #1677)
  - Highest fan speed is available without Powerful setting. (#1675 #1678)
  - Change `beep` setting to a toggle. (#1669 #1671)
  - Fix Beep for AR12TXEAAWKNEU (#1668 #1669)
  - Add support for Horizontal Swing & Econo (#1277 #1667)
  - Add support for On, Off, & Sleep Timers (#1277 #1662)
  - Fix power control. Clean-up code & bitmaps from Checksum changes. (#1277 #1648 #1650)
- HAIER_AC176/HAIER_AC_YRW02
  - Add support A/B unit setting (#1672)
  - Add support degree Fahrenheit (#1659)
  - Add support `Lock` function (#1652)
  - Implement horizontal swing feature (#1641)
  - Implement Quiet setting. (#1634 #1635)
- Basic support for Airton Protocol (#1670 #1681)
- HAIER_AC176: Add Turbo and Quiet settings (#1634)
- Gree: Add `SwingH` & `Econo` control. (#1587 #1653)
- MIRAGE
  - Add experimental detailed support. (#1573 #1615)
  - Experimental detailed support for KKG29A-C1 remote. (#1573 #1660)
- ELECTRA_AC: Add support for "IFeel" & Sensor settings. (#1644 #1645)
- Add Russian translation (#1649)
- Add Swedish translation (#1627)
- Reduce flash space used. (#1633)
- Strings finally in Flash! (#1493 #1614 #1623)
- Add support for Rhoss Idrowall MPCV 20-30-35-40 A/C protocol (#1630)
- Make `IRAc::opmodeToString()` output nicer for humans. (#1613)
- TCL112AC/TEKNOPOINT: Add support for `GZ055BE1` model (#1486 #1602)
- Support for Arris protocol. (#1598)
- SharpAc: Allow position control of SwingV (#1590 #1594)

**[Misc]**
- HAIER_AC176/HAIER_AC_YRW02
  - Replace some magic numbers with constants (#1679)
  - Small fix `Quiet` and `Turbo` test (#1674)
  - Fix `IRHaierAC176::getTemp()` return value description (#1663)
- Security Policy creation and changes. (#1616 #1617 #1618 #1621 #1680)
- IRrecvDumpV2/3: Update PlatformIO envs for missing languages (#1661)
- IRMQTTServer
  - Use the correct string for Fan mode in Home Assistant. (#1610 #1657)
  - Move a lot of the strings/text to flash. (#1638)
- Minor code style improvements. (#1656)
- Update Supported Devices
  - HAIER_AC176 (#1673)
  - LG A/C (#1651 #1655)
  - Symphony (#1603 #1605)
  - Epson (#1574 #1601)
  - GREE (#1587 #1588)
  - SharpAc (#1590 #1591)
- Add extra tests for LG2 protocol (#1654)
- Fix parameter expansion in several macros.
- Move some strings to `IRtext.cpp` & `locale/default.h` (#1637)
- RHOSS: Move include and defines to their correct places (#1636)
- Make makefile only build required files when running `run-%` target (#1632)
- Update Portuguese translation (#1628)
- Add possibility to run specific test case (#1625)
- Change `googletest` library ignore (#1626)
- Re-work "Fan Only" strings & matching. (#1610)
- Address `C0209` pylint warnings. (#1608)
crankyoldgit added a commit that referenced this issue Nov 19, 2021
## _v2.8.0 (20211119)_

**[Bug Fixes]**
- Fix compilation issue when using old 8266 Arduino Frameworks. (#1639 #1640)
- Fix potential security issue with `scrape_supported_devices.py` (#1616 #1619)

**[Features]**
- SAMSUNG_AC
  - Change `clean` setting to a toggle. (#1676 #1677)
  - Highest fan speed is available without Powerful setting. (#1675 #1678)
  - Change `beep` setting to a toggle. (#1669 #1671)
  - Fix Beep for AR12TXEAAWKNEU (#1668 #1669)
  - Add support for Horizontal Swing & Econo (#1277 #1667)
  - Add support for On, Off, & Sleep Timers (#1277 #1662)
  - Fix power control. Clean-up code & bitmaps from Checksum changes. (#1277 #1648 #1650)
- HAIER_AC176/HAIER_AC_YRW02
  - Add support A/B unit setting (#1672)
  - Add support degree Fahrenheit (#1659)
  - Add support `Lock` function (#1652)
  - Implement horizontal swing feature (#1641)
  - Implement Quiet setting. (#1634 #1635)
- Basic support for Airton Protocol (#1670 #1681)
- HAIER_AC176: Add Turbo and Quiet settings (#1634)
- Gree: Add `SwingH` & `Econo` control. (#1587 #1653)
- MIRAGE
  - Add experimental detailed support. (#1573 #1615)
  - Experimental detailed support for KKG29A-C1 remote. (#1573 #1660)
- ELECTRA_AC: Add support for "IFeel" & Sensor settings. (#1644 #1645)
- Add Russian translation (#1649)
- Add Swedish translation (#1627)
- Reduce flash space used. (#1633)
- Strings finally in Flash! (#1493 #1614 #1623)
- Add support for Rhoss Idrowall MPCV 20-30-35-40 A/C protocol (#1630)
- Make `IRAc::opmodeToString()` output nicer for humans. (#1613)
- TCL112AC/TEKNOPOINT: Add support for `GZ055BE1` model (#1486 #1602)
- Support for Arris protocol. (#1598)
- SharpAc: Allow position control of SwingV (#1590 #1594)

**[Misc]**
- HAIER_AC176/HAIER_AC_YRW02
  - Replace some magic numbers with constants (#1679)
  - Small fix `Quiet` and `Turbo` test (#1674)
  - Fix `IRHaierAC176::getTemp()` return value description (#1663)
- Security Policy creation and changes. (#1616 #1617 #1618 #1621 #1680)
- IRrecvDumpV2/3: Update PlatformIO envs for missing languages (#1661)
- IRMQTTServer
  - Use the correct string for Fan mode in Home Assistant. (#1610 #1657)
  - Move a lot of the strings/text to flash. (#1638)
- Minor code style improvements. (#1656)
- Update Supported Devices
  - HAIER_AC176 (#1673)
  - LG A/C (#1651 #1655)
  - Symphony (#1603 #1605)
  - Epson (#1574 #1601)
  - GREE (#1587 #1588)
  - SharpAc (#1590 #1591)
- Add extra tests for LG2 protocol (#1654)
- Fix parameter expansion in several macros.
- Move some strings to `IRtext.cpp` & `locale/default.h` (#1637)
- RHOSS: Move include and defines to their correct places (#1636)
- Make makefile only build required files when running `run-%` target (#1632)
- Update Portuguese translation (#1628)
- Add possibility to run specific test case (#1625)
- Change `googletest` library ignore (#1626)
- Re-work "Fan Only" strings & matching. (#1610)
- Address `C0209` pylint warnings. (#1608)
@crankyoldgit
Copy link
Owner

Any update? If not, I'm going to mark this closed.

@crankyoldgit
Copy link
Owner

Marking this closed now, as no response in over a month. Feel free to update and I'll re-open it.

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

No branches or pull requests

3 participants