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

mode when AC is Off #918

Closed
sheppy99 opened this issue Sep 16, 2019 · 9 comments · Fixed by #919
Closed

mode when AC is Off #918

sheppy99 opened this issue Sep 16, 2019 · 9 comments · Fixed by #919

Comments

@sheppy99
Copy link

The common ac framework shows the mode as "off" when the AC is turned Off, is this by design?
Looking at my remotes,
FUJITSU_AC has a shorter packet when its turned off, I've not fully decoded it so I don't know if that packet includes the mode and what its set to.
Mitsubishi Electric has mode set at its last value when its turned off
DAIKIN2 has mode set at its last value when its turned off
Off is sent to the mode topics of ir_server/ac/stat/modeand ir_server/ac/stat/json and its reverted by the framework when the ac is turned on again. Off is stored as the value in the mode retained topic, so perhaps this will be a problem across reboots?

@crankyoldgit
Copy link
Owner

The common ac framework shows the mode as "off" when the AC is turned Off, is this by design?
Off is sent to the mode topics of ir_server/ac/stat/modeand ir_server/ac/stat/json and its reverted by the framework when the ac is turned on again.

Yes, this is on purpose.

See: https://github.com/crankyoldgit/IRremoteESP8266/blob/master/examples/IRMQTTServer/IRMQTTServer.ino#L2797

It's need to work with Home Assistant. It works best when there is an operation mode for "off".

Off is stored as the value in the mode retained topic, so perhaps this will be a problem across reboots?

It shouldn't be a problem, hasn't been a problem so far, and no one has reported a problem with it yet. HA, when instructing an mqtt climate (per it's protocol) will set the power to on & the mode to whatever the user has requested. Hence it hasn't been a problem.

FUJITSU_AC has a shorter packet when its turned off, I've not fully decoded it so I don't know if that packet includes the mode and what its set to.

The FUJITSU_AC protocol sends a special "short" message for a number of actions. The "off" message for example does not (as far as I am aware) contain mode information in it. Hence it is a non-issue, AFAIUI. Fujitsu, while not being unique in this approach, are certainly odd-ball'ish in this approach.
Most other A/C protocols just have the full state message control everything.
The library tries to do the right/safest thing at all times. Trust it, ... until it lets you down. :)

Mitsubishi Electric has mode set at its last value when its turned off

Yep, that's normal and most typical of the majority of A/C protocols. There is no "off" mode as such on the device, nor does the library try to send it, and if it could, the device wouldn't accept it.

crankyoldgit added a commit that referenced this issue Sep 16, 2019
* `MQTT_CLIMATE_HA_MODE` setting controls if we use HA mode. Default: 
Yes, we do!

Fixes #918
@crankyoldgit
Copy link
Owner

There. I've added some documentation, and made it an easy setting for you to disable if you need/want to.

@crankyoldgit crankyoldgit self-assigned this Sep 16, 2019
@sheppy99
Copy link
Author

I thought there might be an explanation. I’ve mapped the mode to an item and it wasn’t always showing the mode after turning the AC on. I’ll work around it, thanks for your help.

Sent with GitHawk

@sheppy99
Copy link
Author

Wow, all this in less time than it took me to drive into town. Thanks very much!
I’ll take a look in the morning.

Sent with GitHawk

@sheppy99
Copy link
Author

sheppy99 commented Sep 16, 2019

I've just tested this and ir_server/ac_x/stat/json keeps its mode, but ir/server/ac_x/stat/mode still changes to off. I can use "json" the "mode" needs to retain the default HA behaviour

crankyoldgit added a commit that referenced this issue Sep 17, 2019
@crankyoldgit
Copy link
Owner

I think I've fixed it. Untested. Please download and try it out.

@sheppy99
Copy link
Author

That fixed it, thanks. Regarding the multi stuff do you want me to do any form of testing apart from using it day to day and reporting problems?

@crankyoldgit
Copy link
Owner

Excellent.

Re: Multi.

It's up to you. I think it's working (I wouldn't have merged it if I knew it had problems). So "use and see" seems appropriate to me.

crankyoldgit added a commit that referenced this issue Sep 17, 2019
* `MQTT_CLIMATE_HA_MODE` setting controls if we use HA mode. Default:  Yes, we do!

Fixes #918
@crankyoldgit
Copy link
Owner

FYI, the changes mentioned above are included in the newly released version of the library (v2.6.6).

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