Hi All,
I am relatively new to Home Assistant however with the comments in the thread I managed to get my three Kasa (2 x HS100 and 1 KP303) devices to connect without issue until this week.
I have been using the custom zip from MarkHofmann11, with static IP entries and no discovery. All of this was working until Tuesday night (lasted about 1 month). In the logs I saw that each of the switches (HS100) became unavailable and then the strip also dropped off. Nothing I did would restore the devices or entities.
At a similar time I had performed a number of updates on components however I am now not sure if I had 0.117.6 before or after the issue. However removing the custom integration gave me a blank box with no devices (i did not look at the logs).
Today I have deleted and reapplied the custom zip. After reloading I watched as it created the pycache and I get the following error in the logs
Logger: homeassistant.components.switch
Source: custom_components/tplink/switch.py:36
Integration: Switch (documentation, issues)
First occurred: 6:47:09 PM (1 occurrences)
Last logged: 6:47:09 PM
Error while setting up tplink platform for switch
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pyHS100/smartdevice.py", line 115, in _query_helper
response = self.protocol.query(
File "/usr/local/lib/python3.8/site-packages/pyHS100/protocol.py", line 47, in query
sock = socket.create_connection((host, port), timeout)
File "/usr/local/lib/python3.8/socket.py", line 808, in create_connection
raise err
File "/usr/local/lib/python3.8/socket.py", line 796, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 197, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/tplink/switch.py", line 36, in async_setup_entry
await hass.async_add_executor_job(device.get_sysinfo)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/site-packages/pyHS100/smartdevice.py", line 196, in get_sysinfo
return self._query_helper("system", "get_sysinfo")
File "/usr/local/lib/python3.8/site-packages/pyHS100/smartdevice.py", line 120, in _query_helper
raise SmartDeviceException('Communication error') from ex
pyHS100.smartdevice.SmartDeviceException: Communication error
None of the devices will connect.
However I have now manually copied the code from the dev information on the https://github.com/home-assistant/core/tree/dev/homeassistant/components/tplink
In this situation my KP303 works perfectly however I still get the errors from my two HS100 units which are using firmware 1.01
Logger: custom_components.tplink.common
Source: custom_components/tplink/common.py:150
Integration: TP-Link Kasa Smart (documentation)
First occurred: 6:54:02 PM (2 occurrences)
Last logged: 6:54:02 PM
Unable to communicate with device 10.0.3.15: Communication error
Unable to communicate with device 10.0.3.17: Communication error
All units have continued to be accessible via the Kasa app at all times and I can ping both devices.
So there seems to be something specifically wrong with the communication in relation to HS100 devices.
Any thoughts or more information i can provide?