openHABian hassle-free openHAB Setup

Some things to point.
Installed as instructed with no previous configuration to copy. Accessing the http//::8080 return error (page not found). Then i did an update/upgrade (sudo apt-get update && sudo apt-get upgrade) and the openhab2-offline package was updated.

Tried again accessing the http//::8080 and voila the page for selecting the UI.

Hi I have tried this but it hasn’t worked and wondered if anyone knew why? I have down loaded the file and extracted all of the files and put them on the sd card and have plugged the ethernet and the power in but I only get a solid Green and red light and there lights on the ethernet on my pi and router are not lit either. Thanks

One thing to note is that the /etc/openhab2/ which is supposed to hold the configuration is not updated at all although changes are made through the UI (paper UI). I have added 3 bindings but no file in this directory.

1 Like

Hey guys,
please be aware that openHABian is “only” a preinstalled and preconfigured Raspbian with settings similar to what was documented here and here (by me). That’s why a few of your problems are not really related to openHABian.

This is indeed a small mistake I made. Other than with the platform independent zip file, the package repository installation divides your files up into different folders - as documented under file locations.
The folder you are looking for is /var/lib/openhab2. You can copy your files over by the help of the ssh console or you can create an additional share via samba. I have done that to openHABian just now. Thanks for pointing out this detail :wink:
In your installation, just copy these lines into /etc/samba/smb.conf

This is how it should be. The root account is disabled by default on many Linux distributions nowadays. This is done in favor of the less risky possibility to use sudo. When you type su, you are asking your system to switch to the root account which is answered by a prompt for the root password. The root password is not “raspberry”, there is no root password, that’s why su fails with an authentication error :wink: You should use sudo on a per-command basis or if you really know what you are doing and you want a root console, use sudo su.

I’ll look into that!

The instructions were not joking: “Connect to the openHAB 2 portal (available after another 15 minutes)”. The first start takes some time but the portal will pop up eventually, believe me. This is not related to openHABian.

Same as above: “page not found” can be seen after around 10 minutes. Just have a little patience and give it 5 more minutes :wink:

Something went totally wrong here :open_mouth: Please go to openhabian/releases and download the newest openhabian-ua-netinst-....img. This file needs to be flashed to your SD card as with every other RaspberryPi image. Good luck!

This is a key functionality of openHAB 2 and PaperUI. PaperUI uses a database (in the userdata folder) to store settings. The etc folder allows to manually configure a system through files. Settings between these two worlds are NOT synced! There are multiple threads on this topic here in the forum.

@Stephen_F Thanks for pointing that out. I have updated the install script but it’s not working just now. I’ll have to look into that at the beginning of next week.
Till then, please execute the following commands to switch over:

sudo su

systemctl stop openhab2.service
apt purge oracle-java8-jdk

cat <<EOT >> /etc/apt/sources.list.d/webupd8team-java.list
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
EOT

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886

apt update
apt -y install oracle-java8-installer
apt -y install oracle-java8-set-default

systemctl start openhab2.service
1 Like

I have done some further small changes. Installing java via the webupd8team repository is sadly accompanied by some problems (the installation chroot environment is a bit restricted). I have reverted the changes for now.
You only need the newer java revision if you want to use the my.openhab service. In this case, please just execute the above commands.
Everyone else is perfectly fine with the raspbian provided revision installed currently!

Thanks, I have tried again and it looks to be working now, just need to check it later when it has finished

Nice!!!

Great project.
I don’t know. if I will use it, bevause I am happy with my installation, but this will make the setup much easier for new users!

One think I would suggest is the integration of an MQTT server.
This is usefull for many IoT devices, but the setup is not that easy and might scare new users.
Of cause it should be optional, because not everybody needs it. :slight_smile:

Yes please to Logstash being baked in.

Hi,

would like to see syntax highlighting for rules and sitemaps enabled for nano (and maybe vi).

For nano, openhab.nanorc has to be placed under /usr/share/nano and to be included in /etc/nanorc .

Please have a look here https://github.com/openhab/openhab/wiki/Syntax-Highlighting-for-external-editors

2 Likes

Hi,
is eibd (KNX), owserver (1wire), mosquitto (MQTT) on board as well or do you plan it?
Regards,
Michael

Hey @christoph_wempe @staehler67, mosquitto will soon be added as an optional component.

@staehler67 I would be happy to add eibd and owserver as well. I have however no hardware to test them. Are there special steps I need to take care of in order to get them working? (example: 1. install from custom repository, 2. change a configuration file, 3. execute an initialization command) Please answer here and here

@James_Hiscott I’ll be working on this soon as it is of personal interest to me. Do you by any chance already have some filters/rules for openHAB? If so, please contribute.

@ThomDietrich I dont currently, was on my list to start setting up. If i get any time in the next few days i will have a play and update the ticket

1 Like

Thanks, I will try to implement this weekend.

openHABian third release with finished base

Further fixes and additions to create a solid base for your Rasbperry Pi openHAB installation. The release can be used in production. Coming changes will concentrate on the optional components installable through a menu. Version 1.0 will be hit when the menu is ready and others can contribute parts to it.

New in this release:

  • Oracle Java 8 (build 1.8.0_101, needed for my.openhab)
  • openHAB syntax highlighting in vim and nano
  • samba userdata share preconfigured
  • many small improvements

Everything has been thoroughly tested. In my home the first boot took 50 minutes and the openHAB portal was reachable after another 12 minutes. A reboot was not needed. (@Stephen_F, @alekons)

@Stephen_F got it working at last. @peter_juenger that’s quite a nice addition. I’ve added both.

Make a backup and get the latest release (v0.7). Enjoy!

1 Like

Great Project!
It never was so easy and fast to start openHAB2 on Pi.

I played around a little bit and everything seemed to work (Zwave, enocean, knx…)

Then I startet a
sudo apt-get upgrade

openhab2 was updated as expected.

But since then I’m not able any more to uninstall the mysql-persistence and always get error-logs:

There is no queryable persistence service registered with the id ‘mysql’

Is apt-get upgrade allowed?

Do I have to run another updatescript?

Michael

Thanks :wink:

Of course it is allowed :wink: (btw. now you can just use the newer apt command - apt update/upgrade/install/...)

The is no special updatescript.

Your problem seems OH2 specific, I don’t think it’s related to your openHABian system. Did you install another persistence service? Did you change the default one? How are you trying to uninstall mysql-persistence (PaperUI vs Karaf console)?

The persistence-records were stored in MySQL exactly until I upgraded.
No other files were changed.

I’m not able to uninstall / reinstall a binding or persistence service.

I would like to repeat my steps - what is the best way to “reset” the openHABian-SD-Card to a clean default-install?

Michael

Too bad you are having problems. Did you try uninstalling the bundle via karaf?

In order to reset openHABian just re-flash the image. Besides that, you are able to do the following to initiate a reset without taking the sd card out of your Raspberry Pi:

sudo mv /boot/config-reinstall.txt /boot/config.txt
sudo reboot