The Homebridge TP-Link Tapo plugin encounters an error during the second handshake process. The error message indicates a "Bad Request - Invalid Header" issue, which leads to a failure in sending commands to the Tapo devices. The logs also show a TypeError where the cipher property is undefined.
Expected behavior
The plugin should successfully complete the handshake process and send commands to the Tapo devices without encountering any errors.
Logs
[KLAP] Second handshake failed: Bad Request - Invalid Header
[7/7/2024, 7:13:40 AM] [TPLink Tapo Platform] Error sending command: deviceInfo TypeError: Cannot read properties of undefined (reading 'cipher')
at KlapAPI.sendSecureRequest (/usr/local/lib/node_modules/homebridge-tp-link-tapo/src/api/KlapAPI.ts:59:39)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at TPLink.sendCommandWithNoLock (/usr/local/lib/node_modules/homebridge-tp-link-tapo/src/api/TPLink.ts:243:24)
[7/7/2024, 7:13:40 AM] [TPLink Tapo Platform] Failed to get info about: 192.168.1.242
Describe The Bug
The Homebridge TP-Link Tapo plugin encounters an error during the second handshake process. The error message indicates a "Bad Request - Invalid Header" issue, which leads to a failure in sending commands to the Tapo devices. The logs also show a
TypeError
where thecipher
property is undefined.Expected behavior
The plugin should successfully complete the handshake process and send commands to the Tapo devices without encountering any errors.
Logs
Plugin Config
Plugin Version
homebridge-tp-link-tapo version: 4.1.0
Homebridge Version
1.8.3
Node.js Version
20.9.0
NPM Version
10.8.1
Operating System
macOS 14.5 (BuildVersion: 23F79)