Open dandjo opened 1 month ago
Looks very similar to openhab/openhab-core#3763
@lolodomo True, especially 3763#1745267997 comment nails the issue.
This issue has been mentioned on openHAB Community. There might be relevant details there:
https://community.openhab.org/t/oh4-transformationservice-of-type-js-is-unavailable/148786/21
@lolodomo @kaikreuzer Are there any ideas on how to solve this? Is it even possible to influence the order? Is there a dependency management for this?
This is not a core issue. The SingleValueTransformation
is implemented in the modbus-addon. The core ChannelTransformation$TransformationStep
is correctly returning an empty Optional
for a missing transformation service. I'll move this to openhab-addons.
Has anybody found a solution to this? It's really bothering at least for modbus add-on (which ususally requires read/write transforms)
I found a workaround, which is not really satisfying, but solves the issue atm. I created a transformation script of the same type which I am using in the thing transformation (JS:|input
in my case). This transformation is added as thing > item transformation in the channel. In my case it is a simple passthrough of the value, but rendered through the transformation. The result is an error when the transformation service is unavailable but without passing the raw value to the item.
Expected Behavior
Consistent value range for items.
Current Behavior
When starting or restarting openHAB, services like ModBus poll data from server ignore transformation services (here: JS) when they are not ready. This results in values out of usual value range destroying average calculations and representations (e.g. in Grafana - see screenshot).
Possible Solution
Ignore values from Thing channel when transformation is configured but not available or initialize transformation services earlier or before Things.
Steps to Reproduce (for Bugs)
Your Environment