mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 20:24:36 +00:00
PROPLANTA: bugfix Umlaute und cloudBase
git-svn-id: https://svn.fhem.de/fhem/trunk@16724 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4e07653247
commit
e52e85aaeb
@ -55,10 +55,11 @@ my $curReadingType = 0;
|
|||||||
# 5 = Time Col 2-5
|
# 5 = Time Col 2-5
|
||||||
# 6 = Time Col 3
|
# 6 = Time Col 3
|
||||||
# 7 = alternative text of image Col 2-5 (weather state)
|
# 7 = alternative text of image Col 2-5 (weather state)
|
||||||
# 8 = MinMaxNummer Col 3
|
# 8 = MinMaxNummer Col 3 (cloud base)
|
||||||
# 9 = Date Col 2-5 / bold
|
# 9 = Date Col 2-5 / bold
|
||||||
# 10 = alternative text of Col 3 (Wind direction)
|
# 10 = alternative text of Col 3 (wind direction)
|
||||||
# 11 = alternative text of image Col 3 (current weather state)
|
# 11 = alternative text of image Col 3 (current weather state)
|
||||||
|
# 12 = Text Col 3
|
||||||
my @knownNoneIDs = ( ["Temperatur", "temperature", 1]
|
my @knownNoneIDs = ( ["Temperatur", "temperature", 1]
|
||||||
,["relative Feuchte", "humidity", 1]
|
,["relative Feuchte", "humidity", 1]
|
||||||
,["Sichtweite", "visibility", 1]
|
,["Sichtweite", "visibility", 1]
|
||||||
@ -69,6 +70,7 @@ my $curReadingType = 0;
|
|||||||
,["Taupunkt", "dewPoint", 1]
|
,["Taupunkt", "dewPoint", 1]
|
||||||
,["Uhrzeit", "obsTime", 6]
|
,["Uhrzeit", "obsTime", 6]
|
||||||
,["Höhe der", "cloudBase", 8]
|
,["Höhe der", "cloudBase", 8]
|
||||||
|
,["Höhe der", "cloudBase", 8]
|
||||||
);
|
);
|
||||||
|
|
||||||
# 1 = Tag-ID, 2 = readingName, 3 = Tag-Type (see above)
|
# 1 = Tag-ID, 2 = readingName, 3 = Tag-Type (see above)
|
||||||
@ -166,12 +168,19 @@ my $curReadingType = 0;
|
|||||||
,"Ost-Nordost" => 68
|
,"Ost-Nordost" => 68
|
||||||
,"Ost" => 90
|
,"Ost" => 90
|
||||||
,"Ost-Südost" => 113
|
,"Ost-Südost" => 113
|
||||||
|
,"Ost-Südost" => 113
|
||||||
,"Südost" => 135
|
,"Südost" => 135
|
||||||
|
,"Südost" => 135
|
||||||
,"Süd-Südost" => 158
|
,"Süd-Südost" => 158
|
||||||
|
,"Süd-Südost" => 158
|
||||||
,"Süd" => 180
|
,"Süd" => 180
|
||||||
|
,"Süd" => 180
|
||||||
,"Süd-Südwest" => 203
|
,"Süd-Südwest" => 203
|
||||||
|
,"Süd-Südwest" => 203
|
||||||
,"Südwest" => 225
|
,"Südwest" => 225
|
||||||
|
,"Südwest" => 225
|
||||||
,"West-Südwest" => 248
|
,"West-Südwest" => 248
|
||||||
|
,"West-Südwest" => 248
|
||||||
,"West" => 270
|
,"West" => 270
|
||||||
,"West-Nordwest" => 203
|
,"West-Nordwest" => 203
|
||||||
,"Nordwest" => 225
|
,"Nordwest" => 225
|
||||||
@ -326,6 +335,15 @@ sub text
|
|||||||
push( @texte, $readingName."|".$text );
|
push( @texte, $readingName."|".$text );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
# Tag-Type 12 = Text Col 3
|
||||||
|
elsif ($curReadingType == 12) {
|
||||||
|
if ( $curCol == 3 )
|
||||||
|
{
|
||||||
|
$readingName = $curReadingName;
|
||||||
|
push( @texte, $readingName."|".$text );
|
||||||
|
$curReadingType = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -361,10 +379,10 @@ sub start
|
|||||||
$readingName = "fc" . ($startDay+$curCol-2) . "_" . $readingName if $curReadingType == 7;
|
$readingName = "fc" . ($startDay+$curCol-2) . "_" . $readingName if $curReadingType == 7;
|
||||||
$text = $attr->{alt};
|
$text = $attr->{alt};
|
||||||
$text =~ s/Wetterzustand: //;
|
$text =~ s/Wetterzustand: //;
|
||||||
$text =~ s/ö/oe/;
|
# $text =~ s/ö/oe/;
|
||||||
$text =~ s/ä/ae/;
|
# $text =~ s/ä/ae/;
|
||||||
$text =~ s/ü/ue/;
|
# $text =~ s/ü/ue/;
|
||||||
$text =~ s/ß/ss/;
|
# $text =~ s/ß/ss/;
|
||||||
push( @texte, $readingName . "|" . $text );
|
push( @texte, $readingName . "|" . $text );
|
||||||
# Image URL
|
# Image URL
|
||||||
push( @texte, $readingName."Icon" . "|" . $attr->{src} );
|
push( @texte, $readingName."Icon" . "|" . $attr->{src} );
|
||||||
@ -402,6 +420,7 @@ sub end
|
|||||||
package main;
|
package main;
|
||||||
use strict;
|
use strict;
|
||||||
use feature qw/say switch/;
|
use feature qw/say switch/;
|
||||||
|
use Encode qw/from_to/;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
my $missingModul;
|
my $missingModul;
|
||||||
@ -565,7 +584,11 @@ sub PROPLANTA_HtmlAcquire($$)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PROPLANTA_Log $hash, 4, length($response->content)." characters captured";
|
PROPLANTA_Log $hash, 4, length($response->content)." characters captured";
|
||||||
return $response->content;
|
|
||||||
|
my $returnString = $response->content;
|
||||||
|
from_to($returnString,"iso-8859-1","utf8", Encode::FB_QUIET);
|
||||||
|
|
||||||
|
return $returnString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user