System Info Binding

Hello !

I’m testing out the Systeminfo Binding on my Raspberry Pi 3 with OH 1.8.3.

Followed the instructions on the wiki about the binding. so at first i DIDN’T download the raspbian library into /usr/share/openhab/lib. But didnt work.

so i tried downloading the library the same way its written in the wiki for pre 1.9 build.
i still dont get values for my items.

in my openhab.log i get those errors:

any idea what i did wrong ?

greetings Julian

It could be that the lib is not working for Raspberry Pi 3.
In that case, you have to build your own lib as described here.

I don’t know if it would work, but could you replace your 1.8.3 binding with the 1.9 binding and make sure you’re using the 32-bit Oracle Java?

“Copy sigar.jar and libsigar-arm-linux.so to openhab/lib/”

cant find those two files. where are they ?

“You now should have a new shell
sigar>
type help to see possible commands” -> works

how do i check if i use 32 Bit java ?

so this binding is under development… i was actually asking myselve why the wiki is talking about Version 1.9…

im going to try the 1.9 version of the binding after i tried the method @hmerk suggested.

and i could also try openhab 1.8.3 with my raspberry pi 2 and see if the binding works fine with the Pi 2 as the wiki says…

thx for help ! & sorry for my bad written english

Not sure, but this is output on my RPi2:

$ java -XshowSettings 2>&1 | grep sun.arch
    sun.arch.abi = gnueabihf
    sun.arch.data.model = 32

Well, it seems ready for use, with the main difference being it tries to handle the native libraries internally instead of requiring you to locate, download and deploy the correct one.

It will be interesting to hear how you get on!

can i just move the 1.9 binding in there ? ( i deleted the 1.8.3 binding)

after adding the 1.9 binding:

& still no data…

same here !

will keep you updated !

It seems as if both the built-in native library resolver in SIGAR (in the 1.8.3 binding), as well as the OSGi Bundle-NativeCode instruction (1.9 binding), are getting tripped up by 64-bit ARM in some way. It’s possible that the native library is trying to load, but it can’t because it can’t resolve some lower dependency shared library (just a hypothesis). I recommend researching people’s experiences with SIGAR on RPi3 (without openHAB), just to see if there are any tricks to it.

I know you are running openHAB 1.8.3, but there is a completely new SystemInfo binding in openHAB 2 (beta) that might have better success on RPi3. Ultimately, a solution that does not rely on native libraries at all will be much easier to maintain as new architectures and OS’s come into use.

@hmerk

after compiling:
where can i find those to files: sigar.jar and libsigar-arm-linux.so ??

those files Need to be moved to: /usr/share/openhab/lib ??

thx 4 Information !

I don’t understand your question. These files are created during your compile and should be tested like written :

Test your SIGAR executing
java -jar sigar-bin/lib/sigar.jar

So I’m having the System Info binding raising many errors and warnings from the monent it is installed.

e.g.

==> /var/log/openhab2/openhab.log <==
2017-02-20 21:16:12.346 [ERROR] [systeminfo.handler.SysteminfoHandler] - No information for channel process#used0
org.openhab.binding.systeminfo.model.DeviceNotFoundException: Error while getting information for process with PID 0
        at org.openhab.binding.systeminfo.model.OshiSysteminfo.getProcess(OshiSysteminfo.java:83)[188:org.openhab.binding.systeminfo:2.0.0]
        at org.openhab.binding.systeminfo.model.OshiSysteminfo.getProcessMemoryUsage(OshiSysteminfo.java:523)[188:org.openhab.binding.systeminfo:2.0.0]
        at org.openhab.binding.systeminfo.handler.SysteminfoHandler.getInfoForChannel(SysteminfoHandler.java:410)[188:org.openhab.binding.systeminfo:2.0.0]
        at org.openhab.binding.systeminfo.handler.SysteminfoHandler.publishDataForChannel(SysteminfoHandler.java:250)[188:org.openhab.binding.systeminfo:2.0.0]
        at org.openhab.binding.systeminfo.handler.SysteminfoHandler.publishData(SysteminfoHandler.java:243)[188:org.openhab.binding.systeminfo:2.0.0]
        at org.openhab.binding.systeminfo.handler.SysteminfoHandler.access$1(SysteminfoHandler.java:237)[188:org.openhab.binding.systeminfo:2.0.0]
        at org.openhab.binding.systeminfo.handler.SysteminfoHandler$1.run(SysteminfoHandler.java:215)[188:org.openhab.binding.systeminfo:2.0.0]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_112]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_112]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_112]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_112]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_112]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_112]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_112]
2017-02-20 21:16:12.349 [WARN ] [systeminfo.handler.SysteminfoHandler] - Channel with ID process#used can not be updated! No information available for the selected device.

==> /var/log/openhab2/events.log <==

I am running Zulu java which is now default in OpenHABian:

[21:22:12] openhabian@openHABianPi:~$ java -version
openjdk version "1.8.0_112"
OpenJDK Runtime Environment (Zulu Embedded 8.19.0.31-linux-aarch32hf) (build 1.8.0_112-b31)
OpenJDK Client VM (Zulu Embedded 8.19.0.31-linux-aarch32hf) (build 25.112-b31, mixed mode, Evaluation)
[21:22:18] openhabian@openHABianPi:~$

The binding does give me values in the PaperUI but my logs overflow.

Any insights here please guys?

Still got the same issue. Just did a fresh OH2 install and installed the binding via PaperUI. Immediately the logs are filled with the error as follows:

==> /var/log/openhab2/events.log <==
2017-03-23 19:19:31.839 [ItemStateChangedEvent     ] - systeminfo_computer_91778559_cpu_load changed from 2.8 to 8.0

==> /var/log/openhab2/openhab.log <==
2017-03-23 19:19:32.384 [ERROR] [systeminfo.handler.SysteminfoHandler] - No information for channel process#used0
org.openhab.binding.systeminfo.model.DeviceNotFoundException: Error while getting information for process with PID 0
        at org.openhab.binding.systeminfo.model.OshiSysteminfo.getProcess(OshiSysteminfo.java:83)[188:org.openhab.binding.systeminfo:2.0.0]
        at org.openhab.binding.systeminfo.model.OshiSysteminfo.getProcessMemoryUsage(OshiSysteminfo.java:523)[188:org.openhab.binding.systeminfo:2.0.0]
        at org.openhab.binding.systeminfo.handler.SysteminfoHandler.getInfoForChannel(SysteminfoHandler.java:410)[188:org.openhab.binding.systeminfo:2.0.0]
        at org.openhab.binding.systeminfo.handler.SysteminfoHandler.publishDataForChannel(SysteminfoHandler.java:250)[188:org.openhab.binding.systeminfo:2.0.0]
        at org.openhab.binding.systeminfo.handler.SysteminfoHandler.publishData(SysteminfoHandler.java:243)[188:org.openhab.binding.systeminfo:2.0.0]
        at org.openhab.binding.systeminfo.handler.SysteminfoHandler.access$1(SysteminfoHandler.java:237)[188:org.openhab.binding.systeminfo:2.0.0]
        at org.openhab.binding.systeminfo.handler.SysteminfoHandler$1.run(SysteminfoHandler.java:215)[188:org.openhab.binding.systeminfo:2.0.0]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_121]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_121]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
2017-03-23 19:19:32.386 [WARN ] [systeminfo.handler.SysteminfoHandler] - Channel with ID process#used can not be updated! No information available for the selected device.

==> /var/log/openhab2/events.log <==

I had a look in the oshi issues page but I couldn’t find any clue.

Can anyone help with this?

Thanks in advance