HomeAssistant-Tapo-Control: Upgraded Firmware 1.3.9 on Tapo C200 and get Check tapo tag failed when trying to connect

Description

Home Assistant version: 2023.10.2 Tapo Cameras Control: 5.4.4 Camera: Topa C200 Camera Firmware that breaks the config 1.3.9 (I have another camera with FW 1.3.6 that works)

After upgrading fw to 1.3.9 on Tapo C200 it will no longer work. Get errors in the logs.

This error originated from a custom integration.

Logger: custom_components.tapo_control
Source: custom_components/tapo_control/config_flow.py:770
Integration: Tapo: Cameras Control (documentation, issues)
First occurred: 16:57:43 (4 occurrences)
Last logged: 17:02:13

Error: -1, Response: {"result": {"responses": [{"msg": "Check tapo tag failed", "error_code": -1}]}, "error_code": -1}

I even tried to remove one camera from the configuration and add it again with now luck. Get an error message Unknown error

Reproduction Steps

  1. Upgrade camera FW to 1.3.9
  2. Restart
  3. Broken in HA (works in the Tapo app so the cameas are working)

Expected behavior

That camera works and send stream to HA after firmware upgrade.

If applicable, add error logs.

No response

Device Firmware

1.3.9 Build 231019 Rel.38052n(4555)

Integration Version

5.4.4

Using stream component

Yes

Does camera work via official integrations?

Yes

Camera has all attributes filled out in developer tools

Yes

HASS Environment

Home Assistant Core

Search for similar issues

Yes

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Reactions: 3
  • Comments: 30 (9 by maintainers)

Most upvoted comments

@yiskang @maroliar @iwebsource @Frazou1 @bysimba @grunkands @jdndm @ndrsfr Please test with https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/releases/tag/5.4.6 and confirm the fix working.

In case of problem still persisting:

Add following to configuration.yaml:

logger:
  logs:
    custom_components.tapo_control: debug

Post full log in case of an error.

If you see Incorrect pytapo version installed error on start, fix your environment.

I am also experiencing a similar issue to @grunkands.

Attempting to add a C200 camera to my setup, but getting the error message Unknown Error.

image

Model: C2000 V2.0 Camera FW: 1.3.9 Tapo Cameras Control: 5.4.4

`This error originated from a custom integration.

Logger: custom_components.tapo_control Source: custom_components/tapo_control/config_flow.py:770 Integration: Tapo: Cameras Control (documentation, issues) First occurred: 12:12:24 PM (4 occurrences) Last logged: 1:14:04 PM

Error: -1, Response: {“result”: {“responses”: [{“msg”: “Check tapo tag failed”, “error_code”: -1}]}, “error_code”: -1}`

@yiskang @maroliar @iwebsource @Frazou1 @bysimba @grunkands @jdndm @ndrsfr Please test with https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/releases/tag/5.4.6 and confirm the fix working.

In case of problem still persisting:

Add following to configuration.yaml:

logger:
  logs:
    custom_components.tapo_control: debug

Post full log in case of an error.

If you see Incorrect pytapo version installed error on start, fix your environment.

@JurajNyiri ,

I can confirm that the fix you implemented (Version 5.4.6) is working for me. No issues adding it now. Thank you very much JurajNyiri for all your hard work!

My Info: Tapo Control v5.4.6 C200 FW 1.3.9 (HW3.0)

Work great !! Wonderful and quick fix that why i choose tapo and Ha ! Thansk you very much

Alexandre Fraser 418-208-6556 @.***

Le 15 nov. 2023 à 08:17, Juraj Nyíri @.***> a écrit :

It is linked in the post you are posting reply to. If you are using HACS it should show up soon or you can force the install by going to /hacs/repository/300358676 in your HA instance clicking 3 dots and selecting Redownload. If you are not using hacs, just install manually as you did before. (You should be using HACS though.).

— Reply to this email directly, view it on GitHubhttps://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues/456#issuecomment-1812523354, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVLXJHNRPAGI75W27HKYGCTYES6IHAVCNFSM6AAAAAA7JPNLS2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJSGUZDGMZVGQ. You are receiving this because you were mentioned.Message ID: @.***>

@JurajNyiri Thank you so much for the quick solution to this problem! ⭐️

@JurajNyiri Thanks a ton for your prompt help! I confirmed that 5.4.6 works and fixes the issue on my side.

My devices:

  • Model: C200
  • Hardware: 2.0 & 3.0
  • Fireware: 1.3.9 Build 231019 Rel.38052n(5553)

Hi @JurajNyiri,

Here is the debug log following your instructions. I truncated some strings in the payloads of requests or responses that I’m unsure if they include confidential info.

New request:
{'data': {'method': 'login', 'params': {'encrypt_type': '3', 'username': 'cameraAccountUser'}}, 'headers': {'Host': 'REDACTED', 'Referer': 'REDACTED', 'Accept': 'application/json', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Tapo CameraClient Android', 'Connection': 'close', 'requestByApp': 'true', 'Content-Type': 'application/json; charset=UTF-8'}, 'verify': False}
200
{'error_code': -40413, 'result': {'data': {'code': -40401, 'encrypt_type': ['3'], 'key': 'REDACTED', 'nonce': 'REDACTED', 'device_confirm': 'REDACTED'}}}
New request:
{'data': {'method': 'login', 'params': {'cnonce': 'REDACTED', 'encrypt_type': '3', 'username': 'cameraAccountUser'}}, 'headers': {'Host': 'REDACTED', 'Referer': 'REDACTED', 'Accept': 'application/json', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Tapo CameraClient Android', 'Connection': 'close', 'requestByApp': 'true', 'Content-Type': 'application/json; charset=UTF-8'}, 'verify': False}
200
{'error_code': -40413, 'result': {'data': {'code': -40401, 'encrypt_type': ['3'], 'key': 'REDACTED', 'nonce': 'REDACTED', 'device_confirm': 'REDACTED'}}}
New request:
{'data': {'method': 'login', 'params': {'cnonce': 'REDACTED', 'encrypt_type': '3', 'digest_passwd': 'REDACTED', 'username': 'cameraAccountUser'}}, 'headers': {'Host': 'REDACTED', 'Referer': 'REDACTED', 'Accept': 'application/json', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Tapo CameraClient Android', 'Connection': 'close', 'requestByApp': 'true', 'Content-Type': 'application/json; charset=UTF-8'}, 'verify': False}
200
{'error_code': 0, 'result': {'stok': 'REDACTED', 'user_group': 'third_account', 'start_seq': 739}}
New request:
{'data': {'method': 'securePassthrough', 'params': {'request': 'aqJP...fA'}}, 'headers': {'Host': 'REDACTED', 'Referer': 'REDACTED', 'Accept': 'application/json', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Tapo CameraClient Android', 'Connection': 'close', 'requestByApp': 'true', 'Content-Type': 'application/json; charset=UTF-8', 'Seq': '739', 'Tapo_tag': 'REDACTED'}, 'verify': False}
500
{'error_code': 0, 'seq': 739, 'result': {'response': 'Es9...VM6p'}}
New request:
{'data': {'method': 'login', 'params': {'cnonce': 'REDACTED', 'encrypt_type': '3', 'username': 'cameraAccountUser'}}, 'headers': {'Host': 'REDACTED', 'Referer': 'REDACTED', 'Accept': 'application/json', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Tapo CameraClient Android', 'Connection': 'close', 'requestByApp': 'true', 'Content-Type': 'application/json; charset=UTF-8', 'Seq': '739', 'Tapo_tag': 'REDACTED'}, 'verify': False}
200
{'error_code': -40413, 'result': {'data': {'code': -40401, 'encrypt_type': ['3'], 'key': 'REDACTED', 'nonce': 'REDACTED', 'device_confirm': 'REDACTED'}}}
New request:
{'data': {'method': 'login', 'params': {'cnonce': 'REDACTED', 'encrypt_type': '3', 'digest_passwd': 'REDACTED', 'username': 'cameraAccountUser'}}, 'headers': {'Host': 'REDACTED', 'Referer': 'REDACTED', 'Accept': 'application/json', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Tapo CameraClient Android', 'Connection': 'close', 'requestByApp': 'true', 'Content-Type': 'application/json; charset=UTF-8', 'Seq': '739', 'Tapo_tag': 'REDACTED'}, 'verify': False}
200
{'error_code': 0, 'result': {'stok': 'REDACTED', 'user_group': 'third_account', 'start_seq': 559}}
New request:
{'data': {'method': 'securePassthrough', 'params': {'request': 'DE7Zf...b0Dv0'}}, 'headers': {'Host': 'REDACTED', 'Referer': 'REDACTED', 'Accept': 'application/json', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Tapo CameraClient Android', 'Connection': 'close', 'requestByApp': 'true', 'Content-Type': 'application/json; charset=UTF-8', 'Seq': '559', 'Tapo_tag': 'REDACTED'}, 'verify': False}
500
{'error_code': 0, 'seq': 559, 'result': {'response': '1DsffKNKzy...TQgu4'}}
New request:
{'data': {'method': 'login', 'params': {'cnonce': 'REDACTED', 'encrypt_type': '3', 'username': 'cameraAccountUser'}}, 'headers': {'Host': 'REDACTED', 'Referer': 'REDACTED', 'Accept': 'application/json', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Tapo CameraClient Android', 'Connection': 'close', 'requestByApp': 'true', 'Content-Type': 'application/json; charset=UTF-8', 'Seq': '559', 'Tapo_tag': 'REDACTED'}, 'verify': False}
200
{'error_code': -40413, 'result': {'data': {'code': -40401, 'encrypt_type': ['3'], 'key': 'REDACTED', 'nonce': 'REDACTED', 'device_confirm': 'REDACTED'}}}
New request:
{'data': {'method': 'login', 'params': {'cnonce': 'REDACTED', 'encrypt_type': '3', 'digest_passwd': 'REDACTED', 'username': 'cameraAccountUser'}}, 'headers': {'Host': 'REDACTED', 'Referer': 'REDACTED', 'Accept': 'application/json', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Tapo CameraClient Android', 'Connection': 'close', 'requestByApp': 'true', 'Content-Type': 'application/json; charset=UTF-8', 'Seq': '559', 'Tapo_tag': 'REDACTED'}, 'verify': False}
200
{'error_code': 0, 'result': {'stok': 'REDACTED', 'user_group': 'third_account', 'start_seq': 506}}
New request:
{'data': {'method': 'securePassthrough', 'params': {'request': '32ocm...AsG'}}, 'headers': {'Host': 'REDACTED', 'Referer': 'REDACTED', 'Accept': 'application/json', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Tapo CameraClient Android', 'Connection': 'close', 'requestByApp': 'true', 'Content-Type': 'application/json; charset=UTF-8', 'Seq': '506', 'Tapo_tag': 'REDACTED'}, 'verify': False}
500
{'error_code': 0, 'seq': 506, 'result': {'response': 'gS...Rz'}}

Exception log when using 3.3.8

Traceback (most recent call last):
  File "/Users/kang/Desktop/tapo/tapo.py", line 7, in <module>
    tapo = Tapo(host, user, password, printDebugInformation=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pytapo/__init__.py", line 77, in __init__
    self.basicInfo = self.getBasicInfo()
                     ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pytapo/__init__.py", line 906, in getBasicInfo
    return self.executeFunction(
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pytapo/__init__.py", line 413, in executeFunction
    data = self.performRequest(
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pytapo/__init__.py", line 517, in performRequest
    return self.performRequest(requestData, loginRetryCount + 1)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pytapo/__init__.py", line 517, in performRequest
    return self.performRequest(requestData, loginRetryCount + 1)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pytapo/__init__.py", line 519, in performRequest
    raise Exception(
Exception: Error: -1, Response: {"result": {"responses": [{"msg": "Check tapo tag failed", "error_code": -1}]}, "error_code": -1}

It reports the same error as Marollar does, but switching to admin account with cloud password works.

This one throws exception.

from pytapo import Tapo

user = "cameraAccountUser" # user you set in Advanced Settings -> Camera Account
password = "cameraAccountPass" # password you set in Advanced Settings -> Camera Account
host = "192.168.xx.xx" # ip of the camera, example: 192.168.1.52

tapo = Tapo(host, user, password)

print(tapo.getBasicInfo())

## Exception: Error: -1, Response: {"result": {"responses": [{"msg": "Check tapo tag failed", "error_code": -1}]}, "error_code": -1}

This one works:

from pytapo import Tapo

user = "admin" # user you set in Advanced Settings -> Camera Account
password = "tplinkCloudAccountPass" # password you set in Advanced Settings -> Camera Account
host = "192.168.xx.xx" # ip of the camera, example: 192.168.1.52

tapo = Tapo(host, user, password)

print(tapo.getBasicInfo())

Additional Information:

  • Device: C200
  • Hardware: 2.0 & 3.0
  • Fireware: 1.3.9 Build 231019 Rel.38052n(5553)
  • Tapo Control version: 5.4.4

I have the same issue as well. Try the same step of [bysimba] and doesnt work