Xiaomi mi gateway ( I cannot control )

Hi everybody,

I’m testing openhab on my Imac in order to know how does it works and preparing my next home automation level, in my case I’ve been connecting other things to openhab like tado, and everything was ok but with my new xiaomi mi gateway and related sensors it is not working as I hoped.

I attach to this what I’m facing, I’ve included the binding with the gateway and also the sensors but it looks there is a updating problem being that the values I want to control are not working and by the mi app everything works but through openhab I cannot control anything.

After reviewing the community I’ve checked the firewall(i don’t have it) I opened 9898 port in my router, included the developer key on gateway but without success.

Do you have any idea about what is happening?

There is sensor information shown so it looks like it’s working.
What exactly are you trying to control, the gateway items I assume?

For temperature sensor, It looks it’s working but for gateway I cannot arm/disarm or turn on/off light or changing colors and it’s happening the same with motion not shown on screen.

By the way I don’t know if it is normal but sometimes when I exit from control web and after I come back the xiaomi things are not there and I need to disable/enable some property like brightness to make it appears again in control web.


If the temperature senor shows data, communication with the gateway is fine.
Did you use paperui or files to setup xiaomi?
Did you check log files?

Let’s start with an easy example, the light.
I notice that you set the color temperature fully to the left; did you try setting it in the middel (it might not give light output when set completely to the left)


I use paperui, these are the log file:

I’ve turned the light on/off but the gateway remains with the same state ( changing color temp.)

2018-11-09 11:30:23.815 [vent.ItemStateChangedEvent] - network_servicedevice_192_168_1_1_80_latency changed from 5.0 to 3.0
2018-11-09 11:30:23.816 [vent.ItemStateChangedEvent] - network_servicedevice_192_168_1_1_80_lastseen changed from 2018-11-09T11:29:23.766+0100 to 2018-11-09T11:30:23.812+0100
2018-11-09 11:31:23.828 [vent.ItemStateChangedEvent] - network_servicedevice_192_168_1_1_80_lastseen changed from 2018-11-09T11:30:23.812+0100 to 2018-11-09T11:31:23.823+0100
2018-11-09 11:31:28.282 [ome.event.ItemCommandEvent] - Item ‘mihome_gateway_7c49ebb18eb4_colorTemperature’ received command 100
2018-11-09 11:31:28.285 [vent.ItemStateChangedEvent] - mihome_gateway_7c49ebb18eb4_colorTemperature changed from NULL to 100
2018-11-09 11:31:28.290 [vent.ItemStateChangedEvent] - mihome_gateway_7c49ebb18eb4_color changed from 273,100,100 to 56,91,100
2018-11-09 11:31:30.745 [ome.event.ItemCommandEvent] - Item ‘mihome_gateway_7c49ebb18eb4_brightness’ received command OFF
2018-11-09 11:31:30.749 [vent.ItemStateChangedEvent] - mihome_gateway_7c49ebb18eb4_brightness changed from 24 to 0
2018-11-09 11:31:34.083 [ome.event.ItemCommandEvent] - Item ‘mihome_gateway_7c49ebb18eb4_brightness’ received command ON
2018-11-09 11:31:34.084 [vent.ItemStateChangedEvent] - mihome_gateway_7c49ebb18eb4_brightness changed from 0 to 100
2018-11-09 11:31:56.405 [ome.event.ItemCommandEvent] - Item ‘mihome_gateway_7c49ebb18eb4_brightness’ received command OFF
2018-11-09 11:31:56.413 [vent.ItemStateChangedEvent] - mihome_gateway_7c49ebb18eb4_brightness changed from 100 to 0

So did you change any settings since the temp sensor was working? What hapens if you breathe in the temp sensor, does the temp still change?

It is not changing the value, through app is changing but in openhab no. so it is not working too.

The values are there, so it has worked but you’ve changed something… :slight_smile:
You only posted the event log, what does the openhab log say?

Hi, I’ve discovered I only have new info when I start from the scratch the configuration but after the first configuration I cannont update anything.

after reviewing log files I can see this error and It is why I thing it is not working:
No token received from the gateway yet. Unable to encrypt the access key.

I’ve looked for internet and it looks something related to wifi but I cannot find the solution.

I assume you did follow the starting guide? So you set the gateway to be used for 3rd party users and you entered the security code when adding the gateway?

I’ve activated LUMI hub lan communication protocol and I’ve copied/pasted the password to developer key in xiaomi gateway.

i need to do something more?

Note! I’ve seen something related to this error that if you activate multicast in the router It works but I’ve activated but there is no difference.