Closed uncled1023 closed 4 years ago
Hey there @rytilahti, mind taking a look at this issue as its been labeled with a integration (tplink
) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
After updating to 0.110, I am getting the following error now:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/pyHS100/smartdevice.py", line 117, in _query_helper
request=request,
File "/srv/homeassistant/lib/python3.7/site-packages/pyHS100/protocol.py", line 60, in query
length = struct.unpack(">I", chunk[0:4])[0]
struct.error: unpack requires a buffer of 4 bytes
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/config_entries.py", line 217, in async_setup
hass, self
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/tplink/__init__.py", line 82, in async_setup_entry
static_devices = get_static_devices(config_data)
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/tplink/common.py", line 122, in get_static_devices
for plug in SmartStrip(host).plugs.values():
File "/srv/homeassistant/lib/python3.7/site-packages/pyHS100/smartstrip.py", line 43, in __init__
children = self.sys_info["children"]
File "/srv/homeassistant/lib/python3.7/site-packages/pyHS100/smartdevice.py", line 186, in sys_info
return defaultdict(lambda: None, self.get_sysinfo())
File "/srv/homeassistant/lib/python3.7/site-packages/pyHS100/smartdevice.py", line 196, in get_sysinfo
return self._query_helper("system", "get_sysinfo")
File "/srv/homeassistant/lib/python3.7/site-packages/pyHS100/smartdevice.py", line 120, in _query_helper
raise SmartDeviceException('Communication error') from ex
pyHS100.smartdevice.SmartDeviceException: Communication error
No changes to config or setup besides upgrade.
There has been no changes to pyhs100 since some time last year, so I have no idea what could be causing the thread-related errors.
But your latest error is related to connectivity problems with the device. Has anything else changed in your network in the meanwhile? Have you done firmware updates on the devices (tplink may be blocking this api, but the situation is not clear, see https://github.com/python-kasa/python-kasa/issues/42)?
All the devices listed are on, and are available within the Kasa app. I am using the following devices:
KP400 - Outdoor Dual Plug
KP400 - Outdoor Dual Plug
HS200 - Light Switch
HS200 - Light Switch
HS200 - Light Switch
HS210 - 3-Way Light Switch
HS220 - Dimmer Switch
HS220 - Dimmer Switch
HS220 - Dimmer Switch
Awhile ago I did have a HS105 set up but it's no longer on or in the config. Could it be cached or something and still trying to connect to it?
Ok, so I removed the two outdoor plugs from the config, and I am back to getting the original error messages I described in the initial ticket.
So it seems like my Outdoor plugs (or at least one of them) are not supported?
They should be supported, but the integration has known problems with multi-socket devices, especially when combined with spotty networks. When #30719 finally gets done, the situation should improve.
I look forward to testing it once the async fix is finished. They did work on the previous version (108) so maybe the new version of HA is more finicky about connection tries that take too long?
It could be, I don't really know. Looking at the stacktrace, it's coming from the retry logic code in common.py, which has not changed in six months.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
I have the tplink integration added and it used to work, albeit flaky. I upgraded from 108 -> 109.6 today and now the tp link integration won't load.
Environment
Problem-relevant
configuration.yaml
tplink.yaml
Traceback/Error logs
Error while setting up tplink platform for light
Error while setting up tplink platform for switch
Additional information
All of the dimmers, switches, and strips are usable via the KASA app, and were usable before the upgrade.