Installation details (#1197)

Added more details around the installation and configuration process.
Fixed that engine no longer logs "Activated scripting support..."

Signed-off-by: Mark Theiding <mark.theiding@gmail.com>
pull/1202/head
theiding 2020-04-21 14:04:17 -07:00 committed by GitHub
parent 174dcd4b12
commit e9f45f6df8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 9 deletions

View File

@ -10,8 +10,10 @@ title: JSR223 Jython Scripting
## Configuration
[Download](https://jython.github.io/index) the Jython 2.7.0 standalone or installer package, or install through a package repository.
Newer versions are not yet supported.
Install Jython on the local filesystem and make note of the installation directory location.
Install Jython on the local filesystem into a directory of your choice.
A good installation directory is `/etc/openhab2/automation/jython`.
For the easiest installation mechanism simply download `jython-standalone-2.7.0.jar` and copy it into your installation directory. Alternatively you can execute the installer and specify your installation directory during the install.
Note that newer versions than 2.7.0 are not yet supported.
The Jython implementation will need to be added to openHAB's Java classpath.
How this is done depends on the specific installation technique and operating system.
@ -26,6 +28,9 @@ EXTRA_JAVA_OPTS="-Xbootclasspath/a:/etc/openhab2/automation/jython/jython-standa
This will add the Jython library to the Java classpath,
set the Jython home directory and specify the initial Python path for the Jython runtime.
Specifically `bootclasspath` must point to your installation directory plus the Jython library, which is
`jython-standalone-2.7.0.jar` if you copied the jar directly or `jython.jar` if you ran the installer.
Similarly `python.home` points to your installation directory.
Python modules and packages can be installed into the `python.path` locations and imported from scripts.
Note that library modules and packages are not automatically reloaded when they change.
@ -44,16 +49,9 @@ or viewing the `openhab.log` file directly).
You should see a log line with information similar to:
```text
... [INFO ] [s.i.GenericScriptEngineFactory:28 ] - Activated scripting support for ECMAScript
... [INFO ] [s.i.GenericScriptEngineFactory:28 ] - Activated scripting support for python
...
... [INFO ] [.a.m.s.r.i.l.ScriptFileWatcher:150 ] - Loading script 'test.py'
```
::: tip Note
ECMAScript is Javascript
:::
Look for any potentially related error messages.
To enable debug logging, use the [Karaf logging]({{base}}/administration/logging.html) commands to