openhab-core
openhab-core copied to clipboard
Version/Update information available inside openHAB
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)
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.
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.
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.