LordMike / MBW.BlueRiiot2MQTT

Utility to map between Blue Riiots pool API, and Home Assistant MQTT
49 stars 2 forks source link

MQTT: frequent reconnects #3

Closed foXaCe closed 4 years ago

foXaCe commented 4 years ago

hello there is a lot of connection / disconnection in the log.

[2020-05-19 03:50:47+00:00 INF] [MBW.BlueRiiot2MQTT.HASS.HassMqttSensor] Sent new values for Pezilla Weather forecast to MQTT [2020-05-19 03:53:04+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 03:53:04+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 03:53:35+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 03:56:46+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 03:56:46+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 03:57:16+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 03:58:12+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 03:58:12+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 03:58:42+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 03:59:16+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 03:59:16+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 03:59:46+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 04:03:42+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 04:03:42+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 04:04:12+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 04:09:50+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 04:09:50+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 04:10:21+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 04:10:43+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 04:10:43+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 04:11:13+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 04:12:54+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 04:12:54+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 04:13:24+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 04:15:50+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 04:15:50+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 04:16:20+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 04:17:39+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 04:17:39+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30

barto64 commented 4 years ago

Same here:

[2020-05-19 07:40:10+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 07:43:10+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 07:43:10+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 07:43:40+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 07:44:03+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 07:44:03+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 07:44:33+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 07:46:14+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 07:46:14+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 07:46:44+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 07:47:40+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 07:47:40+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 07:48:10+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 07:49:06+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 07:49:06+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 07:49:36+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 07:50:05+00:00 ERR] [MBW.BlueRiiot2MQTT.Service.BlueRiiotMqttService] An error occurred while performing the update [2020-05-19 07:51:40+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 07:51:40+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 07:52:10+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 07:53:06+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 07:53:06+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 07:53:36+00:00 INF] [MqttNet.MqttClient] Connected. [2020-05-19 07:56:02+00:00 INF] [MqttNet.MqttClient] Disconnected. [2020-05-19 07:56:02+00:00 WRN] [MBW.BlueRiiot2MQTT.Service.MqttConnectionService] Server disconnected, attempting reconnect in 00:00:30 [2020-05-19 07:56:32+00:00 INF] [MqttNet.MqttClient] Connected.

LordMike commented 4 years ago

I'm seeing the same. I'm not sure where it comes from, I'm inclined to say that the library I'm using (Mqttnet) has an issue. ... since "everything else runs fine".

I haven't quite researched the timeout configurations for Mqttnet.. Perhaps that'd help.

dodg3r commented 4 years ago

Maybe it has something to do with keepalive ?

https://github.com/mqttjs/MQTT.js/issues/381

LordMike commented 4 years ago

I think it most definitely does. I just haven't had time to look at it :)

LordMike commented 4 years ago

Hi all. I have updated to the latest packages, which provided an update specifically related to keepalive and MQTT. So, give 0.3.0 a try and let me know if it resolves anything :)

LordMike commented 4 years ago

With the new version, my reconnects have completely disappeared. I’ll consider this issue closed. :)

In this picture from hass. You can see the frequent changes in state, but after approx midnight it stops. :)

2F72E945-79EB-414A-9BD9-2D2A80485714