openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

[velux] incorrect updating of limitMinimum and limitMaximum channels #15087

Closed Chiuaua79 closed 1 year ago

Chiuaua79 commented 1 year ago

When changing the position of an actuator (window, rollershutter, etc.) that has an item linked limitMinimum or limitMaximum channel, the binding shortly also updates these channels to the value of the position channel. However, the values for the limitMinimum and limitMaximum channels are not communicated by the bridge in one message with the position, but have a different API call.

Expected Behavior

Only GW_LIMITATION_STATUS should update the limitMinimum and limitMaximum channels.

Current Behavior

The binding iterates over all the linked channels when a GW_NODE_STATE_POSITION_CHANGED is received and updates all channels of a Thing, although according to the API of the Velux KLF 200, GW_NODE_STATE_POSITION(_CHANGED) does not give information about limitMinimum or limitMaximum. Only GW_LIMITATION_STATUS does.

Possible Solution

The function syncChannelsWithProducts() in VeluxBridgeHandler.java should receive an additional "if" filter, to filter out the limitMinimum and limitMaximum channels.

Context

limitMinimum is an indication if the rain Sensor on a window has triggered, which sets the limitMinimum to prevent rain entering the house.

Your Environment

Openhab 3.4.4 running on Debian Bullseye with OpenJDK 11.

openhab-bot commented 1 year ago

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/velux-new-openhab2-binding-feedback-welcome/32926/1546