openHABian hassle-free openHAB Setup

i’ve finaly started with openHABian on my Pine64. but running in the same problem with the RFXcom Binding. (2 weeks old image)

Created an symlink:

Made the changes to

/etc/default/openhab2

Finding this in the log:

[ERROR] [g.rfxcom.handler.RFXComBridgeHandler] - Connection to RFXCOM transceiver failed: invalid port

checking with:

sudo systemctl start openhab2.service

pointed me to a failure regarding the Java Serial port handler RxTx

I’ll have to check my system for all details.

Details from my side:

openhabian@OpenHAB2:~$ java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

details from the running service:

● openhab2.service - openHAB 2 - empowering the smart home
   Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2017-05-29 08:03:52 CEST; 3 days ago
     Docs: http://docs.openhab.org
           https://community.openhab.org
 Main PID: 744 (karaf)
   CGroup: /system.slice/openhab2.service
           ├─ 744 /bin/bash /usr/share/openhab2/runtime/bin/karaf server
           └─1187 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/openhab2 -Dopenhab.logdir=/var/log/openhab2 -Dfelix.cm.dir=/var/lib/openhab2/config -Dorg.osgi.service.http.port=8080 -Dorg.osgi.service.http.port.secure=8443 -Djava.awt.headless=true -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyUSBrfxtrx -Djava.endorsed.dirs=/usr/lib/jvm/java-8-oracle/jre/jre/lib/endorsed:/usr/lib/jvm/java-8-oracle/jre/lib/endorsed:/usr/share/openhab2/runtime/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/java-8-oracle/jre/jre/lib/ext:/usr/lib/jvm/java-8-oracle/jre/lib/ext:/usr/share/openhab2/runtime/lib/ext -Dkaraf.instances=/usr/share/openhab2/runtime/instances -Dkaraf.home=/usr/share/openhab2/runtime -Dkaraf.base=/var/lib/openhab2 -Dkaraf.data=/var/lib/openhab2 -Dkaraf.etc=/var/lib/openhab2/etc -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/var/lib/openhab2/tmp -Djava.util.logging.config.file=/var/lib/openhab2/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /usr/share/openhab2/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.0.8.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.jaas.boot-4.0.8.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.main-4.0.8.jar:/usr/share/openhab2/runtime/lib/boot/org.osgi.core-6.0.0.jar org.apache.karaf.main.Main

Jun 01 23:22:12 OpenHAB2 start.sh[744]: java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver
Jun 01 23:23:12 OpenHAB2 start.sh[744]: java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver

So it seems that the serial port is not hassle-free.

i got the 32 bit version running;
Topic: 64 bit arm serial

At the moment i’ve made it working with the following commands:

sudo dpkg --add-architecture armhf
sudo apt-get update
sudo apt-get install openjdk-8-jre-headless:armhf

Selecting the new installed Java:

sudo update-alternatives --config-java

And after a restart i could use the RFXcom.

Next task for me is to move to config file instead of the GUI and update to the latest openHAB