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

Can't power off #29

Closed
bilogic opened this issue Jan 24, 2021 · 11 comments
Closed

Can't power off #29

bilogic opened this issue Jan 24, 2021 · 11 comments
Labels
enhancement New feature or request

Comments

@bilogic
Copy link

bilogic commented Jan 24, 2021

Hi,

My AC requires this JSON string to power off IRhvac {"Vendor":"MITSUBISHI_AC","Mode":"Cool","Power":"Off"}
Mode is required, otherwise the AC doesn't turn off.

https://community.home-assistant.io/t/tasmota-mqtt-irhvac-controler/162915
I followed your steps in the link above, was able to get the AC to cool but not power off.

Any idea why? Thank you.

@bilogic
Copy link
Author

bilogic commented Jan 24, 2021

Just more info, it's probably a quirk with my AC model,

# Invalid OFF commands (AC ignores the following commands and does not turn off)
IRhvac {"Vendor":"MITSUBISHI_AC","Mode":"Off","Power":"Off"}
IRhvac {"Vendor":"MITSUBISHI_AC","Mode":"Auto","Power":"Off"}

# Valid OFF commands
IRhvac {"Vendor":"MITSUBISHI_AC","Mode":"Cool","Power":"Off"}

Hope there's a workaround. Thank you!

@hristo-atanasov hristo-atanasov added the enhancement New feature or request label Jan 25, 2021
@hristo-atanasov
Copy link
Owner

Hi! There is no workaround for this, but it is something that we can add in the future release. We can just add 'payload_off', which could be used in cases like yours. Have in mind that this could lead to a strange behavior of the Thermostat card, showing that the Mode of the AC is not "off", but "cool", when you turn you AC off. :)

@bilogic
Copy link
Author

bilogic commented Jan 25, 2021

@hristo-atanasov Thanks for getting back!

Yes, I was fiddling around with the python code. I made it work acceptably by doing this:

    def send_ir(self):
        ...

        if self.power_mode == STATE_OFF:
            self._hvac_mode = HVAC_MODE_COOL

        # Populate the payload
        payload_data = {
        ...

        # Publish mqtt message
        mqtt.async_publish(self.hass, self.topic, payload)

        if self.power_mode == STATE_OFF:
            self._hvac_mode = HVAC_MODE_OFF

@bilogic bilogic closed this as completed Jan 25, 2021
@bilogic
Copy link
Author

bilogic commented Jan 25, 2021

image

I'm digressing, but I don't think this deserves an issue on it's own. Can the button order be flipped? Or is it a HA thing? Thanks.

@bilogic
Copy link
Author

bilogic commented Jan 25, 2021

Opening again since I saw the enhancement tag

@bilogic bilogic reopened this Jan 25, 2021
@hristo-atanasov
Copy link
Owner

I'm glad you got it working. :) It was easy for me to tell you to change your code, but I never know who can do it by himself and ho can't. :)

@nao-pon
Copy link
Collaborator

nao-pon commented Jan 16, 2022

Is #59 helpful for the problem of not being able to turn off AC?
Try the following Tasmota-IRHVAC (>= v2022.01.04) settings with Tasmota 9.3.0 and above.

keep_mode_when_off: True

@Lauriz7
Copy link

Lauriz7 commented Aug 28, 2022

Experiencing turn off problem with Samsung AC, other Panasonic Unit is doing just fine.
When turning off from HA, the unit goes into cooling mode with some random temperature.
"keep_mode_when_off: True " is in yaml.
IRHVAC sends this

00:39:24.758 MQT: stat/tasmota_irstue/RESULT = {"IRHVAC":{"Vendor":"SAMSUNG_AC","Model":-1,"Mode":"Off","Power":"Off","Celsius":"On","Temp":16,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}

The remote is sending additional data code...

00:42:17.187 MQT: tele/tasmota_irstue/RESULT = {"IrReceived":{"Protocol":"SAMSUNG_AC","Bits":168,"Data":"0x02B20F000000C001D20F0000000001F2FE711045C0","Repeat":0,"IRHVAC":{"Vendor":"SAMSUNG_AC","Model":-1,"Mode":"Heat","Power":"Off","Celsius":"On","Temp":17,"FanSpeed":"Min","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}}

I see the difference in data, but also in that the samsung remote sends sends:

Mode":"Heat","Power":"Off"

but IRHVAC sends:

"Mode":"Off","Power":"Off"

is this possible to implement so the unit can be turned off by sending the same command as with remote?

@nao-pon
Copy link
Collaborator

nao-pon commented Aug 29, 2022

@Lauriz7 The keep_mode_when_off: True option is an option that does not change the mode when OFF, so the same data as remote should be sent.

For example, "Mode": "cool" if the current mode is cool. Samsung AC may always need to be "Mode": "Heat".

Please subscribe to cmnd/tasmota_irstue/# in MQTT to let us know the actual MQTT message being sent.

@nao-pon
Copy link
Collaborator

nao-pon commented Aug 29, 2022

@Lauriz7
Copy link

Lauriz7 commented Sep 17, 2022

Thanks a lot Tasmota 10.0.03 solved the power off issue and now we are rolling again :)

@nao-pon nao-pon closed this as completed Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants