unparagoned / njsTuya

Openhab interface for Tuya home automation devices sold under various names
27 stars 11 forks source link

"Error: find() timed out." when running "sudo node node_modules/njstuya" #25

Closed szotyesz89 closed 4 years ago

szotyesz89 commented 4 years ago

Hi, I am a newbie in nodejs and openhab.

Could You please explain also Configuration section, where to create this rule? var resp = executeCommandLine("node /etc/openhab2/scripts/node_modules/njstuya" + command, 50000) logInfo("Tuya", "Run Command: [{}] Result {}", command, resp)

I get an timeout error, when I run "sudo node node_modules/njstuya" with next error message Error: find() timed out. Is the device powered on and the ID or IP correct? (node:3489) UnhandledPromiseRejectionWarning: undefined (node:3489) 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:3489) [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. (node:3489) UnhandledPromiseRejectionWarning: Error: find() timed out. Is the device powered on and the ID or IP correct? (node:3489) 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: 2)

when I run it without sudo there is another error according to port 6666: Error: bind EADDRINUSE 0.0.0.0:6666 (node:3525) UnhandledPromiseRejectionWarning: Error: bind EADDRINUSE 0.0.0.0:6666 (node:3525) 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:3525) [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. (node:3525) UnhandledPromiseRejectionWarning: undefined (node:3525) 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: 2)

Could you please advise, how to troubleshoot this kind of error? platform: Lubuntu Linux szotyesz 4.15.0-50-generic #54-Ubuntu SMP Mon May 6 18:46:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux installed apps: nodejs: v8.10.0 openhab: 2.4.0

Thank you very much for help Have a nice day

PS: I updated nodejs to 12.8.0 but did not help

steve1066d commented 4 years ago

I'm having the same issue.

I also had openhab 2.4. from a new install of openhabian. I'm able to get it to work using the cloud option, but not local. I also tried openHAB 2.5.0.M5