Unable to start openHAB service on raspberry pi - failed

I am a complete novice to openhab 1.8.3 and command line interaction so please forgive me if I am missing something really simple.

I had previously installed OpenHAB in a very roundabout way, messing about with various files and then was unable to pair any zwave devices - so i decided to remove everything and start again

Now, after following the same steps as before I cannot get the service to start:

$ systemctl status openhab.service
● openhab.service - Starts and stops the openHAB Home Automation Bus
Loaded: loaded (/usr/lib/systemd/system/openhab.service; disabled)
Active: failed (Result: exit-code) since Wed 2016-12-21 19:26:20 UTC; 20s ago
Docs: http://www.openhab.org
Process: 1264 ExecStartPre=/usr/share/openhab/bin/setpermissions.sh (code=exited, status=200/CHDIR)

I can’t understand what is going on and would appreciate any guidance relating to this error message.

That looks like a permission error. Under what user are you running openHAB?

I recommend not to start with openHAB1, though.
The future is openHAB2 and there is an image available, ready to start with:

I would also vote for openHAB2, but if you want - for whatever reason - start with openHAB 1, I can suggest the following tutorial:

1 Like

Did you install java in advance?

At least you need Java (preferable Oracle Java) to get openHAB going (as it’s based on Java in general). And for using myopenhab you need the latest java version, as the older ones couldn’t handle the right certificate.

So: Yes, it makes sense to install java in advance.

Regarding myopenhab: There was an older service called my.openhab (with a dot in between). It was changed to myopenhab some days ago. The above mentioned tutorial for openHAB 1 still refers to the old my.openhab.

But for a start, you don’t need myopenhab.

And if you start with openHAB2 (and openHABian, as sihui suggests), you don’t have to pay attention to java, as openHABian does this for you automatically. :wink:

If you’re only just starting, then I would definitely recommend looking at an openhabian install on the raspberry pi. Takes all the pain out of installing, etc. and lets you get on with the job at hand, ie. automating your home. :slight_smile:

Openhabian is expanding too, and will also do setups of grafana, etc. if you want to go down that route later.