I had exactly the same issues. Gateway autodiscovery doesn’t work. If added manually its shown online and assigned sensors are discovered including the initial states.
But there is never an update, and newly paired sensors are also not discovered.
First, set the loglevel to debug for Xiaomi.
Then check the logs. There should be datagram getting in every ten seconds from each gateway. If not, there is something wrong with the UDP handling.
In my case the gateways were conected to an access point hosted by the Raspberry Pi. It required a change in the routing table, but this is a workaround. The binding needs a fix I think.
See this post for details:
And the following one for the workaround .