Bug: Profile scripts never executed when item names contains "_"

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?

I can’t help with the root problem as I’m not interested in fighting text file syntax errors any more. But it will help those who may be able to help if you use code fences for your configs.

code goes here

I’m pretty sure that if it was a syntax error in my config file, I would have seen an error in the log, but I don’t. On top of that. The profile part of the config lines are made using copy and paste from the openhab documentation. The only thing I’ve changed is the name of the script.

Still not using code fences.

It’s three back ticks on a single line followed by the code followed by three back ticks to close it, just like in my post. It looks like you’ve tried to use - instead of ` .

why don’t you try helping me with my real problem instead of complaning about schematics?

Because the semantics matter. In some of the configs white space matters and when you don’t use code fences you lose the white space. Without the code fences even these config lines are really hard to read on a small screen.

I am helping you by making sure that someone who can help you can do so efficiently.

But you clearly seem to know best. Good luck!

I did some more trial and error and stumbled on the root cause for my issue. If the Item name has an _ in the name the profile doesn’t work. If I remove the _ it works. Like with the item name Logo8_AM1, no transformation is done, but when I change the item name to Logo8AM1, the transformation is done. This must clearly be a bug that needs to be fixed.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.