# Problem with node-red-contrib-tuya-smart-device and new devices (Lamps)

**URL:** <https://discourse.nodered.org/t/problem-with-node-red-contrib-tuya-smart-device-and-new-devices-lamps/86337>\
**Category:** General\
**Created:** [11 March 2024 15:14 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-tuya-smart-device-and-new-devices-lamps/86337 "2024-03-11T15:14:36Z")\
**Posts on this page:** 6\
**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:** [11 March 2024 15:14 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-tuya-smart-device-and-new-devices-lamps/86337/1 "2024-03-11T15:14:36Z")

</div>

I have node-red-contrib-tuya-smart-device installed and running successfully with 12 devices, all different makes on TUYA Lamps.  
I have recently tried to add extra lamps.

- I connect and configure them using the Tuya Smart Life App
- I log onto my [iot.tuya.com](http://iot.tuya.com) account and use the DeviceID from the Smart Life App to find the 'Secret'
- I take this information along with the static ip address I assign to the device and put it all into the node-red-contrib-tuya-smart-device config for the device, save and deploy.

Initially, the device shows up as connected, but after 10 seconds or whenever I send it a command, the status changes to 'NOT CONNECTED' and the command is ignored.  
Then it goes back to 'Connected' again for 9 seconds until the next poll cycle.  
It is connected and controllable from the Smart Life App, but not via node-red.

All the other devices are visible, stay connected and respond to commands. I can't see what I'm doing wrong.

I'm running the latest version of node-red (3.1.6) and node-red-contrib-tuya-smart-device (5.2.0) running on a pi3b+ with Bullseye.

Any thoughts?

---

<div class="post-metadata">

**Author:** ![daycare](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daycare/32/88634_2.png) [@daycare](https://discourse.nodered.org/u/daycare)\
**Post date:** [12 March 2024 13:25 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-tuya-smart-device-and-new-devices-lamps/86337/2 "2024-03-12T13:25:53Z")

</div>

Hello,

I'm new to node-red but have recently installed Tuya connected plugs.

When you say find the "Secret", are you talking about the "Access Secret/Client Secret" authorization key or the local\_key of the device?

Because the problems I had trying to connect the plugs with "Device Virtual ID+Device IP" were solved when I used "Device Key+Device IP" ( local\_key).

edit: correction

---

<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:** [12 March 2024 15:21 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-tuya-smart-device-and-new-devices-lamps/86337/3 "2024-03-12T15:21:06Z")

</div>

Yes, the local key. The form I complete in Node Red has boxes for DeviceID, Device Key and Device IP. Although it says to use either Device IP or DeviceID, if I omit either, Node Red locks up and has to be re-installed, so I stopped doing that.  
The device thinks its connected for 9 seconds out of 10. If I enter incorrect or incomplete information to the previously mentioned fields, it never connects, so I can only assume there is something in the protocol of newer devices. I've tried connecting with 3.1, 3.2 and 3.3 protocols, but it makes no difference.

---

<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:** [12 March 2024 15:44 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-tuya-smart-device-and-new-devices-lamps/86337/4 "2024-03-12T15:44:18Z")

</div>

In my reply to you, daycare, I said I'd tried all versions of protocol, 3.1, 3.2 and 3.3. That made me check with the TUYA website and I saw that there is now a version 3.4 protocol. Thought I'd give it a try although wasn't hopeful. Lo and behold it works when configured with version 3.4 protocol.

Thanks for pushing me in the right direction, even if you didn't realise you had!

---

<div class="post-metadata">

**Author:** ![daycare](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daycare/32/88634_2.png) [@daycare](https://discourse.nodered.org/u/daycare)\
**Post date:** [12 March 2024 16:11 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-tuya-smart-device-and-new-devices-lamps/86337/5 "2024-03-12T16:11:06Z")

</div>

Sometimes all it takes is nothing, or me... 🙃

---

<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:** [10 June 2024 16:11 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-tuya-smart-device-and-new-devices-lamps/86337/6 "2024-06-10T16:11:12Z")

</div>

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