[SOLVED] Raspi Temperature exec


I installed a Openhabian on a Raspberry and try to get the temperature of the Raspi.
The Exec binding and Regex are installed but the solved demomo doesesnt work!


Thing exec:command:apc [command="cat /sys/class/thermal/thermal_zone0/temp", interval=15, timeout=5, autorun=false]


String Raspi (All) {channel="exec:command:apc:output"}
Number Raspi_CPU "Temperature CPU [%.1f °C]" <temperature>


rule "CPU Temp"
          Item Raspi changed
        // Item Raspi received update (old version)
        var String cpupdate = Raspi.state.toString.trim
        var Number cpuTemp = new DecimalType(cpupdate)
        sendCommand(Raspi_CPU, cpuTemp/1000)


sitemap demo label="Demo Raspi OpenHabian"
        Frame {
                Text item=Raspi_CPU label="Temp Raspi [%.1f °C]"

I’ve got only Temp Raspi -°C

Does anyone have an idea what I’m doing wrong?

Look in your events.log. Do you ever see Raspi being updated?

Same problem here
I guess it has something to do with the exec binding and right administration, but I’m not sure


Its never updating the last entry is:

2018-11-26 11:39:14.820 [.ItemChannelLinkAddedEvent] - Link ‘Raspi-exec:command:apc:output’ has been added.
If I enter in the console
cat /sys/class/thermal/thermal_zone0/temp
I’ve got 44236 and this is fine

Try using:
Item Raspi changed

You can also see this tutorial

Thx a lot,

i’ve forgot the exec binding !!! I’m only use the exec transform.

now it’s fine

There is also a system information binding

that allows you to have a CPU temperature item.

Hey, the binding works perfect for me also.

Just have a question for curiosity: do you also have such a high CPU temperature?
Its constantly above 60 celsius for me and the raspi case also very hot.

My System:

  • Raspi 4 (2GB) with passive cooler case (Armore)
  • openhabian with openhab 3.1

My System Info (values):

  • CPU temp: > 60 celsius
  • CPU usage average: 20%
  • Use memory: 30%