I have set up a test rule firing when CO2 concentration reaches a certain limit. My Tradfri changes to red for a while. I wanted to underline this event through playing a sound on my Xiaomi Gateway 2. Therefore I added the following statements to my TestRule
as it is described in the Xiaomi Openhab 2 binding documentation
Unfortunately no sound is playing at all but a Warn message is indicated in the log file as follows:
2018-01-22 20:49:46.491 [WARN ] [g.mihome.handler.XiaomiBridgeHandler] - No key set in the gateway settings. Edit it in the configuration.
Hi,
I just set up the Gateway with openhab, but unfortunately the sound module doesn’t work…
It just throws the following error:
2018-03-11 02:49:24.829 [vent.ItemStateChangedEvent] - Gateway_Sound changed from 11 to 10011
2018-03-11 02:49:24.832 [vent.ItemStateChangedEvent] - Gateway_SoundVolume changed from 0 to 13
2018-03-11 02:49:29.808 [ome.event.ItemCommandEvent] - Item 'Gateway_Sound' received command 10000
2018-03-11 02:49:29.826 [ome.event.ItemCommandEvent] - Item 'Gateway_SoundVolume' received command 0
==> /var/log/openhab2/openhab.log <==
2018-03-11 02:49:29.810 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.mihome.handler.XiaomiActorGatewayHandler@13c30ec': null
java.lang.NullPointerException: null
at org.openhab.binding.mihome.internal.EncryptionHelper.encrypt(EncryptionHelper.java:69) [231:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.internal.EncryptionHelper.encrypt(EncryptionHelper.java:42) [231:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiBridgeHandler.getEncryptedKey(XiaomiBridgeHandler.java:291) [231:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiBridgeHandler.createDataJsonString(XiaomiBridgeHandler.java:277) [231:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiBridgeHandler.writeToBridge(XiaomiBridgeHandler.java:273) [231:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiActorGatewayHandler.writeBridgeRingtone(XiaomiActorGatewayHandler.java:199) [231:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiActorGatewayHandler.execute(XiaomiActorGatewayHandler.java:98) [231:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiDeviceBaseHandler.handleCommand(XiaomiDeviceBaseHandler.java:104) [231:org.openhab.binding.mihome:2.2.0]
at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source) ~[?:?]
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.$Proxy155.handleCommand(Unknown Source) [231: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.GeneratedMethodAccessor64.invoke(Unknown Source) ~[?:?]
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) [?:?]