Getting find() timed out messages with correct creds

Hi folks, not sure if nodered forum is the right place to put this question, but I've put this on 2x relevant GH repos as well, and I'll close/update them according to my progress with the issue.

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

  1. Configure Smart Life device irl
  2. Configure Smart Life device through Tuya IOT Platform, fetch credentials (key/secret etc)
  3. Configure and use tuya-cli to fetch ID and key for the switch (tried with IP as well as with ID)
  4. See error

Expected behavior
I'd expect the node to connect in node-red and eventually me being able to flip the switch 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.

Update:

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  = {}

What I am looking for is next steps wrt debugging in Node-red. I've added HTTP logger and successfully configured it as well, but for some reason I can't inspect the calls that are made by these 'custom' nodes. Any directions towards more successful debugging is why I am here really :slight_smile:

I have a gut sense that this is related to regional configuration of smart life + tuya, but I'd rather not start with deleting and re-installing everything (including IOS app, etc) into US region. Currently my config is EU/central EU.

Thanks

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.