Skip to content

SMART.TAPOHUB does not work with 0.7.0 dev2 #958

Closed
@ngaertner

Description

@ngaertner

Hi,

i just tried 0.7.0 dev2 and i get the following error when i run the cli.

kasa --host 172.16.2.4 --username myuser --password mysecret --device-family SMART.TAPOHUB --debug

DEBUG:kasa.discover:[DISCOVERY] 172.16.2.4 >> {'system': {'get_sysinfo': None}} DEBUG:kasa.discover:Waiting a total of 5 seconds for responses... DEBUG:kasa.klaptransport:Created KLAP transport for 172.16.2.4 DEBUG:kasa.discover:[DISCOVERY] 172.16.2.4 << {'result': {'device_id': 'xxxxxxxxxxxxxxxxxxxxxx', 'owner': 'yyyyyyyyyyyyyyy', 'device_type': 'SMART.TAPOHUB', 'device_model': 'H100(EU)', 'ip': '172.16.2.4', 'mac': 'E4-FA-C4-6F-50-64', 'is_support_iot_cloud': True, 'obd_src': 'tplink', 'factory_default': False, 'mgt_encrypt_schm': {'is_support_https': False, 'encrypt_type': 'KLAP', 'http_port': 80, 'lv': 2}}, 'error_code': 0} DEBUG:kasa.device:Initializing 172.16.2.4 of type <class 'kasa.smart.smartdevice.SmartDevice'> == None - H100 == Host: 172.16.2.4 Port: 80 Device state: False == Generic information == Raised error: 'Time' Traceback (most recent call last): File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-1xz2jDJb-py3.12\Scripts\\kasa", line 6, in <module> sys.exit(cli()) ^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-1xz2jDJb-py3.12\Lib\site-packages\asyncclick\core.py", line 1205, in __call__ return anyio.run(self._main, main, args, kwargs, **opts) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-1xz2jDJb-py3.12\Lib\site-packages\anyio\_core\_eventloop.py", line 73, in run return async_backend.run(func, args, {}, backend_options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-1xz2jDJb-py3.12\Lib\site-packages\anyio\_backends\_asyncio.py", line 2001, in run return runner.run(wrapper()) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 687, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-1xz2jDJb-py3.12\Lib\site-packages\anyio\_backends\_asyncio.py", line 1989, in wrapper return await func(*args) ^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-1xz2jDJb-py3.12\Lib\site-packages\asyncclick\core.py", line 1208, in _main return await main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-1xz2jDJb-py3.12\Lib\site-packages\asyncclick\core.py", line 1120, in main rv = await self.invoke(ctx) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\git\python-kasa-0.7.0.dev2\kasa\cli.py", line 140, in invoke _handle_exception(self._debug, exc) File "C:\git\python-kasa-0.7.0.dev2\kasa\cli.py", line 138, in invoke return await super().invoke(ctx) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-1xz2jDJb-py3.12\Lib\site-packages\asyncclick\core.py", line 1717, in invoke rv = await super().invoke(ctx) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-1xz2jDJb-py3.12\Lib\site-packages\asyncclick\core.py", line 1485, in invoke return await ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-1xz2jDJb-py3.12\Lib\site-packages\asyncclick\core.py", line 824, in invoke rv = await rv ^^^^^^^^ File "C:\git\python-kasa-0.7.0.dev2\kasa\cli.py", line 417, in cli return await ctx.invoke(state) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-1xz2jDJb-py3.12\Lib\site-packages\asyncclick\core.py", line 824, in invoke rv = await rv ^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-1xz2jDJb-py3.12\Lib\site-packages\asyncclick\core.py", line 824, in invoke rv = await rv ^^^^^^^^ File "C:\git\python-kasa-0.7.0.dev2\kasa\cli.py", line 666, in state echo(f"\tTime: {dev.time} (tz: {dev.timezone}") ^^^^^^^^ File "C:\git\python-kasa-0.7.0.dev2\kasa\smart\smartdevice.py", line 376, in time _timemod = self.modules[Module.Time] ~~~~~~~~~~~~^^^^^^^^^^^^^ KeyError: 'Time'

Best Regards,

Nico

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions