[SOLVED] Set value on modbus via KNX

I’m looking for some support (pot. script) on the following scenario:

I’m running openhab 2.5M6 on a RaspberryPie with KNX binding and Modbus binding (for our Tecpalor heat pump with air circulation) working. I would like to set on KNX the level of air circulation (e.g through a knx panel Gira G1). Means a defined value from knx bus will trigger a change on Modbus.

Any help to handover data between the bindings (actually handled in two different actions) is welcome.

Many thanks

Just about everything you might want to process or select in openHAB will be done by Items.

So you would set up your KNX “source” to set the value of an Item, by linking it to a KNX channel.

You can arrange for a rule to trigger if that Item changes, or every Wednesday, or whatever you want.

That rule can do whatever processing you want, taking into account other conditions if you wish, and send (or choose not to send) some command to another Item.

That Item in turn links to a Modbus channel to set whatever register it is in your “target” device.

being a bit further but struggle still.

having an knx.items with defined and working (checked w BasicUI)
Number Luefterstufe "Tecalor Lüfterstufe" { channel="knx:device:bridge:GiraG1_EG:Luefterstufe" }

the Modbus variables are handled though a lwz.items file, as mentioned its working for data logging well

tried following rule

rule "Lueftungssteuerung"
        Item Luefterstufe changed
        var Number Sollstufe = Luefterstufe


ending up with following error

2019-12-09 16:11:50.026 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Lueftungssteuerung’: An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.actions.BusEvent.sendCommand(org.eclipse.smarthome.core.items.Item,java.lang.Number) on instance: null

Not sure why ending up with null. Tried with a fixed Number and it works…


Any idea?

Luefterstufe.value() or something like, don’t remember by now. It looks like you’re feeding the channel object itself instead of its numeric value.

1 Like

You can find out. If curious about what your Sollstuffe variable is, add a line -

logInfo("test" , "my variable {} ", Sollstuffe)

But in this case, it is just what @Sonic says, you have made Sollstuffe the whole Item object - with name, label, type, etc. A whole object is not a number or sensible command.

It’s the state property of your Item that you are interested in

var Number Sollstufe = Luefterstufe.state

many thanks, topic is solved.