Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to perform the action: climate/set_fan_mode: NotImplementedError #210

Open
shagadeli opened this issue Nov 12, 2024 · 3 comments
Open

Comments

@shagadeli
Copy link

shagadeli commented Nov 12, 2024

I've a Siber DF Evo 4 with a physical remote control and the ESP32 Ramses board from Indalo-Tech. I can see every available sensor value and I get 3 devices on the integration, the Gateway, the remote and a FAN device.
Everything appear to work as intended except the send command. Whenever I try to send a command I get an unknown error.

My known list:

"18:100900":
  class: HGI
"32:162627":
  class: FAN
  _note: SIBER DF EVO4
"37:143839":
  class: REM
  _note: SIBER DF EVO4 Multicontrol DFEVOCTRL08
  commands:
    away: " I --- 37:143839 32:162627--:------ 22F1 003 000107"
    low: " I --- 37:143839 32:162627--:------ 22F1 003 000207"
    medium: " I --- 37:143839 32:162627--:------ 22F1 003 000307"
    high: " I --- 37:143839 32:162627--:------ 22F1 003 000407"
    boost: " I --- 37:143839 32:162627--:------ 22F1 003 000707"
    bypass_off: " W --- 37:143839 32:162627--:------ 22F7 003 00C8EF"
    bypass_on: " W --- 37:143839 32:162627--:------ 22F7 003 0000EF"
    bypass_auto: " W --- 37:143839 32:162627--:------ 22F7 003 00FFEF"
    calendar_off: " W --- 37:143839 32:162627--:------ 22B0 002 0006"
    calendar_on: " W --- 37:143839 32:162627--:------ 22B0 002 0005"`

And this is the error in the log when I try to send any command:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:245
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 16:22:21 (4 occurrences)
Last logged: 16:29:22

[140114538429696] Unexpected exception
[140114154573104] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 996, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 758, in async_handle_set_fan_mode_service
    await self.async_set_fan_mode(fan_mode)
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 766, in async_set_fan_mode
    await self.hass.async_add_executor_job(self.set_fan_mode, fan_mode)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 762, in set_fan_mode
    raise NotImplementedError
NotImplementedError

I tried to send the command via the FAN entity and via actions (services), with the same result. I managed to call the learn a command service sucessfully, but when trying to send the command I always get the same error:

Failed to perform the action climate/set_hvac_mode. unknown error

or

Failed to perform the action ramses_cc.send_command. Unknown error
if sent directly from actions

I run my HA in HAOS installed directly on an Intel NUC.

@zxdavb zxdavb changed the title Send command: Failed to perform the action climate/set_hvac_mode. unknown error Send command: Failed to perform the action climate/set_fan_mode: NotImplementedError Dec 4, 2024
@zxdavb zxdavb changed the title Send command: Failed to perform the action climate/set_fan_mode: NotImplementedError Send command failed: climate/set_fan_mode: NotImplementedError Dec 4, 2024
@zxdavb zxdavb changed the title Send command failed: climate/set_fan_mode: NotImplementedError Failed to perform the action: climate/set_fan_mode: NotImplementedError Dec 4, 2024
@zxdavb
Copy link
Owner

zxdavb commented Dec 4, 2024

The trace log you've provided is not for a send_command, it's for a service call (probably via the UI).

This service call is not implemented - a PR would be considered.

You should be able to use a custom command instead - submit another issue if that does not work as expected (you may need to ask for help on the user forums).

@shagadeli
Copy link
Author

shagadeli commented Dec 4, 2024

Thanks for your reply.
I did again on the Developer tools > Actions > RAMSES RF: Send a Remote command

I get : Failed to perform the action ramses_cc.send_command. Unknown error

Log reports:

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/ramses_cc/remote.py:208
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 22:53:30 (6 occurrences)
Last logged: 22:59:28

[139956377497328] Error handling message: Unknown error (unknown_error) PLACE from 85.240.139.214 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36)
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/ramses_tx/command.py", line 254, in __init__
    super().__init__(frame)
  File "/usr/local/lib/python3.12/site-packages/ramses_tx/frame.py", line 73, in __init__
    raise exc.PacketInvalid(f"Bad frame: invalid structure: >>>{frame}<<<")
ramses_tx.exceptions.PacketInvalid: Bad frame: invalid structure: >>> I --- 37:143838 32:162627--:------ 22F1 003 000407<<<

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 816, in handle_execute_script
    script_result = await script_obj.async_run(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1801, in async_run
    return await asyncio.shield(create_eager_task(run.async_run()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 464, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 528, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 558, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 764, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 727, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/ramses_cc/remote.py", line 208, in async_send_command
    cmd = Command(self._commands[command[0]])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ramses_tx/command.py", line 256, in __init__
    raise exc.CommandInvalid(err.message) from err
ramses_tx.exceptions.CommandInvalid: Bad frame: invalid structure: >>> I --- 37:143838 32:162627--:------ 22F1 003 000407<<<

I'm also getting the following log errors/warnings:

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:189
First occurred: 00:14:08 (5475 occurrences)
Last logged: 23:15:54

Detected that custom integration 'ramses_cc' calls async_forward_entry_setup for integration, ramses_cc with title: RAMSES RF and entry_id: 01JCDAWWZB0VGWJ0Z0MYMS09RC, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/ramses_cc/broker.py, line 217: self._platform_setup_tasks[platform] = self.hass.async_create_task(, please create a bug report at https://github.com/zxdavb/ramses_cc/issues
Detected that custom integration 'ramses_cc' registers an entity service with a non entity service schema which will stop working in HA Core 2025.9 at custom_components/ramses_cc/climate.py, line 113: platform.async_register_entity_service(k, v, f"async_{k}"), please create a bug report at https://github.com/zxdavb/ramses_cc/issues
`Logger: ramses_rf.dispatcher
Source: runner.py:189
First occurred: 00:14:24 (330 occurrences)
Last logged: 23:04:06

RP --- 32:162627 18:100900 --:------ 22E9 004 008FC800 < PacketInvalid(RP --- 32:162627 18:100900 --:------ 22E9 004 008FC800 < Unexpected code for src (FAN) to Tx)
RP --- 32:162627 18:100900 --:------ 22F2 006 0002B2010299 < PacketInvalid(RP --- 32:162627 18:100900 --:------ 22F2 006 0002B2010299 < Unexpected code for src (FAN) to Tx)
RP --- 32:162627 18:100900 --:------ 3222 003 00EF00 < PacketInvalid(RP --- 32:162627 18:100900 --:------ 3222 003 00EF00 < Unexpected code for src (FAN) to Tx)
RP --- 32:162627 18:100900 --:------ 313E 011 0000C80F2B08003C800000 < PacketInvalid(RP --- 32:162627 18:100900 --:------ 313E 011 0000C80F2B08003C800000 < Unexpected code for src (FAN) to Tx)
RP --- 32:162627 18:100900 --:------ 313E 011 0000C80F2B09003C800000 < PacketInvalid(RP --- 32:162627 18:100900 --:------ 313E 011 0000C80F2B09003C800000 < Unexpected code for src (FAN) to Tx)`
Logger: ramses_tx.protocol_fsm
Source: runner.py:189
First occurred: 05:23:42 (4 occurrences)
Last logged: 23:04:05

TOUT.. = <ProtocolContext state=WantEcho cmd_=313E|RQ|32:162627, tx_count=1/4>: echo_timeout=0.5
TOUT.. = <ProtocolContext state=WantEcho cmd_=22F8|RQ|32:162627, tx_count=1/4>: echo_timeout=0.5
TOUT.. = <ProtocolContext state=WantEcho cmd_=10D0|RQ|32:162627, tx_count=1/4>: echo_timeout=0.5
Logger: ramses_tx.message
Source: /usr/local/lib/python3.12/site-packages/ramses_tx/message.py:270
First occurred: 00:14:27 (45 occurrences)
Last logged: 23:03:49

RP --- 32:162627 18:100900 --:------ 2210 042 00FF00FFFF000000000000FFFFFFFFFF00FFFF000000000000FFFFFFFFFFFFFFFF0000D8800A02828800 < AssertionError(Support the development of ramses_rf by reporting this packet)
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/ramses_tx/message.py", line 255, in _validate
    result = parse_payload(self)
             ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ramses_tx/parsers.py", line 2938, in parse_payload
    result = _PAYLOAD_PARSERS.get(msg.code, parser_unknown)(msg._pkt.payload, msg)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ramses_tx/parsers.py", line 1385, in parser_2210
    assert payload in (
           ^^^^^^^^^^^^
AssertionError: Support the development of ramses_rf by reporting this packet
Logger: homeassistant.components.climate
Source: components/climate/__init__.py:371
integration: Climate (documentation, issues)
First occurred: 22:58:21 (2 occurrences)
Last logged: 23:03:31

Entity climate.32:162627 (<class 'custom_components.ramses_cc.climate.RamsesHvac'>) implements HVACMode(s): auto, off and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/zxdavb/ramses_cc/issues

Any clue of what might be wrong?

@zxdavb
Copy link
Owner

zxdavb commented Dec 5, 2024

Failed to perform the action ramses_cc.send_command. Unknown error

As I said before: 'submit another issue if that does not work as expected'

Please raise this as a separate issue

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

No branches or pull requests

2 participants