Hallo alle - ich möchte ein Netzdiagramm mit den Temperaturen verschiedener Sensore bauen, analog dem Eintrag auf https://wiki.fhem.de/wiki/LogProxy.
Im Moment werden sind die Werte von Hand als Array eingesetzt:
define SVG_05_Polar SVG logProxy:SVG_05_Polar:CURRENT
attr SVG_05_Polar plotsize 340,300
attr SVG_05_Polar room SVG,Sensors
# DEF logProxy:SVG_05_Polar:CURRENT
# FUUID 601afacf-f33f-521d-166a-823bf678eb539ef7
# GPLOTFILE SVG_05_Polar
# LOGDEVICE logProxy
# LOGFILE CURRENT
# NAME SVG_05_Polar
# NR 115
# STATE initialized
# TYPE SVG
#
setstate SVG_05_Polar initialized
set readonly
set terminal png transparent size <SIZE> crop
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set title 'Web'
set ytics ()
set y2tics ()
set grid
#set xtics ( 10 10, 20 20)
set xtics ()
set xrange [-40:40]
set yrange [-40:40]
#logProxy Polar::[11,15,21,14,16]
#logProxy Polar::[11,15,21,14,16]
#logProxy Polar::[14,16,23,24,21]
#logProxy Polar::["Livingroom","Bath","Children","Kitchen","Floor"]
plot "<IN>" using 1:2 axes x1y1 title 'Measured' ls l0 lw 1 with lines,\
plot "<IN>" using 1:2 axes x1y1 notitle ls l0 lw 1 with points,\
plot "<IN>" using 1:2 axes x1y1 title 'Desired' ls l1fill lw 1 with lines,\
plot "<IN>" using 1:2 axes x1y1 notitle ls l2 lw 1 with lines,\
Wie kann ich die Zahlen im den Array ([11,15,21,14,16]) durch aktuelle Werte aus Readings ersezten?
Laut Doku:
ZitatPolar:[<options>]:<values>
Will draw a polar/spiderweb diagram with the given values. <values< has to evaluate to a perl array.
D.h. statt [11,15,21,14,16] wuerde ich sowas wie [ ReadingsNum("Livingroom","temp",0), ReadingsNum("Bath","temp",0), ReadingsNum("Children","temp",0), ReadingsNum("Kitchen","temp",0), ReadingsNum("Floor","temp",0) ] verwenden.
Ungetestet.
This worked perfectly well - thank you!