MQTT Binding: JS Transformations not working after upgrade to OH4

Usually I manage to do the openhab upgrades, this time I seem to be stuck somehow.
I am using zigbee2mqtt with the mqtt binding. For the bulbs a javascript transformation is used. After upgrading to OH4, these transformations are not working anymore. Whenever triggering a such a Item / thing, I see this error in the logs:

2023-09-13 21:16:18.372 [WARN ] [t.generic.ChannelStateTransformation] - Transformation service JS for pattern openhabdimmer2zigbeebridge.js not found!

my mqtt.things file looks like this:

Bridge mqtt:broker:mosquitto "Mosquitto" @ "System" [ host="mosquitto", port="1883", secure="false", lwtMessage="I'm offline", lwtTopic="lwt/openhab", lwtRetain="true", username="openhab", password="XXXXXXXXXXXXXXXXXXX" ]
{
    Thing topic bulbHueKueche "Kueche Licht" @ "Kueche" {
	Channels:
        Type dimmer : brightness "Kueche Bulb Dimmer" [ stateTopic="zigbee2mqtt/bulb-hue-kueche", commandTopic="zigbee2mqtt/bulb-hue-kueche/set", min=0, max=100, step=1, transformationPatternOut="JS:openhabdimmer2zigbeebridge.js", transformationPattern="JS:tradfri2openhab.js" ]
		Type dimmer : color_temperature "Kueche Bulb ColorTemperature" [ stateTopic="zigbee2mqtt/bulb-hue-kueche", commandTopic="zigbee2mqtt/bulb-hue-kueche/set", min=50, max=100, step=1, transformationPatternOut="JS:openhabColorTemp2zigbeebridge.js", transformationPattern="JS:tradfriColorTemp2openhab.js" ]
		Type string : availability  [stateTopic="zigbee2mqtt/bulb-hue-kueche/availability", transformationPattern="JSONPATH:$.state" ]
	}
}

Reverting to 3.4.4 it’s working like a charm. Is there anything I missed?

Yes. As mentioned in the list of breaking changes you must install the JS Scripting add-on. The old separately installed JS Transformation no longer exists and JS no longer just comes with OH by default. If you want to use JS in a transform, you must install the add-on.

Thanks. Do you know how the add-on is named to list it in addons.cfg? I suppose it has to be added to the transformation=… line?

I have no idea what it’s called in addons.cfg or what line it goes on. I haven’t used addons.cfg for half a decade now. I assume you can still get the name of the addon that goes there from the URL of the readme.

I know it definitely doesn’t go on the transformation line. It’s not a transformation add-on, it’s an automation add-on.

Maybe automation="jsscripting" ?

Note, if you have “js” anything on the transformation line, you’ll be seeing errors in your logs and need to remove it.

Isn’t blockly installed by default and it relies on js and its helper library?

No, nothing gets installed by default any more, not even rrd4j. However, the first run wizard makes suggestions on some common add-ons to install which includes JS Scripting.

If JS Scripting is not installed, Blockly is not shown as an option. But it is true that it’s still there since it’s 100% implemented as part of MainUI and not really separate.