No access to HA, xiaomi hub

Hey there. I got new issue after gettind xiaomi sensors and hub. HA randomly become unaccessible. I just come home and automation (based on xiaomi sensor) does not work, and I can not open HA UI. It happened 3 times last week. I had to reboot raspberry pi hardy, turning off power. There are no logs after reboot (i can not access via SMB before reboot too), I can not understand what is wrong. All I can see - all xiaomi sensors were dead all day, but z-wave sensors were ok until my reboot. What should I do to get logs? What can be wrong with xiaomy hub?

Hi, do you have your RaspberryPi connected via WiFi or LAN?
I have a HA + Xiaomi setup and it works constantly without big issues … sometimes automation gets few seconds dealy

It is connected via wi fi. Does it matter?

I’ve seen many posts about issues with Xiaomi Gateway and a lot of them were solved by changing to LAN connection.

Ok, but my z-wave network will not like if I will place raspberry pi so far.
Ff someone knows how to heal this issue - i am very interested.
Will this do the work?

the xiaomi hub doesn’t have an ethernet port.

Yes, I know. I meant that Raspberry Pi should be on LAN and not WiFi.

Agree needs stable connection.

I had frequent disconnects. Changed to a decent network gear (Ubiquiti) and the problem went away.

Actually, I commented xiaomi component in configuration file, deleted all automation, and what is strange for me, I still have connection with xiaomi sensors, but not hub (can’t controll light on hub). How is it possible? And what’s is Moreno interesting, everything is stable for 5 days (with xiaomi component I was loosing sensors every third day)