While you should definitely read/use the device driver thread linked to by @Royski, I want to point out that very few zigbee repeaters work with Xiaomi Mijia/Aqara sensors and you want to be sure you only have compatible repeaters or Xiaomi devices fall offline.
Here's a thread about pairing Xiaomi sensors and keeping them connected: