PINE64
Help with Openhab2 please - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4)
+--- Forum: Linux on Pine A64(+) (https://forum.pine64.org/forumdisplay.php?fid=6)
+---- Forum: openHAB (https://forum.pine64.org/forumdisplay.php?fid=26)
+---- Thread: Help with Openhab2 please (/showthread.php?tid=3047)



Help with Openhab2 please - Dayve - 01-07-2017

Im trying to get Openhab2 to run on my Pine64 with my Aeon Zwave gen5 stick.
Lots of problems with the the device not found. If I use the openHAB Image 20160915 base on Ubuntu Linux Longsleep image everything works great.
The problem is I would like to use Debian Base (3.10.102 BSP 2).
I have seen that I must use 32bit java so it will work.
Looked everywhere for a 32 bit version for the pine64. There is so many different versions and so confusing.
Would anyone know the steps I need to do to get it working?


RE: Help with Openhab2 please - xalius - 01-07-2017

Generally you can use 32bit libraries and binaries within a 64bit Linux system, but you need to have all the dependencies in 32bit as well for that to work. Not sure what versions of Java exist for armhf (32bit) or aarch64. There is also support in Armbian which has Debian and Ubuntu images for the Pine64 (make sure to read the notes for configuration hints), that is what I use atm for my boards: https://www.armbian.com/pine64/. As far as I know Oracle has JAVA for ARM:

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html


RE: Help with Openhab2 please - Dayve - 01-07-2017

Thanks xalius,
What is the difference between the Legacy 3.10.102 and Mainline 4.7.0?
And do I need to install both 32 bit and 64 bit Java?


RE: Help with Openhab2 please - xalius - 01-07-2017

The 3.10.x series kernels come from the original Allwinner BSP and are also the basis for the original Android 5 images, the drivers in the 3.10.x kernel support most features (especiallly video output) atm. The mainline kernel is the current version of the Linux kernel series (4.x), but since Allwinner does not do the mainlining work, this is a community project you can check out here: http://linux-sunxi.org/Main_Page , not all drivers are ready for the mainline version, especially display output is still work in progress, but you can use it for a headless image with network etc. Check the feature matrix here: http://linux-sunxi.org/Linux_mainlining_effort#Status_Matrix .

As for your OpenHAB java installation, I would only install either 32 or 64 bit java at once, depending what the requirements for OpenHAB are. Havin both is probably more trouble than you want.


RE: Help with Openhab2 please - umiddelb - 01-08-2017

There are some issues when using the 64bit JDK for aarch64 (most notably severe JDK performance degrade and non existing 64bit libraries), so the openHAB packaging is based on a 32bit JDK.

These are the steps we took last year to get a working 32bit Java environment on Ubuntu:
Code:
sudo apt install oracle-java8-installer
sudo dpkg --add-architecture armhf
# get the 32bit arm JDK, see http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
sudo tar -C /usr/lib/jvm -xzvf ...<path to the archive>
cd /usr/lib/jvm
sudo mv jdk1.8.0_91 jdk1.8.0_91.armhf
sudo mv java-8-oracle jdk1.8.0_91.arm64
sudo ln -s jdk1.8.0_91.armhf java-8-oracle
# this is only for getting a 32bit glibc, etc. shared library
sudo apt-get install iperf:armhf

Kai mentioned that he had problems using his ZWave stick with Debian ...


RE: Help with Openhab2 please - vintagewaffle - 01-30-2017

(01-08-2017, 03:40 PM)umiddelb Wrote: There are some issues when using the 64bit JDK for aarch64 (most notably severe JDK performance degrade and non existing 64bit libraries), so the openHAB packaging is based on a 32bit JDK.

These are the steps we took last year to get a working 32bit Java environment on Ubuntu:
Code:
sudo apt install oracle-java8-installer
sudo dpkg --add-architecture armhf
# get the 32bit arm JDK, see http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
sudo tar -C /usr/lib/jvm -xzvf ...<path to the archive>
cd /usr/lib/jvm
sudo mv jdk1.8.0_91 jdk1.8.0_91.armhf
sudo mv java-8-oracle jdk1.8.0_91.arm64
sudo ln -s jdk1.8.0_91.armhf java-8-oracle
# this is only for getting a 32bit glibc, etc. shared library
sudo apt-get install iperf:armhf

Kai mentioned that he had problems using his ZWave stick with Debian ...

There should be no need to add the armhf architecture and all that. I dropped the 32bit oracle jvm directly onto a armbian build and ran update-alternatives to completel install.
Something like this: http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-jdk-6-7-8-or-jre/55960#55960.

 openhab2 runs great, just don't forget to give your openhab user permissions to the devices yiou need to use (i.e. tty).



RE: Help with Openhab2 please - tllim - 02-01-2017

new openHAB 2 just release at Pine64 wiki site: http://wiki.pine64.org.