Closed tinychaos42 closed 2 years ago
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
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
To Reproduce Steps to reproduce the behavior:
tuya-cli
to fetch ID and key for the switch (tried with IP as well as with ID)Expected behavior I'd expect the node to connect and eventually me being able to flip the swithc on and off
Debug Output
Desktop:
Additional context New to the whole spiel of Node-Red, Tuya, etc, so apologies if I filed this in the wrong place. Also filed it as https://github.com/codetheweb/tuyapi/issues/600 as I am not sure if the issue is with the API lib or this node