I am using interceptor.py.

Meanwhile I could realise it with PHP, thanks to your input:

<?php
$cpu_temp = exec ('cat /sys/class/thermal/thermal_zone0/temp|sed 
"s/\([0-9]\{2\}\)\([0-9]\{3\}\)/\1.\2/"');
?>

However, it seems, that the thermal_zone0/temp value differs somewhat from 
the result of vcgencmd measure_temp

I don't care about the three decimals, but that might be solved either by 
simply cutting it in the sed pipe or by adding another piping e.g. | awk 
'{printf "%.1f", $1}

And, of course, I had to enable php snippets in html by inserting this line 
into lighttpd.conf:

fastcgi.map-extensions = ( ".htm" => ".php", ".html" => ".php")

and then I placed the value into the hardware widged:

<tr>
<td class="label">CPU temperature</td>
<td class="data"><?PHP echo "$cpu_temp"; ?> °C</td>
</tr>

that's it!
Thanks a lot!

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/76b74d28-68b7-455c-97b1-859f08ba14d4%40googlegroups.com.

Reply via email to