Sending my own text to the KNX binding

Hello,
I would like to know how it is possible to send to a KNX device my own string of text in openHAB 2.
I’ve been searching for it on the forum and in the documentation but I don’t think I have the good keywords as I didn’t find anything.

I have a KNX switch with an integrated screen that can display messages on it, I have been able to display the value from the weather with the code below, but not my own string of text like a simple “Hello World”.

String texttest “texttest” {weather=“locationId=home, type=wind, property=direction”, knx=“16.001:8/0/1” }

How can I do this ?
Thanks

Should be possible through a rule:

.items

String  texttest    "texttest is [%s]"    {knx="16.001:8/0/1" } 
Switch sendtext "Send text" 

.rules

rule "send text"
when
    Item sendtext received command
then
    if (receivedCommand == ON)
        texttest.sendCommand("Hello World")
    else
        texttest.sendCommand("Bye World")
end

When switching the sendtext Item, this should send the text to knx, dependent on the state of sendtext it would be Hello World or Bye World. Don’t try to couple the weather binding to this item, because then this item will be read-only (it doesn’t make sense to write to weather binding, so it’s locked)

EDIT: added correct rule name

Hello Udo,
Thanks for your help.
I tried it the way you explained, but it doesn’t work.

I looked at the openhab.log, it doesn’t display any error.

Do you have access to ETS? You could search for working messages, maybe you will have to add some character(s), as openHAB itself is capable to send text messages. You even could use openHAB debug mode to get more information about what openHAB does when sending a weather text to the display.

Unfortunately I don’t own a knx text display…

It works now, I enabled the KNX debugging in OpenHAB, the rule wasn’t triggering when I was activating the switch.

I had to add a title to the rule to make it work

rule "Hello"
when
    Item sendtext received command
then
if (receivedCommand == ON)
        texttest.sendCommand("Hello World")
    else
        texttest.sendCommand("Bye World")
end

Thanks for your help.

Ouch! Sorry, my fault…

(corrected this in first posting)