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

(function(i)
{

var logger = Java.type(“org.slf4j.LoggerFactory”).getLogger(“myScript”);
logger.warn(i);
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
}
}
})(input)

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
configuration:
authMode: BASIC
ignoreSSLErrors: true
baseURL: http://192.168.1.52/
delay: 0
stateMethod: GET
refresh: 5
commandMethod: POST
contentType: application/json
timeout: 3000
bufferSize: 2048
channels:

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

The transformation is:

(function(i)
{
var logger = Java.type(“org.slf4j.LoggerFactory”).getLogger(“myScript”);
logger.warn(“test”);

    return "5";

})(input)

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

Channel1
RolladenSchlafzimmerOst
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?