How to set up a cron minute-by-minute


i need a cron job or script minute-by-minute which sends an “0” to an KNX Adress.
How can i build this in OpenHAB.
OH 1.7.1 is up and running on an Raspi2.


Hi Tom,

you can’t directly send something to the KNX Bus directly with OpenHab. You need to define an item (for example a switch) in Openhab and bind it to a KNX device. You can then send a command to the item and it will send the appropriate KNX message. You could define an OpenHab rule which sends the command every minute.

What do you want to do exactly? What KNX Datapoint do you want to use?


Hi Axel,
the weatherstation shows 60°C and works with thermic windcontrol. Therefore i have to send it to gira. While my friend with the ETS Licence is in vacation, i will send the windsignal by openhab, that my blinds get not blocked without the weatherstation.
Would be great, if you could help me.

…so item as switch is set up, as all the others.
Now my question is how to define the rule to send the command every minute?


Hi Tom,

here is an example for a cron job to send a vaule to an item every minute:

rule "Cron job every minute sendCommand(YourItem, 0)"
    Time cron "0 0/1 * * * ?"   // every minute
    sendCommand(YourItem, "0")

You can only send ON or OFF to a Switch Item not a value like 0 or “0”


1 Like

Hi Tom,

as @Mani mentioned, you can only send ON or OFF to a switch item. As I understood your problem, you want to send the temperature status updates to the knx bus so that your blinds are working properly.
Numeric values such as temperatures are usually stored in ‘Number’ Items in Openhab and send as Datapoint “9.001” to knx bus.

I therefore would try something like

Number CurrentTemperature { knx="9.001:1/1/1" }

where 1/1/1 is the group address of your temperature. You should then be able to send the value 0 to the item CurrentTemperature which would then be sent as 9.001 DPT to group address 1/1/1 on the knx bus.

sendCommand(CurrentTemperature, 0)

I haven’t tried it and I’m not an OpenHab/KNX expert yet, but that is my understanding.


Thanks a lot for your help, but id did not work…
I don’t know why, because there is now fault in the logfile.
Therefore i must have the wrong adress or value.
So i have to wait until my kollege is back from vacation.
I will give an reply again when i found a way, thanks