Status of group item not send to knx bus

Hi,

I have the the problem that the status of an group item is not send to the KNX bus. I want to use this type of configuration to implement a central control for all rollershutters. If I control the position from the KNX device all is updated correctly. Also if I control the Group item “gRolllaeden” from openhab. The problem exists only if one of the group member is controlled from OH or directly. Here the Group item AVG number updates in openHAB but will not be send to the KNX bus with the effect that the shown value on the KNX device is wrong. I had an work around until OH2 M1 release as follows:

rule “Rollläden Zentral”
when Item gRolllaeden changed
then
gRolllaeden.postUpdate(gRolllaeden.state)
end

with this rule the update was sent to the KNX bus. But with the latest Snapshot and M2 release I got strange errors as the status toggles all the time between two values. It would be great to get help how this can be implmented in an better way without this strange behaviour.

KNX Group item configuration:
Group:Rollershutter:AVG gRolllaeden “Alle Rollläden” { channel=“knx:device:bridge:Raumcontroller_SZ:KNX_Zentral_Rollladen”}

KNX Thing:
Type rollershutter-control : KNX_Zentral_Rollladen “Zentral Rollladen” [ upDown=“1.008:3/1/10”, stopMove=“3/2/10”, position=“5.001:3/4/10” ]

thanks René

There may be a misunderstanding about how openHAB works. Item commands are usually passed to bindings e.g. KNX and on to the real world actors. Item state updates are not. Incoming data from KNX usually causes state updates in openHAB, and does not create OH commands.

There are exceptions, these are provided by KNX binding by way of the -control type channels, which work the other way round.
Your rollershutter-control example would normally be a control panel with buttons, when you push a button the KNX message gets passed as an openHAB command (so that you might control e.g. a zwave shutter or something).
To complete the backward-working effect, -control channels pass Item state updates to the KNX bus.

This might help

but really I don’t think you want to use a -control channel here at all.

The state of an openHAB rollershutter Item is 0-100 (a position percentage) and you would normally send UP or DOWN commands, although a target position as a number is also an allowed command.

Group Items have a state that is calculated by an aggregation function, like AVG in your example.
You cannot postUpdate a new state to a Group type Item.

You can send commands to a Group Item, these will get passed along to all member Items.

Hello,

thanks for your explaination. Maybe I go a little bit more in detail. The rollershutter itself is not an KNX device it is only controlled by the KNX room controllers. The way it is conntected together is shown below:

KNX Room Controller with rollershutter central switch <-> openHAB <-> 10x Innogy Smarthome rollershutters

How can I show the average value of these 10x rollershutter positions on the KNX room controller and also control the 10x rollershutters from the KNX device without the use of an openHAB item group. As I said it is working but with the strange behaviour of “status toggles all the time between different values” for upto one minute after the rule fires. Without the use of the rule the status is not send by openHAB. The same behaviour exits for every groups which I use on the controlles like Light switches, dimmers, contacts etc.

best regards René

Okay, so KNX thing rollershutter-control really is the correct type.
When buttons are pushed, commands arrive in openHAB.
commands to a group go to all members, just what you want.

There is a quirk in the behaviour of Groups. When a member changes, the Group aggregation function iterates through all members to calculate the new Group state. This can result in multiple updates to the Group for one change.

Sounds like you are seeing this effect.

I don’t think there is any way to have the KNX binding listen for Item state change instead of update, to reduce this effect.

I can’t think of a way round this without using an extra dummy Item to buffer the Group state. A rule would listen for Group state change (not update) and postUpdate the new state to the extra Item.
I think you would want two KNX things, one with the upDown linked to your Group to pass commands in, one with position linked to your extra Item to pass that out.

I don’t know much about KNX, maybe someone who does can comment.

Hi,

so my configuration seems not to be completely wrong. This configuration was working flawlessly until my last upgrade. It seems that the OH2 event handling has changed after the M1 version. The long status toggles are only present if I use an version newer than M1 ( M2 or latest snapshot ). I have tried to use the M1 KNX binding together with the M2 openHAB version but it has the same behaviour so the KNX binding is not the problem.

best regards René

Maybe the KNX binding has improved, so that it properly queues a flurry of many updates instead of dropping some. I don’t know.

But you do have an inherent problem in your setup with getting multiple updates from a Group.

The main problem is that the toggling takes really long which means the rollershutter is since 1 minute in position x but the status still toggles between x and y, same with dimmers, contatcs, switch groups etc. Together with this openHAB is using much CPU power. Normally the CPU usage is between 2%-3% but during this toggling it has nearly 100% CPU usage because of the KNX packets.

best regards René

Yes.

I did suggest a workaround to help reduce group state updates spamming the KNX bus.

Hi,

what is the actual status of this workaround?

best regards René

I’m not sure what you mean here.
Here’s my idea, which waits for you to set it up.

Hi rossko,

with an extra item as suggested by you all is working correctly. But an extra rule is required.

best regards René

For the benefit of others who may one day want to do something similar, maybe you could share your rule and item setup.