Issue updating Rollershutter value within OH3.1

Hi all,

I do use Rollershutter Items in combination with an http binding.
The http binding reads out the status of the RollerShutter each 3000 ms (get function).
The resulting json is parsed via JS Transform and this should update the value of the item.

Unfortunately it does no longer. (Same is working in OH2 without problems)

The JS Transform looks like


var logger = Java.type(“org.slf4j.LoggerFactory”).getLogger(“myScript”);
var json = JSON.parse(i);
for (i=0; i < json.length; i++)

var test = …
logger.warn("now set to "+test);
return test; <<< Test contains the right value between 0 and 100

However the item state still shows UNDEF.

Any ideas?
(same is working in OH2 without issues)

Thanks a lot for your help

Some more details:

I have simplified everything for debugging:

Thing: HTTP-Binding which triggers a JS Transformation

UID: http:url:RolladenSchlafzimmerOst
label: RolladenSchlafzimmerOst
thingTypeUID: http:url
authMode: BASIC
ignoreSSLErrors: true
delay: 0
stateMethod: GET
refresh: 5
commandMethod: POST
contentType: application/json
timeout: 3000
bufferSize: 2048

  • id: Channel1
    channelTypeUID: http:rollershutter
    label: Channel1
    description: “”
    stateExtension: deviceStatus
    stateTransformation: JS:getRollershutter_SchlafzimmerOst.js
    commandExtension: test
    downValue: ‘{“action”:1}’
    stopValue: ‘{“action”:2}’
    upValue: ‘{“action”:0}’

The transformation is:

var logger = Java.type(“org.slf4j.LoggerFactory”).getLogger(“myScript”);

    return "5";


In the openhab logs I can see that it is executed every 5 sec

The item is a Rollershutter Item which is connected to the channel

http:url:RolladenSchlafzimmerOst:Channel1 (Rollershutter)

Status is online. However the Rollershutteritem is not updated.
Via the item, I can send commands to the Rollershutter actor, so opening and closing is working but I cannot get the value of the item shown.

Any ideas?