Xiaomi Mi Smart Home - Stability problem

I encounter a problem with my Xiaomi Mi smart home devices.

Xiaomi Aqara gateway V2 Gateway
Xiaomi Aqara temperature and humidity sensor

Binding used:
Xiami Mi Smart home Binding

I did the modification in the gateway in order to open the port and the communication is ok. I receive the information in openhab.

But after a delay 2-3 minutes. The communication shutdown
This is the message received in logs:

2019-07-27 11:26:35.255 [hingStatusInfoChangedEvent] - ‘mihome:bridge:7cxxxxxxxxxx’ changed from ONLINE to OFFLINE
2019-07-27 11:26:35.258 [hingStatusInfoChangedEvent] -
‘mihome:sensor_weather_v1:7cxxxxxxxxxx:158dyyyyyyyyyy’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2019-07-27 11:26:35.262 [hingStatusInfoChangedEvent] -
‘mihome:gateway:7cxxxxxxxxxx:7cxxxxxxxxxx’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

These are the status in my PaperUi/things:
Xiaomi Gateway Z1 : Offline
Salon - Xiaomi Mi Smart Home Gateway : Offline - Bridge_Offline
Salon - Xiaomi Aqara Temp, Hum and Press Sensor : Offline - Bridge_Offline

Things file - xiaomi_smart_home.things

Bridge mihome:bridge:7cxxxxxxxxxx “Xiaomi Gateway Z1” [ serialNumber=“dddddddd”, ipAddress=“192.168.aaa.bbb”, port=9898, key=“cccccccccccccccccc”, pollingInterval=6000 ] {
gateway 7cxxxxxxxxxx “Salon - Xiaomi Mi Smart Home Gateway” [itemId=“7cxxxxxxxxxx”]
sensor_weather_v1 158dyyyyyyyyyy “Salon - Xiaomi Aqara Temp, Hum and Press Sensor” [itemId=“158dyyyyyyyyyy”]

Items file - xiaomi_smart_home.items

// Replace with itemId of gateway from Things file
// Replace with itemId of item from Things file
// Gateway
Switch Gateway_LightSwitch { channel=“mihome:gateway:7cxxxxxxxxxx:7cxxxxxxxxxx:brightness” }
Dimmer Gateway_Brightness { channel=“mihome:gateway:7cxxxxxxxxxx:7cxxxxxxxxxx:brightness” }
Color Gateway_Color { channel=“mihome:gateway:7cxxxxxxxxxx:7cxxxxxxxxxx:color” }
Dimmer Gateway_ColorTemperature { channel=“mihome:gateway:7cxxxxxxxxxx:7cxxxxxxxxxx:colorTemperature” }
Number Gateway_AmbientLight { channel=“mihome:gateway:7cxxxxxxxxxx:7cxxxxxxxxxx:illumination” }
Number Gateway_Sound { channel=“mihome:gateway:7cxxxxxxxxxx:7cxxxxxxxxxx:sound” }
Switch Gateway_SoundSwitch <soundvolume_mute> { channel=“mihome:gateway:7cxxxxxxxxxx:7cxxxxxxxxxx:enableSound” }
Dimmer Gateway_SoundVolume { channel=“mihome:gateway:7cxxxxxxxxxx:7cxxxxxxxxxx:volume” }
// Aqara Temperature, Humidity and pressure Sensor
Number:Temperature XiaomiTpHum_Z1_Tp { channel=“mihome:sensor_weather_v1:7cxxxxxxxxxx:158dyyyyyyyyyy:temperature” }
Number:Dimensionless XiaomiTpHum_Z1_Hum { channel=“mihome:sensor_weather_v1:7cxxxxxxxxxx:158dyyyyyyyyyy:humidity” }
Number:Pressure XiaomiTpHum_Z1_P { channel=“mihome:sensor_weather_v1:7cxxxxxxxxxx:158dyyyyyyyyyy:pressure” }
Number XiaomiTpHum_Z1_Battery { channel=“mihome:sensor_weather_v1:7cxxxxxxxxxx:158dyyyyyyyyyy:batteryLevel” }
Switch XiaomiTpHum_Z1_BatteryLow { channel=“mihome:sensor_weather_v1:7cxxxxxxxxxx:158dyyyyyyyyyy:lowBattery” }

Feel free to ask more informations.
Thank for your help

I dont use things file for the Xiaomi brigde… I use PaperUI.
From your log file though, I would assume it´s a communication error. The gatway is communicating through WiFi (2.4Ghz as far as I remember). Check that your communication is stabel to the Xiaomi gateway.

I have simmilar problem

Bridge mihome:bridge:7811dc11111111 “XG2” [ serialNumber=“781111111”, ipAddress=“”, port=9898, key=“121111111”, pollingInterval=500 ] {
gateway 7811dc11111 “Mi_Gate” [itemId=“7811d1111113”]

gateway is going offline, when i change pollingInterval=500 to pollingInterval=600, works fine some time.
what does it mean pollingInterval=600? and what number should be by defoult ?


Although your problem may seem similar to the original post, it is an older post and it may be best to post a new thread. In this way, folks who can help you will be drawn to look at the new thread and not ignore this one because it is old. Also, please to be sure to post your operating system, platform, version of OpenHAB, item files, things files if used and logs of the problems you are experiencing.

The Mi Smart Home binding page example is showing pollingInterval=6000

6000 not 600/500

I suppose these are milliseconds, so 500 would be every half second. Might just be too often. I have not had any issues with the default 6000. Maybe try that as well.