Installing helper libraries on Windows

I am having some difficulty installing the rule engine onto my Openhab Pi4. I had a massive electrical storm come through yesterday and it fried my Pi3 so now i need to get the Pi4 running. I have been able to copy the majority of the files over. but the rules don’t work because i don’t have the installation right. In the instructions it states ’ Using the openhab account, copy the contents of the /Core/ directory into your openHAB’s site configuration directory (Linux, Windows). ’ this is where i go wrong. I copy and past into the directory through windows. can somebody assist me with the step by step process for the install please

Windows does not understand Linux file permissions & text file line endings. I would look there first.

I understand that they are different. That’s why I have asked for instructions to install the Rule Engine

The instructions are not written for an inexperienced person that only uses it every now and then

This is not the rule engine, but the helper libraries :wink:. The easiest thing to do is to go into Paper UI and install the Eclipse IoT Marektplace and then look under Bindings for Jython and the Jython Helper Libraries. This is very new and not announced yet, but will only take a couple clicks and will replace the Jython beta. Things to note:

  1. Install the helper library add-on FIRST, or they will not load. If you mess this one up, just uninstall the Jython add-on and reinstall it.
  2. The libraries incliuded are a little old and had a bug in them, so you may notice an error in your log. I have an update sitting here, that I will push tonight or tomorrow, that will update the add-on.
  3. You will have to restart OH after the installs to get your rules to load.

If you still want to do a manual installation, don’t worry about the account or permissions when using Windows. Just extract the files and copy them to $OPENHAB_CONF/.


Hi Scott. thanks for the advice. The rules that i have written which are in this directory on the pi, still don’t seem to come up.
it does’nt bring them up in the paper UI under the rules tab

The Paper UI knows nothing about those rules. The rule loading shows in the logs when loaded due to changes or starting of openHAB. Execution of the rules also shows in the event log.

That is incorrect, Bruce. All rules known to the new rule engine, whether managed or unmanaged, will show in the UI.

That is the wrong location for storing scripts. Look here…

The scripts go inside the directory that holds OH., so probably…


My files look to be in the right way
i’m still having trouble where it wont load the core functions, the 30 sec delay or the rules.
i’m out of ideas with this one

They should be under /etc/openhab2 not openhabian2.

What is the directory structure of your openHAB installation? For Windows, it is typicalling under C:\openhab2. Since you referenced openHABian, I’m guessing you have a Windows desktop and you are mistakenly installing the scripts and libraries on it, instead of where OH is installed.

openHABian has network shares that you can use to access the filesystem on the box running OH…

Also, make sure that you have installed the rule engine through Paper UI> Add-ons> Misc.

But why not install the marketplace and be done?

1 Like

Hi Scott. I did install the components through the paper UI. I am using putty on Windows to ssh in to a pi4 that’s running OH. Then communicating with a second pi over Matt for my pool control. I did also type in the wrong openhab2 file pathway.

I’m confused… is it working now?

What did you install… the rule engine, the marketplace, the Jython helper libraries, the Jython add-on… :slightly_smiling_face:? What shows up in the log when OH starts up? Does the show log entries when it is copied over?

Ah… you will need to be careful with permissions then, or OH may not be able to see the scripts or libraries. Make sure the openhab account has +rwx.

When i left it last night, it was still not working.
i installed the Eclipse IoT Marketplace, then installed the jython helper libraries in the paper UI. The rule engine was already installed, but i will reinstall it when i get home tonight.
the file structure is what was required under 'automation.
the ‘.py’ rules don’t start. Does the show log entries when it is copied over? I don’t see this in the log. it just says that’s its loading the ‘Home rules’
What do you mean by “Make sure the openhab account has +rwx.”
I’m a very much a mechanical person and I’m trying to learn the programing side of thigs, so I may ask some dumb questions from time to time so I can understand it.

There are no dumb question!

The rule engine is a dependency for the other add-ons, so it will be installed automatically! However, make sure you have both the Jython Helper Libraries and Jython add-ons installed, then restart OH and watch the logs.

With the add-ons, you do not need to copy in any of the libraries. I do not think the scripts are needed… at least they are not needed in the version I’m about to push.

When using the add-ons, you will still need to setup the logging as in the manual installation instructions. There will be logs when the is copied in and also when the rule executes. There is also a that will log details about your system.

I’m not sure about Home rules, since there is nothing like that. Maybe a translation problem?

If the openhab account does not have permissions to read and execute the scripts, then they will not run. This is likely not an issue, so lets save it for last. If you do not see any logs, then double check that you have done these steps properly.

this is what i get if i reinstall everything

Those errors mean that the rule engin is installed (you’ll see it under Misc), but Jython is not in the classpath. (can’t be found). Since the add-ons are installed, I suspect that you have not restated OH after installing the add-ons, or the manual installation has not been completely removed, specifically the lines in the EXTRA_JAVA_OPTS.

what a mission that was. end result was the following procedure.
uninstall everything relating to the rules.
reinstall rule engine
reinstall helper libraries
reinstall jython rules
copy into the OH file system the 'automation folder
restart OH
then all the bits of the rules that control all my pool automation started working again.
thank you Scott for all of your help and patience with this.

Wahoo! If you have any questions or issues, just shout!