tadasdanielius / daikin_altherma

Daikin Altherma custom component for home assistant
MIT License
71 stars 5 forks source link

D2CND Gas boiler - EcoMode not switching #52

Closed mihsu81 closed 11 months ago

mihsu81 commented 1 year ago

Hi @tadasdanielius,

I've noticed that the EcoMode switch of a D2CND Gas boiler is malfunctioning. You can trigger it but it reverts to its initial state after a couple of seconds.

The only error I could find is the below, but it only appeared once this evening. I've noticed the issue since a few days ago. I'm currently on v1.3.7 and didn't see the issue in v1.3.4 when you first implemented the EcoMode switch.

Thanks in advance for your help.

This error originated from a custom integration.

Logger: custom_components.daikin_altherma
Source: custom_components/daikin_altherma/__init__.py:190
Integration: Daikin Altherma HVAC (documentation, issues)
First occurred: 20:15:56 (1 occurrences)
Last logged: 20:15:56

Something went wrong while updating data from the device
Traceback (most recent call last):
  File "/config/custom_components/daikin_altherma/__init__.py", line 190, in async_update
    self._status = await self.device.get_current_state()
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 398, in get_current_state
    unit_status = await unit.get_current_state()
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 131, in get_current_state
    states = await self.read_states()
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 79, in read_states
    results[state] = await self.read_state(state)
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 73, in read_state
    resp = await self.read(query_type='UnitStatus', prop=status)
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 49, in read
    result = await self._connection.request(destination)
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/comm.py", line 46, in request
    response_str = await self._client.receive_str(timeout=self._timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_ws.py", line 273, in receive_str
    msg = await self.receive(timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_ws.py", line 217, in receive
    raise RuntimeError("Concurrent call to receive() is not allowed")
RuntimeError: Concurrent call to receive() is not allowed
eduardkirkosa commented 1 year ago

I have something similar source: 190 but for Altherma3RF ( when i enter in installer menu ):

Logger: custom_components.daikin_altherma Source: custom_components/daikin_altherma/init.py:190 Integration: Daikin Altherma HVAC (documentation, issues) First occurred: 12:59:32 PM (1 occurrences) Last logged: 12:59:32 PM

Failed to the get the data from the device [192.168.2.44] () Traceback (most recent call last): File "/config/custom_components/daikin_altherma/init.py", line 190, in async_update self._status = await self.device.get_current_state() File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 398, in get_current_state unit_status = await unit.get_current_state() File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 131, in get_current_state states = await self.read_states() File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 79, in read_states results[state] = await self.read_state(state) File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 73, in read_state resp = await self.read(query_type='UnitStatus', prop=status) File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 49, in read result = await self._connection.request(destination) File "/usr/local/lib/python3.10/site-packages/pyaltherma/comm.py", line 39, in request await self.connect() File "/usr/local/lib/python3.10/site-packages/pyaltherma/comm.py", line 28, in connect self._client = await self._session.ws_connect(self.ws_address) File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 776, in _ws_connect resp = await self.request( File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 535, in _request conn = await self._connector.connect( File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 542, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 907, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 986, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection sock = await self._connect_sock( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect return await fut asyncio.exceptions.CancelledError

Logger: custom_components.daikin_altherma Source: custom_components/daikin_altherma/init.py:57 Integration: Daikin Altherma HVAC (documentation, issues) First occurred: 12:59:35 PM (2 occurrences) Last logged: 1:02:40 PM

Bad logger message: Failed to update the device status with error the JSON object must be str, bytes or bytearray, not NoneType ((TypeError('the JSON object must be str, bytes or bytearray, not NoneType'),)) Unit left installer state. If there are heavy changes it is probably better to reload integration. Currently it may not fully incorporate new settings.

eduardkirkosa commented 1 year ago

Logger: custom_components.daikin_altherma Source: custom_components/daikin_altherma/init.py:191 Integration: Daikin Altherma HVAC (documentation, issues) First occurred: 3:11:54 PM (1 occurrences) Last logged: 3:11:54 PM

Failed to the get the data from the device [192.168.2.43] () Traceback (most recent call last): File "/config/custom_components/daikin_altherma/init.py", line 191, in async_update self._climate_control_powered = await self._device.climate_control.is_turned_on File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 305, in is_turned_on return await self.read_operation("Power") == "on" File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 70, in read_operation return await self.read(query_type='Operation', prop=operation) File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 49, in read result = await self._connection.request(destination) File "/usr/local/lib/python3.10/site-packages/pyaltherma/comm.py", line 46, in request response_str = await self._client.receive_str(timeout=self._timeout) File "/usr/local/lib/python3.10/site-packages/aiohttp/client_ws.py", line 273, in receive_str msg = await self.receive(timeout) File "/usr/local/lib/python3.10/site-packages/aiohttp/client_ws.py", line 229, in receive msg = await self._reader.read() File "/usr/local/lib/python3.10/site-packages/aiohttp/streams.py", line 657, in read return await super().read() File "/usr/local/lib/python3.10/site-packages/aiohttp/streams.py", line 616, in read await self._waiter asyncio.exceptions.CancelledError Logger: custom_components.daikin_altherma Source: custom_components/daikin_altherma/init.py:57 Integration: Daikin Altherma HVAC (documentation, issues) First occurred: 3:11:56 PM (1 occurrences) Last logged: 3:11:56 PM

Bad logger message: Failed to update the device status with error Received message 8:1007 is not str ((TypeError('Received message 8:1007 is not str'),))

tadasdanielius commented 1 year ago

Hi @tadasdanielius,

I've noticed that the EcoMode switch of a D2CND Gas boiler is malfunctioning. You can trigger it but it reverts to its initial state after a couple of seconds.

The only error I could find is the below, but it only appeared once this evening. I've noticed the issue since a few days ago. I'm currently on v1.3.7 and didn't see the issue in v1.3.4 when you first implemented the EcoMode switch.

Thanks in advance for your help.

This error originated from a custom integration.

Logger: custom_components.daikin_altherma
Source: custom_components/daikin_altherma/__init__.py:190
Integration: Daikin Altherma HVAC (documentation, issues)
First occurred: 20:15:56 (1 occurrences)
Last logged: 20:15:56

Something went wrong while updating data from the device
Traceback (most recent call last):
  File "/config/custom_components/daikin_altherma/__init__.py", line 190, in async_update
    self._status = await self.device.get_current_state()
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 398, in get_current_state
    unit_status = await unit.get_current_state()
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 131, in get_current_state
    states = await self.read_states()
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 79, in read_states
    results[state] = await self.read_state(state)
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 73, in read_state
    resp = await self.read(query_type='UnitStatus', prop=status)
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 49, in read
    result = await self._connection.request(destination)
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/comm.py", line 46, in request
    response_str = await self._client.receive_str(timeout=self._timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_ws.py", line 273, in receive_str
    msg = await self.receive(timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_ws.py", line 217, in receive
    raise RuntimeError("Concurrent call to receive() is not allowed")
RuntimeError: Concurrent call to receive() is not allowed

The Concurrent call to receive() is not allowed is known issue. It can be reproduced if you keep switching fast for few times you might get this error. The reason is that the integration in background constantly fetching the data every 5 seconds and if you change something while the data is being updated from the device you will get this error. So basically, it happens from time to time and at some point I will try to fix it. Other than that the switch should work.

mihsu81 commented 1 year ago

@tadasdanielius The EcoMode switch doesn't appear in the Logbook of the device when triggered, while the Climate Control switch functions as expected and the actions performed on it appear in the Logbook.

image

eduardkirkosa commented 1 year ago

@mihsu81 ,I have different view than yours (more sensors and no sliders for target temperature): image

mihsu81 commented 1 year ago

@eduardkirkosa Your boiler has a newer firmware and more options I guess. Mine is a Daikin D2CND024A1AA and doesn't expose consumption sensors. I have sliders instead of input boxes because i've customized the entities in customize.yaml:

number.target_temperature_day:
  device_class: temperature
  mode: slider
number.target_temperature_night:
  device_class: temperature
  mode: slider
eduardkirkosa commented 1 year ago

@mihsu81 had same issue when the device was installed, and I didn't leave the installer to go away till he activated all options from the menu of the D2CND ( took him a good couple of minutes trial/error - till I did see the options in the phone app )

mihsu81 commented 1 year ago

@eduardkirkosa Thanks for the info. I'll get in touch with the installer and see if anything can be done at this stage. Is the EcoMode switch functioning on your gas boiler? What is your exact gas boiler model? Thanks.

eduardkirkosa commented 1 year ago

D2CND028A1AB, don't know what that EcoMode do' , ... so' I didn't press it till now ;)

mihsu81 commented 1 year ago

@eduardkirkosa Could you please try to toggle EcoMode from HA and see if it reverts within 2-3 seconds? I just want to know if the issue is on my side or something changed in the integration that would affect it. Thanks. "The central heating ECO mode provides more economic central heating. Main purpose of the ECO mode is to operate the boiler at the condensing temperature range so to increase the efficiency. ECO mode can be activated at any central heating operation mode explained above."

eduardkirkosa commented 1 year ago

Yeap, pressed and a couple of seconds turned off :(

Turned on from the Phone App, and still toggled on in HA

image

tadasdanielius commented 1 year ago

Just to confirm if you switch in daikin's app do you see anything in HA? And as I understood no changes can be made in HA

mihsu81 commented 1 year ago

@tadasdanielius, Yes, switching EcoMode in Onecta is reflected in HA. Switching EcoMode in HA is not reflected in HA and is reverted in aprox. 2 seconds. In the below screenshot the switching was done from Onecta. image

tadasdanielius commented 1 year ago

Ok, it's a blind shot but can you try to replace config/custom_components/daikin_altherma/switch.py with this

mihsu81 commented 1 year ago

Unfortunately https://raw.githubusercontent.com/tadasdanielius/daikin_altherma/52-d2cnd-gas-boiler-ecomode-not-switching/custom_components/daikin_altherma/switch.py didn't make any difference.

tadasdanielius commented 1 year ago

Alright, that might be a tricky one 😄 . Let's try one more thing. Here is the updated version https://raw.githubusercontent.com/tadasdanielius/daikin_altherma/52-d2cnd-gas-boiler-ecomode-not-switching/custom_components/daikin_altherma/switch.py I have little hope that this change will work but if we want to make it working we will have to play a lot.

mihsu81 commented 1 year ago

Alright, that might be a tricky one 😄 . Let's try one more thing. Here is the updated version https://raw.githubusercontent.com/tadasdanielius/daikin_altherma/52-d2cnd-gas-boiler-ecomode-not-switching/custom_components/daikin_altherma/switch.py I have little hope that this change will work but if we want to make it working we will have to play a lot.

Hehe, no worries, we'll try as many times as needed. 😁 This version of switch.py throws an error when EcoMode is toggled from on to off.

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/daikin_altherma/switch.py:58
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 18:36:52 (3 occurrences)
Last logged: 18:38:25

[139824366520112] Invalid argument 0 for operation EcoMode or operation is not settable.
[139824366520112] Invalid argument 1 for operation EcoMode or operation is not settable.
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 1745, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1782, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 943, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
    await result
  File "/config/custom_components/daikin_altherma/switch.py", line 64, in async_turn_off
    await self._set_state(0)
  File "/config/custom_components/daikin_altherma/switch.py", line 58, in _set_state
    await controller.call_operation(self._operation, state)
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 118, in call_operation
    raise AlthermaException(
pyaltherma.errors.AlthermaException: Invalid argument 0 for operation EcoMode or operation is not settable.
tadasdanielius commented 1 year ago

Ok let's go back where we left. So here is another change for you to try. Copy and paste this file and let's see if that will help.

tadasdanielius commented 1 year ago

but how did it work in 1.3.4 I have no idea 😕 . No changes which were made could break that. Can you try to revert to 1.3.4 and see if it works?

mihsu81 commented 1 year ago

https://raw.githubusercontent.com/tadasdanielius/daikin_altherma/52-d2cnd-gas-boiler-ecomode-not-switching/custom_components/daikin_altherma/switch.py didn't help. Funny thing, I've changed to 1.3.4 and it's still not working. I've redownloaded the integration and created again the device. I had to add the changes from https://github.com/tadasdanielius/daikin_altherma/issues/31#issuecomment-1308310679 and https://github.com/tadasdanielius/daikin_altherma/issues/31#issuecomment-1308330502 because it suffered from these bugs. Now when I toggle the EcoMode switch it crashes the integration (all entities appear unavailable for a few seconds), or it toggles for a few seconds and it becomes unavailable after a few more seconds. There weren't any firmware updates since I started using this integration. When the entities appear unavailable I also get the bellow errors in HA.

This error originated from a custom integration.

Logger: custom_components.daikin_altherma
Source: custom_components/daikin_altherma/__init__.py:190
Integration: Daikin Altherma HVAC (documentation, issues)
First occurred: 11:56:31 (2 occurrences)
Last logged: 12:06:45

Something went wrong while updating data from the device
Traceback (most recent call last):
  File "/config/custom_components/daikin_altherma/__init__.py", line 190, in async_update
    self._status = await self.device.get_current_state()
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 398, in get_current_state
    unit_status = await unit.get_current_state()
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 131, in get_current_state
    states = await self.read_states()
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 79, in read_states
    results[state] = await self.read_state(state)
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 73, in read_state
    resp = await self.read(query_type='UnitStatus', prop=status)
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 49, in read
    result = await self._connection.request(destination)
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/comm.py", line 46, in request
    response_str = await self._client.receive_str(timeout=self._timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_ws.py", line 273, in receive_str
    msg = await self.receive(timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_ws.py", line 217, in receive
    raise RuntimeError("Concurrent call to receive() is not allowed")
RuntimeError: Concurrent call to receive() is not allowed
This error originated from a custom integration.

Logger: custom_components.daikin_altherma
Source: custom_components/daikin_altherma/__init__.py:57
Integration: Daikin Altherma HVAC (documentation, issues)
First occurred: 11:56:31 (5 occurrences)
Last logged: 12:22:07

Bad logger message: Failed to update the device status with error Received message 8:1007 is not str ((TypeError('Received message 8:1007 is not str'),))
Bad logger message: Failed to update the device status with error Received message 256:None is not str ((TypeError('Received message 256:None is not str'),))
This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/daikin_altherma/sensor.py:99
Integration: Daikin Altherma HVAC (documentation, issues)
First occurred: 12:20:20 (12 occurrences)
Last logged: 12:20:45

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 182, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 330, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 135, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 390, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 566, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 607, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 572, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 466, in state
    value = self.native_value
  File "/config/custom_components/daikin_altherma/sensor.py", line 99, in native_value
    return round(status, 2)
TypeError: type NoneType doesn't define __round__ method
tadasdanielius commented 1 year ago

So it seems it never worked before. I'd suggest to move to newest version and copy switch.py this file. Let's see if that will help.

mihsu81 commented 1 year ago

I was convinced it started working in 1.3.4 after adding the 2 additional fixes in switch.py.

In 1.3.8, with the switch.py from https://github.com/tadasdanielius/daikin_altherma/issues/52#issuecomment-1416832291 I get again the errors mentioned in https://github.com/tadasdanielius/daikin_altherma/issues/31#issuecomment-1308296980.

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/daikin_altherma/switch.py:58
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 09:25:40 (6 occurrences)
Last logged: 09:31:08

[139725983527936] Invalid argument 0 for operation EcoMode or operation is not settable.
[139725983527936] Invalid argument 1 for operation EcoMode or operation is not settable.
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 1787, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1824, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 968, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 720, in _handle_entity_call
    await result
  File "/config/custom_components/daikin_altherma/switch.py", line 64, in async_turn_off
    await self._set_state(0)
  File "/config/custom_components/daikin_altherma/switch.py", line 58, in _set_state
    await controller.call_operation(self._operation, state, validate=False)
  File "/usr/local/lib/python3.10/site-packages/pyaltherma/controllers.py", line 118, in call_operation
    raise AlthermaException(
pyaltherma.errors.AlthermaException: Invalid argument 0 for operation EcoMode or operation is not settable.
tadasdanielius commented 1 year ago

Ok, this time you will need to update manifest.json and restart HA

mihsu81 commented 1 year ago

The same situation with the updated manifest.json - toggling the EcoMode switch reverts after 2.5 seconds and doesn't produce any error or warning in the HA logs. This is proving to be a tough nut to crack.

tadasdanielius commented 1 year ago

Well I didn't expect to see same error. Probably HA did not pick the latest pyaltherma package version which was specified in manifest. So, I bumped integration version as well. If you update manifest.json again your integration version should be 1.3.9 and i'd expect different kind of error.

mihsu81 commented 1 year ago

Still no change and no errors. I even rebooted HA. image

tadasdanielius commented 1 year ago

Do you have separate machine with python installed? If you do I could give some details on how to install pyaltherma and try some combinations in order to find out the values which we need to send to device. It might speed up debugging.

mihsu81 commented 1 year ago

Yes I could do that if it made things progress faster.

tadasdanielius commented 1 year ago

Ok. So, first thing what you need to do is setup python and install pyaltherma pip install pyaltherma

Next, download this file and change line 23:

daikin_ip = 'YOUR_DAIKIN_IP_ADDRESS'

Put your daikin's IP address, it should look something like this

daikin_ip = '192.168.1.100'

Then, turn off EcoMode on your device and I would strongly suggest to disable or shutdown HA integration during this experiment

Finally try to run it python ecomode_run.py

This script attempts to send various values (e.g., 'on', '1', '0', etc.) to the device and checks the response it receives. The goal is to identify the correct value that will activate EcoMode. After each command is sent, the script will pause for 30 seconds. While the script is running, keep monitoring the Daikin app to see if EcoMode is enabled at some point.

mihsu81 commented 1 year ago

Sorry for the delay, life got in the way. 😁 Got positive results with:

Trying EcoMode with 1 (int)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/EcoMode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "fef49", "op": 1, "to": "/[0]/MNAE/1/Operation/EcoMode", "ty": 4, "pc": {"m2m:cin": {"con": 1, "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":2001,"rqi":"fef49","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/EcoMode"}}
Valid response received with values EcoMode and 1
[EcoMode(1)]: Response: {'m2m:rsp': {'rsc': 2001, 'rqi': 'fef49', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/EcoMode'}}

Here are all the logs:

mihsu81@HAOS02:~$ python3 ecomode_run.py
DEBUG:asyncio:Using selector: EpollSelector
DEBUG:pyaltherma.comm:Connected to ws://192.168.45.22/mca
DEBUG:pyaltherma.comm:[OUT]: [0]/MNAE/0/UnitProfile/la {"m2m:rqp": {"fr": "pyaltherma", "rqi": "42556", "op": 2, "to": "[0]/MNAE/0/UnitProfile/la"}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":2000,"rqi":"42556","to":"pyaltherma","fr":"[0]/MNAE/0/UnitProfile/la","pc":{"m2m:cin":{"rn":"00000002","ri":"008a_00000002","pi":"008a","ty":4,"ct":"20230310T112027Z","lt":"20230310T112027Z","st":2,"con":"{\"SyncStatus\":\"registration\",\"UnitStatus\":[\"ErrorState\"],\"DateTime\":{\"DateTimeAdjustable\":true}}"}}}}
DEBUG:pyaltherma.controllers:Discovered unit 0
DEBUG:pyaltherma.comm:[OUT]: [0]/MNAE/0 {"m2m:rqp": {"fr": "pyaltherma", "rqi": "b574b", "op": 2, "to": "[0]/MNAE/0"}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":2000,"rqi":"b574b","to":"pyaltherma","fr":"[0]/MNAE/0","pc":{"m2m:cnt":{"rn":"0","ri":"0089","pi":"C0003","ty":3,"ct":"20230310T112027Z","lt":"20230310T112027Z","st":13,"lbl":"function/Adapter"}}}}
INFO:pyaltherma.controllers:Discovered unit: Water Tank Controller with id: 0 function/Adapter
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/0/UnitIdentifier/Name/la {"m2m:rqp": {"fr": "pyaltherma", "rqi": "0d5e0", "op": 2, "to": "/[0]/MNAE/0/UnitIdentifier/Name/la"}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4004,"rqi":"0d5e0","to":"pyaltherma","fr":"/[0]/MNAE/0/UnitIdentifier/Name/la"}}
DEBUG:pyaltherma.comm:[OUT]: [0]/MNAE/1/UnitProfile/la {"m2m:rqp": {"fr": "pyaltherma", "rqi": "54b5a", "op": 2, "to": "[0]/MNAE/1/UnitProfile/la"}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":2000,"rqi":"54b5a","to":"pyaltherma","fr":"[0]/MNAE/1/UnitProfile/la","pc":{"m2m:cin":{"rn":"0000000e","ri":"0006_0000000e","pi":"0006","ty":4,"ct":"20230310T112122Z","lt":"20230310T112122Z","st":14,"con":"{\"SyncStatus\":\"update\",\"Sensor\":[\"IndoorTemperature\"],\"UnitStatus\":[\"ErrorState\",\"WarningState\",\"TargetTemperatureOverruledState\"],\"Operation\":{\"Power\":[\"on\",\"standby\"],\"OperationMode\":[\"heating_day\",\"heating_night\"],\"SensorTemperature\":{\"stepValue\":0.5000000000000000},\"TargetTemperatureDay\":{\"maxValue\":30.0000000000000000,\"minValue\":10.0000000000000000,\"stepValue\":0.5000000000000000},\"TargetTemperatureNight\":{\"maxValue\":30.0000000000000000,\"minValue\":10.0000000000000000,\"stepValue\":0.5000000000000000},\"TargetTemperature\":{\"heating_day\":{\"maxValue\":30.0000000000000000,\"minValue\":10.0000000000000000,\"stepValue\":0.5000000000000000},\"heating_night\":{\"maxValue\":30.0000000000000000,\"minValue\":10.0000000000000000,\"stepValue\":0.5000000000000000}},\"EcoMode\":[\"0\",\"1\"]},\"Schedule\":{\"Base\":\"TimeSegment\",\"defaultScheduleAvailable\":\"false\",\"NameAdjustable\":\"false\",\"List\":{\"Heating\":[{\"StartTime\":{\"stepValue\":15,\"unit\":\"minute\"},\"EndTime\":{\"stepValue\":15,\"unit\":\"minute\"},\"OperationMode\":[\"heating_day\",\"heating_night\"],\"TargetTemperature\":{\"heating_day\":{\"maxValue\":23.0000000000000000,\"minValue\":23.0000000000000000,\"stepValue\":0.0000000000000000},\"heating_night\":{\"maxValue\":24.0000000000000000,\"minValue\":24.0000000000000000,\"stepValue\":0.0000000000000000}},\"TimeSegment\":[\"StartTime\",\"EndTime\"],\"MaxSegmentsAllowed\":3},[],[\"weekday\",\"weekend\"],[\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\",\"sunday\"]]}},\"Consumption\":{}}"}}}}
DEBUG:pyaltherma.controllers:Discovered unit 1
DEBUG:pyaltherma.comm:[OUT]: [0]/MNAE/1 {"m2m:rqp": {"fr": "pyaltherma", "rqi": "bc0e0", "op": 2, "to": "[0]/MNAE/1"}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":2000,"rqi":"bc0e0","to":"pyaltherma","fr":"[0]/MNAE/1","pc":{"m2m:cnt":{"rn":"1","ri":"0005","pi":"C0003","ty":3,"ct":"20230310T112027Z","lt":"20230310T112027Z","st":13,"lbl":"function/SpaceHeating"}}}}
INFO:pyaltherma.controllers:Discovered unit: Climate Control with id: 1 function/SpaceHeating
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/UnitIdentifier/Name/la {"m2m:rqp": {"fr": "pyaltherma", "rqi": "5deaf", "op": 2, "to": "/[0]/MNAE/1/UnitIdentifier/Name/la"}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":2000,"rqi":"5deaf","to":"pyaltherma","fr":"/[0]/MNAE/1/UnitIdentifier/Name/la","pc":{"m2m:cin":{"rn":"00000002","ri":"000b_00000002","pi":"000b","ty":4,"ct":"20230310T112027Z","lt":"20230310T112027Z","st":2,"con":"Space Heating"}}}}
DEBUG:pyaltherma.comm:[OUT]: [0]/MNAE/2/UnitProfile/la {"m2m:rqp": {"fr": "pyaltherma", "rqi": "db7ad", "op": 2, "to": "[0]/MNAE/2/UnitProfile/la"}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":2000,"rqi":"db7ad","to":"pyaltherma","fr":"[0]/MNAE/2/UnitProfile/la","pc":{"m2m:cin":{"rn":"00000006","ri":"0063_00000006","pi":"0063","ty":4,"ct":"20230310T112100Z","lt":"20230310T112100Z","st":6,"con":"{\"SyncStatus\":\"reboot\",\"Sensor\":[],\"UnitStatus\":[\"ErrorState\",\"WarningState\"],\"Operation\":{\"Power\":[\"on\",\"standby\"],\"OperationMode\":[\"heating\"],\"SensorTemperature\":{\"stepValue\":1.0000000000000000},\"TargetTemperature\":{\"heating\":{\"maxValue\":60.0000000000000000,\"minValue\":35.0000000000000000,\"stepValue\":1.0000000000000000}},\"DomesticHotWaterTemperatureHeating\":{\"maxValue\":60.0000000000000000,\"minValue\":35.0000000000000000,\"stepValue\":1.0000000000000000,\"settable\":true}},\"Schedule\":{},\"Consumption\":{}}"}}}}
DEBUG:pyaltherma.controllers:Discovered unit 2
DEBUG:pyaltherma.comm:[OUT]: [0]/MNAE/2 {"m2m:rqp": {"fr": "pyaltherma", "rqi": "6104d", "op": 2, "to": "[0]/MNAE/2"}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":2000,"rqi":"6104d","to":"pyaltherma","fr":"[0]/MNAE/2","pc":{"m2m:cnt":{"rn":"2","ri":"0062","pi":"C0003","ty":3,"ct":"20230310T112027Z","lt":"20230310T112027Z","st":11,"lbl":"function/DomesticHotWater"}}}}
INFO:pyaltherma.controllers:Discovered unit: Water Tank Controller with id: 2 function/DomesticHotWater
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/2/UnitIdentifier/Name/la {"m2m:rqp": {"fr": "pyaltherma", "rqi": "c8ba3", "op": 2, "to": "/[0]/MNAE/2/UnitIdentifier/Name/la"}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":2000,"rqi":"c8ba3","to":"pyaltherma","fr":"/[0]/MNAE/2/UnitIdentifier/Name/la","pc":{"m2m:cin":{"rn":"00000002","ri":"006d_00000002","pi":"006d","ty":4,"ct":"20230310T112027Z","lt":"20230310T112027Z","st":2,"con":"Hot Water Tank"}}}}
DEBUG:pyaltherma.comm:[OUT]: [0]/MNAE/3/UnitProfile/la {"m2m:rqp": {"fr": "pyaltherma", "rqi": "b537d", "op": 2, "to": "[0]/MNAE/3/UnitProfile/la"}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4004,"rqi":"b537d","to":"pyaltherma","fr":"[0]/MNAE/3/UnitProfile/la"}}
DEBUG:pyaltherma.controllers:No more devices found
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNCSE-node/deviceInfo {"m2m:rqp": {"fr": "pyaltherma", "rqi": "9c9a3", "op": 2, "to": "/[0]/MNCSE-node/deviceInfo"}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":2000,"rqi":"9c9a3","to":"pyaltherma","fr":"/[0]/MNCSE-node/deviceInfo","pc":{"m2m:dvi":{"rn":"deviceInfo","ri":"009b","pi":"0099","ty":13,"ct":"20230310T112027Z","lt":"20230310T112027Z","st":0,"mgd":1007,"dlb":"180400597","man":"Daikin","mod":"DRGATEWAYAA","dty":"HVAC controller","fwv":"1700F107","swv":"438CC083000","hwv":""}}}}
Device info: {'serial_number': '180400597', 'manufacturer': 'Daikin', 'model_name': 'DRGATEWAYAA', 'duty': 'HVAC controller', 'miconID': '1700F107', 'firmware': '438CC083000'}
List of operations: ['Power', 'OperationMode', 'SensorTemperature', 'TargetTemperatureDay', 'TargetTemperatureNight', 'TargetTemperature', 'EcoMode']
Is EcoMode in the list True
Trying Power with 0 (int)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/Power {"m2m:rqp": {"fr": "pyaltherma", "rqi": "6a547", "op": 1, "to": "/[0]/MNAE/1/Operation/Power", "ty": 4, "pc": {"m2m:cin": {"con": 0, "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4102,"rqi":"6a547","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/Power"}}
Operation Power value 0 is invalid.
[Power(0)]: Response: {'m2m:rsp': {'rsc': 4102, 'rqi': '6a547', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/Power'}}
Trying Power with 1 (int)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/Power {"m2m:rqp": {"fr": "pyaltherma", "rqi": "42e79", "op": 1, "to": "/[0]/MNAE/1/Operation/Power", "ty": 4, "pc": {"m2m:cin": {"con": 1, "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4102,"rqi":"42e79","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/Power"}}
Operation Power value 1 is invalid.
[Power(1)]: Response: {'m2m:rsp': {'rsc': 4102, 'rqi': '42e79', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/Power'}}
Trying Power with 0 (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/Power {"m2m:rqp": {"fr": "pyaltherma", "rqi": "573d2", "op": 1, "to": "/[0]/MNAE/1/Operation/Power", "ty": 4, "pc": {"m2m:cin": {"con": "0", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4005,"rqi":"573d2","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/Power"}}
Operation Power value 0 is invalid.
[Power(0)]: Response: {'m2m:rsp': {'rsc': 4005, 'rqi': '573d2', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/Power'}}
Trying Power with 1 (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/Power {"m2m:rqp": {"fr": "pyaltherma", "rqi": "76861", "op": 1, "to": "/[0]/MNAE/1/Operation/Power", "ty": 4, "pc": {"m2m:cin": {"con": "1", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4005,"rqi":"76861","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/Power"}}
Operation Power value 1 is invalid.
[Power(1)]: Response: {'m2m:rsp': {'rsc': 4005, 'rqi': '76861', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/Power'}}
Trying Power with on (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/Power {"m2m:rqp": {"fr": "pyaltherma", "rqi": "efbe6", "op": 1, "to": "/[0]/MNAE/1/Operation/Power", "ty": 4, "pc": {"m2m:cin": {"con": "on", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":2001,"rqi":"efbe6","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/Power"}}
Valid response received with values Power and on
[Power(on)]: Response: {'m2m:rsp': {'rsc': 2001, 'rqi': 'efbe6', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/Power'}}
Trying Power with ecomode (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/Power {"m2m:rqp": {"fr": "pyaltherma", "rqi": "5364f", "op": 1, "to": "/[0]/MNAE/1/Operation/Power", "ty": 4, "pc": {"m2m:cin": {"con": "ecomode", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4005,"rqi":"5364f","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/Power"}}
Operation Power value ecomode is invalid.
[Power(ecomode)]: Response: {'m2m:rsp': {'rsc': 4005, 'rqi': '5364f', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/Power'}}
Trying Power with eco (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/Power {"m2m:rqp": {"fr": "pyaltherma", "rqi": "4c8d2", "op": 1, "to": "/[0]/MNAE/1/Operation/Power", "ty": 4, "pc": {"m2m:cin": {"con": "eco", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4005,"rqi":"4c8d2","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/Power"}}
Operation Power value eco is invalid.
[Power(eco)]: Response: {'m2m:rsp': {'rsc': 4005, 'rqi': '4c8d2', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/Power'}}
Trying Power with powerful (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/Power {"m2m:rqp": {"fr": "pyaltherma", "rqi": "c0803", "op": 1, "to": "/[0]/MNAE/1/Operation/Power", "ty": 4, "pc": {"m2m:cin": {"con": "powerful", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4102,"rqi":"c0803","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/Power"}}
Operation Power value powerful is invalid.
[Power(powerful)]: Response: {'m2m:rsp': {'rsc': 4102, 'rqi': 'c0803', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/Power'}}
Trying EcoMode with 0 (int)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/EcoMode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "bbd9a", "op": 1, "to": "/[0]/MNAE/1/Operation/EcoMode", "ty": 4, "pc": {"m2m:cin": {"con": 0, "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":2001,"rqi":"bbd9a","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/EcoMode"}}
Valid response received with values EcoMode and 0
[EcoMode(0)]: Response: {'m2m:rsp': {'rsc': 2001, 'rqi': 'bbd9a', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/EcoMode'}}
Trying EcoMode with 1 (int)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/EcoMode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "fef49", "op": 1, "to": "/[0]/MNAE/1/Operation/EcoMode", "ty": 4, "pc": {"m2m:cin": {"con": 1, "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":2001,"rqi":"fef49","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/EcoMode"}}
Valid response received with values EcoMode and 1
[EcoMode(1)]: Response: {'m2m:rsp': {'rsc': 2001, 'rqi': 'fef49', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/EcoMode'}}
Trying EcoMode with 0 (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/EcoMode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "8d771", "op": 1, "to": "/[0]/MNAE/1/Operation/EcoMode", "ty": 4, "pc": {"m2m:cin": {"con": "0", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4102,"rqi":"8d771","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/EcoMode"}}
Operation EcoMode value 0 is invalid.
[EcoMode(0)]: Response: {'m2m:rsp': {'rsc': 4102, 'rqi': '8d771', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/EcoMode'}}
Trying EcoMode with 1 (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/EcoMode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "9d02c", "op": 1, "to": "/[0]/MNAE/1/Operation/EcoMode", "ty": 4, "pc": {"m2m:cin": {"con": "1", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4102,"rqi":"9d02c","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/EcoMode"}}
Operation EcoMode value 1 is invalid.
[EcoMode(1)]: Response: {'m2m:rsp': {'rsc': 4102, 'rqi': '9d02c', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/EcoMode'}}
Trying EcoMode with on (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/EcoMode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "c08bf", "op": 1, "to": "/[0]/MNAE/1/Operation/EcoMode", "ty": 4, "pc": {"m2m:cin": {"con": "on", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4102,"rqi":"c08bf","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/EcoMode"}}
Operation EcoMode value on is invalid.
[EcoMode(on)]: Response: {'m2m:rsp': {'rsc': 4102, 'rqi': 'c08bf', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/EcoMode'}}
Trying EcoMode with ecomode (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/EcoMode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "866b4", "op": 1, "to": "/[0]/MNAE/1/Operation/EcoMode", "ty": 4, "pc": {"m2m:cin": {"con": "ecomode", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4102,"rqi":"866b4","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/EcoMode"}}
Operation EcoMode value ecomode is invalid.
[EcoMode(ecomode)]: Response: {'m2m:rsp': {'rsc': 4102, 'rqi': '866b4', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/EcoMode'}}
Trying EcoMode with eco (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/EcoMode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "c2069", "op": 1, "to": "/[0]/MNAE/1/Operation/EcoMode", "ty": 4, "pc": {"m2m:cin": {"con": "eco", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4102,"rqi":"c2069","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/EcoMode"}}
Operation EcoMode value eco is invalid.
[EcoMode(eco)]: Response: {'m2m:rsp': {'rsc': 4102, 'rqi': 'c2069', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/EcoMode'}}
Trying EcoMode with powerful (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/EcoMode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "37751", "op": 1, "to": "/[0]/MNAE/1/Operation/EcoMode", "ty": 4, "pc": {"m2m:cin": {"con": "powerful", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4102,"rqi":"37751","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/EcoMode"}}
Operation EcoMode value powerful is invalid.
[EcoMode(powerful)]: Response: {'m2m:rsp': {'rsc': 4102, 'rqi': '37751', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/EcoMode'}}
Trying ecomode with 0 (int)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/ecomode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "05db0", "op": 1, "to": "/[0]/MNAE/1/Operation/ecomode", "ty": 4, "pc": {"m2m:cin": {"con": 0, "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4004,"rqi":"05db0","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/ecomode"}}
Operation ecomode not found.
[ecomode(0)]: Response: {'m2m:rsp': {'rsc': 4004, 'rqi': '05db0', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/ecomode'}}
Trying ecomode with 1 (int)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/ecomode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "3640b", "op": 1, "to": "/[0]/MNAE/1/Operation/ecomode", "ty": 4, "pc": {"m2m:cin": {"con": 1, "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4004,"rqi":"3640b","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/ecomode"}}
Operation ecomode not found.
[ecomode(1)]: Response: {'m2m:rsp': {'rsc': 4004, 'rqi': '3640b', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/ecomode'}}
Trying ecomode with 0 (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/ecomode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "e189b", "op": 1, "to": "/[0]/MNAE/1/Operation/ecomode", "ty": 4, "pc": {"m2m:cin": {"con": "0", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4004,"rqi":"e189b","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/ecomode"}}
Operation ecomode not found.
[ecomode(0)]: Response: {'m2m:rsp': {'rsc': 4004, 'rqi': 'e189b', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/ecomode'}}
Trying ecomode with 1 (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/ecomode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "76025", "op": 1, "to": "/[0]/MNAE/1/Operation/ecomode", "ty": 4, "pc": {"m2m:cin": {"con": "1", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4004,"rqi":"76025","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/ecomode"}}
Operation ecomode not found.
[ecomode(1)]: Response: {'m2m:rsp': {'rsc': 4004, 'rqi': '76025', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/ecomode'}}
Trying ecomode with on (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/ecomode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "3e35b", "op": 1, "to": "/[0]/MNAE/1/Operation/ecomode", "ty": 4, "pc": {"m2m:cin": {"con": "on", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4004,"rqi":"3e35b","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/ecomode"}}
Operation ecomode not found.
[ecomode(on)]: Response: {'m2m:rsp': {'rsc': 4004, 'rqi': '3e35b', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/ecomode'}}
Trying ecomode with ecomode (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/ecomode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "a4700", "op": 1, "to": "/[0]/MNAE/1/Operation/ecomode", "ty": 4, "pc": {"m2m:cin": {"con": "ecomode", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4004,"rqi":"a4700","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/ecomode"}}
Operation ecomode not found.
[ecomode(ecomode)]: Response: {'m2m:rsp': {'rsc': 4004, 'rqi': 'a4700', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/ecomode'}}
Trying ecomode with eco (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/ecomode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "255da", "op": 1, "to": "/[0]/MNAE/1/Operation/ecomode", "ty": 4, "pc": {"m2m:cin": {"con": "eco", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4004,"rqi":"255da","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/ecomode"}}
Operation ecomode not found.
[ecomode(eco)]: Response: {'m2m:rsp': {'rsc': 4004, 'rqi': '255da', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/ecomode'}}
Trying ecomode with powerful (str)
DEBUG:pyaltherma.comm:[OUT]: /[0]/MNAE/1/Operation/ecomode {"m2m:rqp": {"fr": "pyaltherma", "rqi": "41e80", "op": 1, "to": "/[0]/MNAE/1/Operation/ecomode", "ty": 4, "pc": {"m2m:cin": {"con": "powerful", "cnf": "text/plain:0"}}}}
DEBUG:pyaltherma.comm:[IN]: {"m2m:rsp":{"rsc":4004,"rqi":"41e80","to":"pyaltherma","fr":"/[0]/MNAE/1/Operation/ecomode"}}
Operation ecomode not found.
[ecomode(powerful)]: Response: {'m2m:rsp': {'rsc': 4004, 'rqi': '41e80', 'to': 'pyaltherma', 'fr': '/[0]/MNAE/1/Operation/ecomode'}}
tadasdanielius commented 1 year ago

Well, that's good that we know we can switch that. I put some minor changes to the switch.py file so you can try to copy paste the content. I also put some warning/error messages which might help to understand if it does not work. Let's see if that helps.

mihsu81 commented 1 year ago

Tried the new switch.py. Toggling still doesn't work. Getting the below warnings.

This error originated from a custom integration.

Logger: custom_components.daikin_altherma.switch
Source: custom_components/daikin_altherma/switch.py:65
Integration: Daikin Altherma HVAC (documentation, issues)
First occurred: 15:53:16 (1 occurrences)
Last logged: 15:53:16

function/SpaceHeating[EcoMode] set_state = 0
This error originated from a custom integration.

Logger: pyaltherma.controllers
Source: custom_components/daikin_altherma/switch.py:59
Integration: Daikin Altherma HVAC (documentation, issues)
First occurred: 15:53:16 (1 occurrences)
Last logged: 15:53:16

Invalid argument 0 for operation EcoMode or operation is not settable.
tadasdanielius commented 1 year ago

does the switch show the correct status if you change with onecta app like on/off?

mihsu81 commented 1 year ago

No, if I toggle the EcoMode switch from Onecta, it's not reflected in HA. But I've noticed that when i turn the EcoMode switch off in HA, even if it returns to on after a couple of seconds, it does show switched off in Onecta. So the switch is partially working.

tadasdanielius commented 1 year ago

looks like the problem is not about turning on/off but that it does not correctly reflect the current status thus toggling between states doesn't work. With new switch.py did you see any warnings while making changes in onecta app?

mihsu81 commented 1 year ago

No warnings in HA if I toggle the switch in Onecta.

tadasdanielius commented 1 year ago

Ah, I see.. How about if you try this one switch.py

mihsu81 commented 1 year ago

With this version, toggling the switch from HA works, but every 2 seconds I'm getting the below warnings:

This error originated from a custom integration.

Logger: custom_components.daikin_altherma.switch
Source: custom_components/daikin_altherma/switch.py:74
Integration: Daikin Altherma HVAC (documentation, issues)
First occurred: 13:23:46 (99 occurrences)
Last logged: 13:27:08

current EcoMode state is 1
This error originated from a custom integration.

Logger: custom_components.daikin_altherma.switch
Source: custom_components/daikin_altherma/switch.py:70
Integration: Daikin Altherma HVAC (documentation, issues)
First occurred: 13:23:46 (99 occurrences)
Last logged: 13:27:08

function/SpaceHeating[EcoMode] set_state = {'Power': 'on', 'OperationMode': 'heating_day', 'SensorTemperature': None, 'TargetTemperatureDay': 23.0, 'TargetTemperatureNight': 24.0, 'TargetTemperature': 23.0, 'EcoMode': 1}

Toggling the EcoMode switch in Onecta is reflected in HA. Toggling the EcoMode swich in HA is reflected in Onecta and produces the following 2 warnings in HA:

This error originated from a custom integration.

Logger: pyaltherma.controllers
Source: custom_components/daikin_altherma/switch.py:59
Integration: Daikin Altherma HVAC (documentation, issues)
First occurred: 13:29:10 (1 occurrences)
Last logged: 13:29:10

Invalid argument 1 for operation EcoMode or operation is not settable.
This error originated from a custom integration.

Logger: custom_components.daikin_altherma.switch
Source: custom_components/daikin_altherma/switch.py:53
Integration: Daikin Altherma HVAC (documentation, issues)
First occurred: 13:29:10 (1 occurrences)
Last logged: 13:29:10

function/SpaceHeating[EcoMode] set_state = 1
tadasdanielius commented 1 year ago

yes the logging is expected behavior. You can remove them lines 58, 70, 77 anything what starts with _LOGGER. I will do full build and get rid of those message. I just added that for now to understand what is going on

mihsu81 commented 1 year ago

Awesome, thanks a lot @tadasdanielius.

mihsu81 commented 11 months ago

Hi @tadasdanielius , Could you please release a newer version of the integration so I can close the issue? Thanks in advance.

eduardkirkosa commented 11 months ago

image image

did update now i get this in logs

tadasdanielius commented 11 months ago

Does it work correctly? I forgot to remove some warnings that were added for diagnostic reasons and should be harmless. I'll remove them.

mihsu81 commented 11 months ago

For me works fine. Thank you