yllibed / Zigbee2MqttAssistant

GUI for Zigbee2Mqtt running in docker and HASS.IO
449 stars 42 forks source link

[BUG] crashes when the network drops #461

Open magiva opened 1 year ago

magiva commented 1 year ago

Describe the bug

all zigbee devices show offline - this may be due to the zha integration (issue logged there also) but i see log errors here so im logging here

To Reproduce

see logs

Expected behavior

Steps I took to try resolve the problem

Screenshots

Installation

Pertinent logs

Starting Zigbee2MqttAssistant v0.3.157+Branch.master.Sha.ea388c3bbc2d43c4c9c62f27bb6764911ba4acc9... Hosting environment: Production Content root path: /app Now listening on: http://[::]:80 Application started. Press Ctrl+C to shut down. warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0] Disconnected from MQTT server 192.168.86.34. MQTTnet.Exceptions.MqttCommunicationTimedOutException: Exception of type 'MQTTnet.Exceptions.MqttCommunicationTimedOutException' was thrown. at MQTTnet.PacketDispatcher.MqttPacketAwaiter1.WaitOneAsync(TimeSpan timeout) at MQTTnet.Client.MqttClient.SendAndReceiveAsync[TResponsePacket](MqttBasePacket requestPacket, CancellationToken cancellationToken) at MQTTnet.Client.MqttClient.TrySendKeepAliveMessagesAsync(CancellationToken cancellationToken) warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0] Unable to connect to MQTT server 192.168.86.34. System.Threading.Tasks.TaskCanceledException: A task was canceled. at MQTTnet.PacketDispatcher.MqttPacketAwaiter1.WaitOneAsync(TimeSpan timeout) at MQTTnet.Client.MqttClient.SendAndReceiveAsync[TResponsePacket](MqttBasePacket requestPacket, CancellationToken cancellationToken) at MQTTnet.Client.MqttClient.TrySendKeepAliveMessagesAsync(CancellationToken cancellationToken) warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0] Disconnected from MQTT server 192.168.86.34. MQTTnet.Exceptions.MqttCommunicationTimedOutException: Exception of type 'MQTTnet.Exceptions.MqttCommunicationTimedOutException' was thrown. at MQTTnet.PacketDispatcher.MqttPacketAwaiter1.WaitOneAsync(TimeSpan timeout) at MQTTnet.Client.MqttClient.SendAndReceiveAsync[TResponsePacket](MqttBasePacket requestPacket, CancellationToken cancellationToken) at MQTTnet.Client.MqttClient.TrySendKeepAliveMessagesAsync(CancellationToken cancellationToken) warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0] Disconnected from MQTT server 192.168.86.34. MQTTnet.Exceptions.MqttCommunicationTimedOutException: Exception of type 'MQTTnet.Exceptions.MqttCommunicationTimedOutException' was thrown. at MQTTnet.PacketDispatcher.MqttPacketAwaiter1.WaitOneAsync(TimeSpan timeout) at MQTTnet.Client.MqttClient.SendAndReceiveAsync[TResponsePacket](MqttBasePacket requestPacket, CancellationToken cancellationToken) at MQTTnet.Client.MqttClient.TrySendKeepAliveMessagesAsync(CancellationToken cancellationToken) warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0] Disconnected from MQTT server 192.168.86.34. MQTTnet.Exceptions.MqttCommunicationTimedOutException: Exception of type 'MQTTnet.Exceptions.MqttCommunicationTimedOutException' was thrown. at MQTTnet.PacketDispatcher.MqttPacketAwaiter1.WaitOneAsync(TimeSpan timeout) at MQTTnet.Client.MqttClient.SendAndReceiveAsync[TResponsePacket](MqttBasePacket requestPacket, CancellationToken cancellationToken) at MQTTnet.Client.MqttClient.TrySendKeepAliveMessagesAsync(CancellationToken cancellationToken) warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0] Disconnected from MQTT server 192.168.86.34. MQTTnet.Exceptions.MqttCommunicationTimedOutException: Exception of type 'MQTTnet.Exceptions.MqttCommunicationTimedOutException' was thrown. at MQTTnet.PacketDispatcher.MqttPacketAwaiter1.WaitOneAsync(TimeSpan timeout) at MQTTnet.Client.MqttClient.SendAndReceiveAsync[TResponsePacket](MqttBasePacket requestPacket, CancellationToken cancellationToken) at MQTTnet.Client.MqttClient.TrySendKeepAliveMessagesAsync(CancellationToken cancellationToken)

Additional context

magiva commented 1 year ago

this happens when network connectivity drops, my asus mesh node loses connection to the base router for a moment, all other devices recover but zha and zig2mqtt does not

magiva commented 1 year ago

the zha bug ticket is here if you want that for reference, like i say, the only thing not to recover is zigbee intergration with zha and this zg2mqtt addon https://github.com/home-assistant/core/issues/102373