Skip to content

Timeout waiting for status response -- UnhandledPromiseRejectionWarning #109

@AndreasMatthias

Description

@AndreasMatthias

I can switch on/off a WiFi socket (from Teckin) successfully but I get this error message:

$ tuya-cli set --id XXXX --key YYYY --ip 192.168.2.121 --protocol-version 3.3 --set true

Set succeeded.
(node:8912) UnhandledPromiseRejectionWarning: Error [ERR_UNHANDLED_ERROR]: Unhandled error. ('Timeout waiting for status response from device id: XXXX')
    at TuyaDevice.emit (events.js:187:17)
    at pTimeout (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/tuyapi/index.js:256:12)
    at Timeout.setTimeout [as _onTimeout] (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/p-timeout/index.js:25:13)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
(node:8912) 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:8912) [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.

Trying to GET the value triggers the same error message:

$ tuya-cli get --id XXXX --key YYYY --ip 192.168.2.121 --protocol-version 3.3 --all

json obj data unvalid
(node:9167) UnhandledPromiseRejectionWarning: Error [ERR_UNHANDLED_ERROR]: Unhandled error. ('Timeout waiting for status response from device id: XXXX')
    at TuyaDevice.emit (events.js:187:17)
    at pTimeout (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/tuyapi/index.js:256:12)
    at Timeout.setTimeout [as _onTimeout] (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/p-timeout/index.js:25:13)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
(node:9167) 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:9167) [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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions