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

DHW support #3

Closed
fredericseiler opened this issue Aug 11, 2023 · 23 comments
Closed

DHW support #3

fredericseiler opened this issue Aug 11, 2023 · 23 comments
Assignees
Labels
enhancement New feature or request

Comments

@fredericseiler
Copy link

Hi Noltari,

First of all, thanks for your work!

Is there any way to add support for domestic hot water to the lib and HA integration (as a water heater entity for example)?

I was about to try to draft a PR (not very comfortable with python tbh), but my main concern is that I don't really know how to distinguish systems that handle DHW from systems that don't.

On my Aidoo Pro HI4 (AZAI6WSPHI4 linked to a Hitachi air/water heat pump), I can get DHW data when I send a POST request to the /hvac endpoint with only the global system ID and no specific zone:

{
  "systemID": 0
}

And the values returned by the local API:

{
  "data": {
    "systemID": 0,
    "acs_temp": 43,
    "acs_setpoint": 45,
    "acs_mintemp": 30,
    "acs_maxtemp": 75,
    "acs_power": 1,
    "acs_powerful": 0
  }
}

I can also set the DHW setpoint, power and powerful operation mode, with a PUT request.

But, if I try the same on my Aidoo Pro HI2 (AZAI6WSPHI2 linked to a Hitachi air/air ducted AC, so no DHW), I get similar results:

{
  "data": {
    "systemID": 0,
    "acs_temp": 0,
    "acs_setpoint": 0,
    "acs_mintemp": 0,
    "acs_maxtemp": 0,
    "acs_power": 0,
    "acs_powerful": 0
  }
}

Besides that all values are set to 0, there's no way to tell them apart (same ws_type ws_aidoo, and system_type 2).

All Airzone integration users that don't deal with DHW will have a ghost water heater, that's far from ideal...

What about another integration dedicated to airzone DHW only? Seems redondant?

@Noltari
Copy link
Owner

Noltari commented Aug 14, 2023

Hi @fredericseiler,

Hi Noltari,

First of all, thanks for your work!

Thanks!

Is there any way to add support for domestic hot water to the lib and HA integration (as a water heater entity for example)?

I was about to try to draft a PR (not very comfortable with python tbh), but my main concern is that I don't really know how to distinguish systems that handle DHW from systems that don't.

On my Aidoo Pro HI4 (AZAI6WSPHI4 linked to a Hitachi air/water heat pump), I can get DHW data when I send a POST request to the /hvac endpoint with only the global system ID and no specific zone:

{
  "systemID": 0
}

Yes, this is documented in the Airzone Local API. In order to get/update the DHW config systemID should be 0 and there should be no zoneID at all.
What does your device return when performing a POST request with both zoneID and systemID?

{
  "systemID": 0,
  "zoneID": 0
}

I need to know how hard it would be to distinguish between HVAC and DHW devices.

And the values returned by the local API:

{
  "data": {
    "systemID": 0,
    "acs_temp": 43,
    "acs_setpoint": 45,
    "acs_mintemp": 30,
    "acs_maxtemp": 75,
    "acs_power": 1,
    "acs_powerful": 0
  }
}

Luckily those values seem pretty simple, so it shouldn't be hard to support DHW.

I can also set the DHW setpoint, power and powerful operation mode, with a PUT request.

But, if I try the same on my Aidoo Pro HI2 (AZAI6WSPHI2 linked to a Hitachi air/air ducted AC, so no DHW), I get similar results:

{
  "data": {
    "systemID": 0,
    "acs_temp": 0,
    "acs_setpoint": 0,
    "acs_mintemp": 0,
    "acs_maxtemp": 0,
    "acs_power": 0,
    "acs_powerful": 0
  }
}

Yeah, that seems to be a bug, since that device shouldn't return any of those values.
My Airzone Flexa just returns an error stating that there's no DHW device available.

Besides that all values are set to 0, there's no way to tell them apart (same ws_type ws_aidoo, and system_type 2).

All Airzone integration users that don't deal with DHW will have a ghost water heater, that's far from ideal...

We can see if some/all of those values are 0 and avoid exposing the DHW device in that specific case.
It's not ideal, but it should work.

What about another integration dedicated to airzone DHW only? Seems redondant?

No, that isn't an option.
We should be able to distinguish between both types of devices and expose the corresponding devices (HVAC, DHW...) with the same integration.

@fredericseiler
Copy link
Author

What does your device return when performing a POST request with both zoneID and systemID?

{
  "systemID": 0,
  "zoneID": 0
}
{
  "systems": [{
    "data": [{
      "systemID": 1,
      "zoneID": 1,
      "name": "heatpump",
      "on": 0,
      "double_sp": 0,
      "coolsetpoint": 17,
      "coolmaxtemp": 0,
      "coolmintemp": 15,
      "heatsetpoint": 5,
      "heatmaxtemp": 0,
      "heatmintemp": 15,
      "maxTemp": 0,
      "minTemp": 15,
      "setpoint": 5,
      "roomTemp": 0,
      "sleep": 0,
      "temp_step": 0.5,
      "modes": [3],
      "mode": 3,
      "speed_values": [0],
      "speeds": 0,
      "speed_type": 0,
      "speed": 0,
      "coldStages": 0,
      "coldStage": 0,
      "heatStages": 0,
      "heatStage": 0,
      "humidity": 0,
      "units": 0,
      "errors": [],
      "air_demand": 0,
      "cold_demand": 0,
      "heat_demand": 0,
      "heatangle": 0,
      "coldangle": 0
    }]
  }]
}

We can see if some/all of those values are 0 and avoid exposing the DHW device in that specific case.
It's not ideal, but it should work.

Yeah, maybe acs_mintemp and acs_maxtemp (I don't think that's something you can tweak in the appliance or via Airtools) and eventually acs_temp because if the tank water is at 0°C, that's probably not a good sign for the owner.

@Noltari
Copy link
Owner

Noltari commented Aug 14, 2023

Thanks @fredericseiler,

What does your device return when performing a POST request with both zoneID and systemID?

{
  "systemID": 0,
  "zoneID": 0
}
{
  "systems": [{
    "data": [{
      "systemID": 1,
      "zoneID": 1,
      "name": "heatpump",
      "on": 0,
      "double_sp": 0,
      "coolsetpoint": 17,
      "coolmaxtemp": 0,
      "coolmintemp": 15,
      "heatsetpoint": 5,
      "heatmaxtemp": 0,
      "heatmintemp": 15,
      "maxTemp": 0,
      "minTemp": 15,
      "setpoint": 5,
      "roomTemp": 0,
      "sleep": 0,
      "temp_step": 0.5,
      "modes": [3],
      "mode": 3,
      "speed_values": [0],
      "speeds": 0,
      "speed_type": 0,
      "speed": 0,
      "coldStages": 0,
      "coldStage": 0,
      "heatStages": 0,
      "heatStage": 0,
      "humidity": 0,
      "units": 0,
      "errors": [],
      "air_demand": 0,
      "cold_demand": 0,
      "heat_demand": 0,
      "heatangle": 0,
      "coldangle": 0
    }]
  }]
}

Ouch, that system/zone data seems to be completely broken... xD

If you add your device to Home Assistant, is it exposed as a climate device?
Does it work?

I wonder if there are any devices which can have both climate and water heater devices...
If there aren't any, then we should clearly prevent creating climate devices if water heater data is provided and has valid values...

We can see if some/all of those values are 0 and avoid exposing the DHW device in that specific case.
It's not ideal, but it should work.

Yeah, maybe acs_mintemp and acs_maxtemp (I don't think that's something you can tweak in the appliance or via Airtools) and eventually acs_temp because if the tank water is at 0°C, that's probably not a good sign for the owner.

Exactly ;)

@fredericseiler
Copy link
Author

Ouch, that system/zone data seems to be completely broken... xD

It doesn't bother me; I have the needed attributes for my heat pump (on, heat* and errors) and I just ignore the rest (I admit that cool*, speed* and *angle for hot water radiators seems a bit odd). My guess is that Airzone targets mainly air to air multizone HVAC systems, so Aidoo just uses the "regular" architecture whatever the appliance behind it.

If you add your device to Home Assistant, is it exposed as a climate device?
Does it work?

Yes, it is exposed as a climate device, and yes it works well ;)

I wonder if there are any devices which can have both climate and water heater devices...

You mean to have one device in Home Assistant with a climate and water_heater entities ? That would be great because there are so many models on the market that handle both home heating and domestic water heating (including mine). But if the features are divided into two different HA devices, that'll still be nice!

What's the best angle here? I'm not quite sure where to start or how to help.

@fredericseiler
Copy link
Author

fredericseiler commented Aug 14, 2023

I didn't get what you meant by "prevent creating climate devices if water heater data is provided", so, after reading again the whole conversation, just to be super clear: my heat pump is a regular climate device that can also handle DHW (model Hitachi Yutaki S Combi). The systemID 1 > zoneID 1 is thereby totally legit.

@Noltari
Copy link
Owner

Noltari commented Aug 14, 2023

I didn't get why you meant by "prevent creating climate devices if water heater data is provided", so, after reading again the whole conversation, just to be super clear: my heat pump is a regular climate device that can also handle DHW (model Hitachi Yutaki S Combi). The systemID 1 > zoneID 1 is thereby totally legit.

Ok!

Ouch, that system/zone data seems to be completely broken... xD

It doesn't bother me; I have the needed attributes for my heat pump (on, heat* and errors) and I just ignore the rest (I admit that cool*, speed* and *angle for hot water radiators seems a bit odd). My guess is that Airzone targets mainly air to air multizone HVAC systems, so Aidoo just uses the "regular" architecture whatever the appliance behind it.

If you add your device to Home Assistant, is it exposed as a climate device?
Does it work?

Yes, it is exposed as a climate device, and yes it works well ;)

I wonder if there are any devices which can have both climate and water heater devices...

You mean to have one device in Home Assistant with a climate and water_heater entities ? That would be great because there are so many models on the market that handle both home heating and domestic water heating (including mine). But if the features are divided into two different HA devices, that'll still be nice!

What's the best angle here? I'm not quite sure where to start or how to help.

I've already started working on it :)
I need you to provide the answer of the API when you change a DHW parameter:
curl -s --location --request POST "http://IP_ADDR:3000/api/v1/hvac" -d '{"systemID": 0, "acs_power": 1}' | jq

@fredericseiler
Copy link
Author

I've already started working on it :)

Wow, so cool!

I need you to provide the answer of the API when you change a DHW parameter

Like for the usual /hvac endpoint, the response only contains the attributes you submitted:

{
  "data": {
    "systemID": 0,
    "acs_power": 1
  }
}

If I add the setpoint in the request:

{
  "data": {
    "systemID": 0,
    "acs_power": 1,
    "acs_setpoint": 45
  }
}

(I'm sure it was a typo, but you also need to use the PUT HTTP verb to make some changes for DHW)

@Noltari
Copy link
Owner

Noltari commented Aug 14, 2023

Thanks for the info @fredericseiler,

I've now released a new version of aioairzone and I've submitted a PR to the Home Assistant repo with it:
home-assistant/core#98399

After that dependency upgrade PR is merged, I will submit another PR with the Water Heater functionality, which you can find in the following branch:
https://github.com/Noltari/home-assistant-core/commits/airzone-dhw

Best regards,
Álvaro.

@fredericseiler
Copy link
Author

Thank you so much!

@Noltari
Copy link
Owner

Noltari commented Aug 14, 2023

Water Heater entities PR is now created:
home-assistant/core#98401

@Noltari
Copy link
Owner

Noltari commented Aug 18, 2023

@fredericseiler I also created a separate PR for exposing the DHW temperature as a sensor:
home-assistant/core#98500

@Noltari Noltari added the enhancement New feature or request label Aug 23, 2023
@Noltari Noltari self-assigned this Aug 23, 2023
@Fonsohome
Copy link

Hello, on the ACS device only one sensor appears with the temperature. Is it okay or should I also have an entity to be able to turn it off and on?

@fredericseiler
Copy link
Author

Hello, on the ACS device only one sensor appears with the temperature. Is it okay or should I also have an entity to be able to turn it off and on?

Hi, that's because the PR for the sensor is already merged, but the PR for the entity is still in review. With a bit of luck, it'll be available in the 2023.10 release, so, just wait until October 4 ;)

@Noltari
Copy link
Owner

Noltari commented Sep 9, 2023

@Fonsohome @fredericseiler is the hot water sensor working correctly on the 2023.9 release so far?

BTW, I'm currently on vacation without access to a computer, so I'm not sure the water heater entity will be ready for 2023.10 if more changes are requested, but I'll try.

@fredericseiler
Copy link
Author

is the hot water sensor working correctly on the 2023.9 release so far?

@Noltari so far so good, thanks!

2023-09-09-19-39-31 Google Chrome Settings – Home Assistant

@Fonsohome
Copy link

@Fonsohome @fredericseiler is the hot water sensor working correctly on the 2023.9 release so far?

BTW, I'm currently on vacation without access to a computer, so I'm not sure the water heater entity will be ready for 2023.10 if more changes are requested, but I'll try.

Yes it works perfectly. Could the set temperature also be added?

@Noltari
Copy link
Owner

Noltari commented Sep 10, 2023

Yes it works perfectly. Could the set temperature also be added?

Yes, it could be added but I don't think it would be accepted.
Anyhow, you will be able to manually create it as a template sensor by exposing the water heater setpoint attribute.

@Fonsohome
Copy link

Sorry for taking advantage of the topic but I have the problem that the temperature of the aerothermal thermostat is always at 0°. Both the machine and the airzone application are correct.
Screenshot_2023-09-10-09-02-27-243_io homeassistant companion android

@Noltari
Copy link
Owner

Noltari commented Sep 10, 2023

Sorry for taking advantage of the topic but I have the problem that the temperature of the aerothermal thermostat is always at 0°. Both the machine and the airzone application are correct.

Screenshot_2023-09-10-09-02-27-243_io homeassistant companion android

Please don't reuse this topic for that and create a new one instead providing more data like the Home Asaistant integration diagnostics.
I think that some devices do not report that data or use a different parameter name than other Airzone devices, so taking a look at diagnostics data would help a lot since it contains the raw API data.

Also you can do that in spanish.

@fredericseiler
Copy link
Author

@Fonsohome that's an issue with your Airzone device: I have the same issue ("Zone temp" is fine in Airtools, but "roomTemp" from the local API always returns 0°C) and the Airzone support is aware of it, as well as min/max temperatures not correctly returned by the local API.

@Noltari so it seems that this DHW support will be available in 2023.10 after all ;) Many thanks for your work!

@Fonsohome
Copy link

@Fonsohome that's an issue with your Airzone device: I have the same issue ("Zone temp" is fine in Airtools, but "roomTemp" from the local API always returns 0°C) and the Airzone support is aware of it, as well as min/max temperatures not correctly returned by the local API.

@Noltari so it seems that this DHW support will be available in 2023.10 after all ;) Many thanks for your work!

Thanks

@Noltari
Copy link
Owner

Noltari commented Sep 10, 2023

@fredericseiler @Fonsohome thanks for providing all the info about DHW. Please, let me know if there are any issues once 2023.10 is out.

@Noltari Noltari closed this as completed Sep 10, 2023
@Fonsohome
Copy link

@fredericseiler @Fonsohome thanks for providing all the info about DHW. Please, let me know if there are any issues once 2023.10 is out.

Home Assistant updated and the ACS working perfectly
Screenshot_2023-10-04-23-42-27-332_io homeassistant companion android

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

3 participants