JSR223/Jython scripting in Openhab 3.1 (Docker)

Give JRuby a try. I didn’t know the Ruby language before I started using it almost a year ago. The Jruby automation has just been officially added to OH 3.2, so it will be available in the next milestone or release. OH 3.1 is supported (and being tested for) too but you’ll need to download the addon jar file manually and drop it in the addons folder. When using docker, you can map the addons folder as a volume.

There’s a jruby helper library where new features are constantly being added.

You can see examples of converting rules into jruby syntax in this thread:

3 Likes