# Smart plug - tuya

**URL:** <https://discourse.nodered.org/t/smart-plug-tuya/24946>\
**Category:** General\
**Created:** [16 April 2020 13:55 UTC](https://discourse.nodered.org/t/smart-plug-tuya/24946 "2020-04-16T13:55:06Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![aabbas](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@aabbas](https://discourse.nodered.org/u/aabbas)\
**Post date:** [16 April 2020 13:55 UTC](https://discourse.nodered.org/t/smart-plug-tuya/24946/1 "2020-04-16T13:55:06Z")

</div>

Hi,  
I have a smart plug (ZOOZE). I installed smart tuya node on node red but I found that I can't connect to the device if I don' have the device key.

Have you an idea how can I find the device key?

Thank you

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [16 April 2020 14:03 UTC](https://discourse.nodered.org/t/smart-plug-tuya/24946/2 "2020-04-16T14:03:52Z")

</div>

See the documentation of the tuya node, it is quite convoluted.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 April 2020 14:19 UTC](https://discourse.nodered.org/t/smart-plug-tuya/24946/3 "2020-04-16T14:19:16Z")

</div>

I think most people who use tuya, shelley, sonoff etc devices in a node-red environment reflash them with Tasmotta, ESPEasy or something similar and communicate via MQTT.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [16 April 2020 14:45 UTC](https://discourse.nodered.org/t/smart-plug-tuya/24946/4 "2020-04-16T14:45:09Z")

</div>

If you use Alexa you can control tuya devices via node-red-contrib-alexa-remote2

> **[node-red-contrib-alexa-remote2](https://flows.nodered.org/node/node-red-contrib-alexa-remote2)**
>
> node-red nodes for interacting with alexa

  
This is easier than finding the key

---

<div class="post-metadata">

**Author:** ![aabbas](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@aabbas](https://discourse.nodered.org/u/aabbas)\
**Post date:** [16 April 2020 15:05 UTC](https://discourse.nodered.org/t/smart-plug-tuya/24946/6 "2020-04-16T15:05:37Z")

</div>

I don't have alexa

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [16 April 2020 15:19 UTC](https://discourse.nodered.org/t/smart-plug-tuya/24946/7 "2020-04-16T15:19:52Z")

</div>

You will need to follow the guide instructions to get the key, or flash the devices. I can't help you there as i took the alexa root.

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [16 April 2020 17:06 UTC](https://discourse.nodered.org/t/smart-plug-tuya/24946/8 "2020-04-16T17:06:09Z")

</div>

> [@Colin](#):
>
> I think most people who use tuya, shelley, sonoff etc devices

I agree with one exeption, shelly origin firmware supports mqtt, so no need to change the firmware. And you can take advantage of the smartphone app.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 April 2020 19:47 UTC](https://discourse.nodered.org/t/smart-plug-tuya/24946/9 "2020-04-16T19:47:50Z")

</div>

Is there no danger of it phoning home?

---

<div class="post-metadata">

**Author:** ![realjax](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/realjax/32/895_2.png) [@realjax](https://discourse.nodered.org/u/realjax)\
**Post date:** [16 April 2020 20:02 UTC](https://discourse.nodered.org/t/smart-plug-tuya/24946/10 "2020-04-16T20:02:34Z")

</div>

Unfortunately you cannot flash all tuya devices. Not all of them are esp8266 based. Not even all tuya light bulbs are.

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [16 April 2020 20:12 UTC](https://discourse.nodered.org/t/smart-plug-tuya/24946/11 "2020-04-16T20:12:54Z")

</div>

> [@Colin](#):
>
> Is there no danger of it phoning home?

What do you mean by phoning home?  
By the shelly app you can disable the cloud access.  
Something that all Chinese devices do not allow and this is danger.

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [16 April 2020 20:19 UTC](https://discourse.nodered.org/t/smart-plug-tuya/24946/12 "2020-04-16T20:19:21Z")

</div>

Right, Unfortunately I ordered one of them. As soon as I can get the compatible esp chip I'll replace the original one.

See unsupported devices:

> **[Tasmota Device Templates Repository](https://templates.blakadder.com/unsupported.html)**
>
> Configure Unsupported Devices to work with Tasmota firmware on your local Wi-Fi network only and remove it from the cloud

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [17 April 2020 04:47 UTC](https://discourse.nodered.org/t/smart-plug-tuya/24946/13 "2020-04-17T04:47:06Z")

</div>

> [@aabbas](#):
>
> Have you an idea how can I find the device key?

While the process is rather long winded, it is possible to do. [tuyapi/docs/SETUP.md at master · codetheweb/tuyapi · GitHub](https://github.com/codetheweb/tuyapi/blob/master/docs/SETUP.md)

However, if you read here ... [When disabling a node doesn't (Tuya-smart)](https://discourse.nodered.org/t/when-disabling-a-node-doesnt-tuya-smart/24566) you will see that finding a node that works correctly is also not straightforward, unfortunately. This particular node does work, with the exception discussed.

---

<div class="post-metadata">

**Author:** ![aabbas](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@aabbas](https://discourse.nodered.org/u/aabbas)\
**Post date:** [21 May 2020 16:09 UTC](https://discourse.nodered.org/t/smart-plug-tuya/24946/14 "2020-05-21T16:09:53Z")

</div>

Hi,

I configured the deviceId and key with tuyacli for tuya outlet in the node-red tuya-smart-node but it always says "disconnected" - don't get any feedback.

Could you help me please.

Thank you

---

<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:** [4 June 2020 16:09 UTC](https://discourse.nodered.org/t/smart-plug-tuya/24946/15 "2020-06-04T16:09:53Z")

</div>

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