# Getting find() timed out messages with correct creds

**URL:** https://discourse.nodered.org/t/getting-find-timed-out-messages-with-correct-creds/68334
**Category:** General
**Created:** [28 September 2022 09:30 UTC](https://discourse.nodered.org/t/getting-find-timed-out-messages-with-correct-creds/68334 "2022-09-28T09:30:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tinychaos42](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tinychaos42/32/68361_2.png) [@tinychaos42](https://discourse.nodered.org/u/tinychaos42)
#### Post date: [28 September 2022 09:30 UTC](https://discourse.nodered.org/t/getting-find-timed-out-messages-with-correct-creds/68334/1 "2022-09-28T09:30:32Z")

</div>

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

```auto
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**

```auto
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:

```auto
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 🙂

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

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [27 November 2022 09:31 UTC](https://discourse.nodered.org/t/getting-find-timed-out-messages-with-correct-creds/68334/2 "2022-11-27T09:31:11Z")

</div>

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