To solve the problem find out what the other user is (if you had done an apt-get installation which is highly recommended) that user would be openhab. Add that user to the dialout group and it will have permissions to read and write to the serial device. You fan find out what user openhab is running as with the command:
ps -elf | grep openhab
Look for a line that has /usr/bin/java -Dlogback.configuration in it. The user will be the word in the third column.
This is the command to add the openhab user to the dialout group
useradd -G dialout openhab
I highly recommend that everyone use the apt-get installation instructions any time they are using a Debian based Linux server (which the raspbian is). It places everything in known locations, creates necessary users, sets openHAB up to run as a service, and it will receive updates automatically as they become released.
I wish everyone who has written an openHAB tutorial out there would update to the apt-get approach.
But now I’m sometimes in trouble with users and rights.
I’m not an experienced Linux user.
I’ve done this because I wanted to use auto-boot (on a RPi) and I wanted to understand where the files are installed, on what locations.
I’m willing to install everything again. With apt-get, as you suggest.
But what do you recommend?
Where do I have to start?
There are a lot of different instructions, all a littlebit different.
When in doubt always follow the instructions on openHAB’s sites. Specifically the instructions for apt-get are located here on the wiki. The wiki should be your first place to look for all questions as the most authoritative source for openHAB information.
I hate these wget based instructions because it completely cuts the users off from the source of the software and any changes to instructions, updates, and other useful info the creators of the software may provide. So when the instructions become stale you never know.
When you install via apt-get here is where everything gets placed:
/etc/openhab : probably the most important folder. This is where logback.xml, openhab.cfg, and your configurations folder end up. Pretty much all your handwritten configuration and rules go here.
/usr/share/openhab : this is where the binary parts of openHAB get installed. This is also where the addons and webapps folders reside so if you have a binding that you want to install that isn’t available via apt-get, this is where you copy it to. If you want to use Habmin, you will unzip the webapp part (the jar files go in addons) to this webapps. However, until you get more experience with openHAB I highly recommend sticking to apt-get to install bindings.
/var/log/openhab : This is where all your logs end up (unless you manually change logback.xml to send them somewhere else). You will probably only care about openhab.log and events.log.
/var/lib/openhab : You probably never have to worry about this folder but if you do, this is where your persistence DBs are stored (if you are using one of the embedded solutions like rrd4j instead of a separate server like MySQL) and some bindings will put things here as well (e.g. the z-wave binding will put the XML device descriptors for all your nodes in this folder)
Since you are using a serial device, one step that isn’t covered in the instructions is to add the openhab user to the dialout group as described above.
Starting and stopping openHAB will now be done solely through the startup utility. If you are on raspbian wheezy you will use:
sudo service openhab start
sudo service openhab restart
sudo service openhab stop
service openhab status
Noobs is just a way to install the operating system. The actual operating system is whatever you choose to have Noobs install. The latest Noobs will come with the latest raspbian which is jessie. Wheezy was the codename for the previous raspbian. When they make major changes to the operating system they give it a new name.
I don’t know what you mean by “All mentioned users already existed”. The purpose of that command is to see what user openhab is running under when you start it up using service. This will tell you what user you need to add to the dialout group.