openHABian hassle-free openHAB Setup

My openhabian is build 604, fairly new I expect. How do I purge? And is my assumption that openhabian using offline distro correct?

I figured out that openhabian using the offline repo, what is benefit off this?

For anyone that might need it, you can run sudo openhabian-config, then run update openhab and voila the cloud openhab appears!

does it support zwave locks?

Hi @ThomDietrich / @Fredrik

I was able to make an image fairly easy for Berryboot. I used a clean install of openHABian, with this I made an image for Berryboot and tested it in my own Raspberry Pi. The image loads well and I can use openHAB like a ‘normal’ installation.
I made a torrent of the image, so others can use / test it as well: openHABian v1 BerryBoot 20161216.

@ThomDietrich FYI after upgrading through your command tool, the GPIO settings has been reset, sudo nano /usr/lib/systemd/system/openhab2.service and set it back to root and root fixed the problem. Maybe go for an online distro instead of offline distro in the future to avoid these problems everytime a new binding is released or updated?

does it support zwave locks?

Lock support would be dependent on the ZWave binding. There is a test branch of the OH1 binding that has pretty good support. The OH2 binding still has a little bit of work it seems but is steadily getting closer to including security class support which is needed for locks.

Thanks again Thom. SD card checked out OK. I left the installer running overnight and it was still trying this morning. I will therefore reluctantly go for a manual install for now but will be back to try again. Many thanks for all your efforts nonetheless.

Hey Kim,
a few Linux basics for you :slight_smile:

# check the exact name and version of a package:
$ dpkg --list | grep openhab
ii  openhab2-offline                2.0.0~20161217141859         all          openHAB Offline Distribution

# get even more info:
$ dpkg --status openhab2-offline
Package: openhab2-offline
Status: install ok installed
Priority: optional
Section: misc
Installed-Size: 183352
Maintainer: openHAB <admin@openhab.org>
Architecture: all
Version: 2.0.0~20161217141859
...

#Update all packages (incl. openhab):
$ sudo apt update
$ sudo apt upgrade

You should execute the last step regularly. The table printed when logging in via ssh shows the available updates btw.

Executing sudo openhabian-config and selecting “Update” might have this effect but it’s not it’s intended purpose. Please use the methode above. You can however execute Update followed by basic setup from time to time to stay in sync with the latest openHABian changes.

Using openhab2-offline or -online doesn’t have any effect on the update-need of your system. If you update your openhab package chances are, that made changes will be overwritten. Changes to the service file shouldn’t happen without your confirmation in the future, I believe @Benjy can make sure of that.

Hi @ThomDietrich,

the last step I normally do once a month, or every time i change my settings, however it did not make the cloud package show up. Thats why i run the openhabian update, that made the trick:)

I just wanted to tell the openhabian community what they need todo to get the new myopenhab to work.

Any progress on not running openhabian as root to get gpio to work?

Yesterday my bluetooth dongle arrived, so I will now try to get xiamo plant sensor to work, maybe this can be a new feature for openhabian? I think I will use the json and the local file approch instead of mqtt, more reliable I would assume. I will keep you informed about progress.

I have really no idea how the Update feature could possibly have done that :smiley: But who knows, thanks for sharing!

Sadly no. I do not have the hardware and I’ve written down what’s needed from my point of view at https://github.com/openhab/openhabian/issues/39 . Pay attention to my remark regarding pigpio. Maybe it would be possible to extend the gpio binding to support it. Would you be able to look into that?

Bluetooth and xiami: I have these lying around too. Would be happy to integrate the setup process. If you want to provide the steps needed, we can look into that.

openhab2.service is pretty specific to the current version of openHAB. What needs setting inside the service file to make the GPIO work?

Elevated permissions by starting openHAB as root. Not ideal but for GPIO and some other rare cases the easiest solution

Right, it’s not set as a config file now but it’s something that can be done! :slight_smile: Out of interest, does


setcap 'cap_sys_rawio=ep' `realpath usr/bin/java`

achieve the same thing when not as root?

Interesting. Didn’t think about setcap. According to the following link, that could actually be the solution. @skatun would you test that?

If successful, this could easily be added to: https://github.com/openhab/openhabian/blob/master/openhabian-setup.sh#L333

1 Like

Hi, I have a quick question. I just updated my opnehabian installation using “openhabian-config” on a Raspberry Pi 3 and worked perfect!

I remember reading about possible problems updating (update / upgrade) the rest of my Pi . What would be the proper way to do it?

Thanks!

Hey Daniel,
this really depends on your current revision of openHAB. If it is more than ~three weeks old, you could get into problems with the folder restructure and jsondb switch. Check https://community.openhab.org/c/openhab-2/news-important-changes

If that’s the case, it’s best to make a backup of your /etc/openhab2 if you created/modified files there, delete /etc/services/addons.cfg and then purge and reinstall openhab2. You will have to reinstall your bindings and rediscover your things and items (if not defined in config files)!
If you are not sure about the purge and reinstall process, think about a clean restart with openHABian v1.0. https://github.com/openhab/openhabian/releases

Thanks Thom for the quick response!

Since I only have 5 items, 3 bindings and 2 rules, I will rather do a clean installation (openHABian v1.0).

For future reference after the clean install. I assume it would be ok to update/upgrade when needed without issue, correct?

The mentioned two big changes were the last (expected) changes to the openHAB 2 snapshot state before the final version is released (soon).

So yes I believe from here on out you can just update. There will be one more change with the availability of openHAB 2.0 final: Switch from snapshot releases to stable releases in openHABian. This one will be handled by the update routine somehow and I’ll inform you all about this in a news posting here in the forum. Stay tuned and remember to set this thread to “Watching”.

A few days ago openHABian v1.0 was relased under the openhab organization and introduced in docs.openhab.org. Time for some statistics :wink:

Traffic graph for the last 12 days (only):

Download statistics:

  • v1.0 download count: 607
    
  • All releases download count: 2386
    

I’m happy to see this much interest in the project. What better motivation to continue the work than that :wink:

6 Likes