Zigbee xiaomi button with Sonoff ZBdongle-E Smart Hub

Hello everyone, I am relativaly new to ha. Recently I joined the zigbee protocol. I bought Sonoff ZBdongle-E Smart Hub and two switches one from sonoff and one from xiaomi. With the sonoff I am okay, the thing is that the xiaomi btn keeps disconnecting during night or after many hours of inaction. Is there a work around for this?

OS: Ubuntu Server
Software: Docker, Portainer.
HA Version: 2024.2.5
Zigbee Dongle Firmware: 6.10.3.0 build 297
Xiaomi Button: lumi.sensor_switch

See tips here → Xiaomi & Aqara Devices - Pairing & Keeping them connected - Devices - Hubitat (as that is more specific than these general tips → https://www.home-assistant.io/integrations/zha#best-practices-to-avoid-pairingconnection-difficulties)

But before that make sure already following these best practices → Zigbee networks: how to guide for avoiding interference + optimizing using Zigbee Router devices (repeaters/extenders) to get best possible range and coverage (which is more detailed that these general tips → https://www.home-assistant.io/integrations/zha#zigbee-interference-avoidance-and-network-rangecoverage-optimization )

While not always, those types of problem symptoms that you describe are most commonly symptoms of EMF/EMI/RMI interference and/or not having enough Zigbee Router devices with good reception in the Zigbee network, as Zigbee uses low-power signals to send very short message RF reception can be extremely sensitive so having issues with either or a combination those can cause such problem symptoms. It is therefore always best to take basic actions to alleviate all those concerns first as doing so will make further troubleshooting easier. Following the best practice tips from this guide is the most easily achieved of a set of tasks that will have the greatest overall effect on Zigbee communication reception → Zigbee networks: how to guide for avoiding interference + optimizing using Zigbee Router devices (repeaters/extenders) to get best possible range and coverage

Summary of setup questions that you need to answer to take action on:

  1. Have you connected your Zigbee Coordinator adapter to a USB 2.0 port and not a USB 3.0 port?
    1b. If your computer does not have a USB 2.0 port then are you using it via a powered USB 2.0 hub?
  2. Have you connected your Zigbee Coordinator adapter via a long USB extension cable?
    2b. How long USB extension cable, is it shielded, and have you used it to place your Zigbee Coordinator adapter as far away from all possible sources of EMF/EMI/RMI interference (e.i. all electronic appliances/peripherals/devices/cables/power-supplies, etc. like example USB 3.x harddrives)?
  3. How many and what exact Zigbee Router devices do you have on this same Zigbee network?
    3b. Are those Zigbee Router devices located close to the Zigbee end devices in question?
    3b. Are those Zigbee Router devices located close to the Zigbee end devices in question?
    3c. Do you regularly power OFF and ON Zigbee Router devices such as Zigbee Smart Lightbulbs?

You might also want to consider upgrading Zigbee Coordinator firmware to a later version if above actions does not solve your issues. Itead has never released any newer firmware upgrades for the Sonoff ZBDongle-E, (probably because EmberZNet 6.10.3.x Zigbee NCP firmware has been very stable), however there are newer firmware so you can try upgrading to an unofficial community built, like example these → silabs-firmware-builder/firmware_builds at main · darkxst/silabs-firmware-builder · GitHub