Xiaomi gateway connection problems

HI All,

As i am using Home Assistant now for my home automation i would like to get rid of all the errors it gives.
The most annoying one is the problem with my Xiaomi gateway. I think it has some connection problems.
Sometimes when just restarting Home Assistant the problem is solved.
When that does not help i restart the modem and most of the time the problem is solved.
Restarting the gateway itself does not solve the problem.

As this is very annoying i would like to solve the problem but i do not know where to start.

In the log i find:

No data in response from hub None
7:11 components/xiaomi_aqara/switch.py (ERROR) - message first occured at 8 september 2019 22:23 and shows up 1589 times

Cannot connect to Gateway
7:11 components/xiaomi_aqara/switch.py (ERROR) - message first occured at 8 september 2019 22:23 and shows up 1589 times

Update of switch.plug_158d00015d3faa is taking over 10 seconds
7:11 main.py (WARNING) - message first occured at 8 september 2019 22:23 and shows up 795 times

When opening the full log i see a long list with different timestamps and the following notification:

2019-09-07 05:28:22 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.plug_158d000156f903 is taking over 10 seconds
2019-09-07 05:28:22 ERROR (SyncWorker_17) [xiaomi_gateway] Cannot connect to Gateway
2019-09-07 05:28:22 ERROR (SyncWorker_17) [xiaomi_gateway] No data in response from hub None

What could i do to solve this problem?

Geert