Closed Thrasher2020 closed 1 month ago
Hey there @rytilahti, @bdraco, @sdb9696, mind taking a look at this issue as it has been labeled with an integration (tplink
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
tplink documentation tplink source (message by IssueLinks)
@Thrasher2020 if you received an email from this thread with a link to "try" ignore it as it's malicious.
Could you please upload some debug logs for us to investigate.
Hi - how would I get them? Adding the integration simply stops dead with the message I posted above. If I use python-kasa I get the following (if that helps)
DEBUG:kasa.discover:[DISCOVERY] 192.168.5.66 >> {'system': {'get_sysinfo': None}}
DEBUG:kasa.discover:Waiting a total of 5 seconds for responses...
DEBUG:kasa.discover:[DISCOVERY] 192.168.5.66 << {'system': {}}
DEBUG:kasa.discover:[DISCOVERY] Unable to find device type for 192.168.5.66: No 'system' or 'get_sysinfo' in response
Raised error: No 'system' or 'get_sysinfo' in response
Traceback (most recent call last):
File "/home/n.brownlee/kasa/bin/kasa", line 8, in <module>
sys.exit(cli())
^^^^^
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/asyncclick/core.py", line 1205, in __call__
return anyio.run(self._main, main, args, kwargs, **opts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/anyio/_core/_eventloop.py", line 74, in run
return async_backend.run(func, args, {}, backend_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2200, in run
return runner.run(wrapper())
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2188, in wrapper
return await func(*args)
^^^^^^^^^^^^^^^^^
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/asyncclick/core.py", line 1208, in _main
return await main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/asyncclick/core.py", line 1120, in main
rv = await self.invoke(ctx)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/kasa/cli/common.py", line 229, in invoke
_handle_exception(self._debug, exc)
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/kasa/cli/common.py", line 227, in invoke
return await super().invoke(ctx)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/asyncclick/core.py", line 1717, in invoke
rv = await super().invoke(ctx)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/asyncclick/core.py", line 1485, in invoke
return await ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/asyncclick/core.py", line 824, in invoke
rv = await rv
^^^^^^^^
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/kasa/cli/main.py", line 331, in cli
dev = await Discover.discover_single(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/kasa/discover.py", line 470, in discover_single
raise protocol.invalid_device_exceptions[ip]
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/kasa/discover.py", line 251, in datagram_received
device = Discover._get_device_instance_legacy(data, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/kasa/discover.py", line 503, in _get_device_instance_legacy
device_class = cast(Type[IotDevice], Discover._get_device_class(info))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/kasa/discover.py", line 487, in _get_device_class
return get_device_class_from_sys_info(info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/kasa/device_factory.py", line 161, in get_device_class_from_sys_info
return TYPE_TO_CLASS[_get_device_type_from_sys_info(sysinfo)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/n.brownlee/kasa/lib/python3.11/site-packages/kasa/device_factory.py", line 126, in _get_device_type_from_sys_info
raise KasaException("No 'system' or 'get_sysinfo' in response")
kasa.exceptions.KasaException: No 'system' or 'get_sysinfo' in response```
python3.11?
HA2024.9.2 runs on python3.12
That was from another linux box I have - directly trying python-kasa
HA just gives the original message and logs nothing.
My current understanding is that the device responds to the query as expected, but with an invalid response that doesn't contain the response payload. As this issue is not related to the homeassistant integration itself and as it is being tracked and discussed upstream (https://github.com/python-kasa/python-kasa/issues/1120), I will close this one now.
This should be fixed when https://github.com/home-assistant/core/pull/127934 is released
The problem
I can't get the device to connect. It gives an error
Connection error: No 'system' or 'get_sysinfo' in response
What version of Home Assistant Core has the issue?
2024.9.2
What was the last working version of Home Assistant Core?
N/A
What type of installation are you running?
Home Assistant OS
Integration causing the issue
TP-Link Smart Home
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tplink/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response