diff --git a/fhem/CHANGED b/fhem/CHANGED index 44d3bd43f..0b1c5dc83 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - change: 02_RSS: use a GUID in RSS; urlq source for img command - feature: 70_PushNotifier improve usebility, configuration without cURL (xusader) - bugfix: SYSMON: prevent empty line im log by userReadings - feature: 10_IT empfang (by bjoernh) diff --git a/fhem/FHEM/02_RSS.pm b/fhem/FHEM/02_RSS.pm index c5141e496..6c9c11f7c 100644 --- a/fhem/FHEM/02_RSS.pm +++ b/fhem/FHEM/02_RSS.pm @@ -218,7 +218,8 @@ RSS_returnRSS($) { my $url= RSS_getURL($defs{$name}{fhem}{hostname}); my $type = $defs{$name}{fhem}{style}; my $mime = ($type eq 'png')? 'image/png' : 'image/jpeg'; - my $code= "$name1"; + my $now = time(); + my $code = "$name1item_$now"; return ("application/xml; charset=utf-8", $code); } @@ -363,8 +364,13 @@ RSS_itemImg { return unless(defined($arg)); return if($arg eq ""); my $I; - if($srctype eq "url") { - my $data = GetFileFromURL($arg,3,undef,1); + if($srctype eq "url" || $srctype eq "urlq") { + my $data; + if($srctype eq "url") { + $data= GetFileFromURL($arg,3,undef,1); + } else { + $data= GetFileFromURLQuiet($arg,3,undef,1); + } if($imgtype eq "gif") { $I= GD::Image->newFromGifData($data); } elsif($imgtype eq "png") { @@ -986,8 +992,8 @@ RSS_CGI(){
  • img <x> <y> <['w' or 'h']s> <imgtype> <srctype> <arg>
    Renders a picture at the position (<x>, <y>). The <imgtype> is one of gif, jpeg, png. The picture is scaled by the factor <s> (a decimal value). If 'w' or 'h' is in front of scale-value the value is used to set width or height to the value in pixel. If <srctype> is file, the picture - is loaded from the filename <arg>, if <srctype> is url, the picture - is loaded from the URL <arg>, if <srctype> is data, the picture + is loaded from the filename <arg>, if <srctype> is url or urlq, the picture + is loaded from the URL <arg> (with or without logging the URL), if <srctype> is data, the picture is piped in from data <arg>. You can use { <perl special> } for <arg>. See below for example. Notice: do not load the image from URL that is served by fhem as it leads to a deadlock.