Holger Friedrich
cf21184c1b
Update plugins ( #16683 )
...
* update multiple dependencies
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-29 12:24:45 +02:00
Florian Hotze
66e8d7dc94
[jsscripting] Fix memory leak on script execution failure ( #16578 )
...
Make engineIdentifier a instance field to ease debugging.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-27 21:43:07 +01:00
Florian Hotze
3ca4b4f749
[jsscripting] Upgrade to openhab-js 4.9.0 ( #16576 )
...
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-25 21:11:24 +01:00
Florian Hotze
6139368d83
[jsscripting] Fix multi-thread access requested by logger initialization ( #16497 )
...
* [jsscripting] Fix multi-threading issue with logger initialization
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-07 18:49:34 +01:00
Florian Hotze
df7a57af96
[jsscripting] Improve logging on JS error ( #16445 )
...
* [jsscripting] Improve script error logging
* [jsscripting] Suppress some warnings
* [jsscripting] Throw ISE instead of RE
* [jsscripting] Minor null annotation improvements
Include fileName or ruleUID or transformation UID in the logger name used by the logged error stack trace.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-25 00:39:57 +01:00
Florian Hotze
c9926ccc47
[jsscripting] Upgrade openhab-js to 4.8.1 ( #16353 )
...
* [jsscripting] Upgrade openhab-js to 4.8.0
Changelog: https://github.com/openhab/openhab-js/blob/main/CHANGELOG.md#480
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-01 10:22:09 +01:00
Jacob Laursen
f4596f581e
Update license headers to 2024 ( #16168 )
...
* Update copyright year in configuration
* Update license headers
* Manually update nibeheatpump headers (.cpp/.h/.ino)
* Manually update smsmodem header
* Manually update hueemulation header
* Manually update addon-header.xml header
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-01-01 18:14:57 +01:00
Florian Hotze
6540d0dda9
[jsscripting] Upgrade openhab-js to 4.7.3 ( #16112 )
...
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-25 23:52:59 +01:00
Florian Hotze
20a6eee4b5
[jssscripting] Fix JS Quantity to Java QuantityType conversion ( #16106 )
...
Regression from https://github.com/openhab/openhab-js/pull/312 .
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-25 15:09:00 +01:00
Holger Friedrich
533cc666ab
Apply spotless after release ( #16097 )
...
* Apply spotless after release
* itests: resolve bundles
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-22 23:30:38 +01:00
openhab-bot
83e0485219
[unleash-maven-plugin] Preparation for next development cycle.
2023-12-22 14:37:48 +00:00
Florian Hotze
7d7acb5dbf
[jsscripting] Upgrade openhab-js to 4.7.2 ( #16072 )
...
Fixes a minor issue introduced by openhab-js 4.7.1.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-17 12:17:38 +01:00
Florian Hotze
63d71f4865
[jsscripting] Upgrade openhab-js to 4.7.1 ( #16069 )
...
You'll find the changelog at the openhab-js repo: https://github.com/openhab/openhab-js/blob/main/CHANGELOG.md#471 .
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-16 13:50:41 +01:00
Florian Hotze
7b16ef1de8
[jsscripting] Upgrade openhab-js to 4.7.0 ( #16062 )
...
You'll find the changelog at the openhab-js repo: https://github.com/openhab/openhab-js/blob/main/CHANGELOG.md#470 .
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-14 20:23:37 +01:00
openhab-bot
62f9f03bbf
New Crowdin updates ( #15931 )
...
* New translations openwebnet.properties (Italian)
* New translations jsscripting.properties (Danish)
* New translations hdpowerview.properties (Danish)
2023-11-20 12:30:32 +01:00
Holger Friedrich
f24a4305b8
Improve javadoc for some addons ( #15701 )
...
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-10-08 00:25:04 +02:00
Holger Friedrich
cbf4411034
Improve javadoc for all addons ( #15667 )
...
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-09-30 21:49:12 +02:00
openhab-bot
5012381f08
New Crowdin updates ( #15653 )
...
* New translations netatmo.properties (Italian)
* New translations danfossairunit.properties (Danish)
* New translations jsscripting.properties (Italian)
2023-09-29 22:19:03 +02:00
Florian Hotze
99f0512c73
[jsscripting] Rename library injection parameter & Improve docs ( #15547 )
...
* [jsscripting] Rename parameter useIncludedLibrary to injectionCachingEnabled (#4 )
* [jsscripting] Improve README for cached library injection
* Remove settings image
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-26 22:59:20 +02:00
Holger Friedrich
5b42c4b071
Java 17 features ( #15493 )
...
- add missing @override
- Java style array syntax
- remove redundant modifiers
- always move String constants to left side in comparisons
- simplify lambda expressions and return statements
- use replace instead of replaceAll w/o regex
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-08-26 08:52:11 +02:00
Holger Friedrich
7b90fbe162
[automation] Use Java 17 features ( #15484 )
...
* [automation] Code optimization for Java17: instanceof matching and multiline strings
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* [automation] Make use of Java17 features
Use Map/Set/List.of instead of Collections.
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
* review comment
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
---------
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-08-23 17:27:40 +02:00
Wouter Born
c71a24f8a1
Link to Java 17 documentation ( #15406 )
...
This prevents issues because older documentation may not apply to Java 17.
Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-13 13:44:05 +02:00
voruti
faceef6fd4
Fix missing cast ( #15356 )
...
Signed-off-by: Till von Rüden <dev@tillvonrueden.de>
2023-08-06 10:43:06 +02:00
Florian Hotze
bf7f24c099
[jsscripting] Upgrade openhab-js to 4.5.1 to fix cached injection ( #15336 )
...
It was found out that a recent change to the webpack config for the library injection bundle heavily affected performance of the evaluation of the cached injection.
openhab-js 4.5.1 fixes that regression and one minor bug, see https://github.com/openhab/openhab-js/blob/main/CHANGELOG.md#451 .
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-30 14:47:03 +02:00
Florian Hotze
e1c9213cfc
[jsscripting] Fix timerId not returned by JS timer methods ( #15308 )
...
Regression from #15193 .
Reported on the community, see https://community.openhab.org/t/openhab-4-0-release-discussion/147957/53?u=florian-h05 .
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-26 16:28:46 +02:00
Kai Kreuzer
72607d3bee
Apply spotless
...
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-07-24 01:20:31 +02:00
openhab-bot
809fceaff3
[unleash-maven-plugin] Preparation for next development cycle.
2023-07-23 19:19:01 +00:00
Florian Hotze
72c0e1f29f
[jsscripting] Upgrade openhab-js to 4.5.0 ( #15219 )
...
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-10 23:15:04 +02:00
Florian Hotze
2d75536f48
[jsscripting] Implement NodeJS-like parameter handling for timer polyfills ( #15193 )
...
* [jsscripting] Implement NodeJS-like param handling for timer polyfills
* [jsscripting] Clean-Up ThreadsafeTimer methods
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-07 23:10:35 +02:00
Florian Hotze
828c895b54
[jsscripting] Bump openhab-js version to 4.4.0 ( #15128 )
...
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-06-20 15:40:11 +02:00
Florian Hotze
aa3d6b0dc9
[jsscripting] Add type translation for Instant
& Minor improvements ( #14984 )
...
* [jsscripting] Minor code improvements
* [jsscripting] Add type mapping for `Instant`
* [jsscripting] Upgrade openhab-js to 4.3.0
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-13 12:25:06 +02:00
J-N-K
d9c12ca659
[jsscripting] Allow configuring from add-on page ( #14985 )
...
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-13 12:21:14 +02:00
openhab-bot
4a2c3a35ba
New Crowdin updates ( #14957 )
...
* New translations astro.properties (French)
* New translations sonos.properties (French)
* New translations jsscripting.properties (Danish)
2023-05-09 13:09:40 +02:00
Jacob Laursen
e73650366c
Fix automation name/description ( #14890 )
...
Declare automation connection
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2023-04-28 08:30:13 +02:00
Florian Hotze
03b305bde2
[jsscripting] Bump openhab-js to 4.2.1 ( #14749 )
...
* [jsscripting] Upgrade openhab-js to 4.2.1
* [jsscripting] Note that it is based on GraalJS
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-04-06 15:50:09 +02:00
openhab-bot
bb626768e4
New Crowdin updates ( #14725 )
...
* New translations jsscripting.properties (German)
* New translations jsscripting.properties (Italian)
2023-03-30 23:37:14 +02:00
Richard Koshak
7bddeb4a7f
Standardize on js
for SCRIPT ( #14652 )
...
This has the add-on docs consistent with the main docs.
Signed-off-by: Richard Koshak <rlkoshak@gmail.com>
2023-03-23 21:53:16 +01:00
Florian Hotze
726858b4f1
[jsscripting] Upgrade openhab-js to 4.1.0 ( #14495 )
...
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-02-25 10:18:49 +01:00
J-N-K
223deffcfd
[jsscripting] Fix node_modules handling ( #14398 )
...
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-02-18 19:53:33 +01:00
J-N-K
9a05e9f3b5
[jsscripting] Fix JSScriptFileWatcher not ignoring correct directory ( #14393 )
...
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-02-15 10:33:00 +01:00
Florian Hotze
ce2e76d6ee
[jsscripting] Bump openhab-js to 4.0.0 & Clean-Ups ( #14375 )
...
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-02-14 21:19:59 +01:00
J-N-K
d613641bbd
Adapt addons to core watch service changes ( #14004 )
...
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-02-13 16:37:57 +01:00
Florian Hotze
d2db49ff67
[jsscripting] Extend mapping of openhab-js classes to native openHAB counterparts ( #14335 )
...
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-02-12 11:53:51 +01:00
J-N-K
5f8214f08a
Adapt to core changes (addon.xml) ( #13289 )
...
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-15 20:31:42 +01:00
J-N-K
6aa0dcbc70
[scripting] Adjust to core changes ( #14043 )
...
* [scripting] Adjust to core changes
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-12 22:23:20 +01:00
Jacob Laursen
4dd6d3a8a2
Update license headers to 2023 ( #14154 )
...
* Update copyright year in configuration
* Update license headers
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2023-01-06 09:49:54 +01:00
Florian Hotze
b91fc94bdb
[jsscripting] Update docs for code caching ( #14166 )
...
... and fix the table of contents.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-01-05 23:04:07 +01:00
Florian Hotze
f082df923f
[jsscripting] Fix regressions from #14135 & Log stack on IllegalArgumentException
( #14142 )
...
* [jsscripting] Fix bundling of global script & regression from #14135
Fixes the regression from https://github.com/openhab/openhab-addons/pull/14135#issuecomment-1369231126 .
While working on this, I also noticed that the cache openhab-js does not work because of wrong webpack commandline args in the pom (wrong entrypoint).
* [jsscripting] Enable stack logging for IllegalArgumentExceptions
* [jsscripting] Upgrade openhab-js to 3.2.4
* [jsscripting] Update README for recent PR
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-01-03 20:45:23 +01:00
Florian Hotze
3c669ad77a
[jsscripting] Cache openhab-js injection to improve performance ( #14135 )
...
* [jsscripting] Extend comments for wraprequire
* [jsscripting] Enable openhab-js caching to improve performance
On my dev system (which I guess is much more powerful than most openHAB servers), cached openhab-js injection takes 100-200 ms.
openhab-js injection from file system takes about 1000 ms.
* [jsscripting] Update configuration language
* [jsscripting] Upgrade openhab-js version to 3.2.1 for required webpack changes
Documentation updates will follow in another PR to keep this one clean.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-01-02 20:41:35 +01:00
Florian Hotze
23cfec7684
[jsscripting] Improve performance & reduce memory usage ( #14113 )
...
* [jsscripting] Share org.graalvm.polyglot.Engine across all OpenhabGraalJSScriptEngine instances
See https://github.com/oracle/graaljs/issues/121#issuecomment-880056648 , it is not required to have one engine per GraalJSScriptEngine.
This might improve performance a bit on less powerful systems (Raspberry Pi) and decreases heap usage:
With 5 GraalJS UI scripts, heap usage is now below 100 MB. Before this change, it was over 100 MB.
* [jsscripting] Extend debug logging
* [jsscripting] Cache `@jsscripting-globals.js` across all engines
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2022-12-30 23:34:35 +01:00