speleolontra / daikin_residential_altherma

Home Assistant Integration specific for BRP069A78 Heat Pump Model, via Daikin App Onecta. Users have good experience also for BRP069A62 and BRP069A61 (but not tested directly).
GNU General Public License v3.0
98 stars 14 forks source link

[Issue]: Add support for additional leavingWaterTemperature offset (advanced setting the onecta app) #179

Closed sraka1 closed 11 months ago

sraka1 commented 1 year ago

Gateway: BRP069A62 controlMode: leavingWaterTemperature

          "temperatureControl": {
            "ref": "#temperatureControl",
            "settable": true,
            "value": {
              "operationModes": {
                "heating": {
                  "setpoints": {
                    "leavingWaterTemperature": {
                      "maxValue": 55,
                      "minValue": 25,
                      "stepValue": 1,
                      "settable": false,
                      "value": 45
                    },
                    "leavingWaterOffset": {
                      "maxValue": 10,
                      "minValue": -10,
                      "stepValue": 1,
                      "settable": true,
                      "value": -4
                    }
                  }
                }
              }
            }
          },

https://github.com/speleolontra/daikin_residential_altherma/blob/master/custom_components/daikin_residential_altherma/climate.py#L103

            # tempSettable is False
            if device.getData(ATTR_TARGET_LEAVINGWATER_OFFSET) is not None:
                tempSettable = device.getData(ATTR_TARGET_LEAVINGWATER_OFFSET)["settable"]
                # tempSettable is set to True
            if device.getData(ATTR_TARGET_LEAVINGWATER_TEMPERATURE) is not None:
                tempSettable = device.getData(ATTR_TARGET_LEAVINGWATER_TEMPERATURE)["settable"]
                # tempSettable is set to False again
        # This if does not execute, despite LEAVING_WATER_OFFSET being settable
        if tempSettable:
            self._supported_features = SUPPORT_TARGET_TEMPERATURE

The same issue exists for

max_temp
min_temp
target_temperature
target_temperature_step

current_temperature is a bit trickier, because it would be nice to see both the actual leaving water temperature AND the currently set offset.

I think it would be nice to have maybe 2 panels with this data (one with the actual leaving water temperature with the actual min and max, but not settable and one with the offset with -10 min and +10 max and settable!) - I'm not that familiar with HA's infrastructure and how that would be done. Would appreciate at least some guidance, then I could perhaps tackle this myself in a PR. cc @jwillemsen

It is also interesting that the leaving water offset is not shown as a sensor, despite it clearly being available. I haven't debugged the issue there yet.

2023-10-23 10:09:19.508 INFO (MainThread) [custom_components.daikin_residential_altherma.sensor] Device 'Altherma' NOT supports 'leavingWaterOffset'

P.S.: I added some extra logging lines when debugging the issue above

daikin_residential_altherma-24ce5eb0fce07b4c3af128b7d8e4b0a1--0cccec009d4350716d5d3e4f863b31e4.json.redacted.txt

home-assistant_2023-10-23T08-10-13.348Z.log

sraka1 commented 1 year ago

Perhaps we'd need to create two ClimateEntity instances (well, DaikinClimate) in such a case? One for the actual leaving water temp and one for the offset? Or, perhaps create just the entity for the offset itself. You can get the other value (the actual leaving temp) via a sensor to view it. Open to suggestions

jwillemsen commented 1 year ago

Same as #172. Did only notice recently that also on my device I have two values, one under advanced.

sraka1 commented 1 year ago

I guess it's similar, however the control mode in my case is leavingWaterTemperature, not roomTemperature or externalRoomTemperature as it is in the other issue. In any case, would appreciate some guidance on how to best tackle this. Do you think my idea with two DaikinClimate entities is feasible or should the single entity have the offsets only in this case and all the read-only stuff be exposed via sensors?

What do you mean by two values - in the Onecta app?

jwillemsen commented 1 year ago

That I can change the leavingWaterOffset in the advanced settings even for my device which I control using the roomTemperature. Not sure about the best way to support this, will need some more time to think about this.

Can you try

tempSettable = tempSettable or device.getData(ATTR_TARGET_LEAVINGWATER_TEMPERATURE)["settable"]
edautz commented 11 months ago

Would be very nice to implement this because my heating curve is not linear. I would be able with this enhancement to correct the leaving water temperature automatically with the offset.

jwillemsen commented 11 months ago

First I want to fix #194 coming week, this is second on the current todo list for this integration

jwillemsen commented 11 months ago

Started with this, see https://github.com/jwillemsen/daikin_residential_altherma/tree/jwi-climatecontrolrework. This is really work in progress, only created multiple climate control entities, for each one found. When I have spare time next week I will continue with this.

jwillemsen commented 11 months ago

https://github.com/speleolontra/daikin_residential_altherma/pull/205 has now support for this, still working on cleanup and adding support for regular Daikin AC units, could you test this in a second HA setup?

jwillemsen commented 11 months ago

Can you retest with https://github.com/speleolontra/daikin_residential_altherma/pull/205, this refactors all code and resolves your issue.

Be aware that all entity IDs have changed, so check your automations and energy dashboard!

jwillemsen commented 11 months ago

See https://github.com/jwillemsen/daikin_residential_altherma/releases/tag/v3.0.0 for a release including the necessary changes for this issue

jwillemsen commented 11 months ago

@sraka1 @edautz Can you retest with https://github.com/jwillemsen/daikin_residential_altherma/releases/tag/v3.0.1 and let me know if that works.

scrivoluce commented 11 months ago

@jwillemsen it works like charms! Thanks for your work, setting leaving water temperature for heating was a long awaited feature!

jwillemsen commented 11 months ago

Thanks for the confirmation @scrivoluce! Sponsoring is always welcome, this was way more work as initially thought ;-)

scrivoluce commented 11 months ago

I can barely imagine..! With this kind of interface (BRP069A78 in my case) can we imagine to have a local integration instead going trough cloud?

jwillemsen commented 11 months ago

@scrivoluce As far as I know Daikin disabled the local access years ago, hopefully @Daikin-Europe does make this possible in the future

edautz commented 11 months ago

Installed it by hand. Seems to work OK. Thanks for your great work.

One remark: If I look at the downloades repos by HACS. It reports V2.8.2 of @speleolontra.

jwillemsen commented 11 months ago

Thanks for the confirmation, I have a PR for hacs to add my fork

edautz commented 11 months ago

Question: I see an additional button. Climate Control On Off mode. What does this button do?

jwillemsen commented 11 months ago

One of the bool on off switches, just on/off directly