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
72.29k stars 30.25k forks source link

deCONZ: Unable to set maximum temperature on Danfoss Ally (35 celsius degree) #78784

Closed paszczaq closed 1 year ago

paszczaq commented 2 years ago

The problem

Hi! As the outside temperature dropped down, and the summer is over I've enabled heating on my danfoss ally TRV's connected via deconz (running as an addon) everything seems to work fine, exept setting maximum allowed temperature. When I set 35 degress (celsius) there is error on the HA frontend and log and temperature stays on previous setting. From thermostat cluster: obraz

The log after setting 35 degress on HA frontend (attached)

Everything is updated to the newest official version. As far as I remember it was working fine last winter :)

What version of Home Assistant Core has the issue?

Home Assistant 2022.9.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

deconz

Link to integration documentation on our website

https://www.home-assistant.io/integrations/deconz/

Diagnostics information

config_entry-deconz-0d3331e48c33ca6ef7508cb24481e0f6.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.websocket_api.http.connection
Source: components/deconz/climate.py:222
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 17:57:57 (2 occurrences)
Last logged: 18:08:51

    [139861667294432] Invalid content type: text/html (<ClientResponse(http://core-deconz:40850/api/467DF12351/sensors/61/config) [200 OK]> <CIMultiDictProxy('Access-Control-Allow-Origin': '*', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '0')> )
    [139860996680976] Invalid content type: text/html (<ClientResponse(http://core-deconz:40850/api/467DF12351/sensors/61/config) [200 OK]> <CIMultiDictProxy('Access-Control-Allow-Origin': '*', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '0')> )

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 588, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/usr/src/homeassistant/homeassistant/components/deconz/climate.py", line 222, in async_set_temperature
    await self.gateway.api.sensors.thermostat.set_config(
  File "/usr/local/lib/python3.10/site-packages/pydeconz/interfaces/sensors.py", line 560, in set_config
    return await self.gateway.request_with_retry(
  File "/usr/local/lib/python3.10/site-packages/pydeconz/gateway.py", line 142, in request_with_retry
    return await self.request(method, path, json)
  File "/usr/local/lib/python3.10/site-packages/pydeconz/gateway.py", line 167, in request
    response: dict[str, Any] = await self._request(
  File "/usr/local/lib/python3.10/site-packages/pydeconz/gateway.py", line 187, in _request
    raise ResponseError(
pydeconz.errors.ResponseError: Invalid content type: text/html (<ClientResponse(http://core-deconz:40850/api/467DF12351/sensors/61/config) [200 OK]>
<CIMultiDictProxy('Access-Control-Allow-Origin': '*', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '0')>

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

deconz documentation deconz source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @kane610, mind taking a look at this issue as it has been labeled with an integration (deconz) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

Kane610 commented 2 years ago

I think this issue is on deconz side. I've put up a question with deconz devs for their input

paszczaq commented 2 years ago

Hey, @Kane610 - any news on that issue? Or should I create this issue on deconz repo?

Kane610 commented 2 years ago

Would you mind enabling debug per instructions on deconz integration and share the debug data surrounding the time where you try to set the temperature

Haven't really gotten to a full discussion yet

mrbardman commented 2 years ago

I have the same problem with my Namron Zigbee floor heating thermostat, . It is working normally when I via HA set temperatures up to and including 32 (celcius). But if I go 32,5 or above it fails with the same error as above mentioned:

pydeconz.errors.ResponseError: Invalid content type: text/html (<ClientResponse(http://192.168.1.153:8080/api/4BEFF79B86/sensors/17/config) [200 OK]> <CIMultiDictProxy('Access-Control-Allow-Origin': '*', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '0')>

On the thermostat itself I can select and set temperatures up to 40 degrees. Full log from HA (not debug log):

`Logger: homeassistant.components.websocket_api.http.connection Source: components/deconz/climate.py:239 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 12:23:45 (15 occurrences) Last logged: 13:16:05

[2741698888] Invalid content type: text/html (<ClientResponse(http://192.168.1.153:8080/api/4BEFF79B86/sensors/17/config) [200 OK]> <CIMultiDictProxy('Access-Control-Allow-Origin': '', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '0')> ) [2863463152] Invalid content type: text/html (<ClientResponse(http://192.168.1.153:8080/api/4BEFF79B86/sensors/17/config) [200 OK]> <CIMultiDictProxy('Access-Control-Allow-Origin': '', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '0')> ) Traceback (most recent call last): File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/websocket_api/commands.py", line 202, in handle_call_service await hass.services.async_call( File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/core.py", line 1738, in async_call task.result() File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/core.py", line 1775, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity_component.py", line 207, in handle_service await service.entity_service_call( File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/service.py", line 678, in entity_service_call future.result() # pop exception if have File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 931, in async_request_call await coro File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/service.py", line 715, in _handle_entity_call await result File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/climate/init.py", line 613, in async_service_temperature_set await entity.async_set_temperature(*kwargs) File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/deconz/climate.py", line 239, in async_set_temperature await self.gateway.api.sensors.thermostat.set_config( File "/srv/homeassistant/lib/python3.9/site-packages/pydeconz/interfaces/sensors.py", line 560, in set_config return await self.gateway.request_with_retry( File "/srv/homeassistant/lib/python3.9/site-packages/pydeconz/gateway.py", line 142, in request_with_retry return await self.request(method, path, json) File "/srv/homeassistant/lib/python3.9/site-packages/pydeconz/gateway.py", line 167, in request response: dict[str, Any] = await self._request( File "/srv/homeassistant/lib/python3.9/site-packages/pydeconz/gateway.py", line 187, in _request raise ResponseError( pydeconz.errors.ResponseError: Invalid content type: text/html (<ClientResponse(http://192.168.1.153:8080/api/4BEFF79B86/sensors/17/config) [200 OK]> <CIMultiDictProxy('Access-Control-Allow-Origin': '', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '0')> ) `

From the file ...../pydeconz/gateway.py around line 187:

` try: async with self.session.request(method, url, json=json) as res:

            if res.content_type != "application/json":
                raise ResponseError(
                    "Invalid content type: {} ({})".format(res.content_type, res)
                )

`

Seems like when passing a certain temperature the message sent is no longer "application/json" but "text/html"? However, the new temperature selected will transfer to the thermostat and set it correctly.

Kane610 commented 1 year ago

Thanks! This definitely sounds like its a deconz issue, before moving the issue would you mind enabling debug for the deconz integration and have it perform one call that works (setting it to 32) and one failing call (setting it to 32,5)? This has been requested by deconz devs

mrbardman commented 1 year ago

Enabled Deconz debug, pasting the log here. A few lines in the log is not relevant to the thermostat. I guess Deconz people see that. So I set the thermostat to 32.0 and then 31.5 without error. Then 32.5 and got the error. Then set it to 32.0 and everything was fine. Like last time, the 32.5 setting actually went through to the thermostat and set it, but still triggered the error in HA.

Put in configuration.yaml:

logger:
  default: info
  logs:
    pydeconz: debug
    homeassistant.components.deconz: debug

Log output:

2022-10-10 09:22:29.274 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"16","r":"sensors","state":{"current":5,"lastupdated":"2022-10-10T07:22:29.252","power":1166,"voltage":228800},"t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0b04"} 2022-10-10 09:22:31.587 DEBUG (MainThread) [pydeconz.websocket] {"attr":{"colorcapabilities":0,"ctmax":65279,"ctmin":0,"id":"13","lastannounced":"2022-08-03T14:22:05Z","lastseen":"2022-10-10T07:22Z","manufacturername":"Philips","modelid":"LTA001","name":"Bordlampe v peisen","swversion":"1.93.11","type":"Color temperature light","uniqueid":"00:17:88:01:08:a9:88:1b-0b"},"e":"changed","id":"13","r":"lights","t":"event","uniqueid":"00:17:88:01:08:a9:88:1b-0b"} 2022-10-10 09:22:32.541 DEBUG (MainThread) [pydeconz.gateway] Sending "put" "{'heatsetpoint': 3200.0}" to "http://192.168.1.153:8080/api/4BEFF79B86/sensors/17/config" 2022-10-10 09:22:32.555 DEBUG (MainThread) [pydeconz.gateway] HTTP request response: [{'success': {'/sensors/17/config/heatsetpoint': 3200}}] 2022-10-10 09:22:32.559 DEBUG (MainThread) [pydeconz.websocket] {"config":{"heatsetpoint":3200,"mode":"heat","offset":-250,"on":false,"reachable":true},"e":"changed","id":"17","r":"sensors","t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0201"} 2022-10-10 09:22:32.693 DEBUG (MainThread) [pydeconz.websocket] {"config":{"heatsetpoint":3200,"mode":"heat","offset":-250,"on":false,"reachable":true},"e":"changed","id":"17","r":"sensors","t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0201"} 2022-10-10 09:22:33.254 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"16","r":"sensors","state":{"current":5,"lastupdated":"2022-10-10T07:22:33.253","power":1166,"voltage":228800},"t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0b04"} 2022-10-10 09:22:34.809 DEBUG (MainThread) [pydeconz.websocket] {"attr":{"colorcapabilities":0,"ctmax":65279,"ctmin":0,"id":"15","lastannounced":"2022-10-08T22:18:29Z","lastseen":"2022-10-10T07:22Z","manufacturername":"Philips","modelid":"LTA001","name":"Bordlampe Bård soverom","swversion":"1.93.7","type":"Color temperature light","uniqueid":"00:17:88:01:08:ae:ab:46-0b"},"e":"changed","id":"15","r":"lights","t":"event","uniqueid":"00:17:88:01:08:ae:ab:46-0b"} 2022-10-10 09:22:35.311 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"16","r":"sensors","state":{"current":5,"lastupdated":"2022-10-10T07:22:35.295","power":1164,"voltage":228800},"t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0b04"} 2022-10-10 09:22:37.276 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"16","r":"sensors","state":{"current":5,"lastupdated":"2022-10-10T07:22:37.275","power":1164,"voltage":228800},"t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0b04"} 2022-10-10 09:22:38.950 DEBUG (MainThread) [pydeconz.gateway] Sending "put" "{'heatsetpoint': 3150.0}" to "http://192.168.1.153:8080/api/4BEFF79B86/sensors/17/config" 2022-10-10 09:22:38.974 DEBUG (MainThread) [pydeconz.gateway] HTTP request response: [{'success': {'/sensors/17/config/heatsetpoint': 3150}}] 2022-10-10 09:22:38.977 DEBUG (MainThread) [pydeconz.websocket] {"config":{"heatsetpoint":3150,"mode":"heat","offset":-250,"on":false,"reachable":true},"e":"changed","id":"17","r":"sensors","t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0201"} 2022-10-10 09:22:39.124 DEBUG (MainThread) [pydeconz.websocket] {"config":{"heatsetpoint":3150,"mode":"heat","offset":-250,"on":false,"reachable":true},"e":"changed","id":"17","r":"sensors","t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0201"} 2022-10-10 09:22:39.301 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"16","r":"sensors","state":{"current":5,"lastupdated":"2022-10-10T07:22:39.285","power":1166,"voltage":228800},"t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0b04"} 2022-10-10 09:22:41.324 DEBUG (MainThread) [pydeconz.websocket] {"config":{"heatsetpoint":3150,"mode":"heat","offset":-250,"on":false,"reachable":true},"e":"changed","id":"17","r":"sensors","t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0201"} 2022-10-10 09:22:41.845 DEBUG (MainThread) [pydeconz.gateway] Sending "put" "{'heatsetpoint': 3250.0}" to "http://192.168.1.153:8080/api/4BEFF79B86/sensors/17/config" 2022-10-10 09:22:41.850 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [2846038072] Invalid content type: text/html (<ClientResponse(http://192.168.1.153:8080/api/4BEFF79B86/sensors/17/config) [200 OK]> <CIMultiDictProxy('Access-Control-Allow-Origin': '*', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '0')> ) Traceback (most recent call last): File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/websocket_api/commands.py", line 202, in handle_call_service await hass.services.async_call( File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/core.py", line 1738, in async_call task.result() File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/core.py", line 1775, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity_component.py", line 207, in handle_service await service.entity_service_call( File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/service.py", line 678, in entity_service_call future.result() # pop exception if have File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 931, in async_request_call await coro File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/service.py", line 715, in _handle_entity_call await result File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/climate/__init__.py", line 613, in async_service_temperature_set await entity.async_set_temperature(**kwargs) File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/deconz/climate.py", line 239, in async_set_temperature await self.gateway.api.sensors.thermostat.set_config( File "/srv/homeassistant/lib/python3.9/site-packages/pydeconz/interfaces/sensors.py", line 560, in set_config return await self.gateway.request_with_retry( File "/srv/homeassistant/lib/python3.9/site-packages/pydeconz/gateway.py", line 142, in request_with_retry return await self.request(method, path, json) File "/srv/homeassistant/lib/python3.9/site-packages/pydeconz/gateway.py", line 167, in request response: dict[str, Any] = await self._request( File "/srv/homeassistant/lib/python3.9/site-packages/pydeconz/gateway.py", line 187, in _request raise ResponseError( pydeconz.errors.ResponseError: Invalid content type: text/html (<ClientResponse(http://192.168.1.153:8080/api/4BEFF79B86/sensors/17/config) [200 OK]> <CIMultiDictProxy('Access-Control-Allow-Origin': '*', 'Content-Type': 'text/html; charset=utf-8', 'Content-Length': '0')> ) 2022-10-10 09:22:43.335 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"16","r":"sensors","state":{"current":5,"lastupdated":"2022-10-10T07:22:43.320","power":1165,"voltage":228800},"t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0b04"} 2022-10-10 09:22:45.313 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"16","r":"sensors","state":{"current":5,"lastupdated":"2022-10-10T07:22:45.297","power":1164,"voltage":228800},"t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0b04"} 2022-10-10 09:22:46.290 DEBUG (MainThread) [pydeconz.websocket] {"attr":{"id":"7","lastannounced":null,"lastseen":"2022-10-10T07:22Z","manufacturername":"ELKO","modelid":"ElkoDimmerZHA","name":"Dimmer Lysekrone Spisestue","swversion":"0.6","type":"Dimmable light","uniqueid":"08:6b:d7:ff:fe:b6:97:bd-01"},"e":"changed","id":"7","r":"lights","t":"event","uniqueid":"08:6b:d7:ff:fe:b6:97:bd-01"} 2022-10-10 09:22:47.341 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"16","r":"sensors","state":{"current":5,"lastupdated":"2022-10-10T07:22:47.339","power":1164,"voltage":228800},"t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0b04"} 2022-10-10 09:22:48.773 DEBUG (MainThread) [pydeconz.gateway] Sending "put" "{'heatsetpoint': 3200.0}" to "http://192.168.1.153:8080/api/4BEFF79B86/sensors/17/config" 2022-10-10 09:22:48.794 DEBUG (MainThread) [pydeconz.gateway] HTTP request response: [{'success': {'/sensors/17/config/heatsetpoint': 3200}}] 2022-10-10 09:22:48.796 DEBUG (MainThread) [pydeconz.websocket] {"config":{"heatsetpoint":3200,"mode":"heat","offset":-250,"on":false,"reachable":true},"e":"changed","id":"17","r":"sensors","t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0201"} 2022-10-10 09:22:48.958 DEBUG (MainThread) [pydeconz.websocket] {"config":{"heatsetpoint":3200,"mode":"heat","offset":-250,"on":false,"reachable":true},"e":"changed","id":"17","r":"sensors","t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0201"} 2022-10-10 09:22:49.430 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"16","r":"sensors","state":{"current":5,"lastupdated":"2022-10-10T07:22:49.414","power":1162,"voltage":228800},"t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0b04"} 2022-10-10 09:22:51.429 DEBUG (MainThread) [pydeconz.websocket] {"attr":{"id":"17","lastannounced":null,"lastseen":"2022-10-10T07:22Z","manufacturername":"NAMRON AS","modelid":"4512737","name":"Thermostat 17","swversion":"6.9.1.0_r4","type":"ZHAThermostat","uniqueid":"1f:ff:00:01:00:00:02:22-01-0201"},"e":"changed","id":"17","r":"sensors","t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0201"} 2022-10-10 09:22:51.432 DEBUG (MainThread) [pydeconz.websocket] {"attr":{"id":"16","lastannounced":null,"lastseen":"2022-10-10T07:22Z","manufacturername":"NAMRON AS","modelid":"4512737","name":"Power 16","swversion":"6.9.1.0_r4","type":"ZHAPower","uniqueid":"1f:ff:00:01:00:00:02:22-01-0b04"},"e":"changed","id":"16","r":"sensors","t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0b04"} 2022-10-10 09:22:51.432 DEBUG (MainThread) [pydeconz.websocket] {"e":"changed","id":"16","r":"sensors","state":{"current":5,"lastupdated":"2022-10-10T07:22:51.408","power":1163,"voltage":228800},"t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0b04"} 2022-10-10 09:22:51.433 DEBUG (MainThread) [pydeconz.websocket] {"attr":{"id":"15","lastannounced":null,"lastseen":"2022-10-10T07:22Z","manufacturername":"NAMRON AS","modelid":"4512737","name":"Consumption 15","swversion":"6.9.1.0_r4","type":"ZHAConsumption","uniqueid":"1f:ff:00:01:00:00:02:22-01-0702"},"e":"changed","id":"15","r":"sensors","t":"event","uniqueid":"1f:ff:00:01:00:00:02:22-01-0702"}

Kane610 commented 1 year ago

Thanks! I've forwarded examples to Deconz devs

Kane610 commented 1 year ago

Apparently there is a max limit of 32 degrees

heatsetpoint | Number (500–3200) | Set the desired heating temperature.

mrbardman commented 1 year ago

OK, so that is a max value of 32.0 that Deconz sets? I looked at the DDF file for the thermostat with the deCONZ app on my rpi, but could not find any max value of 3200 there.

Anyway, I can live with it, just a strange error message. Not that I need all that heat in the floor, but more that I use it for making sure to maximize power flow to the floor (concrete - heat magazine) while the energy spot price is low. Thank you for forwarding and the feedback!

Kane610 commented 1 year ago

It seems to only be in API documentation that the limitation is considered, I haven't implemented any limit controls in the integration.

Thanks for reporting and investigating!