0
Igor

tutorial Install OpenHab on Armbian

Recommended Posts

Hi, seems to have some issues with the installed java version:

 

Feb 28 20:11:19 homecontrol systemd[1]: openhab2.service: Service RestartSec=5s expired, scheduling restart.
Feb 28 20:11:19 homecontrol systemd[1]: openhab2.service: Scheduled restart job, restart counter is at 2.
Feb 28 20:11:19 homecontrol systemd[1]: Stopped openHAB 2 - empowering the smart home.
Feb 28 20:11:19 homecontrol systemd[1]: Started openHAB 2 - empowering the smart home.
Feb 28 20:11:20 homecontrol karaf[4965]: null
Feb 28 20:11:20 homecontrol karaf[4965]: Error occurred shutting down framework: java.lang.NumberFormatException: null
Feb 28 20:11:20 homecontrol karaf[4965]: java.lang.NumberFormatException: null
Feb 28 20:11:20 homecontrol karaf[4965]:         at java.lang.Integer.parseInt(Integer.java:542)
Feb 28 20:11:20 homecontrol karaf[4965]:         at java.lang.Integer.parseInt(Integer.java:615)
Feb 28 20:11:20 homecontrol karaf[4965]:         at org.apache.karaf.main.ConfigProperties.<init>(ConfigProperties.java:235)
Feb 28 20:11:20 homecontrol karaf[4965]:         at org.apache.karaf.main.Main.updateInstancePidAfterShutdown(Main.java:227)
Feb 28 20:11:20 homecontrol karaf[4965]:         at org.apache.karaf.main.Main.main(Main.java:192)
Feb 28 20:11:20 homecontrol systemd[1]: openhab2.service: Main process exited, code=exited, status=254/n/a
Feb 28 20:11:20 homecontrol systemd[1]: openhab2.service: Failed with result 'exit-code'.

 

I'm using a NanoPC-T4, Armbian buster with Linux 5.4.20-rockchip64

 

 

Share this post


Link to post
Share on other sites
38 minutes ago, TinaB said:

Hi, seems to have some issues with the installed java version:


I made a quick install on a device that I am doing some other tests. Orangepi Lite 2, which is also ARM64 and there are no issues. Openhab is installed from armbian-config in no time and works.

Perhaps try also Bionic build. I can check on the exact hardware in next days if this will not help.

 

If this is not a hardware issue, there is little we can help. We only provide a base where this application can work.

Share this post


Link to post
Share on other sites

It works with Bionic build. Is there a EOL date for the bionic builds (don't want to migrate soon)...

Share this post


Link to post
Share on other sites
On 2/28/2020 at 10:19 PM, TinaB said:

It works with Bionic build. Is there a EOL date for the bionic builds (don't want to migrate soon)...

 

We only maintain the critical stuff, board support, kernel and loaders and that we won't drop anytime soon. For Ubuntu user land LTS releases you (usually) don't need to worry about.

 

Debian Buster will also become EOL one day and btw. I tested today with applied all updates and it works on T4 without any troubles. Perhaps yours was broken by just some random package/reason?

Share this post


Link to post
Share on other sites

Just noticed this... Re Java, you need to use Azul Zulu Embedded v8 at the moment... OpenJDK and things like that are sluggish/slow

 

Full details here

https://community.openhab.org/t/version-2-openhab-openhabian-on-an-android-tv-box-running-armbian-setting-it-up/76367

 

Actual commands here:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9

sudo apt-add-repository 'deb http://repos.azulsystems.com/ubuntu stable main'

sudo apt-get update

sudo apt-get install zulu-embedded-8

Share this post


Link to post
Share on other sites
2 hours ago, erew said:

you need to use Azul Zulu Embedded v8

 

2 hours ago, erew said:

Actual commands here

 

Is this method working everywhere?


Those does:

https://github.com/armbian/config/blob/master/debian-software#L796-L854

https://github.com/armbian/config/commit/f19c4cd5e9a771a1edce7b13dbd8a7e506ecb2b6#diff-a9db3e595a4f6439b45e27165146ce15

 

I am sure it can be improved further ... thanks.

Share this post


Link to post
Share on other sites

The commands I gave above... I found hidden away on Azul's website.....

 

https://docs.azul.com/zulu/zuludocs/ZuluUserGuide/PrepareZuluPlatform/AttachAPTRepositoryUbuntuOrDebianSys.htm

 

for these 3 lines:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9

sudo apt-add-repository 'deb http://repos.azulsystems.com/ubuntu stable main'

sudo apt-get update

 

and 

 

https://docs.azul.com/zulu/zuludocs/ZuluReleaseNotes/Troubleshooting.htm

 

for this line (Azul Repository Tips section):

sudo apt-get install zulu-embedded-8

They've worked for me on every build/rebuild Ive done of my ARM systems (3 different systems and probably about 10 rebuilds over time).

 

Though, I will say that with this build of Java, its best to add some XMM and XMS memory settings to the Openhab EXTRA_JAVA_OPTS within Openhab after its installed, as the Embedded version does seem to like keeping low memory utilization.... but that would be a case by case basis depending on the board its installed on. These settings are also very well discussed on the Openhab community forums.

 

Share this post


Link to post
Share on other sites
6 hours ago, erew said:

as the Embedded version does seem to like keeping low memory utilization


I didn't dug much deep with this since system already works as smooth as I would expect and have many other things to take care. But possibility to fine tune things are good to cover corner cases. I am not sure I will do any changes in our installer anytime soon, but feel free to improve it.

 

I saw those remarks on OH forums, but still can't remember why I didn't proceed to more convenient repository install. Is version there older or something is missing ... ?

Share this post


Link to post
Share on other sites

The 1st time I installed Openhab was a few years back and it was on a TV Box variant of Armbian. Either the option to install Openhab wasnt in the Armbian Config Util on that build/system, or I missed it being in the list and would/should have used that. 

 

I ended up for various reasons having to rebuild and customize my install multiple times, plus I couldnt see much mention of Armbian on the Openhab forums and suffered some problems with Openhabian's install routine (which I think may(?) be resolved now). So, at the time I wrote a guide there, partly so I could remember everything if I had to rebuild and also to share with others whom might hunt out the word Armbian.

 

As for versions, yes I think there is a slightly later build..  8.46.0.225 vs 8.40.0.178

Current Arm Build 64 - https://cdn.azul.com/zulu-embedded/bin/zulu8.46.0.225-ca-jdk8.0.252-linux_aarch64.tar.gz

Current Arm Build 32 - https://cdn.azul.com/zulu-embedded/bin/zulu8.46.0.225-ca-jdk8.0.252-linux_aarch32hf.tar.gz

 

Packages lists - https://www.azul.com/downloads/zulu-community/?version=java-8-lts&architecture=arm-64-bit&package=jdk

 

Im happy to take a shot at updating it sometime, though Ive gotten myself caught up in 4 separate mini projects right now... so when I free up from one of those, if youve not made any updates yourself, Ill take a shot at it and let you know! :)

 

Thanks 

 

 

Share this post


Link to post
Share on other sites
2 hours ago, erew said:

The 1st time I installed Openhab was a few years back and it was on a TV Box variant of Armbian. Either the option to install Openhab wasnt in the Armbian Config Util on that build/system, or I missed it being in the list and would/should have used that. 


TV boxes are not an official Armbian project - its more like a community hacking approach to make use of those Android boxes ... which are hardware wise very similar to single board computers. With a few exceptions like - we have no schematics, so its a lot of guessing / hacking involved which is why developers stay away and they are usually lower quality. But on the other side you have people that finds exactly such approach entertaining.

 

2 hours ago, erew said:

I ended up for various reasons having to rebuild and customize my install multiple times, plus I couldnt see much mention of Armbian on the Openhab forums and suffered some problems with Openhabian's install routine


Mainstream is dominated by Raspberry Pi and Openhab creatros doesn't seems to look away from that and their beloved OpenHabian, which they trust but I would never use it ;) From our perspective its poorly maintained (but users take it as gold since its official, even possible total crap) and it require a toy grade hardware to run it.

 

Earlier this year I update our installer and made this official manual.

 

2 hours ago, erew said:

Im happy to take a shot at updating it sometime, though Ive gotten myself caught up in 4 separate mini projects right now... so when I free up from one of those, if youve not made any updates yourself, Ill take a shot at it and let you know


This is not something urgent, but it's nice to get it fixed or improved. Also a good opportunity to make a first pull request on this tool.

Share this post


Link to post
Share on other sites
0