openhab-core icon indicating copy to clipboard operation
openhab-core copied to clipboard

Version/Update information available inside openHAB

Open Boby71 opened this issue 9 months ago • 3 comments

Idea for openHAB (5):

Please provide some variables/items which show a) the currently installed OH-version of the running system and b) if there is a newer (stable) version available.

The idea is to integrate this information into your gui/sitemap and to display it to the user. Even rules etc can be used for notifications (if wanted)

Boby71 avatar Feb 16 '25 15:02 Boby71

The version information is in the UI under "about". But if I understand you correctly you mean something like a "openhab-internals" binding which exposes various internal information through things so items can be normally linked against them.

spacemanspiff2007 avatar Feb 16 '25 17:02 spacemanspiff2007

The current version number of OH is available in rules (jRuby and JS at least, I'm not sure about non-JSR223 type languages) as org.openhab.core.OpenHAB.version.

Knowing if there is an update get's a little complicated because that means that OH will have to know if it's running a snapshot, milestone, or release and query the appropriate GitHub's API for releases. I showed at https://community.openhab.org/t/ideas-and-discussion-what-features-do-you-want-in-openhab-5-0/160573/603 how to do it in a rule.

rkoshak avatar Feb 17 '25 19:02 rkoshak

JRuby also provides it in OpenHAB::Core::VERSION in line with other Ruby convention. e.g. OpenHAB::DSL::VERSION gives you the current helper library version

But org.openhab.core.OpenHAB.version is also available as a "raw" access to openhab api.

jimtng avatar Mar 22 '25 13:03 jimtng