From faf83de01e8368489ef9a8c5ffec9321c5f82702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Tr=C3=B6ger?= Date: Wed, 17 Jan 2024 15:54:45 +0100 Subject: [PATCH] no message --- libs/TapoCrypt.php | 4 ++-- libs/TapoLib.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/TapoCrypt.php b/libs/TapoCrypt.php index 8ed8611..0316cac 100644 --- a/libs/TapoCrypt.php +++ b/libs/TapoCrypt.php @@ -98,14 +98,14 @@ private function Handshake() private function Login(): bool { $Url = \TpLink\Api\Protocol . $this->ReadPropertyString(\TpLink\Property::Host) . \TpLink\Api\Url::App; - $Payload = \TpLink\Api\Protocol::BuildRequest( + $Payload = json_encode(\TpLink\Api\Protocol::BuildRequest( \TpLink\Api\Method::Login, '', [ \TpLink\Api\Param::Password => base64_encode($this->ReadPropertyString(\TpLink\Property::Password)), \TpLink\Api\Param::Username => base64_encode(sha1($this->ReadPropertyString(\TpLink\Property::Username))) ] - ); + )); $this->SendDebug(__FUNCTION__, $Payload, 0); $tp_link_cipher = new \TpLink\Crypt\Cipher($this->TpLinkCipherKey, $this->TpLinkCipherIV); $EncryptedPayload = $tp_link_cipher->encrypt($Payload); diff --git a/libs/TapoLib.php b/libs/TapoLib.php index 624b724..a71cb5f 100644 --- a/libs/TapoLib.php +++ b/libs/TapoLib.php @@ -198,7 +198,7 @@ class GUID DeviceModel::BulbL530 => self::BulbL530, DeviceModel::BulbL610 => self::BulbL610, DeviceModel::KH100 => self::PlugsMulti, - DeviceModel::H100 => self::PlugsMulti, + DeviceModel::H100 => self::PlugsMulti, ]; public static function GetByModel(string $Model)