Hello,
I’m on 3.1 M3 and I noticed that the Xiaomi gateways (the things that control the gateway itself, the brightness, the color etc…) do not seem to handle the commands well, it generates a java error (see below) and it does not have any effect on the gateway.
When I provision the gateway from the MiHome app (which I never use normally, but here for testing I do), i get the OH items properly reflect e.g. the brightness or the color…
Does this sound familiar to anyone?
Note that it used to work fine with OH2 and I think I never got it to work in OH3 (but I did not look into it until now). I have also tried to recreate the item and link straight from OH3 to try to discard possible migration problems but I do get the same problem.
Note also that all my other things work fine (but they are sensors only and so I don’t send commands to them).
Thanks,
The Java error I get looks like this:
2021-05-14 18:38:49.609 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.mihome.internal.handler.XiaomiActorGatewayHandler@1dfbb37': null
java.lang.NullPointerException: null
at org.openhab.binding.mihome.internal.handler.XiaomiBridgeHandler.toJsonValue(XiaomiBridgeHandler.java:368) ~[?:?]
at org.openhab.binding.mihome.internal.handler.XiaomiBridgeHandler.sendCommandToBridge(XiaomiBridgeHandler.java:297) ~[?:?]
at org.openhab.binding.mihome.internal.handler.XiaomiBridgeHandler.sendCommandToBridge(XiaomiBridgeHandler.java:279) ~[?:?]
at org.openhab.binding.mihome.internal.handler.XiaomiBridgeHandler.writeToBridge(XiaomiBridgeHandler.java:316) ~[?:?]
at org.openhab.binding.mihome.internal.handler.XiaomiActorGatewayHandler.writeBridgeLightColor(XiaomiActorGatewayHandler.java:169) ~[?:?]
at org.openhab.binding.mihome.internal.handler.XiaomiActorGatewayHandler.writeBridgeLightColor(XiaomiActorGatewayHandler.java:165) ~[?:?]
at org.openhab.binding.mihome.internal.handler.XiaomiActorGatewayHandler.execute(XiaomiActorGatewayHandler.java:70) ~[?:?]
at org.openhab.binding.mihome.internal.handler.XiaomiDeviceBaseHandler.handleCommand(XiaomiDeviceBaseHandler.java:138) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor202.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
at com.sun.proxy.$Proxy1501.handleCommand(Unknown Source) [?:?]
at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:80) [bundleFile:?]
at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]
at jdk.internal.reflect.GeneratedMethodAccessor241.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
==> /var/log/openhab/events.log <==
2021-05-14 18:38:49.603 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'TestBrightness' received command 88
2021-05-14 18:38:49.605 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'TestBrightness' predicted to become 88
2021-05-14 18:38:49.641 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TestBrightness' changed from 67 to 88