Hi guys,
I just started with using OH so please forgive any easy questions, it’s pretty hard to find the right information in all those huge threads with 100+ posts which cover multiple years and therefore the total development of the software.
At first, MY SETUP
- Xiaomi Smart home works perfectli with the Mi Home App (Switches, Plugs, Light, Sensors)
- OH2.2 on Win10
- latest Zulu jdk x64 Java 8 (I think is was version 8u152)
- Xiaomi Binding installed according to https://docs.openhab.org/addons/bindings/mihome/readme.html
- Gateway was not auto discovered --> set to developer mode and added via things-file --> all sensors/switches got auto discovered
I thought that would be it and I could start adding my hardware an write some cool rules … but my first test was to add the items for one power socket and try to control this manually via paperUI
as you can see in the log-file, on start-up the correct values of the power socket are read (power “on”, in-use “on”, power consumption “71,83 W”) and those match the values in the Xiaomi Mi Home App.
But those values are never updated in the paperui (do i have to do this manually with a rule?), for instance when I reduce the needed power or I switch of the plug via Mi Home App (is it possible, that Mi Home and OH have access to the Hardware at the same time?)
Additionally, I cannot switch the plug from the paperUI and the log of OH shows an error which i don’t understand, could you please give me a direction where to search for the reason?
Launching the openHAB runtime...
__ _____ ____
____ ____ ___ ____ / / / / | / __ )
/ __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ |
/ /_/ / /_/ / __/ / / / __ / ___ |/ /_/ /
\____/ .___/\___/_/ /_/_/ /_/_/ |_/_____/
/_/ 2.2.0
Release Build
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.
openhab> log:tail
21:51:21.594 [INFO ] [der.internal.HomeBuilderDashboardTile] - Started Home Builder at /homebuilder
21:51:22.467 [WARN ] [rg.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 192.168.131.1
21:51:22.514 [WARN ] [rg.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 192.168.178.21
21:51:22.993 [WARN ] [rg.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 192.168.131.1
21:51:22.993 [WARN ] [rg.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 192.168.178.21
21:51:23.150 [INFO ] [i.dashboard.internal.DashboardService] - Started dashboard at http://192.168.52.1:8080
21:51:23.150 [INFO ] [i.dashboard.internal.DashboardService] - Started dashboard at https://192.168.52.1:8443
21:51:28.460 [INFO ] [rthome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
21:51:29.018 [INFO ] [del.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'default.things', using it anyway:
Provide a thing type ID and a thing ID in this format:
<thingTypeId> <thingId>
21:51:29.018 [INFO ] [del.core.internal.ModelRepositoryImpl] - Loading model 'default.things'
21:51:29.111 [INFO ] [thome.event.ItemChannelLinkAddedEvent] - Link 'XiaomiMiSmartSocketPlugTV_PowerConsumed-mihome:sensor_plug:158d00010xxxxx:powerConsumed' has been added.
21:51:29.111 [INFO ] [thome.event.ItemChannelLinkAddedEvent] - Link 'XiaomiMiSmartSocketPlugTV_Power-mihome:sensor_plug:158d00010xxxxx:power' has been added.
21:51:29.127 [INFO ] [thome.event.ItemChannelLinkAddedEvent] - Link 'XiaomiMiSmartSocketPlugTV_InUse-mihome:sensor_plug:158d00010xxxxx:inUse' has been added.
21:51:29.127 [INFO ] [thome.event.ItemChannelLinkAddedEvent] - Link 'XiaomiMiSmartSocketPlugTV_ProvidedPower-mihome:sensor_plug:158d00010xxxxx:loadPower' has been added.
21:51:30.303 [INFO ] [.basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
21:51:30.350 [INFO ] [marthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
21:51:30.381 [INFO ] [bpanel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
21:51:30.725 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'mihome:sensor_plug:158d00010xxxxxx' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
21:51:30.975 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'mihome:bridge:286c078xxxxx' changed from UNINITIALIZED to INITIALIZING
21:51:31.006 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'mihome:gateway:286c078xxxxx' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
21:51:32.096 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'mihome:bridge:286c078xxxxx' changed from INITIALIZING to ONLINE
21:51:32.128 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'mihome:sensor_plug:158d00010xxxxx' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
21:51:32.128 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'mihome:gateway:286c078xxxxx' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
21:51:32.190 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'mihome:gateway:286c078xxxxx' changed from INITIALIZING to ONLINE
21:51:32.190 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'mihome:sensor_plug:158d00010xxxxx' changed from INITIALIZING to ONLINE
21:51:32.206 [INFO ] [smarthome.event.ItemStateChangedEvent] - XiaomiMiSmartSocketPlugTV_Power changed from NULL to ON
21:51:32.221 [INFO ] [smarthome.event.ItemStateChangedEvent] - XiaomiMiSmartSocketPlugTV_InUse changed from NULL to ON
21:51:32.221 [INFO ] [smarthome.event.ItemStateChangedEvent] - XiaomiMiSmartSocketPlugTV_ProvidedPower changed from NULL to 71.83
21:51:32.221 [INFO ] [smarthome.event.ItemStateChangedEvent] - XiaomiMiSmartSocketPlugTV_PowerConsumed changed from NULL to 26.657
21:52:05.743 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'XiaomiMiSmartSocketPlugTV_Power' received command OFF
21:52:05.747 [INFO ] [smarthome.event.ItemStateChangedEvent] - XiaomiMiSmartSocketPlugTV_Power changed from ON to OFF
21:52:05.783 [ERROR] [rnal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.mihome.handler.XiaomiActorPlugHandler@18fcc16f': null
java.lang.NullPointerException: null
at org.openhab.binding.mihome.internal.EncryptionHelper.encrypt(EncryptionHelper.java:69) [203:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.internal.EncryptionHelper.encrypt(EncryptionHelper.java:42) [203:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiBridgeHandler.getEncryptedKey(XiaomiBridgeHandler.java:291) [203:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiBridgeHandler.createDataJsonString(XiaomiBridgeHandler.java:277) [203:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiBridgeHandler.writeToDevice(XiaomiBridgeHandler.java:268) [203:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiActorPlugHandler.execute(XiaomiActorPlugHandler.java:47) [203:org.openhab.binding.mihome:2.2.0]
at org.openhab.binding.mihome.handler.XiaomiDeviceBaseHandler.handleCommand(XiaomiDeviceBaseHandler.java:104) [203: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.$Proxy138.handleCommand(Unknown Source) [203: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) [?:?]
Thanks in advance,
Axel