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

Tapo Hub H200 authentication issue · Issue #1341 · python-kasa/python-kasa · GitHub

Tapo Hub H200 authentication issue · Issue #1341 · python-kasa/python-kasa · GitHub
Skip to content

Navigation Menu

Repository navigation

Tapo Hub H200 authentication issue  #1341

Closed

Description

I have just updated home assistant core and received the latest update for the kasa smart home integration. After the update it automatically detected my tapo cameras and H200 hub. I was able to add my cameras by using my tplink credentials but I get "unknown error occurred" when trying to add the H200 hub using the same to link credentials. Any ideas on what I can try to diagnose this issue? Thanks

Activity

  1. sdb9696 commented on Dec 5, 2024

    Contributor

    Could you try the kasa cli tool from this repository (check the readme) and run it against your device with --debug flag and upload redacted output?

  2. jamesk34 commented on Dec 5, 2024

    Author

    Could you try the kasa cli tool from this repository (check the readme) and run it against your device with --debug flag and upload redacted output?

    Yes, will give this a try later and report back. Thanks

  3. somebody33427 commented on Dec 5, 2024

    I did it with the debug command
    The hub is connected via Wi-Fi and is on firmware 1.3.6

    kasa --host 192.168.0.217 --username myemail@email.com --password mypassword --debug
    Discovering device 192.168.0.217 for 10 seconds
    DEBUG    [DISCOVERY] 192.168.0.217 >> {'system': {'get_sysinfo': {}}}                                    discover.py:293
    DEBUG    Waiting a total of 10 seconds for responses...                                                  discover.py:535
    DEBUG    Created AES transport for 192.168.0.217                                                  sslaestransport.py:129
    DEBUG    [DISCOVERY] 192.168.0.217 << {'error_code': 0,                                                  discover.py:808
              'result': {'device_id': 'REDACTED_B165B6084E48CD5EAB87A1F',
                         'device_model': 'H200',
                         'device_name': 'Casita-Tapo-Hub',
                         'device_type': 'SMART.TAPOHUB',
                         'encrypt_info': {'data':
             'JnQE4HPv/vlyx7qw4/IGT/gy1NtOhsxl2yNQ5Vd5UDiL9NoAjV8LOhLU7cx7O0pVkrqOs9QByANtHjpn8CAD9/b3fll1Ur
             Hr7YBaNzg8L+Nrl0ijBoHpV1MOQQ1tCYITWvX9EvN2gfk6rAFDKjNriC8IXE4lB9idSKFbngYZzkzasbrDB/kmCMRWfjhaC
             D7BX6FoDUaw92yEv4SCCwYIFLuiIr80DWbFLMhZeHpj8N5DayLTeTLJ3M1XyIxEQ/rT',
                                          'key':
             'gZdeTUjOYGpimzyp3aQitMH2JXQEnwQrZQXtDue78dYDVBDvCvxam52KwV7PSItrgm7gAC1RzMsacG3jJ3xgYstXVFgwAu
             miGDHx9YJFAySzBEJf+3cia6ECD8OMv7K19h12uAANqZVzVseCZw9Ogp51QJzmdr+ICZ3TB7zbWurIAquaoHrCIjdxlD/kF
             OVhUcyRa/XTaQ9v2cIg9RYErvvk7VN954++DFlL2yscfcmOw0o6LG4uA7xB3ZQFS/r/n5v1BBUtj+KJFLbxfrM6Vrf+8ExC
             PjPE7e1MUFy7oCA4SKZTd4CNgIQe4rHphSTCKxxKJcS6p4lQL9O5QlKeiA==',
                                          'sym_schm': 'AES'},
                         'encrypt_type': ['3'],
                         'factory_default': False,
                         'firmware_version': '1.3.6 Build 20240829 rel.71119',
                         'hardware_version': '1.0',
                         'ip': '192.168.0.217',
                         'isResetWiFi': False,
                         'is_support_iot_cloud': True,
                         'mac': '3C-52-A1-00-00-00',
                         'mgt_encrypt_schm': {'is_support_https': True}}}
    DEBUG    Initializing 192.168.0.217 of type <class 'kasa.smartcam.smartcamdevice.SmartCamDevice'>          device.py:212
    DEBUG    192.168.0.217 multi-request-batch-1-of-1 >>                                                smartprotocol.py:197
             '{"method":"multipleRequest","request_time_milis":1733421816956,"terminal_uuid":"Gc5ncvpYd
             dlo8gruxjBaRA==","params":{"requests":[{"method":"getDeviceInfo","params":{"device_info":{
             "name":["basic_info","info"]}}},{"method":"getAppComponentList","params":{"app_component":
             {"name":"app_component_list"}}}]}}'
    DEBUG    Will to send handshake1...                                                               sslaestransport.py:431
    DEBUG    Posting to https://192.168.0.217                                                               httpclient.py:88
    DEBUG    Device responded with: {'error_code': -40401, 'result': {'data': {'code': -60502}}}      sslaestransport.py:450
    DEBUG    Will to send handshake1...                                                               sslaestransport.py:431
    DEBUG    Posting to https://192.168.0.217                                                               httpclient.py:88
    DEBUG    Device 192.168.0.217 received an os error, enabling sequential request delay: Server          httpclient.py:123
             disconnected
    DEBUG    Device 192.168.0.217 got a connection error, will retry 3 times: ('Device connection       smartprotocol.py:104
             error: 192.168.0.217: Server disconnected', ServerDisconnectedError('Server
             disconnected'))
    DEBUG    192.168.0.217 multi-request-batch-1-of-1 >>                                                smartprotocol.py:197
             '{"method":"multipleRequest","request_time_milis":1733421817195,"terminal_uuid":"Gc5ncvpYd
             dlo8gruxjBaRA==","params":{"requests":[{"method":"getDeviceInfo","params":{"device_info":{
             "name":["basic_info","info"]}}},{"method":"getAppComponentList","params":{"app_component":
             {"name":"app_component_list"}}}]}}'
    DEBUG    Will to send handshake1...                                                               sslaestransport.py:431
    DEBUG    Device 192.168.0.217 waiting 0.25 seconds to send request                                      httpclient.py:81
    DEBUG    Posting to https://192.168.0.217                                                               httpclient.py:88
    DEBUG    Device responded with: {'error_code': -40401, 'result': {'data': {'code': -60502}}}      sslaestransport.py:450
    DEBUG    Will to send handshake1...                                                               sslaestransport.py:431
    DEBUG    Device 192.168.0.217 waiting 0.25 seconds to send request                                      httpclient.py:81
    DEBUG    Posting to https://192.168.0.217                                                               httpclient.py:88
    DEBUG    Device responded with: {'error_code': -40413, 'result': {'data': {'code': -40401,        sslaestransport.py:450
             'encrypt_type': ['3'], 'key':
             'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCoVBwJv2pBtrr9ZY9C4lgqNo5+dFI+3A6W80h+8CzpCxsgl8D
             ic7JYmcTfOrtYtYJ6Vma3ZWx+NK1bJk8DFipOnDewVVJ6wmucnryF3OlfcIjLZsYjh4Sq2mdZfg0lOThTvh8z4V2
             jO6fWh91iwOOeCokGoMw9V+QyQevtCr5pSQIDAQAB', 'nonce': '4A5697287CCA871C',
             'device_confirm':
             '29F6A9FB9452B8271C849B58F0CBEDBB6A4512E8621C767E02172E0F8837F3DF4A5697287CCA871CC4C4E3F
             F9CC438E3'}}}
    DEBUG    Connected to {self._host} with default username                                          sslaestransport.py:381
    DEBUG    Credentials match                                                                        sslaestransport.py:411
    DEBUG    Performing handshake2 ...                                                                sslaestransport.py:312
    DEBUG    Device 192.168.0.217 waiting 0.25 seconds to send request                                      httpclient.py:81
    DEBUG    Posting to https://192.168.0.217                                                               httpclient.py:88
    DEBUG    Handshake2 complete ...                                                                  sslaestransport.py:356
    DEBUG    Device 192.168.0.217 waiting 0.25 seconds to send request                                      httpclient.py:81
    DEBUG    Posting to https://192.168.0.217/stok=7083cd1ff1777b10ba9ec96bc682df38/ds                      httpclient.py:88
    DEBUG    192.168.0.217 multi-request-batch-1-of-1 << {'error_code': 0,                              smartprotocol.py:209
              'result': {'responses': [{'error_code': 0,
                                        'method': 'getAppComponentList',
                                        'result': {'app_component': {'app_component_list': [{'name':
             'sdCard',
                                                                                             'version':
             2},
                                                                                            {'name':
             'dateTime',
                                                                                             'version':
             1},
                                                                                            {'name':
             'system',
                                                                                             'version':
             4},
                                                                                            {'name':
             'led',
                                                                                             'version':
             1},
                                                                                            {'name':
             'firmware',
                                                                                             'version':
             2},
                                                                                            {'name':
             'account',
                                                                                             'version':
             1},
                                                                                            {'name':
             'quickSetup',
                                                                                             'version':
             1},
                                                                                            {'name':
             'hubRecord',
                                                                                             'version':
             1},
                                                                                            {'name':
             'deviceShare',
                                                                                             'version':
             1},
                                                                                            {'name':
             'siren',
                                                                                             'version':
             2},
                                                                                            {'name':
             'childControl',
                                                                                             'version':
             1},
                                                                                            {'name':
             'childQuickSetup',
                                                                                             'version':
             1},
                                                                                            {'name':
             'childInherit',
                                                                                             'version':
             1},
                                                                                            {'name':
             'deviceLoad',
                                                                                             'version':
             1},
                                                                                            {'name':
             'subg',
                                                                                             'version':
             2},
                                                                                            {'name':
             'iotCloud',
                                                                                             'version':
             1},
                                                                                            {'name':
             'diagnose',
                                                                                             'version':
             1},
                                                                                            {'name':
             'preWakeUp',
                                                                                             'version':
             1},
                                                                                            {'name':
             'supportRE',
                                                                                             'version':
             1},
                                                                                            {'name':
             'testSignal',
                                                                                             'version':
             1},
                                                                                            {'name':
             'dataDownload',
                                                                                             'version':
             1},
                                                                                            {'name':
             'testChildSignal',
                                                                                             'version':
             1},
                                                                                            {'name':
             'ringLog',
                                                                                             'version':
             1},
                                                                                            {'name':
             'matter',
                                                                                             'version':
             1},
                                                                                            {'name':
             'localSmart',
                                                                                             'version':
             1},
                                                                                            {'name':
             'generalCameraManage',
                                                                                             'version':
             1},
                                                                                            {'name':
             'playback',
                                                                                             'version':
             6},
                                                                                            {'name':
             'hubPlayback',
                                                                                             'version':
             1}]}}},
                                       {'error_code': 0,
                                        'method': 'getDeviceInfo',
                                        'result': {'device_info': {'basic_info': {'avatar': 'hub_h200',
                                                                                  'bind_status': True,
                                                                                  'child_num': 2,
                                                                                  'dev_id':
             '802DB13E568D67C49866D2575A3AF66221C9CCD0',
                                                                                  'device_alias':
             'Casita-Tapo-Hub',
                                                                                  'device_info': 'H200
             '
                                                                                                 '1.0',
                                                                                  'device_model':
             'H200',
                                                                                  'device_name': 'H200
             '
                                                                                                 '1.0',
                                                                                  'device_type':
             'SMART.TAPOHUB',
                                                                                  'has_set_location_inf
             o': 1,
                                                                                  'hw_id':
             '99A36151C79A3A5D72823C98BC0FDA5F',
                                                                                  'hw_version': '1.0',
                                                                                  'latitude': 0,
                                                                                  'local_ip':
             '192.168.0.217',
                                                                                  'longitude': 0,
                                                                                  'mac':
             '3C-52-A1-00-00-00',
                                                                                  'need_sync_sha1_passw
             ord': 0,
                                                                                  'oem_id':
             'REDACTED_17E4E610AA3A7D93A0F373A',
                                                                                  'product_name': 'Tapo
             '
                                                                                                  'Smar
             t '
                                                                                                  'Hub'
             ,
                                                                                  'region': 'US',
                                                                                  'status':
             'configured',
                                                                                  'sw_version': '1.3.6
             '
                                                                                                'Build
             '
                                                                                                '202408
             29 '
                                                                                                'rel.71
             119'},
                                                                   'info': {'avatar': 'hub_h200',
                                                                            'bind_status': True,
                                                                            'child_num': 2,
                                                                            'dev_id':
             '802DB13E568D67C49866D2575A3AF66221C9CCD0',
                                                                            'device_alias':
             'Casita-Tapo-Hub',
                                                                            'device_info': 'H200 '
                                                                                           '1.0',
                                                                            'device_model': 'H200',
                                                                            'device_name': 'H200 '
                                                                                           '1.0',
                                                                            'device_type':
             'SMART.TAPOHUB',
                                                                            'has_set_location_info': 1,
                                                                            'hw_id':
             '99A36151C79A3A5D72823C98BC0FDA5F',
                                                                            'hw_version': '1.0',
                                                                            'latitude': 0,
                                                                            'local_ip':
             '192.168.0.217',
                                                                            'longitude': 0,
                                                                            'mac': '3C-52-A1-00-00-00',
                                                                            'need_sync_sha1_password':
             0,
                                                                            'oem_id':
             'REDACTED_17E4E610AA3A7D93A0F373A',
                                                                            'product_name': 'Tapo '
                                                                                            'Smart '
                                                                                            'Hub',
                                                                            'region': 'US',
                                                                            'status': 'configured',
                                                                            'sw_version': '1.3.6 '
                                                                                          'Build '
                                                                                          '20240829 '
                                                                                          'rel.71119'}}
             }}]}}
    DEBUG    192.168.0.217 multi-request-batch-1-of-1 >>                                                smartprotocol.py:197
             '{"method":"multipleRequest","request_time_milis":1733421819228,"terminal_uuid":"Gc5ncvpYd
             dlo8gruxjBaRA==","params":{"requests":[{"method":"getChildDeviceList","params":{"childCont
             rol":{"start_index":0}}},{"method":"getChildDeviceComponentList","params":{"childControl":
             {"start_index":0}}}]}}'
    DEBUG    Device 192.168.0.217 waiting 0.23500000000058208 seconds to send request                       httpclient.py:81
    DEBUG    Posting to https://192.168.0.217/stok=7083cd1ff1777b10ba9ec96bc682df38/ds                      httpclient.py:88
    DEBUG    192.168.0.217 multi-request-batch-1-of-1 << {'error_code': 0,                              smartprotocol.py:209
              'result': {'responses': [{'error_code': 0,
                                        'method': 'getChildDeviceList',
                                        'result': {'child_device_list': [{'alias': 'Camera '
                                                                                   '1',
                                                                          'avatar': 'camera '
                                                                                    'c420',
                                                                          'battery_charging': 'NORMAL',
                                                                          'battery_installed': 1,
                                                                          'battery_percent': 5,
                                                                          'battery_temperature': 21,
                                                                          'battery_voltage': 3232,
                                                                          'cam_uptime': 42517,
                                                                          'category': 'camera',
                                                                          'dev_name': 'Tapo '
                                                                                      'Smart '
                                                                                      'Camera',
                                                                          'device_id':
             'REDACTED_952673A9B315FAE6E46C92621CA88C3',
                                                                          'device_model': 'C420',
                                                                          'device_name': 'C420 '
                                                                                         '1.0',
                                                                          'device_type':
             'SMART.IPCAMERA',
                                                                          'ext_addr':
             '5CE9310ECF520000',
                                                                          'firmware_status': 'OK',
                                                                          'hw_id':
             'C5B155806880C301179651EA0F9ECF88',
                                                                          'hw_ver': '1.0',
                                                                          'ipaddr': '172.23.30.2',
                                                                          'led_status': 'on',
                                                                          'low_battery': True,
                                                                          'mac': '5C:E9:31:00:00:00',
                                                                          'oem_id':
             'REDACTED_F0599E35E4D5F2CFF11259B',
                                                                          'onboarding_timestamp':
             1701304535,
                                                                          'online': True,
                                                                          'parent_device_id':
             'REDACTED_68D67C49866D2575A3AF66221C9CCD0',
                                                                          'power': 'SOLAR',
                                                                          'power_save_mode': 'auto',
                                                                          'power_save_status': 'on',
                                                                          'region': 'US',
                                                                          'rssi': -52,
                                                                          'short_addr': 0,
                                                                          'status': 'configured',
                                                                          'subg_cam_rssi': 0,
                                                                          'subg_hub_rssi': 0,
                                                                          'sw_ver': '1.2.17 '
                                                                                    'Build '
                                                                                    '20240305 '
                                                                                    'rel.75572',
                                                                          'system_time': 1733421819,
                                                                          'updating': False,
                                                                          'uptime': 1451827},
                                                                         {'alias': 'Garden',
                                                                          'avatar': 'camera '
                                                                                    'c420',
                                                                          'battery_charging': 'NORMAL',
                                                                          'battery_installed': 1,
                                                                          'battery_percent': 100,
                                                                          'battery_temperature': 22,
                                                                          'battery_voltage': 4170,
                                                                          'cam_uptime': 58914,
                                                                          'category': 'camera',
                                                                          'dev_name': 'Tapo '
                                                                                      'Smart '
                                                                                      'Camera',
                                                                          'device_id':
             'REDACTED_B8154688A76992C7B9F199021CAE165',
                                                                          'device_model': 'C420',
                                                                          'device_name': 'C420 '
                                                                                         '1.0',
                                                                          'device_type':
             'SMART.IPCAMERA',
                                                                          'ext_addr':
             '5CE9310ECD5E0000',
                                                                          'firmware_status': 'OK',
                                                                          'hw_id':
             'C5B155806880C301179651EA0F9ECF88',
                                                                          'hw_ver': '1.0',
                                                                          'ipaddr': '172.23.30.3',
                                                                          'led_status': 'on',
                                                                          'low_battery': False,
                                                                          'mac': '5C:E9:31:00:00:00',
                                                                          'oem_id':
             'REDACTED_F0599E35E4D5F2CFF11259B',
                                                                          'onboarding_timestamp':
             1702675146,
                                                                          'online': True,
                                                                          'parent_device_id':
             'REDACTED_68D67C49866D2575A3AF66221C9CCD0',
                                                                          'power': 'SOLAR',
                                                                          'power_save_mode': 'off',
                                                                          'power_save_status': 'off',
                                                                          'region': 'US',
                                                                          'rssi': -40,
                                                                          'short_addr': 0,
                                                                          'status': 'configured',
                                                                          'subg_cam_rssi': 0,
                                                                          'subg_hub_rssi': 0,
                                                                          'sw_ver': '1.2.17 '
                                                                                    'Build '
                                                                                    '20240305 '
                                                                                    'rel.75572',
                                                                          'system_time': 1733421819,
                                                                          'updating': False,
                                                                          'uptime': 1240118}],
                                                   'start_index': 0,
                                                   'sum': 2}},
                                       {'error_code': 0,
                                        'method': 'getChildDeviceComponentList',
                                        'result': {'child_component_list': [{'component_list':
             [{'name': 'sdCard',
                                                                                                 'versi
             on': 2},
                                                                                                {'name'
             : 'timezone',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'batCamSystem',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'led',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'playback',
                                                                                                 'versi
             on': 3},
                                                                                                {'name'
             : 'detection',
                                                                                                 'versi
             on': 3},
                                                                                                {'name'
             : 'batCamAlarm',
                                                                                                 'versi
             on': 2},
                                                                                                {'name'
             : 'firmware',
                                                                                                 'versi
             on': 3},
                                                                                                {'name'
             : 'video',
                                                                                                 'versi
             on': 3},
                                                                                                {'name'
             : 'lensMask',
                                                                                                 'versi
             on': 2},
                                                                                                {'name'
             : 'lightFrequency',
                                                                                                 'versi
             on': 2},
                                                                                                {'name'
             : 'dayNightMode',
                                                                                                 'versi
             on': 2},
                                                                                                {'name'
             : 'nightVisionMode',
                                                                                                 'versi
             on': 3},
                                                                                                {'name'
             : 'batCamOsd',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'record',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'videoRotation',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'audio',
                                                                                                 'versi
             on': 3},
                                                                                                {'name'
             : 'personDetection',
                                                                                                 'versi
             on': 2},
                                                                                                {'name'
             : 'vehicleDetection',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'petDetection',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'msgPush',
                                                                                                 'versi
             on': 3},
                                                                                                {'name'
             : 'deviceShare',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'tapoCare',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'pir',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'battery',
                                                                                                 'versi
             on': 3},
                                                                                                {'name'
             : 'clips',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'batCamRelay',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'batCamP2p',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'needSubscriptionServiceList',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'iotCloud',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'blockZone',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'whiteLamp',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'infLamp',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'imageStyle',
                                                                                                 'versi
             on': 2},
                                                                                                {'name'
             : 'detectionRegion',
                                                                                                 'versi
             on': 2},
                                                                                                {'name'
             : 'streamGrab',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'recordDownload',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'batCamStatistics',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'batCamNodeRelay',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'batCamRtsp',
                                                                                                 'versi
             on': 2}],
                                                                             'device_id':
             'REDACTED_952673A9B315FAE6E46C92621CA88C3'},
                                                                            {'component_list':
             [{'name': 'sdCard',
                                                                                                 'versi
             on': 2},
                                                                                                {'name'
             : 'timezone',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'batCamSystem',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'led',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'playback',
                                                                                                 'versi
             on': 3},
                                                                                                {'name'
             : 'detection',
                                                                                                 'versi
             on': 3},
                                                                                                {'name'
             : 'batCamAlarm',
                                                                                                 'versi
             on': 2},
                                                                                                {'name'
             : 'firmware',
                                                                                                 'versi
             on': 3},
                                                                                                {'name'
             : 'video',
                                                                                                 'versi
             on': 3},
                                                                                                {'name'
             : 'lensMask',
                                                                                                 'versi
             on': 2},
                                                                                                {'name'
             : 'lightFrequency',
                                                                                                 'versi
             on': 2},
                                                                                                {'name'
             : 'dayNightMode',
                                                                                                 'versi
             on': 2},
                                                                                                {'name'
             : 'nightVisionMode',
                                                                                                 'versi
             on': 3},
                                                                                                {'name'
             : 'batCamOsd',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'record',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'videoRotation',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'audio',
                                                                                                 'versi
             on': 3},
                                                                                                {'name'
             : 'personDetection',
                                                                                                 'versi
             on': 2},
                                                                                                {'name'
             : 'vehicleDetection',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'petDetection',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'msgPush',
                                                                                                 'versi
             on': 3},
                                                                                                {'name'
             : 'deviceShare',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'tapoCare',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'pir',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'battery',
                                                                                                 'versi
             on': 3},
                                                                                                {'name'
             : 'clips',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'batCamRelay',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'batCamRtsp',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'batCamP2p',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'needSubscriptionServiceList',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'iotCloud',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'blockZone',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'whiteLamp',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'infLamp',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'imageStyle',
                                                                                                 'versi
             on': 2},
                                                                                                {'name'
             : 'detectionRegion',
                                                                                                 'versi
             on': 2},
                                                                                                {'name'
             : 'streamGrab',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'recordDownload',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'batCamStatistics',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'batCamNodeRelay',
                                                                                                 'versi
             on': 1},
                                                                                                {'name'
             : 'batCamRtsp',
                                                                                                 'versi
             on': 2}],
                                                                             'device_id':
             'REDACTED_B8154688A76992C7B9F199021CAE165'}],
                                                   'start_index': 0,
                                                   'sum': 2}}]}}
    DEBUG    Child device type not supported: {'device_id':                                            smartcamdevice.py:128
             '8021BF05C952673A9B315FAE6E46C92621CA88C3', 'parent_device_id':
             '802DB13E568D67C49866D2575A3AF66221C9CCD0', 'device_model': 'C420', 'device_name': 'C420
             1.0', 'alias': 'Camera 1', 'avatar': 'camera c420', 'sw_ver': '1.2.17 Build 20240305
             rel.75572', 'hw_ver': '1.0', 'mac': '5C:E9:31:0E:CF:52', 'device_type': 'SMART.IPCAMERA',
             'category': 'camera', 'hw_id': 'C5B155806880C301179651EA0F9ECF88', 'oem_id':
             '59CD5E5A8F0599E35E4D5F2CFF11259B', 'system_time': 1733421819, 'led_status': 'on',
             'updating': False, 'online': True, 'firmware_status': 'OK', 'power': 'SOLAR',
             'battery_percent': 5, 'battery_charging': 'NORMAL', 'rssi': -52, 'dev_name': 'Tapo Smart
             Camera', 'ipaddr': '172.23.30.2', 'short_addr': 0, 'ext_addr': '5CE9310ECF520000',
             'status': 'configured', 'onboarding_timestamp': 1701304535, 'battery_voltage': 3232,
             'battery_temperature': 21, 'battery_installed': 1, 'low_battery': True,
             'power_save_mode': 'auto', 'power_save_status': 'on', 'uptime': 1451827, 'cam_uptime':
             42517, 'subg_cam_rssi': 0, 'subg_hub_rssi': 0, 'region': 'US'}
    DEBUG    Child device type not supported: {'device_id':                                            smartcamdevice.py:128
             '802199378B8154688A76992C7B9F199021CAE165', 'parent_device_id':
             '802DB13E568D67C49866D2575A3AF66221C9CCD0', 'device_model': 'C420', 'device_name': 'C420
             1.0', 'alias': 'Garden', 'avatar': 'camera c420', 'sw_ver': '1.2.17 Build 20240305
             rel.75572', 'hw_ver': '1.0', 'mac': '5C:E9:31:0E:CD:5E', 'device_type': 'SMART.IPCAMERA',
             'category': 'camera', 'hw_id': 'C5B155806880C301179651EA0F9ECF88', 'oem_id':
             '59CD5E5A8F0599E35E4D5F2CFF11259B', 'system_time': 1733421819, 'led_status': 'on',
             'updating': False, 'online': True, 'firmware_status': 'OK', 'power': 'SOLAR',
             'battery_percent': 100, 'battery_charging': 'NORMAL', 'rssi': -40, 'dev_name': 'Tapo
             Smart Camera', 'ipaddr': '172.23.30.3', 'short_addr': 0, 'ext_addr': '5CE9310ECD5E0000',
             'status': 'configured', 'onboarding_timestamp': 1702675146, 'battery_voltage': 4170,
             'battery_temperature': 22, 'battery_installed': 1, 'low_battery': False,
             'power_save_mode': 'off', 'power_save_status': 'off', 'uptime': 1240118, 'cam_uptime':
             58914, 'subg_cam_rssi': 0, 'subg_hub_rssi': 0, 'region': 'US'}
    DEBUG    Querying 192.168.0.217 for modules: SmartCamAlarm, Led, Time                                 smartdevice.py:261
    DEBUG    192.168.0.217 multi-request-batch-1-of-2 >>                                                smartprotocol.py:197
             '{"method":"multipleRequest","request_time_milis":1733421819633,"terminal_uuid":"Gc5ncvpYd
             dlo8gruxjBaRA==","params":{"requests":[{"method":"getSirenStatus","params":{"siren":{}}},{
             "method":"getSirenConfig","params":{"siren":{}}},{"method":"getSirenTypeList","params":{"s
             iren":{}}},{"method":"getLedStatus","params":{"led":{"name":"config"}}},{"method":"getTime
             zone","params":{"system":{"name":"basic"}}}]}}'
    DEBUG    Device 192.168.0.217 waiting 0.1720000000022992 seconds to send request                        httpclient.py:81
    DEBUG    Posting to https://192.168.0.217/stok=7083cd1ff1777b10ba9ec96bc682df38/ds                      httpclient.py:88
    DEBUG    192.168.0.217 multi-request-batch-1-of-2 << {'error_code': 0,                              smartprotocol.py:209
              'result': {'responses': [{'error_code': 0,
                                        'method': 'getSirenTypeList',
                                        'result': {'siren_type_list': ['Doorbell Ring 1',
                                                                       'Doorbell Ring 2',
                                                                       'Doorbell Ring 3',
                                                                       'Doorbell Ring 4',
                                                                       'Doorbell Ring 5',
                                                                       'Doorbell Ring 6',
                                                                       'Doorbell Ring 7',
                                                                       'Doorbell Ring 8',
                                                                       'Doorbell Ring 9',
                                                                       'Doorbell Ring 10',
                                                                       'Phone Ring',
                                                                       'Alarm 1',
                                                                       'Alarm 2',
                                                                       'Alarm 3',
                                                                       'Alarm 4',
                                                                       'Dripping Tap',
                                                                       'Alarm 5',
                                                                       'Connection 1',
                                                                       'Connection 2']}},
                                       {'error_code': 0,
                                        'method': 'getSirenStatus',
                                        'result': {'status': 'off', 'time_left': 0}},
                                       {'error_code': 0,
                                        'method': 'getSirenConfig',
                                        'result': {'duration': 10,
                                                   'siren_type': 'Doorbell Ring 1',
                                                   'volume': '10'}},
                                       {'error_code': 0,
                                        'method': 'getLedStatus',
                                        'result': {'led': {'config': {'.name': 'config',
                                                                      '.type': 'led',
                                                                      'enabled': 'on'}}}},
                                       {'error_code': 0,
                                        'method': 'getTimezone',
                                        'result': {'system': {'basic': {'timezone': 'UTC-05:00',
                                                                        'zone_id':
             'America/New_York'}}}}]}}
    DEBUG    192.168.0.217 multi-request-batch-2-of-2 >>                                                smartprotocol.py:197
             '{"method":"multipleRequest","request_time_milis":1733421819886,"terminal_uuid":"Gc5ncvpYd
             dlo8gruxjBaRA==","params":{"requests":[{"method":"getClockStatus","params":{"system":{"nam
             e":"clock_status"}}}]}}'
    DEBUG    Device 192.168.0.217 waiting 0.25 seconds to send request                                      httpclient.py:81
    DEBUG    Posting to https://192.168.0.217/stok=7083cd1ff1777b10ba9ec96bc682df38/ds                      httpclient.py:88
    DEBUG    192.168.0.217 multi-request-batch-2-of-2 << {'error_code': 0,                              smartprotocol.py:209
              'result': {'responses': [{'error_code': 0,
                                        'method': 'getClockStatus',
                                        'result': {'system': {'clock_status': {'local_time':
             '2024-12-05 '
                                                                                             '13:03:39'
             ,
                                                                               'seconds_from_1970':
             1733421819}}}}]}}
    Raised error: '8021BF05C952673A9B315FAE6E46C92621CA88C3'
    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:\Users\jp\AppData\Local\Programs\Python\Python312\Scripts\kasa.exe\__main__.py", line 7, in <module>
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\asyncclick\core.py", line 1205, in __call__
        return anyio.run(self._main, main, args, kwargs, **opts)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\anyio\_core\_eventloop.py", line 74, in run
        return async_backend.run(func, args, {}, backend_options)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\anyio\_backends\_asyncio.py", line 2347, in run
        return runner.run(wrapper())
               ^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 118, in run
        return self._loop.run_until_complete(task)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\anyio\_backends\_asyncio.py", line 2335, in wrapper
        return await func(*args)
               ^^^^^^^^^^^^^^^^^
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\asyncclick\core.py", line 1208, in _main
        return await main(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\asyncclick\core.py", line 1120, in main
        rv = await self.invoke(ctx)
             ^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\kasa\cli\common.py", line 239, in invoke
        _handle_exception(self._debug, exc)
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\kasa\cli\common.py", line 237, in invoke
        return await super().invoke(ctx)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\asyncclick\core.py", line 1717, in invoke
        rv = await super().invoke(ctx)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\asyncclick\core.py", line 1485, in invoke
        return await ctx.invoke(self.callback, **ctx.params)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\asyncclick\core.py", line 824, in invoke
        rv = await rv
             ^^^^^^^^
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\kasa\cli\main.py", line 363, in cli
        await dev.update()
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\kasa\smart\smartdevice.py", line 194, in update
        self._update_children_info()
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\kasa\smartcam\smartcamdevice.py", line 71, in _update_children_info
        self._children[info["device_id"]]._update_internal_state(info)
        ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
    KeyError: '8021BF05C952673A9B315FAE6E46C92621CA88C3'
    Exception ignored in: <function ClientSession.__del__ at 0x0000028BF497D260>
    Traceback (most recent call last):
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiohttp\client.py", line 370, in __del__
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 1838, in call_exception_handler
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\logging\__init__.py", line 1568, in error
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\logging\__init__.py", line 1684, in _log
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\logging\__init__.py", line 1700, in handle
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\logging\__init__.py", line 1762, in callHandlers
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\logging\__init__.py", line 1028, in handle
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\logging.py", line 168, in emit
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\logging.py", line 229, in render
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\_log_render.py", line 43, in __call__
    ImportError: sys.meta_path is None, Python is likely shutting down
    Exception ignored in: <function BaseConnector.__del__ at 0x0000028BF48EE200>
    Traceback (most recent call last):
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiohttp\connector.py", line 285, in __del__
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 1838, in call_exception_handler
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\logging\__init__.py", line 1568, in error
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\logging\__init__.py", line 1684, in _log
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\logging\__init__.py", line 1700, in handle
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\logging\__init__.py", line 1762, in callHandlers
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\logging\__init__.py", line 1028, in handle
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\logging.py", line 168, in emit
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\logging.py", line 229, in render
      File "C:\Users\jp\AppData\Local\Programs\Python\Python312\Lib\site-packages\rich\_log_render.py", line 43, in __call__
    ImportError: sys.meta_path is None, Python is likely shutting down
    
  4. rytilahti commented on Dec 5, 2024

    Member

    @somebody33427 yours is a different problem (Child device type not supported for SMART.IPCAMERA being the root cause), so please open a new issue to track that, thanks!

  5. jamesk34 commented on Dec 5, 2024

    Author

    Could you try the kasa cli tool from this repository (check the readme) and run it against your device with --debug flag and upload redacted output?

    Yes, will give this a try later and report back. Thanks

    Sorry, total newbie here. I searched for the kasa cli tool via the terminal on homeassisstant but couldn't find it. The TP link integration is installed but I don't see the cli tool in the directory.

  6. sdb9696 commented on Dec 5, 2024

    Contributor

    So the kasa tool is part of an external library that the integration uses. It’s useful to run it from a different pc. The easiest way for newbies is to install uv on windows or Linux. Then run uvx —from python-kasa kasa —username <your TPLink username> —password <your tplink password>

    We can give you other commands to run depending on the output of that.

  7. jamesk34 commented on Dec 5, 2024

    Author

    So the kasa tool is part of an external library that the integration uses. It’s useful to run it from a different pc. The easiest way for newbies is to install uv on windows or Linux. Then run uvx --from python-kasa kasa --username <username> --password <pass>

    We can give you other commands to run depending on the output of that.

    Apologies, but i get "Error: No such command '—username'" I had to put double hyphen in front of from as I got ["](error: invalid value 'rom' for '--find-links <FIND_LINKS>': relative URL without a base)". When i put a double hyphen in front of username i get the error "Error: No such command '—username'.

  8. sdb9696 commented on Dec 6, 2024

    Contributor

    I think something autocorrected the command. I have edited it and should work now.

  9. jamesk34 commented on Dec 6, 2024

    Author

    uvx --from python-kasa kasa --username --password

    here is the output from the command:

    PS C:\Users\jjake> uvx --from python-kasa kasa --host 192.168.68.132 --debug --username **** --password ***
    DEBUG:kasa.discover:[DISCOVERY] 192.168.68.132 >> {'system': {'get_sysinfo': {}}}
    DEBUG:kasa.discover:Waiting a total of 10 seconds for responses...
    DEBUG:kasa.transports.sslaestransport:Created AES transport for 192.168.68.132
    DEBUG:kasa.discover:[DISCOVERY] 192.168.68.132 << {'error_code': 0,
    'result': {'device_id': 'REDACTED_903C76090354DE0A9398149',
    'device_model': 'H200',
    'device_name': 'Tapo_Hub_E834',
    'device_type': 'SMART.TAPOHUB',
    'encrypt_info': {'data': 'JnQE4HPv/vlyx7qw4/IGT+y6EFOfGm32Zg3bSNiPIBC2hTBIKsSkxru2ikGwkeOKVLn2hvVC8/z6C/Q4nBS9/rDzbfHtktg/DgfMEt4l0oj5PP0WmrDQdIAYcVmgU7U75D9R7j9iVL+4M3TYe1yjoUUY26NAh+8Wjv31A3XgcQDQ3l5KnqiQmce/ktvr21PGVNoI7nLLTcoR/Z+NB2G/K3MZOe3kep3DsthaKY4ScFN0Ra/VndI0aT5R5RhOG291wPmC3fPCLvjZJ0m3bHhIhA==',
    'key': 'Zb9q0zsTsWMuNrwx6rQs8wZkh47ZyPyKFCoAmA9W6Jx5xlJpqBBiajpJLpr9XvX4Zvx/lBqQ1OlQk6Y/yQy3lOTK44r8O5K3eDXRuTn8A6pFUM/4X2bBMFmGJ6UOk6ddLjzaqfGnwPQTvTrVM2cUszWfTTZw0iMok1ylqiL1Q15JAYTy1akHxhPGIIA8g4YzGROJin3Dwb8hh3FCDef2V8ITD9/VldLx24dvOMLO8U8hswvDjXqrUHKVsV9Gq9CqAZHhEqZfy+Wzrxcf1tFLLKrRNd8pHDusrRnlxejlcg3QauIV7jLbvGfuo7gR30OlIUdfxHxiCPvzXgsoeCdDsw==',
    'sym_schm': 'AES'},
    'encrypt_type': ['3'],
    'factory_default': False,
    'firmware_version': '1.3.6 Build 20240829 rel.71119',
    'hardware_version': '1.0',
    'ip': '192.168.68.132',
    'isResetWiFi': False,
    'is_support_iot_cloud': True,
    'mac': '24-2F-D0-00-00-00',
    'mgt_encrypt_schm': {'is_support_https': True}}}
    DEBUG:kasa.device:Initializing 192.168.68.132 of type <class 'kasa.smartcam.smartcamdevice.SmartCamDevice'>
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-1-of-1 >> '{"method":"multipleRequest","request_time_milis":1733483405567,"terminal_uuid":"s37Lzp9ciuvSWLnaYQqkPw==","params":{"requests":[{"method":"getDeviceInfo","params":{"device_info":{"name":["basic_info","info"]}}},{"method":"getAppComponentList","params":{"app_component":{"name":"app_component_list"}}}]}}'
    DEBUG:kasa.transports.sslaestransport:Will to send handshake1...
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132
    DEBUG:kasa.transports.sslaestransport:Device responded with: {'error_code': -40401, 'result': {'data': {'code': -60502}}}
    DEBUG:kasa.transports.sslaestransport:Will to send handshake1...
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132
    DEBUG:kasa.httpclient:Device 192.168.68.132 received an os error, enabling sequential request delay: Server disconnected
    DEBUG:kasa.protocols.smartprotocol:Device 192.168.68.132 got a connection error, will retry 3 times: ('Device connection error: 192.168.68.132: Server disconnected', ServerDisconnectedError('Server disconnected'))
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-1-of-1 >> '{"method":"multipleRequest","request_time_milis":1733483409097,"terminal_uuid":"s37Lzp9ciuvSWLnaYQqkPw==","params":{"requests":[{"method":"getDeviceInfo","params":{"device_info":{"name":["basic_info","info"]}}},{"method":"getAppComponentList","params":{"app_component":{"name":"app_component_list"}}}]}}'
    DEBUG:kasa.transports.sslaestransport:Will to send handshake1...
    DEBUG:kasa.httpclient:Device 192.168.68.132 waiting 0.24867790000280365 seconds to send request
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132
    DEBUG:kasa.transports.sslaestransport:Device responded with: {'error_code': -40401, 'result': {'data': {'code': -60502}}}
    DEBUG:kasa.transports.sslaestransport:Will to send handshake1...
    DEBUG:kasa.httpclient:Device 192.168.68.132 waiting 0.2492283999963547 seconds to send request
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132
    DEBUG:kasa.transports.sslaestransport:Device responded with: {'error_code': -40413, 'result': {'data': {'code': -40401, 'encrypt_type': ['3'], 'key': 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCoVBwJv2pBtrr9ZY9C4lgqNo5+dFI+3A6W80h+8CzpCxsgl8Dic7JYmcTfOrtYtYJ6Vma3ZWx+NK1bJk8DFipOnDewVVJ6wmucnryF3OlfcIjLZsYjh4Sq2mdZfg0lOThTvh8z4V2jO6fWh91iwOOeCokGoMw9V+QyQevtCr5pSQIDAQAB', 'nonce': 'B44F3B061BF23EB0', 'device_confirm': '1E0F5FCA9A50922E1955DFEAECE8B532589187981154775218AC9BFAF281874AB44F3B061BF23EB06289CB7173FCF22F'}}}
    DEBUG:kasa.transports.sslaestransport:Connected to {self._host} with default username
    DEBUG:kasa.transports.sslaestransport:Credentials match
    DEBUG:kasa.transports.sslaestransport:Performing handshake2 ...
    DEBUG:kasa.httpclient:Device 192.168.68.132 waiting 0.24880790000315756 seconds to send request
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132
    DEBUG:kasa.transports.sslaestransport:Handshake2 complete ...
    DEBUG:kasa.httpclient:Device 192.168.68.132 waiting 0.24871780000103172 seconds to send request
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132/stok=8642b49c7db2c31032af2e92e58c3c87/ds
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-1-of-1 << {'error_code': 0,
    'result': {'responses': [{'error_code': 0,
    'method': 'getAppComponentList',
    'result': {'app_component': {'app_component_list': [{'name': 'sdCard',
    'version': 2},
    {'name': 'dateTime',
    'version': 1},
    {'name': 'system',
    'version': 4},
    {'name': 'led',
    'version': 1},
    {'name': 'firmware',
    'version': 2},
    {'name': 'account',
    'version': 1},
    {'name': 'quickSetup',
    'version': 1},
    {'name': 'hubRecord',
    'version': 1},
    {'name': 'deviceShare',
    'version': 1},
    {'name': 'siren',
    'version': 2},
    {'name': 'childControl',
    'version': 1},
    {'name': 'childQuickSetup',
    'version': 1},
    {'name': 'childInherit',
    'version': 1},
    {'name': 'deviceLoad',
    'version': 1},
    {'name': 'subg',
    'version': 2},
    {'name': 'iotCloud',
    'version': 1},
    {'name': 'diagnose',
    'version': 1},
    {'name': 'preWakeUp',
    'version': 1},
    {'name': 'supportRE',
    'version': 1},
    {'name': 'testSignal',
    'version': 1},
    {'name': 'dataDownload',
    'version': 1},
    {'name': 'testChildSignal',
    'version': 1},
    {'name': 'ringLog',
    'version': 1},
    {'name': 'matter',
    'version': 1},
    {'name': 'localSmart',
    'version': 1},
    {'name': 'generalCameraManage',
    'version': 1},
    {'name': 'playback',
    'version': 6},
    {'name': 'hubPlayback',
    'version': 1}]}}},
    {'error_code': 0,
    'method': 'getDeviceInfo',
    'result': {'device_info': {'basic_info': {'avatar': 'hub_h200',
    'bind_status': True,
    'child_num': 1,
    'dev_id': '802DCF9FA82465D1AA8DBEE6EA09074A22513634',
    'device_alias': 'Tapo_Hub_E834',
    'device_info': 'H200 '
    '1.0',
    'device_model': 'H200',
    'device_name': 'H200 '
    '1.0',
    'device_type': 'SMART.TAPOHUB',
    'has_set_location_info': 1,
    'hw_id': '99A36151C79A3A5D72823C98BC0FDA5F',
    'hw_version': '1.0',
    'latitude': 0,
    'local_ip': '192.168.68.132',
    'longitude': 0,
    'mac': '24-2F-D0-00-00-00',
    'need_sync_sha1_password': 0,
    'oem_id': 'REDACTED_35D9F82C31FC30217AA348D',
    'product_name': 'Tapo '
    'Smart '
    'Hub',
    'region': 'EU',
    'status': 'configured',
    'sw_version': '1.3.6 '
    'Build '
    '20240829 '
    'rel.71119'},
    'info': {'avatar': 'hub_h200',
    'bind_status': True,
    'child_num': 1,
    'dev_id': '802DCF9FA82465D1AA8DBEE6EA09074A22513634',
    'device_alias': 'Tapo_Hub_E834',
    'device_info': 'H200 '
    '1.0',
    'device_model': 'H200',
    'device_name': 'H200 '
    '1.0',
    'device_type': 'SMART.TAPOHUB',
    'has_set_location_info': 1,
    'hw_id': '99A36151C79A3A5D72823C98BC0FDA5F',
    'hw_version': '1.0',
    'latitude': 0,
    'local_ip': '192.168.68.132',
    'longitude': 0,
    'mac': '24-2F-D0-00-00-00',
    'need_sync_sha1_password': 0,
    'oem_id': 'REDACTED_35D9F82C31FC30217AA348D',
    'product_name': 'Tapo '
    'Smart '
    'Hub',
    'region': 'EU',
    'status': 'configured',
    'sw_version': '1.3.6 '
    'Build '
    '20240829 '
    'rel.71119'}}}}]}}
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-1-of-1 >> '{"method":"multipleRequest","request_time_milis":1733483411478,"terminal_uuid":"s37Lzp9ciuvSWLnaYQqkPw==","params":{"requests":[{"method":"getChildDeviceList","params":{"childControl":{"start_index":0}}},{"method":"getChildDeviceComponentList","params":{"childControl":{"start_index":0}}}]}}'
    DEBUG:kasa.httpclient:Device 192.168.68.132 waiting 0.2341039000020828 seconds to send request
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132/stok=8642b49c7db2c31032af2e92e58c3c87/ds
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-1-of-1 << {'error_code': 0,
    'result': {'responses': [{'error_code': 0,
    'method': 'getChildDeviceList',
    'result': {'child_device_list': [{'alias': 'Tapo_Doorbell_front',
    'anti_theft_status': 0,
    'avatar': 'Home',
    'battery_charging': 'NO',
    'battery_installed': 1,
    'battery_percent': 43,
    'battery_temperature': 5,
    'battery_voltage': 3627,
    'cam_uptime': 52672,
    'category': 'camera',
    'dev_name': 'Tapo '
    'Smart '
    'Doorbell',
    'device_id': 'REDACTED_DE05B9F12513E6B68B6B217223C343F',
    'device_model': 'D230',
    'device_name': 'D230 '
    '1.0',
    'device_type': 'SMART.IPCAMERA',
    'ext_addr': '74FECE7254A90000',
    'firmware_status': 'OK',
    'hw_id': 'FA0B0A09DE3399EB4F20616A92FA7A18',
    'hw_ver': '1.0',
    'ipaddr': '172.23.30.2',
    'led_status': 'off',
    'low_battery': False,
    'mac': '74:FE:CE:00:00:00',
    'oem_id': 'REDACTED_2058DA42D6752DA96D088F6',
    'onboarding_timestamp': 1717701451,
    'online': True,
    'parent_device_id': 'REDACTED_82465D1AA8DBEE6EA09074A22513634',
    'power': 'BATTERY',
    'power_save_mode': 'on',
    'power_save_status': 'on',
    'region': 'EU',
    'rssi': -39,
    'short_addr': 0,
    'status': 'configured',
    'subg_cam_rssi': 0,
    'subg_hub_rssi': 0,
    'sw_ver': '1.1.17 '
    'Build '
    '20240731 '
    'rel.53511',
    'system_time': 1733483411,
    'updating': False,
    'uptime': 775578}],
    'start_index': 0,
    'sum': 1}},
    {'error_code': 0,
    'method': 'getChildDeviceComponentList',
    'result': {'child_component_list': [{'component_list': [{'name': 'sdCard',
    'version': 2},
    {'name': 'timezone',
    'version': 1},
    {'name': 'batCamSystem',
    'version': 1},
    {'name': 'led',
    'version': 1},
    {'name': 'playback',
    'version': 3},
    {'name': 'detection',
    'version': 3},
    {'name': 'firmware',
    'version': 1},
    {'name': 'video',
    'version': 3},
    {'name': 'lensMask',
    'version': 2},
    {'name': 'lightFrequency',
    'version': 2},
    {'name': 'dayNightMode',
    'version': 2},
    {'name': 'nightVisionMode',
    'version': 3},
    {'name': 'batCamOsd',
    'version': 1},
    {'name': 'record',
    'version': 1},
    {'name': 'audio',
    'version': 3},
    {'name': 'personDetection',
    'version': 2},
    {'name': 'vehicleDetection',
    'version': 1},
    {'name': 'petDetection',
    'version': 1},
    {'name': 'msgPush',
    'version': 3},
    {'name': 'deviceShare',
    'version': 1},
    {'name': 'tapoCare',
    'version': 1},
    {'name': 'pir',
    'version': 1},
    {'name': 'battery',
    'version': 3},
    {'name': 'clips',
    'version': 1},
    {'name': 'batCamRelay',
    'version': 1},
    {'name': 'batCamP2p',
    'version': 1},
    {'name': 'needSubscriptionServiceList',
    'version': 1},
    {'name': 'iotCloud',
    'version': 1},
    {'name': 'blockZone',
    'version': 1},
    {'name': 'whiteLamp',
    'version': 1},
    {'name': 'infLamp',
    'version': 1},
    {'name': 'packageDetection',
    'version': 3},
    {'name': 'wakeUp',
    'version': 1},
    {'name': 'ring',
    'version': 1},
    {'name': 'antiTheft',
    'version': 3},
    {'name': 'quickResponse',
    'version': 2},
    {'name': 'doorbellNightVision',
    'version': 1},
    {'name': 'dataDownload',
    'version': 1},
    {'name': 'detectionRegion',
    'version': 2},
    {'name': 'streamGrab',
    'version': 1},
    {'name': 'recordDownload',
    'version': 1},
    {'name': 'batCamPreRelay',
    'version': 1},
    {'name': 'batCamStatistics',
    'version': 1},
    {'name': 'batCamNodeRelay',
    'version': 1},
    {'name': 'batCamRtsp',
    'version': 2}],
    'device_id': 'REDACTED_DE05B9F12513E6B68B6B217223C343F'}],
    'start_index': 0,
    'sum': 1}}]}}
    DEBUG:kasa.smartcam.smartcamdevice:Child device type not supported: {'device_id': '8021ACC24DE05B9F12513E6B68B6B217223C343F', 'parent_device_id': '802DCF9FA82465D1AA8DBEE6EA09074A22513634', 'device_model': 'D230', 'device_name': 'D230 1.0', 'alias': 'Tapo_Doorbell_front', 'avatar': 'Home', 'sw_ver': '1.1.17 Build 20240731 rel.53511', 'hw_ver': '1.0', 'mac': '74:FE:CE:72:54:A9', 'device_type': 'SMART.IPCAMERA', 'category': 'camera', 'hw_id': 'FA0B0A09DE3399EB4F20616A92FA7A18', 'oem_id': 'CC76064AF2058DA42D6752DA96D088F6', 'system_time': 1733483411, 'led_status': 'off', 'updating': False, 'online': True, 'firmware_status': 'OK', 'power': 'BATTERY', 'battery_percent': 43, 'battery_charging': 'NO', 'rssi': -39, 'dev_name': 'Tapo Smart Doorbell', 'ipaddr': '172.23.30.2', 'short_addr': 0, 'ext_addr': '74FECE7254A90000', 'status': 'configured', 'onboarding_timestamp': 1717701451, 'battery_voltage': 3627, 'battery_temperature': 5, 'battery_installed': 1, 'low_battery': False, 'power_save_mode': 'on', 'power_save_status': 'on', 'uptime': 775578, 'cam_uptime': 52672, 'subg_cam_rssi': 0, 'subg_hub_rssi': 0, 'region': 'EU', 'anti_theft_status': 0}
    DEBUG:kasa.smart.smartdevice:Querying 192.168.68.132 for modules: SmartCamAlarm, Led, Time
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-1-of-2 >> '{"method":"multipleRequest","request_time_milis":1733483411816,"terminal_uuid":"s37Lzp9ciuvSWLnaYQqkPw==","params":{"requests":[{"method":"getSirenStatus","params":{"siren":{}}},{"method":"getSirenConfig","params":{"siren":{}}},{"method":"getSirenTypeList","params":{"siren":{}}},{"method":"getLedStatus","params":{"led":{"name":"config"}}},{"method":"getTimezone","params":{"system":{"name":"basic"}}}]}}'
    DEBUG:kasa.httpclient:Device 192.168.68.132 waiting 0.23467629999504425 seconds to send request
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132/stok=8642b49c7db2c31032af2e92e58c3c87/ds
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-1-of-2 << {'error_code': 0,
    'result': {'responses': [{'error_code': 0,
    'method': 'getSirenTypeList',
    'result': {'siren_type_list': ['Doorbell Ring 1',
    'Doorbell Ring 2',
    'Doorbell Ring 3',
    'Doorbell Ring 4',
    'Doorbell Ring 5',
    'Doorbell Ring 6',
    'Doorbell Ring 7',
    'Doorbell Ring 8',
    'Doorbell Ring 9',
    'Doorbell Ring 10',
    'Phone Ring',
    'Alarm 1',
    'Alarm 2',
    'Alarm 3',
    'Alarm 4',
    'Dripping Tap',
    'Alarm 5',
    'Connection 1',
    'Connection 2']}},
    {'error_code': 0,
    'method': 'getSirenConfig',
    'result': {'duration': 300,
    'siren_type': 'Doorbell Ring 3',
    'volume': '9'}},
    {'error_code': 0,
    'method': 'getLedStatus',
    'result': {'led': {'config': {'.name': 'config',
    '.type': 'led',
    'enabled': 'on'}}}},
    {'error_code': 0,
    'method': 'getSirenStatus',
    'result': {'status': 'off', 'time_left': 0}},
    {'error_code': 0,
    'method': 'getTimezone',
    'result': {'system': {'basic': {'timezone': 'UTC+00:00',
    'zone_id': 'Europe/London'}}}}]}}
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-2-of-2 >> '{"method":"multipleRequest","request_time_milis":1733483412167,"terminal_uuid":"s37Lzp9ciuvSWLnaYQqkPw==","params":{"requests":[{"method":"getClockStatus","params":{"system":{"name":"clock_status"}}}]}}'
    DEBUG:kasa.httpclient:Device 192.168.68.132 waiting 0.2438724000021466 seconds to send request
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132/stok=8642b49c7db2c31032af2e92e58c3c87/ds
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-2-of-2 << {'error_code': 0,
    'result': {'responses': [{'error_code': 0,
    'method': 'getClockStatus',
    'result': {'system': {'clock_status': {'local_time': '2024-12-06 '
    '11:10:12',
    'seconds_from_1970': 1733483412}}}}]}}
    Traceback (most recent call last):
    File "", line 198, in _run_module_as_main
    File "", line 88, in run_code
    File "C:\Users\jjake\AppData\Local\uv\cache\archive-v0\nmpPVohCVcTuU8VC9rN1X\Scripts\kasa.exe_main
    .py", line 8, in

    sys.exit(cli())
    ~~~^^
    File "C:\Users\jjake\AppData\Local\uv\cache\archive-v0\nmpPVohCVcTuU8VC9rN1X\Lib\site-packages\asyncclick\core.py", line 1205, in call
    return anyio.run(self._main, main, args, kwargs, **opts)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\jjake\AppData\Local\uv\cache\archive-v0\nmpPVohCVcTuU8VC9rN1X\Lib\site-packages\anyio_core_eventloop.py", line 74, in run
    return async_backend.run(func, args, {}, backend_options)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\jjake\AppData\Local\uv\cache\archive-v0\nmpPVohCVcTuU8VC9rN1X\Lib\site-packages\anyio_backends_asyncio.py", line 2347, in run
    return runner.run(wrapper())
    ~~~~~~~~~~^^^^^^^^^^^
    File "C:\Users\jjake\AppData\Roaming\uv\python\cpython-3.13.0-windows-x86_64-none\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
    File "C:\Users\jjake\AppData\Roaming\uv\python\cpython-3.13.0-windows-x86_64-none\Lib\asyncio\base_events.py", line 721, in run_until_complete
    return future.result()
    ~~~~~~~~~~~~~^^
    File "C:\Users\jjake\AppData\Local\uv\cache\archive-v0\nmpPVohCVcTuU8VC9rN1X\Lib\site-packages\anyio_backends_asyncio.py", line 2335, in wrapper
    return await func(*args)
    ^^^^^^^^^^^^^^^^^
    File "C:\Users\jjake\AppData\Local\uv\cache\archive-v0\nmpPVohCVcTuU8VC9rN1X\Lib\site-packages\asyncclick\core.py", line 1208, in _main
    return await main(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\jjake\AppData\Local\uv\cache\archive-v0\nmpPVohCVcTuU8VC9rN1X\Lib\site-packages\asyncclick\core.py", line 1120, in main
    rv = await self.invoke(ctx)
    ^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\jjake\AppData\Local\uv\cache\archive-v0\nmpPVohCVcTuU8VC9rN1X\Lib\site-packages\kasa\cli\common.py", line 239, in invoke
    _handle_exception(self._debug, exc)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
    File "C:\Users\jjake\AppData\Local\uv\cache\archive-v0\nmpPVohCVcTuU8VC9rN1X\Lib\site-packages\kasa\cli\common.py", line 237, in invoke
    return await super().invoke(ctx)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\jjake\AppData\Local\uv\cache\archive-v0\nmpPVohCVcTuU8VC9rN1X\Lib\site-packages\asyncclick\core.py", line 1717, in invoke
    rv = await super().invoke(ctx)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\jjake\AppData\Local\uv\cache\archive-v0\nmpPVohCVcTuU8VC9rN1X\Lib\site-packages\asyncclick\core.py", line 1485, in invoke
    return await ctx.invoke(self.callback, **ctx.params)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\jjake\AppData\Local\uv\cache\archive-v0\nmpPVohCVcTuU8VC9rN1X\Lib\site-packages\asyncclick\core.py", line 824, in invoke
    rv = await rv
    ^^^^^^^^
    File "C:\Users\jjake\AppData\Local\uv\cache\archive-v0\nmpPVohCVcTuU8VC9rN1X\Lib\site-packages\kasa\cli\main.py", line
    363, in cli
    await dev.update()
    File "C:\Users\jjake\AppData\Local\uv\cache\archive-v0\nmpPVohCVcTuU8VC9rN1X\Lib\site-packages\kasa\smart\smartdevice.py", line 194, in update
    self._update_children_info()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
    File "C:\Users\jjake\AppData\Local\uv\cache\archive-v0\nmpPVohCVcTuU8VC9rN1X\Lib\site-packages\kasa\smartcam\smartcamdevice.py", line 71, in _update_children_info
    self._children[info["device_id"]]._update_internal_state(info)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
    KeyError: '8021ACC24DE05B9F12513E6B68B6B217223C343F'
    ERROR:asyncio:Unclosed client session
    client_session: <aiohttp.client.ClientSession object at 0x0000020A366363C0>
    ERROR:asyncio:Unclosed connector
    connections: ['deque([(<aiohttp.client_proto.ResponseHandler object at 0x0000020A3661A3F0>, 54421.8113059)])']
    connector: <aiohttp.connector.TCPConnector object at 0x0000020A36636510>

  10. sdb9696 commented on Dec 6, 2024

    Contributor

    This should be fixed in the latest library version 0.8.1 which has just been released. Could you try running the same command again?

  11. jamesk34 commented on Dec 6, 2024

    Author

    This should be fixed in the latest library version 0.8.1 which has just been released. Could you try running the same command again?

    PS C:\Users\jjake> uvx --from python-kasa kasa --host 192.168.68.132 --username * --password * --debug
    Installed 20 packages in 308ms
    Discovering device 192.168.68.132 for 10 seconds
    DEBUG:kasa.discover:[DISCOVERY] 192.168.68.132 >> {'system': {'get_sysinfo': {}}}
    DEBUG:kasa.discover:Waiting a total of 10 seconds for responses...
    DEBUG:kasa.transports.sslaestransport:Created AES transport for 192.168.68.132
    DEBUG:kasa.discover:[DISCOVERY] 192.168.68.132 << {'error_code': 0,
    'result': {'device_id': 'REDACTED_903C76090354DE0A9398149',
    'device_model': 'H200',
    'device_name': 'Tapo_Hub_E834',
    'device_type': 'SMART.TAPOHUB',
    'encrypt_info': {'data': 'JnQE4HPv/vlyx7qw4/IGT+y6EFOfGm32Zg3bSNiPIBC2hTBIKsSkxru2ikGwkeOKVLn2hvVC8/z6C/Q4nBS9/rDzbfHtktg/DgfMEt4l0oj5PP0WmrDQdIAYcVmgU7U75D9R7j9iVL+4M3TYe1yjoUUY26NAh+8Wjv31A3XgcQDQ3l5KnqiQmce/ktvr21PGVNoI7nLLTcoR/Z+NB2G/K3MZOe3kep3DsthaKY4ScFN0Ra/VndI0aT5R5RhOG291wPmC3fPCLvjZJ0m3bHhIhA==',
    'key': 'DaZb3ApfTIxYo4mDmPfeFwNWHow517/onHmK3XGNwEjeM1beHITbG/36GuSSEWgP/GVhdHx7r+40JsoNG2OTG0KucO7vv1sg5cRWd7qS9qkD9yIExRlvGDPLsWsQ+NbYbqhjWWCbT1RKmqSdI7xxTW8TMWa1gG8FeEKWqod9/gJJAcqWw5U90ntnKjXjNKDtRZazMNftK34GQuk8mrfZ/xtYJrA2fvkcu9r/KsUjCdfG+eNJ7HkU9ZHYeoEqIkVZR9iA6IxV2UVYUQYYAntApAOPKZNyCbNLI2eCp50ajhNtd/rjd8Irosm4HhL3lu78smrqlxytEWHiHMTfYFRLog==',
    'sym_schm': 'AES'},
    'encrypt_type': ['3'],
    'factory_default': False,
    'firmware_version': '1.3.6 Build 20240829 rel.71119',
    'hardware_version': '1.0',
    'ip': '192.168.68.132',
    'isResetWiFi': False,
    'is_support_iot_cloud': True,
    'mac': '24-2F-D0-00-00-00',
    'mgt_encrypt_schm': {'is_support_https': True}}}
    DEBUG:kasa.device:Initializing 192.168.68.132 of type <class 'kasa.smartcam.smartcamdevice.SmartCamDevice'>
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-1-of-1 >> '{"method":"multipleRequest","request_time_milis":1733492757057,"terminal_uuid":"0I6SxlbpXwLqrOcE9zlnEg==","params":{"requests":[{"method":"getDeviceInfo","params":{"device_info":{"name":["basic_info","info"]}}},{"method":"getAppComponentList","params":{"app_component":{"name":"app_component_list"}}}]}}'
    DEBUG:kasa.transports.sslaestransport:Will to send handshake1...
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132
    DEBUG:kasa.transports.sslaestransport:Device responded with: {'error_code': -40401, 'result': {'data': {'code': -60502}}}
    DEBUG:kasa.transports.sslaestransport:Will to send handshake1...
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132
    DEBUG:kasa.httpclient:Device 192.168.68.132 received an os error, enabling sequential request delay: Server disconnected
    DEBUG:kasa.protocols.smartprotocol:Device 192.168.68.132 got a connection error, will retry 3 times: ('Device connection error: 192.168.68.132: Server disconnected', ServerDisconnectedError('Server disconnected'))
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-1-of-1 >> '{"method":"multipleRequest","request_time_milis":1733492757331,"terminal_uuid":"0I6SxlbpXwLqrOcE9zlnEg==","params":{"requests":[{"method":"getDeviceInfo","params":{"device_info":{"name":["basic_info","info"]}}},{"method":"getAppComponentList","params":{"app_component":{"name":"app_component_list"}}}]}}'
    DEBUG:kasa.transports.sslaestransport:Will to send handshake1...
    DEBUG:kasa.httpclient:Device 192.168.68.132 waiting 0.2495654999947874 seconds to send request
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132
    DEBUG:kasa.transports.sslaestransport:Device responded with: {'error_code': -40401, 'result': {'data': {'code': -60502}}}
    DEBUG:kasa.transports.sslaestransport:Will to send handshake1...
    DEBUG:kasa.httpclient:Device 192.168.68.132 waiting 0.24825109999801498 seconds to send request
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132
    DEBUG:kasa.transports.sslaestransport:Device responded with: {'error_code': -40413, 'result': {'data': {'code': -40401, 'encrypt_type': ['3'], 'key': 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCoVBwJv2pBtrr9ZY9C4lgqNo5+dFI+3A6W80h+8CzpCxsgl8Dic7JYmcTfOrtYtYJ6Vma3ZWx+NK1bJk8DFipOnDewVVJ6wmucnryF3OlfcIjLZsYjh4Sq2mdZfg0lOThTvh8z4V2jO6fWh91iwOOeCokGoMw9V+QyQevtCr5pSQIDAQAB', 'nonce': 'F19CD4889891C3EF', 'device_confirm': '75A79860262D5FF50DFFE574A8144EDC05DEC635326F4764D171351D11634BDDF19CD4889891C3EF8683DA37FE61B78B'}}}
    DEBUG:kasa.transports.sslaestransport:Connected to {self._host} with default username
    DEBUG:kasa.transports.sslaestransport:Credentials match
    DEBUG:kasa.transports.sslaestransport:Performing handshake2 ...
    DEBUG:kasa.httpclient:Device 192.168.68.132 waiting 0.24633429999812506 seconds to send request
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132
    DEBUG:kasa.transports.sslaestransport:Handshake2 complete ...
    DEBUG:kasa.httpclient:Device 192.168.68.132 waiting 0.24941859999671578 seconds to send request
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132/stok=7319d78a3a9280070b27c82244e428f3/ds
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-1-of-1 << {'error_code': 0,
    'result': {'responses': [{'error_code': 0,
    'method': 'getAppComponentList',
    'result': {'app_component': {'app_component_list': [{'name': 'sdCard',
    'version': 2},
    {'name': 'dateTime',
    'version': 1},
    {'name': 'system',
    'version': 4},
    {'name': 'led',
    'version': 1},
    {'name': 'firmware',
    'version': 2},
    {'name': 'account',
    'version': 1},
    {'name': 'quickSetup',
    'version': 1},
    {'name': 'hubRecord',
    'version': 1},
    {'name': 'deviceShare',
    'version': 1},
    {'name': 'siren',
    'version': 2},
    {'name': 'childControl',
    'version': 1},
    {'name': 'childQuickSetup',
    'version': 1},
    {'name': 'childInherit',
    'version': 1},
    {'name': 'deviceLoad',
    'version': 1},
    {'name': 'subg',
    'version': 2},
    {'name': 'iotCloud',
    'version': 1},
    {'name': 'diagnose',
    'version': 1},
    {'name': 'preWakeUp',
    'version': 1},
    {'name': 'supportRE',
    'version': 1},
    {'name': 'testSignal',
    'version': 1},
    {'name': 'dataDownload',
    'version': 1},
    {'name': 'testChildSignal',
    'version': 1},
    {'name': 'ringLog',
    'version': 1},
    {'name': 'matter',
    'version': 1},
    {'name': 'localSmart',
    'version': 1},
    {'name': 'generalCameraManage',
    'version': 1},
    {'name': 'playback',
    'version': 6},
    {'name': 'hubPlayback',
    'version': 1}]}}},
    {'error_code': 0,
    'method': 'getDeviceInfo',
    'result': {'device_info': {'basic_info': {'avatar': 'hub_h200',
    'bind_status': True,
    'child_num': 1,
    'dev_id': '802DCF9FA82465D1AA8DBEE6EA09074A22513634',
    'device_alias': 'Tapo_Hub_E834',
    'device_info': 'H200 '
    '1.0',
    'device_model': 'H200',
    'device_name': 'H200 '
    '1.0',
    'device_type': 'SMART.TAPOHUB',
    'has_set_location_info': 1,
    'hw_id': '99A36151C79A3A5D72823C98BC0FDA5F',
    'hw_version': '1.0',
    'latitude': 0,
    'local_ip': '192.168.68.132',
    'longitude': 0,
    'mac': '24-2F-D0-00-00-00',
    'need_sync_sha1_password': 0,
    'oem_id': 'REDACTED_35D9F82C31FC30217AA348D',
    'product_name': 'Tapo '
    'Smart '
    'Hub',
    'region': 'EU',
    'status': 'configured',
    'sw_version': '1.3.6 '
    'Build '
    '20240829 '
    'rel.71119'},
    'info': {'avatar': 'hub_h200',
    'bind_status': True,
    'child_num': 1,
    'dev_id': '802DCF9FA82465D1AA8DBEE6EA09074A22513634',
    'device_alias': 'Tapo_Hub_E834',
    'device_info': 'H200 '
    '1.0',
    'device_model': 'H200',
    'device_name': 'H200 '
    '1.0',
    'device_type': 'SMART.TAPOHUB',
    'has_set_location_info': 1,
    'hw_id': '99A36151C79A3A5D72823C98BC0FDA5F',
    'hw_version': '1.0',
    'latitude': 0,
    'local_ip': '192.168.68.132',
    'longitude': 0,
    'mac': '24-2F-D0-00-00-00',
    'need_sync_sha1_password': 0,
    'oem_id': 'REDACTED_35D9F82C31FC30217AA348D',
    'product_name': 'Tapo '
    'Smart '
    'Hub',
    'region': 'EU',
    'status': 'configured',
    'sw_version': '1.3.6 '
    'Build '
    '20240829 '
    'rel.71119'}}}}]}}
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-1-of-1 >> '{"method":"multipleRequest","request_time_milis":1733492759415,"terminal_uuid":"0I6SxlbpXwLqrOcE9zlnEg==","params":{"requests":[{"method":"getChildDeviceList","params":{"childControl":{"start_index":0}}},{"method":"getChildDeviceComponentList","params":{"childControl":{"start_index":0}}}]}}'
    DEBUG:kasa.httpclient:Device 192.168.68.132 waiting 0.2437056000053417 seconds to send request
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132/stok=7319d78a3a9280070b27c82244e428f3/ds
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-1-of-1 << {'error_code': 0,
    'result': {'responses': [{'error_code': 0,
    'method': 'getChildDeviceComponentList',
    'result': {'child_component_list': [{'component_list': [{'name': 'sdCard',
    'version': 2},
    {'name': 'timezone',
    'version': 1},
    {'name': 'batCamSystem',
    'version': 1},
    {'name': 'led',
    'version': 1},
    {'name': 'playback',
    'version': 3},
    {'name': 'detection',
    'version': 3},
    {'name': 'firmware',
    'version': 1},
    {'name': 'video',
    'version': 3},
    {'name': 'lensMask',
    'version': 2},
    {'name': 'lightFrequency',
    'version': 2},
    {'name': 'dayNightMode',
    'version': 2},
    {'name': 'nightVisionMode',
    'version': 3},
    {'name': 'batCamOsd',
    'version': 1},
    {'name': 'record',
    'version': 1},
    {'name': 'audio',
    'version': 3},
    {'name': 'personDetection',
    'version': 2},
    {'name': 'vehicleDetection',
    'version': 1},
    {'name': 'petDetection',
    'version': 1},
    {'name': 'msgPush',
    'version': 3},
    {'name': 'deviceShare',
    'version': 1},
    {'name': 'tapoCare',
    'version': 1},
    {'name': 'pir',
    'version': 1},
    {'name': 'battery',
    'version': 3},
    {'name': 'clips',
    'version': 1},
    {'name': 'batCamRelay',
    'version': 1},
    {'name': 'batCamP2p',
    'version': 1},
    {'name': 'needSubscriptionServiceList',
    'version': 1},
    {'name': 'iotCloud',
    'version': 1},
    {'name': 'blockZone',
    'version': 1},
    {'name': 'whiteLamp',
    'version': 1},
    {'name': 'infLamp',
    'version': 1},
    {'name': 'packageDetection',
    'version': 3},
    {'name': 'wakeUp',
    'version': 1},
    {'name': 'ring',
    'version': 1},
    {'name': 'antiTheft',
    'version': 3},
    {'name': 'quickResponse',
    'version': 2},
    {'name': 'doorbellNightVision',
    'version': 1},
    {'name': 'dataDownload',
    'version': 1},
    {'name': 'detectionRegion',
    'version': 2},
    {'name': 'streamGrab',
    'version': 1},
    {'name': 'recordDownload',
    'version': 1},
    {'name': 'batCamPreRelay',
    'version': 1},
    {'name': 'batCamStatistics',
    'version': 1},
    {'name': 'batCamNodeRelay',
    'version': 1},
    {'name': 'batCamRtsp',
    'version': 2}],
    'device_id': 'REDACTED_DE05B9F12513E6B68B6B217223C343F'}],
    'start_index': 0,
    'sum': 1}},
    {'error_code': 0,
    'method': 'getChildDeviceList',
    'result': {'child_device_list': [{'alias': 'Tapo_Doorbell_front',
    'anti_theft_status': 0,
    'avatar': 'Home',
    'battery_charging': 'NO',
    'battery_installed': 1,
    'battery_percent': 43,
    'battery_temperature': 6,
    'battery_voltage': 3661,
    'cam_uptime': 52785,
    'category': 'camera',
    'dev_name': 'Tapo '
    'Smart '
    'Doorbell',
    'device_id': 'REDACTED_DE05B9F12513E6B68B6B217223C343F',
    'device_model': 'D230',
    'device_name': 'D230 '
    '1.0',
    'device_type': 'SMART.IPCAMERA',
    'ext_addr': '74FECE7254A90000',
    'firmware_status': 'OK',
    'hw_id': 'FA0B0A09DE3399EB4F20616A92FA7A18',
    'hw_ver': '1.0',
    'ipaddr': '172.23.30.2',
    'led_status': 'off',
    'low_battery': False,
    'mac': '74:FE:CE:00:00:00',
    'oem_id': 'REDACTED_2058DA42D6752DA96D088F6',
    'onboarding_timestamp': 1717701451,
    'online': True,
    'parent_device_id': 'REDACTED_82465D1AA8DBEE6EA09074A22513634',
    'power': 'BATTERY',
    'power_save_mode': 'on',
    'power_save_status': 'on',
    'region': 'EU',
    'rssi': -28,
    'short_addr': 0,
    'status': 'configured',
    'subg_cam_rssi': 0,
    'subg_hub_rssi': 0,
    'sw_ver': '1.1.17 '
    'Build '
    '20240731 '
    'rel.53511',
    'system_time': 1733492759,
    'updating': False,
    'uptime': 784861}],
    'start_index': 0,
    'sum': 1}}]}}
    DEBUG:kasa.smartcam.smartcamdevice:Child device type not supported: {'device_id': '8021ACC24DE05B9F12513E6B68B6B217223C343F', 'parent_device_id': '802DCF9FA82465D1AA8DBEE6EA09074A22513634', 'device_model': 'D230', 'device_name': 'D230 1.0', 'alias': 'Tapo_Doorbell_front', 'avatar': 'Home', 'sw_ver': '1.1.17 Build 20240731 rel.53511', 'hw_ver': '1.0', 'mac': '74:FE:CE:72:54:A9', 'device_type': 'SMART.IPCAMERA', 'category': 'camera', 'hw_id': 'FA0B0A09DE3399EB4F20616A92FA7A18', 'oem_id': 'CC76064AF2058DA42D6752DA96D088F6', 'system_time': 1733492759, 'led_status': 'off', 'updating': False, 'online': True, 'firmware_status': 'OK', 'power': 'BATTERY', 'battery_percent': 43, 'battery_charging': 'NO', 'rssi': -28, 'dev_name': 'Tapo Smart Doorbell', 'ipaddr': '172.23.30.2', 'short_addr': 0, 'ext_addr': '74FECE7254A90000', 'status': 'configured', 'onboarding_timestamp': 1717701451, 'battery_voltage': 3661, 'battery_temperature': 6, 'battery_installed': 1, 'low_battery': False, 'power_save_mode': 'on', 'power_save_status': 'on', 'uptime': 784861, 'cam_uptime': 52785, 'subg_cam_rssi': 0, 'subg_hub_rssi': 0, 'region': 'EU', 'anti_theft_status': 0}
    DEBUG:kasa.smart.smartdevice:Querying 192.168.68.132 for modules: SmartCamAlarm, Led, Time
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-1-of-2 >> '{"method":"multipleRequest","request_time_milis":1733492759767,"terminal_uuid":"0I6SxlbpXwLqrOcE9zlnEg==","params":{"requests":[{"method":"getSirenStatus","params":{"siren":{}}},{"method":"getSirenConfig","params":{"siren":{}}},{"method":"getSirenTypeList","params":{"siren":{}}},{"method":"getLedStatus","params":{"led":{"name":"config"}}},{"method":"getTimezone","params":{"system":{"name":"basic"}}}]}}'
    DEBUG:kasa.httpclient:Device 192.168.68.132 waiting 0.22719629999483004 seconds to send request
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132/stok=7319d78a3a9280070b27c82244e428f3/ds
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-1-of-2 << {'error_code': 0,
    'result': {'responses': [{'error_code': 0,
    'method': 'getSirenStatus',
    'result': {'status': 'off', 'time_left': 0}},
    {'error_code': 0,
    'method': 'getSirenConfig',
    'result': {'duration': 300,
    'siren_type': 'Doorbell Ring 3',
    'volume': '9'}},
    {'error_code': 0,
    'method': 'getLedStatus',
    'result': {'led': {'config': {'.name': 'config',
    '.type': 'led',
    'enabled': 'on'}}}},
    {'error_code': 0,
    'method': 'getSirenTypeList',
    'result': {'siren_type_list': ['Doorbell Ring 1',
    'Doorbell Ring 2',
    'Doorbell Ring 3',
    'Doorbell Ring 4',
    'Doorbell Ring 5',
    'Doorbell Ring 6',
    'Doorbell Ring 7',
    'Doorbell Ring 8',
    'Doorbell Ring 9',
    'Doorbell Ring 10',
    'Phone Ring',
    'Alarm 1',
    'Alarm 2',
    'Alarm 3',
    'Alarm 4',
    'Dripping Tap',
    'Alarm 5',
    'Connection 1',
    'Connection 2']}},
    {'error_code': 0,
    'method': 'getTimezone',
    'result': {'system': {'basic': {'timezone': 'UTC+00:00',
    'zone_id': 'Europe/London'}}}}]}}
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-2-of-2 >> '{"method":"multipleRequest","request_time_milis":1733492760101,"terminal_uuid":"0I6SxlbpXwLqrOcE9zlnEg==","params":{"requests":[{"method":"getClockStatus","params":{"system":{"name":"clock_status"}}}]}}'
    DEBUG:kasa.httpclient:Device 192.168.68.132 waiting 0.24543280000216328 seconds to send request
    DEBUG:kasa.httpclient:Posting to https://192.168.68.132/stok=7319d78a3a9280070b27c82244e428f3/ds
    DEBUG:kasa.protocols.smartprotocol:192.168.68.132 multi-request-batch-2-of-2 << {'error_code': 0,
    'result': {'responses': [{'error_code': 0,
    'method': 'getClockStatus',
    'result': {'system': {'clock_status': {'local_time': '2024-12-06 '
    '13:46:00',
    'seconds_from_1970': 1733492760}}}}]}}
    DEBUG:kasa.smartcam.smartcamdevice:Skipping child update for 8021ACC24DE05B9F12513E6B68B6B217223C343F, probably unsupported device
    DEBUG:kasa.smart.smartdevice:Update completed 192.168.68.132: ['getAppComponentList', 'getDeviceInfo', 'getChildDeviceComponentList', 'getChildDeviceList', 'getSirenStatus', 'getSirenConfig', 'getLedStatus', 'getSirenTypeList', 'getTimezone', 'getClockStatus']
    == Tapo_Hub_E834 - H200 ==
    Host: 192.168.68.132
    Port: 443
    Device state: True
    Time: 2024-12-06 13:46:00+00:00 (tz: Europe/London)
    Hardware: 1.3.6 Build 20240829 rel.71119
    Software: 1.0
    MAC (rssi): 24:2F:D0:66:E8:34 (None)

    == Primary features ==

    == Information ==

    == Configuration ==
    Alarm sound (alarm_sound): Doorbell Ring 1 Doorbell Ring 2 Doorbell Ring 3 Doorbell Ring 4 Doorbell Ring 5 Doorbell Ring 6 Doorbell Ring 7 Doorbell Ring 8 Doorbell Ring 9 Doorbell Ring 10 Phone Ring Alarm 1 Alarm 2 Alarm 3 Alarm 4 Dripping Tap Alarm 5 Connection 1 Connection 2
    Alarm volume (alarm_volume): 9 (range: 0-10)
    Alarm duration (alarm_duration): 300 (range: 0-6000)
    Test alarm (test_alarm):
    Stop alarm (stop_alarm):
    LED (led): True

    == Debug ==
    Alarm (alarm): False
    Device ID (device_id): 802DCF9FA82465D1AA8DBEE6EA09074A22513634
    Device time (device_time): 2024-12-06 13:46:00+00:00

  12. sdb9696 commented on Dec 6, 2024

    Contributor

    Great so this fix is working, thanks for reporting. It is the same issue as @somebody33427 reported so fixed there too.

  13. jamesk34 commented on Dec 6, 2024

    Author

    Great so this fix is working, thanks for reporting. It is the same issue as @somebody33427 reported so fixed there too.

    Thanks for your help. Just have to wait for the update in home assistant now

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      Footer

      © 2026 GitHub, Inc.

      Back | FazBrowse Home | New Git URL