Closed kimhung2 closed 6 years ago
If it has worked in the past, this error might appear because of your network setup. For the time being, you should be able to get it working by removing the resolveIds()
call and passing in the IP of your device to the Tuya constructor.
Yup, skipping resolveIds() and passing IP directly works. Thanks!
👍
Hi, the script was running fine for a few months, and now I got this issue surfaced in the last few weeks. I can confirm that the uuid and localkey are correct and freshly retrieved. I'm using tuyapi v2.0.3. Could you please help? Thanks!
(node:4890) UnhandledPromiseRejectionWarning: Error: resolveIds() timed out. Is the device ID correct and is the device powered on? at timeout (/home/nvidia/mining_monitor/node_modules/tuyapi/index.js:129:11) at Timeout.setTimeout [as _onTimeout] (/home/nvidia/mining_monitor/node_modules/p-timeout/index.js:19:13) at ontimeout (timers.js:458:11) at tryOnTimeout (timers.js:296:5) at Timer.listOnTimeout (timers.js:259:5) (node:4890) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:4890) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.