Change MIME Type of application/javascript before migration to Openhab 3.4.4 --> 4.0.0?

You should upgrade to the 4.0 version. However that will require the GraalVM add-on to be installed as well as the openhab_rules_tools library to be installed (from the $OH_CONF/automation/js folder run npm install openhab_rules_tools which is discussed in the readme for the 4.0+ version of the rule template.

All but one of my rule templates have been rewritten for GraalJS.

To upgrade, once you are on OH 4, remove the Debounce rule template, refresh the page (I don’t know if that is for sure required but it wouldn’t hurt) and then add it back. It should only show the 4.0+ version of the template after refreshing the page.

It is not super well tested, but I did go to some effort to make those older versions of the rule template work with both Nashorn and GraalJS. Consequently, as long as you have the JS Scripting add-on installed, the 3.x version of the template should work.

But the rewrite version for 4.0+ is a much better implementation with way better error checking and reporting and takes advantage of all the new stuff in GraalJS which makes the code way simpler and easier to maintain.

No, if you leave it as application/javascript the GraalJS add-on will run it. But that should be OK because I wrote those rule templates to work with either engine. But I do strongly recommend upgrading. You existing Items and metadata should work as is. I don’t think I changed anything for that template.

Not in my experience. 2->3 had tons and tons of breaking changes and way more of them were user facing. YMMV. But a major version upgrade is always going to be way more work than a minor version update because major breaking changes are only allowed for major version updates.

1 Like