openHABian hassle-free openHAB Setup

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…

Thank you, got it working using about the same as you wrote.

Well, slight progress. I redid Samba via the new OpenHABian menu. I now have write access to my .items and .sitemap file. The problem is that in Designer, I can only see those files when I click on the individual “Items” and “Sitemaps” folder. they don’t populate when I click on the “OpenHAB-Conf” folder.

I know this situation has been discussed before but for the life of me I can’t find the thread that discusses this. Any idea?

First part sounds good, can you post a screenshot of how your designer looks like when you select the config folder?

Can you please post the exact error description? Is this related to the demo package? There was a change regarding the doorbell.mp3 the other day.

I guess this should be possible. openHABian is based on raspbian-ua-netinst and it provides this option:
usbroot= # set to 1 to install to first USB disk
Let us know if installation was successful this way.

As you were talking about the demo package, it just came to my mind that there was another “unusual” log entry. Some kind of “installation of standard package” error.

But again, I’m sorry that I can’t be of any further help because I haven’t saved the log and have overwritten the SD card,

I will later, but really it is blank. Nothing shows up. I have to select the Items folder to see the .items files, Sitemaps folder to see the .sitemap files, ect.

Are you trying to open the network share or a drive the network share is mounted on? I don’t know if the first is even possible but the second is how it should and I do not see why not… :confused:

I’m away from my computer right now but when I select the openHAB-conf folder I should see all the .item, .persist, .sitemap files contained in all the sub folders in the panel in the upper left. At least I did on my OH1 setup. Right now I get nothing. I only see the files if I select their respective folders.