That’s actually a good idea. I don’t know an “official” way either. What you can do: you can use the exec binding to query the version of the installed package. That however might depend on your kind of setup. OH1 through apt? what does “dpkg – list | grep openhab” tell you?
My installation is on OSX and so not through dpkg. I could probably just come up with a grep against openhab.log to pull the version number from that file. I haven’t used the exec binding yet, but will take a look and see what I can do.
Hello
I am interested in showing the version as well in my Overview page
I looked in the SystemInfo binding but it doesn’t have the version # available as a channel
Was wondering if there is another binding I am missing
Thanks
This is a six year old thread. A lot has changed in that to the systeminfo binding in that time. I know of no other binding available.
Note that the version information is available one click away from the main page under “Help and About”. Otherwise, you’ll need to use the Exec binding or executeCommandLine to pull the version info from somewhere else, such as the logs or that awk command Thom posted (only the path to the file has long since changed to /var/lib/openhab/etc/version.properties).
The following is working for me in OH3.2. There is one String item for each of the versions listed in the version.properties file. The Exec and Regex addons are required. The items are populated once per day (every 86400 seconds).
Note that my OpenHab is running in a Docker container - you may need to adjust to paths in the exec.whitelist and .things files to match your installation.
The first step is to add these awk commands to the /conf/misc/exec.whitelist file.