Connecting Tuya WiFi (not ZigBee) TRVs

I have NodeRed running with about 18 Tuya lamps and all is well with that setup.

I'm trying to add some Tuya TRVs. It is working fine from the Smart Life App.

With the help of various threads, I've found a very convoluted way of discovering the DPID's needed, but when I create a tuya-smart-device node configured with the correct Virtual ID, Device Key and IP Address, I get the following 3 debug messages;

Error from TuyaDevice, ShouldTryReconnect = true, error = {}

Error: Error from socket: connect EHOSTUNREACH 192.168.1.35:6668

connectDevice(): An error had occured with Tuya API on connect method : 
{"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"192.168.1.35","port":6668}"

The EHOSTUNREACH message suggests that the TRV isn't listening, but the ECONNREFUSED suggests that it is listening, but not willing to connect?

With Lamps and other Tuya devices, this connects fine, so I'm baffled as to why it won't connect to a TRV.

The only thing I can think is that the lamps are mains powered, but the TRV is a low power battery unit, so the TRV may be in a sleep mode hence not connecting reliably, but if I run Home Assistant and link my Tuya account, it finds, connects and controls the TRV no problem.

I could move all of my NodeRed config into HA and accept that as a solution, but I'd much rather run just NodeRed if possible.

Any suggestions greatly appreciated.

1 Like

I know nothing about Tuya, but...

It means there is no service what so ever listening on that port.
if it was dropped (as in listening, but refusing to co-operate) you will get ECONNRESET ( think)

you might need to investigate further - there might be a setting, to open up/enable the service - again, I know nothing about Tuya :man_shrugging: - I'm sure some here might, again.... not sure.

hi, late to the party but my experiments resulted the same outcomes.
the only thing i can add is, this is happening on every battery powered tuya device on wifi.
i think they deactivated some protocols or features to save power.
all my battery powered devices are unusable in nodered with any of the tuya nodes in the pallette.
there are window/door sensors and thermostats with this wifi + battery combination.
i can't make them work and i gave up at this point. if you find something please share it is very annoying and frustrating.
zigbee devices work with a gateway but one way only (only get, no put).

Thanks for the response. If I run Home Assistant, load the Tuya skill and pass it my credentials, it immediately finds all Tuya devices and can read and control the TRV. This is via the cloud and not local, but I'll take that, except I now have to learn Home Assistant!
Can't seem to make the NR Cloud Node to work at all, which is a real shame.