|
From: <vl...@us...> - 2011-09-24 07:33:36
|
Revision: 423
http://openautomation.svn.sourceforge.net/openautomation/?rev=423&view=rev
Author: vlamers
Date: 2011-09-24 07:33:30 +0000 (Sat, 24 Sep 2011)
Log Message:
-----------
Plugin to control a garage door with 2 Reeds and 1 switch module
Added Paths:
-----------
wiregate/plugin/generic/Garagentor.pl
Added: wiregate/plugin/generic/Garagentor.pl
===================================================================
--- wiregate/plugin/generic/Garagentor.pl (rev 0)
+++ wiregate/plugin/generic/Garagentor.pl 2011-09-24 07:33:30 UTC (rev 423)
@@ -0,0 +1,92 @@
+##########################################################
+
+#################################################################
+# do not change anything below, all config stays above
+#################################################################
+## GA\xB4s
+my $Garage_zu ='14/0/1';
+my $Garage_zu_rueck = '14/0/4';
+my $Garage_auf = '14/0/0';
+my $Garage_auf_rueck = '14/0/3';
+my $Garage_schalten = '14/0/6';
+
+
+# subscribe plugin and call it only when necessary, script will be activated if telegrams to the deffined GA are send.
+$plugin_subscribe{$Garage_zu}{$plugname} = 1;
+$plugin_subscribe{$Garage_auf}{$plugname} = 1;
+$plugin_subscribe{$Garage_zu_rueck}{$plugname} = 1;
+$plugin_subscribe{$Garage_auf_rueck}{$plugname} = 1;
+$plugin_info{$plugname.'_cycle'} = 0;
+
+
+
+
+
+
+## tor zu
+ if (($msg{'dst'} eq ($Garage_zu)) && ($msg{'apci'} eq 'A_GroupValue_Write'))
+ {
+ ## Status der GA\xB4s holen
+ my $status = knx_read($Garage_zu_rueck,0,1);
+
+ if (($msg{'value'} == 01) && ($status == 00)) {
+ knx_write($Garage_schalten,1,1);
+ return "zu";
+ }
+ if (($msg{'value'} == 01) && ($status == 01)) {
+ knx_write($Garage_zu,0,1);
+ return "zu";
+ }
+
+ else {
+ return;
+ }}
+# zu reset
+ if (($msg{'dst'} eq ($Garage_zu_rueck)) && ($msg{'apci'} eq 'A_GroupValue_Write'))
+ {
+ my $garage_soll = knx_read($Garage_zu,0,1);
+
+ if (($msg{'data'} == 01) && ($garage_soll == 01)) {
+ knx_write($Garage_zu ,0,1);
+ }
+ if (($msg{'data'} == 01) && ($garage_soll == 00)) {
+ knx_write($Garage_schalten ,1,1);
+ }
+
+ }
+
+## auf reset
+ if (($msg{'dst'} eq ($Garage_auf_rueck)) && ($msg{'apci'} eq 'A_GroupValue_Write'))
+ {
+ my $garage_soll = knx_read($Garage_auf,0,1);
+
+ if (($msg{'data'} == 01) && ($garage_soll == 01)) {
+ knx_write($Garage_auf ,0,1);
+ }
+ if (($msg{'data'} == 01) && ($garage_soll == 00)) {
+ knx_write($Garage_schalten ,1,1);}
+
+ }
+
+## tor auf
+if (($msg{'dst'} eq ($Garage_auf)) && ($msg{'apci'} eq 'A_GroupValue_Write'))
+ {
+ ## Status der GA\xB4s holen
+ my $status = knx_read($Garage_auf_rueck,0,1);
+
+
+ if (($msg{'value'} == 01) && ($status == 00)) {
+ knx_write($Garage_schalten,1,1);
+ return "auf";
+ }
+
+ if (($msg{'value'} == 01) && ($status == 01)) {
+ knx_write($Garage_auf,0,1);
+ return "auf";
+ }
+
+ else {
+ return;
+ }
+ }
+
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vl...@us...> - 2011-09-24 09:21:58
|
Revision: 424
http://openautomation.svn.sourceforge.net/openautomation/?rev=424&view=rev
Author: vlamers
Date: 2011-09-24 09:21:52 +0000 (Sat, 24 Sep 2011)
Log Message:
-----------
Modified Paths:
--------------
wiregate/plugin/generic/Garagentor.pl
Modified: wiregate/plugin/generic/Garagentor.pl
===================================================================
--- wiregate/plugin/generic/Garagentor.pl 2011-09-24 07:33:30 UTC (rev 423)
+++ wiregate/plugin/generic/Garagentor.pl 2011-09-24 09:21:52 UTC (rev 424)
@@ -1,8 +1,13 @@
-##########################################################
+# Plugin um komfortabel Befehle \xFCber den IRTrans auszul\xF6sen
+# Version 0.1 24.11.2011
+# Copyright: vlamers (http://knx-user-forum.de/members/vlamers.html)
+# License: GPL (v2)
+# Aufbau m\xF6glichst so, dass man unterhalb der Einstellungen nichts ver\xE4ndern muss!
-#################################################################
-# do not change anything below, all config stays above
-#################################################################
+
+####################
+###Einstellungen:###
+####################
## GA\xB4s
my $Garage_zu ='14/0/1';
my $Garage_zu_rueck = '14/0/4';
@@ -11,6 +16,10 @@
my $Garage_schalten = '14/0/6';
+######################
+##ENDE Einstellungen##
+######################
+
# subscribe plugin and call it only when necessary, script will be activated if telegrams to the deffined GA are send.
$plugin_subscribe{$Garage_zu}{$plugname} = 1;
$plugin_subscribe{$Garage_auf}{$plugname} = 1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vl...@us...> - 2011-09-24 19:05:59
|
Revision: 425
http://openautomation.svn.sourceforge.net/openautomation/?rev=425&view=rev
Author: vlamers
Date: 2011-09-24 19:05:53 +0000 (Sat, 24 Sep 2011)
Log Message:
-----------
Modified Paths:
--------------
wiregate/plugin/generic/Garagentor.pl
Modified: wiregate/plugin/generic/Garagentor.pl
===================================================================
--- wiregate/plugin/generic/Garagentor.pl 2011-09-24 09:21:52 UTC (rev 424)
+++ wiregate/plugin/generic/Garagentor.pl 2011-09-24 19:05:53 UTC (rev 425)
@@ -1,4 +1,4 @@
-# Plugin um komfortabel Befehle \xFCber den IRTrans auszul\xF6sen
+# Plugin um ein Garagentor \xFCber einen Schaltaktor-Kanal und 2 Reed Kontakten zu bedienen
# Version 0.1 24.11.2011
# Copyright: vlamers (http://knx-user-forum.de/members/vlamers.html)
# License: GPL (v2)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|