[SOLVED] Strange Switch press behaviour

Hello, the switch behaviour is kind of funky. Is there any way to toggle a switch “once” when pressing instead of having it move tot the right, to the left, and then to the right again?

I recorded my screen to show what I try to say: https://imgur.com/a/OjQ7MhL

Can you post the items definition of this switch? Does this happen to all switches or only this one? And can you try it in demo mode?
Can you also try it with the beta version and are there any messages about impaired widget refresh?

Could you post your events.log of this sequence?

Thanks for your quick replies.

Does this happen to all switches or only this one?

Yes, except for the group “Sfeerlampen”, when turning it off. When turning it on, the animation happens normally. Interesting detail: I found out now that it only happens when pressing the toggle button. When I press the light bulb icon on the left, it switches “once”, just like you’d expect normally.

And can you try it in demo mode? Can you also try it with the beta version and are there any messages about impaired widget refresh?

Normal behaviour in demo mode, same wrong behaviour with beta version.

Can you post the items definition of this switch?

Sure I can do that:

openhab2/items/items.items:

Group:Switch:OR(ON,OFF) sfeerlampen "Sfeerlampen"
Switch woonkamerlamp_muur "Woonkamerlamp muur" (sfeerlampen) { channel="mqtt:topic:apparaten:woonkamerlamp_muur", ga="Light" }
Switch woonkamerlamp_kast "Woonkamerlamp muur" (sfeerlampen)  { channel="mqtt:topic:apparaten:woonkamerlamp_kast", ga="Light" }
Switch marokkaanse_lamp_klein "Marokkaanse lamp klein" (sfeerlampen)  { channel="mqtt:topic:apparaten:marokkaanse_lamp_klein", ga="Light", synonyms="kleine marokkaanse lamp"}
Switch marokkaanse_lamp_groot "Marokkaanse lamp groot" (sfeerlampen)  { channel="mqtt:topic:apparaten:marokkaanse_lamp_groot", ga="Light", synonyms="grote marokkaanse lamp"}

Switch ganglamp "Ganglamp" { channel="mqtt:topic:apparaten:ganglamp", ga="Light", synonyms="lamp op de gang"}

Switch koffiezetapparaat "Koffiezetapparaat" { channel="mqtt:topic:apparaten:koffiezetapparaat", ga="Coffee_Maker"}

Switch telefoon "Telefoon" { channel="network:pingdevice:telefoon:online" }

Number hoogte_zon "Hoogte van de zon"   { channel="astro:sun:local:position#elevation" }
Number AlarmClock

Could you post your events.log of this sequence?

2020-04-07 23:29:42.665 [ome.event.ItemCommandEvent] - Item 'ganglamp' received command ON
2020-04-07 23:29:42.812 [nt.ItemStatePredictedEvent] - ganglamp predicted to become ON
2020-04-07 23:29:42.927 [vent.ItemStateChangedEvent] - ganglamp changed from OFF to ON

Thankyou.
Assuming that is the whole show, that all appears normal.
The kind of visual effect you described is sometimes seen with e.g. zwave devices, which can give updates of “old” status after command, before eventually the “new”.
No sign of that here.

Although your host system is quite slow … taking 300mS to respond to the command and actually update the Item is long enough to cause a visible lag at your UI.

Have you tried cleaning the browsers cache on whatever device your using?

Although your host system is quite slow

Yes, it’s running on a first-generation Raspberry Pi so perhaps that causes this issue. Is there any way to stop OpenHab from “predicting” the switch’s status OR from delaying the status update? As I believe that this might work around the issue

Have you tried cleaning the browsers cache on whatever device your using?

The behaviour you’re seeing is on the Android app. Although it’s the same when using the Basic UI in a website, also after clearing the cache.

Sure, disable autoupdate for any Items affected.

Sure, disable autoupdate for any Items affected.

Thanks! That seems to have done the trick. It works as expected except for the group item Sfeerlampen

You won’t find any predictions for Group Items to be stopped. Group Item states are calculated from member states only.

That explains!