Where can I find the version / build # of a OpenHAB 2.0 installation?

I am testing OpenHAB 2 using the Docker image found here. This image pulls the latest snapshots from the build server and runs in a headless container. Therefore I do not see the initial boot output in terminal.

How can I find the snapshot date OR build number OR version number? Can they be found in the logs or somewhere in the PaperUI?

I think it would be a good idea that the top level webpage from openhab 2 shows the build number

As in "Welcome to openHAB 2.0: you have build nr 2.0B3 from (build date) installed.

(and more info on a kind of about page, that could be part of paperUI)

1 Like

One method might be:

  1. Attach bash to container:
    sudo docker exec -i -t openhab_container_id /bin/bash

  2. Install SSH server in container:
    sudo apt-get update
    sudo apt-get install openssh-server

  3. Connect to Karaf console:
    sudo ssh openhab@localhost -p 8101

  4. Find version or build date/number somewhere?
    $ openhab> version
    $ 4.0.4 <-- What version does this correspond to?

Note: sudo might not be needed here.

It makes sense to have this buried in a menu (like in Configuration > Services) or another place in the UI.

well the first page now, serves as placeholder for other ui’s. it say already welcome, it might as well give the last version…

The REST API supplies this endpoint: http://localhost:8080/rest/

Which returns a version. What version is this for?

{
  "version": "0.9.0.201607221840",
  "links": [...]
}

There is also the Jetty HTTP server version, as seen in the Response header:

{
  "date": "Tue, 09 Aug 2016 21:08:19 GMT",
  "server": "Jetty(9.2.14.v20151106)",
  "content-length": "1218",
  "content-type": "application/json"
}

You can see the build number by running:

docker logs [openhab-container-id]

The output will show the build number, for example:

Launching the openHAB runtime...

                          __  _____    ____      
  ____  ____  ___  ____  / / / /   |  / __ )     
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  | 
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /      
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/     
    /_/                        2.0.0-SNAPSHOT
                               Build #703   

OR like this:

docker exec -it openhab /openhab/runtime/bin/client

From: https://hub.docker.com/r/openhab/openhab/