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”.
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)
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.
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