OpenHAB pure Java? Native Libraries?

Hi,

I guess, there must be addons that use native libraries.

How do I see which ones?

Idea is to run OpenHAB under FreeBSD. There is a port, but not for 3.

Juergen

If Java 11 JDK runs then OpenHAB 3 should run. No porting should be needed.

Really no native libraries?

Because I found jna:

./runtime/system/net/java/dev/jna/jna-platform/5.4.0/jna-platform-5.4.0.jar
./runtime/system/net/java/dev/jna/jna/5.4.0/jna-5.4.0.jar

There is no straight way to see this, as some bindings use external libraries that may contain native libraries. But I think you can assume any binding directly communicating with the hardware it runs on uses native libraries. Like bluetooth, serial and gpio bindings. So if you want to know you need to check each binding, check if it uses a library and check if that library contains native code.

1 Like

So, it would be nice if the addons listed on Add-ons | openHAB
would get a little hint [pure java] or [needs native libaries] or a nice little icon.

IMHO you can find all needed Infos at Github openhab addons,. Remember, this is OpenSource.

1 Like

I have been running OH3 under FreeBSD for sometime (actually a TrueNAS Jail). I don’t use any hardware connected directly to this instance (ie. no USB zigbee or zwave dongle), but you can get these to work with the right dev_fs_ruleset.

As for installing in a Jail, its fairly straight forward:

1). Create a jail (optionally add a mount point for data)
2). Install openjdk11 (pkg install openjdk11)
3). Download and unzip OpenHAB 3

To start as a service you will need a script (/usr/local/etc/rc.d/openhab) and then enable it in your /etc/rc.conf file.

In addition to the above I also installed sudo and arping - for TrueNAS you do need a custom dev_fs_ruleset to run arping as it needs write access to /dev/bpf

Actually, it is a z-wave dongle for me. But thanks for all hints, now I know where to look and what to look for.

Juergen