Statusupdate nikobus after button press

Hi,

I’m running the Nikobus binding successfully for some time now. I now started configuring the physical buttons in my items file as it allows the openhab to automatically poll the correct Nikobus modules after a button(wall switch) press in order to keep the status of the lights and blinds in sync.

The function is great and uses following layout
Switch myButton {nikobus="[-, -, …]"}

However I found one error when using it with dim modules. When programming the dimming modules there is a minimum dimming time of 1 second (can be configured higher).
This means that when you press a light switch on the wall to turn on the light on a dim module it programmed to gradually turn on over the period of 1 second. Same when turning light off. It will dim from current state to 0 over 1 second.

Zhen the physical button is configured in Openhab and the wall switch is pushed Openhab will poll the state of the full module (half of it actually) right after the button is pushed. At this moment the light is still dimming.

So when turning off a light with a wall switch that is on a dim module, openhab will get the state of 25% of 30% for example instead of the 0% because it’s polling while still dimming.

Has anyone else come across this issue and found a way to solve this or found a work around.

One very quick and dirty way is to add 5 times the same -, after each other in the button config, so OPenhab polls five times in a row and by the time the last poll is done the light will actually be on 0%.

But don’t like this too much as it blocks and floods the bus.

Thanks in advance