tadasdanielius / daikin_altherma

Daikin Altherma custom component for home assistant
MIT License
76 stars 6 forks source link

Does not update dhw target temperature #90

Closed Julian0Davinci closed 1 month ago

Julian0Davinci commented 8 months ago

There is a problem with the Hot water target temperature for me. When i try to set a new target temperature, the integration sends it to the heat pump; but the value in the integration switches back to the old set value from before (in heat pump the new value stays). BUT when i change the dhw target temperature in heat pump, the value in the integration does update correctly. The current temperature and the "mode" is also working fine both ways. Reloading the integration and restart home assistant did not help. Any idea what could be wrong?

image

Julian0Davinci commented 7 months ago

The issure is still actual. Is there no one else with this problem or is there any idea what could ne wrong?

winany commented 7 months ago

Just played a bit around and found out that it works if you switch off the hot water tank, set the temperature and switch it on again.

Still testing if this is reliable, especially in automations.

Julian0Davinci commented 7 months ago

unfortunately this workaround does not work for me. Do you turn off the DHW with Homeassistant and do you wait after turning off th change the setpoint?

winany commented 7 months ago

I did it all within HA: switching off, new set point, switching on again, everything with controls in HA. Using the Onecta App seems to jeopardize the process.

winany commented 7 months ago

Meanwhile I found out that it works with my Altherma even without switching on and off, just waiting a little. I suspect it has something to do with the Onecta App, which uses a cloud connection and seems to interfere with the local connection of this HA integration.

Julian0Davinci commented 7 months ago

I disconected the Onecta app/cloud from my device and also blocked internet access of the LAN module. Unfortunately this did not work for me. Also waiting minutes after changing the setpoint does bor refresh the value :(

rolandpj commented 1 month ago

I have the same behaviour. Is.this already confirmed as bug or are only some Users affected?

tadasdanielius commented 1 month ago

Which devices are affected?

Julian0Davinci commented 1 month ago

Which devices are affected?

For me it is EBSX11P50DF with Firmware: ID0792/ID802B.

Lan Module is BRP069A61.

It is just this value, everything else works without any problem.

tadasdanielius commented 1 month ago

Any logs or anything? 🤔 . I can try to add separate number linked to DHW temperature instead of using water_heater entity.

tadasdanielius commented 1 month ago

One more thing. If someone could try to set using actions:

  1. Go to developer mode -> actions
  2. search for water heater set temperature action
  3. choose entity and set the temperature
  4. click perform action

Don't have high expectations that this will work but worth trying.

image
Julian0Davinci commented 1 month ago

One more thing. If someone could try to set using actions:

  1. Go to developer mode -> actions

  2. search for water heater set temperature action

  3. choose entity and set the temperature

  4. click perform action

Don't have high expectations that this will work but worth trying.

image

Did also not work for me. New Setpoint is set in the Heatpump, but there is the same problem in HA.

The Target temperature is also not updating on HA, wehen i change it on the heat pump itself. (but in the onecta app it is updating, so it is on the bus).

Interesting is, that when i reinstall the integration it fetches the right setpoint for the first time.

rolandpj commented 1 month ago

I did some investigations on this on my side: My devices: EHBH08EF9W and BRP069A62

I have the same behavior which is described. Furthermore I recognized, that the leaving Water temperature is never updated and always 34°C... independent if the HP heats or not.

Then I downloaded https://github.com/tadasdanielius/pyaltherma and executed the example script on my local windows computer. Same there.. leaving Water temperature is 34°C.. also the DHW target temperature is not updated. So the issue is propably not in the integration.

After that I checked the Octena App.. also shows 34°. A further check on the display of the heatpump shows 22°

So, on my side there seems to be a communication issue between the LAN adapter and the heatpump. Maybe the Update of the DHW temperature has the same root cause.

I was "happy" that i could reproduce the problem in the official app, because than a wrote to the daikin support... They already contacted me but until now they have no idea why this happens.

image

tadasdanielius commented 1 month ago

Could be a problem that integration is pulling too frequently from the gateway. You can try to increase wait time between queries. Go to custom_integration/daikin_altherma and in file const.py change values of those constants

MIN_TIME_BETWEEN_UPDATES_SECONDS = 5
UPDATE_INTERVAL_SECONDS = 2

To something like this:

MIN_TIME_BETWEEN_UPDATES_SECONDS = 60
UPDATE_INTERVAL_SECONDS = 30

After you make changes, you will need to restart HA

Note, that increasing values will affect how often new values are pulled from the device, so changes made outside HA might take longer to appear.

rolandpj commented 1 month ago

I disabled HA integration. and values in the Octena app are still wrong

tadasdanielius commented 1 month ago

@rolandpj interesting, thanks for sharing this. What version is running in your gateway?

rolandpj commented 1 month ago

The Onecta App displays: 436CC180000 for the Network Gateway

tadasdanielius commented 1 month ago

Mine is 436CC160000. It could be the problem with the new version. I wonder if others who are having this problem has the same version.

rolandpj commented 1 month ago

I have a possible hint for a solution:

used the example script mentioned above and analysed the result:

I found the CORRECT Value in DomesticHotWaterTemperatureHeating but the value that is displayed in HA Integration is TargetTemperature

When I change DHW Target temperatur in the app, the value in DomesticHotWaterTemperatureHeating is the correct Target temperature. When i change the DHW Target Temperature in HA, DomesticHotWaterTemperatureHeating is also showing the correct value

DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/2/Operation/DomesticHotWaterTemperatureHeating/la {"m2m:rqp": {"fr": "pyaltherma", "rqi": "44b40", "op": 2, "to": "/[0]/MNAE/2/Operation/DomesticHotWaterTemperatureHeating/la"}} DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":2000,"rqi":"44b40","to":"pyaltherma","fr":"/[0]/MNAE/2/Operation/DomesticHotWaterTemperatureHeating/la","pc":{"m2m:cin":{"rn":"00000006","ri":"0049_00000006","pi":"0049","ty":4,"ct":"20240814T021403Z","lt":"20240814T021403Z","st":6,"con":34.0000000000000000}}

DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/2/Operation/TargetTemperature/la {"m2m:rqp": {"fr": "pyaltherma", "rqi": "8a059", "op": 2, "to": "/[0]/MNAE/2/Operation/TargetTemperature/la"}} DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":2000,"rqi":"8a059","to":"pyaltherma","fr":"/[0]/MNAE/2/Operation/TargetTemperature/la","pc":{"m2m:cin":{"rn":"00000002","ri":"0048_00000002","pi":"0048","ty":4,"ct":"20240813T162955Z","lt":"20240813T162955Z","st":2,"con":30.0000000000000000}}}}

rolandpj commented 1 month ago

I am not a developer and I dont understand the code.. I just played around a bit and it seems to work for me!!!

In water_heater.py i changed following: image

Maybe I have damaged something else.. but nevertheless the bug of this thread can be fixed :-)

Julian0Davinci commented 1 month ago

I am not a developer and I dont understand the code.. I just played around a bit and it seems to work for me!!!

In water_heater.py i changed following:

image

Maybe I have damaged something else.. but nevertheless the bug of this thread can be fixed :-)

Nice, tested and also working for me! Thank you for sharing :)

tadasdanielius commented 1 month ago

Wonderful, thanks for the investigation. Now we have to make it work across all devices and not break on others 😄 Could you try to replace target_temperature function with this:

    @property
    def target_temperature(self) -> float:
        status = self._get_status()
        operations = status["operations"]

        if "DomesticHotWaterTemperatureHeating":
            return operations["DomesticHotWaterTemperatureHeating"]
        elif "TargetTemperature" in operations:
            return operations["TargetTemperature"]
        else:
            return 0
rolandpj commented 1 month ago

This function works for me! :-)