Sure, openHAB is meant to be a gateway between incompatible systems.
Simply use the knx binding and create a generic knx thing. Then create *-control channels and link them with the corresponding helios items.
As I don’t know about the helios, I can only guess… but as an example:
Thing device myswitch "wallswitch" [] {
Type number-control : level [ga="1/1/1+1/1/2"]
}
1/1/1 is the status GA for sending the current level to the switch(!) 1/1/2 is the control GA to send a command from knx to the helios.
Number heliosLevel "Vent level" {channel="modbus...",channel="knx:device:bridge:myswitch:level"}
When openHAB reveived a command via 1/1/2, it will send the level as a command to Item heliosLevel, which will send the command to the modbus binding (which then will send it to the helios device). The device will answer with the new level as a status update, which will update the Item. the control channel will get the update, too and will send it to knx via 1/1/1.
Maybe you have to change some data, then it’s better to use a rule set. Let’s say you have wall switches, but it’s only up/down and it’s a switch, so there is a 1
for each up and a 0
for each down.
Thing device myswitch "wallswitch" [] {
Type switch-control : upDown [ga="1/1/1"]
}
linked to a Switch Item knxWallSwitchUpDown. Helios Item is the same (Number Item)
Rule (DSL, but you can use the other options, too):
rule "set helios level"
when
Item knxWallSwitchUpDown received command
then
val iLevel = if(heliosLevel.state instanceof Number) (heliosLevel.state as Number).intValue else 2
var newLevel = iLevel
newLevel = newLevel + if(receivedCommand == ON) 1 else -1
if(newLevel < 0)
newLevel = 0
if(newLevel > 3)
newLevel = 3
if(iLevel != newLevel)
heliosLevel.sendCommand(newLevel)
end
The rule checks if heliosLevel is of type Number. if yes, it takes the value into iLevel, if not, it uses 2 as a default level.
The newLevel variable is set to the same value.
Now, if the command was ON (aka 1 in knx) the rule adds 1 to newLevel. For every other command (OFF is the only possible command here) it subtracts 1.
Check the borders to prevent commands which are not allowed.
Last step: check if the new level is different from the current level, if not, set the new Level.