2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-12 22:56:34 +00:00

V1.0.1 Bugfixes 'defptr'

git-svn-id: https://svn.fhem.de/fhem/trunk@640 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parix 2010-05-24 17:42:23 +00:00
parent df207c8d77
commit 65784c33d2

View File

@ -1,8 +1,12 @@
################################################################################ ################################################################################
# Route RAW-Sensor-Data via FHEMWEB/CGI to fhem.pl: Function -> disptach($$$)
# 99_CGI_RAWMSG # 99_CGI_RAWMSG
# #
# Route RAW-Sensor-Data via FHEMWEB/CGI to fhem.pl: Function -> disptach($$$) # Version: 1.0.1
# Date: 24.05.2010
# Author: Axel Rieger
# #
################################################################################
# Examples for RAW-Sensor-Data # Examples for RAW-Sensor-Data
# WBS = WeB-Sensors # WBS = WeB-Sensors
# WBS:SENSOR-CODE:SENSOR-TYPE:VALUE:TIMESTAMP # WBS:SENSOR-CODE:SENSOR-TYPE:VALUE:TIMESTAMP
@ -51,10 +55,10 @@ sub CGI_RAWMSG_Dispatch($$)
{ {
my ($htmlarg) = @_; my ($htmlarg) = @_;
my ($ret_param,$ret_txt,@tmp,$rawmsg,$cgikey); my ($ret_param,$ret_txt,@tmp,$rawmsg,$cgikey);
Log 0, "CGI_RAWMSG|Dispatch|START: $htmlarg"; Log 5, "CGI_RAWMSG|Dispatch|START: $htmlarg";
$ret_param = "text/plain; charset=ISO-8859-1"; $ret_param = "text/plain; charset=ISO-8859-1";
$ret_txt = "ERROR;NODATA"; $ret_txt = "ERROR;NODATA";
print "CGI_RAWMSG|Dispatch: " . Dumper(@_) . "\n"; # print "CGI_RAWMSG|Dispatch: " . Dumper(@_) . "\n";
# Aufurf: http://[FHEMWEB]/fhem/rawmsg?TEST12345 # Aufurf: http://[FHEMWEB]/fhem/rawmsg?TEST12345
# htmlarg = /rawmsg?TEST12345 # htmlarg = /rawmsg?TEST12345
if($htmlarg =~ /\?/) { if($htmlarg =~ /\?/) {
@ -71,12 +75,12 @@ sub CGI_RAWMSG_Dispatch($$)
} }
# Check rawmsg # Check rawmsg
foreach my $m (sort keys %{$data{$cgikey}{MatchList}}) { foreach my $m (sort keys %{$data{$cgikey}{MatchList}}) {
Log 0, "CGI_RAWMSG|MatchList-RAWMSG: $rawmsg"; Log 5, "CGI_RAWMSG|MatchList-RAWMSG: $rawmsg";
Log 0, "CGI_RAWMSG|MatchList-Key: $m"; Log 5, "CGI_RAWMSG|MatchList-Key: $m";
Log 0, "CGI_RAWMSG|MatchList-Val: " . $data{$cgikey}{MatchList}{$m}; Log 5, "CGI_RAWMSG|MatchList-Val: " . $data{$cgikey}{MatchList}{$m};
my $match = $data{$cgikey}{MatchList}{$m}; my $match = $data{$cgikey}{MatchList}{$m};
if($rawmsg =~ m/$match/) { if($rawmsg =~ m/$match/) {
Log 0, "CGI_RAWMSG|MatchList-Key FOUND: $m"; Log 5, "CGI_RAWMSG|MatchList-Key FOUND: $m";
# $ret_txt = "HTMLARG = $htmlarg\n"; # $ret_txt = "HTMLARG = $htmlarg\n";
# $ret_txt .= "CGI-KEY = $cgikey\n"; # $ret_txt .= "CGI-KEY = $cgikey\n";
# $ret_txt .= "RAWMSG = $rawmsg\n"; # $ret_txt .= "RAWMSG = $rawmsg\n";