Feller-AG / wiser-api

MIT License
12 stars 1 forks source link

WS dropping connection after a certain amount of time #26

Open tech-geek-4 opened 1 year ago

tech-geek-4 commented 1 year ago

Hello,

I registred a websocket connection through node red to the WS API. Unfortunately i realized that after a certain amount of time without a message the connection drops. I couldn‘t figure out if it comes from the WS or NodeRed.

So do you know if a handshake or a keepalive is necessary after an amount of time?

regards

hansfriedrich commented 1 year ago

Hello @Stefacir seems similar to my issue

tech-geek-4 commented 1 year ago

Hello @Stefacir seems similar to my issue

Hello @hansfriedrich Thanks for the hint. It may be the same problem. I have as well approximately the same rssi. I will as well check the logs if there is a crash from time to time but as far as i can see in a quick overwiev they seem stable. So i assume it drops connection due to another reason. Will come back when i have more infos.

hansfriedrich commented 1 year ago

actutally it's not a crash - it's the lost wifi-connection which also tears down the ws-connection. I "solved" it with my plugin by pinging every hour and reconnecting in case of error.

woodworm commented 1 year ago

We have now the version 5.1.17 ready. In this version the handling of many parallel connections is improved. This could eventually solve the issue. To force the update, you have to contact me on customercare Center @woodworm.

tech-geek-4 commented 1 year ago

actutally it's not a crash - it's the lost wifi-connection which also tears down the ws-connection. I "solved" it with my plugin by pinging every hour and reconnecting in case of error.

You are right - sorry! Figured out that the last „reboot“ was a AT-Timeout. Maybe it doesn‘t help that my HA instance is calling evry minute the REST API for the status of the loads…

As i‘m using nodered i need to adjust the plugin to reconnect as your plugin does

@woodworm will contact you for the software, thanks.

hansfriedrich commented 1 year ago

You are right - sorry! Figured out that the last „reboot“ was a AT-Timeout. Maybe it doesn‘t help that my HA instance is calling evry minute the REST API for the status of the loads…

when you follow the issue, you see I also thought it's crashing. Thanks @woodworm to bring some light in this.