I’ve installed Systeminfo 2.0 binding via Paper UI and tried to discover things. It finds Local computer (Windows 7 maching, which OpenHAB is installed to), but when I add it as thing it states it’s offline. Error message I’m receiveing is: OFFLINE - HANDLER_INITIALIZING_ERROR Thing can not be initialized! Anyone had similar problem with this binding, or am I doing something wrong?
I am running the Systeminfo binding on OpenHAB 2 which is also running on Windows 7.
The only issue I have with the binding is following a restart of openHAB 2 whereby is stays in an ‘initialising’ state. If I then uninstall the systeminfo binding and reinstall the binding (via the Paper UI) it then works OK.
There was a similar issue with the Astro binding that is now fixed. I was hoping that this was related, but it looks like it isn’t.
as you’ve suggested, I’ve set logging level for Systeminfo binding to debug, and this is the part of the log with debug and error messages I’ve found in openhab.log:
2016-11-08 10:52:42.630 [DEBUG] [discovery.SysteminfoDiscoveryService] - Starting system information discovery !
2016-11-08 10:52:42.827 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'systeminfo:computer:MEDIABEAST' to inbox.
2016-11-08 10:52:51.994 [DEBUG] [org.openhab.binding.systeminfo ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandler}={thing.type=systeminfo:computer, thing.id=systeminfo:computer:MEDIABEAST, service.id=414, service.bundleid=209, service.scope=singleton} - org.openhab.binding.systeminfo
2016-11-08 10:52:51.998 [DEBUG] [systeminfo.handler.SysteminfoHandler] - Start initializing!
2016-11-08 10:52:51.998 [DEBUG] [systeminfo.handler.SysteminfoHandler] - Thing configuration updated!
2016-11-08 10:52:51.999 [DEBUG] [systeminfo.handler.SysteminfoHandler] - Channel configuration updated!
2016-11-08 10:52:52.771 [ERROR] [systeminfo.handler.SysteminfoHandler] - Can not instantate Systeminfo object!
java.lang.NullPointerException
at com.sun.jna.platform.win32.Variant$VARIANT.stringValue(Variant.java:539)[209:org.openhab.binding.systeminfo:2.0.0.201610221219]
at oshi.util.platform.windows.WmiUtil.enumerateProperties(WmiUtil.java:459)[209:org.openhab.binding.systeminfo:2.0.0.201610221219]
at oshi.util.platform.windows.WmiUtil.queryWMI(WmiUtil.java:324)[209:org.openhab.binding.systeminfo:2.0.0.201610221219]
at oshi.util.platform.windows.WmiUtil.selectObjectsFrom(WmiUtil.java:242)[209:org.openhab.binding.systeminfo:2.0.0.201610221219]
at oshi.hardware.platform.windows.WindowsCentralProcessor.getProcesses(WindowsCentralProcessor.java:397)[209:org.openhab.binding.systeminfo:2.0.0.201610221219]
at org.openhab.binding.systeminfo.model.OshiSysteminfo.<init>(OshiSysteminfo.java:72)[209:org.openhab.binding.systeminfo:2.0.0.201610221219]
at org.openhab.binding.systeminfo.handler.SysteminfoHandler.instantiateSysteminfoLibrary(SysteminfoHandler.java:121)[209:org.openhab.binding.systeminfo:2.0.0.201610221219]
at org.openhab.binding.systeminfo.handler.SysteminfoHandler.initialize(SysteminfoHandler.java:107)[209:org.openhab.binding.systeminfo:2.0.0.201610221219]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:758)[106:org.eclipse.smarthome.core.thing:0.9.0.201610220816]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)[106:org.eclipse.smarthome.core.thing:0.9.0.201610220816]
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:177)[99:org.eclipse.smarthome.core:0.9.0.201610220816]
at java.util.concurrent.FutureTask.run(Unknown Source)[:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)[:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)[:1.8.0_111]
at java.lang.Thread.run(Unknown Source)[:1.8.0_111]
It doesn’t look like it’s the same problem Pine 64 / Linux user had. Thank you for your help.
@davorf I strongly recommend you open an issue here with the log and other details about the failure. It seems like a bug in a dependent library that the binding author would be interested in seeing.
I’ve just installed latest OH2 nightly and tried Systeminfo 2.0 binding and it works. I was wondering if it’s possible to display available/total storage for more than a one hard drive? Using
channel="systeminfo:computer:MAIN:storage#total"
works, but it shows total space for one of the drives (and it’s not a system drive). Is there a way to display total storage of other drives? I’ve tried adding index, but it doesn’t work