Mr-Markus / ZigbeeNet

A .NET Standard library for working with ZigBee
Eclipse Public License 1.0
130 stars 46 forks source link

Reliable way to detect dongle disconnects #154

Open reinux opened 3 years ago

reinux commented 3 years ago

It seems that the only way to detect when the dongle has disconnected is if a request returns null.

Is there a way we can detect when the dongle disconnects more reliably? Mine seems to be somewhat unstable, and occasionally requires restarting the NetworkManager.

jacobussystems commented 3 years ago

@reinux Is the instability maybe related to #152?

reinux commented 3 years ago

I am using a ConBee II, so it may be, though it isn't as severe in my case -- only once every 10-20 hours as opposed to the 5-10 minutes that #152 reports.

Either way, I think it would be good to have a way to detect disconnects so that we can handle it properly. USB isn't always super reliable, after all.

What might be nice is an exception and a way to reset the connection synchronously.

jacobussystems commented 3 years ago

Thanks - I agree re. disconnect detection.