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

Credentials for H200 · Issue #1647 · python-kasa/python-kasa · GitHub

Repository navigation

Credentials for H200 #1647

Closed as not planned
Closed as not planned

Description

Hello!

I have 2 Tapo H200 and when trying to discover devices I got credentials error. I entered right credentials (tested with log in tapo app). Did something changed?

I get msg that device on my IP model H200 and then Device response did not match our challenge on ip 10.145.18.189, check that your e-mail and password (both case-sensitive) are correct.

Activity

  1. ZeliardM commented on Jan 15, 2026

    Collaborator

    @bhumerca Can you run the discover with the --debug flag and post the output here? Scrub your personal information, but I'm looking for the encryption information, but ai need to see the whole response.

  2. bhumerca commented on Jan 15, 2026

    Author

    Here is the output from a manual discovery using python-kasa with DEBUG logging enabled.

    Command:

    • run inside a small async script that calls Discover.discover(credentials=creds)
    • kasa version: 0.10.2
    • device: Tapo H200 (SMART.TAPOHUB)
    • platform: Windows 11, Python 3.11

    I have redacted my device_id and owner fields.

    Discover.discover(credentials=creds) with DEBUG logs
    2026-01-15 14:19:49,101 - kasa.discover - DEBUG - [DISCOVERY] 255.255.255.255 >> {'system': {'get_sysinfo': {}}}
    2026-01-15 14:19:49,148 - kasa.discover - DEBUG - Waiting 5 seconds for responses...
    2026-01-15 14:19:49,195 - kasa.discover - DEBUG - Decrypted encrypt_info for 10.145.18.189: {'connect_ssid': '',
    'connect_type': 'wired',
    'device_id': 'REDACTED_22910EDC1063CA6C97CBE1022AA31FD',
    'http_port': 443,
    'owner': 'REDACTED_3016CF14CB127A85975AD16',
    'sd_status': 'offline'}
    2026-01-15 14:19:49,195 - kasa.device_factory - DEBUG - Using SmartCamDevice for SMART.TAPOHUB
    2026-01-15 14:19:49,210 - kasa.device_factory - DEBUG - Finding protocol for 10.145.18.189
    2026-01-15 14:19:49,210 - kasa.device_factory - DEBUG - Finding protocol for DeviceFamily.SmartTapoHub
    2026-01-15 14:19:49,210 - kasa.device_factory - DEBUG - Finding transport for SMART.AES.HTTPS
    2026-01-15 14:19:49,210 - kasa.transports.sslaestransport - DEBUG - Created AES transport for 10.145.18.189
    2026-01-15 14:19:49,210 - kasa.discover - DEBUG - [DISCOVERY] 10.145.18.189 << {'error_code': 0,
    'result': {'device_id': 'REDACTED_03025D6E1D3B530D768894E',
    'device_model': 'H200',
    'device_name': '#MASKED_NAME#',
    'device_type': 'SMART.TAPOHUB',
    'encrypt_info': {'data': '', 'key': '', 'sym_schm': 'AES'},
    'encrypt_type': ['3'],
    'factory_default': False,
    'hardware_version': '1.0',
    'ip': '10.145.18.189',
    'isResetWiFi': False,
    'is_support_iot_cloud': True,
    'mac': '20-23-51-00-00-00',
    'mgt_encrypt_schm': {'is_support_https': True},
    'sv': 1}}
    2026-01-15 14:19:49,210 - kasa.device - DEBUG - Initializing 10.145.18.189 of type <class 'kasa.smartcam.smartcamdevice.SmartCamDevice'>
    2026-01-15 14:19:54,173 - kasa.discover - DEBUG - Discovered 1 devices

    Najdenih naprav: 1 # "Devices found: 1"

    --- Naprava na 10.145.18.189 ---
    model (iz discovery): H200
    2026-01-15 14:19:54,173 - kasa.protocols.smartprotocol - DEBUG - 10.145.18.189 multi-request-batch-1-of-1 >> '{"method":"multipleRequest","request_time_milis":1768483194174,"terminal_uuid":"JwNHBfzKlyvgb4QtU3wf3w==","params":{"requests":[{"method":"getDeviceInfo","params":{"device_info":{"name":["basic_info","info"]}}},{"method":"getAppComponentList","params":{"app_component":{"name":"app_component_list"}}},{"method":"getConnectionType","params":{"network":{"get_connection_type":{}}}}]}}'
    2026-01-15 14:19:54,173 - kasa.transports.sslaestransport - DEBUG - Sending handshake1...
    2026-01-15 14:19:54,204 - kasa.httpclient - DEBUG - Posting to https://10.145.18.189
    2026-01-15 14:19:54,564 - kasa.transports.sslaestransport - DEBUG - Device responded with status 200: {'error_code': -40401, 'result': {'data': {'code': -60502}}}
    2026-01-15 14:19:54,564 - kasa.transports.sslaestransport - DEBUG - Trying default credentials to 10.145.18.189
    2026-01-15 14:19:54,579 - kasa.transports.sslaestransport - DEBUG - Sending handshake1...
    2026-01-15 14:19:54,579 - kasa.httpclient - DEBUG - Posting to https://10.145.18.189
    2026-01-15 14:19:54,579 - kasa.httpclient - DEBUG - Device 10.145.18.189 received an os error, enabling sequential request delay: [Errno None] Can not write request body for https://10.145.18.189
    2026-01-15 14:19:54,579 - kasa.protocols.smartprotocol - DEBUG - Device 10.145.18.189 got a connection error, will retry 3 times: ('Device connection error: 10.145.18.189: [Errno None] Can not write request body for https://10.145.18.189', ClientOSError(None, 'Can not write request body for https://10.145.18.189'))
    2026-01-15 14:19:54,579 - kasa.protocols.smartprotocol - DEBUG - 10.145.18.189 multi-request-batch-1-of-1 >> '{"method":"multipleRequest","request_time_milis":1768483194580,"terminal_uuid":"JwNHBfzKlyvgb4QtU3wf3w==","params":{"requests":[{"method":"getDeviceInfo","params":{"device_info":{"name":["basic_info","info"]}}},{"method":"getAppComponentList","params":{"app_component":{"name":"app_component_list"}}},{"method":"getConnectionType","params":{"network":{"get_connection_type":{}}}}]}}'
    2026-01-15 14:19:54,579 - kasa.transports.sslaestransport - DEBUG - Sending handshake1...
    2026-01-15 14:19:54,579 - kasa.httpclient - DEBUG - Device 10.145.18.189 waiting 0.25 seconds to send request
    2026-01-15 14:19:54,829 - kasa.httpclient - DEBUG - Posting to https://10.145.18.189
    2026-01-15 14:19:55,189 - kasa.transports.sslaestransport - DEBUG - Device responded with status 200: {'error_code': -40401, 'result': {'data': {'code': -60502}}}
    2026-01-15 14:19:55,189 - kasa.transports.sslaestransport - DEBUG - Trying default credentials to 10.145.18.189
    2026-01-15 14:19:55,204 - kasa.transports.sslaestransport - DEBUG - Sending handshake1...
    2026-01-15 14:19:55,204 - kasa.httpclient - DEBUG - Device 10.145.18.189 waiting 0.23500000004423782 seconds to send request
    2026-01-15 14:19:55,454 - kasa.httpclient - DEBUG - Posting to https://10.145.18.189
    2026-01-15 14:19:55,814 - kasa.transports.sslaestransport - DEBUG - Device responded with status 200: {'error_code': -40413, 'result': {'data': {'code': -40401, 'encrypt_type': ['3'], 'key': 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCoVBwJv2pBtrr9ZY9C4lgqNo5+dFI+3A6W80h+8CzpCxsgl8Dic7JYmcTfOrtYtYJ6Vma3ZWx+NK1bJk8DFipOnDewVVJ6wmucnryF3OlfcIjLZsYjh4Sq2mdZfg0lOThTvh8z4V2jO6fWh91iwOOeCokGoMw9V+QyQevtCr5pSQIDAQAB', 'nonce': 'D105551504E62920', 'device_confirm': '216BB3F7A3E97F62A3E36B8098658158EF7D08499F097584CCEF8AF0EAB64AAED105551504E62920C09377A632F9C77B'}}}
    2026-01-15 14:19:55,829 - kasa.transports.sslaestransport - DEBUG - Connected to 10.145.18.189 with default username
    2026-01-15 14:19:55,829 - kasa.transports.sslaestransport - DEBUG - Device response did not match our challenge on ip 10.145.18.189, check that your e-mail and password (both case-sensitive) are correct.
    2026-01-15 14:19:55,829 - kasa.protocols.smartprotocol - DEBUG - Unable to authenticate with 10.145.18.189, not retrying: Device response did not match our challenge on ip 10.145.18.189, check that your e-mail and password (both case-sensitive) are correct.
    Napaka pri update(): AuthenticationError()
    Unclosed client session
    client_session: <aiohttp.client.ClientSession object at 0x000001D0991DB4D0>
    Unclosed connector
    connections: ['deque([(<aiohttp.client_proto.ResponseHandler object at 0x000001D0993FB8C0>, 356994.156)])']
    connector: <aiohttp.connector.TCPConnector object at 0x000001D099296850>

  3. ZeliardM commented on Jan 15, 2026

    Collaborator

    @bhumerca And you're importing Credentials to build the credentials correctly assigning them to creds? It looks like it connects with the default credentials but fails when trying to use your credentials.

  4. bhumerca commented on Jan 16, 2026

    Author

    Yes, I’m using Credentials and passing them directly into Discover.discover(credentials=creds).

    Here is the minimal script I’m running:

    import asyncio
    from kasa import Discover, Credentials
    
    async def main():
        creds = Credentials(
            username="user@example.com",   # redacted
            password="********",           # redacted
        )
    
        devices = await Discover.discover(credentials=creds)
        print(f"Devices found: {len(devices)}")  
    
        for addr, dev in devices.items():
            print(f"--- Naprava na {addr} ---")
            print("  model (iz discovery):", dev.model)
    
            try:
                await dev.update()
            except Exception as e:
                print("  Error on update():", repr(e))  
                continue
    
            print("  Alias:", dev.alias)
            print("  Device type:", dev.device_type)
    
    if __name__ == "__main__":
        asyncio.run(main())
    
    And the output is:
    
    Devices found: 1
    --- Device on 10.145.18.189 ---
      model (from discovery): H200
      Error on update(): AuthenticationError()
  5. ZeliardM commented on Jan 16, 2026

    Collaborator

    @bhumerca One thing to make sure is that the username and password are case sensitive, so if the email is:
    Me@Gmail.Com
    In the app, then it has to be that way in the script. Sometimes, we've seen it where phones or computers were automatically capitalizing things when users typed them in and they didn't do that when trying to authenticate. You find the e-mail and its capitalization

    The other piece is 3rd Party Compatibility in the Tapo App, make sure that is turned on and it may resolve the issues as well.

    Let me know.

  6. fewbafawef commented on Jan 18, 2026

    I also have been experiencing this issue since today.
    Same python script, which has been working flawlessly for weeks, today (18th Jan 2026, 2:30PM roughly IST)
    Getting the same "Device response did not match our challenge".
    Same error as @bhumerca

  7. ZeliardM commented on Jan 18, 2026

    Collaborator

    @fewbafawef @bhumerca Can you tell me if Third Party Compatibility is turned on in the Tapo App? Has the firmware updated recently? Can you verify that the username and password match case sensitive to the username in the Tapo App under the Profile?

    Looking specifically at the logs posted by @bhumerca I have never seen the os error, enabling sequential request delay. Cannot write request body. This to me sounds like there may be some issue with other requirements for python-kasa in Python, not sure. Maybe reinstall python-kasa? The logs also mention that it can connect correctly via the default credentials. Do you have any other Tapo devices that can connect?

    Something has to have changed locally, either on your system, network, or devices, i.e. TPLink changed something, for it to have stopped working all of a sudden if it was working. python-kasa has not been changed for months.

  8. fewbafawef commented on Jan 18, 2026

    I don't think I have enabled Third Party Compatibility.
    Also, my script (which polls the door sensors) works fine now. The only problem is that the error log is being spammed with this error.

    pi@rpi:~ $ sudo journalctl -u tapo -f                         Jan 18 16:23:17 rpi python[4317]: 2026-01-18 16:23:17,083 - ERROR - Error querying 192.168.68.105 for modules '' after first update: coroutine raised StopIteration
    Jan 18 16:23:17 rpi python[4317]: 2026-01-18 16:23:17,083 - ERROR - Hub Error: getDeviceInfo not found in {} for device 192.168.68.105
    Jan 18 16:23:18 rpi python[4317]: 2026-01-18 16:23:18,085 - ERROR - Error querying 192.168.68.105 for modules '' after first update: coroutine raised StopIteration
    Jan 18 16:23:18 rpi python[4317]: 2026-01-18 16:23:18,086 - ERROR - Hub Error: getDeviceInfo not found in {} for device 192.168.68.105
    Jan 18 16:23:19 rpi python[4317]: 2026-01-18 16:23:19,087 - ERROR - Error querying 192.168.68.105 for modules '' after first update: coroutine raised StopIteration
    Jan 18 16:23:19 rpi python[4317]: 2026-01-18 16:23:19,088 - ERROR - Hub Error: getDeviceInfo not found in {} for device 192.168.68.105
    

    My code still, somehow, works.

  9. ZeliardM commented on Jan 18, 2026

    Collaborator

    @fewbafawef It looks like something in your script is polling the hub and it's not returning something.

  10. bhumerca commented on Jan 18, 2026

    Author

    Third Party Compatibility is turned on in the Tapo App..
    I have 2 H200 in network with 12 T315 and wifi plugs

  11. ZeliardM commented on Jan 18, 2026

    Collaborator

    @bhumerca It could be some changes with the latest firmware. Did the Hubs update firmware recently? The other WiFi plugs working ok? I take it the T315 are all connected to the hubs?

  12. fewbafawef commented on Jan 19, 2026

    @fewbafawef It looks like something in your script is polling the hub and it's not returning something.

    async def monitor_hub(hub, ntfy_url):
        actions = ActionManager()
        previous_states = {}
        
        while True:
            actions.reload_if_changed()
            try:
                await hub.update()
                for sensor in hub.children:
                    if sensor.model.startswith("T"):
                        current_state = getattr(sensor, "is_open", None)
                        if current_state is None and 'is_open' in sensor.features:
                            current_state = sensor.features['is_open'].value
                        
                        if sensor.alias in previous_states:
                            if current_state != previous_states[sensor.alias]:
                                await actions.trigger({
                                    "sensor": sensor.alias,
                                    "is_open": current_state,
                                    "ntfy_url": ntfy_url
                                })
                        
                        previous_states[sensor.alias] = current_state
            except Exception as e:
                logger.error(f"Hub Error: {e}")
            await asyncio.sleep(1)
    

    I do poll the hub. But the funny thing is how the script works even though it keeps erroring.

  13. fewbafawef commented on Jan 19, 2026

    Okay i found out what was wrong on my end.
    I had 2 services polling the hub, so the second one couldn't poll the hub properly, the actual working one was the first service that ran, not this script.
    Sorry for the trouble 😅

  14. bhumerca commented on Jan 19, 2026

    Author

    firmware version is 1.6.0 Build 20250915 rel 33520

    All devices that are connected to both hubs are woring normaly (T315 and P115)

    Hubs are connected via LAN and can be ping

  15. ZeliardM commented on Jan 19, 2026

    Collaborator

    @bhumerca @fewbafawef It's newer firmware than what has been tested with the library, but still looks like it's from last year some time so it doesn't look like a recent change. Not sure, it may have been an API change on the backend with TPLink. I need to investigate the encryption still. Would either of you be able to clone the repository and checkout my PR #1638 and see if that makes a difference?

  16. ZeliardM commented on Jan 19, 2026

    Collaborator

    You'll need to check out the PR with the GH CLI and build the local version with the following command:
    uv sync --all-extras
    Then, enable the .venv that is created depending your environment, Windows or Linux, then run Kasa directly in the command line to see if the connection to the hub works.

  17. bhumerca commented on Jan 19, 2026

    Author

    I tested the PR locally as requested.

    Environment / device info

    • Device: Tapo H200 (SMART.TAPOHUB)
    • Hardware version: 1.0
    • Firmware version: 1.6.0 Build 20250915 rel 33520
    • In the Tapo app, Third‑Party Compatibility is enabled for my account / devices.

    Steps I used to test the PR

    • gh repo clone python-kasa/python-kasa
    • gh pr checkout <PR_NUMBER>
    • uv sync --all-extras
    • .\.venv\Scripts\Activate.ps1 (Windows PowerShell)

    Then I ran the following minimal script inside the .venv:

    import asyncio
    from kasa import Discover, Credentials
    
    
    async def main():
        creds = Credentials(
            username="p***@*********",  # redacted here
            password="********",              # redacted here
        )
    
        devices = await Discover.discover(credentials=creds)
        print(f"Najdenih naprav: {len(devices)}")
    
        for addr, dev in devices.items():
            print(f"--- Naprava na {addr} ---")
            print("  model (iz discovery):", dev.model)
    
            try:
                await dev.update()
            except Exception as e:
                print("  Napaka pri update():", repr(e))
                continue
    
            print("  Alias:", dev.alias)
            print("  Device type:", dev.device_type)
    
    
    if __name__ == "__main__":
        asyncio.run(main())
    
    Result with the PR checked out
    When I run this script in the PR environment, I get:
    
    Copy text
    Got unsupported connection type: {'device_family': 'SMART.TAPOHUB', 'encryption_type': 'AES', 'https': True}
    Najdenih naprav: 0
    So:
    The code does detect the H200 hub and logs:
    device_family: 'SMART.TAPOHUB'
    encryption_type: 'AES'
    https: True
    But it treats this combination as an unsupported connection type and does not return it from Discover.discover(credentials=creds).
    As a result, Najdenih naprav: 0 and I don't get any device instance to call dev.update() on.
    Behavior on released 0.10.2
    On the released python-kasa 0.10.2 (installed via pip):
    Discover.discover(credentials=creds) does return one device, identified as:
    model H200
    device type SMART.TAPOHUB
    transport SMART.AES.HTTPS
    But dev.update() then fails with AuthenticationError() and the AES HTTPS handshake logs I posted earlier (including encrypt_type ['3'], device_confirm, nonce, key, etc.).
    Summary
    With 0.10.2:
    The H200 hub is discovered as SMART.TAPOHUB (SMART.AES.HTTPS),
    but dev.update() fails with AuthenticationError().
    With the PR:
    The H200 hub is detected as device_family='SMART.TAPOHUB', encryption_type='AES', https=True,
    but this combination is classified as an unsupported connection type,
    so the device is not returned from Discover.discover(credentials=creds) at all (Najdenih naprav: 0).
    So the PR does not yet make the H200 hub usable via python-kasa, but it does change the behavior from a later AuthenticationError() to an explicit “unsupported connection type” during discovery.
  18. ZeliardM commented on Jan 19, 2026

    Collaborator

    @bhumerca That's very odd, I changed nothing with the PR about discovering the devices just the default password after it is discovered. Can you run the following and get me the results in just the CLI not the script, I need to see the library debug output to see what exactly is going on when it discovers the hub inside the .venv:
    kasa --debug --host IP_ADDRESS --username 'USERNAME' --password 'PASSWORD' discover
    This should give logs as it checks the device during the discovery so I can see what is going on. If you want to run it against the non-.venv one as well and post both, it can give a good comparison.

  19. bhumerca commented on Jan 19, 2026

    Author

    I ran the command inside the PR .venv as requested.

    Command:

    cd C:\Programi\python-kasa
    .\.venv\Scripts\Activate.ps1
    kasa --debug --host 10.145.18.189 --username "p*****@******" --password "********" discover
    
    I ran the command inside the PR .venv as requested.
    
    Command:
    
    ```powershell
    cd C:\Programi\python-kasa
    .\.venv\Scripts\Activate.ps1
    kasa --debug --host 10.145.18.189 --username "p****@*****" --password "********" discover
    
    Output:
    
    
    Discovering device 10.145.18.189 for 10 seconds
    DEBUG    [DISCOVERY] 10.145.18.189 >> {'system': {'get_sysinfo': {}}}                                   discover.py:283
    DEBUG    Waiting a total of 10 seconds for responses...                                                 discover.py:521
    ERROR    Got error: [WinError 1234] No service is operating at the destination network endpoint on the  discover.py:350
             remote system
    Raised error: Timed out getting discovery response for 10.145.18.189
    Traceback (most recent call last):
      File "<frozen runpy>", line 198, in _run_module_as_main
      File "<frozen runpy>", line 88, in _run_code
      File "C:\Programi\python-kasa\.venv\Scripts\kasa.exe\__main__.py", line 10, in <module>
      File "C:\Programi\python-kasa\.venv\Lib\site-packages\asyncclick\core.py", line 1205, in __call__
        return anyio.run(self._main, main, args, kwargs, **opts)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Programi\python-kasa\.venv\Lib\site-packages\anyio\_core\_eventloop.py", line 74, in run
        return async_backend.run(func, args, {}, backend_options)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Programi\python-kasa\.venv\Lib\site-packages\anyio\_backends\_asyncio.py", line 2284, in run
        return runner.run(wrapper())
               ^^^^^^^^^^^^^^^^^^^^^
      File "C:\Program Files\Python311\Lib\asyncio\runners.py", line 118, in run
        return self._loop.run_until_complete(task)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Program Files\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
        return future.result()
               ^^^^^^^^^^^^^^^
      File "C:\Programi\python-kasa\.venv\Lib\site-packages\anyio\_backends\_asyncio.py", line 2272, in wrapper
        return await func(*args)
               ^^^^^^^^^^^^^^^^^
      File "C:\Programi\python-kasa\.venv\Lib\site-packages\asyncclick\core.py", line 1208, in _main
        return await main(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Programi\python-kasa\.venv\Lib\site-packages\asyncclick\core.py", line 1120, in main
        rv = await self.invoke(ctx)
             ^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Programi\python-kasa\kasa\cli\common.py", line 231, in invoke
        _handle_exception(self._debug, exc)
      File "C:\Programi\python-kasa\kasa\cli\common.py", line 229, in invoke
        return await super().invoke(ctx)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Programi\python-kasa\.venv\Lib\site-packages\asyncclick\core.py", line 1739, in invoke
        return await _process_result(await sub_ctx.command.invoke(sub_ctx))
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Programi\python-kasa\.venv\Lib\site-packages\asyncclick\core.py", line 1717, in invoke
        rv = await super().invoke(ctx)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Programi\python-kasa\.venv\Lib\site-packages\asyncclick\core.py", line 1485, in invoke
        return await ctx.invoke(self.callback, **ctx.params)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Programi\python-kasa\.venv\Lib\site-packages\asyncclick\core.py", line 824, in invoke
        rv = await rv
             ^^^^^^^^
      File "C:\Programi\python-kasa\kasa\cli\discover.py", line 28, in discover
        return await ctx.invoke(detail)
               ^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Programi\python-kasa\.venv\Lib\site-packages\asyncclick\core.py", line 824, in invoke
        rv = await rv
             ^^^^^^^^
      File "C:\Programi\python-kasa\kasa\cli\discover.py", line 67, in detail
        discovered = await _discover(ctx, print_discovered, print_unsupported)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Programi\python-kasa\kasa\cli\discover.py", line 122, in _discover
        return await Discover.discover_single(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Programi\python-kasa\kasa\discover.py", line 541, in discover_single
        raise TimeoutError(f"Timed out getting discovery response for {host}")
    kasa.exceptions.TimeoutError: Timed out getting discovery response for 10.145.18.189
    
    
    Some additional context:
    This is the same IP address that worked in my previous logs:
    Discover.discover(credentials=creds) found H200 (SMART.TAPOHUB, SMART.AES.HTTPS),
    and dev.update() failed with AuthenticationError() and the AES HTTPS handshake details.
    The hub is online and reachable from the same machine:
    I can control it from the Tapo app,
    and the earlier debug logs (from the global 0.10.2 install) show successful HTTPS (status 200) responses from https://10.145.18.189.
  20. ZeliardM commented on Jan 19, 2026

    Collaborator

    @bhumerca I don't understand why it times out. Is there anything with you setup or network that would cause delays? Trying to help figure this out.

  21. ZeliardM commented on Jan 21, 2026

    Collaborator

    @bhumerca Is there any way for you to capture the traffic as you run the command from inside the .venv to see what is going on? I don't understand why the discover fails under the PR .venv, but not the global. Before activating the .venv, you need to run:
    uv sync --all-extras
    so that the .venv is setup correctly. If uv is not installed, you can install it using pip.
    Let me know.

  22. Puxtril commented on Feb 13, 2026

    Contributor

    I don't know if this helps, but I also just purchased an H200 and got an "Authentication error" when trying to connect out-of-the-box. But the PR feature/camera-encryption-type-3-default-credentials you created in #1628 did the trick. Actually for some reason your other branch feature/device-wifi-scan also authenticates (I don't think the cred updates are in that branch?)

    The error (python-kasa master)
    Discovering device 192.168.1.XX for 10 seconds
    == Authentication failed for device ==
            == Discovery Result ==
            Device Type:        SMART.TAPOHUB
            Device Model:       H200
            Device Name:        Tapo_Hub_XXXX
            IP:                 192.168.1.XX
            MAC:                XX-XX-XX-XX-XX-XX
            Device Id (hash):   <REDACTED>
            HW Ver:             1.0
            Supports IOT Cloud: True
            Factory Default:    True
            Encrypt Type:       ['3']
            Supports HTTPS:     True
            Encrypt info:       EncryptionInfo(sym_schm='AES',
                   key= <REDACTED>',
                   data=' <REDACTED>')
            Decrypted:          {'connect_ssid': '',
     'connect_type': 'wired',
     'device_id': ' <REDACTED>',
     'http_port': 443,
     'owner': '',
     'sd_status': 'offline'}
    
    Your PR(s)
    Discovering device 192.168.1.XX for 10 seconds
    == Tapo_Hub_XXXX - H200 ==
    Host: 192.168.1.XX
    Port: 443
    Device state: True
    Time:         2025-06-03 09:58:43+00:00 (tz: UTC)
    Hardware:     1.0 (US)
    Firmware:     1.5.2 Build 20250603 rel.59798
    MAC (rssi):   XX:XX:XX:XX:XX:XX (None)
    
  23. ZeliardM commented on Feb 23, 2026

    Collaborator

    @bhumerca Can you pull the latest main branch code, not a PR and uv sync --all-extras the .venv and try again?

    A lot has changed and merged recently and I want to see if the issues are resolved?

  24. github-actions commented on May 25, 2026

    There hasn't been any activity on this issue recently. This issue has been automatically marked as stale because of that. It will be closed if no further activity occurs.
    Please make sure to update to the latest python-kasa version and check if that solves the issue.
    Thank you for your contributions.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL