Xiaomi Gateway Binding snapshot bug

Hello all,
I’m using the latest snapshot of the Xiaomi Binding and I found that if I switch off the LED light on the gateway from PaperUI I cannot turn it back on using the Aqara square button. However, if I toggle the LED using the button it works fine. Below is the output from the events.log file:

Using Xiaomi button ==========================================================
2017-08-07 20:05:20.334 [ItemStateChangedEvent ] - Light_XiaomiGW_Br changed from 0 to 19
2017-08-07 20:05:20.343 [ItemStateChangedEvent ] - Light_XiaomiGW_Sw changed from OFF to ON
2017-08-07 20:05:20.355 [ItemStateChangedEvent ] - Light_XiaomiGW_RGB changed from 0,0,0 to 24,96,100
2017-08-07 20:05:26.323 [ItemStateChangedEvent ] - Light_XiaomiGW_Br changed from 19 to 0
2017-08-07 20:05:26.332 [ItemStateChangedEvent ] - Light_XiaomiGW_Sw changed from ON to OFF
2017-08-07 20:05:26.346 [ItemStateChangedEvent ] - Light_XiaomiGW_RGB changed from 24,96,100 to 0,0,0
Clicked via PaperUI ==========================================================
2017-08-07 20:06:08.592 [ItemCommandEvent ] - Item ‘Light_XiaomiGW_Sw’ received command ON
2017-08-07 20:06:08.602 [ItemStateChangedEvent ] - Light_XiaomiGW_Sw changed from OFF to ON
2017-08-07 20:06:08.618 [ItemStateChangedEvent ] - Light_XiaomiGW_Br changed from 0 to 20
2017-08-07 20:06:08.647 [ItemStateChangedEvent ] - Light_XiaomiGW_RGB changed from 0,0,0 to 24,96,100
2017-08-07 20:06:09.864 [ItemCommandEvent ] - Item ‘Light_XiaomiGW_Sw’ received command OFF
2017-08-07 20:06:09.872 [ItemStateChangedEvent ] - Light_XiaomiGW_Sw changed from ON to OFF
2017-08-07 20:06:09.901 [ItemStateChangedEvent ] - Light_XiaomiGW_Br changed from 20 to 0

I wonder if this is the cause as it seems to turn the brightness down to 0


Sorry for highjacking your post, but as you’re one step ahead maybe you could help me out.

I’m a total newbie with openhab and coding, just tried this because I wanted to control an Orvibo Socket with a Xiaomi Wireless switch.

Moving forward, however, I found I cannot control the gateway from the 2.1 Xiaomi Binding. Using Paper UI the values for the gateway and its sensors show up fine, but when I use the switches and sliders, nothing happens. I am able to control all of it through the Mi Home app on my phone, however and I’m able to control the orvibo socket from PaperUI Control Panel.

What did I miss? Also, the binding I installed doesn’t show the item Switch Gateway_LightSwitch { channel=“mihome:gateway::brightness” } mentioned at http://docs.openhab.org/addons/bindings/mihome/readme.html#supported-devices

Did you add the developer key to the gateway “Thing”?
Once you’ve done that all the items attached to the gateway should technically appear in the Inbox area of PaperUI

Yes i did. Even refreshed it a few times. As I said all sensors show up,
I can use the switch to control a wiwo socket, i see live updates of the
gateway status (light, color, illumination level,…) but the switch item
is missing. Could it be I need to update to a newer binding?

A quick update this for anyone it might help: I installed the newer Xiaomi bindings from https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.mihome/2.2.0-SNAPSHOT/ and refreshed the developer key, and now it works. I didn’t test step by step, but I’m assuming the main culprit was the older binding, that didn’t contain the appropriate switch channels/items. I installed it from the remote repository, maybe someone can update the files.