Xiaomi Gateway

Hello,

Being beginner, I went from domoticz to openhab2 today, so sorry if my question seems stupid or already asked but I can not find a solution to my problem by following https://docs.openhab.org/addons/bindings/ mihome / readme.html

I’m trying to bind xiaomi home security hardware with openhab, I add the items. I can change the settings in the interface but nothing happens on the lamp. (as if the data was not sending itself)

On the other hand when I do the manipulation with the mobile application for the lamp, I have the reassemblies that are updated in openhab2.

The password dev is well informed.

I use openhabian 1.4.1 and I made the configuration under paperUI. My Xiaomi gateway and the openhab are on the same subnet.

Thank you in advance for your answers

Are you able to change the lamps from the phone app?
Is the lamps paired?

Once that is done and you have dev code you should be OK?

thank you for your reply
With the mobile application, I have no problem. The lamp responds well, it worked well with domoticz.
I put the code dev in the thing “xiaomi gateway”.

The lux goes well but the ignition control, for example, does not work.

I remind you that when I change the color change cursor in the mobile application, the data is transferred to openhab.
But when I want to do the opposite, ie change the cursor in openhab, nothing happens in the mobile application or on the lamp.

Hi

Do you have a serial as indicated in my screenshot for your gateway?

It should be a number corrosponding to the MAC address of the Gateway usually.

Also, is your gateway updated to the latest firmware version?
Mine is on 1.4.1_154

Also make sure there isn’t a space before or after the Developer Key filled in on Paper UI.

Also also, do you have sensors connected to the gateway? Are they reporting updates to openHAB?

Thanks but no work despite a new install openhab2 :frowning:
Now with the application mobile, the datas no update in the openhab…

Yes it’s the same

I have the same

Yes, I verify all is good

Yes before integrated to the openhab I have already sensors connect to gateway.

For the reporting update to openhab :

Edit

  • Xiaomi Mi Smart Home Gateway, only the illumination works
  • door sensor , only battery state
  • Motion Sensor, only battery state
  • Wireless Switch, only battery state
  • Honeywell Fire Alarm Detector, only battery state

Thanks for you help !

No additional binding to install apart from Xiaomi Mi Smart Home Binding ??

Hmm, that’s odd. I’ve previously had those symptoms, and it is usually when not all the settings correspond to the gateway.
Have you tried refreshing the developer key on the MI APP, and then retyping in the new one on openHAB?

No, you only need the Mi Home binding. Which version of the binding are you using?

yes i tried to change the developer key many time, I try again but no work :frowning:

binding-mihome - 2.2.0

Please help !!!

Do you know where I can see the log of openhab2 and particulary for xiaomi binding ?

On openhabian the log will be in
/var/log/openhab2
You want to monitor openhab.log at the startup of openhab
The binding start information will be in there

I have this message when I move the cursor ON/OFF of brightness :

2018-05-15 23:46:49.321 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.mihome.handler.XiaomiActorGatewayHandler@40520dd1’: null
java.lang.NullPointerException: null
at org.openhab.binding.mihome.internal.EncryptionHelper.encrypt(EncryptionHelper.java:69) [202:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.internal.EncryptionHelper.encrypt(EncryptionHelper.java:42) [202:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiBridgeHandler.getEncryptedKey(XiaomiBridgeHandler.java:291) [202:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiBridgeHandler.createDataJsonString(XiaomiBridgeHandler.java:277) [202:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiBridgeHandler.writeToBridge(XiaomiBridgeHandler.java:273) [202:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiActorGatewayHandler.writeBridgeLightColor(XiaomiActorGatewayHandler.java:188) [202:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiActorGatewayHandler.writeBridgeLightColor(XiaomiActorGatewayHandler.java:184) [202:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiActorGatewayHandler.execute(XiaomiActorGatewayHandler.java:73) [202:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiDeviceBaseHandler.handleCommand(XiaomiDeviceBaseHandler.java:104) [202:org.openhab.binding.mihome:2.2.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [109:org.eclipse.smarthome.core:0.10.0.b1]
at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [109:org.eclipse.smarthome.core:0.10.0.b1]
at com.sun.proxy.$Proxy137.handleCommand(Unknown Source) [202:org.openhab.binding.mihome:2.2.0]
at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:72) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]
at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [109:org.eclipse.smarthome.core:0.10.0.b1]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [109:org.eclipse.smarthome.core:0.10.0.b1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]

Do you have a solution ?

No but now the dev will know what’s wrong
Can you post that on Github, please

With a new install from scratch openhabian 2.4.0 and xiaomi bnding 2.4.0.SNAPSHOT, it’s work fine.

Latest OpenHABian release is 1.4

https://github.com/openhab/openhabian/releases