switcher_kis integration has recently started throwing OSErrors when attempting to control devices
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
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 closeCloses the issue. -
@home-assistant rename Awesome new titleRenames the issue. -
@home-assistant reopenReopen the issue. -
@home-assistant unassign switcher_kisRemoves the current integration label and assignees on the issue, add the integration domain after the command. -
@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue. -
@home-assistant remove-label needs-more-informationRemove 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)
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.
@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.
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.
Happened to me as well and it was an issue with the router/ips. After I fixed that it's back to normal
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 !