Tuya Error in log (v117.0)

Tags: #<Tag:0x00007f328aa90038>

Hello,

After upgrading to v117.0 the Tuya integration is giving errors in the log.
I have only 1 plug and the strange thing is that it still works. So not really a big issue.
I tried to remove and add the integration but I keep on having the same error.

this is the error:

2020-10-30 08:20:07 ERROR (MainThread) [homeassistant.helpers.entity] Update for switch.plug1 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
    raise exc
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/tuya/__init__.py", line 255, in update
    self._tuya.update()
  File "/usr/local/lib/python3.8/site-packages/tuyaha/devices/switch.py", line 16, in update
    return self._update(use_discovery=True)
  File "/usr/local/lib/python3.8/site-packages/tuyaha/devices/base.py", line 84, in _update
    devices = self.api.discovery()
  File "/usr/local/lib/python3.8/site-packages/tuyaha/tuyaapi.py", line 188, in discovery
    response = self._request("Discovery", "discovery")
  File "/usr/local/lib/python3.8/site-packages/tuyaha/tuyaapi.py", line 267, in _request
    self._raise_frequently_invoke(
  File "/usr/local/lib/python3.8/site-packages/tuyaha/tuyaapi.py", line 292, in _raise_frequently_invoke
    raise TuyaFrequentlyInvokeException(message)
tuyaha.tuyaapi.TuyaFrequentlyInvokeException: Method [Discovery] fails 1 time(s) using poll interval 60.0 - error: you can discovery once in 600 seconds

E.

1 Like

This is a Tuya API change error. The problem has been reported. The fix will probably be in the next version of HA.

1 Like

Thank you!!

Hello, for your information, when I try to remove the tuya integration I’ve this error: It’s the same? Thank you

Logger: aiohttp.server
Source: custom_components/tuya/init.py:7
First occurred: 19:22:36 (1 occurrences)
Last logged: 19:22:36

Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py”, line 418, in start
resp = await task
File “/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py”, line 458, in _handle
resp = await handler(request)
File “/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py”, line 119, in impl
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/request_context.py”, line 18, in request_context_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/ban.py”, line 72, in ban_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/auth.py”, line 127, in auth_middleware
return await handler(request)
File “/usr/src/homeassistant/homeassistant/components/http/view.py”, line 129, in handle
result = await result
File “/usr/src/homeassistant/homeassistant/components/config/config_entries.py”, line 89, in delete
result = await hass.config_entries.async_remove(entry_id)
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 642, in async_remove
unload_success = await self.async_unload(entry_id)
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 742, in async_unload
return await entry.async_unload(self.hass)
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 297, in async_unload
component = integration.get_component()
File “/usr/src/homeassistant/homeassistant/loader.py”, line 414, in get_component
cache[self.domain] = importlib.import_module(self.pkg_path)
File “/usr/local/lib/python3.8/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1014, in _gcd_import
File “”, line 991, in _find_and_load
File “”, line 975, in _find_and_load_unlocked
File “”, line 671, in _load_unlocked
File “”, line 783, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/config/custom_components/tuya/init.py”, line 7, in
from tuyaha.tuyaapi import (
ImportError: cannot import name ‘TuyaFrequentlyInvokeException’ from ‘tuyaha.tuyaapi’ (/usr/local/lib/python3.8/site-packages/tuyaha/tuyaapi.py)

To use Tuya, use the component
Tuya Custom. It works without log errors on my led strips.

Hello, I had use custom componet, but now with Home Assistant 0.117.2, the thermostat doesn’t works, therefore I’ve remove the component and try a new installation, but when I select Tuya component I see in the log this error: Error occurred loading configuration flow for integration tuya: No module named ‘custom_components.tuya.config_flow’

When using Tuya Custom, did you remove the original Tuya integration as written in the documentation?

Yes of course

Thanks a lot, can I try this solution: https://blog.iothouse.online/2019/12/tuya-based-thermostat-home-assistant.html

I added my own storage. Removed the original Tuya integration. Installed add-on. Restart. I chose in the integrations and added.
This is the result.

tuya custom

integrace

Where to find this addon? Cannot find inside the addons store…

Is it solved in 0.117.5?

In HACS add your own repository as in the pictures I attached.

1 Like

Did you checked if the problem is solved with 0.117.5?

So far I have 0.117.4 waiting for 117.5

I see it was already released, but in my supervisor it is still not shown…

I have version 0.117.6 now and still getting this tuya error.

Per this thread, it will not be merged and updated until 0.118 is released, as this is a bit of a bigger fix.

Hi, I’m curious as I am running the latest version of hassio 2020.12.7 and I am getting tons and tons of this error. Has it not been fixed in hassio or something?

Logger: homeassistant.components.tuya
Source: components/tuya/__init__.py:382
Integration: Tuya (documentation, issues)
First occurred: January 11, 2021, 5:15:57 AM (160 occurrences)
Last logged: 10:15:54 AM

Method [Discovery] fails 165 time(s) using poll interval 605 - error: you can discovery once in 600 seconds
Method [Discovery] fails 166 time(s) using poll interval 605 - error: you can discovery once in 600 seconds
Method [Discovery] fails 168 time(s) using poll interval 605 - error: you can discovery once in 600 seconds
Method [Discovery] fails 169 time(s) using poll interval 605 - error: you can discovery once in 600 seconds
Method [Discovery] fails 170 time(s) using poll interval 605 - error: you can discovery once in 600 seconds

Not seeing errors here, don’t believe I’ve seen since 0.118. I’m currently running 2021.1.1