openHABian hassle-free openHAB Setup

Hey @kubawolanin,
happy to hear everything went fine. The wifi configuration is one thing definitely in the ToDo list! I’ll look into that as soon as I got the RPi3 I ordered a few days back. Setting up Wifi from within openhabian-config is not going to be a problem, making the whole setup process wireless (that’s what was discussed earlier) is currently out of the scope of openhabian as it’s an issue dealt with over here.

I’ve thought about the future of this thread myself. Whith openHABian soon reaching Version 1.0, I’m planing to close this “beta discussion thread” and create a dedicated category for questions regarding openHABian here in the forum. You are right, that a more in-detail documentation should exist. I was planing to put one next to this article at openHABian will also be transfered out of my personal account into the openhab github organization. This transfer, the documentation and a few small cosmetic changes to the menu are what’s needed before I’m going to release Version 1.0.

That’s great! Regarding the openHABian documentation I’m mostly going to rephrase what’s already posted here and in other places. Of course you can participate in that but let me write a first draft before we talk more. Evaluated at what’s currently available here, which information would you like to additionally include?
Would you be interested in helping out with the in general? I can point you to a few articles which need creation or serious rework…

I have tried the steps pointed out above, however, the command as step 4 fails as follows:

chown -R influxdb:influxdb /var/lib/influxdb
chown: cannot access ‘/var/lib/influxdb’: No such file or directory

I guess this is no surprise as the directory (or file) in question is not there.

Is there a missing step that is supposed to create this?

Hmm… It seems it is really the first step - the extraction of the archive - that fails to place the files in the correct locations;

Instead it creates a top-level directory called ‘influxdb-1.0.0-1’ where the files are stored.

Oh damn, sorry. I reduced the commands to a minimum and overlooked that detail. Why would they put these three files in another folder. I’ll fix that in my steps, thanks for pointing it out. I received my RPi3 today and will finish the whole InfluxDB+Grafana setup next week. Stay tuned :wink:

I fiddled a little more with this and it seems this works:

curl -L | tar xvz -C / --strip 2

The ‘–strip 2’ option skips the two first levels of directories inside the archive (it seems it was actually packed with two levels of rubbish in front of the files).

Now it is step 6 that gives an error:

systemctl enable influxdb.service
Failed to execute operation: No such file or directory

I simply did the next (and last) step and it succeeded.

Doing ‘systemctl status influxdb.service’ indicates that the service is running, and the admin web interface is availabel (at port 8083) so all seems to be well! :slight_smile:

Looking a bit closer, the structure inside the archive is actually ./influxdb-1.0.0-1/etc/...:

   .   / influxdb-1.0.0-1 / etc / ...
level1       level2       level3

Somebody did not have enough coffee while inventing this archive :smiley:

Great but is enable still not working? It really should…

Discussion on integrating my.openhab setup in openhabian-config:

Yes, you can. I meant I didn’t yet advertise this repo. But, it is already populated with my last build and I will update the repo with grafana v4.
One thing could change, but it is probably without effect : currently, the packages are signed with bintray public key. I don’t know if it will stay like this, I could change for a personal pubkey.

Anyone recently had problems with openhabian? I tried a new installation today (have used it already several times successfully in the past). OpenHAB is running, but I get a couple of java exceptions (“java audio source”) at every start. apt-get update && upgrade didn’t change anything. I thought of a mistake during installation and did a second try -> same result.

After that I “manually” installed Openhab according to the docs (raspbian install and after that an apt-get installation of the snapshot offline version). I had no java errors with this installation…

As openhabian actually doesn’t do other things than a raspbian installation with openhab snapshot, I am a little bit confused about this…

Sorry for my laziness, but I haven’t written down the exact java error message…

I recently used openHABian after my micro SD got corrupted. I have to say, it was AWESOME (for someone who is a very Linux newbie).

I can’t comment on the exception above, I haven’t run the log yet while working on the system (a bad habit of mine).

A few questions though…

  1. When I run stuff as Sudo, the system randomly asks for the password, even after I already put it in. My old setup on OH1 never asked for the password after I did the initial SSH. Not that it’s the end of the world, simply a nuisance, but is this able to be gotten rid of? Is it even advisable to get rid of it?

  2. On my OH1 setup, whenever I created new files (.items, .persist, ect.) I had to give Openhab ownership. Is the process the same or do I give openHABian ownership?

Thanks for the fantastic work! OH2 is not newbie friendly (yet), but at least the part of getting the system up and running was!!

I haven’t got an answer for your first question, but for the second one, the answer is: Ownership for user openhab is correct.

Hi Frode
Her is a copy of my notes for my Aeon USB Stick, that might help :

// Importen - In the /etc/init.d/openhab have you added somewher in the beginnig of det file
#sudo reboot
sudo adduser openhab dialout
sudo adduser pi dialout
sudo adduser openhab tty
sudo adduser pi tty
sudo usermod -a -G dialout openhab
sudo chown -R openhab.users /dev/ttyUSB0
sudo chmod 775 /dev/ttyUSB0
sudo chown -R openhab.root /var/lock
sudo chmod 775 /var/lock

Br Jesper

1 Like


In answer to your first question:

Sudo normally caches your password for 5 minutes when you authenticate to sudo. That means that if you use sudo again within five minutes, you will not be required to re-authenticate. After five minutes you will be asked again for your password. You can override this behavior in multiple ways, but the default behavior is probably optimal in terms of convenience and security.

For more info about how you can change the default password caching behavior of sudo, take a look at the man pages for sudoers(5).


Thanks. Just a nuisance issue. I’ll leave it.

Hey guys,
a short note an “successful installation”. I did everything I could to make sure that an installation either ends with the full set of working programs or in a clearly identifiable failure state.
At the end of the setup process you should see the green RPi LED blinking in a heartbeat like rythm (☼.☼…☼.☼…) and the openHABian logo on ssh login. The failure state is observable in a fast blinking of the LED (☼.☼.☼.☼.☼.☼.) and a failure text on ssh login.
If the setup was not successful please try again. There are a few reasons why one installation could fail (repository unavailable, internet connection outages,…) but don’t worry. I did not run into that problem once in all my testings.

@jaydee73 are you still seeing that problem? I did not quite understand how you observed the problem but I just did a new setup on my RPi1 and everything seems to be just fine…

@RHINESEL Happy to hear you are happy with the result. Scott already did a good writeup on sudo. I do not see a problem in extending the sudo re-authenticate time but disabling a first password prompt is a big security risk and should not be a default setting. I referenced a link on how to disable the prompt a few comments above but would really not recommend it for a couple of reasons… of course the whole topic is pointless as long as 95% of Raspberry Pi users never change the password to something other than “raspberry” :monkey:

On permissions: You do not have to give ownership to openhab for openHAB to work actually. openHAB does not write to these files and in normal case they will be readable by “others”, which includes openhab. HOWEVER: if you are using samba, you are going to be working as user openhab and thereby probably want to have write access.
So yes, out of a maybe different reason, you want to make sure all config files belong to openhab.
“openHABian” is by the way not an existing linux user :wink:

I can’t say if the problem still persists. I made two tries and got the same java error both times. Then I did a manual installation and the error was gone (same SD card). So I have no possibility to check if the openhabian installation still shows the error. I would have to make another new try, but I am short on time at the moment. You haven’t got to follow this further on, I assume it was a local (or temporal) problem with my system.

@jaydee73 I’ve also been seeing these javasound errors for the last few nightly builds… I’m at a point where I need to refresh my Pi system (too much junk installed for testing/learning Linux) so think i’ll try openhabian this evening. Hopefully the errors won’t continue, but will see how I go.

I’m running across this trying to use Eclipse Designer from my Windows PC. I ran the following commands:

sudo chown -hR openhab:openhab /etc/openhab2
sudo chown -hR openhab:openhab /usr/share/openhab2

but am still unable to save changes to .items/.sitemap files. Do I need to remap from the Windows PC? I think I ran across this issue on OH1 but at this moment I can’t remember what I did to fix it.

possible to create a custom partition layout?

sd = boot
usb = anything else

maybe even raid 1 for 2 usb drives??


Thanks Paul. I am kind of “glad” that someone else also has these issues. At least I know now that I’m not mad. :wink:

Let me know how your installation went.

@ThomDietrich: You did an installation on a RPi 1 using your image (which is based on Raspbian Jessie Lite). The installation that worked for me was a full Raspbian Jessie on a RPi3. Maybe the problem lies anywhere around these differences. Or maybe it’s just a problem of the latest nightly builds and will go away as silent as it came…