combine power and energy diff in one graph and fix graph period for kWh data type

This commit is contained in:
john30
2016-12-10 16:52:10 +01:00
parent 17e4fd08c8
commit c3336cf7a5
+9 -11
View File
@@ -11,7 +11,6 @@ if [ "$1" = "suggest" ]; then
echo "temp"
echo "press"
echo "power"
echo "energy"
exit 0
fi
prefix=`basename "$0"`
@@ -19,10 +18,8 @@ if [ "$prefix" = "ebusd_temp" ]; then
sensors="outsidetemp BrineTempInput BrineTempOutput FlowTemp mcFlowTempSensor hwTankTemp RoomTemp rc4:RoomTemp"
elif [ "$prefix" = "ebusd_press" ]; then
sensors="BrinePress HeatSystemPress VaporPressHigh VaporPressLow"
elif [ "$prefix" = "ebusd_power" ]; then
sensors="ActualEnvironmentPower"
else
sensors="YieldEnvironmentEnergy"
sensors="YieldEnvironmentEnergy ActualEnvironmentPower"
fi
if [ "$1" = "config" ]; then
if [ "$prefix" = "ebusd_temp" ]; then
@@ -31,18 +28,19 @@ if [ "$1" = "config" ]; then
elif [ "$prefix" = "ebusd_press" ]; then
echo "graph_title ebusd Drucksensoren"
echo "graph_vlabel Bar"
elif [ "$prefix" = "ebusd_power" ]; then
echo "graph_title ebusd Leistung"
echo "graph_vlabel kW"
else
echo "graph_title ebusd Ertrag"
echo "graph_vlabel kWh"
echo "graph_title ebusd Leistung/Ertrag"
echo "graph_vlabel kW"
echo "graph_period hour"
fi
echo 'graph_category Heizung'
for sensor in $sensors; do
echo ${prefix}_${sensor/:/_}.label $sensor
if [ "$prefix" = "ebusd_energy" ]; then
if [ ! "${sensor/nergy/}" = "$sensor" ]; then
echo ${prefix}_${sensor/:/_}.label "$sensor [diff]"
echo ${prefix}_${sensor/:/_}.type COUNTER
echo ${prefix}_${sensor/:/_}.draw AREA
else
echo ${prefix}_${sensor/:/_}.label $sensor
fi
print_warning ${prefix}_${sensor/:/_}
print_critical ${prefix}_${sensor/:/_}