-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
Sitemap: Add parameters to control slider behavior #3430
Comments
@openhab/core-maintainers Can you comment in this issue? The current behavior of the sliders in the Android app is causing issues for some users and I want to fix it the right way. IMO the right way are two new parameters in the sitemap syntax, similar to the slider parameters in Main UI. |
Adding a |
If default is option 2, the most impacted UI would then be Basic UI and this will require someone to implement the change. |
For setpoints (and roller shutters), it's only a detail view, the up/down buttons are the default. openhab/openhab-android#3247 has a screenshot of it. |
That seems like a good compromise 👍
The detail view of the Setpoint widget has been implemented in the Android app years ago and AFAIK users really like it. Maybe enhance Basic UI, but that's a bit off-topic here.
As you said I think it's a good idea to use this as fallback. |
I can easily enhance the sitemap syntax to add this new parameter. I suppose we also need to enhance the REST API response? |
Yes, the REST API needs to be enhanced as well. I don't have a strong opinion on the default setting. |
How about my option 3 mentioned above? |
I am going to create the core PR enhancing the sitemap syntax and the REST API. |
Related to openhab#3430 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Related to #3430 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@maniac103 @mueller-ma : did you already start something in Android app for this new option ? |
No, I haven't started implementing it. Is this already supported by the Main UI Sitemap generator? |
I just searched and did not find any PR for that |
@mherwege : any chance that you add this new attribute in the sitemap generator ? |
Yes, I will. |
See openhab/openhab-core#3430 Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
See openhab/openhab-core#3430 Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
See openhab/openhab-core#3430 Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
I forgot about it, but I did already create the PR for it in the sitemap creator: openhab/openhab-webui#2345. It has been merged a while already. |
Fix openhab#2525 Also related to openhab/openhab-core#4084 and openhab/openhab-core#3430 Two behaviour modes are now supported. - If releaseOnly attribute is set, the new value is sent to the item only when the slider is released. - If releaseOnly attribute is unset, new values are sent to the item while moving the slider. Events are sent at a certain frequency, this frequency is defined by the sendFrequency attribute if set or every 200 ms by default. Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Fix openhab#2525 Also related to openhab/openhab-core#4084 and openhab/openhab-core#3430 Two behaviour modes are now supported. - If releaseOnly attribute is set, the new value is sent to the item only when the slider is released. - If releaseOnly attribute is unset, new values are sent to the item while moving the slider. Events are sent at a certain frequency, this frequency is defined by the sendFrequency attribute if set or every 200 ms by default. Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Fix openhab#2525 Also related to openhab/openhab-core#4084 and openhab/openhab-core#3430 Two behaviour modes are now supported. - If releaseOnly attribute is set, the new value is sent to the item only when the slider is released. - If releaseOnly attribute is unset, new values are sent to the item while moving the slider. Events are sent at a certain frequency, this frequency is defined by the sendFrequency attribute if set or every 200 ms by default. Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@kaikreuzer : in my proposed implementation for Basic UI, I reused the existing parameter I will be in favour of using this parameter |
Fix openhab#2525 Also related to openhab/openhab-core#4084 and openhab/openhab-core#3430 Two behaviour modes are now supported. - If releaseOnly parameter is set, the new value is sent to the item only when the slider is released. - If releaseOnly parameter is not set, new values are sent to the item while moving the slider. Events are sent at a certain frequency, this frequency is defined by the sendFrequency parameter if set or every 200 ms by default. Event is not sent when the value is is unchanged (when stopping the move but keeping the mouse pressed). The brightness slider of the colorpicker widget is also updated to send regular new color commands when moving the slider. Signed-off-by: Laurent Garnier <lg.hc@free.fr>
We hard coded it (to 200ms). I don't see a compelling reason for making this configurable - do you? |
Maybe some devices do not accept commands at such frequency? But if you all think it is useless, I will also keep the hardcoded value of 200ms in Basic UI and remove this parameter from the syntax. |
I think the 200ms is fine and I do not remember that anybody ever asked to have it configurable. So I'd go the simple way and simply leave it at this default and remove the parameter from the syntax. |
I already removed the usage of this parameter from my PR. |
Fix #2525 Also related to openhab/openhab-core#4084 and openhab/openhab-core#3430 Two behaviour modes are now supported. - If releaseOnly parameter is set, the new value is sent to the item only when the slider is released. - If releaseOnly parameter is not set, new values are sent to the item while moving the slider. Events are sent at a certain frequency, this frequency is defined by the sendFrequency parameter if set or every 200 ms by default. Event is not sent when the value is is unchanged (when stopping the move but keeping the mouse pressed). The brightness slider of the colorpicker widget is also updated to send regular new color commands when moving the slider. Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Remains documentation to update. |
@openhab/core-maintainers : I believe we can now close this feature request as implemented. Only support in iOS app is not yet done. |
Let's try the new issue template (#3427):
Is your feature request related to a problem? Please describe.
In openHAB two different behavior exist for sending updates:
I tested these sliders:
Option 2 is good for things that can change quickly, e.g. brightness or volume, but not for rollershutters as they cannot move so fast. This option may also cause issues when too many updates are sent in a short time, e.g. here: openhab/openhab-android#3241
Describe the solution you'd like
Add two new parameters to the Slider, Color and Setpoint widgets, similar to those in the
oh-slider-card
widget in Main UI:The Color widget may have a slider for brightness and the Setpoint widget has a bottom sheet with a slider on Android.
Describe alternatives you've considered
Additional context
https://community.openhab.org/t/define-slider-behavior/144714
Coordination between maintainers
Notify maintainers of other UIs:
@openhab/webui-maintainers
@openhab/android-maintainers
@openhab/ios-maintainers
Checklist for implementation:
The text was updated successfully, but these errors were encountered: