rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.81k stars 543 forks source link

Vacuum Adding problem. #282

Open shakanson opened 3 years ago

shakanson commented 3 years ago

installed the latest version. I already got the id's and keys from My tuya vacuum. When searching the integration component find my vacuum. I only have to enter a name and key and this give me:

Failed to authenticate with device. Verify that device id and local key are correct.

2020-12-31 10:30:15 ERROR (MainThread) [custom_components.localtuya.pytuya] [bf3...owk] Failed to get status: 'utf-8' codec can't decode byte 0xa6 in position 1: invalid start byte Traceback (most recent call last): File "/config/custom_components/localtuya/pytuya/__init__.py", line 510, in detect_available_dps data = await self.status() File "/config/custom_components/localtuya/pytuya/__init__.py", line 472, in status status = await self.exchange(STATUS) File "/config/custom_components/localtuya/pytuya/__init__.py", line 457, in exchange payload = self._decode_payload(msg.payload) File "/config/custom_components/localtuya/pytuya/__init__.py", line 544, in _decode_payload payload = self.cipher.decrypt(payload, False) File "/config/custom_components/localtuya/pytuya/__init__.py", line 196, in decrypt return self._unpad(decryptor.update(enc) + decryptor.finalize()).decode() UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa6 in position 1: invalid start byte

What can I do about it?

KTibow commented 3 years ago

Did you verify that the keys are correct? How did you get them?

remb0 commented 3 years ago

I have relinked it and now I can choose the type :) only not a vacuum but I'm a step futher.