mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Compare commits
165 Commits
9a70a982d9
...
9788bb2f18
Author | SHA1 | Date | |
---|---|---|---|
|
9788bb2f18 | ||
|
adacdebb9f | ||
|
d36b2a8d82 | ||
|
5ac2780749 | ||
|
ffa2d1722d | ||
|
d1227151e1 | ||
|
8672ed0208 | ||
|
993129a2c3 | ||
|
7639b1c3e5 | ||
|
8a442d9aff | ||
|
51b5c89b6b | ||
|
19ca89c301 | ||
|
b4bcf802f4 | ||
|
b5203ebff4 | ||
|
304f51f66e | ||
|
bbec3d59f8 | ||
|
32586c096f | ||
|
26749f0fc1 | ||
|
11baab4231 | ||
|
e611b5d368 | ||
|
d54a51b732 | ||
|
36cff511b9 | ||
|
8a3baf8003 | ||
|
7cc9903158 | ||
|
563caa0762 | ||
|
705feffd54 | ||
|
6af04fc31f | ||
|
22c7ca99ad | ||
|
d6476042ec | ||
|
1a4cebd281 | ||
|
6978b9978b | ||
|
36802db90e | ||
|
d4cbc5f839 | ||
|
05382279a9 | ||
|
34d8fec597 | ||
|
37c491bcd1 | ||
|
1b02f98b46 | ||
|
33d3577230 | ||
|
057993bb40 | ||
|
dcb6d6e2c2 | ||
|
9e6be5a9e0 | ||
|
33b19419b6 | ||
|
df1ee5fda3 | ||
|
7b986e03d0 | ||
|
e2571d6f09 | ||
|
c21122a3d2 | ||
|
3d547fffeb | ||
|
d14749bb64 | ||
|
f225140bee | ||
|
24f4fc3d70 | ||
|
bbdf3e3479 | ||
|
c31bcb2026 | ||
|
1e7d01c578 | ||
|
c7e7f3059a | ||
|
d049995e56 | ||
|
2f2cf22332 | ||
|
0e5e48f763 | ||
|
7c6e658f56 | ||
|
50e3ca62c0 | ||
|
7e9966989a | ||
|
86762e0e9b | ||
|
d253e2cd2e | ||
|
5eb47a042f | ||
|
5c762848b5 | ||
|
2cd8902017 | ||
|
420454b5b7 | ||
|
5e7d2fc5da | ||
|
62cdb14c74 | ||
|
1b75e03ca8 | ||
|
6acfeb65f3 | ||
|
31e0bb601c | ||
|
57577f42a9 | ||
|
da6dde5cad | ||
|
56d447fa77 | ||
|
108067ac4b | ||
|
c48752e6e1 | ||
|
6e6a0d080c | ||
|
e91820c397 | ||
|
84021f01a5 | ||
|
fc9e564a2c | ||
|
7a3380a020 | ||
|
2ab9822605 | ||
|
5d40a719f4 | ||
|
254f2f5886 | ||
|
2ded1d14c9 | ||
|
b2c9abbe29 | ||
|
e794c6a0f6 | ||
|
bc540c6653 | ||
|
6007d6bc51 | ||
|
aae1224658 | ||
|
b186639344 | ||
|
9d72871018 | ||
|
328e91a7fc | ||
|
82813cdcd4 | ||
|
9c19aa70e9 | ||
|
df8f92e847 | ||
|
1a76e5522c | ||
|
7c1892fd57 | ||
|
d59b10a064 | ||
|
77d6457017 | ||
|
a6f9977e29 | ||
|
d8485acf58 | ||
|
182a0cca2b | ||
|
2ba8a6d4b8 | ||
|
86955bc39f | ||
|
512e3b239b | ||
|
7d54e604f9 | ||
|
96b5ad2e55 | ||
|
751bbf7495 | ||
|
fb9a998f59 | ||
|
1af326dbb7 | ||
|
225ebd9c83 | ||
|
541f8d4028 | ||
|
a989208cc6 | ||
|
b23cb757c4 | ||
|
e60fc3e40c | ||
|
d871b66d3c | ||
|
d00d654976 | ||
|
cb74dd6497 | ||
|
d001636a5f | ||
|
bad29eb653 | ||
|
daabae72e0 | ||
|
a1a61ff7c8 | ||
|
164e333a40 | ||
|
2f33a2d1ae | ||
|
7f3138585a | ||
|
520bda33a9 | ||
|
32bf72a858 | ||
|
c6087e6b00 | ||
|
c17b5f9ea8 | ||
|
6e2eb70950 | ||
|
e898312e9e | ||
|
fb7ba1feb1 | ||
|
28b6624644 | ||
|
7fd9fc8554 | ||
|
3361aa41dd | ||
|
000f8d7c6b | ||
|
dd6c1f6d93 | ||
|
f0ba39f121 | ||
|
0a46ff2a79 | ||
|
b74e1e671d | ||
|
698939cf46 | ||
|
c594446eac | ||
|
baf7ec6c2a | ||
|
f61cc6dec7 | ||
|
68527c03f5 | ||
|
d5d01b0623 | ||
|
4c176a8c82 | ||
|
7cb8bf18ed | ||
|
b5f36cbfa8 | ||
|
b724595c2a | ||
|
4cea76be8e | ||
|
9b4f1d769c | ||
|
1f6f05ab83 | ||
|
e05d5ba84a | ||
|
8d0653a161 | ||
|
bb9a789d31 | ||
|
c02a7345e1 | ||
|
7feafba285 | ||
|
81f5a7fff9 | ||
|
a8e2348d5a | ||
|
1231e7d2e9 | ||
|
0ee5fd952e | ||
|
e3a1abd191 | ||
|
e310161327 |
@ -58,7 +58,7 @@
|
|||||||
/bundles/org.openhab.binding.boschindego/ @jofleck @jlaur
|
/bundles/org.openhab.binding.boschindego/ @jofleck @jlaur
|
||||||
/bundles/org.openhab.binding.boschshc/ @david-pace @GerdZanker
|
/bundles/org.openhab.binding.boschshc/ @david-pace @GerdZanker
|
||||||
/bundles/org.openhab.binding.bosesoundtouch/ @marvkis @tratho
|
/bundles/org.openhab.binding.bosesoundtouch/ @marvkis @tratho
|
||||||
/bundles/org.openhab.binding.broadlink/ @dag81
|
/bundles/org.openhab.binding.broadlink/ @AntonJansen
|
||||||
/bundles/org.openhab.binding.broadlinkthermostat/ @flo-02-mu
|
/bundles/org.openhab.binding.broadlinkthermostat/ @flo-02-mu
|
||||||
/bundles/org.openhab.binding.bsblan/ @hypetsch
|
/bundles/org.openhab.binding.bsblan/ @hypetsch
|
||||||
/bundles/org.openhab.binding.bticinosmarther/ @MrRonfo
|
/bundles/org.openhab.binding.bticinosmarther/ @MrRonfo
|
||||||
@ -465,6 +465,7 @@
|
|||||||
/bundles/org.openhab.voice.mactts/ @kaikreuzer
|
/bundles/org.openhab.voice.mactts/ @kaikreuzer
|
||||||
/bundles/org.openhab.voice.marytts/ @kaikreuzer
|
/bundles/org.openhab.voice.marytts/ @kaikreuzer
|
||||||
/bundles/org.openhab.voice.mimictts/ @dalgwen
|
/bundles/org.openhab.voice.mimictts/ @dalgwen
|
||||||
|
/bundles/org.openhab.voice.openaitts/ @Artur-Fedjukevits
|
||||||
/bundles/org.openhab.voice.picotts/ @FlorianSW
|
/bundles/org.openhab.voice.picotts/ @FlorianSW
|
||||||
/bundles/org.openhab.voice.pipertts/ @GiviMAD
|
/bundles/org.openhab.voice.pipertts/ @GiviMAD
|
||||||
/bundles/org.openhab.voice.pollytts/ @openhab/add-ons-maintainers
|
/bundles/org.openhab.voice.pollytts/ @openhab/add-ons-maintainers
|
||||||
|
@ -2301,6 +2301,11 @@
|
|||||||
<artifactId>org.openhab.voice.mimictts</artifactId>
|
<artifactId>org.openhab.voice.mimictts</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.openhab.addons.bundles</groupId>
|
||||||
|
<artifactId>org.openhab.voice.openaitts</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.openhab.addons.bundles</groupId>
|
<groupId>org.openhab.addons.bundles</groupId>
|
||||||
<artifactId>org.openhab.voice.picotts</artifactId>
|
<artifactId>org.openhab.voice.picotts</artifactId>
|
||||||
|
@ -10,7 +10,7 @@ IF %ARGC% NEQ 3 (
|
|||||||
exit /B 1
|
exit /B 1
|
||||||
)
|
)
|
||||||
|
|
||||||
SET OpenhabVersion="4.3.0-SNAPSHOT"
|
SET OpenhabVersion="5.0.0-SNAPSHOT"
|
||||||
|
|
||||||
SET BindingIdInCamelCase=%~1
|
SET BindingIdInCamelCase=%~1
|
||||||
SET BindingIdInLowerCase=%BindingIdInCamelCase%
|
SET BindingIdInLowerCase=%BindingIdInCamelCase%
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
[ $# -lt 3 ] && { echo "Usage: $0 <BindingIdInCamelCase> <Author> <GitHub Username>"; exit 1; }
|
[ $# -lt 3 ] && { echo "Usage: $0 <BindingIdInCamelCase> <Author> <GitHub Username>"; exit 1; }
|
||||||
|
|
||||||
openHABVersion=4.3.0-SNAPSHOT
|
openHABVersion=5.0.0-SNAPSHOT
|
||||||
|
|
||||||
camelcaseId=$1
|
camelcaseId=$1
|
||||||
id=`echo $camelcaseId | tr '[:upper:]' '[:lower:]'`
|
id=`echo $camelcaseId | tr '[:upper:]' '[:lower:]'`
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
@ -16,8 +16,6 @@ import java.io.Reader;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import javax.script.Bindings;
|
import javax.script.Bindings;
|
||||||
import javax.script.Compilable;
|
|
||||||
import javax.script.CompiledScript;
|
|
||||||
import javax.script.Invocable;
|
import javax.script.Invocable;
|
||||||
import javax.script.ScriptContext;
|
import javax.script.ScriptContext;
|
||||||
import javax.script.ScriptEngine;
|
import javax.script.ScriptEngine;
|
||||||
@ -37,7 +35,9 @@ import org.jruby.embed.jsr223.JRubyEngine;
|
|||||||
* @author Jimmy Tanagra - Initial contribution
|
* @author Jimmy Tanagra - Initial contribution
|
||||||
*/
|
*/
|
||||||
@NonNullByDefault
|
@NonNullByDefault
|
||||||
public class JRubyEngineWrapper implements Compilable, Invocable, ScriptEngine {
|
public class JRubyEngineWrapper implements Invocable, ScriptEngine {
|
||||||
|
// Don't implement Compilable because there is a bug
|
||||||
|
// in JRuby's compiled scripts: https://github.com/jruby/jruby/issues/8346
|
||||||
|
|
||||||
private final JRubyEngine engine;
|
private final JRubyEngine engine;
|
||||||
|
|
||||||
@ -48,16 +48,6 @@ public class JRubyEngineWrapper implements Compilable, Invocable, ScriptEngine {
|
|||||||
this.engine = Objects.requireNonNull(engine);
|
this.engine = Objects.requireNonNull(engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public CompiledScript compile(@Nullable String script) throws ScriptException {
|
|
||||||
return new JRubyCompiledScriptWrapper(engine.compile(script));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CompiledScript compile(@Nullable Reader reader) throws ScriptException {
|
|
||||||
return new JRubyCompiledScriptWrapper(engine.compile(reader));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object eval(@Nullable String script, @Nullable ScriptContext context) throws ScriptException {
|
public Object eval(@Nullable String script, @Nullable ScriptContext context) throws ScriptException {
|
||||||
Object ctx = Objects.requireNonNull(context).getBindings(ScriptContext.ENGINE_SCOPE).get(CONTEXT_VAR_NAME);
|
Object ctx = Objects.requireNonNull(context).getBindings(ScriptContext.ENGINE_SCOPE).get(CONTEXT_VAR_NAME);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -23,25 +23,37 @@
|
|||||||
!jdk.vm.ci.services
|
!jdk.vm.ci.services
|
||||||
</bnd.importpackage>
|
</bnd.importpackage>
|
||||||
<!-- Remember to check if the fix https://github.com/openhab/openhab-core/pull/4437 still works when upgrading GraalJS -->
|
<!-- Remember to check if the fix https://github.com/openhab/openhab-core/pull/4437 still works when upgrading GraalJS -->
|
||||||
<graal.version>22.0.0.2</graal.version> <!-- DO NOT UPGRADE: 22.0.0.2 is the latest version working on armv7l / OpenJDK 11.0.16 & armv7l / Zulu 17.0.5+8 -->
|
<graaljs.version>24.1.1</graaljs.version>
|
||||||
<oh.version>${project.version}</oh.version>
|
<oh.version>${project.version}</oh.version>
|
||||||
<ohjs.version>openhab@5.8.1</ohjs.version>
|
<ohjs.version>openhab@5.8.1</ohjs.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<!-- exclude META-INF/services/com.oracle.truffle.api.TruffleLanguage$Provider when unpacking dependencies -->
|
<!-- bundle the modular dependencies into an uber-JAR -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
|
<version>3.6.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>embed-dependencies</id>
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>unpack-dependencies</goal>
|
<goal>shade</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<excludes>META-INF/services/com.oracle.truffle.api.TruffleLanguage$Provider</excludes> <!-- we'll provide this -->
|
<artifactSet>
|
||||||
|
<excludes>
|
||||||
|
<exclude>org.lastnpe.eea:eea-all</exclude>
|
||||||
|
<exclude>org.apache.karaf.features:framework</exclude>
|
||||||
|
</excludes>
|
||||||
|
</artifactSet>
|
||||||
|
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||||
|
<transformers>
|
||||||
|
<!-- Transformer to merge module-info.class files, if needed -->
|
||||||
|
<transformer
|
||||||
|
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
|
||||||
|
</transformers>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
@ -50,7 +62,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.github.eirslett</groupId>
|
<groupId>com.github.eirslett</groupId>
|
||||||
<artifactId>frontend-maven-plugin</artifactId>
|
<artifactId>frontend-maven-plugin</artifactId>
|
||||||
<version>1.15.0</version>
|
<version>1.15.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<nodeVersion>v16.17.1</nodeVersion> <!-- DO NOT DOWNGRADE: NodeJS < 16 doesn't support Apple Silicon -->
|
<nodeVersion>v16.17.1</nodeVersion> <!-- DO NOT DOWNGRADE: NodeJS < 16 doesn't support Apple Silicon -->
|
||||||
<workingDirectory>target/js</workingDirectory>
|
<workingDirectory>target/js</workingDirectory>
|
||||||
@ -130,32 +142,29 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.graalvm.sdk</groupId>
|
<groupId>org.graalvm.polyglot</groupId>
|
||||||
<artifactId>graal-sdk</artifactId>
|
<artifactId>polyglot</artifactId>
|
||||||
<version>${graal.version}</version>
|
<version>${graaljs.version}</version>
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.graalvm.truffle</groupId>
|
|
||||||
<artifactId>truffle-api</artifactId>
|
|
||||||
<version>${graal.version}</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Graal JavaScript ScriptEngine JSR 223 support -->
|
<!-- Graal JavaScript ScriptEngine JSR 223 support -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.graalvm.js</groupId>
|
<groupId>org.graalvm.js</groupId>
|
||||||
<artifactId>js-scriptengine</artifactId>
|
<artifactId>js-scriptengine</artifactId>
|
||||||
<version>${graal.version}</version>
|
<version>${graaljs.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Graal TRegex engine (internally used by Graal JavaScript engine) -->
|
<!-- Graal TRegex engine (internally used by Graal JavaScript engine) -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.graalvm.regex</groupId>
|
<groupId>org.graalvm.regex</groupId>
|
||||||
<artifactId>regex</artifactId>
|
<artifactId>regex</artifactId>
|
||||||
<version>${graal.version}</version>
|
<version>${graaljs.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Graal JavaScript engine (depends on Graal TRegex engine, must be added after it) -->
|
<!-- Graal JavaScript engine (depends on Graal TRegex engine, must be added after it) -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.graalvm.js</groupId>
|
<groupId>org.graalvm.polyglot</groupId>
|
||||||
<artifactId>js</artifactId>
|
<artifactId>js-community</artifactId>
|
||||||
<version>${graal.version}</version>
|
<version>${graaljs.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
@ -163,8 +163,8 @@ public class OpenhabGraalJSScriptEngine
|
|||||||
.option("js.nashorn-compat", "true") // Enable Nashorn compat mode as openhab-js relies on
|
.option("js.nashorn-compat", "true") // Enable Nashorn compat mode as openhab-js relies on
|
||||||
// accessors, see
|
// accessors, see
|
||||||
// https://github.com/oracle/graaljs/blob/master/docs/user/NashornMigrationGuide.md#accessors
|
// https://github.com/oracle/graaljs/blob/master/docs/user/NashornMigrationGuide.md#accessors
|
||||||
.option("js.ecmascript-version", "2022") // If Nashorn compat is enabled, it will enforce ES5
|
.option("js.ecmascript-version", "2024") // If Nashorn compat is enabled, it will enforce ES5
|
||||||
// compatibility, we want ECMA2022
|
// compatibility, we want ECMA2024
|
||||||
.option("js.commonjs-require", "true") // Enable CommonJS module support
|
.option("js.commonjs-require", "true") // Enable CommonJS module support
|
||||||
.hostClassLoader(getClass().getClassLoader())
|
.hostClassLoader(getClass().getClassLoader())
|
||||||
.fileSystem(new DelegatingFileSystem(FileSystems.getDefault().provider()) {
|
.fileSystem(new DelegatingFileSystem(FileSystems.getDefault().provider()) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
com.oracle.truffle.regex.RegexLanguageProvider
|
|
||||||
com.oracle.truffle.js.lang.JavaScriptLanguageProvider
|
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
@ -14,7 +14,6 @@ package org.openhab.binding.ahawastecollection.internal;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.time.ZonedDateTime;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -26,7 +25,6 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
|
|||||||
import org.eclipse.jdt.annotation.Nullable;
|
import org.eclipse.jdt.annotation.Nullable;
|
||||||
import org.openhab.binding.ahawastecollection.internal.CollectionDate.WasteType;
|
import org.openhab.binding.ahawastecollection.internal.CollectionDate.WasteType;
|
||||||
import org.openhab.core.cache.ExpiringCache;
|
import org.openhab.core.cache.ExpiringCache;
|
||||||
import org.openhab.core.i18n.TimeZoneProvider;
|
|
||||||
import org.openhab.core.library.types.DateTimeType;
|
import org.openhab.core.library.types.DateTimeType;
|
||||||
import org.openhab.core.scheduler.CronScheduler;
|
import org.openhab.core.scheduler.CronScheduler;
|
||||||
import org.openhab.core.scheduler.ScheduledCompletableFuture;
|
import org.openhab.core.scheduler.ScheduledCompletableFuture;
|
||||||
@ -57,7 +55,6 @@ public class AhaWasteCollectionHandler extends BaseThingHandler {
|
|||||||
private final Lock monitor = new ReentrantLock();
|
private final Lock monitor = new ReentrantLock();
|
||||||
private final ExpiringCache<Map<WasteType, CollectionDate>> cache;
|
private final ExpiringCache<Map<WasteType, CollectionDate>> cache;
|
||||||
|
|
||||||
private final TimeZoneProvider timeZoneProvider;
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(AhaWasteCollectionHandler.class);
|
private final Logger logger = LoggerFactory.getLogger(AhaWasteCollectionHandler.class);
|
||||||
|
|
||||||
private @Nullable AhaCollectionSchedule collectionSchedule;
|
private @Nullable AhaCollectionSchedule collectionSchedule;
|
||||||
@ -69,11 +66,10 @@ public class AhaWasteCollectionHandler extends BaseThingHandler {
|
|||||||
private final ScheduledExecutorService executorService;
|
private final ScheduledExecutorService executorService;
|
||||||
|
|
||||||
public AhaWasteCollectionHandler(final Thing thing, final CronScheduler scheduler,
|
public AhaWasteCollectionHandler(final Thing thing, final CronScheduler scheduler,
|
||||||
final TimeZoneProvider timeZoneProvider, final AhaCollectionScheduleFactory scheduleFactory,
|
final AhaCollectionScheduleFactory scheduleFactory,
|
||||||
@Nullable final ScheduledExecutorService executorService) {
|
@Nullable final ScheduledExecutorService executorService) {
|
||||||
super(thing);
|
super(thing);
|
||||||
this.cronScheduler = scheduler;
|
this.cronScheduler = scheduler;
|
||||||
this.timeZoneProvider = timeZoneProvider;
|
|
||||||
this.scheduleFactory = scheduleFactory;
|
this.scheduleFactory = scheduleFactory;
|
||||||
this.cache = new ExpiringCache<>(Duration.ofMinutes(5), this::loadCollectionDates);
|
this.cache = new ExpiringCache<>(Duration.ofMinutes(5), this::loadCollectionDates);
|
||||||
this.executorService = executorService == null ? this.scheduler : executorService;
|
this.executorService = executorService == null ? this.scheduler : executorService;
|
||||||
@ -190,9 +186,7 @@ public class AhaWasteCollectionHandler extends BaseThingHandler {
|
|||||||
|
|
||||||
final Date nextCollectionDate = collectionDate.getDates().get(0);
|
final Date nextCollectionDate = collectionDate.getDates().get(0);
|
||||||
|
|
||||||
final ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant(nextCollectionDate.toInstant(),
|
this.updateState(channel.getUID(), new DateTimeType(nextCollectionDate.toInstant()));
|
||||||
this.timeZoneProvider.getTimeZone());
|
|
||||||
this.updateState(channel.getUID(), new DateTimeType(zonedDateTime));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
@ -18,7 +18,6 @@ import java.util.Set;
|
|||||||
|
|
||||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||||
import org.eclipse.jdt.annotation.Nullable;
|
import org.eclipse.jdt.annotation.Nullable;
|
||||||
import org.openhab.core.i18n.TimeZoneProvider;
|
|
||||||
import org.openhab.core.scheduler.CronScheduler;
|
import org.openhab.core.scheduler.CronScheduler;
|
||||||
import org.openhab.core.thing.Thing;
|
import org.openhab.core.thing.Thing;
|
||||||
import org.openhab.core.thing.ThingTypeUID;
|
import org.openhab.core.thing.ThingTypeUID;
|
||||||
@ -40,7 +39,6 @@ public class AhaWasteCollectionHandlerFactory extends BaseThingHandlerFactory {
|
|||||||
|
|
||||||
private static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Set.of(THING_TYPE_SCHEDULE);
|
private static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Set.of(THING_TYPE_SCHEDULE);
|
||||||
private final CronScheduler scheduler;
|
private final CronScheduler scheduler;
|
||||||
private final TimeZoneProvider timeZoneProvider;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supportsThingType(final ThingTypeUID thingTypeUID) {
|
public boolean supportsThingType(final ThingTypeUID thingTypeUID) {
|
||||||
@ -48,10 +46,8 @@ public class AhaWasteCollectionHandlerFactory extends BaseThingHandlerFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Activate
|
@Activate
|
||||||
public AhaWasteCollectionHandlerFactory(final @Reference CronScheduler scheduler,
|
public AhaWasteCollectionHandlerFactory(final @Reference CronScheduler scheduler) {
|
||||||
final @Reference TimeZoneProvider timeZoneProvider) {
|
|
||||||
this.scheduler = scheduler;
|
this.scheduler = scheduler;
|
||||||
this.timeZoneProvider = timeZoneProvider;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -59,8 +55,7 @@ public class AhaWasteCollectionHandlerFactory extends BaseThingHandlerFactory {
|
|||||||
final ThingTypeUID thingTypeUID = thing.getThingTypeUID();
|
final ThingTypeUID thingTypeUID = thing.getThingTypeUID();
|
||||||
|
|
||||||
if (THING_TYPE_SCHEDULE.equals(thingTypeUID)) {
|
if (THING_TYPE_SCHEDULE.equals(thingTypeUID)) {
|
||||||
return new AhaWasteCollectionHandler(thing, this.scheduler, this.timeZoneProvider,
|
return new AhaWasteCollectionHandler(thing, this.scheduler, AhaCollectionScheduleImpl::new, null);
|
||||||
AhaCollectionScheduleImpl::new, null);
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
@ -45,7 +45,11 @@ final class CollectionDate {
|
|||||||
/**
|
/**
|
||||||
* Light packaging.
|
* Light packaging.
|
||||||
*/
|
*/
|
||||||
LIGHT_PACKAGES;
|
LIGHT_PACKAGES,
|
||||||
|
/**
|
||||||
|
* Christmas Tree.
|
||||||
|
*/
|
||||||
|
CHRISTMAS_TREES;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses the {@link WasteType} from the given Value from the Web-page.
|
* Parses the {@link WasteType} from the given Value from the Web-page.
|
||||||
@ -60,6 +64,8 @@ final class CollectionDate {
|
|||||||
return PAPER;
|
return PAPER;
|
||||||
case "Leichtverpackungen":
|
case "Leichtverpackungen":
|
||||||
return LIGHT_PACKAGES;
|
return LIGHT_PACKAGES;
|
||||||
|
case "Weihnachtsbäume":
|
||||||
|
return CHRISTMAS_TREES;
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException("Unknown waste type: " + value);
|
throw new IllegalArgumentException("Unknown waste type: " + value);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
@ -15,8 +15,6 @@ package org.openhab.binding.ahawastecollection.internal;
|
|||||||
import static org.mockito.ArgumentMatchers.*;
|
import static org.mockito.ArgumentMatchers.*;
|
||||||
import static org.mockito.Mockito.*;
|
import static org.mockito.Mockito.*;
|
||||||
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.time.ZonedDateTime;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -136,15 +134,14 @@ public class AhaWasteCollectionHandlerTest {
|
|||||||
}).when(executorStub).execute(any(Runnable.class));
|
}).when(executorStub).execute(any(Runnable.class));
|
||||||
|
|
||||||
final AhaWasteCollectionHandler handler = new AhaWasteCollectionHandler(thing, createStubScheduler(),
|
final AhaWasteCollectionHandler handler = new AhaWasteCollectionHandler(thing, createStubScheduler(),
|
||||||
ZoneId::systemDefault, new AhaCollectionScheduleStubFactory(), executorStub);
|
new AhaCollectionScheduleStubFactory(), executorStub);
|
||||||
handler.setCallback(callback);
|
handler.setCallback(callback);
|
||||||
handler.initialize();
|
handler.initialize();
|
||||||
return handler;
|
return handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static State getDateTime(final Date day) {
|
private static State getDateTime(final Date day) {
|
||||||
final ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant(day.toInstant(), ZoneId.systemDefault());
|
return new DateTimeType(day.toInstant());
|
||||||
return new DateTimeType(zonedDateTime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2010-2024 Contributors to the openHAB project
|
* Copyright (c) 2010-2025 Contributors to the openHAB project
|
||||||
*
|
*
|
||||||
* See the NOTICE file(s) distributed with this work for additional
|
* See the NOTICE file(s) distributed with this work for additional
|
||||||
* information.
|
* information.
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user