home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.32k stars 30.63k forks source link

Error whilst trying to set Aqara TRV temperature #105385

Closed g0hww closed 5 months ago

g0hww commented 10 months ago

The problem

I was adjusting the radiator thermostat temperature and a notification relating to a constraint error was displayed. The set point temperature on the TRV did not correlate with the temperature I was dialling in to the thermostat widget,

I have only been using the new Aqara stuff for a few days and have it hooked in via the Matter beta integration. I am not very familiar with any of it yet.

What version of Home Assistant Core has the issue?

core-2023.12.1

What was the last working version of Home Assistant Core?

Unknown

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Matter

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:238
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 13:57:35 (3 occurrences)
Last logged: 13:58:05

[139866894033856] InteractionModelError: ConstraintError (0x87)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2067, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2104, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 878, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 632, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/usr/src/homeassistant/homeassistant/components/matter/climate.py", line 152, in async_set_temperature
    await self.matter_client.send_device_command(
  File "/usr/local/lib/python3.11/site-packages/matter_server/client/client.py", line 228, in send_device_command
    return await self.send_command(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/matter_server/client/client.py", line 330, in send_command
    return await future
           ^^^^^^^^^^^^
matter_server.common.errors.UnknownError: InteractionModelError: ConstraintError (0x87)

Additional information

No response

home-assistant[bot] commented 10 months ago

Hey there @home-assistant/matter, mind taking a look at this issue as it has been labeled with an integration (matter) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `matter` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign matter` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


matter documentation matter source (message by IssueLinks)

marcelveldt commented 10 months ago

Could it be that this was just a one time error ? The device is complaining that you were trying to set something out of range. Probably the result of the device being out of sync with the value its communicating.

g0hww commented 10 months ago

Hi. Thanks for considering my report.

Maybe that was the cause of the stack trace I posted, and I don't seem to be seeing that particular problem now.

However, I have avoided using HA to modify the set point temperature of the TRVs, as it pretty much always gets out of whack, with HA reporting a different set point to what ends up being reflected on the TRV's own display, which is always consistent with what is shown in Homekit, which runs straight from the Aqara M2 Hub.

If I use Apple Home to modify the TRV's set point temperature, HA updates immediately to match the new value, but if I try to modify the set point temp from HA, then things go awry.

I'm not experienced enough to know if this is really a Matter issue.

My hunch is that HA is somehow adjusting the set point temp with relative changes, rather than specifying an absolute value as the new set point temp, but I remain unconvinced that is really the case.

marcelveldt commented 9 months ago

I have this very same device here on my testbench and its working fine. Are you using it with Fahrenheit or Celsius ?

marcelveldt commented 9 months ago

Correction: I can reproduce it now but only when setting certain tresholds. I'll play with it some more.

issue-triage-workflows[bot] commented 6 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

marcelveldt commented 6 months ago

not stale