|
From: <jum...@us...> - 2012-08-16 14:16:21
|
Revision: 969
http://openautomation.svn.sourceforge.net/openautomation/?rev=969&view=rev
Author: jumi2006
Date: 2012-08-16 14:16:13 +0000 (Thu, 16 Aug 2012)
Log Message:
-----------
copy of rrd_graph.pl - now using conf.d - now using easier config
Added Paths:
-----------
wiregate/plugin/generic/RRD_creator.pl
wiregate/plugin/generic/conf.d/RRD_creator.conf_sample
Copied: wiregate/plugin/generic/RRD_creator.pl (from rev 968, wiregate/plugin/generic/rrd_graph.pl)
===================================================================
--- wiregate/plugin/generic/RRD_creator.pl (rev 0)
+++ wiregate/plugin/generic/RRD_creator.pl 2012-08-16 14:16:13 UTC (rev 969)
@@ -0,0 +1,42 @@
+# Buswerte in RRD speichern
+# V2.0 2012-08-16
+# Info und Konfiguration in /etc/wiregate/plugin/generic/conf.d/RRD_creator.conf_sample
+# Eigene Konfiguration speichern unter /etc/wiregate/plugin/generic/conf.d/RRD_creator.conf
+# Alternativ \xFCber Webmin -> Plugins -> Pluginname -> config
+
+# Variablen deklarieren
+my @rrds;
+# conf einlsen
+&readConf;
+# Aufrufzyklus = Heartbeat RRD
+$plugin_info{$plugname.'_cycle'} = 300;
+
+# MAIN
+
+foreach my $rrd (@rrds) {
+update_rrd($rrd->{name},"",knx_read($rrd->{ga},300,$rrd->{dpt}));
+#plugin_log($plugname, "triggered $rrd->{name}");
+}
+
+return;
+
+# SUBS
+sub readConf
+{
+ my $confFile = '/etc/wiregate/plugin/generic/conf.d/'.basename($plugname,'.pl').'.conf';
+ if (! -f $confFile) {
+
+ } else {
+ #plugin_log($plugname, "reading conf file [$confFile].");
+ open(CONF, $confFile);
+ my @lines = <CONF>;
+ close($confFile);
+ my $result = eval("@lines");
+ #($result) and plugin_log($plugname, "conf file [$confFile] returned result[$result]");
+ if ($@) {
+ plugin_log($plugname, "ERR: conf file [$confFile] returned:");
+ my @parts = split(/\n/, $@);
+ plugin_log($plugname, "--> $_") foreach (@parts);
+ }
+ }
+}
\ No newline at end of file
Added: wiregate/plugin/generic/conf.d/RRD_creator.conf_sample
===================================================================
--- wiregate/plugin/generic/conf.d/RRD_creator.conf_sample (rev 0)
+++ wiregate/plugin/generic/conf.d/RRD_creator.conf_sample 2012-08-16 14:16:13 UTC (rev 969)
@@ -0,0 +1,55 @@
+# Autor: makki -> http://knx-user-forum.de
+# Update: JuMi2006 -> http://knx-user-forum.de
+# Grafiken in RRD speichern
+
+# Info und Konfiguration in /etc/wiregate/plugin/generic/conf.d/RRD_creator.conf_sample
+# Eigene Konfiguration speichern unter /etc/wiregate/plugin/generic/conf.d/RRD_creator.conf
+# alternativ \xFCber Webmin -> Plugins -> Pluginname -> config
+
+# Beispiel fuer Temperaturwert (DPT9/EIS5)
+# push @rrds, { name => "Temperatur K\xFCche", ga => "7/1/10", dpt => 9};
+
+# Abgerufen koennen die Grafiken durch Modifikation der Grafik-URL eines vorhandenen
+# 1-Wire Sensors werden: z.B. 28.0D22CB010000_temp.rrd im letzten Beispiel durch
+# Temp_Kueche_knx3-1-46.rrd ersetzen. Gross/Kleinschreibung beachten!
+
+### EINSTELLBARE WERTE ###
+
+### Name des RRDs ###
+# name => "FREITEXT"
+# ACHTUNG: Keine Umlaute oder Sonderzeichen (/\: etc) und einmalig!
+###
+
+### Gruppenadresse ###
+# ga => "1/2/3"
+###
+
+### DPT ###
+# dpt => 9
+# DPT 1 (1 bit) = EIS 1/7 (move=DPT 1.8, step=DPT 1.7)
+# DPT 2 (1 bit controlled) = EIS 8
+# DPT 3 (3 bit controlled) = EIS 2
+# DPT 4 (Character) = EIS 13
+# DPT 5 (8 bit unsigned value) = EIS 6 (DPT 5.1) oder EIS 14.001 (DPT 5.10)
+# DPT 6 (8 bit signed value) = EIS 14.000
+# DPT 7 (2 byte unsigned value) = EIS 10.000
+# DPT 8 (2 byte signed value) = EIS 10.001
+# DPT 9 (2 byte float value) = EIS 5
+# DPT 10 (Time) = EIS 3
+# DPT 11 (Date) = EIS 4
+# DPT 12 (4 byte unsigned value) = EIS 11.000
+# DPT 13 (4 byte signed value) = EIS 11.001
+# DPT 14 (4 byte float value) = EIS 9
+# DPT 15 (Entrance access) = EIS 12
+# DPT 16 (Character string) = EIS 15
+###
+
+#### KONFIGURATION ####
+
+push @rrds, { name => "Helligkeit_EG_gr", ga => "3/1/49", dpt => 9};
+push @rrds, { name => "Helligkeit_EG_kl", ga => "3/1/29", dpt => 9};
+push @rrds, { name => "Helligkeit_OG", ga => "3/2/29", dpt => 9};
+push @rrds, { name => "WP_Heizungspumpe_Laufzeit", ga => "0/5/2", dpt => 1};
+push @rrds, { name => "WP_Zirkulation_Laufzeit", ga => "0/5/5", dpt => 1};
+push @rrds, { name => "WP_Solepumpe_Laufzeit", ga => "0/5/3", dpt => 1};
+push @rrds, { name => "WP_Kompressor_Laufzeit", ga => "0/5/4", dpt => 1};
\ No newline at end of file
Property changes on: wiregate/plugin/generic/conf.d/RRD_creator.conf_sample
___________________________________________________________________
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|