Getting find() timed out messages with correct creds
tinychaos42 opened this issue · 2 comments
The bug / issue
Got a smart switch through Smart Life. Registered the right things on Tuya IOT platform. Entered the right credentials into tuya-smart-device node in Node-RED. Can confirm that the switch is working through IOS app as well as Tuya debug mode, but when the node is running in Node-RED, I am getting
27 Sep 19:21:01 - [error] [tuya-smart-device:Switch] find() timed out. Is the device powered on and the ID or IP correct?
27 Sep 19:21:01 - [info] [tuya-smart-device:Switch] findDevice(): Cannot find the device, re-trying...
27 Sep 19:21:02 - [info] [tuya-smart-device:Switch] findDevice(): Initiating the find command
To Reproduce
Steps to reproduce the behavior:
- Configure Smart Life device
- Configure Smart Life device through Tuya IOT Platform, fetch credentials (key/secret etc)
- Configure and use
tuya-cli
to fetch ID and key for the switch (tried with IP as well as with ID) - See error
Expected behavior
I'd expect the node to connect and eventually me being able to flip the swithc on and off
Debug Output
27 Sep 19:23:35 - [error] [tuya-smart-device:Switch] find() timed out. Is the device powered on and the ID or IP correct?
27 Sep 19:23:35 - [info] [tuya-smart-device:Switch] findDevice(): Cannot find the device, re-trying...
27 Sep 19:23:36 - [info] [tuya-smart-device:Switch] findDevice(): Initiating the find command
Desktop:
- OS: MacOS OSX Big Sur
- OS Version 11.7
- Node Version 17.4.0
Additional context
New to the whole spiel of Node-Red, Tuya, etc, so apologies if I filed this in the wrong place.
If I add in the IP as well as changing the protocol to 3.3
, I am getting the following log:
27 Sep 19:29:33 - [info] [tuya-smart-device:Switch] startComm(): Connecting to Tuya with params {"id":"YYYYYYY","key":"XXXXXXX","ip":"188.x.x.x","issueGetOnConnect":false,"nullPayloadOnJSONError":false,"version":"3.3"} , findTimeout : 10000 , retryTimeout: 1000
27 Sep 19:29:33 - [info] [tuya-smart-device:Switch] findDevice(): Initiating the find command
27 Sep 19:29:33 - [info] [tuya-smart-device:Switch] findDevice(): Found device, going to connect
27 Sep 19:29:38 - [info] [tuya-smart-device:Switch] Error from tuyaDevice. shouldTryReconnect = true, error = {}
27 Sep 19:29:38 - [error] [tuya-smart-device:Switch] Error: connection timed out
27 Sep 19:29:38 - [info] [tuya-smart-device:Switch] Will try to reconnect after 1000 milliseconds
27 Sep 19:29:38 - [info] [tuya-smart-device:Switch] connectDevice(): An error had occurred with tuya API on connect method : {}
27 Sep 19:29:38 - [info] [tuya-smart-device:Switch] connectDevice(): retrying the connect
27 Sep 19:29:39 - [info] [tuya-smart-device:Switch] Retrying connection...
27 Sep 19:29:44 - [info] [tuya-smart-device:Switch] Error from tuyaDevice. shouldTryReconnect = true, error = {}
Closing: installed the device through tuya app, got credentials through tuya iot website and it's working fine with a tuya based nodered module