-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timeout waiting for status response -- UnhandledPromiseRejectionWarning #109
Comments
This seems to be the same issue as: |
Could you run
Teckin devices specifically seem to work slightly differently and I don't think we've been able to nail down the issue yet. |
|
My guess is that your devices are a '0d' type, which is not currently supported. If you're able to, it would be greatly appreciated if you applied the modifications for the GET command listed in the linked comment and tested to see if there's still an error message. |
Ok, following the description in the link I modified
Now the error message is gone, but the return value of
And here is the debug output of the above commands. (If I do not misinterpret the debug output, the device returns the state correctly, i.e.
|
I am having the same or a similar issue. I can turn a switch on and off ok, but cannot get the state to see if its on or off. Set it on `pi@raspberrypi:~ $ tuya-cli set --id bf50780f03636fe9ebjxxd --key 6eb72d1d45ef4a40 --set true Set succeeded. node:internal/process/promises:227 triggerUncaughtException(err, true /* fromPromise */); ^ Error [ERR_UNHANDLED_ERROR]: Unhandled error. ('Timeout waiting for status response from device id: bf50780f03636fe9ebjxxd') at new NodeError (node:internal/errors:329:5) at TuyaDevice.emit (node:events:368:17) at /usr/local/lib/node_modules/@tuyapi/cli/node_modules/tuyapi/index.js:256:12 at Timeout._onTimeout (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/p-timeout/index.js:25:13) at listOnTimeout (node:internal/timers:556:17) at processTimers (node:internal/timers:499:7) { code: 'ERR_UNHANDLED_ERROR', context: 'Timeout waiting for status response from device id: bf50780f03636fe9ebjxxd' ` and then get the status `pi@raspberrypi:~ $ env DEBUG='*' tuya-cli get state --id bf50780f03636fe9ebjxxd --ip 192.168.1.70 --key 6eb72d1d45ef4a40 --protocol-version 3.3 TuyAPI IP and ID are already both resolved. +0ms TuyAPI Connecting to 192.168.1.70... +6ms TuyAPI Socket connected. +55ms TuyAPI GET Payload: +1ms TuyAPI { TuyAPI gwId: 'bf50780f03636fe9ebjxxd', TuyAPI devId: 'bf50780f03636fe9ebjxxd', TuyAPI t: '1612092708', TuyAPI dps: {}, TuyAPI uid: 'bf50780f03636fe9ebjxxd' TuyAPI } +0ms TuyAPI GET Payload: +12ms TuyAPI { TuyAPI gwId: 'bf50780f03636fe9ebjxxd', TuyAPI devId: 'bf50780f03636fe9ebjxxd', TuyAPI t: '1612092708', TuyAPI dps: {}, TuyAPI uid: 'bf50780f03636fe9ebjxxd' TuyAPI } +0ms TuyAPI Received data: 000055aa000000010000000a0000002c000000012be1e532c20b21630e87127b7f341717cf66ae55174d17af97da5c47e538f73782f3cba00000aa55 +7ms TuyAPI Parsed: +2ms TuyAPI { TuyAPI payload: 'json obj data unvalid', TuyAPI leftover: false, TuyAPI commandByte: 10, TuyAPI sequenceN: 1 TuyAPI } +0ms TuyAPI SET Payload: +2ms TuyAPI { TuyAPI devId: 'bf50780f03636fe9ebjxxd', TuyAPI gwId: 'bf50780f03636fe9ebjxxd', TuyAPI uid: '', TuyAPI t: 1612092707, TuyAPI dps: { '1': null } TuyAPI } +0ms TuyAPI Received data: 000055aa000000020000000a0000002c000000012be1e532c20b21630e87127b7f341717cf66ae55174d17af97da5c47e538f737bd38b5350000aa55 +4ms TuyAPI Parsed: +1ms TuyAPI { TuyAPI payload: 'json obj data unvalid', TuyAPI leftover: false, TuyAPI commandByte: 10, TuyAPI sequenceN: 2 TuyAPI } +0ms TuyAPI Disconnect +1ms TypeError: Cannot read property '1' of undefined at Object.get (/usr/local/lib/node_modules/@tuyapi/cli/lib/control.js:56:30) at processTicksAndRejections (node:internal/process/task_queues:94:5) TuyAPI Socket closed: 192.168.1.70 +4ms node:internal/process/promises:227 triggerUncaughtException(err, true /* fromPromise */); ^ Error [ERR_UNHANDLED_ERROR]: Unhandled error. ('Timeout waiting for status response from device id: bf50780f03636fe9ebjxxd') at new NodeError (node:internal/errors:329:5) at TuyaDevice.emit (node:events:368:17) at /usr/local/lib/node_modules/@tuyapi/cli/node_modules/tuyapi/index.js:256:12 at Timeout._onTimeout (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/p-timeout/index.js:25:13) at listOnTimeout (node:internal/timers:556:17) at processTimers (node:internal/timers:499:7) { code: 'ERR_UNHANDLED_ERROR', context: 'Timeout waiting for status response from device id: bf50780f03636fe9ebjxxd' ` Any help/suggestions very welcome or anything I can do to help please let me know Barry |
@AndreasMatthias thank you for confirming. I don't currently have enough free time to implement 0d devices, but feel free to follow this issue for updates. Also happy to accept PRs. :) @BarryW55 I'm pretty sure you're having the same issue as well. |
I can switch on/off a WiFi socket (from Teckin) successfully but I get this error message:
Trying to GET the value triggers the same error message:
The text was updated successfully, but these errors were encountered: