You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have MANY LocalTuys devices. Purchased several GHome devices. Successfully added the Ghome devices to Tuya Smart. Able to get the stats and details in jSON while in tuya developer. Unable to add them in Local Tuya - each dps reports "-1"
Was the device working with earlier versions of localtuya ? Which one? N/A
Are you using the Tuya/SmartLife App in parallel ?
Steps to reproduce
LocalTuya --> Configure --> Add a new device --> Submit --> select "..." --> Submit --> Enter the required information including the Name, Host, Device ID, local Key, Protocol Version (currently 3.3 but tried the others), and the comma separated Manual DPS --> Submit
It creates the device but all the values are "-1" and nothing functions.
The only consistent log entries I've seen are below for the device.
2024-12-15 12:44:47.727 ERROR (MainThread) [custom_components.localtuya.pytuya] [ebc...njz] Failed to get status:
Traceback (most recent call last):
File "/usr/local/lib/python3.13/asyncio/tasks.py", line 507, in wait_for
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/locks.py", line 407, in acquire
await fut
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/localtuya/pytuya/__init__.py", line 863, in detect_available_dps
data = await self.status()
^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/localtuya/pytuya/__init__.py", line 795, in status
status = await self.exchange(DP_QUERY)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/localtuya/pytuya/__init__.py", line 769, in exchange
msg = await self.dispatcher.wait_for(seqno, payload.cmd)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/localtuya/pytuya/__init__.py", line 450, in wait_for
await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout)
File "/usr/local/lib/python3.13/asyncio/tasks.py", line 506, in wait_for
async with timeouts.timeout(timeout):
~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/timeouts.py", line 116, in __aexit__
raise TimeoutError from exc_val
TimeoutError
2024-12-15 12:50:34.923 INFO (MainThread) [custom_components.localtuya.common] [ebc...njz] Trying to connect to 192.xxx.xxx.xxx...
2024-12-15 12:50:34.925 WARNING (SyncWorker_2) [homeassistant.helpers.frame] Detected that custom integration 'localtuya' calls async_dispatcher_send from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#async_dispatcher_send at custom_components/localtuya/common.py, line 351: async_dispatcher_send(self._hass, signal, self._status). Please report it to the author of the 'localtuya' custom integration
2024-12-15 12:50:34.932 ERROR (SyncWorker_51) [homeassistant.util.logging] Exception in _new_entity_handler when dispatching 'localtuya_entity_eb5502c366b4a04337quls': ('sensor.patio_lights_custom_color',)
Traceback (most recent call last):
File "/config/custom_components/localtuya/common.py", line 263, in _new_entity_handler
self._dispatch_status()
~~~~~~~~~~~~~~~~~~~~~^^
File "/config/custom_components/localtuya/common.py", line 351, in _dispatch_status
async_dispatcher_send(self._hass, signal, self._status)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/dispatcher.py", line 214, in async_dispatcher_send
hass.verify_event_loop_thread("async_dispatcher_send")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 474, in verify_event_loop_thread
frame.report_non_thread_safe_operation(what)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 368, in report_non_thread_safe_operation
report(
~~~~~~^
f"calls {what} from a thread other than the event loop, "
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<5 lines>...
error_if_integration=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 164, in report
report_usage(
~~~~~~~~~~~~^
what,
^^^^^
...<4 lines>...
level=level,
^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 242, in report_usage
_report_integration_frame(
~~~~~~~~~~~~~~~~~~~~~~~~~^
what,
^^^^^
...<3 lines>...
integration_behavior is ReportBehavior.ERROR,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 340, in _report_integration_frame
raise RuntimeError(
...<5 lines>...
)
RuntimeError: Detected that custom integration 'localtuya' calls async_dispatcher_send from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#async_dispatcher_send at custom_components/localtuya/common.py, line 351: async_dispatcher_send(self._hass, signal, self._status). Please report it to the author of the 'localtuya' custom integration
Additional information
Similar situation with a batch of plugs GHome purchased, added in Tuya Smart, can query via the tuya developer but gives a "-1" for all the DSP values
The text was updated successfully, but these errors were encountered:
The problem
Have MANY LocalTuys devices. Purchased several GHome devices. Successfully added the Ghome devices to Tuya Smart. Able to get the stats and details in jSON while in tuya developer. Unable to add them in Local Tuya - each dps reports "-1"
Environment
Steps to reproduce
DP dump
and from Tiny Tuya:
[PowerStrip24] 192.xxx.xxx.xxx - [On] - DPS: {'1': True, '2': True, '3': True, '4': True, '5': True, '6': True, '7': True, '9': 0, '10': 0, '11': 0, '12': 0, '13': 0, '14': 0, '15': 0, '18': 0, '19': 0, '20': 1220, '38': 'memory', '40': 'relay', '41': False, '42': '', '43': '', '44': ''}
Provide Home Assistant traceback/logs
The only consistent log entries I've seen are below for the device.
Additional information
Similar situation with a batch of plugs GHome purchased, added in Tuya Smart, can query via the tuya developer but gives a "-1" for all the DSP values
The text was updated successfully, but these errors were encountered: