I have 2 tuya switches and I have tried to add them to local tuya integration.
First thing, I got my device id and local_key on the IOT Tuya website. The first switch has been added to the local tuya switch perfectly.
The second one is the same type of switch. I did the same way to add it into HASS but I got an error.
I got the device id and local_key of the second switch but I could not add it to the HASS. I got the message “An unknown error occurred. See log for details.” from HASS.
I don’t know why the second switch can’t add to HASS.
Please suggest to me.
When you go to Settings and then to System …there you can look at Log-entries.
If your log is not configured for lots of details then it would not show much I guess but it should show something related to above error
EDIT: as with all (future) posts in this forum… it might also help to add details on what you are using as a HA setup, core/os and version. I.e. I used docker/container version 2022.6.1
So, for me the last line seems to indicate that it cannot find the device on that IP.
If you have switched it off and on …DHCP might give it another IP.
On my router I have hard-set IP for Tuya devices based on their MAC
Some other thoughts
When you re-add a tuya device to your app, it also receives a new local key…doublecheck the tuya dev site if nothing has changed
And…recommend to not put screenshots containing ID and/or key this visible…remove it and brush out (part of the) fields
Ok, I understood. I will check the IP address again. The router may send the package to the wrong IP address. Because local tuya found 3 addresses but I have only 2 devices.
In the red box, my devices are at the first and third options. The second is unknown device. I have only 2 devices.
try to make sure ip, id and key are OK and add manually
Maybe the 2nd one is the new discovered one, i.e. the same device as the first one but now with new ID?
The problem has been solved.
I have reconnected the device (unpair and repair). It generated the new local key. I got a new local key and put it in my local tuya. It’s work. Thank you all.