# Connecting Tuya WiFi (not ZigBee) TRVs

**URL:** <https://discourse.nodered.org/t/connecting-tuya-wifi-not-zigbee-trvs/93911>\
**Category:** General\
**Created:** [15 December 2024 11:44 UTC](https://discourse.nodered.org/t/connecting-tuya-wifi-not-zigbee-trvs/93911 "2024-12-15T11:44:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SomersetSmartHome](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@SomersetSmartHome](https://discourse.nodered.org/u/SomersetSmartHome)\
**Post date:** [15 December 2024 11:44 UTC](https://discourse.nodered.org/t/connecting-tuya-wifi-not-zigbee-trvs/93911/1 "2024-12-15T11:44:07Z")

</div>

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;

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

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [15 December 2024 18:50 UTC](https://discourse.nodered.org/t/connecting-tuya-wifi-not-zigbee-trvs/93911/2 "2024-12-15T18:50:27Z")

</div>

I know nothing about Tuya, but...

> [@SomersetSmartHome](#):
>
> ECONNREFUSED suggests that it is listening, but not willing to connect?

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 🤷‍♂️ - I'm sure some here might, again.... not sure.

---

<div class="post-metadata">

**Author:** ![biros](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@biros](https://discourse.nodered.org/u/biros)\
**Post date:** [31 December 2024 12:18 UTC](https://discourse.nodered.org/t/connecting-tuya-wifi-not-zigbee-trvs/93911/3 "2024-12-31T12:18:13Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![SomersetSmartHome](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@SomersetSmartHome](https://discourse.nodered.org/u/SomersetSmartHome)\
**Post date:** [31 December 2024 14:09 UTC](https://discourse.nodered.org/t/connecting-tuya-wifi-not-zigbee-trvs/93911/4 "2024-12-31T14:09:44Z")

</div>

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.

---

<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:** [31 March 2025 14:09 UTC](https://discourse.nodered.org/t/connecting-tuya-wifi-not-zigbee-trvs/93911/5 "2025-03-31T14:09:51Z")

</div>

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