Can't get Tuya component to work - Invalid Config

Component page says this is all I need:

tuya:
  username: YOUR_TUYA_USERNAME
  password: YOUR_TUYA_PASSWORD
  country_code: YOUR_ACCOUNT_COUNTRYCODE

I wasn’t sure about my username since I had logged in to the SmartLife app using my mobile number. But I tried my phone number both with and without a preceding “1-” and it wouldn’t work, so I logged out, registered with my email address, and re-added all my Smart Power Strips. I updated my username in configuration.yaml and restarted home assistant. Every time I restart, I get the same message in Overview:

Invalid Config

The following components and platforms could not be setup:

  • tuya

Please check your config.

When I go to services and call homeassistant.check.config, it doesn’t return anything.
I’m positive that my username, password, and country code are entered correctly. I even tried putting in the optional “platform” parameter - and tried both values - same result.

Help?

I’m getting this too - just upgraded from 0.75.3 to 0.77.3 today so not sure which release has caused it but has suddenly stopped working…

EDIT: managed to fix this following the instructions in this issue from 3 weeks ago.
https://github.com/home-assistant/home-assistant/pull/16058

Looks like you need to add the below to your config now…

platform: 'smart_life' OR 'tuya'

This was my log…

2018-09-09 19:23:32 ERROR (MainThread) [homeassistant.setup] Error during setup of component tuya
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 148, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/tuya.py", line 65, in setup
    tuya.init(username, password, country_code, platform)
  File "/usr/local/lib/python3.6/site-packages/tuyapy/tuyaapi.py", line 44, in init
    self.get_access_token()
  File "/usr/local/lib/python3.6/site-packages/tuyapy/tuyaapi.py", line 68, in get_access_token
    raise TuyaAPIException(message)
tuyapy.tuyaapi.TuyaAPIException: Get accesstoken failed. Username or password error!

Thanks. That didn’t help, either. I suspect that all my efforts at trying to get this to work previously have somehow ruined my HA installation. I’ve been seriously thinking about dockerizing the whole thing anyway. I think I’m just going to start over and see if that doesn’t fix things.

I got some help from Yupeng at Tuya. All I had to do was change platform to “jinvoo_smart” (My devices are Jinvoo Smart devices - which makes perfect sense since the app I use to control things is the Jinvoo Smart app. No other configuration was required - after a restart, everything was discovered and works perfectly! This is all I needed in configuration.yaml:

tuya:
  username: 'me@my_email.com'
  password: 'my_secret_password'
  country_code: '1'
  platform: 'jinvoo_smart'
2 Likes

Still have this issue… but I don’t have Tuya or jingo light it’s a merkury one … but I manage it in the Tuya app …

which platform should I put ? (already tried jinvoo, Tuya and smart_life)

for info : https://www.amazon.ca/Merkury-Innovations-2-Pack-COMPATIBLE-GOOGLE/dp/B0792LR3KS

I have a Hassbian run on my RPI3 + and it does not give an error message only that the switches react badly, lots of retry’s I also run 2 virtual Hassio on virtualbox (windows and OSX). only the 2 ’ virtual’ instance gives errors.

To get it to work try using your phone nummber unstead of an email. That fixed my problem