Ubuntu 16.04 LTS Openhab 2.0 SNAP

Hello community,

has anyone already tried the brand new Openhab 2.0 SNAP ?
I saw this (https://insights.ubuntu.com/2017/02/09/openhab-arrives-as-a-snap/)
announcement and I like to give it a try, but I cannot find any configuration or usage notes.
E.g. configuration path

BTW: I did not like to trash my long working installation at /opt/openhab

Any hints or tips

Thanks for suggestions

1 Like

I’m also wondering if this might be the best way to migrate from my Ubuntu-based 1.8 instance. Docker has a few limitations I’d like to avoid (I always have trouble understanding how docker actually works with networks and devices - they also discourage the PaperUI in the docker method).

I’m considering:

  1. Ubuntu SNAP
  2. Docker
  3. Pine64 (but worried about SD card corruption due to too many writes)

Hi Christian and Ingo,

Thanks for your interest in using the snap! Last months work has been ongoing to make OH2 work on ubuntu-core as a snap. There is some good news and … there are some rough edges / things that need to be worked out. In short the snap is probably not the best choice for most users yet (some work in progress).

If you are running Ubuntu 16.10, everything should work fine. Like other programs, you can install OH using the command line with:
$ snap install openhab

If you are using ubuntu-core instead of Ubuntu 16.10, e.g. installing the image on a raspberry pi, I expect most bindings will work (a lot more testing is needed to confirm this though), but there are some limitations when you would need USB devices or GPIO. If you do want to hack your way around this issue to make use of a zwave controller or something, I will add some pages to the manual in the coming week.
Canonical is giving great support to this project (many thanks Ondrej!), but I cannot give an estimate when this issue is solved. Good thing is that it involves multiple projects, e.g. nextcloud box, so I am quite confident it will be solved in the coming months.

Best regards,

PS1) info about installing Ubuntu-core: https://developer.ubuntu.com/core/get-started
PS2) The raspberry pi image of Ubuntu core will ask you to make an account with Ubuntu, set up your device with keyboard and screen. Thereafter you log on to your pi via ssh.
PS3) once the snap is installed, OH will start automatically. You can use a browser to find OH at http://:8080/start/index

Thanks, @r2geo!

I’ve been looking at Snaps, but I’m still not quite sure I really understand them. How do they compare/relate to Docker containers? If I already have OpenHAB1.8 installed the apt-get way on my Ubuntu 16.04 LTS server, would the installation of a Snap affect that, or is it an overlay that we can use or not use totally separately?

I guess what I really would like to see is some type of Pro/Cons chart of all the different methods of installing/upgrading OpenHAB now that there are so many. Maybe even a decision tree for choosing.

Hi @idean ,

You can install a snap next to the apt-get instance. As the snap is sandboxed that should not be a problem. OK, better make a backup before you do that, but it worked for me. Running them in parallel probably would give problems, i.e. if they both use port 8080 for the web interface. Probably there would be some other clashes too, like claiming access to devices. Please mind that OH-snap can be stopped via
$ openhab.stop
But … it will automatically start running again. So the way to stop it from running is
$ snap remove openhab

For docker vs snap please have a look here: https://askubuntu.com/questions/808524/whats-the-main-difference-between-docker-and-snap

Good idea about the pro/con chart. If you plan on making one, please share :wink:

Hi Roeland,

is there any chance to run OpenHAB 2.0 SNAP on different port .e.g 8081 and define an own configuration path ?

Docker like :slight_smile: It’s always possible to remap networking port and external docker filesystem access.

My problem: where is the default configuration path for the OpenHAB SNAP installation ? Inside the SNAP or what is the external hostsystem default path for openhab ?
Can I map the external SNAP path to my prefered location ? E.g. /opt/openhab20-snap/…

For the first time I’d like to use my old working installation (/opt/openhab) in parallel to the new snap installation.
Would be execelent to compare differences first :slight_smile:

Thanks for some suggestions


Dear Roeland,
I am stuck at this point. I have set-up my openhab snap on my Ubuntu core (Raspberry Pi3) and most things work properly. Well it is my very first start with OH, I never used it before. For most of my issues I encountered until now I found a solution but to connect the z-wave USB is a difficult one.

As far as I understand an additional gadget-snap (or kernel snap) would need to make the serial-port available. But if there is another way to “hack my way” through this issue would be nice. Then I could overcome this issue and would not need to wait for someone to make this gadget-snap.

Have you already finalized the documentation on this issue and can you help me to find it? Many thanks!!

Are there any news on the Ubuntu Core USB z-wave stick work-around?

Hi i am using snap version on Ubuntu 16.04 without any issues. Everything is working just fine. I think that is the best method of install on a Linux machine. Thank you for this :wink:
Now the problem…i want to install an addon, Yeelight binding. The question is, where should i put the jar/zip file? The addon folder that i found is RO, and in /var/snap/ i could not find the folder.
Thank you again.

Hi all,

I plan to move from apt installation to SNAP on Ubuntu.
The apt installation is working fine and now I have installed the snap version.

I have some question:

  1. Where are located the log files of openhab under snap installation?
  2. Is the backup script also present on snap version?
  3. I have a backup taken from my apt installation, how can I import it on snap?
  4. I have read about Z-wave stick not working under snap, is this issue solved?

Best Regards