core icon indicating copy to clipboard operation
core copied to clipboard

switcher_kis integration has recently started throwing OSErrors when attempting to control devices

Open Itay080 opened this issue 1 year ago • 3 comments

The problem

switcher_kis integration has recently started throwing OSErrors when attempting to control devices. This happens with all sorts of Switcher devices. I have a Switcher Touch, Switcher Runner and Switcher Breeze and have started experiencing this error with all of those devices.

Usually, when this error is thrown - if I send a command to the problematic device again, it works the second time.

My Breeze firmware is 2.2, Runner firmware is 2.11 and Touch firmware is 3.22

What version of Home Assistant Core has the issue?

2024.9.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

switcher_kis

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Example 1:
Logger: homeassistant.components.switcher_kis.switch
Source: components/switcher_kis/switch.py:130
integration: Switcher (documentation, issues)
First occurred: 7:00:03 AM (1 occurrences)
Last logged: 7:00:03 AM

Call api for Switcher Touch failed, api: 'control_device', args: (<Command.OFF: '0'>,), response/error: OSError(113, "Connect call failed ('192.168.50.27', 9957)")

Example 2:
2024-09-14 08:17:03.033 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139773953087024] 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/switcher_kis/climate.py", line 213, in async_set_hvac_mode
    await self._async_control_breeze_device(state=DeviceState.OFF)
  File "/usr/src/homeassistant/homeassistant/components/switcher_kis/climate.py", line 184, in _async_control_breeze_device
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Call Breeze control for None failed, response/error: OSError(113, "Connect call failed ('192.168.50.39', 10000)")

Example 3:
2024-09-14 08:35:46.741 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139774067770416] 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/switcher_kis/cover.py", line 120, in async_close_cover
    await self._async_call_api(API_SET_POSITON, 0)
  File "/usr/src/homeassistant/homeassistant/components/switcher_kis/cover.py", line 113, in _async_call_api
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Call api for None failed, api: 'set_position', args: (0,), response/error: OSError(113, "Connect call failed ('192.168.50.58', 10000)")

Additional information

No response

Itay080 avatar Sep 14 '24 05:09 Itay080

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

Code owner commands

Code owners of switcher_kis can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign switcher_kis Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


switcher_kis documentation switcher_kis source (message by IssueLinks)

home-assistant[bot] avatar Sep 14 '24 05:09 home-assistant[bot]

I've stopped experiencing this since updating my router's firmware. Perhaps it was an issue with my home network. Although that's a bit weird because other wifi devices like Shelly modules were working fine from HA. Will reopen if necessary, thanks.

Itay080 avatar Sep 18 '24 05:09 Itay080

@thecode I think the issue should be reopened, I've started experiencing this again on all Switcher devices. Again, other wifi devices are unaffected, only Switcher devices.

Itay080 avatar Sep 18 '24 13:09 Itay080

When you experience the issue, please compare if the IP address reported in the error message: homeassistant.exceptions.HomeAssistantError: Call api for None failed, api: 'set_position', args: (0,), response/error: OSError(113, "Connect call failed ('192.168.50.58', 10000)") Match the IP address of the device.

thecode avatar Oct 03 '24 20:10 thecode

Happened to me as well and it was an issue with the router/ips. After I fixed that it's back to normal

shaiu avatar Oct 12 '24 08:10 shaiu

It's been smooth sailing for a good while so hopefully it won't happen again. I doubt it was the IP in my case since all of my Switcher devices have reserved IP addresses and the IP in the log matches.

I'll close it for now, thanks @thecode !

Itay080 avatar Oct 12 '24 08:10 Itay080