node-red-contrib-tuya-local icon indicating copy to clipboard operation
node-red-contrib-tuya-local copied to clipboard

Following error happens often and at times seems to be crashing Node and thus Node Red?

Open Jibun-no-Kage opened this issue 2 years ago • 4 comments

Following error happens often and at times seems to be crashing Node and thus Node Red?

Jul 20 13:19:47 eccentric Node-RED[3719]: 20 Jul 13:19:47 - [info] [mqtt-broker:Broker] Connected to broker: mqtt://broker.dachshund-digital.org:1883 Jul 20 13:19:47 eccentric Node-RED[3719]: 20 Jul 13:19:47 - [info] [wifiscan:Scan] wifiscan - Input received Jul 20 13:19:47 eccentric Node-RED[3719]: 20 Jul 13:19:47 - [red] Uncaught Exception: Jul 20 13:19:47 eccentric Node-RED[3719]: 20 Jul 13:19:47 - [error] Error: No connection has been made to the device. Jul 20 13:19:47 eccentric Node-RED[3719]: at TuyaDevice._send (/home/pi/.node-red/node_modules/node-red-contrib-tuya-local/node_modules/tuyapi/index.js:235:13) Jul 20 13:19:47 eccentric Node-RED[3719]: at /home/pi/.node-red/node_modules/node-red-contrib-tuya-local/node_modules/tuyapi/index.js:117:14 Jul 20 13:19:47 eccentric Node-RED[3719]: at new Promise () Jul 20 13:19:47 eccentric Node-RED[3719]: at TuyaDevice.get (/home/pi/.node-red/node_modules/node-red-contrib-tuya-local/node_modules/tuyapi/index.js:114:12) Jul 20 13:19:47 eccentric Node-RED[3719]: at setDevice (/home/pi/.node-red/node_modules/node-red-contrib-tuya-local/tuya-local.js:42:12) Jul 20 13:19:47 eccentric Node-RED[3719]: at TuyaNode._inputCallback (/home/pi/.node-red/node_modules/node-red-contrib-tuya-local/tuya-local.js:122:4) Jul 20 13:19:47 eccentric Node-RED[3719]: at /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26 Jul 20 13:19:47 eccentric Node-RED[3719]: at Object.trigger (/usr/lib/node_modules/node-red/node_modules/@node-red/util/lib/hooks.js:166:13) Jul 20 13:19:47 eccentric Node-RED[3719]: at TuyaNode.Node._emitInput (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:202:11) Jul 20 13:19:47 eccentric Node-RED[3719]: at TuyaNode.Node.emit (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:186:25) Jul 20 13:19:47 eccentric systemd[1]: nodered.service: Main process exited, code=exited, status=1/FAILURE

Jibun-no-Kage avatar Jul 20 '22 13:07 Jibun-no-Kage

Following error/warning routinely showing up in Node Red Log...

(node:7138) UnhandledPromiseRejectionWarning: Error: No connection has been made to the device. at TuyaDevice._send (/home/pi/.node-red/node_modules/node-red-contrib-tuya-local/node_modules/tuyapi/index.js:235:13) at /home/pi/.node-red/node_modules/node-red-contrib-tuya-local/node_modules/tuyapi/index.js:117:14 at new Promise () at TuyaDevice.get (/home/pi/.node-red/node_modules/node-red-contrib-tuya-local/node_modules/tuyapi/index.js:114:12) at setDevice (/home/pi/.node-red/node_modules/node-red-contrib-tuya-local/tuya-local.js:42:12) at TuyaNode._inputCallback (/home/pi/.node-red/node_modules/node-red-contrib-tuya-local/tuya-local.js:122:4) at /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26 at Object.trigger (/usr/lib/node_modules/node-red/node_modules/@node-red/util/lib/hooks.js:166:13) at TuyaNode.Node._emitInput (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:202:11) at TuyaNode.Node.emit (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:186:25) (Use node --trace-warnings ... to show where the warning was created) (node:7138) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3) (node:7138) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 10 Jul 03:48:18 - [info] [tuya-local:ee9029e40e854867] No timeout defined for Eccentric, probably NodeRED starting 10 Jul 03:51:27 - [info] [tuya-local:ee9029e40e854867] set timeout for re-connect

Hardware - Raspberry Pi 3B Software: Node Red 2.2.2 Node v14.20.0

Pi OS 11 Linux eccentric 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

Steps to reproduce, nothing explicit, just let NR use Tuya-Local Nodes

Also... did see the following recently reported in the NR Editor debug view. Avocent AutoView is just a simple smart power plug.

RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to access memory outside buffer bounds device: Avocent AutoView

Please let me know if you need any other information, logs, etc.

Jibun-no-Kage avatar Jul 24 '22 19:07 Jibun-no-Kage

This node is not maintained any more. I offered the repo for someone else to take over.

subzero79 avatar Jul 24 '22 20:07 subzero79

Oh, that is too bad, while I used it, really liked it. But since Node Red 3.0 has issues with it, I guess that is the end. I can I ask why it is no longer supported?

Jibun-no-Kage avatar Jul 24 '22 21:07 Jibun-no-Kage

I created this to overcome the restriction tuya imposed two years ago with firmware changing. So I could opt out out of their cloud solution. I had three switches then eventually community was able to manage to change the firmware again so could flash it it with esphome. Now I don’t have any hardware with tuya fw and not time at all to maintain this node.

subzero79 avatar Jul 24 '22 21:07 subzero79