Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TP-Link Smart Home integration cannot authenticate with Tapo C200 cameras. #132526

Open
ThatBlockyPenguin opened this issue Dec 6, 2024 · 41 comments

Comments

@ThatBlockyPenguin
Copy link

ThatBlockyPenguin commented Dec 6, 2024

The problem

After updating to Core 2024.12.0, HA discovered my Tapo C200 camera, which I had previously used the ONVIF integration to control. On attempting to add the device via the TP-Link Smart Home integration, once I'd entered my TP-Link credentials, I get the following error message:
image

Invalid authentication: Server response doesn't match our challenge on ip 192.168.1.181

What version of Home Assistant Core has the issue?

core-2024.12.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

TP-Link Smart Home

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tplink

Diagnostics information

As each device shows up as a new integration entry, and I can't add the device without authenticating it, I cannot obtain diagnostics at this time.

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Screenshot from 2024-12-06 22-59-27

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Dec 6, 2024

Hey there @rytilahti, @bdraco, @sdb9696, mind taking a look at this issue as it has been labeled with an integration (tplink) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of tplink can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign tplink Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tplink documentation
tplink source
(message by IssueLinks)

@timr49
Copy link

timr49 commented Dec 7, 2024

Same thing with my Tapo C325WB camera. After upgrading to HA core 2024.12.1 the message changed to
Invalid authentication: Error trying handshake1: {'data': {'code': -40404, 'sec_left': 433}, 'error_code': -40401}

@adriansuder
Copy link

adriansuder commented Dec 7, 2024

I had ha core 2024.7 and ma tapo c210 was not discovered. After update to 2024.12.1 my camera is possible to find but I also getting error: "server response does not match our.."

@sdb9696
Copy link
Contributor

sdb9696 commented Dec 7, 2024

@ThatBlockyPenguin the screenshot you've posted suggests something not right with your upgrade. Maybe you need to refresh your browser, delete the caches etc.

@adriansuder please make sure you're trying your tplink credentials. if that doesn't work please open a new issue with debug logs and details of firmware versions etc.

@timr49 we haven't tested with the C325WB so it's not listed as supported in the docs. Feel free to hmu on discord if you want to help with testing.

@adriansuder
Copy link

@ThatBlockyPenguin the screenshot you've posted suggests something not right with your upgrade. Maybe you need to refresh your browser, delete the caches etc.

@adriansuder please make sure you're trying your tplink credentials. if that doesn't work please open a new issue with debug logs and details of firmware versions etc.

@timr49 we haven't tested with the C325WB so it's not listed as supported in the docs. Feel free to hmu on discord if you want to help with testing.

I have new camera and I cant add integration, so I cant enable debug logs and get diagnostic.
I have HA core 2024.12.1 HAOS 14.0
Camera tapo c210 with newest firmare 1.3.11 build 240427 and yes I use my tplink credentials email+password. I have only this
Invalid authentication: Server response doesn't match our challenge on ip 192.168.68.52

At the moment maybe I have to low exp with HA, but I do not know how to debug exceptions during adding new integrations.

@lucazade
Copy link

lucazade commented Dec 7, 2024

Same issue here for C200 and C110 cameras

@strickersuk
Copy link

Same for me with a C100.

@LillanEriksson
Copy link

Same for me with my two C520WS

@behub-au
Copy link

behub-au commented Dec 7, 2024

Are these two issues related and the app update on the 13th will solve the issue? I am having the same Invalid authentication issues, but I have also had no functionality for my tapo cameras in HA since the firmware update months ago.

JurajNyiri/HomeAssistant-Tapo-Control#551 (comment)

@dr-g-marinos
Copy link

dr-g-marinos commented Dec 8, 2024

I have just updated to HA core 2024.12.1 & HAOS 14.0 - and suddenly there are 3 newly discovered TAPO cameras (C225 and 2 x TC72) - both of which were integrated into HA via Generic Camera Integration (using RTSP) - and still work fine. However was hoping to have all of the camera diagnostics and entities available now that TP-Link smart home integration recognizes there is this authentication issue. Wonder if I need to remove them from Generic Camera Integration?

@wwelles
Copy link

wwelles commented Dec 8, 2024

@ThatBlockyPenguin
Copy link
Author

@ThatBlockyPenguin the screenshot you've posted suggests something not right with your upgrade. Maybe you need to refresh your browser, delete the caches etc.

Can confirm, issue still exists after clearing cookies and site data and reloading the page. Also occurs on at least three separate devices (Manjaro Linux PC, Windows 11 Laptop, Android 12 Phone).

@JDE1990
Copy link

JDE1990 commented Dec 9, 2024

Hi all, also having this issue with a TC70 camera, regardless of device used to access Home Assistant. First occurred on 2024.11.3, now also on 2024.12.1 - thanks!

@br1nqq
Copy link

br1nqq commented Dec 9, 2024

Hey,

Got the same issue with new plug P110M - I have already 4 of those added & are working OK, yesterday I got a new one and I'm not able to add it - HA can see it, but I'm getting same error message. I have tried resetting the password via Tapo application on my phone. I have logged out on the application & successfully logged in. Also tested that I can log in with the same credentials to https://tapo.tplinkcloud.com/tapo_web/#/login/signIn - I'm on the HA Core Version: 2024.12.1 as well. Has anyone resolved this?

@sdb9696
Copy link
Contributor

sdb9696 commented Dec 9, 2024

@ThatBlockyPenguin are you still getting the error in the logs "required key not provided @ data['service']"?

@Andyk-93
Copy link

Andyk-93 commented Dec 9, 2024

Same issue here with my c210 cameras. Credentials are correct

@TeiruzuX
Copy link

TeiruzuX commented Dec 9, 2024

Same issue for me with a TC65 camera

@lubird
Copy link

lubird commented Dec 10, 2024

Same issue here with C320WS camera.

@hsinyu-chen
Copy link

same issue with P100 outlet , I got 2 but only one that have schedule setting on the tapo app have this issue

@ThatBlockyPenguin
Copy link
Author

@ThatBlockyPenguin are you still getting the error in the logs "required key not provided @ data['service']"?

No, not any more.

@sdb9696
Copy link
Contributor

sdb9696 commented Dec 11, 2024

Could you paste fresh logs as a text file from the time when you’re trying to add the device?

@daubman
Copy link

daubman commented Dec 12, 2024

This is the full debug log while getting this error attempting to add a C120 camera that recently started being detected:

2024-12-12 06:47:02.970 DEBUG (MainThread) [kasa.transports.sslaestransport] Created AES transport for 192.168.6.100
2024-12-12 06:47:02.970 DEBUG (MainThread) [kasa.device] Initializing 192.168.6.100 of type <class 'kasa.smartcam.smartcamdevice.SmartCamDevice'>
2024-12-12 06:47:02.971 DEBUG (MainThread) [kasa.protocols.smartprotocol] 192.168.6.100 multi-request-batch-1-of-1 >> '{"method":"multipleRequest","request_time_milis":1734004022971,"terminal_uuid":"lG3fH77HV0FxivMMlWiFZw==","params":{"requests":[{"method":"getDeviceInfo","params":{"device_info":{"name":["basic_info","info"]}}},{"method":"getAppComponentList","params":{"app_component":{"name":"app_component_list"}}}]}}'
2024-12-12 06:47:02.971 DEBUG (MainThread) [kasa.transports.sslaestransport] Will to send handshake1...
2024-12-12 06:47:02.976 DEBUG (MainThread) [kasa.httpclient] Posting to https://192.168.6.100
2024-12-12 06:47:03.211 DEBUG (MainThread) [kasa.transports.sslaestransport] Device responded with: {'result': {'data': {'code': -40401, 'time': 4, 'max_time': 10, 'encrypt_type': ['3'], 'key': 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALjGwRRelVvsXWXUoMUpyuN9/LhcLCflDfyFlv1nR6GYiDILqPuv9tlOP44jOE108oKe21/45uF8ngDkO06HuXkCAwEAAQ==', 'nonce': '669CCD151611F467', 'device_confirm': 'E9411026DA8AFD69DE3FF3F7605610C576C0F2A33093B989D323AB7B8E9C8BC9669CCD151611F467402FBAF4BF4BFC58'}}, 'error_code': -40413}
2024-12-12 06:47:03.211 DEBUG (MainThread) [kasa.transports.sslaestransport] Server response doesn't match our challenge on ip 192.168.6.100
2024-12-12 06:47:03.212 DEBUG (MainThread) [kasa.protocols.smartprotocol] Unable to authenticate with 192.168.6.100, not retrying: Server response doesn't match our challenge on ip 192.168.6.100

Less often I will get a handshake error instead:

2024-12-12 06:52:11.561 DEBUG (MainThread) [kasa.transports.sslaestransport] Created AES transport for 192.168.6.100
2024-12-12 06:52:11.562 DEBUG (MainThread) [kasa.device] Initializing 192.168.6.100 of type <class 'kasa.smartcam.smartcamdevice.SmartCamDevice'>
2024-12-12 06:52:11.563 DEBUG (MainThread) [kasa.protocols.smartprotocol] 192.168.6.100 multi-request-batch-1-of-1 >> '{"method":"multipleRequest","request_time_milis":1734004331563,"terminal_uuid":"Ger6UZY1lKjWua/j8Kuopg==","params":{"requests":[{"method":"getDeviceInfo","params":{"device_info":{"name":["basic_info","info"]}}},{"method":"getAppComponentList","params":{"app_component":{"name":"app_component_list"}}}]}}'
2024-12-12 06:52:11.601 DEBUG (MainThread) [kasa.httpclient] Posting to https://192.168.6.100
2024-12-12 06:52:11.741 DEBUG (MainThread) [kasa.transports.sslaestransport] Device responded with: {'data': {'code': -40404, 'sec_left': 1717}, 'error_code': -40401}
2024-12-12 06:52:11.742 DEBUG (MainThread) [kasa.transports.sslaestransport] Will to send handshake1...
2024-12-12 06:52:11.743 DEBUG (MainThread) [kasa.httpclient] Posting to https://192.168.6.100
2024-12-12 06:52:11.860 DEBUG (MainThread) [kasa.protocols.smartprotocol] Unable to authenticate with 192.168.6.100, not retrying: Error trying handshake1: {'data': {'code': -40404, 'sec_left': 1717}, 'error_code': -40401}
20

EDIT: adding that it doesn't seem to matter if I use a correct or incorrect username/password, I seem to get the same errors. Also, I think I got every log message above, but I have quite a few kasa smart plugs, some with energy monitoring, and their debug logging seems to be VERY verbose, so I cut a lot of that cruft out as it filled the log way more than the quick add error.

@7ooL
Copy link

7ooL commented Dec 12, 2024

I'm having same error message when trying to setup new device and first time integration setup for P115 plug.

@rytilahti
Copy link
Member

rytilahti commented Dec 12, 2024

@daubman Those keys (time, max_time, sec_left) in the device responses make it sound like the device has some sort of throttling. Does it ever work & get real data from the device? If yes, maybe the device does not like too many requests (or auth attempts).

You could try to remove the device completely from homeassistant, and do some tests using the kasa cli tool shipped with the upstream library - the simplest way would be by using uv run on any computer like this: uv run --with python-kasa kasa --host 192.168.6.100 --username <email> --password <password>. If you add --debug, you will also get the raw requests and responses.

@sdb9696
Copy link
Contributor

sdb9696 commented Dec 12, 2024

Please keep this thread limited to cameras (ideally C200 series). Non-camera tapo devices use a completely different method of communication and it will not be related to this issue.

For issues with any other types of devices please open a new issue and include debug logs. Thanks.

@kelvan
Copy link

kelvan commented Dec 13, 2024

I'm trying to integrate my new C210 V2.2, but it fails with the same error.
Not sure where to find the (debug) logs as it is my first tapo device and the integration screen not accessible before I add a device.

@sdb9696
Copy link
Contributor

sdb9696 commented Dec 13, 2024

You can add the two debug lines below to your configuration.yaml, restart and then try to add the device:

logger:
  default: warning
  logs:
    homeassistant.components.tplink: debug
    kasa: debug

@ThatBlockyPenguin
Copy link
Author

Could you paste fresh logs as a text file from the time when you’re trying to add the device?

2024-12-13 15:29:18.775 DEBUG (MainThread) [kasa.transports.sslaestransport] Created AES transport for 192.168.1.181
2024-12-13 15:29:18.778 DEBUG (MainThread) [kasa.discover] [DISCOVERY] 192.168.1.181 << {'error_code': 0,
 'result': {'device_id': 'REDACTED_35B4C9241F5B4B41EF117D1',
            'device_model': 'C200',
            'device_name': 'Living Room Camera',
            'device_type': 'SMART.IPCAMERA',
            'encrypt_info': {'data': 'VSw/uQo5ZwT/lWorAoqWiUBuqZXCGcf7/hDq/DAbvH3PiVuhIoiQwZLFVlZAkymcMHojt7eXjlEkPzb76oNNtAyLt5j4X0JEhB1ZkqzCj48rHlHd85aTH0B3V/6ZPb92U/A2cxEehRUxELrpzPDqO4J0QJapgmN1uFT7DxfaswvLnh9LwFKriOr/9+LWGPFWDwj6I+BI/QgeabvLZfpStLORccEPvMi9Vy161Zopflkctf2MxZY8sj9djBBrpQuh+iUTAitIP6PSy5BVt+Pi0TFq1THiv30Q1urCYFMbiAA=',
                             'key': 'dlTRHI9d5sd0JhEG2p9nzjd74Pj8KxJMDtnsgJDM3gEgKNCLeOdxl25IYXZeYTTfA7DYpPPbY7X9AaBG8zrl/hK7t+ucTOKL9xIUJrohfFVanqB/mqMcx0JcKr2oOZD3flPmgQvTV/tiKQw7KAodC3DoNhxFzXIQPMWRM9Su6qeio5xV4vvaxU6IZ7kOQjo24FRRO9s77usL4eyzCFmlBkwzak+VIqx943+yrB/yERD+W1ypqXa//2Mnb8SPwaLBP3pF5SXoRxNCKoZBvf7CjyKZJIwANfXM+qWLRH0nuP/Juu7ZyPhLqEwlDqhqLB8/421suOxniScdK8Jaiku2tA==',
                             'sym_schm': 'AES'},
            'encrypt_type': ['3'],
            'factory_default': False,
            'firmware_version': '1.3.15 Build 240715 Rel.43073n(4555)',
            'hardware_version': '3.0',
            'ip': '192.168.1.181',
            'is_support_iot_cloud': True,
            'mac': '40-ED-00-00-00-00',
            'mgt_encrypt_schm': {'is_support_https': True},
            'protocol_version': 1}}
2024-12-13 15:29:18.778 DEBUG (MainThread) [kasa.device] Initializing 192.168.1.181 of type <class 'kasa.smartcam.smartcamdevice.SmartCamDevice'>

[...]

2024-12-13 15:29:33.689 DEBUG (MainThread) [kasa.transports.sslaestransport] Created AES transport for 192.168.1.181
2024-12-13 15:29:33.690 DEBUG (MainThread) [kasa.device] Initializing 192.168.1.181 of type <class 'kasa.smartcam.smartcamdevice.SmartCamDevice'>
2024-12-13 15:29:33.690 DEBUG (MainThread) [kasa.protocols.smartprotocol] 192.168.1.181 multi-request-batch-1-of-1 >> '{"method":"multipleRequest","request_time_milis":1734103773691,"terminal_uuid":"H3oL2BDE/9mxparmgv1lUw==","params":{"requests":[{"method":"getDeviceInfo","params":{"device_info":{"name":["basic_info","info"]}}},{"method":"getAppComponentList","params":{"app_component":{"name":"app_component_list"}}}]}}'
2024-12-13 15:29:33.691 DEBUG (MainThread) [kasa.transports.sslaestransport] Will to send handshake1...
2024-12-13 15:29:33.736 DEBUG (MainThread) [kasa.httpclient] Posting to https://192.168.1.181
2024-12-13 15:29:33.823 DEBUG (MainThread) [kasa.transports.klaptransport] Handshake1 posted at 2024-12-13 15:29:33.823138. Host is 192.168.1.58, Response status is 200, Request was 84e23523b6aa82b9f05cbbcacc85e789
2024-12-13 15:29:33.823 DEBUG (MainThread) [kasa.transports.klaptransport] Handshake1 success at 2024-12-13 15:29:33.823517. Host is 192.168.1.58, Server remote_seed is: eb3ded2cd461ec2c087e6c2c17906c2c, server hash is: 3ef29f178b0b763cf6fb2de0beb1f618281028dbf3225c54c598b02cdac96057
2024-12-13 15:29:33.823 DEBUG (MainThread) [kasa.transports.klaptransport] Server response doesn't match our challenge on ip 192.168.1.58
2024-12-13 15:29:33.824 DEBUG (MainThread) [kasa.protocols.smartprotocol] Unable to authenticate with 192.168.1.58, not retrying: Server response doesn't match our challenge on ip 192.168.1.58
2024-12-13 15:29:33.826 DEBUG (MainThread) [kasa.transports.klaptransport] Handshake1 posted at 2024-12-13 15:29:33.826149. Host is 192.168.1.57, Response status is 200, Request was 47e432698b2f9f709ff4fff0904bdeda
2024-12-13 15:29:33.826 DEBUG (MainThread) [kasa.transports.klaptransport] Handshake1 success at 2024-12-13 15:29:33.826456. Host is 192.168.1.57, Server remote_seed is: 0c2288966cf08a97bec08b968ea90a96, server hash is: 82c46c83dc815da154391b104cf1d9a1f00c41a332b10936b8556ec4e9037edf
2024-12-13 15:29:33.826 DEBUG (MainThread) [kasa.transports.klaptransport] Server response doesn't match our challenge on ip 192.168.1.57
2024-12-13 15:29:33.827 DEBUG (MainThread) [kasa.protocols.smartprotocol] Unable to authenticate with 192.168.1.57, not retrying: Server response doesn't match our challenge on ip 192.168.1.57
2024-12-13 15:29:34.192 DEBUG (MainThread) [kasa.transports.sslaestransport] Device responded with: {'error_code': -40413, 'result': {'data': {'code': -40401, 'encrypt_type': ['3'], 'key': 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDYCTGjKCv1qWLAnO%2b2ushYx8zaZkr3NvyN62LkxDD5y1Wgc7yKeY8YR8OLzu3ZVfh8NPpAwwBKMKeLukb%2fTo1djupOFeX22oFaR%2bmYqh1NJlSTXIIfOp4qEkUyEyyO%2bLOnSADF9wzdF8oPbWNciC0BqHlRrgtxr8JCGDIieJ5g2wIDAQAB', 'nonce': '5DF872B15C8E872D', 'device_confirm': '62132D3F8308E31048DE202A8FE0D832F55E0F4874BDFC0AC08DF06CC9B22F4D5DF872B15C8E872DE9A3AF999670A4B0'}}}
2024-12-13 15:29:34.192 DEBUG (MainThread) [kasa.transports.sslaestransport] Connected to {self._host} with default username
2024-12-13 15:29:34.193 DEBUG (MainThread) [kasa.transports.sslaestransport] Server response doesn't match our challenge on ip 192.168.1.181
2024-12-13 15:29:34.193 DEBUG (MainThread) [kasa.protocols.smartprotocol] Unable to authenticate with 192.168.1.181, not retrying: Server response doesn't match our challenge on ip 192.168.1.181

[...]

2024-12-13 15:33:54.798 DEBUG (MainThread) [kasa.transports.sslaestransport] Created AES transport for 192.168.1.181
2024-12-13 15:33:54.799 DEBUG (MainThread) [kasa.device] Initializing 192.168.1.181 of type <class 'kasa.smartcam.smartcamdevice.SmartCamDevice'>
2024-12-13 15:33:54.800 DEBUG (MainThread) [kasa.protocols.smartprotocol] 192.168.1.181 multi-request-batch-1-of-1 >> '{"method":"multipleRequest","request_time_milis":1734104034800,"terminal_uuid":"OxRnCJ5xsbVIet/nJLHONA==","params":{"requests":[{"method":"getDeviceInfo","params":{"device_info":{"name":["basic_info","info"]}}},{"method":"getAppComponentList","params":{"app_component":{"name":"app_component_list"}}}]}}'
2024-12-13 15:33:54.800 DEBUG (MainThread) [kasa.transports.sslaestransport] Will to send handshake1...
2024-12-13 15:33:54.805 DEBUG (MainThread) [kasa.httpclient] Posting to https://192.168.1.181
2024-12-13 15:33:54.936 DEBUG (MainThread) [kasa.transports.sslaestransport] Device responded with: {'error_code': -40401, 'result': {'data': {'code': -40411, 'encrypt_type': ['1', '2'], 'key': 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDYCTGjKCv1qWLAnO%2b2ushYx8zaZkr3NvyN62LkxDD5y1Wgc7yKeY8YR8OLzu3ZVfh8NPpAwwBKMKeLukb%2fTo1djupOFeX22oFaR%2bmYqh1NJlSTXIIfOp4qEkUyEyyO%2bLOnSADF9wzdF8oPbWNciC0BqHlRrgtxr8JCGDIieJ5g2wIDAQAB', 'nonce': 'LM88tGuv'}}}
2024-12-13 15:33:54.937 DEBUG (MainThread) [kasa.transports.sslaestransport] Will to send handshake1...
2024-12-13 15:33:54.937 DEBUG (MainThread) [kasa.httpclient] Posting to https://192.168.1.181
2024-12-13 15:33:55.074 DEBUG (MainThread) [kasa.transports.sslaestransport] Device responded with: {'error_code': -40413, 'result': {'data': {'code': -40401, 'encrypt_type': ['3'], 'key': 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDYCTGjKCv1qWLAnO%2b2ushYx8zaZkr3NvyN62LkxDD5y1Wgc7yKeY8YR8OLzu3ZVfh8NPpAwwBKMKeLukb%2fTo1djupOFeX22oFaR%2bmYqh1NJlSTXIIfOp4qEkUyEyyO%2bLOnSADF9wzdF8oPbWNciC0BqHlRrgtxr8JCGDIieJ5g2wIDAQAB', 'nonce': '6BE9AF98EBF963F5', 'device_confirm': 'D44429F48FA094845474AFAAF09413AF94203B60F4946676F84B707E864FD5706BE9AF98EBF963F5E2088EFF49849C90'}}}
2024-12-13 15:33:55.074 DEBUG (MainThread) [kasa.transports.sslaestransport] Connected to {self._host} with default username
2024-12-13 15:33:55.075 DEBUG (MainThread) [kasa.transports.sslaestransport] Server response doesn't match our challenge on ip 192.168.1.181
2024-12-13 15:33:55.075 DEBUG (MainThread) [kasa.protocols.smartprotocol] Unable to authenticate with 192.168.1.181, not retrying: Server response doesn't match our challenge on ip 192.168.1.181

@sdb9696
Copy link
Contributor

sdb9696 commented Dec 13, 2024

So TPLink released an update to the IOS app today that will probably address this issue. This was thanks to the excellent efforts of @JurajNyiri who is the author of the Tapo Camera custom HA component.

Details here.

I believe the android update is coming soon. If you still have issues with this integration after trying the third party fix in the Tapo app, please make sure to post them here as they could be specific to this integration.

@newstartech
Copy link

Upgrade to HA 12.3 today. And both my TP Link C200 and C210 with latest firmware are discovered. However, after try to connect either one. It will fail with Server repsonse doesn't match our challenge IP error. Even I tried TP link cloud user/password and enabled device account user/password. To go further, I even update device account user/password is same as cloud user/password. Still no luck. Both camera works with TP Link app and ContaCam security Camera software.

@energiumOn
Copy link

So TPLink released an update to the IOS app today that will probably address this issue. This was thanks to the excellent efforts of @JurajNyiri who is the author of the Tapo Camera custom HA component.

Details here.

I believe the android update is coming soon. If you still have issues with this integration after trying the third party fix in the Tapo app, please make sure to post them here as they could be specific to this integration.


Nice... This guy @JurajNyiri is great. Probably, you'll need to integrate his custom component into TP-Link Smart Home Integration.

However, once I integrated my C200 using this way. I noticed that only camera switches are exposed. No camera stream nor feed is exposed.

Screenshot 2024-12-17 at 18 43 11

@JurajNyiri
Copy link

@energiumOn you can use my custom integration for a lot more in the meantime 🙂

@energiumOn
Copy link

@energiumOn you can use my custom integration for a lot more in the meantime 🙂

Yes for sure 🙏... I am already using it for my 3 Tapo cameras.

@sdb9696
Copy link
Contributor

sdb9696 commented Dec 17, 2024

Live stream in the tplink integration should be in the next HA release: #129180

@sdb9696
Copy link
Contributor

sdb9696 commented Dec 17, 2024

Upgrade to HA 12.3 today. And both my TP Link C200 and C210 with latest firmware are discovered. However, after try to connect either one. It will fail with Server repsonse doesn't match our challenge IP error. Even I tried TP link cloud user/password and enabled device account user/password. To go further, I even update device account user/password is same as cloud user/password. Still no luck. Both camera works with TP Link app and ContaCam security Camera software.

@newstartech have you enabled "Third-party compatibility" in Tapo App > Me > Tapo Lab?

@newstartech
Copy link

I am on Android version. No such option.

@YackMc
Copy link

YackMc commented Dec 20, 2024

I am on Android version. No such option.

Try it again, I didn't have the option in the app the other day, but I just checked there, was able to enable it and I was able to add my TC70 without any issues

@newstartech
Copy link

thanks. Found it and enable the 3rd party compatible option. Disable the 2 way authentication as well. After restart camera. HA TP Link smart home works to allow add C200 and C210 camera. I enabled 2 way authentication again. And see if it still works or not.

@stef3074ha
Copy link

Hello,
Same issues here with C200 C210 C220 C320WS

2024-12-23 02:29:11.911 DEBUG (MainThread) [homeassistant.components.tplink.coordinator] Finished fetching 192.168.1.18 data in 0.130 seconds (success: True) 2024-12-23 02:29:12.278 DEBUG (MainThread) [kasa.transports.sslaestransport] Created AES transport for 192.168.1.99 2024-12-23 02:29:12.278 DEBUG (MainThread) [kasa.device] Initializing 192.168.1.99 of type <class 'kasa.smartcam.smartcamdevice.SmartCamDevice'> 2024-12-23 02:29:12.278 DEBUG (MainThread) [kasa.protocols.smartprotocol] 192.168.1.99 multi-request-batch-1-of-1 >> '{"method":"multipleRequest","request_time_milis":17349352279,"terminal_uuid":"tlaFqJCu+3qmswz1+qnKiw==","params":{"requests":[{"method":"getDeviceInfo","params":{"device_info":{"name":["basic_info","info"]}}},{"method":"getAppComponentList","params":{"app_component":{"name":"app_component_list"}}}]}}' 2024-12-23 02:29:12.278 DEBUG (MainThread) [kasa.transports.sslaestransport] Will to send handshake1... 2024-12-23 02:29:12.309 DEBUG (MainThread) [kasa.httpclient] Posting to https://192.168.1.99 2024-12-23 02:29:12.415 DEBUG (MainThread) [kasa.transports.sslaestransport] Device responded with: {'result': {'data': {'code': -40401, 'time': 2, 'max_time': 10, 'encrypt_type': ['3'], 'key': 'MFwwDQYJKoZIhvxxxxxxxxxxxxxto7PFuFvohSaE52SHIhdLcnGl3exvJSTbTiAoro1AxIuxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQA6JbT+BpUUFo0CxxxxxxxxxxAAQ==', 'nonce': 'BC7A1ED56CDAFB45', 'device_confirm': '051EE0A01EC5D5C6E0A917048A0539D79EDAD71E069BC7A1BC58CDAFB45EABE62B92F767871'}}, 'error_code': -40413} 2024-12-23 02:29:12.415 DEBUG (MainThread) [kasa.transports.sslaestransport] Server response doesn't match our challenge on ip 192.168.1.99 2024-12-23 02:29:12.415 DEBUG (MainThread) [kasa.protocols.smartprotocol] Unable to authenticate with 192.168.1.99, not retrying: Server response doesn't match our challenge on ip 192.168.1.99

@newstartech
Copy link

I solved the connection issue for my c200 c210 by following. 1) get latest version of Tapo app. 2) login tapo app, click me, tapo lab, enable third party compatibility. 3), click account name, disable multi authentation. 4) reboot C200 and C210. 5) Try to connect again at HA, type in Tapo cloud username/password. it works. 6) in Tapo app, enable multi authentation again. So far so good

@kelvan
Copy link

kelvan commented Dec 23, 2024

Tapo update just shown up in play store, it does work now.
But I'm not sure what the benefit of it is, can't control cam with it, the rest also works with generic onvif integration, without the whole cloud auth problems 😞

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

No branches or pull requests