# Tuya device integration without HA

**URL:** <https://discourse.nodered.org/t/tuya-device-integration-without-ha/76006>\
**Category:** General\
**Tags:** node-red-dashboard, function-node\
**Created:** [2 March 2023 16:46 UTC](https://discourse.nodered.org/t/tuya-device-integration-without-ha/76006 "2023-03-02T16:46:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DeWoAlliSeged7](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dewoalliseged7/32/58702_2.png) [@DeWoAlliSeged7](https://discourse.nodered.org/u/DeWoAlliSeged7)\
**Post date:** [2 March 2023 16:46 UTC](https://discourse.nodered.org/t/tuya-device-integration-without-ha/76006/1 "2023-03-02T16:46:20Z")

</div>

Hello

How do i change the status of a tuya device?  
I got the node-red-contrib-tuya-smart-device palet.  
I have the device connedted! I can debug device data (If i use the switch on my app i get the respons:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/7/c7b728e3a129426bb87157ad290b87e6f9fe4c73.png)  
)  
But every value i like to send i get the response (red):  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/6/8666d32e4e9fe4382270be107ecefcdf2aa2cb28.png)

The commands I tried are:  
{  
"data": {  
"dps": {  
"1": true  
},  
"t": 1677775053  
},  
"deviceId": "bf0da80e03de8d0136glqn",  
"deviceName": "test"  
}  
and  
[  
{  
"code": "switch\_1",  
"value": true  
}  
]

What am i doing wrong ?

Thx in advance  
Simon

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [2 March 2023 17:37 UTC](https://discourse.nodered.org/t/tuya-device-integration-without-ha/76006/2 "2023-03-02T17:37:26Z")

</div>

All you need to send is

```auto
msg.payload = {"dps":"1","set":false}
//or
msg.payload = {"dps":"1","set":true}

```

---

<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:** [16 March 2023 17:38 UTC](https://discourse.nodered.org/t/tuya-device-integration-without-ha/76006/3 "2023-03-16T17:38:24Z")

</div>

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