ottoszika / node-red-contrib-ewelink

NodeRED nodes for eWeLink smart devices
https://ottoszika.github.io/node-red-contrib-ewelink
MIT License
49 stars 28 forks source link

Uncaught Exception #125

Open Pitel opened 3 years ago

Pitel commented 3 years ago

This is crashing my Node Red instance:

kvě 18 21:49:01 raspberrypi Node-RED[4104]: 18 May 21:49:01 - [red] Uncaught Exception:
kvě 18 21:49:01 raspberrypi Node-RED[4104]: 18 May 21:49:01 - Error: Can't send data because WebSocket is not opened.
kvě 18 21:49:01 raspberrypi Node-RED[4104]:     at exports.throwIf (/home/pi/.node-red/node_modules/websocket-as-promised/src/utils.js:4:11)
kvě 18 21:49:01 raspberrypi Node-RED[4104]:     at WebSocketAsPromised.send (/home/pi/.node-red/node_modules/websocket-as-promised/src/index.js:248:5)
kvě 18 21:49:01 raspberrypi Node-RED[4104]:     at Timeout._onTimeout (/home/pi/.node-red/node_modules/ewelink-api/src/mixins/openWebSocket.js:39:17)
kvě 18 21:49:01 raspberrypi Node-RED[4104]:     at listOnTimeout (node:internal/timers:557:17)
kvě 18 21:49:01 raspberrypi Node-RED[4104]:     at processTimers (node:internal/timers:500:7)

Versions:

kvě 18 21:59:52 raspberrypi Node-RED[4417]: 18 May 21:59:52 - [info] Node-RED version: v1.3.5
kvě 18 21:59:52 raspberrypi Node-RED[4417]: 18 May 21:59:52 - [info] Node.js  version: v16.1.0
kvě 18 21:59:52 raspberrypi Node-RED[4417]: 18 May 21:59:52 - [info] Linux 5.10.17-v7l+ arm LE
einfach113 commented 1 year ago

moin moin... Ich habe aktuell das gleiche Problem.... Hast du schon eine lösung gefunden?

driagi commented 1 year ago

I've the same problem, I have the same problem, in absence of internet and on restart of node red. This bug causes node-red to keep restarting

einfach113 commented 1 year ago

I found the problem... You can only use the credentials once! If I want to use the access data a second time, the error occurs. That's too bad! I have at least 8 devices which I want to read at different points. I also have problems with the event listener. This can also only be used for 1 device because you have to specify the device ID. If you didn't have to do this, you would get information from all devices and could then react. I've already dealt with Tuya... I haven't managed to do that until today. (Tip: I only use 1 * a device node. With this I read out the states after the start / deploy. I set the switches accordingly. I turn it on and off via Amazon Alexa. This means that there is no further use of the credentials data.

Sorry it is a Google Translate German - English