Edit: The below issue is solved by removing the “_” from the item names.
I’m having a problem with getting my transformation scripts to run when I use them in item configuration lines. The scripts works fine when I use them in the things configurations, but are never called when I use them in the item configurations.
With this configuration line, the script is called and works fine.
Thing data T07 [ readStart="207", readValueType="int16", readTransform="JS:gain-0.01.js" ]
With this configuration line, the script is never run. The item get’s updated with the raw value. Not the corrected value.
Number:Temperature Nilan_T07 "Nilan - Temperatur - T07 [%.1]" { channel="modbus:data:nilan30-dr302:inputRegisters:T07:number" [profile="transform:JS", function="gain-0.01.js"] }
For the modbus items it’s not a big deal as I can do the transformation in the things configuration, but for the PLCLogo items, it is a big deal as I can’t do the transformation in the things configuration.
The PLCLogo things is configured as follow
Thing analog LOGO8-Analog-Marker "LOGO8 Analog Marker" @ "" [ kind="AM", threshold=0, force=false ]
The PLCLogo item, which doesn’t work, is configured as follow
Number:Temperature Logo8_AM1 "AM1 [%.1]" { channel="plclogo:analog:LOGO8:LOGO8-Analog-Marker:AM1" [profile="transform:JS", function="gain-0.01.js"] }.
The item is updated with the raw value instead of the corrected value, just as with the item transformation line in the modbus binding.
Any who can tell me what I’m doing wrong and how I can do the value transformation I need to do?