Xiaomi Bridge/Gateway thing not found - OpenHAB 2.3

I am trying, and failing, to get my Xiaomi Gateway integrated with OpenHAB.
I followed the instructions on the binding page but I am unable to discover the gateway in Paper UI.

  • I can control the gateway from the app on my phone
  • I have the developer key and have LAN functions is enabled
  • Gateway firmware version 1.4.1_155.0143
  • OpenHAB version 2.3 Release build
  • Xiaomi Mi Smart Home Binding version 2.3.0 (from Karaf console)
  • Gateway is connected to the same network as OH server and I can see the gateway online in my router client list

I have tried:

  • Restarting the gateway
  • Restarting OpenHAB
  • Uninstalling/reinstalling the binding
  • Disabling firewall on my OH server and (for good measure) adding inbound rules to explicitly enable port 9898 on UDP and TCP

Every time, when I go to Paper UI -> Inbox -> Plus button -> Xiaomi Mi Smart Home Binding
…then wait for the ‘Searching for Things’ to complete, nothing is found.

Log file:

26-Jun-2018 21:16:28.099 [DEBUG] [org.openhab.binding.mihome                        ] - BundleEvent [unknown:512] - org.openhab.binding.mihome
26-Jun-2018 21:16:28.108 [DEBUG] [org.openhab.binding.mihome                        ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=144, service.bundleid=258, service.scope=bundle, component.name=org.openhab.binding.mihome.internal.discovery.XiaomiBridgeDiscoveryService, component.id=56} - org.openhab.binding.mihome
26-Jun-2018 21:16:28.111 [DEBUG] [org.openhab.binding.mihome                        ] - BundleEvent STARTING - org.openhab.binding.mihome
26-Jun-2018 21:16:28.113 [DEBUG] [org.openhab.binding.mihome                        ] - BundleEvent STARTED - org.openhab.binding.mihome
26-Jun-2018 21:16:28.124 [DEBUG] [org.openhab.binding.mihome                        ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=145, service.bundleid=258, service.scope=bundle, component.name=org.openhab.binding.mihome.internal.XiaomiHandlerFactory, component.id=57} - org.openhab.binding.mihome
26-Jun-2018 21:27:12.888 [DEBUG] [me.internal.discovery.XiaomiBridgeDiscoveryService] - Stop scan
26-Jun-2018 21:27:12.901 [DEBUG] [nding.mihome.internal.socket.XiaomiDiscoverySocket] - Setup discovery socket
26-Jun-2018 21:27:12.903 [DEBUG] [nding.mihome.internal.socket.XiaomiDiscoverySocket] - Initialized socket to null:-1 on
26-Jun-2018 21:27:12.905 [DEBUG] [penhab.binding.mihome.internal.socket.XiaomiSocket] - There are 1 open sockets: {54667=java.net.DatagramSocket@788f771f}
26-Jun-2018 21:27:12.906 [DEBUG] [me.internal.discovery.XiaomiBridgeDiscoveryService] - Start scan for bridges
26-Jun-2018 21:27:22.898 [DEBUG] [me.internal.discovery.XiaomiBridgeDiscoveryService] - Stop scan
26-Jun-2018 21:27:22.913 [DEBUG] [penhab.binding.mihome.internal.socket.XiaomiSocket] - Interrupting Thread Thread[Thread-558,5,main]
26-Jun-2018 21:27:22.914 [DEBUG] [penhab.binding.mihome.internal.socket.XiaomiSocket] - Closing socket java.net.DatagramSocket@788f771f
26-Jun-2018 21:27:22.916 [DEBUG] [penhab.binding.mihome.internal.socket.XiaomiSocket] - Receiver thread ended
26-Jun-2018 21:28:26.364 [DEBUG] [me.internal.discovery.XiaomiBridgeDiscoveryService] - Stop scan
26-Jun-2018 21:28:26.369 [DEBUG] [penhab.binding.mihome.internal.socket.XiaomiSocket] - Interrupting Thread Thread[Thread-558,5,]
26-Jun-2018 21:28:26.372 [DEBUG] [nding.mihome.internal.socket.XiaomiDiscoverySocket] - Setup discovery socket
26-Jun-2018 21:28:26.373 [DEBUG] [nding.mihome.internal.socket.XiaomiDiscoverySocket] - Initialized socket to null:-1 on
26-Jun-2018 21:28:26.373 [DEBUG] [penhab.binding.mihome.internal.socket.XiaomiSocket] - There are 1 open sockets: {62296=java.net.DatagramSocket@6ca7a153}
26-Jun-2018 21:28:26.374 [DEBUG] [me.internal.discovery.XiaomiBridgeDiscoveryService] - Start scan for bridges
26-Jun-2018 21:28:36.371 [DEBUG] [me.internal.discovery.XiaomiBridgeDiscoveryService] - Stop scan
26-Jun-2018 21:28:36.375 [DEBUG] [penhab.binding.mihome.internal.socket.XiaomiSocket] - Interrupting Thread Thread[Thread-772,5,main]
26-Jun-2018 21:28:36.376 [DEBUG] [penhab.binding.mihome.internal.socket.XiaomiSocket] - Closing socket java.net.DatagramSocket@6ca7a153
26-Jun-2018 21:28:36.377 [DEBUG] [penhab.binding.mihome.internal.socket.XiaomiSocket] - Receiver thread ended

Any ideas what else I could try to get this working?

are you running OH on Windows? i had the same Problem because of a Second NIC that installed by Oracle VM.

Did you find a solution to this problem?

1 Like