# Random nodered crashes with node-red-contrib-tuya-local

**URL:** https://discourse.nodered.org/t/random-nodered-crashes-with-node-red-contrib-tuya-local/84490
**Category:** General
**Created:** [11 January 2024 20:29 UTC](https://discourse.nodered.org/t/random-nodered-crashes-with-node-red-contrib-tuya-local/84490 "2024-01-11T20:29:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Sirhc](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@Sirhc](https://discourse.nodered.org/u/Sirhc)
#### Post date: [11 January 2024 20:29 UTC](https://discourse.nodered.org/t/random-nodered-crashes-with-node-red-contrib-tuya-local/84490/1 "2024-01-11T20:29:36Z")

</div>

Hello

Just wondering if anyone else has experienced this. I am using node-red-contrib-tuya-local which makes use of the Tuya API to locally control Tuya switches.

Every now and again (randomly) a switch will show "disconnected" in the nodered editor. When I inject a timestamp, that device is connected again. The problem is, that when I inject the timestamp, nodered will crash and restart.

It is very random and I can't really start node-red with logging and watch the console all day the event.

So just wondering if anyone else has experienced it and what their fix was?

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [12 January 2024 02:26 UTC](https://discourse.nodered.org/t/random-nodered-crashes-with-node-red-contrib-tuya-local/84490/2 "2024-01-12T02:26:01Z")

</div>

> [@Sirhc](#):
>
> When I inject a timestamp, that device is connected again. The problem is, that when I inject the timestamp, nodered will crash and restart.

Those two sentences are not related to one another.

How are you making this association that Node-red restarts?

How is/are your `tuya` devices connected to the network? WiFi or cable?

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [12 January 2024 04:10 UTC](https://discourse.nodered.org/t/random-nodered-crashes-with-node-red-contrib-tuya-local/84490/3 "2024-01-12T04:10:12Z")

</div>

This will typically happen (the disconnections) if you do not have the correct Version selected for the Tuya support within the config of the Node). You may wish to read the readme for the underlying API

> **[GitHub - codetheweb/tuyapi: 🌧 An easy-to-use API for devices that use Tuya's...](https://github.com/codetheweb/tuyapi)**
>
> 🌧 An easy-to-use API for devices that use Tuya's cloud services. Documentation: https://codetheweb.github.io/tuyapi. - GitHub - codetheweb/tuyapi: 🌧 An easy-to-use API for devices that use Tuya...

Where they talk about working out the actual version of Tuya supported on your devices.

Craig

---

<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: [12 March 2024 04:10 UTC](https://discourse.nodered.org/t/random-nodered-crashes-with-node-red-contrib-tuya-local/84490/4 "2024-03-12T04:10:44Z")

</div>

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