This automation bundle is openHAB-JSSR223 compliant and allows you to write your script in Java.
IMPORTANT : THIS TOPIC / BUNDLE IS A LEGACY VERSION, KEPT FOR COMPATIBILITY WITH OPENHAB 4. No support. Please update to openHAB5.
Alpha release, no “published” tag. Published ! Many thanks to you if you want to test.
Comments welcome.
Main feature:
- full JSR 223 support (use in files, in GUI, transformations, inline rule action, etc…)
- auto injection of OpenHAB variable/preset for simplicity
- library support for sharing code (.jar and .java)
- rule annotations available in the helper library for creating rules the easiest way
- helper library files auto generation for items, things, and actions, with strong typing and ease of use
- cache compiled scripts in memory for blazingly fast executions after the first one (sub millisecond overload)
- no boilerplate code for simple script: you can do a one liner script, as declaring a class and a method is optional.
- optional reuse of instances script to share values between execution occurrences
- designed to be easily used with your favorite IDE, with very little configuration
How to use it ? See documentation on the last link of this post.
Changelog
Version BETA2
- fix: remove generic parameters in generated getMethod() reflection call (thanks Ardanedh)
- fix: Wrong ChannelEvent parameter type
- new parameter (startupGuardTime) for delaying helper generation at startup if the file already exists
Version BETA1
- makes action initialization more reliable
- allow custom rule uid
- accomodate around the new openHAB functionnality “compile once” by still allowing cache invalidation when a lib changes
Version ALPHA1
- initial release
