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.
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:
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.