Xiaomi Mi Smart Home Binding no heartbeats, do updates of data from sensors

Hi,

I have problem with Xiaomi Mi Smart Home Binding.

It looks like there is no heartbears send from my servev with OH2 to Xiaomi gateway.

My things:

Bridge mihome:bridge:7811dcb7e00d "Xiaomi Gateway" @ "Xiaomi" [ serialNumber="7811dcb7e00d", ipAddress="192.168.20.10", port=9898, key="za2dc6vavygwp5al", pollingInterval=6000 ] {
   Thing mihome:gateway:7811dcb7e00d "Xiaomi Mi Smart Home Gateway" @ "Xiaomi"  [itemId="7811dcb7e00d"]
   Thing mihome:sensor_weather_v1:158d0001f508a6 "Xiaomi Aqara Temperature, Humidity & Pressure Sensor TH1" @ "Xiaomi" [itemId="158d0001f508a6"]
   Thing mihome:sensor_weather_v1:158d0001fa5b23 "Xiaomi Aqara Temperature, Humidity & Pressure Sensor TH2" @ "Xiaomi" [itemId="158d0001fa5b23"]
}

My items:

Number Xiaomi_TH2_Temperature "Temperatura [%.1f °C]" <temperature> (gXiaomi) { channel="mihome:sensor_weather_v1:158d0001fa5b23:temperature" }
Number Xiaomi_TH2_Humidity "Wilgotność [%.1f %%]" <humidity> (gXiaomi) { channel="mihome:sensor_weather_v1:158d0001fa5b23:humidity" }
Number Xiaomi_TH2_Pressure "Ciśnienie [%.1f kPa]" <pressure> (gXiaomi) { channel="mihome:sensor_weather_v1:158d0001fa5b23:pressure" }
Number Xiaomi_TH2_Battery_Level "Poziom baterii [%d %%]" <battery> (gXiaomi) { channel="mihome:sensor_weather_v1:158d0001fa5b23:batteryLevel" }
Switch Xiaomi_TH2_Low_Battery "Niski poziom baterii [MAP(xiaomi_low_bat.map):%s]" (gXiaomi) { channel="mihome:sensor_weather_v1:158d0001fa5b23:lowBattery" }

Number Xiaomi_TH1_Temperature "Temperatura [%.1f °C]" <temperature> (gXiaomi) { channel="mihome:sensor_weather_v1:158d0001f508a6:temperature" }
Number Xiaomi_TH1_Humidity "Wilgotność [%.1f %%]" <humidity> (gXiaomi) { channel="mihome:sensor_weather_v1:158d0001f508a6:humidity" }
Number Xiaomi_TH1_Pressure "Ciśnienie [%.1f kPa]" <pressure> (gXiaomi) { channel="mihome:sensor_weather_v1:158d0001f508a6:pressure" }
Number Xiaomi_TH1_Battery_Level "Poziom baterii [%d %%]" <battery> (gXiaomi) { channel="mihome:sensor_weather_v1:158d0001f508a6:batteryLevel" }
Switch Xiaomi_TH1_Low_Battery "Niski poziom baterii [MAP(xiaomi_low_bat.map):%s]" (gXiaomi) { channel="mihome:sensor_weather_v1:158d0001f508a6:lowBattery" }

I enable TRACE for Mihome bindings.

Every time when i restart bundle:

openhab> bundle:list  |grep Xia
290 │ Active   │  80 │ 2.2.0                  │ Xiaomi Mi Smart Home Binding
openhab> bundle:restart 290

I got update of values of my sensors.

Here are logs:

2018-02-23 10:21:34.967 [DEBUG] [org.openhab.binding.mihome          ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.config.discovery.DiscoveryService}={component.name=org.openhab.binding.mihome.discovery.bridge, component.id=254, service.id=399, service.bundleid=290, service.scope=bundle} - org.openhab.binding.mihome
2018-02-23 10:21:34.970 [hingStatusInfoChangedEvent] - 'mihome:sensor_weather_v1:158d0001fa5b23' changed from ONLINE to UNINITIALIZED
2018-02-23 10:21:34.971 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Handler disposes. Unregistering listener
2018-02-23 10:21:34.974 [hingStatusInfoChangedEvent] - 'mihome:sensor_weather_v1:158d0001fa5b23' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2018-02-23 10:21:34.975 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Handler disposes. Unregistering listener
2018-02-23 10:21:34.975 [hingStatusInfoChangedEvent] - 'mihome:sensor_weather_v1:158d0001f508a6' changed from ONLINE to UNINITIALIZED
2018-02-23 10:21:34.978 [hingStatusInfoChangedEvent] - 'mihome:sensor_weather_v1:158d0001f508a6' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2018-02-23 10:21:34.979 [hingStatusInfoChangedEvent] - 'mihome:gateway:7811dcb7e00d' changed from ONLINE to UNINITIALIZED
2018-02-23 10:21:34.979 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Handler disposes. Unregistering listener
2018-02-23 10:21:34.982 [hingStatusInfoChangedEvent] - 'mihome:gateway:7811dcb7e00d' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2018-02-23 10:21:34.983 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - dispose
2018-02-23 10:21:34.983 [hingStatusInfoChangedEvent] - 'mihome:bridge:7811dcb7e00d' changed from ONLINE to UNINITIALIZED
2018-02-23 10:21:34.985 [DEBUG] [.mihome.internal.socket.XiaomiSocket] - Interrupting Thread Thread[Thread-88,5,main]
2018-02-23 10:21:34.985 [DEBUG] [.mihome.internal.socket.XiaomiSocket] - Closing socket java.net.MulticastSocket@529cc001
2018-02-23 10:21:34.986 [TRACE] [.mihome.internal.socket.XiaomiSocket] - Receiver thread was interrupted
2018-02-23 10:21:34.986 [DEBUG] [.mihome.internal.socket.XiaomiSocket] - Receiver thread ended
2018-02-23 10:21:34.988 [DEBUG] [org.openhab.binding.mihome          ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=401, service.bundleid=290, service.scope=singleton} - org.openhab.binding.mihome
2018-02-23 10:21:34.990 [DEBUG] [org.openhab.binding.mihome          ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.config.core.status.ConfigStatusProvider}={service.id=402, service.bundleid=290, service.scope=singleton} - org.openhab.binding.mihome
2018-02-23 10:21:34.992 [DEBUG] [org.openhab.binding.mihome          ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=binding.mihome, component.id=255, service.id=400, service.bundleid=290, service.scope=bundle} - org.openhab.binding.mihome
2018-02-23 10:21:34.992 [hingStatusInfoChangedEvent] - 'mihome:bridge:7811dcb7e00d' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2018-02-23 10:21:34.999 [DEBUG] [org.openhab.binding.mihome          ] - BundleEvent STOPPING - org.openhab.binding.mihome
2018-02-23 10:21:35.002 [DEBUG] [org.openhab.binding.mihome          ] - BundleEvent STOPPED - org.openhab.binding.mihome
2018-02-23 10:21:35.002 [DEBUG] [org.openhab.binding.mihome          ] - BundleEvent STARTING - org.openhab.binding.mihome
2018-02-23 10:21:35.009 [DEBUG] [org.openhab.binding.mihome          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={component.name=org.openhab.binding.mihome.discovery.bridge, component.id=256, service.id=403, service.bundleid=290, service.scope=bundle} - org.openhab.binding.mihome
2018-02-23 10:21:35.012 [DEBUG] [org.openhab.binding.mihome          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=binding.mihome, component.id=257, service.id=404, service.bundleid=290, service.scope=bundle} - org.openhab.binding.mihome
2018-02-23 10:21:35.014 [DEBUG] [org.openhab.binding.mihome          ] - BundleEvent STARTED - org.openhab.binding.mihome
2018-02-23 10:21:35.054 [me.event.ThingUpdatedEvent] - Thing 'mihome:bridge:7811dcb7e00d' has been updated.
2018-02-23 10:21:35.056 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Having 1 Item Discovery listeners
2018-02-23 10:21:35.056 [me.event.ThingUpdatedEvent] - Thing 'mihome:gateway:7811dcb7e00d' has been updated.
2018-02-23 10:21:35.056 [me.event.ThingUpdatedEvent] - Thing 'mihome:sensor_weather_v1:158d0001f508a6' has been updated.
2018-02-23 10:21:35.056 [me.event.ThingUpdatedEvent] - Thing 'mihome:sensor_weather_v1:158d0001fa5b23' has been updated.
2018-02-23 10:21:35.057 [DEBUG] [org.openhab.binding.mihome          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=405, service.bundleid=290, service.scope=singleton} - org.openhab.binding.mihome
2018-02-23 10:21:35.060 [DEBUG] [org.openhab.binding.mihome          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.core.status.ConfigStatusProvider}={service.id=406, service.bundleid=290, service.scope=singleton} - org.openhab.binding.mihome
2018-02-23 10:21:35.063 [hingStatusInfoChangedEvent] - 'mihome:bridge:7811dcb7e00d' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
2018-02-23 10:21:35.063 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Init socket on Port: 9898
2018-02-23 10:21:35.064 [DEBUG] [e.internal.socket.XiaomiBridgeSocket] - Setup socket
2018-02-23 10:21:35.064 [DEBUG] [e.internal.socket.XiaomiBridgeSocket] - Initialized socket to null:-1 on 0.0.0.0/0.0.0.0:9898
2018-02-23 10:21:35.065 [DEBUG] [.mihome.internal.socket.XiaomiSocket] - There are 1 open sockets: {9898=java.net.MulticastSocket@26fa671a}
2018-02-23 10:21:35.065 [TRACE] [.mihome.internal.socket.XiaomiSocket] - Adding socket listener org.openhab.binding.mihome.handler.XiaomiBridgeHandler@35970d25
2018-02-23 10:21:35.065 [TRACE] [.mihome.internal.socket.XiaomiSocket] - Staring reveicer thread for socket on port 9898
2018-02-23 10:21:35.067 [TRACE] [.mihome.internal.socket.XiaomiSocket] - Thread Thread[Thread-97,5,main] waiting for data on port 9898
2018-02-23 10:21:35.069 [hingStatusInfoChangedEvent] - 'mihome:gateway:7811dcb7e00d' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2018-02-23 10:21:35.070 [hingStatusInfoChangedEvent] - 'mihome:sensor_weather_v1:158d0001f508a6' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2018-02-23 10:21:36.066 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Triggered discovery
2018-02-23 10:21:36.066 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Send to bridge mihome:bridge:7811dcb7e00d: {"cmd": "get_id_list"}
2018-02-23 10:21:36.066 [TRACE] [.mihome.internal.socket.XiaomiSocket] - Sending message: {"cmd": "get_id_list"} to /192.168.20.10:9898
2018-02-23 10:21:36.070 [DEBUG] [.mihome.internal.socket.XiaomiSocket] - Received Datagram from 192.168.20.10:9898 on Port 9898
2018-02-23 10:21:36.071 [TRACE] [g.mihome.handler.XiaomiBridgeHandler] - Received message {"cmd":"get_id_list_ack","sid":"7811dcb7e00d","token":"Yq6IIDco2cft9Dic","data":"[\"158d0001f508a6\",\"158d0001fa5b23\"]"}
2018-02-23 10:21:36.071 [TRACE] [g.mihome.handler.XiaomiBridgeHandler] - Updated "last time seen" for device 7811dcb7e00d
2018-02-23 10:21:36.071 [hingStatusInfoChangedEvent] - 'mihome:bridge:7811dcb7e00d' changed from INITIALIZING to ONLINE
2018-02-23 10:21:36.075 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Send to bridge mihome:bridge:7811dcb7e00d: {"cmd": "read", "sid": "158d0001f508a6"}
2018-02-23 10:21:36.077 [hingStatusInfoChangedEvent] - 'mihome:gateway:7811dcb7e00d' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2018-02-23 10:21:36.077 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Adding item listener for device 7811dcb7e00d
2018-02-23 10:21:36.077 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Having 1 Item listeners
2018-02-23 10:21:36.078 [TRACE] [.mihome.internal.socket.XiaomiSocket] - Sending message: {"cmd": "read", "sid": "158d0001f508a6"} to /192.168.20.10:9898
2018-02-23 10:21:36.078 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Send to bridge mihome:bridge:7811dcb7e00d: {"cmd": "read", "sid": "158d0001fa5b23"}
2018-02-23 10:21:36.078 [TRACE] [.mihome.internal.socket.XiaomiSocket] - Sending message: {"cmd": "read", "sid": "158d0001fa5b23"} to /192.168.20.10:9898
2018-02-23 10:21:36.078 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Send to bridge mihome:bridge:7811dcb7e00d: {"cmd": "read", "sid": "7811dcb7e00d"}
2018-02-23 10:21:36.079 [TRACE] [.mihome.internal.socket.XiaomiSocket] - Sending message: {"cmd": "read", "sid": "7811dcb7e00d"} to /192.168.20.10:9898
2018-02-23 10:21:36.079 [hingStatusInfoChangedEvent] - 'mihome:gateway:7811dcb7e00d' changed from INITIALIZING to ONLINE
2018-02-23 10:21:36.079 [TRACE] [.mihome.internal.socket.XiaomiSocket] - Data received and notified 1 listeners
2018-02-23 10:21:36.079 [TRACE] [.mihome.internal.socket.XiaomiSocket] - Thread Thread[Thread-97,5,main] waiting for data on port 9898
2018-02-23 10:21:36.080 [hingStatusInfoChangedEvent] - 'mihome:sensor_weather_v1:158d0001f508a6' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2018-02-23 10:21:36.080 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Adding item listener for device 158d0001f508a6
2018-02-23 10:21:36.080 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Having 2 Item listeners
2018-02-23 10:21:36.080 [hingStatusInfoChangedEvent] - 'mihome:sensor_weather_v1:158d0001fa5b23' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2018-02-23 10:21:36.081 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Adding item listener for device 158d0001fa5b23
2018-02-23 10:21:36.081 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Having 3 Item listeners
2018-02-23 10:21:36.081 [hingStatusInfoChangedEvent] - 'mihome:sensor_weather_v1:158d0001f508a6' changed from INITIALIZING to OFFLINE
2018-02-23 10:21:36.082 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Device 158d0001f508a6 on channel mihome:sensor_weather_v1:158d0001f508a6:temperature received command REFRESH
2018-02-23 10:21:36.082 [hingStatusInfoChangedEvent] - 'mihome:sensor_weather_v1:158d0001fa5b23' changed from INITIALIZING to OFFLINE
2018-02-23 10:21:36.082 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Device 158d0001f508a6 on channel mihome:sensor_weather_v1:158d0001f508a6:humidity received command REFRESH
2018-02-23 10:21:36.082 [DEBUG] [.mihome.internal.socket.XiaomiSocket] - Received Datagram from 192.168.20.10:9898 on Port 9898
2018-02-23 10:21:36.083 [TRACE] [g.mihome.handler.XiaomiBridgeHandler] - Received message {"cmd":"read_ack","model":"weather.v1","sid":"158d0001f508a6","short_id":27058,"data":"{\"voltage\":3045,\"temperature\":\"2324\",\"humidity\":\"3385\",\"pressure\":\"101480\"}"}
2018-02-23 10:21:36.083 [TRACE] [g.mihome.handler.XiaomiBridgeHandler] - Updated "last time seen" for device 158d0001f508a6
2018-02-23 10:21:36.083 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Device 158d0001f508a6 on channel mihome:sensor_weather_v1:158d0001f508a6:pressure received command REFRESH
2018-02-23 10:21:36.083 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Device 158d0001f508a6 honored read request
2018-02-23 10:21:36.083 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Item got update: {"cmd":"read_ack","model":"weather.v1","sid":"158d0001f508a6","short_id":27058,"data":"{\"voltage\":3045,\"temperature\":\"2324\",\"humidity\":\"3385\",\"pressure\":\"101480\"}"}
2018-02-23 10:21:36.084 [TRACE] [.mihome.internal.socket.XiaomiSocket] - Data received and notified 1 listeners
2018-02-23 10:21:36.084 [TRACE] [.mihome.internal.socket.XiaomiSocket] - Thread Thread[Thread-97,5,main] waiting for data on port 9898
2018-02-23 10:21:36.084 [DEBUG] [.mihome.internal.socket.XiaomiSocket] - Received Datagram from 192.168.20.10:9898 on Port 9898
2018-02-23 10:21:36.084 [TRACE] [g.mihome.handler.XiaomiBridgeHandler] - Received message {"cmd":"read_ack","model":"weather.v1","sid":"158d0001fa5b23","short_id":13787,"data":"{\"voltage\":3075,\"temperature\":\"2265\",\"humidity\":\"2798\",\"pressure\":\"101439\"}"}
2018-02-23 10:21:36.085 [TRACE] [g.mihome.handler.XiaomiBridgeHandler] - Updated "last time seen" for device 158d0001fa5b23
2018-02-23 10:21:36.085 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Device 158d0001fa5b23 honored read request
2018-02-23 10:21:36.085 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Item got update: {"cmd":"read_ack","model":"weather.v1","sid":"158d0001fa5b23","short_id":13787,"data":"{\"voltage\":3075,\"temperature\":\"2265\",\"humidity\":\"2798\",\"pressure\":\"101439\"}"}
2018-02-23 10:21:36.085 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Device 158d0001f508a6 on channel mihome:sensor_weather_v1:158d0001f508a6:batteryLevel received command REFRESH
2018-02-23 10:21:36.086 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Update Item 158d0001f508a6 with retented message
2018-02-23 10:21:36.086 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Item got update: {"cmd":"read_ack","model":"weather.v1","sid":"158d0001f508a6","short_id":27058,"data":"{\"voltage\":3045,\"temperature\":\"2324\",\"humidity\":\"3385\",\"pressure\":\"101480\"}"}
2018-02-23 10:21:36.086 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Device 158d0001f508a6 on channel mihome:sensor_weather_v1:158d0001f508a6:lowBattery received command REFRESH
2018-02-23 10:21:36.087 [TRACE] [.mihome.internal.socket.XiaomiSocket] - Data received and notified 1 listeners
2018-02-23 10:21:36.087 [TRACE] [.mihome.internal.socket.XiaomiSocket] - Thread Thread[Thread-97,5,main] waiting for data on port 9898
2018-02-23 10:21:36.087 [DEBUG] [.mihome.internal.socket.XiaomiSocket] - Received Datagram from 192.168.20.10:9898 on Port 9898
2018-02-23 10:21:36.087 [TRACE] [g.mihome.handler.XiaomiBridgeHandler] - Received message {"cmd":"read_ack","model":"gateway","sid":"7811dcb7e00d","short_id":0,"data":"{\"rgb\":0,\"illumination\":1292,\"proto_version\":\"1.0.9\"}"}
2018-02-23 10:21:36.087 [TRACE] [g.mihome.handler.XiaomiBridgeHandler] - Updated "last time seen" for device 7811dcb7e00d
2018-02-23 10:21:36.088 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Device 7811dcb7e00d honored read request
2018-02-23 10:21:36.088 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Item got update: {"cmd":"read_ack","model":"gateway","sid":"7811dcb7e00d","short_id":0,"data":"{\"rgb\":0,\"illumination\":1292,\"proto_version\":\"1.0.9\"}"}
2018-02-23 10:21:36.088 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Device 158d0001fa5b23 on channel mihome:sensor_weather_v1:158d0001fa5b23:temperature received command REFRESH
2018-02-23 10:21:36.089 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Device 158d0001fa5b23 on channel mihome:sensor_weather_v1:158d0001fa5b23:humidity received command REFRESH
2018-02-23 10:21:36.089 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Device 158d0001fa5b23 on channel mihome:sensor_weather_v1:158d0001fa5b23:pressure received command REFRESH
2018-02-23 10:21:36.090 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Device 158d0001fa5b23 on channel mihome:sensor_weather_v1:158d0001fa5b23:batteryLevel received command REFRESH
2018-02-23 10:21:36.091 [hingStatusInfoChangedEvent] - 'mihome:sensor_weather_v1:158d0001f508a6' changed from OFFLINE to ONLINE
2018-02-23 10:21:36.091 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Device 158d0001fa5b23 on channel mihome:sensor_weather_v1:158d0001fa5b23:lowBattery received command REFRESH
2018-02-23 10:21:36.093 [vent.ItemStateChangedEvent] - Xiaomi_TH1_Humidity changed from 35.720001220703125 to 33.849998474121094
2018-02-23 10:21:36.093 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Update Item 158d0001fa5b23 with retented message
2018-02-23 10:21:36.093 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Item got update: {"cmd":"read_ack","model":"weather.v1","sid":"158d0001fa5b23","short_id":13787,"data":"{\"voltage\":3075,\"temperature\":\"2265\",\"humidity\":\"2798\",\"pressure\":\"101439\"}"}
2018-02-23 10:21:36.094 [hingStatusInfoChangedEvent] - 'mihome:sensor_weather_v1:158d0001fa5b23' changed from OFFLINE to ONLINE
2018-02-23 10:21:36.094 [TRACE] [.mihome.internal.socket.XiaomiSocket] - Data received and notified 1 listeners
2018-02-23 10:21:36.095 [TRACE] [.mihome.internal.socket.XiaomiSocket] - Thread Thread[Thread-97,5,main] waiting for data on port 9898
2018-02-23 10:21:36.098 [vent.ItemStateChangedEvent] - Xiaomi_TH1_Temperature changed from 23.3700008392334 to 23.239999771118164
2018-02-23 10:21:36.098 [vent.ItemStateChangedEvent] - Xiaomi_TH1_Pressure changed from 101.46900177001953 to 101.4800033569336

I add multicast routing:

$ netstat  -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
.....
224.0.0.0       0.0.0.0         240.0.0.0       U         0 0          0 eth0

But there is nothing in tcpdump besides 3 packet at the begginig (after bundle:restart)

$ sudo tcpdump -n -i eth0 -s0 -vv net 224.0.0.0/4 | egrep -v -e "192.168.199.24[67]"
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
12:37:40.683206 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 40, options (RA))
    192.168.199.251 > 224.0.0.22: igmp v3 report, 1 group record(s) [gaddr 224.0.0.50 to_in { }]
12:37:40.723203 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 40, options (RA))
    192.168.199.251 > 224.0.0.22: igmp v3 report, 1 group record(s) [gaddr 224.0.0.50 to_ex { }]
12:37:41.187268 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 40, options (RA))
    192.168.199.251 > 224.0.0.22: igmp v3 report, 1 group record(s) [gaddr 224.0.0.50 to_ex { }]

But there are no further debug messages from the binding. Total silence, no interaction between the binding and the gateway, and no heartbeats. Nothing in tcpdump. Nothing in localhost:8080/rest/events.

I need help. What I am doing wrong?

Hi,

it’s problem of my network configuration. When I put Xiaomi Gateway in the same network as OH2 -> everything is OK.

I have Cisco ASA 5505 as my firewall/router and I have problem with multicast routing between two VLANs. It’s not problem of add-on.

18:46:28.963199 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 40, options (RA))
    192.168.199.251 > 224.0.0.22: igmp v3 report, 1 group record(s) [gaddr 224.0.0.50 to_ex { }]
18:46:29.755230 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 40, options (RA))
    192.168.199.251 > 224.0.0.22: igmp v3 report, 1 group record(s) [gaddr 224.0.0.50 to_ex { }]

18:46:32.947451 IP (tos 0x0, ttl 255, id 1430, offset 0, flags [none], proto UDP (17), length 166)
    192.168.199.204.4321 > 224.0.0.50.9898: [udp sum ok] UDP, length 138
18:46:42.929347 IP (tos 0x0, ttl 255, id 1432, offset 0, flags [none], proto UDP (17), length 166)
    192.168.199.204.4321 > 224.0.0.50.9898: [udp sum ok] UDP, length 138
18:46:52.911422 IP (tos 0x0, ttl 255, id 1434, offset 0, flags [none], proto UDP (17), length 166)
    192.168.199.204.4321 > 224.0.0.50.9898: [udp sum ok] UDP, length 138

At the begining OH2 send IGMP v3 packet with Multicast Group address of 224.0.0.50. It is equal to:

iperf -s -u -B 224.0.0.50 -i 1

After that Xiaomi Gateway join Multicast group and send hearbeats to this address to udp/9898 port.