-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
[3.1.0-SNAPSHOT] Slider triggering multiple ItemCommandEvents during sliding #1114
Comments
Hi Waldemar, I'm responding, since I'm probably responsible for this "issue". I reworked the sliders in #1012. Sending out multiple commands while sliding is actually the desired result. It allows e.g. to smoothly dim a lamp, instead of just jumping to a certain brightness. There is, however, a parameter to adjust this behaviour: While just testing this, I found a small disadvantage with high intervals: if you set it to very large intervals like 20 seconds and reset (click-move) the slider again after 10 seconds, it will take 10 more seconds until the second command gets sent. This is actually by design, as the update interval has been introduced to give slow things some time to reflect the command and never send two command in less time than the given interval. So, you should set it to an interval less than the time until you change the slider again. May I ask what actually your use case is, i.e. why you only want to have the commands to be send when you release the slider? |
Hello hubsif, I'm using the sliders to control the position of a Rollershutter. It would be more desirable to just send one Command to reduce the amount of unnecessary movements. Here is a video showing the Rollershutter being accessed through the UI. https://www.youtube.com/watch?v=783bv7xO8Zw |
Thank you, Waldemar. I know understand your situation. While I think your Rollershutter setup is somewhat special with that stopping and starting and such, a rollershutter is actually generally a good example where "smooth" sliding is not required - or maybe even undesired. I'm going to create a pull request that adds an additional parameter to sliders and knobs that can be used to disable the interim commands (like "Do not send commands while sliding" or "Only send command on release" - true/false). |
Rename interval parameter Fixes openhab#1114 Signed-off-by: Hubert Nusser <[email protected]>
Rename interval parameter Fixes openhab#1114 Signed-off-by: Hubert Nusser <[email protected]>
Add releaseOnly parameter to sliders Rename interval parameter Fixes #1114 Signed-off-by: Hubert Nusser <[email protected]> Also-by: Yannick Schaus <[email protected]>
The problem
Instead of sending one ItemCommandEvent when dragging a Slider connected with a Dimmer-Item,
with version
3.1.0-SNAPSHOT
, multiple ItemCommandEvents are generated.You can see the wrong Behaviour here:
https://youtu.be/ebjau8ZRULI
Expected behavior
One ItemCommandEvent should be sent out once user has stopped dragging the Slider.
You can see the behaviour as it was back in version
3.0.1-Release
here:https://youtu.be/eEW9369IZME
Steps to reproduce
3.1.0-SNAPSHOT
TestDimmer
)3.a Alternatively, use this Layout Definition:
Your environment
Browser console
Browser network traffic
Seems regular. POST-Requests with the new state in the POST-Body.
The text was updated successfully, but these errors were encountered: