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

WiFi module goes off, when I turn off AC from remote #3

Open
vlad-323 opened this issue Oct 31, 2023 · 8 comments
Open

WiFi module goes off, when I turn off AC from remote #3

vlad-323 opened this issue Oct 31, 2023 · 8 comments

Comments

@vlad-323
Copy link

Hello. I made device from this project: https://blog.instalator.ru/archives/433 flashed your firmware and connect to my CooperHunter AC (model CH-S12FTXQ-NG). All working good, but I found one unpleasant bug: when I turn off AC from remote - WiFi module disconnects from network, builtin led in ESP-12 module goes blinking, and I, of course, can't control AC from my Home Assistant. But, when I turn on AC from remote - WiFi module connect and all working good. Also, turn off AC from HA working well. I can make some tests with my AC, if it can help you find a bug.

@bekmansurov
Copy link
Owner

Hello. I don't even have any idea about the reasons for this behavior.
Perhaps the reason is some difference in the control packages, but unfortunately the AC unit does not send anything to the module if the air conditioner is controlled by IR remote control.
You can try set the VERBOSE logging level in the .yaml, try turning off/on the air conditioner and send me a certain number of received logs here or by email. It also may help to understand what is happening when you turn AC off by remote.

@vlad-323
Copy link
Author

vlad-323 commented Nov 3, 2023

Last message, that I received before module goes unacessiable:
12:14:36 [V] [gree:373] Sent message:
12:14:36 [V] [gree:380] 7E 7E 2C 01 00 00 00 00 C1 40 02 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 32
Also I saw, that module goes off, if i pressed a "WiFi" button on remote (YAA1FB6)

@bekmansurov
Copy link
Owner

OK, thank you. I'll check this later, but this is the normal behavior of the Wi-Fi button on the IR remote. It turns the module off/on.

@vlad-323
Copy link
Author

vlad-323 commented Nov 3, 2023

OK, thank you. I'll check this later, but this is the normal behavior of the Wi-Fi button on the IR remote. It turns the module off/on.

Can you help me understand, how to disable this feature? I don't want to turn off WiFi module by pressing "WiFi" button.

@bekmansurov
Copy link
Owner

I don't know how to disable this button and I'm not sure there is a way to do it.
But I suppose you have no wifi icon on your IR remote when you control it. And that's the reason why your module is turning off.

@GabyPCgeeK
Copy link

Since the log ends before showing received data it probably means that since turning the AC off using the remote it keeps the AC_MODE and only changes the ON/OFF bit the "ON/OFF, MODE, SLEEP, FAN" byte would end up something like 0x41. Since in the code 0x40 is not in the AC_MODE list it tries to call ESP_LOGW(TAG, "Unknown AC MODE&fan: %s", data[MODE]); but since the format string has %s and the value is not a string it crashes and continues to crash while it receives the same packet. That's most likely why it doesn't reconnect.

When you press the "WiFi" button does the module keeps powered on or does it lose power? If it keeps powered on then most likely the issue is the same as above.

I've uploaded some modified code for you to try.
gree.zip

@vlad-323
Copy link
Author

vlad-323 commented Nov 14, 2023

Hello. Sorry for delay, I was busy. I tried your fix and now I see next:

  • when I pressed WiFi button, ESP continue working, as nothing happened (in "default" code module goes inactive)
  • when I pressed ON/OFF button, ESP goes inactive. In console I see next logs:
09:28:21 [V] [gree:373] Sent message:
09:28:21 [V] [gree:380] 7E 7E 2C 01 00 00 00 00 C1 40 02 02 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52
09:28:21 [VV ][scheduler:225] Running interval 'update' with interval=1000 last_execution=735111 (now=736111)

@najdanovicivan
Copy link

I've had the same issue with Bergen AC I've tried with @GabyPCgeeK modified code and I can confirm it's working without rebooting

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

No branches or pull requests

4 participants