-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[modbus] Do not process values from channel if configured transformation service is unavailable (during startup) #16847
Comments
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 |
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 ( |
@dandjo if the scale is wrong, we could try to fix this using bare UoM. No transformation service might be needed at all. Since 4.2.0 the persistence services UoM support has been greatly enhanced. It should now be possible to store, show and calculate in your unit of choice. If you need help to adapt, please state your item labels, scripts and persistence configuration. |
I have moved away from JS, you can see some discussions in this post: |
Have not read everything, can I assume this issue is fixed / no longer relevant? If so please close it otherwise add details so we can work on this together. |
@lsiepel it is relevant and not fixed. Using UoM is the wrong approach, since some transformations are more complex for certain Modbus data. The behavior of |
@jimtng in #17306 this transformation was adapted to support chaining, while related it does not fix this issue. So i was looking into this again. |
When I migrated it to use ChannelTransformation, I retained the original behaviour of the binding. It passes through the data unmodified when the transformation failed. Since I don't use modbus binding myself, I'm not sure why it was designed this way originally. #17457 will discard the data now, but I need testers to make sure that this doesn't break something. |
@dandjo would you be able to test? |
@jimtng I cannot recall either why it was built this way originally. |
For those who can test, I've posted a jar file here #17457 |
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
The text was updated successfully, but these errors were encountered: