Initial version

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@3 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2007-01-30 12:47:36 +00:00
commit a5b914121c
107 changed files with 14766 additions and 0 deletions

33
contrib/99_PRIV.pm Executable file
View File

@@ -0,0 +1,33 @@
##############################################
# Example for notifying with perl-code, in a proper file, not inline.
# Add the following line to the configuration file (02_fs20):
# notifyon btn3 {MyFunc("@", "%")}
# and put this file in the <modpath>/FHEM directory.
package main;
use strict;
use warnings;
sub
PRIV_Initialize($$)
{
my ($hash, $init) = @_;
$hash->{Category} = "none";
}
sub
MyFunc($$)
{
my ($a1, $a2) = @_;
Log 2, "Device $a1 was set to $a2 (type: $defs{$a1}{TYPE})";
if($a2 eq "on") {
fhz "roll1 on-for-timer 10";
fhz "roll2 on-for-timer 16");
} else {
fhz "roll1 off";
fhz "roll2 off";
}
}
1;