homebridge-plugins / homebridge-ewelink

Homebridge plugin to integrate eWeLink devices into HomeKit.
MIT License
389 stars 127 forks source link

[eWeLink] Error: Web socket is not open #558

Closed davadka closed 5 months ago

davadka commented 5 months ago

What issue do you have? Please be as thorough and explicit as possible.

Some of my accessories won't respond until I restart HB. Typically the zigbee devices I use with SmartWise Zigbee Bridge Pro. Then they go for a while and then not again.

Details of your setup.

Please paste any relevant logs below.

There are 2-3 more relevant error logs:

*********************************************
[21/06/2024, 08:49:51] [eWeLink] [Window 8] current power [0W] current voltage [241.23V] current current [0A].
[21/06/2024, 08:49:54] [eWeLink] Error: request timeout [504] at default.sendUpdate (file:///usr/lib/node_modules/homebridge-ewelink/lib/connection/ws.js:334:19)
    at default.sendUpdate (file:///usr/lib/node_modules/homebridge-ewelink/lib/connection/ws.js:341:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at file:///usr/lib/node_modules/homebridge-ewelink/node_modules/p-timeout/index.js:99:13
[21/06/2024, 08:49:54] [eWeLink] [Háló R4] current power [0W] current voltage [240.72V] current current [0A].
*******************************************
 [eWeLink] WS login failed [406] see https://bit.ly/hb-ewelink-errors
[21/06/2024, 08:06:45] [eWeLink] WS unknown command received.
{
  "error": 406,
  "reason": "Authentication Failed",
  "apikey": "-----------------------------",
  "sequence": "--------",
  "actionName": "userOnline",
  "params": {}
}
[21/06/2024, 08:06:47] [eWeLink] Error: Web socket is not open - try again after a few seconds
    at default.sendUpdate (file:///usr/lib/node_modules/homebridge-ewelink/lib/connection/ws.js:345:13)
    at file:///usr/lib/node_modules/homebridge-ewelink/lib/platform.js:1854:34
    at file:///usr/lib/node_modules/homebridge-ewelink/node_modules/p-timeout/index.js:99:13
davadka commented 5 months ago

I've checked https://bit.ly/hb-ewelink-errors but I don't want to believe the solution should be restarting HB/plugin frequently. I can confirm that I have active session only on my "main app" and HB.

davadka commented 5 months ago

It seems the problem solved when you log out from ewelink app and only HB using the ewelink credentials.