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

IRMQTTServer: Web AC power control not behaving as expected #1739

Closed
crankyoldgit opened this issue Jan 20, 2022 · 4 comments · Fixed by #1740
Closed

IRMQTTServer: Web AC power control not behaving as expected #1739

crankyoldgit opened this issue Jan 20, 2022 · 4 comments · Fixed by #1740
Assignees

Comments

@crankyoldgit
Copy link
Owner

By carrying out a new test, I found that it was the "mode" parameter that allowed to turn off and not the "power" parameter.

Ahhhh. That makes all the difference in pinpointing the issue.

You need to change this parameter to false:

// Use Home Assistant-style operation modes.
// TL;DR: Power and Mode are linked together. One changes the other.
// i.e.
// - When power is set to "off", the mode is set to "off".
// - When the mode changes from "off" to something else, power is set to "on".
// See: https://www.home-assistant.io/components/climate.mqtt/#modes
// *** WARNING ***
// This setting will cause IRMQTTServer to forget what the previous operation
// mode was. e.g. a power "on" -> "off" -> "on" will cause it to use the
// default mode for your A/C, not the previous mode.
// Typically this is "Auto" or "Cool" mode.
// Change to false, if your home automation system doesn't like this, or if
// you want IRMQTTServer to be the authoritative source for controling your
// A/C.
#define MQTT_CLIMATE_HA_MODE true

i.e.

#define MQTT_CLIMATE_HA_MODE false

I'll look into fixing it (power doing what is expected via the web interface) in your scenario. That's sort of a bug. But now I know what is causing it at least. Phew!!

Originally posted by @crankyoldgit in #1729 (comment)

@crankyoldgit crankyoldgit self-assigned this Jan 20, 2022
crankyoldgit added a commit that referenced this issue Jan 20, 2022
- Fix the case when `MQTT_CLIMATE_HA_MODE` is enabled & Home Assistant is NOT being used, and `power` is turned off via the http interface, that it also sets the `mode` to Off, and viceversa. Mode "Off" also sets Power "Off".
- Move some literal strings to constants for consistency.
  - Helps with potential internationalisation.
- Bump version patch number.

Ref #1729
Fixes #1739
@crankyoldgit
Copy link
Owner Author

@step3528 Can you please download and try out IRMQTTServer from branch: https://github.com/crankyoldgit/IRremoteESP8266/tree/irmqttserver_161

I think that will fix "power" control via the web interface. I haven't tested it, as it easier for you to test it in your environment. I think that should fix it.

Please let me know.

@step3528
Copy link

Yes this solved the problem.

thank you

@crankyoldgit
Copy link
Owner Author

Huzzah!

crankyoldgit added a commit that referenced this issue Jan 20, 2022
- Fix the case when `MQTT_CLIMATE_HA_MODE` is enabled & Home Assistant is NOT being used, and `power` is turned off via the http interface, that it also sets the `mode` to Off, and viceversa. Mode "Off" also sets Power "Off".
- Move some literal strings to constants for consistency.
  - Helps with potential internationalisation.
- Bump version patch number.

Ref #1729
Fixes #1739
crankyoldgit added a commit that referenced this issue Mar 14, 2022
_v2.8.2 (20220314)_

**[Bug Fixes]**
- ESP32-C3: Fix reboot/crashes on ESP32-C3s when receiving. (#1768 #1751)

**[Features]**
- HITACHI_AC296: Add `IRac` class support & tests. (#1776 #1758 #1757)
- Support for Hitachi RAS-70YHA3 (remote RAR-3U3) (#1758 #1757)
- LG: Add Swing Toggle support for Model `LG6711A20083V` (#1771 #1770)
- IRMQTTServer: add `MQTT_SERVER_AUTODETECT_ENABLE` via mqtt mDNS (#1769)
- Experimental basic support for Kelon 168 bit / 21 byte protocol. (#1747 #1745 #1744)
- MitsubishiAC: Tweak repeat gap timing. (#1760 #1759)
- Gree YAP0F8 (Detected as Kelvinator) vertical position set support (#1756)
- Make KELON (48 bit) protocol decoding stricter. (#1746 #1744)
- IRMQTTServer V1.6.1 (#1740 #1739 #1729)
- HITACHI_AC264: Add minimal detailed support. (#1735 #1729)
- LG2: Improve Light toggle msg handling. (#1738 #1737)
- MIDEA: Add support for Quiet, Clean & Freeze Protect controls. (#1734 #1733)
- Add basic support for HITACHI_AC264 264bit protocol. (#1730 #1729)
- ESP32-C3: Work around for some C3 specific compiler issues again. (#1732 #1695)

**[Misc]**
- MIDEA: Update supported devices (#1774 #1773 #1716)
- Update devices supported by ELECTRA_AC (#1766 #1765)
- Improve documentation for `encodePioneer()` (#1761 #1749)
- Update (un)supported DAIKIN128 devices. (#1752)
- Refactor `decodeCOOLIX()` code & add another test case. (#1750 #1748)
- Simplify code based on state_t being initialised by default. (#1736 #1699)
- Add comments to help Teknopoint users. (#1731 #1728)
- Fix library version string calculation. (#1727 #1725)
- Confirm we can reproduce `TurnOnFujitsuAC.ino` via IRac/IRMQTTServer. (#1726 #1701)
crankyoldgit added a commit that referenced this issue Mar 15, 2022
##_v2.8.2 (20220314)_

**[Bug Fixes]**
- ESP32-C3: Fix reboot/crashes on ESP32-C3s when receiving. (#1768 #1751)

**[Features]**
- HITACHI_AC296: Add `IRac` class support & tests. (#1776 #1758 #1757)
- Support for Hitachi RAS-70YHA3 (remote RAR-3U3) (#1758 #1757)
- LG: Add Swing Toggle support for Model `LG6711A20083V` (#1771 #1770)
- IRMQTTServer: add `MQTT_SERVER_AUTODETECT_ENABLE` via mqtt mDNS (#1769)
- Experimental basic support for Kelon 168 bit / 21 byte protocol. (#1747 #1745 #1744)
- MitsubishiAC: Tweak repeat gap timing. (#1760 #1759)
- Gree YAP0F8 (Detected as Kelvinator) vertical position set support (#1756)
- Make KELON (48 bit) protocol decoding stricter. (#1746 #1744)
- IRMQTTServer V1.6.1 (#1740 #1739 #1729)
- HITACHI_AC264: Add minimal detailed support. (#1735 #1729)
- LG2: Improve Light toggle msg handling. (#1738 #1737)
- MIDEA: Add support for Quiet, Clean & Freeze Protect controls. (#1734 #1733)
- Add basic support for HITACHI_AC264 264bit protocol. (#1730 #1729)
- ESP32-C3: Work around for some C3 specific compiler issues again. (#1732 #1695)

**[Misc]**
- MIDEA: Update supported devices (#1774 #1773 #1716)
- Update devices supported by ELECTRA_AC (#1766 #1765)
- Improve documentation for `encodePioneer()` (#1761 #1749)
- Update (un)supported DAIKIN128 devices. (#1752)
- Refactor `decodeCOOLIX()` code & add another test case. (#1750 #1748)
- Simplify code based on state_t being initialised by default. (#1736 #1699)
- Add comments to help Teknopoint users. (#1731 #1728)
- Fix library version string calculation. (#1727 #1725)
- Confirm we can reproduce `TurnOnFujitsuAC.ino` via IRac/IRMQTTServer. (#1726 #1701)
@crankyoldgit
Copy link
Owner Author

FYI, the changes mentioned above have now been included in the new v2.8.2 release of the library.

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

Successfully merging a pull request may close this issue.

2 participants