|
From: <ma...@us...> - 2011-05-28 23:19:33
|
Revision: 348
http://openautomation.svn.sourceforge.net/openautomation/?rev=348&view=rev
Author: makki1
Date: 2011-05-28 23:19:24 +0000 (Sat, 28 May 2011)
Log Message:
-----------
commit WireGate-Plugins, incomplete..
Added Paths:
-----------
wiregate/
wiregate/plugin/
wiregate/plugin/generic/
wiregate/plugin/generic/Alarmanlage
wiregate/plugin/generic/Atmolight.pl
wiregate/plugin/generic/Blinker
wiregate/plugin/generic/DMX-Plugin.pl
wiregate/plugin/generic/DaemonStartStop
wiregate/plugin/generic/Datenlogger-PV-Kaco-Prolog
wiregate/plugin/generic/Denon-Plugin.pl
wiregate/plugin/generic/Dreambox-Text
wiregate/plugin/generic/EIB-Watchdog
wiregate/plugin/generic/EiWoMiSa
wiregate/plugin/generic/Googleweather
wiregate/plugin/generic/Highspeed
wiregate/plugin/generic/M-Bus
wiregate/plugin/generic/Nacht-Nachdimmen
wiregate/plugin/generic/PI-Regler
wiregate/plugin/generic/Ping-check
wiregate/plugin/generic/Prowl.pl
wiregate/plugin/generic/RFID-Leser
wiregate/plugin/generic/Roomba-Graph
wiregate/plugin/generic/Schwellwert
wiregate/plugin/generic/Taupunkt.pl
wiregate/plugin/generic/Uhrzeit-vom-Bus
wiregate/plugin/generic/WOL-1
wiregate/plugin/generic/XBMC-Radio
wiregate/plugin/generic/cul868
wiregate/plugin/generic/mpg123_start
wiregate/plugin/generic/mpg123_volume
wiregate/plugin/generic/weather-denro1
Added: wiregate/plugin/generic/Alarmanlage
===================================================================
--- wiregate/plugin/generic/Alarmanlage (rev 0)
+++ wiregate/plugin/generic/Alarmanlage 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,22 @@
+# Eigenen Aufruf-Zyklus auf 1T Sekunden setzen
+# Alarmanlage für arme ;)
+$plugin_info{$plugname.'_cycle'} = 86400; # egal..
+return;
+
+my $scharf_ga = "1/1/1";
+my $allowed_pa = "1.1.20";
+my $alarm_ga = "1/1/111";
+### Ende Definitionen
+
+if ($msg{'apci'} eq "A_GroupValue_Write" and $msg{'dst'} eq $scharf_ga) {
+ if (! $msg{'src'} eq $allowed_pa) {
+ # böser Bube hat von falscher Quelladresse gesendet
+ knx_write($alarm_ga,1,1);
+ return "Alarm! $msg{'src'} hat auf $scharf_ga gesendet";
+ }
+} else { # zyklischer Aufruf
+ # Plugin an Gruppenadresse "anmelden"
+ $plugin_subscribe{$scharf_ga}{$plugname} = 1;
+}
+
+return;
Added: wiregate/plugin/generic/Atmolight.pl
===================================================================
--- wiregate/plugin/generic/Atmolight.pl (rev 0)
+++ wiregate/plugin/generic/Atmolight.pl 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,93 @@
+# Plugin Atmolight
+# Kommunikation via UDP - socat separat, muss an einen USB
+# Version: 0.1 2011-02-03
+
+# Eigenen Aufruf-Zyklus setzen (Initialisierung/zyklisches pr\xFCfen)
+$plugin_info{$plugname.'_cycle'} = 600;
+#return "broken";
+#if ($socket[$socknum]->opened) { $socket[$socknum]->close(); }
+#undef $socket[$socknum];
+
+##################
+### DEFINITION ###
+##################
+
+my $socknum = 121; # Eindeutige Nummer des Sockets
+
+my $send_ip = "172.17.2.68"; # Sendeport (UDP, sie in Socket-Einstellungen)
+my $send_port = "50118"; # Sendeport (UDP, sie in Socket-Einstellungen)
+my $recv_ip = "172.17.2.203"; # Empfangsport (UDP, sie in Socket-Einstellungen)
+my $recv_port = "50117"; # Empfangsport (UDP, sie in Socket-Einstellungen)
+
+my $basega = "10/0/110";
+my $numgas = 15;
+# Startadresse
+# 0-2 alle(center?), 3-5 left 6-8 right, 9-11 = oben, 12-14 unten
+
+#######################
+### ENDE DEFINITION ###
+#######################
+
+# Hauptverarbeitung
+if (!$socket[$socknum]) { # socket erstellen
+ $socket[$socknum] = IO::Socket::INET->new(LocalPort => $recv_port,
+ Proto => "udp",
+ LocalAddr => $recv_ip,
+ PeerPort => $send_port,
+ PeerAddr => $send_ip,
+ ReuseAddr => 1,
+ Blocking => 0
+ )
+ or return ("open of $recv_ip : $recv_port failed: $!");
+
+ $socksel->add($socket[$socknum]); # add socket to select
+
+ $plugin_socket_subscribe{$socket[$socknum]} = $plugname; # subscribe plugin
+ for my $chan ("center","left","right","top","bottom") {
+ $plugin_info{$plugname.'_R_'.$chan} = "00" unless $plugin_info{$plugname.'_R_'.$chan};
+ $plugin_info{$plugname.'_G_'.$chan} = "00" unless $plugin_info{$plugname.'_G_'.$chan};
+ $plugin_info{$plugname.'_B_'.$chan} = "00" unless $plugin_info{$plugname.'_B_'.$chan};
+ }
+ # fall through! return "opened Socket $socknum";
+}
+
+if (%msg) { # telegramm vom KNX
+ if ($msg{'apci'} eq "A_GroupValue_Write") {
+ my $idx = str2addr($msg{'dst'}) - str2addr($basega);
+ my @col = ("R","G","B");
+ my @chan = ("center","left","right","top","bottom");
+ my $ret;
+ $plugin_info{$plugname.'_'.$col[$msg{'data'}%3].'_'.$chan[%3]} = $msg{'data'};
+ if ($idx==0) {
+ return "null";
+ } else {
+ for my $chan ("center","left","right","top","bottom") {
+ $ret = $plugin_info{$plugname.'_R_'.$chan} = "00" unless $plugin_info{$plugname.'_R_'.$chan};
+ $ret .= $plugin_info{$plugname.'_G_'.$chan} = "00" unless $plugin_info{$plugname.'_G_'.$chan};
+ $ret .= $plugin_info{$plugname.'_B_'.$chan} = "00" unless $plugin_info{$plugname.'_B_'.$chan};
+ }
+
+ return "dunno? recv KNX $msg{'dst'} $msg{'data'} $ret";
+ }
+ }
+ return "recv $msg{'dst'} ". hex($msg{'data'});
+} elsif ($fh) { # incoming dgram
+ my $buf; # not linewise! = <$fh>;
+ $socket[$socknum]->recv($buf,1024);
+
+ my $bufhex = unpack("H*",$buf);
+ chomp $buf;
+ my $fn = substr($buf,0,2);
+ # this is still very dumb
+ return "dunno recv $buf ($bufhex)";
+}
+
+for (my $i=0; $i<$numgas;$i++) {
+ $plugin_subscribe{$basega}{$plugname} = 1;
+ $basega = addr2str(str2addr($basega)+1,1);
+}
+
+# insert all commands to be sent cyclic
+# syswrite($socket[$socknum],"PW?\r");
+
+return "cycle";
Added: wiregate/plugin/generic/Blinker
===================================================================
--- wiregate/plugin/generic/Blinker (rev 0)
+++ wiregate/plugin/generic/Blinker 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,23 @@
+### Definitionen
+# Eigenen Aufruf-Zyklus auf 300 Sekunden setzen
+$plugin_info{$plugname.'_cycle'} = 86400; # egal..
+
+my $aktiv_ga = "14/6/111"; # Gruppenadresse zum aktivieren
+my $schalt_ga = "1/6/26"; # GA zu schalten
+my $blinkpause = 2; # Frequenz in sek.
+### Ende Definitionen
+
+if ($msg{'apci'} eq "A_GroupValue_Write" and $msg{'dst'} eq $aktiv_ga) {
+ $plugin_info{$plugname.'_aktiv'} = int($msg{'data'});
+ knx_write($schalt_ga,int($msg{'data'}),1);
+ $plugin_info{$plugname.'_cycle'} = $blinkpause;
+} else { # zyklischer Aufruf
+ # Plugin an Gruppenadresse "anmelden"
+ $plugin_subscribe{$aktiv_ga}{$plugname} = 1;
+ if ($plugin_info{$plugname.'_aktiv'}) {
+ knx_write($schalt_ga,knx_read($schalt_ga,0,1)^1,1); # read&write last value - logical OR
+ $plugin_info{$plugname.'_cycle'} = $blinkpause;
+ }
+}
+
+return;
Added: wiregate/plugin/generic/DMX-Plugin.pl
===================================================================
--- wiregate/plugin/generic/DMX-Plugin.pl (rev 0)
+++ wiregate/plugin/generic/DMX-Plugin.pl 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,90 @@
+# Plugin DMX-Gateway
+# Version: 0.3 2011-05-28
+# Ben\xF6tigt DMX USB-Interface
+
+##################
+### DEFINITION ###
+##################
+
+my $socknum = 6; # Eindeutige Nummer des Sockets +1
+
+# Eigenen Aufruf-Zyklus setzen (Initialisierung/zyklisches pr\xFCfen)
+$plugin_info{$plugname.'_cycle'} = 300;
+# Gruppenadressen DMX - leer um Versand zu unterbinden
+# 8Bit/1Byte Dimmwerte werden 1:1 auf DMX-Adressen \xFCbersetzt
+my $knx_startGA = "11/1/0"; #DMX-Kanal 1, DMX-Kanal 256=1/1/255, DMX-Kanal 257..512=1/2/0..255
+my $dmx_channels = 512; # Anzahl der DMX-Kan\xE4le
+# oder for XXX in array
+
+my $dmx_send_ip = "localhost"; # Sendeport (UDP, sie in Socket-Einstellungen)
+my $dmx_send_port = "50012"; # Sendeport (UDP, sie in Socket-Einstellungen)
+my $dmx_recv_ip = "localhost"; # Empfangsport (UDP, sie in Socket-Einstellungen)
+my $dmx_recv_port = "50011"; # Empfangsport (UDP, sie in Socket-Einstellungen)
+
+#######################
+### ENDE DEFINITION ###
+#######################
+
+my @dimcurve = ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5,
+ 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8,
+ 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12,
+ 12, 13, 13, 13, 14, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19,
+ 19, 20, 20, 21, 21, 22, 22, 23, 24, 24, 25, 26, 26, 27, 28, 29,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 46, 47, 48, 50, 51, 52, 54, 55, 57, 58, 60, 62, 63, 65, 67, 69,
+ 71, 73, 75, 77, 79, 81, 83, 86, 88, 90, 93, 95, 98, 101, 104, 106,
+ 109, 112, 115, 119, 122, 125, 129, 132, 136, 140, 144, 148, 152, 156, 160, 165,
+ 169, 174, 179, 184, 189, 194, 199, 205, 211, 216, 222, 228, 235, 241, 248, 255);
+
+# Hauptverarbeitung
+if (!$socket[$socknum]) { # socket erstellen
+ if (defined $socket[$socknum]) { #debug
+ if ($socket[$socknum]->opened) { $socket[$socknum]->close(); }
+ undef $socket[$socknum];
+ } #debug my $dgram = sprintf("C%03dL%03d\r\n",$dmxchan,hex($msg{'data'}));
+
+ $socksel->remove($socket[$socknum]);
+ $socket[$socknum] = IO::Socket::INET->new(LocalPort => $dmx_recv_port,
+ Proto => "udp",
+ LocalAddr => $dmx_recv_ip,
+ PeerPort => $dmx_send_port,
+ PeerAddr => $dmx_send_ip,
+ ReuseAddr => 1
+ )
+ or return ("open of $dmx_recv_ip : $dmx_recv_port failed: $!");
+ $socksel->add($socket[$socknum]); # add socket to select
+ $plugin_socket_subscribe{$socket[$socknum]} = $plugname; # subscribe plugin
+ for (my $i=0; $i<$dmx_channels;$i++) {
+ $plugin_subscribe{$knx_startGA}{$plugname} = 1;
+ $knx_startGA = addr2str(str2addr($knx_startGA)+1,1);
+ }
+ return "opened UDP-Socket $socknum";
+}
+if (%msg) { # telegramm vom KNX
+ my $destN = str2addr($msg{'dst'});
+ my $startN = str2addr($knx_startGA);
+ my $dmxchan = $destN - $startN;
+ if ($msg{'apci'} eq "A_GroupValue_Write" and $destN >= $startN and $destN <= $startN+$dmx_channels) {
+ # send $dmxchan -> UDP as CaaaLvvv
+ my $dgram = sprintf("C%03dL%03d\r\n",$dmxchan,$dimcurve[hex($msg{'data'})]);
+ $socket[$socknum]->send($dgram) or return "send failed: $!";
+ # debug chop($dgram);chop($dgram); # debug
+ # debug return "sent $msg{'dst'} $msg{'value'} $dgram to DMX $dmxchan"; # debug
+ return;
+ }
+} elsif ($fh) {
+ my $buf;
+ recv($fh,$buf,255,0);
+ my $bufhex = $buf;
+ $bufhex =~ s/(.)/sprintf("0x%x ",ord($1))/eg;
+ #debug return "recv $buf $bufhex";
+ return;
+}
+
+return;
Added: wiregate/plugin/generic/DaemonStartStop
===================================================================
--- wiregate/plugin/generic/DaemonStartStop (rev 0)
+++ wiregate/plugin/generic/DaemonStartStop 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,32 @@
+# Plugin um daemons (Dienste) per KNX Gruppenadresse zu starten/beenden
+# pptpd in diesem Beispiel, geht natuerlich auch fuer alle anderen
+# Eigenen Aufruf-Zyklus auf taeglich setzen
+$plugin_info{$plugname.'_cycle'} = 86400;
+
+##############################################################################
+### Definitionen
+##############################################################################
+my $daemon = "pptpd"; # Name des dienstes
+my $ga = "0/7/254"; # Gruppenadresse, die ihn starten/beenden soll
+
+##############################################################################
+### Ende Definitionen
+##############################################################################
+
+my $dummy;
+if (%msg) {
+ if ($msg{'apci'} eq "A_GroupValue_Write" and $ga eq $msg{'dst'}) {
+ if($msg{'data'}+0) {
+ $dummy = `/etc/init.d/$daemon restart`;
+ return; # "started $daemon
+ } else {
+ $dummy = `/etc/init.d/$daemon stop`;
+ return; # "stopped $daemon
+ }
+ }
+} else {
+ # cyclic/init/change
+ # subscribe GA's
+ $plugin_subscribe{$ga}{$plugname} = 1;
+}
+return;
\ No newline at end of file
Added: wiregate/plugin/generic/Datenlogger-PV-Kaco-Prolog
===================================================================
--- wiregate/plugin/generic/Datenlogger-PV-Kaco-Prolog (rev 0)
+++ wiregate/plugin/generic/Datenlogger-PV-Kaco-Prolog 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,151 @@
+# Monitoring a PV system with Kaco ProLOG
+# v0.1
+
+use LWP::Simple;
+
+# Configuration
+# ****************************
+
+my $myProLogIP = "192.168.178.116"; # IP address of Kaco ProLOG
+my $myCurrentPowerGA = "0/4/236"; # GA for sending current power [W], DPT 14.056
+# ToDo
+my $myEnergy15minGA = "0/4/231"; # GA for sending energy produced in last 15min [Wh], DPT 13.010
+my $myEnergy60minGA = "0/4/232"; # GA for sending energy produced in last 60min [Wh], DPT 13.010
+
+# Arrays to hold GAs for detailed values from the single power converters
+# Use their RS485 bus address as array index
+# If a GA is left empty, it is not send to the bus
+my @myDcVoltageGA; # DC voltage in [V], DPT 14.027
+my @myDcCurrentGA; # DC current in [A], DPT 14.019
+my @myDcPowerGA; # DC power [W], DPT 13.010
+my @myAcVoltageGA; # AC voltage in [V], DPT 14.027
+my @myAcCurrentGA; # AC current in [A], DPT 14.019
+my @myAcPowerGA; # AC power in [W], DPT 13.010
+my @myAcDailyEnergyGA; # Energy output, daily accumulation in [kWh], DPT 13.013
+my @myTemperatureGA; # Temperature of inverter in [°C], DPT 9.001
+my @myStatusGA; # Status of inverter, DPT 5.010
+
+# WR1 Powador 6002
+$myDcVoltageGA[1] = "0/4/237";
+$myDcCurrentGA[1] = "0/4/238";
+$myDcPowerGA[1] = "0/4/239";
+$myAcVoltageGA[1] = "0/4/240";
+$myAcCurrentGA[1] = "0/4/241";
+$myAcPowerGA[1] = "0/4/242";
+$myAcDailyEnergyGA[1] = "0/4/243";
+$myTemperatureGA[1] = "0/4/244";
+$myStatusGA[1] = "0/4/245";
+# WR2 Powador 2002
+$myDcVoltageGA[2] = "0/4/246";
+$myDcCurrentGA[2] = "0/4/247";
+$myDcPowerGA[2] = "0/4/248";
+$myAcVoltageGA[2] = "0/4/249";
+$myAcCurrentGA[2] = "0/4/250";
+$myAcPowerGA[2] = "0/4/251";
+$myAcDailyEnergyGA[2] = "0/4/252";
+$myTemperatureGA[2] = "0/4/253";
+$myStatusGA[2] = "0/4/254";
+
+
+# End Configuration
+# *****************************
+# Do not change below here
+
+my $mySummaryDataDownloadPath = "/html/de/locale_live_standard.html";
+my $myDetailedDataDownloadPath = "/get_online_wr.cgi?q=U_DC_0;I_DC_0;P_DC_WR;U_AC_0;I_AC_0;P_AC_WR;T_WR;E_D_WR;S";
+my @myWRStatusMsg;
+
+$myWRStatusMsg[ 0] = 'WR gerade eingeschaltet';
+$myWRStatusMsg[ 1] = 'Warten auf Start';
+$myWRStatusMsg[ 2] = 'Warten auf Ausschalten';
+$myWRStatusMsg[ 3] = 'Konstantspannungsregler';
+$myWRStatusMsg[ 5] = 'Einspeisung (MPP-Tracker)';
+$myWRStatusMsg[ 8] = 'Selbsttest';
+$myWRStatusMsg[ 9] = 'Testbetrieb';
+$myWRStatusMsg[10] = 'Gerätetemperatur zu hoch';
+$myWRStatusMsg[11] = 'Leistungsbegrenzung';
+$myWRStatusMsg[29] = 'Erdschluss Sicherung prüfen!';
+$myWRStatusMsg[30] = 'Störung Messwandler';
+$myWRStatusMsg[32] = 'Fehler Selbsttest';
+$myWRStatusMsg[33] = 'Fehler DC-Einspeisung';
+$myWRStatusMsg[34] = 'Fehler Kommunikation';
+$myWRStatusMsg[35] = 'Schutzabschaltung (SW)';
+$myWRStatusMsg[36] = 'Schutzabschaltung (HW)';
+$myWRStatusMsg[38] = 'Fehler PV-Überspannung';
+$myWRStatusMsg[41] = 'Netzstörung Unterspannung';
+$myWRStatusMsg[42] = 'Netzstörung Überspannung';
+$myWRStatusMsg[48] = 'Netzstörung Unterfrequenz';
+$myWRStatusMsg[49] = 'Netzstörung Überfrequenz';
+$myWRStatusMsg[50] = 'Netzstörung Mittelwert Spg';
+$myWRStatusMsg[51] = 'Netzstörung Überspannung L1';
+$myWRStatusMsg[52] = 'Netzstörung Unterspannung L1';
+$myWRStatusMsg[53] = 'Netzstörung Überspannung L2';
+$myWRStatusMsg[54] = 'Netzstörung Unterspannung L2';
+$myWRStatusMsg[55] = 'Fehler Zwischenkreis';
+$myWRStatusMsg[57] = 'Warten auf Wiederzuschalten';
+$myWRStatusMsg[58] = 'Übertemperatur Steuerkarte';
+$myWRStatusMsg[59] = 'Fehler Selbsttest';
+$myWRStatusMsg[60] = 'PV-Spannung zu hoch';
+$myWRStatusMsg[61] = 'Power-Control';
+$myWRStatusMsg[62] = 'Inselbetrieb';
+$myWRStatusMsg[63] = 'Frequenzabhängige Leistungsreduzierung';
+$myWRStatusMsg[64] = 'Ausgangsstrombegrenzung';
+$myWRStatusMsg[''] = 'Nicht verfügbar/ausgeschaltet';
+
+$plugin_info{$plugname.'_cycle'} = 30;
+
+my $content = get( "http://$myProLogIP$mySummaryDataDownloadPath" );
+return "Übersichts-Webabfrage fehlgeschlagen" unless defined $content;
+
+my @myOverview = split( /\|/, $content );
+
+# calculate W from kW
+$myOverview[0] *= 1000;
+
+knx_write( $myCurrentPowerGA , $myOverview[0], 14 );
+update_rrd("PV", "P_total", $myOverview[0] );
+
+
+# more detailed data are requested here
+
+$content = get( "http://$myProLogIP$myDetailedDataDownloadPath" );
+return "Detail-Webabfrage fehlgeschlagen" unless defined $content;
+
+my @myDetails = split( /\n/, $content );
+my $myWRStatusChanges = '';
+
+for my $i (2 .. $#myDetails - 1) {
+ $myDetails[$i] =~ s/\r//g; # remove carrige return
+ my @myWRDetails = split( /;/, $myDetails[$i] );
+
+ # only process if system supplies values
+ if( $myWRDetails[2] != '' ) {
+ # store and send values
+ update_rrd( 'PV', "DcVoltage_WR$myWRDetails[1]", $myWRDetails[2] );
+ if( $myDcVoltageGA[ $myWRDetails[1] ] ) { knx_write( $myDcVoltageGA[ $myWRDetails[1] ], $myWRDetails[2], 14 ); }
+ update_rrd( 'PV', "DcCurrent_WR$myWRDetails[1]", $myWRDetails[3] );
+ if( $myDcCurrentGA[ $myWRDetails[1] ] ) { knx_write( $myDcCurrentGA[ $myWRDetails[1] ], $myWRDetails[3], 14 ); }
+ update_rrd( 'PV', "DcPower_WR$myWRDetails[1]", $myWRDetails[4] );
+ if( $myDcPowerGA[ $myWRDetails[1] ] ) { knx_write( $myDcPowerGA[ $myWRDetails[1] ], $myWRDetails[4], 13 ); }
+ update_rrd( 'PV', "AcVoltage_WR$myWRDetails[1]", $myWRDetails[5] );
+ if( $myAcVoltageGA[ $myWRDetails[1] ] ) { knx_write( $myAcVoltageGA[ $myWRDetails[1] ], $myWRDetails[5], 14 ); }
+ update_rrd( 'PV', "AcCurrent_WR$myWRDetails[1]", $myWRDetails[6] );
+ if( $myAcCurrentGA[ $myWRDetails[1] ] ) { knx_write( $myAcCurrentGA[ $myWRDetails[1] ], $myWRDetails[6], 14 ); }
+ update_rrd( 'PV', "AcPower_WR$myWRDetails[1]", $myWRDetails[7] );
+ if( $myAcPowerGA[ $myWRDetails[1] ] ) { knx_write( $myAcPowerGA[ $myWRDetails[1] ], $myWRDetails[7], 13 ); }
+ update_rrd( 'PV', "Temperature_WR$myWRDetails[1]", $myWRDetails[8] );
+ if( $myTemperatureGA[ $myWRDetails[1] ] ) { knx_write( $myTemperatureGA[ $myWRDetails[1] ], $myWRDetails[8], 9 ); }
+ update_rrd( 'PV', "DailyEnergy_WR$myWRDetails[1]", $myWRDetails[9] / 1000 );
+ if( $myAcDailyEnergyGA[ $myWRDetails[1] ] ) { knx_write( $myAcDailyEnergyGA[ $myWRDetails[1] ], $myWRDetails[9]/1000, 13 ); }
+ update_rrd( 'PV', "Status_WR$myWRDetails[1]", $myWRDetails[10] );
+ if( $myStatusGA[ $myWRDetails[1] ] ) { knx_write( $myStatusGA[ $myWRDetails[1] ], $myWRDetails[10], 5 ); }
+
+ # save last status of inverter
+ if ( $myWRDetails[10] != $plugin_info{$plugname."_WRState$myWRDetails[1]"} ) {
+ $myWRStatusChanges .= "WR$myWRDetails[1] Status ".$plugin_info{$plugname."_WRState$myWRDetails[1]"}." (".$myWRStatusMsg[$plugin_info{$plugname."_WRState$myWRDetails[1]"}].") -> ".$myWRDetails[10]." ($myWRStatusMsg[$myWRDetails[10]]) , ";
+ $plugin_info{$plugname."_WRState$myWRDetails[1]"} = $myWRDetails[10];
+ }
+ }
+}
+return $myWRStatusChanges;
+
Added: wiregate/plugin/generic/Denon-Plugin.pl
===================================================================
--- wiregate/plugin/generic/Denon-Plugin.pl (rev 0)
+++ wiregate/plugin/generic/Denon-Plugin.pl 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,112 @@
+# Plugin Denon-AVR
+# Kommunikation via UDP - socat separat einzurichten
+# Version: 0.1 2011-01-31
+
+##################
+### DEFINITION ###
+##################
+
+my $socknum = 118; # Eindeutige Nummer des Sockets +1
+
+# Eigenen Aufruf-Zyklus setzen (Initialisierung/zyklisches pruefen)
+$plugin_info{$plugname.'_cycle'} = 600;
+
+my $send_ip = "localhost"; # Sendeport (UDP, sie in Socket-Einstellungen)
+my $send_port = "50106"; # Sendeport (UDP, sie in Socket-Einstellungen)
+my $recv_ip = "localhost"; # Empfangsport (UDP, sie in Socket-Einstellungen)
+my $recv_port = "50105"; # Empfangsport (UDP, sie in Socket-Einstellungen)
+
+my $denon_ip;
+#$denon_ip = "172.17.2.89:23"; # uncomment to use direct telnet without socat
+
+my $basega = "10/0/0";
+my $numgas = 20;
+# Startadresse
+# 0=PW 1=PWStatus
+
+#######################
+### ENDE DEFINITION ###
+#######################
+
+# Hauptverarbeitung
+if (!$socket[$socknum]) { # socket erstellen
+ if ($denon_ip) {
+ $socket[$socknum] = IO::Socket::INET->new(PeerAddr => $denon_ip, Timeout => 120, Blocking => 0)
+ or return ("open of $denon_ip failed: $!");
+ } else {
+ $socket[$socknum] = IO::Socket::INET->new(LocalPort => $recv_port,
+ Proto => "udp",
+ LocalAddr => $recv_ip,
+ PeerPort => $send_port,
+ PeerAddr => $send_ip,
+ ReuseAddr => 1
+ )
+ or return ("open of $recv_ip : $recv_port failed: $!");
+ }
+
+ $socksel->add($socket[$socknum]); # add socket to select
+
+ $plugin_socket_subscribe{$socket[$socknum]} = $plugname; # subscribe plugin
+ return "opened Socket $socknum";
+}
+
+if (%msg) { # telegramm vom KNX
+ if ($msg{'apci'} eq "A_GroupValue_Write") {
+ my $idx = str2addr($msg{'dst'}) - str2addr($basega);
+ if ($idx==0) {
+ my @vals = qw/PWSTANDBY PWON/; #1bit on/off
+ syswrite($socket[$socknum], $vals[$msg{'data'}]."\r");
+ #1=PW?
+ } elsif ($idx==2) {
+ my @vals = qw /MVDOWN MVUP/; #1bit master-vol
+ syswrite($socket[$socknum], $vals[$msg{'data'}]."\r");
+ } elsif ($idx==3) { # 1byte 0-99
+ syswrite($socket[$socknum], sprintf("MV%02d\r",$msg{'data'}));
+ #4=MV?
+ } elsif ($idx==5) {
+ my @vals = qw /MUOFF MUON/; #1bit mute
+ syswrite($socket[$socknum], $vals[$msg{'data'}]."\r");
+ #6=MU?
+ } elsif ($idx==7) { #1byte source 5=TV 11=ipod 19=usb
+ my @vals = qw /PHONO CD TUNER DVD BD TV SAT\/CBL DVR GAME V.AUX DOCK IPOD NET\/USB NAPSTER LASTFM FLICKR FAVORITES IRADIO SERVER USB\/IPOD/;
+ syswrite($socket[$socknum], "SI".$vals[$msg{'data'}]."\r");
+ #8=SI?
+ } elsif ($idx==9) { #1byte sourround mode 2=ST 6=MCHST 10=Matrix
+ my @vals = ("DIRECT","PURE DIRECT","STEREO","STANDARD","DOLBY DIGITAL","DTS SUROUND","MCH STEREO","ROCK ARENA","JAZZ CLUB","MONO MOVIE","MATRIX","VIDEO GAME","VIRTUAL");
+ syswrite($socket[$socknum], "MS".$vals[$msg{'data'}]."\r");
+ #10=MS?
+ } else {
+ return "dunno? recv KNX $msg{'dst'} $msg{'data'}";
+ }
+ }
+ return;
+} elsif ($fh) { # incoming dgram
+ my $buf = <$fh>;
+ my $bufhex = unpack("H*",$buf);
+ chomp $buf;
+ my $fn = substr($buf,0,2);
+ # this is still very dumb
+ if ($fn eq "PW") {
+ my @vals = qw/PWSTANDBY PWON/; #1bit on/off
+ my( $val )= grep { $vals[$_] eq $buf } 0..$#vals;
+ knx_write(addr2str(str2addr($basega)+1) ,$val,1);
+ return "$val - @vals - $buf";
+ } elsif ($fn eq "MV" and $buf !~ /^MVMAX/) { # MVMAX is undocumented?
+ # broken, just sends every 2, .5 isn't considered
+ knx_write(addr2str(str2addr($basega)+4),substr($buf,2,2),5.010);
+ return "recv $buf ($bufhex)";
+ } else {
+ return "dunno recv $buf ($bufhex)";
+ }
+ return;
+}
+
+for (my $i=0; $i<$numgas;$i++) {
+ $plugin_subscribe{$basega}{$plugname} = 1;
+ $basega = addr2str(str2addr($basega)+1,1);
+}
+
+# insert all commands to be sent cyclic
+syswrite($socket[$socknum],"PW?\r");
+
+return "cycle";
Added: wiregate/plugin/generic/Dreambox-Text
===================================================================
--- wiregate/plugin/generic/Dreambox-Text (rev 0)
+++ wiregate/plugin/generic/Dreambox-Text 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,43 @@
+# Plugin zum versenden von Textmeldungen an die Dreambox
+# Version 0.1 13.03.2011
+# Copyright: swiss (http://knx-user-forum.de/members/swiss.html)
+# License: GPL (v2)
+# Aufbau möglichst so, dass man unterhalb der Einstellungen nichts verändern muss!
+
+
+####################
+###Einstellungen:###
+####################
+
+
+my $aufrufende_ga = '1/1/1';
+my $dreambox_ip = '192.168.1.11';
+my $text = 'Zeile1&Zeile2&Zeile3&usw...'; #Für mehrere Zeilen einfach zwischen den Zeilen ein & einfügen
+
+my $timeout = 10; #Zeit in sekunden in der die Meldung angezeigt wird
+my $type = 2; #Meldungstyp: 1=Info, 2=Neutral, 3=Fehler
+
+
+######################
+##ENDE Einstellungen##
+######################
+
+
+# Eigenen Aufruf-Zyklus auf 1T setzen
+$plugin_info{$plugname.'_cycle'} = 86400;
+# Zyklischer Aufruf nach restart und alle 86400 sek., dient dem anmelden an die Gruppenadresse, einmalig (0) würde in diesem Fall auch genügen
+
+
+
+if ($msg{'apci'} eq "A_GroupValue_Write" and $msg{'dst'} eq $aufrufende_ga) {
+
+while($text =~ /&/) {
+$text =~ s/&/%20%5Cn/;
+}
+
+get( "http://".$dreambox_ip."/web/message?text=".$text."&type=".$type."&timeout=".$timeout );
+} else { # zyklischer Aufruf
+ # Plugin an Gruppenadresse "anmelden", hierdurch wird das Plugin im folgenden bei jedem eintreffen eines Telegramms auf die GA aufgerufen und der obere Teil dieser if-Schleife durchlaufen
+ $plugin_subscribe{$aufrufende_ga}{$plugname} = 1;
+}
+
Added: wiregate/plugin/generic/EIB-Watchdog
===================================================================
--- wiregate/plugin/generic/EIB-Watchdog (rev 0)
+++ wiregate/plugin/generic/EIB-Watchdog 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,18 @@
+# Watchdog fuer KNX-Schnittstelle
+# relevant nur bei USB und evtl. FT1.2 !
+### Config
+my $check_ga = "5/7/5";
+my $check_time = 60;
+### ENDE config
+
+
+# Eigenen Aufruf-Zyklus setzen
+$plugin_info{$plugname.'_cycle'} = $check_time;
+
+if (!knx_read($check_ga,$check_time)) {
+ my $dummy = `/etc/init.d/eibd restart`;
+ return "EIB-Lesefehler! res: $dummy";
+ }
+
+#return "alles paletti";
+return 0;
\ No newline at end of file
Added: wiregate/plugin/generic/EiWoMiSa
===================================================================
--- wiregate/plugin/generic/EiWoMiSa (rev 0)
+++ wiregate/plugin/generic/EiWoMiSa 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,131 @@
+# Plugin Eiwomisa RGB DMX-Controller
+# Version: 0.1 2011-01-21
+# Benötigt Eiwomisa RGB DMX Controller und socat Eintrag für USB-RS232 Wandler
+
+##################
+### DEFINITION ###
+##################
+
+my $socknum = 9; # Eindeutige Nummer des Sockets +1
+
+# Eigenen Aufruf-Zyklus setzen (Initialisierung/zyklisches prüfen)
+$plugin_info{$plugname.'_cycle'} = 300;
+# Gruppenadressen <-> DMX
+# 8Bit/1Byte Dimmwerte werden 1:1 auf DMX-Adressen übersetzt
+my $knx_startGA = "11/1/0"; # DMX-Kanal 0, DMX-Kanal 256=11/1/255, DMX-Kanal 257..512=11/2/0..255
+my $dmx_channels = 8; # Anzahl der DMX-Kanäle, hier 4 für RGBW Eiwomisa, +3 für externen RGB DMX Empfänger [+1, da 0 nicht benutzt]
+
+
+my $dmx_send_ip = "localhost"; # Sendeport (UDP, sie in Socket-Einstellungen)
+my $dmx_send_port = "50015"; # Sendeport (UDP, sie in Socket-Einstellungen)
+
+# pre-defining bytes for serial data stream to Eiwomisa DMX controller
+my $byte1 = 0;
+my $byte2 = 0;
+my $byte3 = 0;
+my $byte4 = 0;
+my $byte5 = 0;
+my $byte6 = 0;
+
+#######################
+### ENDE DEFINITION ###
+#######################
+
+# Hauptverarbeitung
+if (!$socket[$socknum]) { # socket erstellen
+ if (defined $socket[$socknum]) { #debug
+ if ($socket[$socknum]->opened) { $socket[$socknum]->close(); }
+ undef $socket[$socknum];
+ } #debug
+ $socksel->remove($socket[$socknum]);
+ $socket[$socknum] = IO::Socket::INET->new(
+ Proto => "udp",
+ PeerPort => $dmx_send_port,
+ PeerAddr => $dmx_send_ip,
+ ReuseAddr => 1
+ )
+ or return ("open of $dmx_send_ip : $dmx_send_port failed: $!");
+ $socksel->add($socket[$socknum]); # add socket to select
+
+ $plugin_socket_subscribe{$socket[$socknum]} = $plugname; # subscribe plugin
+ for (my $i=0; $i<$dmx_channels;$i++) {
+ $plugin_subscribe{$knx_startGA}{$plugname} = 1;
+ $knx_startGA = addr2str(str2addr($knx_startGA)+1,1);
+ }
+ return "opened UDP-Socket $socknum";
+}
+if (%msg) { # telegramm vom KNX
+
+ my $destN = str2addr($msg{'dst'});
+ my $startN = str2addr($knx_startGA);
+ my $dmxchan = $destN - $startN;
+ if ($msg{'apci'} eq "A_GroupValue_Write" and $destN >= $startN and $destN <= $startN+$dmx_channels) {
+
+
+#---- section specific to Eiwomisa controller ---
+# Encoding value and DMX channel number into specific protocol.
+# For detailed protocol definitions check the website eiwomisa.de
+# Each serial command consists of 6 bytes: 112233445566h
+# 1. Byte = Startbyte, must be 255
+# 2. Byte = 1. part of value, can be 0-254
+# 3. Byte = 2. part of value, can be 0-1
+# 4. Byte = 1. part of channel, can be 0-254
+# 5. Byte = 2. part of channel, can be 0-254
+# 6. Byte = 3. part of channel, can be 0-4
+
+ $byte1 = 255; # Settting start byte
+
+ # encode value
+ if(hex($msg{'data'})>254) {
+ $byte2 = 254; # setting byte 2 to FEh
+ $byte3 = 1; # setting byte 3 to 1h -> Byte 2+3 == FF
+ }else {
+ $byte2 = hex($msg{'data'}); # byte 2 can take up all values until FE
+ $byte3 = 0; # byte 3 will remain empty
+ }
+
+ # encode DMX channel
+ if($dmxchan>512) { # 254+254+4 == 512
+ $byte4 = 254; # setting byte 4
+ $byte5 = 254; # setting byte 5
+ $byte6 = 4; # setting byte 6
+ }
+ elsif ($dmxchan>508) {
+ $byte4 = 254;
+ $byte5 = 254;
+ $byte6 = $dmxchan-508;
+ }
+ elsif($dmxchan>254) {
+ $byte4 = 254;
+ $byte5 = $dmxchan-254;
+ $byte6 = 0;
+ }
+ else {
+ $byte4 = $dmxchan;
+ $byte5 = 0;
+ $byte6 = 0;
+ }
+#---- End of Eiwomisa protocol encode ---
+
+
+ # putting bytes together
+ my $dgram = pack("C[6]",$byte1,$byte2,$byte3,$byte4,$byte5,$byte6);
+
+ # sending to existing socket (via UDP to socat)
+ $socket[$socknum]->send($dgram) or return "send failed: $!";
+
+ ## --uncomment this section for debugging--
+ # my @myArray=unpack('C*', $dgram); # re-converting $dgram
+ # my $myStringHex = ''; # into HEX to be able
+ # foreach my $c (@myArray) { # to see
+ # $myStringHex .= "" . sprintf ("%lX", $c); # what was sent
+ # }
+ ## print debug output to logfile
+ #return "Received GA: $msg{'dst'}, value: $msg{'data'}h, which I will send to DMX channel $dmxchan. Serial byte stream: $myStringHex " ; # debug output
+ ##-- end of debug code --
+
+ }
+}
+
+return;
+
Added: wiregate/plugin/generic/Googleweather
===================================================================
--- wiregate/plugin/generic/Googleweather (rev 0)
+++ wiregate/plugin/generic/Googleweather 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,137 @@
+# Plugin zum Abfragen von Google Weather
+# Version 0.5 2011-02-15
+# Copyright: Bodo (http://knx-user-forum.de/members/bodo.html)
+# License: GPL (v2)
+# Aufbau m\xF6glichst so, dass man unterhalb der Definitionen nichts \xE4ndern muss!
+
+##################
+### DEFINITION ###
+##################
+
+my $city = "Zurich"; # Meine Stadt, hier statt \xFC,\xE4,\xF6 einfach u,a,o nehmen oder ue,ae,oe (Amis halt)
+my $country = "Schweiz"; # Mein Land
+my $lang = "de"; # Meine Sprache
+
+my $google_temp_ga = "7/0/0"; # Gruppenadresse Temperatur (DPT9)
+my $google_hum_ga = "7/0/1"; # Gruppenadresse Luftfeuchte (DPT16)
+my $google_forecast_maxtemp_ga = "7/0/2"; # Gruppenadresse Temperatur Maximum (DPT9)
+my $google_forecast_mintemp_ga = "7/0/3"; # Gruppenadresse Temperatur Minimum (DPT9)
+my $google_clouds_ga = "7/0/4"; # Gruppenadresse Wolken (DPT16)
+my $google_forecast_clouds_ga = "7/0/5"; # Gruppenadresse Vorhersage Wolken (DPT16)
+my $google_wind_ga = "7/0/6"; # Gruppenadresse Wind (DPT16)
+
+my $google_ip = "http://www.google.com/ig/api?weather=";
+my $htdocs = "/var/www/"; # Das Webverzeichnis
+my $google_xml = "google_weather.xml"; # Der XML Datensatz
+my $weather_html = "google_weather.html"; # Ausgabe als HTML
+my $google_css = "google_weather.css"; # Das Stylesheet
+
+$plugin_info{$plugname.'_cycle'} = 600; # Eigenen Aufruf-Zyklus setzen (Initialisierung/zyklisches pr\xFCfen)
+ # nicht zu klein, da die Daten sowieso in l\xE4ngeren Perioden refresht werden
+ # und das Plugin auf die CF schreibt.
+
+#######################
+### ENDE DEFINITION ###
+#######################
+
+# Hauptverarbeitung
+use LWP::Simple;
+use XML::Simple;
+use Encode qw(encode decode);
+# use open ":utf8";
+
+my $url = $google_ip.$city."+".$country."&hl=".$lang;
+my $xml = encode("utf8",get($url));
+# my $xml = get($url);
+die "Couldn't get it!" unless defined $xml;
+
+my $xml_w = ">".$htdocs.$google_xml;
+open(XML, $xml_w); # XML Datei zum Schreiben \xF6ffnen
+ print XML $xml;
+close(XML);
+
+my $weather = XMLin($xml)->{weather};
+
+knx_write($google_temp_ga,$weather->{current_conditions}{temp_c}{data},9);
+
+my $google_hum = $weather->{current_conditions}{humidity}{data};
+$google_hum =~ m/(\s)(\d{1,3})(\s)/; # ($1)($2)($3)
+knx_write($google_hum_ga,$2,5);
+
+knx_write($google_forecast_maxtemp_ga,$weather->{forecast_conditions}[0]{high}{data},9);
+
+knx_write($google_forecast_mintemp_ga,$weather->{forecast_conditions}[0]{low}{data},9);
+
+my $google_clouds = $weather->{current_conditions}{condition}{data};
+if ($google_clouds =~ m/(\D*)(\s)(\D*)/) { # \s findet Zwischenraum (whitspaces). ($1)($2)($3)
+ knx_write($google_clouds_ga,$1." ".$3,16);
+} else {
+ knx_write($google_clouds_ga,$google_clouds,16);
+}
+
+my $google_forecast_clouds = $weather->{forecast_conditions}[0]{condition}{data};
+if ($google_forecast_clouds =~ m/(\D*)(\s)(\D*)/) { # ($1)($2)($3)
+ knx_write($google_forecast_clouds_ga,$1." ".$3,16);
+} else {
+ knx_write($google_forecast_clouds_ga,$google_forecast_clouds,16);
+}
+my $google_wind = $weather->{current_conditions}{wind_condition}{data};
+$google_wind =~ m/(\s)(\D{1,3})(\s)(\D*)(\s)(\d{1,3})(\s)/; # ($1)($2)($3)($4)($5)($6)($7)
+knx_write($google_wind_ga,$2.", ".$6,16);
+
+my $html =
+"<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
+<html>
+<head>
+<title>Wetter</title>
+<meta name='language' content='de'>
+<meta http-equiv='content-type' content='text/html; charset=utf8'>
+<link rel='stylesheet' type='text/css' href='".$google_css."'>
+<style type='text/css'>
+<!--
+td {
+ vertical-align: top;
+ padding: 10px;
+ background-color: black;
+ border: 1px #fff solid;
+ font-family: Verdana,Helvetica,Arial,Sans-serif;
+ font-size: 10px;
+ color: #fff;
+}
+=-->
+</style>
+</head>
+<body>
+<table>".
+
+"<tr><td colspan='5'><h1>".$weather->{forecast_information}{city}{data}.":</h1></td></tr>\n".
+"<tr>\n".
+"<td>\n".
+"<strong>".$weather->{forecast_information}{current_date_time}{data}."</strong><br/>\n".
+"<img src=\"http://www.google.com/".$weather->{current_conditions}{icon}{data}."\" alt=\"".
+$weather->{current_conditions}{condition}{data}."\" /><br/>\n".
+$weather->{current_conditions}{condition}{data}."<br/>\n".
+"Temperatur: ".$weather->{current_conditions}{temp_c}{data}."\xB0 C<br/>\n".
+$weather->{current_conditions}{humidity}{data}."<br/>\n".
+$weather->{current_conditions}{wind_condition}{data}."<br/>\n".
+"</td>\n";
+
+for(my $j=0;$j<4;$j++) {
+$html = $html."<td>\n".
+"<strong>".$weather->{forecast_conditions}[$j]{day_of_week}{data}."</strong><br/>\n".
+"<img src=\"http://www.google.com/".$weather->{forecast_conditions}[$j]{icon}{data}."\" alt=\"".$weather->{forecast_conditions}[$j]{condition}{data}."\" /><br/>\n".
+$weather->{forecast_conditions}[$j]{condition}{data}."<br/>\n".
+"min. ".$weather->{forecast_conditions}[$j]{low}{data}."\xB0 C<br/>max. ".$weather->{forecast_conditions}[$j]{high}{data}."\xB0 C<br/>\n".
+"</td>\n";
+}
+$html = $html."</tr>
+</table>
+</body>";
+
+
+my $html_datei = $htdocs.$weather_html;
+
+open(HTML, ">:utf8", $html_datei); # HTML Datei zum Schreiben \xF6ffnen
+ print HTML $html;
+close(HTML);
+
Added: wiregate/plugin/generic/Highspeed
===================================================================
--- wiregate/plugin/generic/Highspeed (rev 0)
+++ wiregate/plugin/generic/Highspeed 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,30 @@
+# Plugin # Highspeed-polling
+# Version: 0.1 2010-05-10
+# Sensoren tempor\xE4r mit maximaler Geschwindigkeit abfragen lassen
+
+##################
+### DEFINITION ###
+##################
+
+my $ga = "10/4/2";
+my $sensorid = "28.28520E020000";
+
+#######################
+### ENDE DEFINITION ###
+#######################
+
+# wird von GA ausgel\xF6st
+$plugin_info{$plugname.'_cycle'} = 0;
+# anmelden
+$plugin_subscribe{$ga}{$plugname} =1;
+
+if ($msg{'apci'} eq "A_GroupValue_Write" and $msg{'dst'} eq $ga) {
+ if (int($msg{'data'})) {
+ push(@a_owdev_fast,$sensorid) unless grep /$sensorid/, @a_owdev_fast; # avoid dups
+ } else {
+ # remove from highspeed-array
+ @a_owdev_fast = grep !/$sensorid/, @a_owdev_fast;
+ }
+}
+
+return;
Added: wiregate/plugin/generic/M-Bus
===================================================================
--- wiregate/plugin/generic/M-Bus (rev 0)
+++ wiregate/plugin/generic/M-Bus 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,69 @@
+# Perl script um Zählerwerte via MBUS10(Pegelwandler) auszulesen
+# welcher über die serielle Schnittstelle am Wiregate angeschlossen ist
+
+use Device::SerialPort;
+
+##################
+### DEFINITION ###
+##################
+
+my $zaehler_ga="14/6/1"; # Zaehler GA im EIS 9 Format
+my @zaehler_id=(0x10,0x7B,0x01,0x7C,0x16); # Zaehler ID des MBus Geraet
+my $port = Device::SerialPort->new("/dev/usbserial-1-3.4");
+my $anzahl_zeichen=33; # Anzahl Zeichen welche vom MBus Geraet gelesen werden
+
+
+my $send_data = pack("C*", @zaehler_id);
+# Set up the serial port
+# 2400, 81E on the USB2Serial driver
+$port->read_char_time(0); # don't wait for each character
+$port->read_const_time(1000); # 1 second per unfulfilled "read" call
+$port->baudrate(2400);
+$port->databits(8);
+$port->stopbits(1);
+$port->parity("even");
+
+my $timeout=1;
+
+#######################
+### ENDE DEFINITION ###
+#######################
+
+# Eigenen Aufruf-Zyklus auf X Sekunden setzen
+$plugin_info{$plugname.'_cycle'} = 300;
+
+# Hauptverarbeitung
+
+my $count_out = $port->write("$send_data\n")
+ || die "Kann Daten nicht schreiben ...\n";
+
+my $chars=0;
+my $buffer="";
+while ($timeout > 0) {
+ my ($count,$saw)=$port->read($anzahl_zeichen);
+ if ($count > 0) {
+ $chars+=$count;
+ $buffer.=$saw;
+ }
+ else {
+ $timeout--;
+ }
+}
+
+# If we get data, then print it
+my $data="";
+if ($chars eq $anzahl_zeichen) {
+ $data=unpack("H*", $buffer);
+ my $zaehlerstand=int(substr($data,60,2) . substr($data,58,2) . substr($data,56,2) . substr($data,54
+,2));
+ if ($plugin_info{$plugname.'_result_saved'} < $zaehlerstand) {
+ $plugin_info{$plugname.'_result_saved'} = $zaehlerstand;
+ knx_write($zaehler_ga,$zaehlerstand,14); # Zaehlerstand auf den Bus schreiben
+ return $zaehlerstand;
+ } else {
+ return 0;
+ }
+} else {
+ return "no data received!\n";
+}
+
Added: wiregate/plugin/generic/Nacht-Nachdimmen
===================================================================
--- wiregate/plugin/generic/Nacht-Nachdimmen (rev 0)
+++ wiregate/plugin/generic/Nacht-Nachdimmen 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,33 @@
+# Nachts Licht nur gedimmt einschalten.
+# Plugin hört auf GA des Ein-Befehles und schickt Dimmwert hinterher.
+# V0.5 2011-03-06
+
+### Definitionen
+### Hier werden die Werte/Gruppenadressen definiert
+my $lichtein_ga = "1/1/11"; # Gruppenadresse Licht Ein/Aus
+my $lichtdim_ga = "1/3/65"; # Gruppenadresse Licht Dimmwert
+my $dimvalue = 25; # Dimmwert
+my $starthour = 21; # Stunde, ab der gedimmt werden soll
+my $endhour = 7; # Stunde, ab der nicht mehr gedimmt werden soll
+### Ende Definitionen
+
+# Eigenen Aufruf-Zyklus auf 1x täglich setzen, hört ja auf GA
+$plugin_info{$plugname.'_cycle'} = 86400;
+
+# Plugin an Gruppenadresse "anmelden"
+$plugin_subscribe{$lichtein_ga}{$plugname} = 1;
+
+# Nur bei einer gesendeten 1 reagieren
+if ($msg{'apci'} eq "A_GroupValue_Write" && $msg{'dst'} eq $lichtein_ga && defined $msg{'value'} && $msg{'value'} == "1" ) {
+ # Aktuelle Stunde
+ my $crthour = `date \"+%H\"`;
+ # Wenn innerhalb des Zeitraumes
+ if ($crthour >= $starthour || $crthour <=$endhour) {
+ knx_write($lichtdim_ga,$dimvalue,5); # Dimmwert senden
+ #return "Gedimmt";
+ }
+}
+
+# Kein Log
+return 0;
+
Added: wiregate/plugin/generic/PI-Regler
===================================================================
--- wiregate/plugin/generic/PI-Regler (rev 0)
+++ wiregate/plugin/generic/PI-Regler 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,83 @@
+# Demo-Plugin PI-Regler (einfach)
+# V1.11 2010-12-14
+
+### Definitionen
+### Hier werden die Werte/Gruppenadressen definiert
+my $aktiv_ga = "14/5/50";
+my $sollwert = 24.0; # statischer Sollwert, nur falls nicht von sollwert_ga lesbar!
+my $sollwert_ga = "3/2/57"; # Gruppenadresse f\xFCr Temperatur-Sollwert DPT9 - leer f\xFCr statischen
+my $istwert_ga = "3/2/56"; # Gruppenadresse f\xFCr Temperatur-Istwert DPT9
+my $ventil_ga_8bit = "14/5/63"; # Gruppenadresse f\xFCr Stellantrieb 8bit/1Byte
+my $taktzeit = 15; # Taktzeit in Minuten f\xFCr schaltenden Stellantrieb-Regler
+my $proportional = 50; # Proportionalbereich (P)
+my $nachstellzeit = 240; # Nachstellzeit in Minuten; Standard 50/240 f\xFCr FBH
+### Ende Definitionen
+
+
+# Eigenen Aufruf-Zyklus auf 60 Sekunden setzen
+# der Aufrufzyklus ist unabh\xE4ngig von der Taktzeit und muss k\xFCrzer sein!
+$plugin_info{$plugname.'_cycle'} = 60;
+
+my $aktiviert = knx_read($aktiv_ga) || 1; # aktiv falls Adresse nicht lesbar
+if (!int($aktiviert)) {
+ if (knx_read($ventil_ga_8bit) ne 0) { # nur wenn nicht bereits 0
+ knx_write($ventil_ga_8bit,0,5); # Ventilstellung als DPT5 auf den Bus schreiben
+ }
+ $plugin_info{$plugname.'_esum1'} = 0;
+ $plugin_info{$plugname.'_stellung1'} = 0; # Reset
+ return;
+}
+
+if ($sollwert_ga) {
+ # Plugin an Gruppenadresse "anmelden"
+ $plugin_subscribe{$sollwert_ga}{$plugname} = 1;
+
+ if ($msg{'apci'} eq "A_GroupValue_Write" and $msg{'dst'} eq $sollwert_ga) {
+ #sollwert vom bus
+ if (!defined $msg{'value'}) {
+ # falls GA/DPT nicht importiert
+ $msg{'value'} = decode_dpt9($msg{'data'});
+ }
+ $plugin_info{$plugname.'_sollwert'} = $msg{'value'};
+
+ #Wenn sollwert alt ungleich neu: reset
+ if ($msg{'value'} != $plugin_info{$plugname.'_sollwert'}) {
+ $plugin_info{$plugname.'_esum1'} = 0;
+ $plugin_info{$plugname.'_stellung1'} = 0;
+ }
+ }
+} else {
+ $plugin_info{$plugname.'_sollwert'} = $sollwert;
+}
+
+if (time() - $plugin_info{$plugname.'_tlast'} > $taktzeit*60) { # Aktualisierung nur nach taktzeit
+ $plugin_info{$plugname.'_tlast'} = time();
+ my $istwert = knx_read($istwert_ga,300,9); # gecached lesen, max. 300s alt, DPT9
+ my $stellungalt1 = $plugin_info{$plugname.'_stellung1'};
+
+ # Reglerstellung berechnen
+ my $kp = (1000/$proportional);
+ my $e = ($plugin_info{$plugname.'_sollwert'} - $istwert);
+ if ($stellungalt1 <= 100 and $stellungalt1 >=0) {
+ $plugin_info{$plugname.'_esum1'} = $plugin_info{$plugname.'_esum1'} + $e;
+ }
+ my $v4 = ($plugin_info{$plugname.'_esum1'} * $kp * $taktzeit / $nachstellzeit);
+ $plugin_info{$plugname.'_stellung1'} = ($e * $kp) + $v4;
+
+ if ($plugin_info{$plugname.'_stellung1'} >100) {
+ $plugin_info{$plugname.'_stellung1'}=100;
+ $plugin_info{$plugname.'_esum1'} = ($stellungalt1 - $e * $kp) * $nachstellzeit / $kp / $taktzeit;
+ }
+ if ($plugin_info{$plugname.'_stellung1'} <0 or $plugin_info{$plugname.'_esum1'} <0) {
+ $plugin_info{$plugname.'_esum1'} = 0;
+ $plugin_info{$plugname.'_stellung1'} = 0 if $plugin_info{$plugname.'_stellung1'} <0;
+ }
+ $plugin_info{$plugname.'_stellung1'} = round($plugin_info{$plugname.'_stellung1'});
+ if ($ventil_ga_8bit) {
+ knx_write($ventil_ga_8bit,$plugin_info{$plugname.'_stellung1'},5); # Ventilstellung als DPT5 auf den Bus schreiben
+ }
+# Logeintrag auskommentiert
+#return "Soll $plugin_info{$plugname.'_sollwert'} Ist $istwert P $proportional I $plugin_info{$plugname.'_esum1'} Stell $plugin_info{$plugname.'_stellung1'}";
+}
+
+return 0; # Kein Logeintrag
Added: wiregate/plugin/generic/Ping-check
===================================================================
--- wiregate/plugin/generic/Ping-check (rev 0)
+++ wiregate/plugin/generic/Ping-check 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,73 @@
+# Zum Anzeigen des Status mehrerer Netzwerkgeräte oder der Internetverbindung
+# Aufgrund der Laufzeitbeschränkung der Plugins nicht mehr als 4-5 IPs testen
+#
+# Diese Plugin nutzt einen Ping zum Test
+
+### Definitionen
+my @start_ga = ( "1/1/2", "1/1/4" ); # Gruppenadressen um den Test auszulösen,
+ # wenn nur eine GA angegeben wird, werden alle IPs geprüft
+my @return_ga = ( "1/1/1", "1/1/3" ); # Gruppenadressen zur Rückmeldung,
+ # die Anzahl muss mit der Anzahl der IP-Adressen übereinstimmen)
+my @ip_address = ( "192.168.0.1", "192.168.0.2" ); # IP-Adressen der zu testenden PCs/Geräte
+my $auto_test = "60"; # Wert für automatischen Test in Sekunden, leer lassen für keinen auto test,
+ # wenn ein Wert eingetragen wurde, werden immer IPs alle getestet
+### Ende Definitionen
+
+# Plugin an Gruppenadresse(n) "anmelden"
+foreach(@start_ga)
+{
+ $plugin_subscribe{$start_ga[$_]}{$plugname} = 1;
+}
+
+# Eigenen Aufruf-Zyklus auf x Sekunden setzen
+# der Aufrufzyklus ist unabhängig von der Taktzeit und muss kürzer sein!
+if ( $auto_test > 0 ) {
+ $plugin_info{$plugname.'_cycle'} = $auto_test;
+} else {
+ $plugin_info{$plugname.'_cycle'} = 86400; # Aufruf alle 24 Stunden
+}
+
+
+my $on_off;
+if ( @start_ga == 1 || $auto_test > 0 ) {
+ # Alle Geräte/PCs testen
+ test_all();
+} else {
+ # Nur den aufgerufenden PCs testen
+ if (%msg) {
+ if ($msg{'apci'} eq "A_GroupValue_Write") {
+ foreach(@start_ga) {
+ if ($msg{'dst'} eq $start_ga[$_]) {
+ $on_off = ping_test($ip_address[$_]);
+ if ( $on_off == 1 || $on_off == 0 ) {
+ knx_write($return_ga[$_],$on_off,1);
+ }
+ }
+ }
+ }
+ }
+}
+
+return;
+
+sub test_all {
+ foreach(@return_ga) {
+ # Status des Netzwerkgerätes durch einen Ping testen
+ $on_off = ping_test($ip_address[$_]);
+ # Je nach Ergebnis eine Rückmeldung geben
+ if ( $on_off == 1 || $on_off == 0 ) {
+ knx_write($return_ga[$_],$on_off,1);
+ }
+ }
+ return;
+}
+
+sub ping_test {
+ (my $ip_adr) = @_;
+ my $command = "ping -c 2 -w 2 ".$ip_adr;
+ my $status = `$command`;
+ if($status =~ /bytes from/) { return 1; }
+ elsif($status =~ /0 received/) { return 0; }
+ return "Ein Fehler ist beim Testen der IP $ip_adr aufgetreten";
+}
+
Added: wiregate/plugin/generic/Prowl.pl
===================================================================
--- wiregate/plugin/generic/Prowl.pl (rev 0)
+++ wiregate/plugin/generic/Prowl.pl 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,108 @@
+# Plugin um Nachrichten an Prowl zu senden
+# Version: 0.1 2010-10-14
+# Ben\xF6tigt einen Prowl-Account sowie API-Key
+
+##################
+### DEFINITION ###
+##################
+
+my $socknum = 8; # Eindeutige Nummer des Sockets
+
+# Eigenen Aufruf-Zyklus setzen (Initialisierung/zyklisches pr\xFCfen)
+$plugin_info{$plugname.'_cycle'} = 300;
+
+my %options = ();
+$options{'apikey'} = "xyzxyz";
+
+
+# Zwei M\xF6glichkeiten zur Nutzung:
+# VARIANTE 1: Bitwert auf GA sendet fixes Nachricht:
+my %prowl_ga; # Eintrag darf nicht auskommentiert werden, solange nachfolgend keine GA definiert erfolgt kein Versand!
+$prowl_ga{'14/5/208'} = '0;Event;Description Hallo;Application'; # Priority,Event,Description,Application - ggfs. NUR DIESE Zeile auskommentieren!
+
+# VARIANTE 2: Plugin horcht auf UDP-Port und empf\xE4ngt Format PRIO;Event;Description;Application\n
+my $recv_ip = "0.0.0.0"; # Empfangs-IP
+my $recv_port = "50018"; # Empfangsport
+
+#######################
+### ENDE DEFINITION ###
+#######################
+
+# Hauptverarbeitung
+if (!$socket[$socknum]) { # socket erstellen
+ if (defined $socket[$socknum]) { #debug
+ if ($socket[$socknum]->opened) { $socket[$socknum]->close(); }
+ undef $socket[$socknum];
+ } #debug
+ $socksel->remove($socket[$socknum]);
+ $socket[$socknum] = IO::Socket::INET->new(LocalPort => $recv_port,
+ Proto => "udp",
+ LocalAddr => $recv_ip,
+ ReuseAddr => 1
+ )
+ or return ("open of $recv_ip : $recv_port failed: $!");
+ $socksel->add($socket[$socknum]); # add socket to select
+ $plugin_socket_subscribe{$socket[$socknum]} = $plugname; # subscribe plugin
+ # subscribe GA's
+ while( my ($k, $v) = each(%prowl_ga) ) {
+ # Plugin an Gruppenadresse "anmelden"
+ $plugin_subscribe{$k}{$plugname} = 1;
+ }
+ return "opened UDP-Socket $socknum";
+}
+
+if (%msg) { # telegramm vom KNX
+ if ($msg{'apci'} eq "A_GroupValue_Write" and $prowl_ga{$msg{'dst'}}) {
+ return sendProwl($prowl_ga{$msg{'dst'}});
+ }
+} elsif ($fh) { # UDP-Packet
+ my $buf = <$fh>;
+ chomp $buf;
+ return sendProwl($buf);
+} else {
+ # cyclic/init/change
+ # subscribe GA's
+ while( my ($k, $v) = each(%prowl_ga) ) {
+ # Plugin an Gruppenadresse "anmelden"
+ $plugin_subscribe{$k}{$plugname} = 1;
+ }
+ return; # ("return dunno");
+}
+
+sub sendProwl {
+ ($options{'priority'},$options{'event'},$options{'description'},$options{'application'}) = split ';',shift;
+ use LWP::UserAgent;
+ $options{'priority'} ||= 0;
+ $options{'application'} ||= "WireGate KNX"; # Application fuer Telegramme
+ # URL encode our arguments
+ $options{'application'} =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
+ $options{'event'} =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
+ $options{'notification'} =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
+ # Generate our HTTP request.
+ my ($userAgent, $request, $response, $requestURL);
+ $userAgent = LWP::UserAgent->new;
+ $userAgent->agent("WireGatePlugin/1.0");
+
+ $requestURL = sprintf("https://prowl.weks.net/publicapi/add?apikey=%s&application=%s&event=%s&description=%s&priority=%d",
+ $options{'apikey'},
+ $options{'application'},
+ $options{'event'},
+ $options{'notification'},
+ $options{'priority'});
+
+ $request = HTTP::Request->new(GET => $requestURL);
+ #$request->timeout(5);
+
+ $response = $userAgent->request($request);
+
+ if ($response->is_success) {
+ return "Notification successfully posted: $options{'priority'},$options{'event'},$options{'description'},$options{'application'}";
+ } elsif ($response->code == 401) {
+ return "Notification not posted: incorrect API key.";
+ } else {
+ return "Notification not posted: " . $response->content;
+ }
+
+}
+
+return;
Added: wiregate/plugin/generic/RFID-Leser
===================================================================
--- wiregate/plugin/generic/RFID-Leser (rev 0)
+++ wiregate/plugin/generic/RFID-Leser 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,62 @@
+# Plugin R.S-Systems RFID-Reader to KNX
+# Version: 0.2 2010-10-02
+# Ben\xF6tigt
+# - RSS RFID-Reader an einem USB-Seriell-Wandler
+# - Eintrag unter Socketverbindungen (socat)
+
+##################
+### DEFINITION ###
+##################
+
+my $socknum = 5; # Eindeutige Nummer des Sockets +1
+
+# Eigenen Aufruf-Zyklus setzen (Initialisierung/zyklisches pr\xFCfen)
+$plugin_info{$plugname.'_cycle'} = 300;
+
+my $recv_ip = "192.168.xxx.xxx"; # Empfangsport (UDP, wie in Socket-Einstellungen)
+my $recv_port = "50011"; # Empfangsport (UDP, wie in Socket-Einstellungen)
+my %rfid_ga;
+$rfid_ga{'30343136323c3634373a20'} = '11/2/1'; # Gruppenadresse auf die bei dieser RFID gesendet wird
+#.. usw.
+my $interval = 30; # Sendeintervall f\xFCr RFIDs in Reichweite in Sekunden
+
+#######################
+### ENDE DEFINITION ###
+#######################
+
+# Hauptverarbeitung
+# or ($fh and eof($socket[$socknum]))
+if (!$socket[$socknum]) { # socket erstellen
+ if (defined $socket[$socknum]) { #debug
+ if ($socket[$socknum]->opened) { $socket[$socknum]->close(); }
+ undef $socket[$socknum];
+ } #debug
+ $socksel->remove($socket[$socknum]);
+ $socket[$socknum] = IO::Socket::INET->new(LocalPort => $recv_port,
+ Proto => "udp",
+ LocalAddr => $recv_ip
+ )
+ or return ("open of $recv_ip : $recv_port failed: $!");
+ $socksel->add($socket[$socknum]); # add socket to select
+ $plugin_socket_subscribe{$socket[$socknum]} = $plugname; # subscribe plugin
+ return "opened UDP-Socket $socknum";
+}
+elsif ($fh) { # Read from UDP-Socket
+ my $buf;
+ recv($fh,$buf,255,0);
+ next if(!$buf || length($buf) < 2); # Bogus messages
+ my $bufhex = $buf;
+ $bufhex =~ s/(.)/sprintf("%x",ord($1))/eg;
+ if (time() - $plugin_info{$plugname.'_rfidlast_'.$bufhex} < $interval) {
+ # repeated
+ return;
+ }
+ $plugin_info{$plugname.'_rfidlast_'.$bufhex} = time();
+ if ($rfid_ga{$bufhex}) {
+ knx_write($rfid_ga{$bufhex},1,1);
+ return "RFID $bufhex - sent 1 to $rfid_ga{$bufhex}";
+ }
+ return "Unknown RFID $bufhex";
+}
+return;
+
Added: wiregate/plugin/generic/Roomba-Graph
===================================================================
--- wiregate/plugin/generic/Roomba-Graph (rev 0)
+++ wiregate/plugin/generic/Roomba-Graph 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,20 @@
+# roomba abfragen und Grafiken speichern
+
+# Eigenen Aufruf-Zyklus auf 300 Sekunden (Default globales RRD-Intervall) setzen
+$plugin_info{$plugname.'_cycle'} = $wg_config{''}{'rrd_interval'};
+
+# Werte holen
+
+my ($dist,$voltage,$current,$temp,$charge,$capacity) = split (',',`/root/roombacmd -p /dev/rfcomm0 -C`);
+
+return "timeout" unless $capacity;
+
+chomp($capacity);
+update_rrd("roomba_EG_volt","",$voltage);
+update_rrd("roomba_EG_current","",$current);
+update_rrd("roomba_EG_temp","",$temp);
+update_rrd("roomba_EG_charge","",$charge);
+update_rrd("roomba_EG_capacity","",$capacity);
+
+#return "RRDs wurden aktualisiert";
+return 0;
\ No newline at end of file
Added: wiregate/plugin/generic/Schwellwert
===================================================================
--- wiregate/plugin/generic/Schwellwert (rev 0)
+++ wiregate/plugin/generic/Schwellwert 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,58 @@
+# Demo-Plugin Schwellwertschalter
+# V1.0 2010-03-19
+
+### Definitionen
+# Eigenen Aufruf-Zyklus auf 300 Sekunden setzen
+$plugin_info{$plugname.'_cycle'} = 300;
+my $wert_ga = "5/2/79"; # Gruppenadresse mit dem Wert
+my $schwellwert = 35; # Schwellwert
+my $ziel_ga = "14/6/10"; # Adresse an die Wert bei Unter/\xFCberschreitung gesendet wird
+### Ende Definitionen
+
+
+my $luftfeuchte;
+# Plugin an Gruppenadresse "anmelden"
+$plugin_subscribe{$wert_ga}{$plugname} = 1;
+
+# Nun kommt es darauf an, ob das Plugin aufgrund eines eintreffenden Telegramms
+# oder zyklisch aufgerufen wird! Wir wollen beides..
+# Bei eintreffenden Telegrammen reagieren wir gezielt auf "Write" (gibt ja auch Read/Response)
+# und die spezifische Gruppenadresse, das Plugin k\xF6nnte ja bei mehreren "angemeldet" sein.
+if ($msg{'apci'} eq "A_GroupValue_Write" and $msg{'dst'} eq $wert_ga) {
+ $luftfeuchte = $msg{'value'};
+ #oder nur falls nicht importiert: $msg{'data'} ist dann leer/undef!
+ #$luftfeuchte = decode_dpt9($msg{'data'});
+
+} else { # zyklischer Aufruf
+ # "9" (DPT) kann entfallen falls richtig importiert!
+ $luftfeuchte = knx_read($wert_ga,300,9);
+}
+
+if ($luftfeuchte >= $schwellwert and $plugin_info{$plugname.'_merker_schwellwert1'} ne 1) {
+ # Sende an ZielGA den Wert "1" als 1bit-Wert (DPT1)
+ # "1" (DPT) kann entfallen falls richtig importiert!
+ knx_write($ziel_ga,1,1);
+ # und merken
+ $plugin_info{$plugname.'_merker_schwellwert1'} = 1;
+} elsif ($luftfeuchte < $schwellwert and $plugin_info{$plugname.'_merker_schwellwert1'} eq 1) {
+ # unter Schwellwert,vorher aktiv -> sende 0
+ knx_write($ziel_ga,0,1);
+ # und merken
+ $plugin_info{$plugname.'_merker_schwellwert1'} = 0;
+}
+
+return;
+# verf\xFCgbare Daten in %msg:
+# $msg{'repeated'} 0/1
+# $msg{'sequence'} 0-xxx
+# $msg{'buf'} Rohdaten LPDU
+# $msg{'src'} Quelladresse
+# $msg{'tpdu_type'} T_DATA_XXX_REQ
+# $msg{'data'} rohe Telegrammdaten
+# $msg{'rcount'} Routing-Z\xE4hler
+# $msg{'apci'} A_GroupValue_Write,A_GroupValue_Read,A_GroupValue_Response (u.v.m)
+# $msg{'class'} low/alarm/high/system
+# $msg{'dst'} Zieladresse x/y/z
+# $msg{'datalen'} Datenl\xE4nge
+# $msg{'value'} Dekodierter Klartext-Wert (nur falls ESF importiert!)
+
Added: wiregate/plugin/generic/Taupunkt.pl
===================================================================
--- wiregate/plugin/generic/Taupunkt.pl (rev 0)
+++ wiregate/plugin/generic/Taupunkt.pl 2011-05-28 23:19:24 UTC (rev 348)
@@ -0,0 +1,63 @@
+# Plugin zur Taupunktberechnung
+# Details zur N\xE4herungsformel unter http://www.wettermail.de/wetter/feuchte.html
+# Das Plugin geht da...
[truncated message content] |