thomasgermain / vaillant-component

Multimatic integration for Home Assistant (also compatible with sensoAPP)
MIT License
135 stars 24 forks source link

Cannot set hotwater temperature #246

Open maiksensi opened 8 months ago

maiksensi commented 8 months ago

Hey šŸ‘‹ I am probably doing something horribly wrong but it seems that I cannot set the hotwater temperature via Homeassistant. The Error log I get is attached. It seems that the component is calling the wrong API. It's working fine in the sensonet app. Any hints on what I am doing wrong?

2023-10-21 22:20:34.743 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration multimatic which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-10-21 22:20:34.748 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-10-21 22:23:21.510 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session
2023-10-21 22:23:21.513 ERROR (MainThread) [homeassistant] Error doing job: Unclosed connector
2023-10-21 22:23:23.471 WARNING (MainThread) [custom_components.mypyllant.binary_sensor] No system data, skipping binary sensors
2023-10-21 22:23:23.472 WARNING (MainThread) [custom_components.mypyllant.sensor] No system data, skipping sensors
2023-10-21 22:23:23.472 WARNING (MainThread) [custom_components.mypyllant.sensor] No daily data, skipping sensors
2023-10-21 22:23:23.472 WARNING (MainThread) [custom_components.mypyllant.climate] No system data, skipping climate
2023-10-21 22:23:23.472 WARNING (MainThread) [custom_components.mypyllant.water_heater] No system data, skipping water heater
2023-10-22 00:36:02.256 WARNING (MainThread) [pymultimatic.systemmanager] quick_mode is not compatible with SYSTEMCONTROL_SENSO
2023-10-22 00:36:02.298 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Cannot put https://smart.vaillant.com/mobile/api/v4/facilities/SERIALNUMBERXXXX/systemcontrol/tli/v1/dhw/hotwater/configuration/temperature_setpoint, status: 404, response: <!doctype html><html lang="en"><head><title>HTTP Status 404 ā€“ Not Found</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 404 ā€“ Not Found</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Description</b> The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.</p><hr class="line" /><h3>Apache Tomcat/mobilDIALOG-Live</h3></body></html>,payload: {'hotwater_temperature_setpoint': 50.0}
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 704, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action
    return long_task.result()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2012, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2049, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call
    response_data = 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/water_heater/__init__.py", line 397, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/multimatic/water_heater.py", line 157, in async_set_temperature
    await self.coordinator.api.set_hot_water_target_temperature(self, target_temp)
  File "/config/custom_components/multimatic/coordinator.py", line 205, in set_hot_water_target_temperature
    await self._manager.set_hot_water_setpoint_temperature(
  File "/usr/local/lib/python3.11/site-packages/pymultimatic/systemmanager.py", line 502, in set_hot_water_setpoint_temperature
    await self._call_api(
  File "/usr/local/lib/python3.11/site-packages/pymultimatic/systemmanager.py", line 80, in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymultimatic/systemmanager.py", line 902, in _call_api
    response = await self._connector.request(method, url, payload)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymultimatic/api/connector.py", line 181, in request
    raise ApiError(
pymultimatic.api.error.ApiError: Cannot put https://smart.vaillant.com/mobile/api/v4/facilities/SERIALNUMBERXXXX/systemcontrol/tli/v1/dhw/hotwater/configuration/temperature_setpoint, status: 404, response: <!doctype html><html lang="en"><head><title>HTTP Status 404 ā€“ Not Found</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 404 ā€“ Not Found</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Description</b> The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.</p><hr class="line" /><h3>Apache Tomcat/mobilDIALOG-Live</h3></body></html>,payload: {'hotwater_temperature_setpoint': 50.0}
2023-10-22 00:36:02.374 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140363708849600] Error handling message: Unknown error (unknown_error) Maik from 192.168.178.46 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/118.0)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 727, in handle_execute_script
    script_result = await script_obj.async_run(msg.get("variables"), context=context)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1578, in async_run
    return await asyncio.shield(run.async_run())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 420, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 470, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 493, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 704, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action
    return long_task.result()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2012, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2049, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call
    response_data = 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/water_heater/__init__.py", line 397, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/multimatic/water_heater.py", line 157, in async_set_temperature
    await self.coordinator.api.set_hot_water_target_temperature(self, target_temp)
  File "/config/custom_components/multimatic/coordinator.py", line 205, in set_hot_water_target_temperature
    await self._manager.set_hot_water_setpoint_temperature(
  File "/usr/local/lib/python3.11/site-packages/pymultimatic/systemmanager.py", line 502, in set_hot_water_setpoint_temperature
    await self._call_api(
  File "/usr/local/lib/python3.11/site-packages/pymultimatic/systemmanager.py", line 80, in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymultimatic/systemmanager.py", line 902, in _call_api
    response = await self._connector.request(method, url, payload)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pymultimatic/api/connector.py", line 181, in request
    raise ApiError(
pymultimatic.api.error.ApiError: Cannot put https://smart.vaillant.com/mobile/api/v4/facilities/SERIALNUMBERXXXX/systemcontrol/tli/v1/dhw/hotwater/configuration/temperature_setpoint, status: 404, response: <!doctype html><html lang="en"><head><title>HTTP Status 404 ā€“ Not Found</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 404 ā€“ Not Found</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Description</b> The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.</p><hr class="line" /><h3>Apache Tomcat/mobilDIALOG-Live</h3></body></html>,payload: {'hotwater_temperature_setpoint': 50.0}
maiksensi commented 8 months ago

wrote a little script that does what I need. Still not sure why this component doesn't work for me. But I am closing this for now.

thomasgermain commented 8 months ago

Hello,

I don't think you're doing something wrong. I will check.

Mind you share the script you did ? And also, which URL you're calling to set target temp for hotwater ?

Also I can see you also have mypyllant setup, are you using sensoAPP or myVaillant app ?

glebdzyuba commented 8 months ago

@thomasgermain just to add here. Having absolutely same issue while trying to set the target temp for hotwater

[140634125760832] Cannot put https://smart.vaillant.com/mobile/api/v4/facilities/%SERIAL%/systemcontrol/tli/v1/dhw/hotwater/configuration/temperature_setpoint, status: 404, response: <!doctype html><html lang="en"><head><title>HTTP Status 404 ā€“ Not Found</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 404 ā€“ Not Found</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Description</b> The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.</p><hr class="line" /><h3>Apache Tomcat/mobilDIALOG-Live</h3></body></html>,payload: {'hotwater_temperature_setpoint': 53.0}

p.s. using 1.16.3 version

maiksensi commented 8 months ago

Now I am using the myVaillant app.

mhirsch47 commented 7 months ago

I'm facing the same behavior. Basically it seem to work, as I can enable away mode, but disabling it or changing the hotwater temp, throws an error. Open to do more troubleshooting, if you guide me. It seems at first glance that Vaillant requires different parameters... Using V1.16.3, Core: 2023.11.3, Supervisor: 2023.11.6