RaresAil / homebridge-tp-link-tapo

A platform to implement the tp-link tapo device and Adaptive Lighting for light bulbs
https://www.npmjs.com/package/homebridge-tp-link-tapo
Apache License 2.0
61 stars 5 forks source link

Tapo P100 on 1.2.1 build generates "Second handshake failed: Request failed with status code 403" #83

Open mrsilver76 opened 6 months ago

mrsilver76 commented 6 months ago

Describe The Bug

Unable to use Tapo P100 switches with latest plugin, error logs repeat "Second handshake failed: Request failed with status code 403" and no accessory can be found.

Tapo P100 running firmware 1.2.1 Build 230804 Rel. 190922

Expected behavior

Accessory is found and identified within Home app.

Logs

[05/01/2024, 20:05:30] [TPLink Tapo] Try for 192.168.0.15 : 19/20
[05/01/2024, 20:05:30] [TPLink Tapo] [KLAP] Second handshake failed: Request failed with status code 403
[05/01/2024, 20:05:30] [TPLink Tapo] Error sending command: deviceInfo TypeError: Cannot read properties of undefined (reading 'cipher')
    at KlapAPI.sendSecureRequest (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/KlapAPI.ts:59:39)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at TPLink.sendCommandWithNoLock (/var/lib/homebridge/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:243:24)
[05/01/2024, 20:05:30] [TPLink Tapo] Failed to get info about: 192.168.0.15
[05/01/2024, 20:05:30] [TPLink Tapo] Retry to connect in 10s : 192.168.0.15

Plugin Config

{
    "bridge": {
        "name": "Homebridge ****",
        "username": "**:**:**:**:**:**",
        "port": 51820,
        "pin": "***-**-***",
        "advertiser": "avahi"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "addresses": [
                "192.168.0.15"
            ],
            "name": "TPLink Tapo",
            "email": "*****@*****",
            "password": "*****",
            "platform": "HomebridgeTPLinkTapo"
        }
    ],
    "disabledPlugins": []
}

Plugin Version

4.1.0

Homebridge Version

1.7.0

Node.js Version

20.10.0

NPM Version

10.2.3

Operating System

Linux 6.1.0-rpi7-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux

redtares commented 5 months ago

I am having the same Problem. Any fix known yet?

shiner66 commented 4 months ago

Same error on P110 on 1.3.0. firmware, did they change something in the authentication process?

planetrocky commented 4 months ago

Exactly the same failure here

Biceeeeepss commented 1 day ago

Version 4.1.1 fixed this for me.