Hi Everybody,
I’ve an KNX-Installation of rollershutters, all I want is to prevent the rollershutters to close if the door is open. Therefore I get an alarm (door / window = open) by z-wave.
Now I tried to push the alarm zu KNX Group Address.
But I couldn’t find a hint / how to… and try an error is sad.
Thank you for help.
Bernd
Just create a channel for that (you’ll have to use the correct DPT here, so take a look in ETS to get this information)
If it’s a DPT2.005, use a number channel and set it to use DPT2:
ga="2.005:7/8/9"
Link the channel to an appropriate Item, e.g. a Number Item and create a rule, which sends the alarm to knx.
Let’s say you have a Group gContacts for window/door Items and a Number Item doorAlarm, then a reasoable rule would be:
rule "check for open doors"
when
Member of gContacts changed
then
var Integer newAlarm = 0
if(gContacts.members.filter[i|i.state != CLOSED].size > 0)
newAlarm = 2
if(doorAlarm.state != newAlarm)
doorAlarm.sendCommand(newAlarm)
end
This rule is DSL file style, you can use UI to create the same rule, just set a rule id, give it a label, set the trigger correctly (i.e. chose Show all at the Trigger selection, then chose “the state of a member of an item group changes” and afterwards select the group Item with all contacts. Then select to create an inline script of type Rules DSL and paste the code between then and end to the code. Should look like this:
configuration: {}
triggers:
- id: "1"
configuration:
groupName: gContacts
type: core.GroupStateChangeTrigger
conditions: []
actions:
- inputs: {}
id: "2"
configuration:
type: application/vnd.openhab.dsl.rule
script: |-
var Integer newAlarm = 0
if(gContacts.members.filter[i|i.state != CLOSED].size > 0)
newAlarm = 2
if(doorAlarm.state != newAlarm)
doorAlarm.sendCommand(newAlarm)
type: script.ScriptAction
when displayed as code.
okay, Udo,
Thank you for your help. But there are still some questions…
A channel depends on an “Thing”…!? What “Thing”
Actually I’m quite a bit confused.
I’ve a THING “Door Sensor” with a CHANNEL to an ITEM “Status Gardendoor” Datatyp bit “open/closed”.
On KNX-Side there is a Groupaddress for Status Doors/Windows, let say 4/2/10 (Gardendoor)
I try to send a closed or open to 4/2/10 KNX Groupaddress…
Well, it depends 
As you want to prevent closing the rollershutters, setup all shutter actuators to use the alarm communication object (there should be one).
Set all of them to a group address to control the alarm.
Setup a knx Thing (I’m using a “virtual” Thing for that purpose, i.e. there is no real device which owns the GA used in the channels. Like that:
Thing device virtual "systemweit" @ "KNX" [
] {
Type number : scene1 "Lichtszene" [ ga="17.001:3/0/0" ]
Type number : scene2 "Rolloszene" [ ga="17.001:15/6/39" ]
Type number-control : tempOut "Temperatur" [ ga="15/7/0" ]
Type datetime-control : wochenzeit "Zeit und Tag" [ ga="10.001:15/7/10" ]
Type switch : sommer "Sommer" [ ga="15/4/1" ]
}
All these channels are used to control more than one device channel, so the GAs belong to no specific device.