openhab-android icon indicating copy to clipboard operation
openhab-android copied to clipboard

Slider: Send state while holding

Open mueller-ma opened this issue 7 years ago • 1 comments

I'm not sure if thats a good idea (because of the traffic), but I think its better, when the slider item is change, while the user is sliding.

mueller-ma avatar Jan 18 '18 19:01 mueller-ma

Traffic can be reduced by using a timeout: only send update if slider is not moved (but still held down) for e.g. 100ms.

maniac103 avatar Mar 06 '18 19:03 maniac103

Code is done (https://github.com/mueller-ma/openhab.android/commit/a385626c3f60ad4153e5cea760e6af019667ccb8), but this causing tons of request, which is too much for e.g. the Tradfri binding. I'd close this feature request therefore.

mueller-ma avatar Dec 05 '22 19:12 mueller-ma

I think you'd rather want to send after a timeout, say 100ms ... basically send if there's no value change after 100ms while still tracking. Edit: Heh, I just noticed I wrote the same thing 4 years ago already ... doesn't invalidate the point though ;-)

maniac103 avatar Dec 05 '22 19:12 maniac103

I added a timer, but a bit different: While sliding send updates not more frequently than every second.

https://github.com/openhab/openhab-android/compare/main...mueller-ma:openhab.android:654-slider

mueller-ma avatar Dec 05 '22 20:12 mueller-ma