Open snowgumrd opened 3 years ago
I believe doesn't return the response we expect. Can you enable logging and post it here so we can debug?
logger:
default: warning
logs:
custom_components.localtuya: debug
logger: default: warning logs: custom_components.localtuya: debug
Sorry. Only just saw this. I'll enable the logger now. I'll check the log tomorrow and post what I find.
Update: As I mentioned on another issue, I can't get the integration working again. When I rolled back to 3.0.1, it keeps complaining that the integration can't be found so I've uninstalled it for now.
Did you manage to get any logs?
Did you manage to get any logs?
No. Last time I tried, everything had fallen over with 3.0.3. I've just added a new switch today so I'll try the logger again.
@postlund When I try to set up my light with 3.3, I get the response (Failed to authenticate with device. Verify that device id and local key are correct.) with log below:
Logger: custom_components.localtuya.pytuya Source: custom_components/localtuya/pytuya/init.py:515 Integration: LocalTuya (documentation) First occurred: 2:55:03 PM (1 occurrences) Last logged: 2:55:03 PM
[68xxxxxxxxxxxa] Failed to get status: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last): File "/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/custom_components/localtuya/pytuya/init.py", line 466, in detect_available_dps data = await self.status() File "/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/custom_components/localtuya/pytuya/init.py", line 428, in status status = await self.exchange(STATUS) File "/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/custom_components/localtuya/pytuya/init.py", line 413, in exchange payload = self._decode_payload(msg.payload) File "/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/custom_components/localtuya/pytuya/init.py", line 515, in _decode_payload return json.loads(payload) File "/opt/Home-Assistant/lib/python3.8/json/init.py", line 357, in loads return _default_decoder.decode(s) File "/opt/Home-Assistant/lib/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/opt/Home-Assistant/lib/python3.8/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
And when I try with 3.1, the error shows (An unknown error occurred. See log for details.) log below shows up:
Logger: custom_components.localtuya.pytuya Source: custom_components/localtuya/pytuya/init.py:206 Integration: LocalTuya (documentation) First occurred: 2:55:13 PM (1 occurrences) Last logged: 2:55:13 PM
[68xxxxxxxxxxx4a] Failed to get status: Traceback (most recent call last): File "/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/custom_components/localtuya/pytuya/init.py", line 466, in detect_available_dps data = await self.status() File "/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/custom_components/localtuya/pytuya/init.py", line 428, in status status = await self.exchange(STATUS) File "/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/custom_components/localtuya/pytuya/init.py", line 407, in exchange msg = await self.dispatcher.wait_for(seqno) File "/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/custom_components/localtuya/pytuya/init.py", line 206, in wait_for await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout) File "/opt/Home-Assistant/lib/python3.8/asyncio/tasks.py", line 490, in wait_for raise exceptions.TimeoutError() asyncio.exceptions.TimeoutError
ALONG with
Logger: custom_components.localtuya.config_flow Source: custom_components/localtuya/pytuya/init.py:206 Integration: LocalTuya (documentation) First occurred: 2:55:13 PM (1 occurrences) Last logged: 2:55:13 PM
Unexpected exception Traceback (most recent call last): File "/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/custom_components/localtuya/config_flow.py", line 238, in async_step_basic_info self.dps_strings = await validate_input(self.hass, user_input) File "/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/custom_components/localtuya/config_flow.py", line 173, in validate_input detected_dps = await interface.detect_available_dps() File "/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/custom_components/localtuya/pytuya/init.py", line 466, in detect_available_dps data = await self.status() File "/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/custom_components/localtuya/pytuya/init.py", line 428, in status status = await self.exchange(STATUS) File "/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/custom_components/localtuya/pytuya/init.py", line 407, in exchange msg = await self.dispatcher.wait_for(seqno) File "/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/custom_components/localtuya/pytuya/init.py", line 206, in wait_for await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout) File "/opt/Home-Assistant/lib/python3.8/asyncio/tasks.py", line 490, in wait_for raise exceptions.TimeoutError() asyncio.exceptions.TimeoutError
@snowgumrd Can you try to install localtuya from master
, enable debug logs, try to add your device and then paste the log here? It will help me trouble shoot this.
Hi, I've been having issues trying to install a ceiling light that works normally in Tuya.
I can see the ip and the Device ID in config via the GUI, but it throws up an error, logged as below. I have an energy monitoring switch set up that works so I don't think the component files are the cause.
If if helps, it's also showing this other error in the logs: