hristo-atanasov / Tasmota-IRHVAC

Home Assistant platform for controlling IR Air Conditioners via Tasmota IRHVAC command and compatible hardware
187 stars 64 forks source link

Problem to turn OFF AC #59

Closed leranp closed 2 years ago

leranp commented 2 years ago

Hi, my AC is ECOCLIM, The remote control commend to turn OFF the AC is "IRHVAC":{"Vendor":"ECOCLIM","Model":-1,"Mode":"Auto","Power":"Off","Celsius":"On","Temp":17,"FanSpeed":"Min","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"Off","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}}

but if i press OFF in HA it send wrong {"IRHVAC":{"Vendor":"ECOCLIM","Model":-1,"Mode":"Off","Power":"Off","Celsius":"On","Temp":25,"FanSpeed":"Low","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"Off","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}

the Mode need to be Auto this is why my AC doesn't turn OFF

what can i do to make it work?

Thanks

nao-pon commented 2 years ago

@leranp What version of Tasmota are you using? A PR that may solve this problem have been merged in the past. This requires Tasmota v9.3.0 or higher.

leranp commented 2 years ago

@leranp What version of Tasmota are you using? A PR that may solve this problem have been merged in the past. This requires Tasmota v9.3.0 or higher.

didn't worked, pycache folder was deleted i am using

Program Version | 10.1.0(ir) -- | --

17:56:57.970 MQT: ac_dumper_guest/stat/RESULT = {"IRHVAC":{"Vendor":"ECOCLIM","Model":-1,"Mode":"Off","Power":"Off","Celsius":"On","Temp":0,"FanSpeed":"Min","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"Off","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}

nao-pon commented 2 years ago

@leranp ok,

https://github.com/hristo-atanasov/Tasmota-IRHVAC/blob/2d40d64541048060faf1a5f4f30a5e6f2d4dd191/custom_components/tasmota_irhvac/climate.py#L823-L827

Please try commet out to L.825

     # self._hvac_mode = STATE_OFF
leranp commented 2 years ago

@leranp ok,

https://github.com/hristo-atanasov/Tasmota-IRHVAC/blob/2d40d64541048060faf1a5f4f30a5e6f2d4dd191/custom_components/tasmota_irhvac/climate.py#L823-L827

Please try commet out to L.825

     # self._hvac_mode = STATE_OFF

Didn't worked, do i need to delete the temp folder before HA restart? ECOCLIM","Model":-1,"Mode":"Off","Power":"Off",

nao-pon commented 2 years ago

I was misunderstanding. It's okay to undo the previous changes.

Try adding the following settings to your tasmota_irhvac air conditioner settings yaml.

keep_mode_when_off : True
leranp commented 2 years ago

I was misunderstanding. It's okay to undo the previous changes.

Try adding the following settings to your tasmota_irhvac air conditioner settings yaml.

keep_mode_when_off : True

Thank you, it worked. You need to add this option in the configuration file example, this option isn't mentioned in this component

leranp commented 2 years ago

I think there is a problem with the ir code that he is sending. The commend isn't received in the AC unit. This is the result from turning OFF via the remote

{"IrReceived":{"Protocol":"ECOCLIM","Bits":56,"Data":"0x100C0558FFFF72","DataLSB":"0x830A01AFFFF4E","Repeat":0,"IRHVAC":{"Vendor":"ECOCLIM","Model":-1,"Mode":"Auto","Power":"Off","Celsius":"On","Temp":17,"FanSpeed":"Min","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"Off","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}`
hristo-atanasov commented 2 years ago

It seems the problem might be the Temp and/or FanSpeed. May be your AC expects also the Temp to be 17 and/or the FanSpeed to be Min. I think it is time to implement a new config key called custom_off_command where people with such problems to include the full json result from the real remote OFF button .. With so many brands and protocols we can't stay on the "one-size-fits-all" track anymore .. :\ Or we can have multiple keys with their respecting OFF values, like "off_temp", "off_fan_speed", etc .. And in the code we can check if it is set in the config and send OFF values, instead of the current values ..

leranp commented 2 years ago

It seems the problem might be the Temp and/or FanSpeed. May be your AC expects also the Temp to be 17 and/or the FanSpeed to be Min. I think it is time to implement a new config key called custom_off_command where people with such problems to include the full json result from the real remote OFF button .. With so many brands and protocols we can't stay on the "one-size-fits-all" track anymore .. :\ Or we can have multiple keys with their respecting OFF values, like "off_temp", "off_fan_speed", etc .. And in the code we can check if it is set in the config and send OFF values, instead of the current values ..

After some test i figured out that the code to turn off when the fan is in mode "min" or "max" isn't turning the AC OFF, the other modes are working when turning the AC OFF. I am closing this issue, it need to be fix in the library of the AC codes.

Thank you for everything