question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support 0d devices

See original GitHub issue

I’m using tuyaApi in node-red, via node node-red-contrib-tuya-smart-device. I have 20+ Tuya devices, like switches, sensors, ad some ZigBee devices. All devices work well in smartLife app. The node-red actual comportment is:

  1. All devices (except some sensors) accepts “SET” commands:

Example, using a real device, a switch, the command (sets the switch on for 10 s) : payload: { multiple: true, data: { 1: true, 102: 10}} produces the answer: 12 Dec 11:50:26 - [info] [tuya-smart-device:fe3fbeb2.ac31f] Data from device: "{"dps":{"1":true,"102":10},"t":1607770225}"

Using a virtual device, i.e. a radiator controller and ZigBee hub, the command (sets the target temperature) payload: { "devId": "60a423fffeb5b90d", "dps": 103, "set": 220 } produces the answer: 12 Dec 12:06:24 - [info] [tuya-smart-device:a9ea9736.7483f8] Data from device: "{"dps":{"103":220},"cid":"60a423fffeb5b90d","type":query,"t":1607771183}"

  1. I get a message also when some values are changed in smartLife, e.g.:

12 Dec 12:14:08 - [info] [tuya-smart-device:fe3fbeb2.ac31f] Data from device: "{"dps":{"1":true},"t":1607771648}" 12 Dec 12:16:12 - [info] [tuya-smart-device:a9ea9736.7483f8] Data from device: "{"dps":{"101":47},"cid":"00158d00056e5022","t":1607771771}"

  1. I get also messages in case of an event on the device, or from the sensors (without any request):

Switch countdown end: 12 Dec 11:50:36 - [info] [tuya-smart-device:fe3fbeb2.ac31f] Data from device: "{"dps":{"1":false,"102":0},"t":1607770235}" Temperature from a ZigBee sensor, about every 3600s (request by Tuya cloud?): 12 Dec 12:14:28 - [info] [tuya-smart-device:a9ea9736.7483f8] Data from device: "{"dps":{"103":215},"cid":"60a423fffeb5b90d","t":1607771667}"

It sounds good, so all ok? Sorry, not really.

  1. Any ‘GET’ command in any device (real, virtual, …) in any form, don’t work! Always I get:

12 Dec 11:32:32 - [error] [tuya-smart-device:fe3fbeb2.ac31f] json obj data unvalid

This is a big problem because I cannot poll any RO device data points, so some parameters are unreachable.

(see also issue #246 and issue #23) I tryed also a tuyapi update to version 6, but no changes.

I found it very strange that the answer to a ‘SET’ command from node-red is always handled well, and the answer to a ‘GET’ command gets always an error (but the answer is well processed if the ‘GET’ is from the cloud).

Any idea?

Best regards m.sillano

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:26 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
codethewebcommented, Mar 12, 2021

possibly save this flag for the given device

Save for the current constructed instance yes, for future program executions no.

possibly give the user an option to set the flag manually upfront

Definitely.

should the subsequent calls be performed from within the get(options={}) method or should the api return after every request. This applies both to dps query and the switching to the CONTROL_NEW command.

If you’re asking whether await get() should resolve before dps queries / switching to the 0d scheme is finished I’d say no.

Everything else sounds good, thanks for taking a look!

1reaction
Apollon77commented, Jan 15, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error code '0d'! Please help! - Overclock.net
I attempted to: replace the motherboard, replace the CPU, swap out the RAM, remove the GPU (and running on the MOBO), remove all...
Read more >
List of available trusted root certificates in iOS 12, macOS ...
Certificate name Issued by Type Key size Sig alg Ex... AAA Certificate Services AAA Certificate Services RSA 2048 bits SHA‑1 23... AC RAIZ FNMT‑RCM AC...
Read more >
HP Color LaserJet Enterprise flow MFP M880 Printers - 49.38 ...
0D error message is displayed on the control panel, it indicates that there is an exception error in the printer's firmware. This error...
Read more >
VFIO - “Virtual Function I/O” - The Linux Kernel documentation
The IOMMU API therefore supports a notion of IOMMU groups. A group is a set of devices which is ... Assume user wants...
Read more >
CONTACT BLOCK - 3SB3403-0D - Industry Support Siemens
3SB3403-0D CONTACT BLOCK ACTUATOR-/INDICATOR COMPONENT CONTACT BLOCK WITH 2 CONTACTS ... Manual Configuration Manual - SIRIUS Command and Signaling Devices.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found