jimmyeao / TEAMS2HA

23 stars 1 forks source link

MQTT Disconnected/ Connected #14

Closed mhoogenbosch closed 8 months ago

mhoogenbosch commented 8 months ago

I must be doing something wrong.

image

Shows MQTT is disconnected. When I show/hide

image

And it was connected for a while because I see the sensors in Home Assistant, but they are now all unavailable.

Log snippit:

2023-12-18 11:49:18.810 +01:00 [DBG] SaveSettings_Click: Save Settings ClickedSystem.Func`1[System.String]
2023-12-18 11:49:18.811 +01:00 [DBG] SetStartupAsync: Startup set
2023-12-18 11:49:18.812 +01:00 [INF] MQTT Client Created
2023-12-18 11:49:18.812 +01:00 [INF] attempting to connect to mqtt
2023-12-18 11:49:18.812 +01:00 [DBG] SaveSettings_Click: MQTT Settings Changed and initialze called
2023-12-18 11:49:29.590 +01:00 [DBG] CheckMqttConnection: MQTT Client Not Connected
2023-12-18 11:49:29.590 +01:00 [INF] attempting to connect to mqtt
2023-12-18 11:49:29.590 +01:00 [DBG] Failed to connect to MQTT broker: Not allowed to connect while connect/disconnect is pending.
2023-12-18 11:49:29.591 +01:00 [DBG] CheckMqttConnection: MQTT Client Connected
2023-12-18 11:49:32.841 +01:00 [DBG] Failed to connect to MQTT broker: The operation has timed out.
2023-12-18 11:49:32.841 +01:00 [INF] Error during MQTT subscribe: The client is not connected.
2023-12-18 11:49:32.841 +01:00 [INF] Subscribing.MQTTnet.Client.MqttClientSubscribeOptions
2023-12-18 11:49:32.842 +01:00 [DBG] MQTT Client Connected
2023-12-18 11:50:29.604 +01:00 [DBG] CheckMqttConnection: MQTT Client Not Connected
2023-12-18 11:50:29.604 +01:00 [INF] attempting to connect to mqtt
2023-12-18 11:50:43.648 +01:00 [DBG] Failed to connect to MQTT broker: The operation has timed out.
2023-12-18 11:50:43.648 +01:00 [DBG] CheckMqttConnection: MQTT Client Connected
jimmyeao commented 8 months ago

hmm thats odd - does the issue persist if you restart the app?

jimmyeao commented 8 months ago

I've pushed a new version, the app should self-update when you relaunch, please test and let me know the result :)

mhoogenbosch commented 8 months ago

seems to be working. And i do think it was an error on my behave. But if it solved a bug, that's great!