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

WHIRLPOOL_AC related issues. #6

Closed
the-mentor opened this issue Jun 14, 2020 · 39 comments
Closed

WHIRLPOOL_AC related issues. #6

the-mentor opened this issue Jun 14, 2020 · 39 comments

Comments

@the-mentor
Copy link

the-mentor commented Jun 14, 2020

Dear developer first let me start by saying this is an amazing piece of work so thank you very much !

I'm trying to get it to work with my A/C unit that is using the WHIRLPOOL_AC protocol.

It seems like the device uses the "Off" Power and Mode options when its making changes to degrees etc and the this seems to trick this module to think the device is shut off.
Here is an example of a temperature set

{"Vendor":"WHIRLPOOL_AC","Model":2,"Power":"Off","Mode":"Off","Celsius":"On","Temp":27,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}

and another capture with 1 degree up

{"Vendor":"WHIRLPOOL_AC","Model":2,"Power":"Off","Mode":"Off","Celsius":"On","Temp":28,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}

I will be happy to assist in troubleshooting this issue.
Thanks in advance !
-DM

@hristo-atanasov
Copy link
Owner

hristo-atanasov commented Jun 23, 2020

Yes, in my HA thread there is another guy with the same problem and I'll make some changes to the code to help you both, when I have time, because currently I don't have time for that. Please be patient. :)

This is a link to the HA thread for my custom component. :)

https://community.home-assistant.io/t/tasmota-mqtt-irhvac-controler

@the-mentor
Copy link
Author

@hristo-atanasov I have found some more info about the way this A/C codes operate.

I also would like to sponsor your work on this issue so please let me know how much would you like.

Thanks!!
DM

@hristo-atanasov
Copy link
Owner

@hristo-atanasov I have found some more info about the way this A/C codes operate.

I also would like to sponsor your work on this issue so please let me know how much would you like.

Thanks!!
DM

Tell me more about how your remote operates. :) I appreciate, that you like to sponsor my work, but I'm super busy for next week or two on my job, which is also programming and we have a critical tasks to do, so I really can't take the risk to promise any period, that the issue will be solved within. But my development, outside of my job responsibilities, are always free, as this is a way for me to be in help of some people, that need someone who can help them with some programming skills, knowledge and ideas. :) Despite my tough schedule, I promise, I'll try fix this issue as soon as possible. :)

@the-mentor
Copy link
Author

the-mentor commented Jun 23, 2020

hi @hristo-atanasov I just wanted to donate no obligation of time frame or etc.
I appreciate your help and hard work!

As far as the AC it seems that my remote user the
Power: Off state in order to send commands that make changes like changing degrees etc and the Power: On for toggling the unit on and off

So for example when i want to change the temperature to 25 degrees i need to send the following JSON
its important the mode is set to the correct mode rather then just "Off" in the below example i send it with the "Cool" Mode.

{"Vendor":"WHIRLPOOL_AC","Model":2,"Power":"Off","Mode":"Cool","Celsius":"On","Temp":28,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}

Also when sending commands via the remotes i see the changes on the home assistant widget but its grayed out my guess its because it sends it with the Power: Off command.

I hope it makes sense.
If you have any more questions please let me know !
keep up the good work.
-DM

@the-mentor
Copy link
Author

Hi @hristo-atanasov I know you're busy.
I just wanted to check if you had a chance to have a look at this issue?

thank you very much !

@yoav-SF
Copy link

yoav-SF commented Jul 21, 2020

Hi, i too had the same problem.
After some investigation, i think the fix needs to be in tasmota firmware and not in this integration.
This AC (and many others) use the power button as a toggle of state, so no way to figure out the current state of the AC without keeping track of all the commands received, both from HA and the remote as well.
What i think should be done is to add internal state for each A/C vendor+module (to support more then one ac from one controller) and also allow MQTT message to change internal state (for initialization, ex)

I did a quick patch for my self, adding the internal state to the plugin, but its very buggy, you should write the state to file to recover from HA reset, also you need to hold the AC mode as tasmota hardcodded change mode to OFF in received ir commands if power is OFF (stiil you cant detect mode change from remote without power toggle).

@the-mentor
Copy link
Author

Hi @yoav-SF,
I would love to see the workaround you setup for yourself.
I think Tasmota pulls its IR related stuff from another project but I agree that ideally it will be patched upstream.
I just don't know if the remote sends the commands differently or the way Tasmota is interpreting the commands is different.

@the-mentor
Copy link
Author

@yoav-SF and @hristo-atanasov I've opened a case with the original IR library that Tasmota is using.
Hopefully, the can help us out
crankyoldgit/IRremoteESP8266#1228

@crankyoldgit
Copy link

For the whirlpool protocol, power control is a toggle setting (See https://crankyoldgit.github.io/IRremoteESP8266/doxygen/html/classIRWhirlpoolAc.html#a61bec25edce5bc244acb41f79df561e7)
The remote sends the same signal for on as it does for off.
I.e. The protocol lacks the ability to tell the device to be "on" or "off", directly. It only has the ability to say "change the power setting from what it was".

@crankyoldgit
Copy link

Yes, you have to track the power state yourself in your project. For an example, see IRMQTTServer's code & handleToggles().
https://github.com/crankyoldgit/IRremoteESP8266/blob/857a9eed7e38333734f9f4bd8f070a4703886609/src/IRac.cpp#L1945

@the-mentor
Copy link
Author

the-mentor commented Aug 22, 2020

@hristo-atanasov looks like the Tasmota guys wont fix it in their firmware so the only option we have to to implement it in integration :(

arendst/Tasmota#9004

also maybe @RisinT96 ?

thanks in advance for all the hard work !

@RisinT96
Copy link
Collaborator

RisinT96 commented Aug 22, 2020

@hristo-atanasov looks like the Tasmota guys wont fix it in their firmware so the only option we have to to implement it in integration :(

arendst/Tasmota#9004

also maybe @RisinT96 ?

thanks in advance for all the hard work !

For the right price anything is possible 😉 just kidding 😛

I'll see if I have time to look into it 😃.

Patching/hacking it for a single manufacturer is very simple, gotta think of a more robust/flexible solution.

@the-mentor
Copy link
Author

@RisinT96 this integration would make a big difference in my life and I'm willing to throw a few shekels your way if you can help make it happen :D

@RisinT96
Copy link
Collaborator

Ahah no need, I'll take care of it soon enough, gotta do some cleanup PRs first :)

@RisinT96
Copy link
Collaborator

RisinT96 commented Sep 4, 2020

Hey,

I've implemented an initial version, don't have a whilpool ac so I can't test it, please test it and respond with details 😄

Currently if you control it via your regular remote it will not update power state in home assistant, I'm not sure how to handle that, but I think it's for the better since this will allow you to sync the power mode between HA and the AC (in case you restart the server and it gets out of sync with the actual AC)

To test it checkout the code from the following branch: https://github.com/hristo-atanasov/Tasmota-IRHVAC/tree/toggle-mode

You have to add a new parameter to the configuration:

power_toggle: true

I'll be waiting for your response.

@the-mentor
Copy link
Author

the-mentor commented Sep 6, 2020

Hi @RisinT96 I finally got around to testing your fix out.
It seems to behave much better then the regular version but there is an issue.
When i change the temperature in home assistant the device light seems to turn off.
After some investigation i think its because its sending "Light":"Off" in the JSON command

This is the bad one

IRHVAC {"Vendor":"WHIRLPOOL_AC","Model":2,"Power":"Off","Mode":"Cool","Celsius":"On","Temp":24,"FanSpeed":"Min","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"Off","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}

it should be this

IRHVAC {"Vendor":"WHIRLPOOL_AC","Model":2,"Power":"Off","Mode":"Cool","Celsius":"On","Temp":21,"FanSpeed":"Max","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}}

I hope it makes sense.

P.S - Thanks a bunch for working on this.
-DM

@RisinT96
Copy link
Collaborator

RisinT96 commented Sep 6, 2020

Hi @RisinT96 I finally got around to testing your fix out.
It seems to behave much better then the regular version but there is an issue.
When i change the temperature in home assistant the device light seems to turn off.
After some investigation i think its because its sending "Light":"Off" in the JSON command

This is the bad one

IRHVAC {"Vendor":"WHIRLPOOL_AC","Model":2,"Power":"Off","Mode":"Cool","Celsius":"On","Temp":24,"FanSpeed":"Min","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"Off","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}

it should be this

IRHVAC {"Vendor":"WHIRLPOOL_AC","Model":2,"Power":"Off","Mode":"Cool","Celsius":"On","Temp":21,"FanSpeed":"Max","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}}

I hope it makes sense.

P.S - Thanks a bunch for working on this.
-DM

Hey,

Add this line to your config file:

default_light_mode: "On"

@dborsnich
Copy link

Hi, i have same issue with an air in Argentina with BGH brand. It use a Whirpool protocol
When i send a temepertare command, it turn on, and other turn off
thanks!

@RisinT96
Copy link
Collaborator

RisinT96 commented Sep 8, 2020

hi @dborsnich, please try out my fix as mentioned here

@dborsnich
Copy link

With new irhvac version appear
Invalid config for [climate.tasmota_irhvac]: [power_toggle] is an invalid option for [climate.tasmota_irhvac]. Check: climate.tasmota_irhvac->power_toggle. (See ?, line ?).
Thanks!

@RisinT96
Copy link
Collaborator

RisinT96 commented Sep 8, 2020

Make sure you actually use the code from my branch, not just added the configuration.

@dborsnich
Copy link

@RisinT96
Copy link
Collaborator

RisinT96 commented Sep 8, 2020

yes.

@dborsnich
Copy link

Yes, i use that but told me this issue
I could add the the defaul_light_mode but not the power Toggle.
Other issue is when i touch turn on off key in climate thermostat card, it never change the state, but i can hear the command in the air

@RisinT96
Copy link
Collaborator

RisinT96 commented Sep 8, 2020

I could add the the defaul_light_mode but not the power Toggle.

default_light_mode is available in the current master branch, it's not new.
power_toggle is a new option that's only available in the new branch, so make sure that:

  • You're using new code from the branch - don't forget to restart home-assistant to apply the change
  • The configuration line is exactly power_toggle: true

If that doesn't work please provide full configuration + logs.

Other issue is when i touch turn on off key in climate thermostat card, it never change the state, but i can hear the command in the air

If you read my previous comment you would've known this is not currently supported, and I quote:

Currently if you control it via your regular remote it will not update power state in home assistant, I'm not sure how to handle that, but I think it's for the better since this will allow you to sync the power mode between HA and the AC (in case you restart the server and it gets out of sync with the actual AC)

@dborsnich
Copy link

ok, i will try again, i have to return to this house. I will do some test in my labo

Thanks for your faster response and support!

@the-mentor
Copy link
Author

@RisinT96 I can confirm that the integration works as expected works with the default_light_mode: "On" setting as far as changing the temperature etc.

There are still issues with the way the power on/off works.
Mainly with the way the off button works.
the off button doesn't seem to turn off the unit but the "Cool" button toggles the power state of the unit only when it thinks the unit is off.

I hope it makes sense.
-DM

@RisinT96
Copy link
Collaborator

RisinT96 commented Sep 8, 2020

@the-mentor ahah what the heck.

I'll look into it.
What happens when you try to "toggle" the other modes except cooling?

@the-mentor
Copy link
Author

@RisinT96 after playing with it for a few days it seems like the only issues i can see are as follows

  1. Temperature changes from the remote do not reflect in home assistant.
  2. Pressing the "Off" button in home assistant doesn't power off the device.

Everything else seems to work great !!
Keep up the great work!

-DM

@RisinT96
Copy link
Collaborator

Hi @the-mentor,

Can you post the values received by tasmota when you change the temperature through the remote?

I'll try to find some time this week to fix it.

Tal.

@the-mentor
Copy link
Author

Hi @RisinT96,

Below are two temperature via the remote as they appear in tasmota.
Let me know if you need anything else.

08:41:48 MQT: tele/ir_study/RESULT = {"IrReceived":{"Protocol":"WHIRLPOOL_AC","Bits":168,"Data":"0x0x83060182000081020000000000000002000008000A","Repeat":0,"IRHVAC":{"Vendor":"WHIRLPOOL_AC","Model":2,"Power":"Off","Mode":"Off","Celsius":"On","Temp":24,"FanSpeed":"Max","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}}
08:42:33 MQT: tele/ir_study/RESULT = {"IrReceived":{"Protocol":"WHIRLPOOL_AC","Bits":168,"Data":"0x0x83060192000081030000000000110002000008000A","Repeat":0,"IRHVAC":{"Vendor":"WHIRLPOOL_AC","Model":2,"Power":"Off","Mode":"Off","Celsius":"On","Temp":25,"FanSpeed":"Max","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}}

Again thank you for your amazing work !
-DM.

@ayavilevich
Copy link

Hi @the-mentor , @RisinT96 and others.

I have made some modifications to tasmota so it uses IRRemote properly and keeps state.
See my fork at https://github.com/ayavilevich/Tasmota
You can clone and build the sources or you can grab the binary from releases.
Please try on your setups. It works for my Electra/Airwell AC with power toggle.

@the-mentor
Copy link
Author

Hi @the-mentor , @RisinT96 and others.

I have made some modifications to tasmota so it uses IRRemote properly and keeps state.
See my fork at https://github.com/ayavilevich/Tasmota
You can clone and build the sources or you can grab the binary from releases.
Please try on your setups. It works for my Electra/Airwell AC with power toggle.

Do you have a pre built binary somewhere?

@ayavilevich
Copy link

Do you have a pre built binary somewhere?

yes, at https://github.com/ayavilevich/Tasmota/releases/tag/v0.1

@the-mentor
Copy link
Author

@ayavilevich I just installed your version of tasmota and the switch the official tasmota-irhvac version of custom component.
Almost everything works great except the power button in home assistant.

I also noticed that both of us live in israel :D
if you have twitter you can reach me there if you can help me debug the power off issue.
thanks

https://twitter.com/the_mentor

@ayavilevich
Copy link

@the-mentor

@ayavilevich I just installed your version of tasmota and the switch the official tasmota-irhvac version of custom component.

Great. Can you clarify what you mean by "the switch the official tasmota-irhvac version". Did you go back to the default tasmota-irhvac configuration? The fix at the tasmota level is supposed to work with tasmota-irhvac without the power_toggle parameter. Also make sure to restart after config change. Also make sure that the AC is off when you are restating tasmota and HA.
The advantage of this method compared to having it fixed in tasmota-irhvac with power_toggle is that it will also work if you change the AC with the original remote.

Almost everything works great except the power button in home assistant.

Well, that is the most important part. :)
Can you elaborate on what doesn't work?
Maybe it will be better not to debug here but switch to https://github.com/ayavilevich/Tasmota/issues . Please provide logs from tasmota's console and a description of what was pressed.

I also noticed that both of us live in israel :D
if you have twitter you can reach me there if you can help me debug the power off issue.
thanks
https://twitter.com/the_mentor

Indeed. I don't use twitter. How about Facebook? See relevant thread at https://www.facebook.com/groups/801414950005336/permalink/2323013114512171/

@the-mentor
Copy link
Author

For the first time since I began this IR journy everything works thanks to a Custom build of Tasmota.
With the custom version of tasmota no changes are required to this project which is why I'm closing this ticket.
@ayavilevich helped me work on a temporary fix and we're hoping to find a solution upstream.

https://github.com/ayavilevich/Tasmota/releases/tag/v0.2

thanks @RisinT96 for your hard work and dedication in trying to help resolve this issue.
cc @yoav-SF

@ayavilevich
Copy link

Happy I could help.
Thanks all for this open source.
Unfortunately this issue couldn't be solved at the Tasmota-IRHVAC level because the tasmota has special logic (for HA??) where when power == "off" then mode is forced to be "off" too. This way, for a toggle AC, a change in mode alone at the remote would look to the HA as mode == "off". So the value of field "mode" gets lost and you can't guess it.

@dborsnich
Copy link

dborsnich commented Oct 3, 2020 via email

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

7 participants