Homematic IP HmIP-WRCD send item.state instead of plain string

I included the WRCD and it works quite well. Sending Strings to the display works like a charm, but I am wondering if there is any possibility to sent the content of an item to the display.

I have a rule which checks nearby gas sations for the current prices via tankerkoenig. The rule compares the values and writes the name AND price of the cheapest station into an item called “Tankstelle”. The example shows the result if Shell is the cheapest one:
Tankstelle.postUpdate("Shell " + E10_Shell.state as Number)

What I want to do is to send the content of “Tankstelle” (e.g. “Shell 1.229”) to the display.

Any ideas here?

Thanks in advance!

You have to send the value as a string…

Tankstelle.postUpdate("Shell " + (E10_Shell.state as Number).toString + "EUR")

Thank you for your anwser, thing is I can’t send the content of Tankstelle to the display afaik.
The rule für the display is:

The bold part “DDS=text” is what is sent to the display. I fear, there is no way to send the price?

1 Like

Do you mean
X.sendCommand(“some string” + someItem.state.toString + " some more string")

Hello Sven,
I suppose you have to “construct” the string you have to send (…{DDBC…}) as in Udo_Hartmann’s example and replace “HEM” with your text.

How did you manage to send anything to the display? Finally I can receive the button status, but only after I implemented a dummy scrip on RaspberryMatic, that uses the button channels as input. Without that I did not receive anything (but the LED did also not switch to green, so I suppose that’s a “WRCD-to-Homematic” issue).

Sending data to the “combined” string item has no effect.

My thing (I prefer text file oriented configuration, not via PaperUI):

Thing HmIP-WRCD 002A5A498Exxxx "eInk-Display 1" @ "Küche"

My items:

Switch   DISP_1_Tast1       "Taster Disp 1 [%s]"     <switch>     { channel="homematic:HmIP-WRCD:raspberrymatic:002A5A498Exxxx:1#PRESS_SHORT" }
Switch   DISP_1_Tast2       "Taster Disp 2 [%s]"     <switch>     { channel="homematic:HmIP-WRCD:raspberrymatic:002A5A498Exxxx:2#PRESS_SHORT" }
Switch   DISP_1_Tast1_L     "Taster Disp 1L [%s]"    <switch>     { channel="homematic:HmIP-WRCD:raspberrymatic:002A5A498Exxxx:1#PRESS_LONG" }
Switch   DISP_1_Tast2_L     "Taster Disp 2L [%s]"    <switch>     { channel="homematic:HmIP-WRCD:raspberrymatic:002A5A498Exxxx:2#PRESS_LONG" }

String   DISP_1_Combined    "HmIP-WRCD String [%s]"               { channel="homematic:HmIP-WRCD:raspberrymatic:002A5A498Exxxx:3#COMBINED_PARAMETER"}

Any ideas?

I used OH2.5.10 on a RPi4 and the latest RaspberryMatic 3.53.30 on a RPi3.


I once attended a presentation of Kai’s in which he suggested to implement Things via the UI and Items textual, so that’s what I’ve been doing since then. Sorry, I can’t help you with the textual thing.

The dummy-switch is a known thing. You HAVE to define the switch in the CCU to make the device accessible to OH. No idea why, but i had also to do that with my 6-ch-switch.

My item-structure is as follows:
Switch Display_switch_unten “Schalter unten” {channel=“homematic:HmIP-WRCD:xxxxxxxxxxxxxxxxxxxxxx:yyyyyyyyyyyyyyyyyyyyyy:1#BUTTON”}

Channel ‘homematic:HmIP-WRCD:xxxxxxxxxxxxxxxxxxxxxx:yyyyyyyyyyyyyyyyyyyyyy:1#BUTTON’ triggered SHORT_PRESSED

For the text-issue:
The rule sends plain text to the device, i fear there is no option to use varables, as it would result in displaing the variable-name.
Or am I wrong here?


Hi @Svolli, I just found this thread because I am trying to create an OH script to set my HmIP-WRCD display text. Originally, I ran into this message:

Rule 'WRCD Button Top': An error occurred during the script execution: Could not access field: HomematicRules.OFF on instance: null

because I tried to set plain text as in @Udo_Hartmann’s example . I could solve it with the full combined expression as you suggested:
which works fine :slightly_smiling_face:

Now I hope I can help you with the Sprit-Schwaben-Display :wink:

You should be able to display all the information you want by using String::format(). Does this fulfill your needs?

var String combinedText = String::format("{DDBC=WHITE,DDTC=BLACK,DDI=0,DDA=CENTER,DDS=%s %.2f,DDID=4,DDC=true}", "Shell", 3.14159).replace('.',',')

This assumes that the price is a number, otherwise you can use %s two times and don’t need the ./, replacement for German decimal symbol. That is just a quick hack, it would be even nicer of course to use a NumberFormat class.
My WRCD only displays a ? for € :frowning: