#!/bin/sh # -*- sh -*- : << =cut =head1 NAME heatpump-dimplex-wpm - Munin plugin to display Diplex heatpump data Tested with Dimplex NWPM, BIOS 4.1, BOOT 4.03, SOFTWARE: WPM_H_H54 =head1 CONFIGURATION You need to configure the hostname in the plugin name. Symlink heatpump-dimplex-wpm_ as "heatpump-dimplex-wpm_192.168.20.71". =head2 EXAMPLE CONFIGURATION [heatpump-dimplex-wpm_*] env.host_name Heating =head1 DEPENDENCIES - curl - xsltproc =head1 AUTHOR Christian Weiske =head1 LICENSE AGPL http://www.gnu.org/licenses/agpl.html =head1 MAGIC MARKERS #%# family=manual =cut . ${MUNIN_LIBDIR:=/usr/share/munin}/plugins/plugin.sh host=`echo ${0##*/}|sed 's/^.*_//g'` if [ "$1" = "config" ]; then if [ "$host_name" != "" ]; then echo "host_name $host_name" fi #Outdoor temperature echo 'multigraph heatpump_dimplex_wpm_outtemp' echo 'graph_title Außentemperatur' echo 'graph_args --base 1000' echo 'graph_vlabel °C' echo 'graph_info Zeigt die gemessene Außentemperatur an' echo 'graph_scale no' echo 'graph_category sensors' echo 'outtemp.label Außentemperatur' #Heating temperatures echo 'multigraph heatpump_dimplex_wpm_heating' echo 'graph_title Heizungstemperaturen' echo 'graph_args --base 1000' echo 'graph_vlabel °C' echo 'graph_info Zeigt Heizungstemperatur-Betriebsdaten an' echo 'graph_scale no' echo 'graph_category sensors' echo 'returntargettemp.label Rücklaufsolltemperatur' echo 'returntemp.label Rücklauftemperatur' echo 'influxtemp.label Vorlauftemperatur' #Water temperature echo 'multigraph heatpump_dimplex_wpm_water' echo 'graph_title Warmwasser' echo 'graph_args --base 1000' echo 'graph_vlabel °C' echo 'graph_info Zeigt Warmwasser-Betriebsdaten an' echo 'graph_scale no' echo 'graph_category sensors' echo 'watertargettemp.label Solltemperatur' echo 'watertemp.label Warmwassertemperatur' #On/off states echo 'multigraph heatpump_dimplex_wpm_states' echo 'graph_title Stati' echo 'graph_args --base 1000' echo 'graph_vlabel An/Aus' echo 'graph_info Zeigt binäre Daten an' echo 'graph_scale no' echo 'graph_category sensors' echo 'reqheating.label Anforderung Heizung' echo 'reqwater.label Anforderung Warmwasser' exit 0 fi xml=`curl -fs "http://$host/usr-cgi/xml.cgi?A|1|125|D|1|150|I|1|100"`; ret=$? if [ "$ret" -ne 0 ]; then echo "Error fetching data from heatpump server: $host" exit 1 fi path="`dirname "$0"`" data=`echo "$xml" | xsltproc "$path/paths.xsl" -`; ret=$? if [ "$ret" -ne 0 ]; then echo "Error running xsltproc" exit 2 fi #Outdoor temperature echo 'multigraph heatpump_dimplex_wpm_outtemp' echo outtemp.value `echo "$data" | grep ANALOG/27 | cut -d" " -f2` #Heating temperatures echo 'multigraph heatpump_dimplex_wpm_heating' echo returntargettemp.value `echo "$data" | grep ANALOG/28 | cut -d" " -f2` echo returntemp.value `echo "$data" | grep ANALOG/29 | cut -d" " -f2` echo influxtemp.value `echo "$data" | grep ANALOG/31 | cut -d" " -f2` #Water temperatures echo 'multigraph heatpump_dimplex_wpm_water' echo watertargettemp.value `echo "$data" | grep ANALOG/40 | cut -d" " -f2` echo watertemp.value `echo "$data" | grep ANALOG/30 | cut -d" " -f2` #On/off states echo 'multigraph heatpump_dimplex_wpm_states' echo reqheating.value `echo "$data" | grep DIGITAL/136 | cut -d" " -f2` water=`echo "$data" | grep DIGITAL/140 | cut -d" " -f2` echo reqwater.value `echo $(($water * 2))`