question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Danfoss Ally valve: Slow actuator response [solved already in other solutions]

See original GitHub issue

Describe the bug The problem is well described here: https://community.home-assistant.io/t/danfoss-ally-valve-slow-actuator-response-solved/254939

So if you issue a new temperature target setpoint for the thermostat using HA+ZHA the thermostat uses the internal PID mechanism to control the valve which results in slow (and sometimes unexpected) valve control movements.

To Reproduce Steps to reproduce the behavior:

  1. Go to your Danfos Ally thermostat connected using ZHA
  2. Change the desired temperature
  3. Watch the pi_heating_demand changing over time (far to slow)

Expected behavior The pi_heating_demand should change much faster

Screenshots grafik

Additional context The issue is already fixed in deconz (https://github.com/dresden-elektronik/deconz-rest-plugin/pull/4408) as well as in the Koenkk/zigbee-herdsman-converters (https://github.com/Koenkk/zigbee-herdsman-converters/pull/2592)

So mainly the solution is well described in the official document (https://assets.danfoss.com/documents/176987/AM375549618098en-000101.pdf):

grafik

The zigbee coordinator needs to send a Setpoint Command including the HeatingSetpoint itself aswell as a bitmask (enum8 set to 1) to circumvent the thermostats PID mechism.

Based on that I started to read carefully all instructions of the zha quirks because I wanted to sort out if I can create a custom zhaquirk (based on https://github.com/zigpy/zha-device-handlers/tree/dev/zhaquirks/danfoss) fixing this issue.

While I already identified that I need to add a custom output cluster in the replacement (and I guess for that I also need to add the thermostat output cluster to the signature itself?) I didn’t find any good example (first I thought the tuya custom quirks were good to understand but I honestly gave up) on how to understand:

  1. how do I implement a custom command in the quirk?
  2. (in this specific case) how can I access the occupied_heating_setpoint sent by HA+ZHA to the thermostat (which is based on the solution above an int16)
  3. how can I create a custom command like “setpointType (enum8) + HeatingSetpoint (16bit)” where the HeatingSetpoint is occupied_heating_setpoint from 2) and the setPointType is set to 1 (the final command input needs to be masked in hex I guess)?

Also just to recap how it works: ZHA is using the climate.py integration in HA and calls the function

async def async_set_temperature(self, **kwargs):
        """Set new target temperature."""

which eventually calls (in the case of the Danfoss Ally):

            elif self.hvac_mode == HVAC_MODE_HEAT:
                success = await thrm.async_set_heating_setpoint(
                    temp, self.preset_mode == PRESET_AWAY
                )

which is implemented in core/homeassistant/components/zha/core/channels/hvac.py

so there in normal operation the following code should be executed:

        if not await self.write_attributes(data):
            self.debug("couldn't set heating setpoint")
            return False

That’s where I got lost to find the appropriate calls into zigpy and how the zha quirks overwrite the zigpy code to be executed (or is this assumption already wrong?).

Any help appreciated. Surely you also can fix this yourself if you think this is faster than to teach me 😉 (because I won’t have time within the next 3 weeks). If you fix it yourself I can learn from your implementation to be able to handle such requests myself in the future.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:47 (32 by maintainers)

github_iconTop GitHub Comments

3reactions
Stefano0042commented, Sep 27, 2021

Normally it takes a couple of days before the Ally is properly learning the room response.

2reactions
albalaingcommented, Oct 12, 2021

I have been using the Popp for quite some time and it works exactly the same as the Danfos. Danfos updated it to 1.08 by downloading the firmware from the support page and using ZHA. I had no problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

Danfoss Ally valve: Slow actuator response [solved] - Hardware
I found issue: When Danfoss Ally Valve is controlled remotely by ZigBee, actuator response is really slow in comparation to direct control by...
Read more >
Danfoss Ally™ support
Danfoss Ally ™​ - A smart cloud-based heating solution ... is a protective case that will prevent the removal of the thermostat itself...
Read more >
Any experience with specific smart radiator thermostats?
There is an obvious solution/workaround for this if you have central heating: open the valve at night but do not trigger the boiler...
Read more >
KB-7 - Danfoss is slow to react to changes - Vesternet
The Danfoss Living Connect Radiator Thermostat is very slow to react to changes and / or opens the radiator valve slowly.
Read more >
VALVES AND ACTUATORS
(Leverage on other valve parts can cause damage). Install in horizontal position with solenoid vertical. Make electrical connections in compliance with ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found