Install openHAB Rules Tools [5.0.0.0;5.9.9.9]

This rule template will attempt to install openHAB rules tools for you. See openHAB Rules Tools Announcements for details and openHAB Rules Tools [4.1.0.0;4.9.9.9] for the Block Library.

This rule checks to see if npm is available via a local to the user nvm installation. If it’s not the template installs nvm, then uses nvm to install node locally to the user. This local to the user instance is then used to install openhab_rules_tools.

Install the template, instantiate a rule from the template, and manually run it while watching openhab.log.

Do not use this if you are running openHABian. openHAB Rules Tools can be installed from openhabian-config.

Watch openhab.log for errors. If there are errors, this template may not work for you and you will have to do a manual install.

This script does work for Docker users. Make sure to set the path parameter is set to /openhab/conf.

Language: JS Scripting

Dependencies:

  • Requires wget to be installed and in the path for the user openHAB is running under.
  • Only tested on Linux and Docker. I cannot say if it works on other platforms. It almost certainly won’t work on Windows.

Changelog

Version 0.1

  • initial release

Resources

https://raw.githubusercontent.com/rkoshak/openhab-rules-tools/refs/heads/main/rule-templates/installOHRT/installOHRT.yaml

1 Like

I assume that means that the upgrade to OH5 removes openHAB Rules Tools [4.0.0.0;4.9.9.9]? Or should that be ‘uninstalled’ manually before trying to install openHAB Rules Tools [5.0.0.0;5.9.9.9]?

No, this is just a convenience rule template for those who are not running openHABian (use openhabian-config instead) and are running on a POSIX OS (e.g. Linux) who may not be able or willing to install the library from the command line.

Note this is for the node.js module, not the Block Library. The Block Library is just a way to expose the node.js module for Blockly users. The Block Library requires the node module to be installed to work.

I have released a new minor version of the OHRT node module that includes a few new features. If you’ve already installed OHRT, from the command line navigate to $OH_CONF/automation/js and run npm upgrade. There isn’t much new but it will let you cancel Gatekeeper timers now if you are a Block library users. If you don’t need that, there really is no need to upgrade. openHABian will upgrade the library automatically when you upgrade the rest of the system.

1 Like