localtuya
localtuya copied to clipboard
Connection to device succeeded but no datapoints found, please try again
Cant get it to pair any device via the tuya cloud or by manually adding the devices with local_key, even the zigbee gateway hub cant get paired to the local tuya i get this message (Connection to device succeeded but no datapoints found, please try again. Create a new issue and include debug logs if problem persists.)
"home_assistant": { "installation_type": "Home Assistant OS", "version": "2022.8.1",
"python_version": "3.10.5",
"hacs": {
"version": "1.26.2",
"localtuya": {
"version": "4.0.1",
the same error camera Setti+ SC801
Logger: custom_components.localtuya.pytuya Source: custom_components/localtuya/pytuya/init.py:583 Integration: LocalTuya integration (documentation, issues) First occurred: 17:02:14 (2 occurrences) Last logged: 20:47:24
[bfc...j9j] Failed to get status: Unexpected payload=b'\x8b6kO\xe7n~4\xbf\xbd\xf3\x89\xba\xccH8>\xca1\xbds\xdb\xfa\xcda\x19\xb0\xa7\\xf0\xff\r' Traceback (most recent call last): File "/config/custom_components/localtuya/pytuya/init.py", line 539, in detect_available_dps data = await self.status() File "/config/custom_components/localtuya/pytuya/init.py", line 481, in status status = await self.exchange(STATUS) File "/config/custom_components/localtuya/pytuya/init.py", line 466, in exchange payload = self._decode_payload(msg.payload) File "/config/custom_components/localtuya/pytuya/init.py", line 583, in _decode_payload raise Exception(f"Unexpected payload={payload}") Exception: Unexpected payload=b'\x8b6kO\xe7n~4\xbf\xbd\xf3\x89\xba\xccH8>\xca1\xbds\xdb\xfa\xcda\x19\xb0\xa7\\xf0\xff\r'
I am also getting this error. I'm running the following:
- Home Assistant 2022.8.3 (Docker)
- Frontend 20220802.0 - latest
- HACS 1.26.2
- Localtuya v4.0.1
I'm trying to connect 3 Treatlife SL10 bulbs that I ran the tuya-cloudcutter exploit on (see tuya-cloudcutter issue #88). These bulbs worked with localtuya previous to running the exploit, but I believe I was running a pre-4.0 version of localtuya as well.
Somehow, one of the three bulbs did connect, but then went non-responsive until I set its scan interval to 10 (previously disabled). The other two bulbs will not connect using the "add a device" option in the integration. I did get one of those bulbs working by editing the core.config_entries
file (while Home Assistant was stopped) to duplicate the working device and updating the name, friendly_name, host, local_key, and device_id with the values of the second bulb. I have not tried the same with the third bulb because I'd like to get it working through the interface.
I'm attaching the debug log (device id obfuscated) from my attempt to add this device. The working bulbs are using DPS 20; I don't know why this bulb doesn't seem to report that datapoint.
To add to @marcosrogers comment above, if you are using this workaround (by adding an entry manually in core.config_entries
, you'll also have to add a manual entry in core.entity_registry
- in order to make the newly added entity manageable from the Home Assistant UI.
Duplicate an existing entry and change these values:
config_entry_id
= same as the entry_id
you used in core.config_entries
id
: perhaps increment by 1
device_id
: perhaps increment by 1
unique_id
: generate one by using the device_id
you used in core.config_entries
I did get this error at one time and I found out that the fix was to remove the device from Tuya in from the iot.tuya.com. Once that was done, re-added the device via Tuya or SmartLife. You should be able to re-add it back into integration afterwards.
This looks like an API communicating with Tuya's DB
Use tinytuya to scan network. Will report as Version the protocol being used. If the device is Version 3.4 it it not supported.
The same error. Protocol via tinytuna is 3.3. Device - smart light led strip.
Logger: custom_components.localtuya.pytuya Source: custom_components/localtuya/pytuya/init.py:623 Integration: LocalTuya integration (documentation, issues) First occurred: 00:14:06 (1 occurrences) Last logged: 00:14:06 [bf1...ms7] Failed to get status: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last): File "/config/custom_components/localtuya/pytuya/init.py", line 574, in detect_available_dps data = await self.status() File "/config/custom_components/localtuya/pytuya/init.py", line 507, in status status = await self.exchange(STATUS) File "/config/custom_components/localtuya/pytuya/init.py", line 492, in exchange payload = self._decode_payload(msg.payload) File "/config/custom_components/localtuya/pytuya/init.py", line 623, in _decode_payload return json.loads(payload) File "/usr/local/lib/python3.10/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.10/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) <<<
same here on HY368RT Zigbee (thermostat)
This error originated from a custom integration.
Logger: custom_components.localtuya.pytuya
Source: custom_components/localtuya/pytuya/__init__.py:623
Integration: LocalTuya (documentation, issues)
First occurred: 12:10:40 (3 occurrences)
Last logged: 12:30:31
[bf7...lrw] Failed to get status: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/config/custom_components/localtuya/pytuya/__init__.py", line 574, in detect_available_dps
data = await self.status()
File "/config/custom_components/localtuya/pytuya/__init__.py", line 507, in status
status = await self.exchange(STATUS)
File "/config/custom_components/localtuya/pytuya/__init__.py", line 492, in exchange
payload = self._decode_payload(msg.payload)
File "/config/custom_components/localtuya/pytuya/__init__.py", line 623, in _decode_payload
return json.loads(payload)
File "/usr/local/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.10/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)
p.s. it would be useful to have descriptions for the fields. For example, Host
.... meaning what? It's the name of the gateway? IP of the gateway? MAC Address of the device?
I did get this error at one time and I found out that the fix was to remove the device from Tuya in from the iot.tuya.com. Once that was done, re-added the device via Tuya or SmartLife. You should be able to re-add it back into integration afterwards.
This looks like an API communicating with Tuya's DB
This fixed it for me as well. I had the same error when trying to add a new device in localtuya. Adding the first light worked perfectly, adding the second light gave this error. After removing device from Tuya app and readding it, the error in localtuya was solved.
Thanks1
Maybe stupid question, but how do you delete device from iot.tuya.com? I can't find that option...
Maybe stupid question, but how do you delete device from iot.tuya.com? I can't find that option...
I didn't delete it from iot.tuya, but from the Android app (remove and wipe device). That made it also disappear from the iot.tuya device list.
Still having this issue on this plug -- detected by the integration and by tinytuya
just fine, but I get this error every time I try to add it:
Connection to device succeeded but no datapoints found, please try again. Create a new issue and include debug logs if problem persists.
Can confirm that removing the device through the SmartLife app and re-adding it does not solve the problem. Can confirm that the device is on 3.3. Can confirm that my cloud account is linked correctly. Can control the plug via the cloud-based Tuya integration, but not this one.
Hi! I have noticed same problems with https://zigbee.blakadder.com/Lidl_TYGWZ-01.html Where you can define those datapoints anyway?
I am facing similar issues for a month now. It all started when one of the device appeared as unavailable & suddenly be available again.
When i went to reset the plugin- keep getting error 1106 for cloud API but adding devices manually gives no data points found. I'm on Original Tuya app and can see my devices in my project on iot.tuya.com Repairing from the app has proved futile. At the time of writing this got the Tuya Plugin (cloud API) to work.
till this point local tuya (HACS) was working smoothly for almost a year. I have local keys for all my devices. Is there any solution or is that the end for local Tuya ?
Same problem with a switch. I managed to add it to LocalTuya correctly, then after a couple hours it became unavailable. I tried removing it from LocalTuya but when I add it again I now get this error. I have no idea how to solve. Is there a way to discover the needed DPs and add them manually? Removing the switch from Tuya's app did not solve. The switch works correctly in Tuya's app and shows up in the Tuya IoT website.
I have an issue with datapoints for 1 of my devices. I have similar devices that still works but whatever I do I can't get it to work. I even tried to add the datapoint manually, but it's just stays unavailable. Hope this get fixed
The same error. Protocol via tinytuna is 3.3. Device - smart light led strip.
Logger: custom_components.localtuya.pytuya Source: custom_components/localtuya/pytuya/init.py:623 Integration: LocalTuya integration (documentation, issues) First occurred: 00:14:06 (1 occurrences) Last logged: 00:14:06 [bf1...ms7] Failed to get status: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last): File "/config/custom_components/localtuya/pytuya/init.py", line 574, in detect_available_dps data = await self.status() File "/config/custom_components/localtuya/pytuya/init.py", line 507, in status status = await self.exchange(STATUS) File "/config/custom_components/localtuya/pytuya/init.py", line 492, in exchange payload = self._decode_payload(msg.payload) File "/config/custom_components/localtuya/pytuya/init.py", line 623, in _decode_payload return json.loads(payload) File "/usr/local/lib/python3.10/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.10/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 now I know what was the issue on my side. It appears to be that localKey is regenerated every time I reset the device ("wipe data") and it is NOT permanent - it is differrent after every regeneration. It worked perfectly since I figured this thing out.