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

HVAC Mode Mapping in v3.0.1 is mixed up #29

Closed
migueldc73 opened this issue May 28, 2023 · 18 comments
Closed

HVAC Mode Mapping in v3.0.1 is mixed up #29

migueldc73 opened this issue May 28, 2023 · 18 comments

Comments

@migueldc73
Copy link

I am not sure if I am the only one whose HVAC modes were mixed up after the upgrade to v3.0.1 ?
HASS mode AUTO sets my heatpump on mode COOL
HASS mode HEAT sets heatpump on mode AUTO
HASS mode COOL seats heatpump on mode HEAT
Luckily OFF stays OFF :-)

I solved this partially by changing these lines in const.py :
MODE_TEMPERATURE_OFF = "0"
MODE_TEMPERATURE_HEAT = "1"
MODE_TEMPERATURE_AUTO = "2"
MODE_TEMPERATURE_COOL = "3"

Now it works, but when I change temperature, it still changes them on my heatpump on the wrong modes, so I guess I need to edit some other lines

Anyone else with the same issues or just me ?

@legantois
Copy link

Same issue here:
Auto (in HA) -> Cool (in aquatemp)
Cool (in HA) -> Heat (in aquatemp
Heat (in HA) -> Auto (in Aquatemp)

@migueldc73
Copy link
Author

And there is more :
when HA reboots, it does not see the Aquatemp HP as ON even though it is on.

The previous v2.2 actually worked fine with me (albeit with infrequent status updates)

@Taz-assistant
Copy link

Taz-assistant commented May 29, 2023 via email

@elad-bar
Copy link
Collaborator

Will check it, probably mapped it incorrectly, sorry,
Can you post diagnostic file and log file in debug taking those actions so i'll be sure i'm mapping it correctly?

Thanks

@legantois
Copy link

legantois commented May 30, 2023

In the scenario

I asked auto --> configured in aquatemp as cool (but shown in HA as Auto)
I asked Cool --> configured in aquatemp as Heat (but shown in HA as Cool)
I asked Heat --> configured in aquatemp as Auto (but shown in HA as Cool)
I asked Off --> Went Off

home-assistant_aqua_temp_2023-05-30T12-09-46.520Z.log

@elad-bar
Copy link
Collaborator

According to the original code, when extracting the temperature and mode, the code is the same:

        if self._hvac_mode == HVAC_MODE_COOL:
            mode = 'R01'
        elif self._hvac_mode == HVAC_MODE_AUTO:
            mode = 'R03'
        else:
            mode = 'R02'

current:

MODE_TEMPERATURE_OFF = "0"
MODE_TEMPERATURE_COOL = "1"
MODE_TEMPERATURE_HEAT = "2"
MODE_TEMPERATURE_AUTO = "3"

HVAC_MODE_MAPPING = {
    HVACMode.OFF: MODE_TEMPERATURE_OFF,
    HVACMode.COOL: MODE_TEMPERATURE_COOL,
    HVACMode.HEAT: MODE_TEMPERATURE_HEAT,
    HVACMode.AUTO: MODE_TEMPERATURE_AUTO,
}

problem was with mapping of performing actions (change HVAC mode):

if hvac_mode == HVAC_MODE_COOL:
            value = "0"
            hm = HVAC_MODE_COOL
        elif hvac_mode == HVAC_MODE_HEAT:
            value = "1"
            hm = HVAC_MODE_HEAT
        elif hvac_mode == HVAC_MODE_AUTO:
            value = "2"
            hm = HVAC_MODE_AUTO
        elif hvac_mode == HVAC_MODE_OFF:
            code = "power"
            value = "0"
            hm = HVAC_MODE_OFF 

changed the mapping for action to be exactly as in the original code:

HVAC_MODE_ACTION = {
    HVACMode.COOL: "0",
    HVACMode.HEAT: "1",
    HVACMode.AUTO: "2",
}

fix of actions will be part of v3.0.2

@migueldc73
Copy link
Author

I just upgrade to v3.0.2 and the mismatched mapping behaviour is still the same as in v3.0.1
Also, when HA reboots and Aqua_Temp restarts, it turns the HVAC off, so I have to manually restart.

@elad-bar
Copy link
Collaborator

is it the turn off on restart issue introduced in this version?
about the mismatch - just to make sure we are aligned on the issue:
Setting modes in HA is not aligned with Aqua Temp

  • Auto (in HA) -> Cool (in aquatemp)
  • Cool (in HA) -> Heat (in aquatemp
  • Heat (in HA) -> Auto (in Aquatemp)

What about presenting it? is it according to the app?

thanks

@migueldc73
Copy link
Author

I performed some extra tests and can now confirm that the turning off on restart is just brief. The pump turns off and then back on, but only in HA, so it's probably just refreshing the UI.
But then again, the HP sometimes appears briefly as "OFF" and then back "ON" in HA when I change mode in the aquatemp app.
What has actually improved over v3.0.1 is that v3.0.2 now reads the status of the HP correctly as being ON when HA reboots.

The mapping is indeed like you mentioned and it works in both directions. So if I would select "HEAT" in the aquatemp app, it would still appear as Cool in HA. Or selecting Heat in HA would result aquatemp going into Auto

Auto (in HA) -> Cool (in aquatemp)
Cool (in HA) -> Heat (in aquatemp
Heat (in HA) -> Auto (in Aquatemp)

@elad-bar
Copy link
Collaborator

ok, will try to check it later today changing in the app, see how it reflects in HA vice versa,
target temperatures are ok between the modes for you?

I noticed that it takes time for the cloud to get updated, so it might be the delay you are experiencing,
anyway, will check it.

@migueldc73
Copy link
Author

migueldc73 commented May 31, 2023

The target temperatures are changed properly, but in the wrong modes.
I'll explain for v3.0.2:

  • HA is in mode Heat -> Aquatemp is in mode Auto
  • I change the temperature in HA from 28 to 30 deg while being in mode Heat (in HA)
  • the temperature of mode Auto in Aquatemp changes also from 28 to 30

That behaviour was different in v3.0.1. There the temperature changed in the mismatched modes

  • HA is in mode Heat -> Aquatemp is in mode Auto
  • I change the temperature in HA from 28 to 30 deg while being in mode Heat (in HA)
  • the temperature of mode Auto in Aquatemp stays
  • but... if I then select Heat in Aquatemp, then I see the temp change from 28 to 30 in the Aquatemp Heat mode

Maybe when you did the remapping yesterday, it only affected the temperature and not the status.

Another I mentioned is that when I change the fan speed to Low in Aquatemp, the HP appears as OFF in HA.

@legantois
Copy link

i confirm v3.0.2 is not imporving the situation

still
Auto (in HA) -> Cool (in aquatemp)
Cool (in HA) -> Heat (in aquatemp
Heat (in HA) -> Auto (in Aquatemp)

regarding temperature HA climate is consistent with himself and is showing what should be the temperature associated with the mode it believes it is in, but the temperature in aquatemp is not modified

@elad-bar
Copy link
Collaborator

elad-bar commented Jun 1, 2023

seems that I found the mapping issue and also found that set temp / mode was running bit differently than the app and aligned it, v3.0.3 will be tested during the weekend.

thanks

@migueldc73
Copy link
Author

I just installed v3.0.3 and it all seems to run fine now, except for a new issue, which occurred before intermittently but now consistently : when restarting HA, the Aquatemp heatpump is turned off. Both in HA as in the Aquatemp app.
But the mapping of the modes and temperature is fine.

@elad-bar
Copy link
Collaborator

elad-bar commented Jun 4, 2023

please upgrade to v3.0.4, if still happens, please set debug log level for component and send logs after HA is restarting,
I need to see what triggers that action as i can't reproduce that issue

thanks

@migueldc73
Copy link
Author

migueldc73 commented Jun 4, 2023

ignore my comments, the shutting off is caused by one of my automations which kicks in when I restart

My apologies

@elad-bar
Copy link
Collaborator

elad-bar commented Jun 4, 2023

that's ok :)

@elad-bar
Copy link
Collaborator

elad-bar commented Jun 5, 2023

can you pls close the issue?

thanks

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