fhemweb.pl converted to a FHEM module

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@141 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2007-12-31 14:43:02 +00:00
parent 297dc0d803
commit f9ec89b35f
7 changed files with 1029 additions and 43 deletions

34
webfrontend/pgm2/98_weblink.pm Executable file
View File

@@ -0,0 +1,34 @@
##############################################
package main;
use strict;
use warnings;
#####################################
sub
weblink_Initialize($)
{
my ($hash) = @_;
$hash->{DefFn} = "weblink_Define";
}
#####################################
sub
weblink_Define($$)
{
my ($hash, $def) = @_;
my ($type, $name, $wltype, $link) = split("[ \t]+", $def, 4);
my %thash = ( link=>1, fileplot=>1 );
if(!$link || !$thash{$wltype}) {
return "Usage: define <name> weblink [" . join("|",sort keys %thash) . "] <httplink>";
}
$hash->{WLTYPE} = $wltype;
$hash->{LINK} = $link;
$hash->{STATE} = "initial";
return undef;
}
1;