Xiaomi Gateway and sensors

I know this has been ask before, but i can’t find a solution, My Xiaomi Gateway and sensors become unavailable after a while, sometimes after 1 hour or half day, this is what i see in the logs

Update for binary_sensor.door_window_sensor_158d000187111f fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 261, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 441, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/xiaomi_aqara/binary_sensor.py", line 131, in update
  File "/usr/local/lib/python3.7/site-packages/xiaomi_gateway/__init__.py", line 382, in get_from_hub
    resp = self._send_cmd(cmd, "read_ack") if int(self.proto[0:1]) == 1 else self._send_cmd(cmd, "read_rsp")
  File "/usr/local/lib/python3.7/site-packages/xiaomi_gateway/__init__.py", line 310, in _send_cmd
    _socket.bind((self._interface, 0))
OSError: [Errno 99] Address not available