unparagoned / njsTuya

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

Does this also work with the Woox products? #22

Closed ThaDaVos closed 5 months ago

ThaDaVos commented 5 years ago

I read that the Woox products are based on Tuya chips but when running the following command I'm getting an error:

node node_modules/njstuya

Error: find() timed out. Is the device powered on and the ID or IP correct?
(node:13637) UnhandledPromiseRejectionWarning: undefined
(node:13637) 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:13637) [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:13637) UnhandledPromiseRejectionWarning: Error: find() timed out. Is the device powered on and the ID or IP correct?
(node:13637) 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)
unparagoned commented 5 years ago

please run the following a couple times

DEBUG=* node node_modules/njstuya
ThaDaVos commented 5 years ago

Just had time to do it - getting the following (I've ran it from WSL because DEBUG=* is unknown in powershell): image

ThaDaVos commented 5 years ago

Is it maybe that the lights shouldn't be added/registered in the app?

emberderek commented 4 years ago

Hey i have similar issue with woox RGBW bulb (R4553)

In cloud mode all working fine, but if i try local mode i got this: (.venv) pi@picroft:/etc/openhab2/scripts/node_modules/njstuya $ DEBUG=* node njstuya.js -mode local -ip 192.168.125.97 -id 28046251d8bfc05445df -key 44d11f08db5b9fa1 ON njstuya booting njstuya +0ms njstuya "{argName} value is: 192.168.125.97 +6ms njstuya "{argName} value is: 28046251d8bfc05445df +0ms njstuya "{argName} value is: 44d11f08db5b9fa1 +1ms njstuya "{argName} value is: local +0ms njstuya api {"userName":"xxxxxxx@gmail.com","password":"xxxxxxxx","countryCode":"44","bizType":"tuya","region":"EU"} or xxxxx@gmail.com +10ms TuyAPI Connecting to 192.168.125.97... +0ms TuyAPI Socket connected. +100ms njstuya Connected to device! +106ms TuyAPI GET Payload: +2ms TuyAPI { gwId: '28046251d8bfc05445df', devId: '28046251d8bfc05445df' } +0ms TuyAPI Disconnect +10s (node:30032) UnhandledPromiseRejectionWarning: undefined (node:30032) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:30032) [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. TuyAPI Socket closed: 192.168.125.97 +9ms njstuya Disconnected from device. +10s

Regards!

unparagoned commented 3 years ago

Can you try with the latest updated version