You can either use an incoming value transformation (i.e. via map) on the channel which will change the values the item receives or a state description on the item which would only be visual though.
I think you would be looking for the first option.
Thing data I3_2 [ readStart="2", readValueType="bit", readTransform="JS:modbus_contact.js"]
transform/modbus_contact.js
(function(inputData) {
var out = inputData ;
if (inputData == 'OPEN') {
out = 'CLOSED' ;
} else if (inputData == 'CLOSED') {
out = 'OPEN' ;
}
return out ;
})(input)
its ok? when add ', readTransform=“JS:modbus_contact.js” ’ to things, input is not reading…