Systeminfo binding - requesting help to test simpler packaging

Continuing the discussion from Unknown error on Startup:

I’ve submitted a pull request (PR) whose purpose is to simplify the installation of the Systeminfo binding. Before this PR, the user has to manually find, download and install the correct native library for his or her operating system and processor. On most systems, the new installation involves simply putting the binding JAR in the addons folder. For ARM systems running Linux (like the Raspberry Pi, ODROID, etc.), you have to add a new config line to openhab.cfg. But no more handling of native libraries is required unless you have an exotic or very new platform for which no native library is already packaged.

Would anyone using the Systeminfo binding on Windows or any other platform take a look at the PR to help me verify that this change is good? Thank you!

should this work with OH2?

I believe it should work with OH2. If you happen to be running it on a Raspberry Pi, you would need a file conf/services/systeminfo.cfg containing:

variant=raspbian

If you are running it on an Intel or AMD processor, you shouldn’t need any specific config.

Just place the linked test JAR in your addons folder and define items. Thanks!

Running OH2 on Windows 10 PC, got errors on startup
logs: http://pastebin.com/MEp5wX6Z

Thank you very much for taking the time to test this. I found advice like this to help me correct the issue of resolving the proper native library on Windows 10, so I’ve updated the JAR file using that advice.

Would you mind trying the new JAR?

1 Like

still no go…
log: http://pastebin.com/UzJ04NyG

Thank you again. The log seemed as if the old JAR was in effect. You may have to bundle:uninstall the old one. Sorry in a rush at the moment, but I will check back in tonight or tomorrow. Your help is much appreciated.

ahh… that’s it.
it’s good now using your latest JAR file.
only played with an item right now, System Uptime, and it’s showing correct info.

1 Like

Thank you very much, @Farhanito, for testing the proposed changes to the Systeminfo binding.

I’m now looking for someone running openHAB on Windows 7, just for a final sanity check before considering my part done. I have every reason to think it will work fine on that OS, but would like empirical evidence.

If you or anyone you know might be able to follow the steps in the PR for testing on Windows 7, I would be much obliged.

Should this work out of the box in OH2 running inside a LXC container in Ubuntu 14.04? The thing is not being initialized.

Just to confirm, you are using the 1.9.0-SNAPSHOT Systeminfo Binding, not the 2.0 binding? You used the word “thing,” which suggests you might be referring to the 2.0 binding.

The 1.x binding uses Sigar. If that runs by itself in your environment, then I don’t know what would prevent the binding from running. Do you have logs?

Yes, I am using the 2.0 binding, and I apologize for the confusion, but I’m late to the OH2 party, so I’m not fully up on the nomenclature. Should I ditch the 2.0 binding for now?

You could certainly try the 1.9 binding, but I think it could be very helpful if you provided some log files and any configuration so we can see if the 2.0 Systeminfo binding has a bug or some other setup issue.

Absolutely - I’d like to help however I can. Here are the relevant entries from openhab.log:

2016-12-05 10:25:16.725 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘systeminf:computer:openhab2’ to inbox.
2016-12-05 10:25:24.128 [ERROR] [systeminfo.handler.SysteminfoHandler] - Can not instantate Systeminfo object!
at oshi.hardware.platform.linux.LinuxBlockDevStats.(LinuxBlockDevStats.java:78)[198:org.openhab.binding.systeminfo:2.0.0.201612022359]
at oshi.hardware.platform.linux.LinuxDisks.computeDiskStats(LinuxDisks.java:145)[198:org.openhab.binding.systeminfo:2.0.0.201612022359]
at oshi.hardware.platform.linux.LinuxDisks.getDisks(LinuxDisks.java:93)[198:org.openhab.binding.systeminfo:2.0.0.201612022359]
at oshi.hardware.platform.linux.LinuxHardwareAbstractionLayer.getDiskStores(LinuxHardwareAbstractionLayer.java:70)[198:org.openhab.binding.systeminfo:2.0.0.201612022359]
at org.openhab.binding.systeminfo.model.OshiSysteminfo.(OshiSysteminfo.java:69)[198:org.openhab.binding.systeminfo:2.0.0.201612022359]
at org.openhab.binding.systeminfo.handler.SysteminfoHandler.instantiateSysteminfoLibrary(SysteminfoHandler.java:112)[198:org.openhab.binding.systeminfo:2.0.0.201612022359]
at org.openhab.binding.systeminfo.handler.SysteminfoHandler.initialize(SysteminfoHandler.java:98)[198:org.openhab.binding.systeminfo:2.0.0.201612022359]
2016-12-05 12:33:32.289 [ERROR] [systeminfo.handler.SysteminfoHandler] - Can not instantate Systeminfo object!
at oshi.hardware.platform.linux.LinuxBlockDevStats.(LinuxBlockDevStats.java:78)[198:org.openhab.binding.systeminfo:2.0.0.201612022359]
at oshi.hardware.platform.linux.LinuxDisks.computeDiskStats(LinuxDisks.java:145)[198:org.openhab.binding.systeminfo:2.0.0.201612022359]
at oshi.hardware.platform.linux.LinuxDisks.getDisks(LinuxDisks.java:93)[198:org.openhab.binding.systeminfo:2.0.0.201612022359]
at oshi.hardware.platform.linux.LinuxHardwareAbstractionLayer.getDiskStores(LinuxHardwareAbstractionLayer.java:70)[198:org.openhab.binding.systeminfo:2.0.0.201612022359]
at org.openhab.binding.systeminfo.model.OshiSysteminfo.(OshiSysteminfo.java:69)[198:org.openhab.binding.systeminfo:2.0.0.201612022359]
at org.openhab.binding.systeminfo.handler.SysteminfoHandler.instantiateSysteminfoLibrary(SysteminfoHandler.java:112)[198:org.openhab.binding.systeminfo:2.0.0.201612022359]
at org.openhab.binding.systeminfo.handler.SysteminfoHandler.initialize(SysteminfoHandler.java:98)[198:org.openhab.binding.systeminfo:2.0.0.201612022359]

Do you need me to run in debug?

To the extent it matters, the OH2 process is being run as “openhab” user. Could this be a permission issue of some type?

@svilenvul Any thoughts about this environment and log?

I’ll also add that I installed Oracle Java 8 through the webup8 PPAs (because it’s not in the official Ubuntu 14.04 packages), so I think that I’m in the right environment according to the installation instructions in the OH2 documentation.

From this log I can not see the initial exception. I can only guess that Exception is caused here.

You run openhab on a virtual machine, have I understood you right ?

Yes, that’s right. From what I understand, LXC containers are something in between a chroot and full-on virtual machine with a separate kernel (https://wiki.archlinux.org/index.php/Linux_Containers). I’m happy to enable additional logging or collect other logs if it will help.

Should I open an issue in GitHub?