How to get my data into the UI? (Exec Binding)

I just installed OpenHAB2 on my Raspberry Pi 3 and connected some DS18B20 temperature sensors. I am using a script to read the temperature values.

$ /home/pi/openhab/bin/temperature.sh 28-021607e6f5ee
23.43

Now I am trying to get the temperature value into the UI.

My “conf/items/home.items” contanis the following lines:

Group Bedroom
Number Temperature_Bedroom "Temperature [%.2f °C]" (Bedroom) { exec="<[/home/pi/openhab/bin/temperature.sh 28-0116106b80ee:10000:REGEX((.*?))]" }

As I understand the second line, the item uses the Exec-binding and executes this command

/home/pi/openhab/bin/temperature.sh 28-0116106b80ee

…every 10 seconds and uses a regex to extract the return value. In this case the return value could be:

23.43

I can see that the item is working by using the log:tail command:

openhab> log:tail | grep Bedroom
18:28:17.496 [INFO ] [ome.event.GroupItemStateChangedEvent] - Bedroom changed from 23.42 to 23.43 through Temperature_Bedroom
18:28:17.499 [INFO ] [marthome.event.ItemStateChangedEvent] - Temperature_Bedroom changed from 23.42 to 23.43

So far so good, but i can’t find a way to get this temperature value into the UI…

Would be great if someone could help me :slight_smile:

(Sorry, if I created this thread in the wrong place!)

Right place.

See this thread for where to put your sitemap files.

Details about how to write a sitemap using the Classic UI can be found on the OH 1 Wiki.

Okay, my item works fine… I thought that the Paper UI is used to display my data, but I need to use the Classic or Basic UI.

So, everything is fine and I can see the actual temperature of my bedroom :blush: Thanks! :upside_down: