NRCHKB / node-red-contrib-unifi-os

Nodes to access UniFi data using endpoints and websockets
Apache License 2.0
26 stars 2 forks source link

WebSocket Error 1002 #22

Closed TestUser0000000001 closed 2 years ago

TestUser0000000001 commented 3 years ago

NodeRed running on node v12

NodeRed Module locks up and needs "Flow Re-Deploy" to work again. Stops at (WebSocket.js Here) Im not sure what the real issue is as the logging only states WS 1002. This happens after the system has been running for a while OR sometimes on UDMP reboot while NodeRed WS is connected. If I get more info ill update here, or if I find fix.

Shaquu commented 2 years ago

@TestUser0000000001 can you try again? This time run node-red with DEBUG=UniFi* env variable Also try our latest version 0.4.0

schwickster commented 2 years ago

Getting a lot of 1002 errors. Where to set the debug? In settings.js like this? process.env.DEBUG="uniFi*"

crxporter commented 2 years ago

How often are you seeing these? And which endpoint are you using?

When you set debug, note it is case sensitive UniFi*

To figure out where to set it, we need to know how you run nodered... -if docker, you set debug somewhere in the docker config -if running manually, you add it to your node-red start command -if running using systemd script, you add the debug to part of the systemd script

Shaquu commented 2 years ago

@schwickster From code I can see that enabling Debug is a must to understand your issue. Once you figure out how to launch it I will help :) For now please follow @crxporter

Shaquu commented 2 years ago

@TestUser0000000001 @schwickster

  1. Please try the latest dev version https://www.npmjs.com/package/node-red-contrib-unifi-os/v/0.7.0-dev.4
  2. For debug run node-red with DEBUG=UniFi* environment variable. Example DEBUG=UniFi* node-red