Update Tuya password in integration

Hello,

I recently started getting username password errors in my tuya integration. I’ve reset my password, but for the life of me cannot figure out how to change the password in the integration. Any suggestions?

Thanks

Logger: homeassistant.components.tuya
Source: components/tuya/init.py:120
Integration: Tuya (documentation, issues)
First occurred: 4:22:29 PM (1 occurrences)
Last logged: 4:22:29 PM

Connection error during integration setup. Error: Get accesstoken failed. Username or password error!

I really can’t figure how to update the username and password - please dont tell me I have to rip out the integration, that would suck…

If the integration doesn’t allow you to change the u/p, you can manually edit the /config/.storage/core.config_entries file.

1 Like

Thank you! I’ve updated password, but still getting errors… any other suggestions?!

You restarted HA, right?

I got it to accept the username and pass - it wasn’t saving, but I managed to get it to save now. I cant control the light. I removed and re-added the integration, it found my light, but I still can’t control it. No errors, nothing in the logs. Thoughts? The entity just shows as unavailable.

Appreciate your help!

I have had the same issue. It all started as I tried to experiment with the Beta version of the Tuya supported integration with HA and had to reset my password. When i did this the prior Tuya integration stopped working as password changed. I dont see a /config/.storage file in File Editor and there is no way in the UI to update the password

you have to enable access to the .storage folder, I found instructions via google, can’t remember how.

still can’t get this light to work, although it did previously. The integration finds the light no problem, but it just shows unavailable. I can control it via the smartlife app

thanks for the response - i managed to find my old password and changed it back and it has been behaving since. I am also playing with the Tuya v2 integration now managed by HA which is in beta, requires alot more fiddling around with Tuya IoT account and linking it to a Tuya or Smartlife app account but has proven to be useful - now have RGB control of some wifi lights that i previously didnt have via this one.

Great to hear - Do you have to link some stuff in the tuya iot account to get this working? It was working one day, and then it was not… I have no idea what broke.

Ugh!! I just ran into this issue too. I followed the instructions about editing

config/.storage/core.config_entries

I did have to correct my password in this file. I’d be interested in what tool people used to edit the file. I first opened terminal and copied the file to ./config so that I could access it via Samba and edit is in VisualStudio, then opened terminal again and copied it back to config/.storage. I can confirm that the new date/time on the file is consistent with the date/time I copied it back.

But I still get the following error:

Logger: homeassistant.config_entries
Source: components/tuya/__init__.py:71
First occurred: 17:01:04 (1 occurrences)
Last logged: 17:01:04

Error setting up entry <my_email> for tuya
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 304, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/tuya/__init__.py", line 59, in async_setup_entry
    success = await _init_tuya_sdk(hass, entry)
  File "/usr/src/homeassistant/homeassistant/components/tuya/__init__.py", line 71, in _init_tuya_sdk
    auth_type = AuthType(entry.data[CONF_AUTH_TYPE])
KeyError: 'auth_type'

I can see all the devices in the Tuya app, and can interact with them. But not from HA.

Anything in .storage can only be modified while HA is stopped.

hhmm. How do I do that if HA is running on a RPi? Do I have to load the SD card into another system?

BTW, I did reboot after editing.

Open the file editor in one browser window, the web terminal in another browser windows.
In web terminal

ha core stop

Edit your file

In web terminal

ha core start

*** SOLVED ***
I was using the country I used for the iot.tuya.com registration rather than the registration location of the Tuya SmartLife app.
*** SOLVED ***

Thanks @francisp. In the end I deleted the Tuya integration, and now I am struggling to reinstall it.

I can login to iot.tuya.com and have verified:

  • Access to the Device Status Notification API
  • All my devices are visible and operating correctly
  • The Access ID and Access Secret values
  • That my mobile app is linked and that the app password is correct

However, when I try to add the Tuya integration by entering all the info and then click on Submit, I get the following error.

I’m not sure where to go from here.

Much appreciated. It seems that the issue was that I needed to create a new project. Who would have thought.

I recently applied an update to my install and I’ve ended up with the same error as someone only2 days ago.

Was something changed which broke this for everyone?

I continue to have issues with home assistant which baffle me, so so much.
I’ve been using HA for several years and frequently things break which make no sense to me at all.

I’ve 100% been using the Tuya integration for at least 12 months, maybe more.
It stopped working 2 days ago.
Reading the instructions here.

It seems to CLEARLY mention, I need a “tuya iot account” which is seperate from the Tuya app account.
I can without question, say I’ve never had one of these and in fact my password manager isn’t coming up with a login for this site. I can’t log in to iot.tuya.com.

Is this a new change? How have I controlled my 5 genio bulbs for 12 to 18 months, without ever having this supposedly required account?

Baffled.

1 Like

Not reading release notes before upgrading, are we?
2021.10.0: Z-Wave S2 support, Tuya, secure ESPHome and 400 new icons - Home Assistant (home-assistant.io)