Procedure to Upgrade Mac OS Installation

I run openHAB2 on a Mac Mini. I followed the installation instructions at I am having problems with the Harmony Hub binding and a recent post in that thread suggested an update to the latest version. I have found a number of mentions on how to upgrade linux installs using apt-get.

In amongst those there is also mention of the difference between snapshots and other versions. I’m not entirely clear on what the difference is but rereading the installation instructions for the Mac, I suspect I have installed a nightly build snapshot?

Can anyone point me at instructions or a tutorial for updating a Mac installation. If I grab the current version and drag it into /Applications, will it overwrite my current configuration?

How do I tell what the current version is. In PaperUI I can see the versions for all the bindings but I haven’t found a version number for the system as a whole. I found a post to run http://host:8080/rest which returned a version 0.9.0 but I couldn’t reconcile that to the 2.1.0 versioning on the download page…

Thanks for any guidance people can offer. Apologies in advance if my searching of the doco and the community has failed to find things already posted.

Might have been able to answer one of my own questions. Browsing through the folder hierarchy I found /runtime/system/org/openhab/core/org.openhab.core/2.1.0-SNAPSHOT and that fodler contained a file org.openhab.core-2.1.0-SNAPSHOT.jar. I’m pretty confident that tells me the version I am running…?

When you have installed openHAB 2.0 by unpacking the installation .zip file the upgrade procedure is more or less the same on all platforms. See also:

This all boils down to more or less the same procedure:

  1. Stop your old openHAB instance
  2. Backup your existing installation (I usually just rename the directory)
  3. Unzip the content of the new openHAB .zip for your new (upgraded) installation
  4. Replace the /conf directory in your new installation with the /conf directory of your old installation
  5. Copy the user data content you want to reuse from the /userdata directory of your old installation to your new installation. Especially the /userdata/persistence and /userdata/jsondb folders are things you want to keep. You should not keep the /userdata/cache and /userdata/tmp directories of your old installation.
  6. Start your new openHAB instance

When you login to the console it will show some fancy ASCII art with your version and build number. :slight_smile:

Something like this:

Launching the openHAB runtime...

                          __  _____    ____      
  ____  ____  ___  ____  / / / /   |  / __ )     
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  | 
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /      
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/     
    /_/                        2.1.0-SNAPSHOT
                               Build #859   

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.

The build number identifies which Jenkins build generated your openHAB version.

Thanks @wborn

Having the details of the configuration details I need to keep is really useful. I will give the upgrade a go and see if it sorts out the Harmony Hub issues.

Much appreciated!

Stumbling with what is probably the obvious… How do I stop openHab on Mac OS?

In the openhab folder in Applications there is a (script?) that I used to start openHAB when following the tutorial. There is also a debug start option. There is no stop or restart options.

Looking at the start script is points to a runtime/bin folder. In that folder there is a file called stop. When I run that from the command line it tells me “stop: Ignoring predefined value for KARAF_HOME”. OpenHAB still seems to be running.

All the instructions for restarting openHAB I can find reference linux commands. Thanks for your help!

OK - premature posting. I think I have found a way to shutdown.

Have seen many mentions of “karaf” and “console” in the postings to the community. Had no idea what that really was or how to access. I think I was assuming it was maybe the Mac OS Console. Just found this article

Lots of cool things in there and explains why many of the commands I have tried to execute from the command line returned a command not found error. I was supposed to be executing those within the console.

As you all were!