FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

SMART.TAPOHUB does not work with 0.7.0 dev2 · Issue #958 · python-kasa/python-kasa · GitHub

Repository navigation

SMART.TAPOHUB does not work with 0.7.0 dev2 #958

Closed

Description

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

Activity

  1. rytilahti commented on Jun 6, 2024

    Member

    Try removing --device-family from the command and see if that works.

    Looks like we broke something for that switch, as it works without it just fine for me.

  2. added this to the 0.7.0 milestone on Jun 6, 2024
  3. ngaertner commented on Jun 7, 2024

    Author

    Yes - leaving away device-family works, but I noticed that adding --json creates an empty output.
    Is that correct?

  4. ngaertner commented on Jun 7, 2024

    Author

    forget my comment about --json - it works. must have been a network issue

  5. rytilahti commented on Jun 7, 2024

    Member

    Yeah, just tested that it works also here locally. We'll keep this issue open until we figure out how to fix the issue when the device family is defined.

    Thanks a lot for testing, btw! Feel free to create separate issues for anything that seems to be broken :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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


      Back | FazBrowse Home | New Git URL