Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Command failed with status code 502. Reason given was: COMMAND_NOT_FOUND') #104

Open
stevensoave opened this issue Aug 20, 2022 · 2 comments

Comments

@stevensoave
Copy link

@xmiklos @dazzyp @oischinger I have the same issue.

If the status of "climate.vicare_heating" (ViCare Heating) is showing "Idle (Auto)" I get the error below if trying to setTemperature.

If the heating is on (i.e. Tado started the boiler heating) and the state of "climate.vicare_heating" (ViCare Heating)" shows "Heating (Auto)", then all commands work, including setTemperate.

Basically, I can only successfully issue setTemperate commands if the boiler is already actively heating. If it's Idle, not heating, then setTemperate commands fail from the Integration.

HA Version
Home Assistant 2022.8.5
Supervisor 2022.08.3
Operating System 8.4
Frontend 20220802.0 - latest

Gas Boiler
Viesmann Vitodens 100B1GA 25kW HeatOnly)

Logger: homeassistant.components.websocket_api.http.connection
Source: components/vicare/climate.py:364
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 12:47:35 (1 occurrences)
Last logged: 12:47:35

[140661953056672] (PyViCareCommandError(...), 'Command failed with status code 502. Reason given was: COMMAND_NOT_FOUND')
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1750, 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 930, 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 488, in async_set_preset_mode
await self.hass.async_add_executor_job(self.set_preset_mode, preset_mode)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/vicare/climate.py", line 364, in set_preset_mode
self._circuit.deactivateProgram(self._current_program)
File "/usr/local/lib/python3.10/site-packages/PyViCare/PyViCareDevice.py", line 467, in deactivateProgram
return self.service.setProperty(f"heating.circuits.{self.circuit}.operating.programs.{program}", "deactivate", {})
File "/usr/local/lib/python3.10/site-packages/PyViCare/PyViCareCachedService.py", line 29, in setProperty
response = super().setProperty(property_name, action, data)
File "/usr/local/lib/python3.10/site-packages/PyViCare/PyViCareService.py", line 60, in setProperty
return self.oauth_manager.post(url, post_data)
File "/usr/local/lib/python3.10/site-packages/PyViCare/PyViCareAbstractOAuthManager.py", line 91, in post
self.__handle_command_error(response)
File "/usr/local/lib/python3.10/site-packages/PyViCare/PyViCareAbstractOAuthManager.py", line 67, in __handle_command_error
raise PyViCareCommandError(response)
PyViCare.PyViCareUtils.PyViCareCommandError: (PyViCareCommandError(...), 'Command failed with status code 502. Reason given was: COMMAND_NOT_FOUND')

@woehrl01
Copy link
Contributor

@stevensoave that's a limitation of the viessmann API. You can't set a target temperature if the heating is not activated.

I believe the argumentation is that it does not make sense to configure a temperature if you don't heat.

@stevensoave
Copy link
Author

@woehrl01 Thanks. Half see their point. I can work with that now that I know, thanks. I'll just get HA to check that climate.vicare_heating" "(ViCare Heating)" shows "Heating (Auto), before setting a new temperature.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants