OpenHab don't recognize Razberry Board /don't see node in HabMin

@watou is correct abt the apt-get method. I switched from “hand-rolled” to apt-get in November and the process is much smoother.

I found one MAJOR MAJOR caveat – the apt-get install in Step 7 says that on Debian 8 (Jessie) you should use the “sudo systemctl start openhab” command rather than the prior “sudo /etc/init.d/openhab start” command.

On a clean Jessie install using apt-get, if you do this (at least the FIRST TIME you run OH and possibly every time) you leave the system with knots of permission conflicts which are very difficult to unsnarl (i.e. it is easier to start from clean SD than figure it out. ) The “old way” using /etc/init.d/openhab start WORKS and calls the proper setup scripts.

Should an issue be opened about this, @bob_dickenson?

I actually think so. Have not had time to open myself since I did the switch to Jessie two weeks ago. (real life interposing itself, etc) What is the best mechanism ? I see two issues: the underlying fault and the wiki doc. Will follow your direction on either/both ASAP

Hi Bob, could you open an issue against the installation scripts, describing in detail the permissions problem you observe, and mention @theoweiss (on GitHub) to see if he would investigate. Any wiki doc changes would then be made to match any code changes. Thanks very much – hopefully any issues can be resolved before 1.8!

Just to mention: I did a Jessie clean install twice and never came across that problem.
Although not all files and folders belonged to user:group openhab:openhab, I had to manually chown from root:root to openhab:openhab.
BUT what I have read somewhere: if you perform an update from wheezy to jessie there are some problems with permissions, but that should have nothing to do with openhab.
This is just my observation …

1 Like

Interesting. I did multiple Jessie clean installs before I finally narrowed down the causal chain to the systemctl invocation instruction. Everyone of them failed on the permission snarl problem — OTO ten or so consecutive clean Jessie installs. I did the following: created clean Raspian Jessie SD. Cloned same to a USB stick. Changed cmdline.txt on /boot to point to / on the stick. Installed as per the apt-get instructions. Failed every time on permission issues IFF my first invocation of OH was thru systemctl rather than /etc/init.d/…

What were the permission issues?

AFAIR they were access permissions on various directory paths. I did the chown dance when I encountered but after the 2nd or 3rd set of that in an install, I punted for clean reinstall. I never did find the right incantation for the directories and permissions which would work. Arrived at my conclusion by multiple clean reinstalls and verifying that OH started after each step. ( Initially I was going through the whole base install and addon installations en masse — so it is also possible that doing the addon installs before ever running OH is a possible causal path. ) It was during this process that I discovered that using the old invocation method /etc/init.d … started OH and did not clobber the permissions…even though it runs systemctl behind the scenes. So there’s something about my installation setup and the instructions to use systemctl which was consistently fatal.

[quote=“bob_dickenson, post:19, topic:5311, full:true”]
Cloned same to a USB stick.[/quote]

I’m far away from being a Linux expert, but how was your stick formatted?
If it was fat32, all the permissions from the systems partition /dev/mmcblk0p2 wouldn’t be copied because mmcblk0p2 has ext4 format and fat32 doesn’t know anything about linux permissions …

But anyway, the only difference in our installation method is that I didn’t clone anything to a usb stick, I left everything on my sd (and use some tmpfs to minimize the write cycles to the sd card to prevent fast wear out).

If I find some spare time the next days I will install openhab on jessie again on a brandnew sd card and tell you if there were any problems.

I used a low-level utility which image copied the SD to the USB. Bit-for-bit copy, not file-by-file so no pre-formatting required. Leaves you with ext4 fs on the USB.

Hi Bob

I followed your advice and just installed Openhab according official method (apt-get) seems to work. Openhab user is in the list now. But how to install habmin?
Using official install, OH uses different folders? For example I couldn’t find openhab-default.cfg? Where could I find openhab.cfg I only found a openhab file (no ext. cfg)?
One the habmin github (if using zwave), it said, I should install habmin 2 but 2 needs habmin1? Is it the same simple copy the whole file in the openhab folder and unzip? For me its a little bit confusing … Is there an apt-get install for habmin install available …

kind regards

Peter

There is no apt-get install for habmin, but the same procs work as in a hand-rolled install, it is just that the webapps folder where you will create the habmin directory is in a different place. Look in /usr/share/openhab/webapps

Hi,

do I get you right ?.. I had to copy the habmin.zip (from https://github.com/cdjackson/HABmin) file in the /usr/share/openhab raspi folder an then unzip it.

many thanks in advance

Peter

into /usr/share/openhab/webapps/habmin Different root directory than a hand-rolled install but same “copy habmin here then move jars to general addons directory” sequence

Hi,

Openhab installed with apt-get, raspi specific commands executed, openhab-default.cfg copied on openhab.cfg
I start openhab with:

sudo systemctl start openhab:

the result:

pi@raspberrypi:/etc/openhab/configurations $ sudo systemctl start openhab
pi@raspberrypi:/etc/openhab/configurations $

seems that openhab.cfg is ignored? I’m right?

HABmin installl manually, works, but I don’t see the razberry board as node?

Any ideas?

Thx Peter

what OS version are you ?

sudo /etc/init.d/openhab start
works across all Raspbian versions. If you are Raspbian Jessie (latest) I have PERSONALLY encountered issues with the “approved” use of systemctl (as opposed to /etc/init.d/openhab).

I use Jessie latest version if using sudo /etc/init.d/openhab start then I get hint to use sudo systemctl start openhab? What do you mean with ‘approved’?
Thx

Peter

Hi,

seems now oOH startet but I see a strange Zwave message could be the reason why I couldn’t see the razberry board … see below

any ideas?

Peter
pi@raspberrypi:~ $ sudo /etc/init.d/openhab status
● openhab.service - Starts and stops the openHAB Home Automation Bus
Loaded: loaded (/usr/lib/systemd/system/openhab.service; disabled)
Active: active (running) since Sa 2016-01-02 14:12:54 CET; 1min 19s ago
Docs: http://www.openhab.org
Process: 4478 ExecStartPre=/usr/share/openhab/bin/setpermissions.sh (code=exited, status=0/SUCCESS)
Main PID: 4633 (openhab.sh)
CGroup: /system.slice/openhab.service
├─4633 /bin/sh /usr/share/openhab/bin/openhab.sh -o
└─4654 /usr/bin/java -Dlogback.configurationFile=/etc/openhab/logback.xml -Dosgi.clean=true -Declipse.ignoreApp=true -Dosgi.noShutdown=true …

Jan 02 14:12:53 raspberrypi setpermissions.sh[4478]: setting permissions and owner openhab:openhab recursively for /var/lib/openhab
Jan 02 14:12:53 raspberrypi setpermissions.sh[4478]: setting permissions and owner openhab:openhab recursively for /var/log/openhab
Jan 02 14:12:53 raspberrypi setpermissions.sh[4478]: setting permissions and owner openhab:openhab for /usr/share/openhab/webapps/static
Jan 02 14:12:53 raspberrypi setpermissions.sh[4478]: setting permissions and owner openhab:openhab for /etc/openhab/jetty/etc/keystore
Jan 02 14:12:53 raspberrypi setpermissions.sh[4478]: setting permissions and owner openhab:openhab for /etc/openhab/configurations/users.cfg
Jan 02 14:12:54 raspberrypi systemd[1]: Started Starts and stops the openHAB Home Automation Bus.
Jan 02 14:13:10 raspberrypi openhab.sh[4633]: 2016-01-02 14:13:10.725 [INFO ] [.o.core.internal.CoreActivator] - openHAB runtime has been start…v1.7.1).
Jan 02 14:13:15 raspberrypi openhab.sh[4633]: 2016-01-02 14:13:15.958 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service has been started
Jan 02 14:13:16 raspberrypi openhab.sh[4633]: 2016-01-02 14:13:16.152 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Discovery initializati…mpleted.
Jan 02 14:13:25 raspberrypi openhab.sh[4633]: 2016-01-02 14:13:25.825 [INFO ] [penhab.io.rest.RESTApplication] - Started REST API at /rest
Jan 02 14:13:31 raspberrypi openhab.sh[4633]: 2016-01-02 14:13:31.407 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /openhab.app
Jan 02 14:13:38 raspberrypi openhab.sh[4633]: 2016-01-02 14:13:38.731 [INFO ] [.o.io.habmin.HABminApplication] - Started HABmin REST API at /se…s/habmin
Jan 02 14:13:44 raspberrypi openhab.sh[4633]: 2016-01-02 14:13:44.179 [INFO ] [.z.internal.ZWaveActiveBinding] - ZWave ‘updated’ with null config
Jan 02 14:13:44 raspberrypi openhab.sh[4633]: 2016-01-02 14:13:44.244 [WARN ] [i.internal.GenericItemProvider] - Attempted to register a second… active!
Hint: Some lines were ellipsized, use -l to show in full.
pi@raspberrypi:~ $

wiki says use systemctl method with Debian 8 (Jessie) and above. I found that it created real issues on a clean Jessie installation. MULTIPLE wipe-the-slate and start over reinstalls before I narrowed to systemctl method being a trigger for the permissions issues which were the symptom. Others have not experienced this BUT I was consistently getting the problem on clean installs.

GUESSING you may have two versions of the zwave add-on jar in your addons directory – one from OH install and one from habmin install. If so, delete the lower-numbered version.