simeonovp / node-red-contrib-tuya-devices

Support for Tuya devices in SmartHome projects using Node-RED. The goal of the project is to allow using local devices supports Tuya in Node-Red
MIT License
6 stars 1 forks source link

Timeout issues with local devices #1

Closed At-Home-with-Automation closed 1 month ago

At-Home-with-Automation commented 10 months ago

Hi I'm using you nodes, and they are starting to work well, They do connect to the devices and I can read status's,

However when I try and set the dps value, I get the below error:

Error: "Timeout waiting for status response from device id: "

I can see that it is connected, and it has the IP address.

but cant write the new value.

I have an Inject Node inserting a msg.payload of true and one of false, they enter the function node that has the below function,

msg.payload ={ //dps : 1, dps: 20, set : msg.payload }

/*

*/

return msg;

then inserts it into the connected device node.

Any help would be appreciated.

andreyxc commented 8 months ago

I receive data, but can’t send it?

SuperNinja73 commented 7 months ago

me too, I can't activate my local wifi "smart plug". I also have a function node which injects :

msg.payload ={
  dps: 1, //switch_1
  set : msg.payload // true or false
}
return msg

image

19 Jan 14:27:00 - [info] [tuya-device:smart plug] Recieved input : {"_msgid":"a337f9f0559c9956","payload":{"dps":1,"set":true}}
19 Jan 14:27:05 - [info] [tuya-local-device:smart plug] Error from tuyaDevice. shouldTryReconnect=true, error"Timeout waiting for status response from device id: xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
19 Jan 14:27:05 - [info] [tuya-local-device:smart plug] This error can be due to invalid DPS values. Please check the dps values in the payload !!!!
19 Jan 14:27:05 - [info] [tuya-local-device:smart plug] Will try to reconnect after 1000 milliseconds
19 Jan 14:27:06 - [info] [tuya-local-device:smart plug] Retrying connection...
19 Jan 14:27:06 - [info] [tuya-local-device:smart plug] connectDevice() : already connected. skippig the connect call

but I also get the error: "Timeout waiting for status response from device id: xxxx" And in addition: "This error can be due to invalid DPS values. Please check the dps values in the payload!!!!" But this is the payload that I usually use to control the smart plug ! @simeonovp do you have any advice to give us?

andread86 commented 7 months ago

Hello all, have you find a mode to set a dps in a local device? I'm facing the same issues reported here.

Thanks and regards, Andrea

simeonovp commented 7 months ago

@SuperNinja73: You can try: image The DP is configured in the device settings: image

SuperNinja73 commented 7 months ago

@simeonovp node-red-contrib-tuya-devices v1.0.4

image image dps I can't configure the DP !!?? obviously I have the invalid DP value error.

21 Jan 09:35:37 - [info] [tuya-local-device:cube switch] Connected to device! name:cube switch, ip:192.168.1.164
21 Jan 09:36:42 - [info] [tuya-device:cube switch] Recieved input : {"_msgid":"4748fd74891b3824","payload":true,"operation":"SET"}
21 Jan 09:36:47 - [info] [tuya-local-device:cube switch] Error from tuyaDevice. shouldTryReconnect=true, error"Timeout waiting for status response from device id: bfc069ab27019e5db0vbbx"
21 Jan 09:36:47 - [info] [tuya-local-device:cube switch] This error can be due to invalid DPS values. Please check the dps values in the payload !!!!

I understand that you don't have time to do the complete documentation in your todo list, but maybe a simple example of flow could help us ?

lLarryLaffer commented 6 months ago

I understand that you don't have time to do the complete documentation in your todo list, but maybe a simple example of flow could help us ?

The dropdown with the DPs was filled here, after injecting the topic "updateDevices" to the Tuyamanager Node. but I also get the same error message [info] [tuya-local-device:RolloBuero] Error from tuyaDevice. shouldTryReconnect=true, error"Timeout waiting for status response from device id: 00408470cc50e3e70860"

did you reslove the problem. I'm running nodered in Docker on my NAS. maybe there are some port forwardings missing.

simeonovp commented 6 months ago

@lLarryLaffer: Last week I invested a few hours in the project again because I put new Tuya devices into operation. With "npm install node-red-contrib-tuya-devices" version 1.1.1 should be available. I have attached some screenshots in the document. In the version some bugs have been fixed and some improvements have been made. Among other things, I was now able to communicate with Bluetooth (BLE) Tuya devices behind a gateway. With the Refresh button in the Manager Config, the cloud refresh should now take place even without InjectNode. I have a lot of ideas, but unfortunately not enough time for them. The error "Timeout waiting for status response from device id:" indicates a missing connection to the device