Skip to content

Commit

Permalink
Merge branch 'openhab:main' into pythonscripting
Browse files Browse the repository at this point in the history
  • Loading branch information
HolgerHees authored Feb 13, 2025
2 parents 6bd6420 + 5a57b9e commit da46ba5
Show file tree
Hide file tree
Showing 258 changed files with 41,664 additions and 15,845 deletions.
2 changes: 2 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
/bundles/org.openhab.binding.adorne/ @theiding
/bundles/org.openhab.binding.ahawastecollection/ @soenkekueper
/bundles/org.openhab.binding.airgradient/ @austvik
/bundles/org.openhab.binding.airparif/ @clinique
/bundles/org.openhab.binding.airq/ @aurelio1 @fwolter
/bundles/org.openhab.binding.airquality/ @openhab/add-ons-maintainers
/bundles/org.openhab.binding.airvisualnode/ @3cky
Expand Down Expand Up @@ -332,6 +333,7 @@
/bundles/org.openhab.binding.salus/ @magx2
/bundles/org.openhab.binding.samsungtv/ @NickWaterton
/bundles/org.openhab.binding.satel/ @druciak
/bundles/org.openhab.binding.sbus/ @cipianpascu
/bundles/org.openhab.binding.semsportal/ @itb3
/bundles/org.openhab.binding.senechome/ @vctender @KorbinianP @eguib
/bundles/org.openhab.binding.seneye/ @nikotanghe
Expand Down
10 changes: 10 additions & 0 deletions bom/openhab-addons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@
<artifactId>org.openhab.binding.airgradient</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.airparif</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.airq</artifactId>
Expand Down Expand Up @@ -1636,6 +1641,11 @@
<artifactId>org.openhab.binding.satel</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.sbus</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.semsportal</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.automation.jrubyscripting/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<properties>
<bnd.importpackage>com.sun.nio.*;resolution:=optional,com.sun.security.*;resolution:=optional,org.apache.tools.ant.*;resolution:=optional,org.bouncycastle.*;resolution:=optional,org.joda.*;resolution:=optional,sun.management.*;resolution:=optional,sun.nio.*;resolution:=optional,jakarta.annotation;resolution:=optional,jdk.crac.management;resolution:=optional</bnd.importpackage>
<jruby.version>9.4.11.0</jruby.version>
<jruby.version>9.4.12.0</jruby.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.automation.jsscripting/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# JavaScript Scripting

This add-on provides support for JavaScript (ECMAScript 2022+) that can be used as a scripting language within automation rules.
This add-on provides support for JavaScript (ECMAScript 2024+) that can be used as a scripting language within automation rules.
It is based on [GraalJS](https://www.graalvm.org/javascript/) from the [GraalVM project](https://www.graalvm.org/).

Also included is [openhab-js](https://github.com/openhab/openhab-js/), a fairly high-level ES6 library to support automation in openHAB. It provides convenient access
Expand Down
7 changes: 7 additions & 0 deletions bundles/org.openhab.automation.jsscripting/bnd.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ Require-Capability:
osgi.serviceloader:=
filter:="(osgi.serviceloader=org.graalvm.polyglot.impl.AbstractPolyglotImpl)";
cardinality:=multiple
Require-Bundle: org.graalvm.sdk.collections;bundle-version="24.1.2",\
org.graalvm.sdk.jniutils;bundle-version="24.1.2",\
org.graalvm.sdk.nativeimage;bundle-version="24.1.2",\
org.graalvm.sdk.word;bundle-version="24.1.2",\
org.graalvm.shadowed.icu4j;bundle-version="24.1.2",\
org.graalvm.truffle.truffle-compiler;bundle-version="24.1.2",\
org.graalvm.truffle.truffle-runtime;bundle-version="24.1.2"

SPI-Provider: *
SPI-Consumer: *
Expand Down
12 changes: 11 additions & 1 deletion bundles/org.openhab.automation.jsscripting/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
!jdk.vm.ci.services
</bnd.importpackage>
<!-- Remember to check if the fix https://github.com/openhab/openhab-core/pull/4437 still works when upgrading GraalJS -->
<graaljs.version>24.1.1</graaljs.version>
<graaljs.version>24.1.2</graaljs.version>
<oh.version>${project.version}</oh.version>
<ohjs.version>[email protected]</ohjs.version>
</properties>
Expand All @@ -46,6 +46,14 @@
<excludes>
<exclude>org.lastnpe.eea:eea-all</exclude>
<exclude>org.apache.karaf.features:framework</exclude>
<!-- we use OSGI-ified version, so we don't need the following -->
<exclude>org.graalvm.sdk:collections</exclude>
<exclude>org.graalvm.sdk:jniutils</exclude>
<exclude>org.graalvm.sdk:nativeimage</exclude>
<exclude>org.graalvm.sdk:word</exclude>
<exclude>org.graalvm.shadowed:icu4j</exclude>
<exclude>org.graalvm.truffle:truffle-compiler</exclude>
<exclude>org.graalvm.truffle:truffle-runtime</exclude>
</excludes>
</artifactSet>
<createDependencyReducedPom>false</createDependencyReducedPom>
Expand Down Expand Up @@ -109,6 +117,7 @@
</execution>
</executions>
</plugin>
<!-- embed the JS resources into the bundle -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand Down Expand Up @@ -141,6 +150,7 @@
</build>

<dependencies>
<!-- Graal Polyglot Framework -->
<dependency>
<groupId>org.graalvm.polyglot</groupId>
<artifactId>polyglot</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@

<feature name="openhab-automation-jsscripting" description="JavaScript Scripting" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.sdk.collections/24.1.2</bundle>
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.sdk.jniutils/24.1.2</bundle>
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.sdk.nativeimage/24.1.2</bundle>
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.sdk.word/24.1.2</bundle>
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.shadowed.icu4j/24.1.2</bundle>
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.truffle.truffle-compiler/24.1.2</bundle>
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.truffle.truffle-runtime/24.1.2</bundle>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.automation.jsscripting/${project.version}</bundle>
</feature>
</features>
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
import javax.script.ScriptEngineFactory;
import javax.script.ScriptException;

import org.eclipse.jdt.annotation.NonNull;

/**
* {@link ScriptEngine} implementation that delegates to a supplied ScriptEngine instance. Allows overriding specific
* methods.
Expand All @@ -33,9 +31,9 @@
*/
public abstract class DelegatingScriptEngineWithInvocableAndCompilableAndAutocloseable<T extends ScriptEngine & Invocable & Compilable & AutoCloseable>
implements ScriptEngine, Invocable, Compilable, AutoCloseable {
protected @NonNull T delegate;
protected T delegate;

public DelegatingScriptEngineWithInvocableAndCompilableAndAutocloseable(@NonNull T delegate) {
public DelegatingScriptEngineWithInvocableAndCompilableAndAutocloseable(T delegate) {
this.delegate = delegate;
}

Expand Down
27 changes: 27 additions & 0 deletions bundles/org.openhab.binding.airparif/NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
This content is produced and maintained by the openHAB project.

* Project home: https://www.openhab.org

== Declared Project Licenses

This program and the accompanying materials are made available under the terms
of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0/.

== Source Code

https://github.com/openhab/openhab-addons

== Credits
Icon set coming from the noon project:
Hazel, Ash : Imogen Oh
Birch, Oak : monkik
Cypress, Alder : Levi
Poplar, Rumex : Laymik
Willow : PizzaOter
Hornbeam, Linden : Cannavale
Olive : BnB Studio
Chestnut : Muhammad Fadli Rusady
Plantain : Lars Meiertoberens
Grasses : Neneng Yuliani Lestari
Ragweed, Wormwood : bsd studio
Loading

0 comments on commit da46ba5

Please sign in to comment.