Maybe the one I have is not supported for such developer mode.
In the readme page for the mi home binding there is this step that the gateway 3 is mentioned:
•Add Gateway 2 or 3 to your WiFi Network
this gateway is supported. there are different versions of it and it is the original gateway v3 - there is an older v2 of this which looks the same. these are montioned in the readme…
This example that you share can be used to capture the information from the xiaomi temperature sensors, how would you connect it to my device? Do you have any video of this tutorial?
Hi all,
I’m new here.
I am trying to add xiaomi mi smart home gateway to the OH, I’m using 2.2.0-snapshot.
I connected the gateway to my network and enabled local area network communication protocol.
I’ve installed Xiaomi Mi Smart Home Binding, when I try to add the gateway the list is empty.
anyone know what is the problem?
I followed this tutorial: http://docs.openhab.org/addons/bindings/mihome/readme.html
I too am new here. But nice to start with an answer instead of a question
This binding has been the most challenging for my setup too. For me it was my router was not well configured for Multicast traffic.
Check your router configuration is allowing IGMP snooping (Somewhere in your wireless settings). Then in your LAN settings look for a setting to enable multicast routing (usually under IPTV settings). Also ensure the udp port 9898 is correctly forwarded (not to the WAN though!). And the things should start appearing in the inbox.
Solved my problem. In case it happens to someone else.
My Gateway and openHAB (running on raspberry pi) are in different areas of the house. The Gateway is next to the router and the raspberry pi is connected to a wireless access point (WAP).
My issue was the router wifi was set to a fixed channel and the WAP wifi channels where set to auto. Once I changed auto in the WAP to a fixed channel (same as router) was able to receive and send values to the gateway and items.
i have some issues with the MiHome Binding. I start with oh 2.2 from scratch. I install the miHome binding and discover the Gateway in PaperUI. There i can add the IP and the developerKey. But i cant add the Serial Number - is it normal/okay?
After that i connect some Mi devices (temperature and motion sensors). I can see the actual values, but i cant send commands. If i will switch the sound/light of the gateway on, i only get a security error.
java.lang.NullPointerException: null
at org.openhab.binding.mihome.internal.EncryptionHelper.encrypt(EncryptionHelper.java:69) [207:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.internal.EncryptionHelper.encrypt(EncryptionHelper.java:42) [207:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiBridgeHandler.getEncryptedKey(XiaomiBridgeHandler.java:291) [207:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiBridgeHandler.createDataJsonString(XiaomiBridgeHandler.java:277) [207:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiBridgeHandler.writeToBridge(XiaomiBridgeHandler.java:273) [207:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiActorGatewayHandler.writeBridgeLightColor(XiaomiActorGatewayHandler.java:188) [207:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiActorGatewayHandler.writeBridgeLightColor(XiaomiActorGatewayHandler.java:184) [207:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiActorGatewayHandler.execute(XiaomiActorGatewayHandler.java:67) [207:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiDeviceBaseHandler.handleCommand(XiaomiDeviceBaseHandler.java:104) [207: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.$Proxy142.handleCommand(Unknown Source) [207: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) [?:?]
I cann ping the gateway without problems, i can switch the light from the miHome app, but OH wont be able to speak with the gateway i hope you can help me !
I checked out the SourceCode of the MiHome Binding. If i see correctly, the gatewayToken isnt set. the token should be set by the command “heartbeat”. why i dont get the heartbeat?
In wireshark, i see that the gateway push the heartbeat - but why does not the pi get the heartbeat?
Can anyone explain if there is a way to see the names of sensors/devices from the openhab side of things ?
I have added my gateway and it’s found the 14 sensors that are added to it, but they all have random id’s (like mihome:sensor_magnet:158d00015843a9)
Is there a good way of relating these to the named devices in the app? (short of going round opening and closing doors… etc to see what changes in openhab)
If you have named all your items in the Xiaomi app, you should see them all in the gateway information tab in the about tab, just under where you get the developer key from.
thank you for that post - could not find anything about that behavior (not even in the documentation of that binding for 2.2 snapshot…). Is there no way to have the whole button in one rule anymore?..
I got like 15 rules or so with these buttons and I do not want to split up all the rules - that will be really worse to handle