MODBUS - Issue using UI based Write Transform

OpenHAB version: 5.0.1
JRE: OpenJDK Runtime Environment Zulu21.44+17-CA (build 21.0.8+9-LTS)

I thought I would try migrate some remaining transformations into the UI (currently sitting in the /etc/openhab/transform folder), by deleting the js files in that folder and recreating them via the UI.

I have done this for channel transforms previously, and these work just fine via the UI. The remaining transform files however are used by the Modbus binding as write transforms within the thing itself, aka:

My transforms work fine when located in the directory, but if I delete them, and recreate in the UI (and update the config), I get the following error:

2025-08-27 11:00:43.304 [WARN ] [ernal.handler.ModbusDataThingHandler] - Cannot process command STOP (of type StopMoveType) with channel modbus:data:greenventcoils:greenventCo0:rollershutter since transformation was unsuccessful
2025-08-27 11:00:44.311 [WARN ] [nelTransformation$TransformationStep] - Failed to use TransformationStep{serviceName='CONFIG', function='js:greenhouseventeastwrite'}, service not found

I have tried various combinations of the configuration to use a ‘UI Based’ transform, e.g.

  • config:js:greenhouseventeastwrite
  • CONFIG:JS:greenhouseventeastwrite
  • js:greenhouseventeastwrite
  • JS(greenhouseventeastwrite)
  • And many other random variants, based on various posts in this community

So I guess my 2 questions are:

  • Is a UI-based/created transformation supported for a Modbus Read/Write transform, or is it file-based script only?
  • And if so, what is the correct format for the UI thing config, to use a UI created transform?

Cheers

It’s been some time since I checked last time, and am not sure myself.
Yes it’s confusing and worse even has been undergoing quite pivots during OH4 development.

I believe both should work, UI and file based.
For UI you need to refer to the transformation name you give in UI like

For file based, it would need to refer to the filename in the transform directory like so
JS(greenhouseventeastwrite.js

Cheers for the response @mstormi, and helping me put my mind at ease that I wasn’t trying to do something completely crazy. I tried a few more combinations with no success, so have now logged a bug for the Modbus add-on: [modbus] UI based write Transform not working · Issue #19270 · openhab/openhab-addons · GitHub

Thanks again.