How to upgrade Jython and Helper-Libraries

I have a running OH-Test-System with NGRE, Jython and Helper-Libraries, which I setup early this year to
rewrite my DSL-Rules into Python-Scripts and meanwhile all my Rules are running more or less as Python-Scripts.

I used the Docs — https://openhab-scripters.github.io/openhab-helper-libraries/Getting%20Started/Installation.html — and worked thru step by step

But in the meantime, I think, there are a lot of changes. The OH-System is now 2.5.6 . But I think that the NGRE/Jython-Part
didn’t get such automatic Updates

Somewhere in the forum I have read that OH/NGRE/Jython runs with JAVA 11 but also have read that it doesnt, so I tried it for my own risk.

… and it doesn’t work, but it was no problem to set (roll) back. What I learned, it seems as if the DSL-Part seems to run,
but not the Jython-Part.

So I want to ask if there is someone who can explain me, how to upgrade my System.

Here is some system-information about it:

- ======================================== my_sysinfo - Start ========================================================
- *******  Hardware-Info        = Model		: Raspberry Pi 3 Model B Rev 1.2
- *******  Hardware-Info        = model name: ARMv7 Processor rev 4 (v7l)
- =========================================== Linux Version ==========================================================
- *******  Linux-Version-Info   = Raspbian GNU/Linux 10 (buster) (Pretty-Name)
- ====================================================================================================================
- ===================================== Openhab-Version Info =========================================================
- *******  OH-Version-Info      = openHAB Distribution Version Information 
- *******  OH-Version-Info      = ---------------------------------------- 
- *******  OH-Version-Info      = build-no        : Release Build 
- *******  OH-Version-Info      = online-repo     : https://openhab.jfrog.io/openhab/libs-release 
- *******
- *******  OH-Version-Info      = Repository        Version 
- *******  OH-Version-Info      = ---------------------------------------- 
- *******  OH-Version-Info      = openhab-distro  : 2.5.6 
- *******  OH-Version-Info      = openhab-core    : 2.5.0 
- *******  OH-Version-Info      = openhab1-addons : 1.14.0 
- *******  OH-Version-Info      = openhab2-addons : 2.5.6 
- *******  OH-Version-Info      = karaf           : 4.2.7 
- ====================================================================================================================
- ===================================== Jython-Parameters   (Scott) ==================================================
- *******  Jython-Version       = 2.7.0.final 
- *******  os.name              = Linux 
- *******  os.version           = 4.19.118-v7+ 
- *******  java.vendor          = Azul Systems, Inc. 
- *******  java.vm.name         = OpenJDK Client VM 
- *******  java.runtime.name    = OpenJDK Runtime Environment 
- *******  java.runtime.version = 1.8.0_252-b225 
- *******  sys.path             = /etc/openhab2/automation/lib/python
                                  /etc/openhab2/automation/jython/Lib
                                  /etc/openhab2/automation/jython/jython-standalone-2.7.0.jar/Lib
                                  __classpath__
                                  __pyclasspath__/ 
- *******  java.external.dirs   = /opt/jdk/zulu8.46.0.225-ca-jdk8.0.252-linux_aarch32hf/jre/lib/ext:/opt/jdk/zulu8.46.0.225-ca-jdk8.0.252-linux_aarch32hf/lib/ext:/usr/share/openhab2/runtime/lib/ext 
- *******  user.name            = hansdampf 
- *******  file.encoding        = UTF-8 
- *******  jetty.host           = 0.0.0.0 
- ===================================================================================================================
- ======================================== my_sysinfo - End =========================================================

and some tree information about the automation-folder:

[01:36:27] hab@ohtest:/etc/openhab2/automation$ tree
.
├── jsr223
│   └── python
│       ├── community
│       │   └── README.md
│       ├── core
│       │   ├── 000_startup_delay.py
│       │   └── components
│       │       ├── 100_DirectoryTrigger.py
│       │       ├── 100_OsgiEventTrigger.py
│       │       ├── 100_StartupTrigger.py
│       │       ├── 200_JythonBindingInfoProvider.py
│       │       ├── 200_JythonExtensionProvider.py
│       │       ├── 200_JythonItemChannelLinkProvider.py
│       │       ├── 200_JythonItemProvider.py
│       │       ├── 200_JythonThingProvider.py
│       │       ├── 200_JythonThingTypeProvider.py
│       │       └── 200_JythonTransform.py
│       └── personal
│           ├── astro_events_test.py
│           ├── astro_moon_orbit.py
│           ├── avm_status.py
│           ├── bluetooth.py
│           ├── cpu_monitor.py
│           ├── hello_world.py_stopped
│           ├── monitoring_window_door.py
│           ├── ntp.py
│           ├── owm_list.py
│           ├── owm_test_scott.py
│           ├── owm_wind.py
│           ├── presence_detection.py
│           ├── README.md
│           ├── tasmota_http.py
│           ├── tasmota_status_refresh.py
│           ├── test_date.py
│           ├── test_syspath_check.py
│           ├── test_update.py
│           └── untitled_1.py
├── jython
│   └── jython-standalone-2.7.0.jar
└── lib
    └── python
        ├── community
        │   ├── __init__$py.class
        │   └── __init__.py
        ├── configuration$py.class
        ├── configuration.py
        ├── core
        │   ├── actions$py.class
        │   ├── actions.py
        │   ├── date$py.class
        │   ├── date.py
        │   ├── __init__$py.class
        │   ├── __init__.py
        │   ├── items$py.class
        │   ├── items.py
        │   ├── jsr223$py.class
        │   ├── jsr223.py
        │   ├── links$py.class
        │   ├── links.py
        │   ├── log$py.class
        │   ├── log.py
        │   ├── metadata$py.class
        │   ├── metadata.py
        │   ├── osgi
        │   │   ├── events$py.class
        │   │   ├── events.py
        │   │   ├── __init__$py.class
        │   │   └── __init__.py
        │   ├── rules$py.class
        │   ├── rules.py
        │   ├── testing.py
        │   ├── triggers$py.class
        │   ├── triggers.py
        │   ├── utils$py.class
        │   └── utils.py
        └── personal
            ├── __init__$py.class
            └── __init__.py

13 directories, 68 files

Is there anyone to help me and explain me in simple words if it is neccessary and how to upgrade ?

Thx in advance - Peter

There will be no automatic updates until a maintainer approves the PRs for the Jython and helper library addons. It’s been 7 months now, so it shouldn’t be much longer. The installation instructions give direction on how to manually update…
https://openhab-scripters.github.io/openhab-helper-libraries/Getting%20Started/Installation.html

Manual installs of Jython will not work with Java 11. You will need to install it as an addon using Jython version 2.7.2. I have an update for the beta Jython addon, but have not yet released it. Just be patient…

2020-06-28 00:12:52.735 [WARN ] [jython.Startup] - 

*******************************************************************************
Jython version:       2.7.2.final
Operating system:     Linux
OS Version:           5.3.15-300.fc31.x86_64
Java vendor:          Oracle Corporation
Java VM name:         OpenJDK 64-Bit Server VM
Java runtime name:    OpenJDK Runtime Environment
Java runtime version: 11.0.6+10
sys.path:             /mnt/data/openhab/openhab2-2.5.6-149/conf/automation/lib/python
                      /mnt/data/openhab/openhab2-2.5.6-149/userdata/cache/org.eclipse.osgi/209/0/bundleFile/Lib
                      __classpath__
                      __pyclasspath__/
*******************************************************************************

@fibu-freak It took me a couple of tries to find the directions, so here they are copy and pasted:

To upgrade to the latest version of the helper libraries, delete the older version and follow the installation steps.

@5iver + @hafniumzinc

Thx guys for answering. It was not the “simple” answer I hoped for.
But I will think about it and also tinker a bit. But I will be patient and
tinker with a clone :wink:

Cheers - Peter

BTW: I always look on the bright side of life :nerd_face: :smiley:

2 Likes