diff --git a/fhem/CHANGED b/fhem/CHANGED index 111853316..fd15804fd 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,6 +1,7 @@ # 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. - SVN + - feature: 02_RSS.pm: alpha channel for colors - feature: JSONMETER: time depending tariffs added (activeTariff) - updated: codemirror version 3.24 - feature: new module 35_SWAP_0000002200000008 for panstamp diff --git a/fhem/FHEM/02_RSS.pm b/fhem/FHEM/02_RSS.pm index 299277327..46469aba3 100644 --- a/fhem/FHEM/02_RSS.pm +++ b/fhem/FHEM/02_RSS.pm @@ -67,12 +67,12 @@ RSS_readLayout($) { my $name= $hash->{NAME}; if(configDBUsed()) { - my $layout = _cfgDB_Readfile($filename); - if(!(defined($layout))) { + my @layout = cfgDB_FileRead($filename); + if(!(int(@layout))) { $hash->{fhem}{layout}= ("text 0.1 0.1 'Layout definition not found in database!'"); Log 1, "RSS $name: Layout $filename not found in database"; } else { - $hash->{fhem}{layout} = $layout; + $hash->{fhem}{layout} = join("\n", @layout); } } else { if(open(LAYOUT, $filename)) { @@ -266,8 +266,13 @@ RSS_xy { sub RSS_color { my ($S,$rgb)= @_; + my $alpha = 0; my @d= split("", $rgb); - return $S->colorResolve(hex("$d[0]$d[1]"),hex("$d[2]$d[3]"),hex("$d[4]$d[5]")); + if(length($rgb) == 8) { + $alpha = hex("$d[6]$d[7]"); + $alpha = ($alpha < 127) ? $alpha : 127; + } + return $S->colorAllocateAlpha(hex("$d[0]$d[1]"),hex("$d[2]$d[3]"),hex("$d[4]$d[5]"),$alpha); } sub @@ -743,6 +748,12 @@ RSS_CGI(){ RSS is an extension to FHEMWEB. You must install FHEMWEB to use RSS.

Beginners might find the RSS Workshop useful.

+ + A note on colors: Colors are specified as 6- or 8-digit hex numbers, + every 2 digits determining the red, green and blue color components as in HTML + color codes. The optional 7th and 8th digit code the alpha channel (transparency from + 00 to 7F). Examples: FF0000 for red, C0C0C0 for light + gray, 1C1C1C40 for semi-transparent gray.

Define @@ -801,9 +812,7 @@ RSS_CGI(){

  • size
    The dimensions of the picture in the format <width>x<height>.

  • bg
    The directory that contains the background pictures (must be in JPEG format).

  • -
  • bgcolor <color>
    Sets the background color. <color> is - a 6-digit hex number, every 2 digits determining the red, green and blue - color components as in HTML color codes (e.g.FF0000 for red, C0C0C0 for light gray).

  • +
  • bgcolor <color>
    Sets the background color.

  • tmin
    The background picture is shown at least tmin seconds, no matter how frequently the RSS feed consumer accesses the page.

  • refresh
    Time after which the HTML page is automatically reloaded.

  • @@ -900,9 +909,7 @@ RSS_CGI(){ (e.g. /usr/share/fonts/truetype/arial.ttf), whatever works on your system.
    -
  • rgb "<color>"
    Sets the color. <color> is a 6-digit hex number, every 2 digits - determining the red, green and blue color components as in HTML color codes (e.g. - FF0000 for red, C0C0C0 for light gray). You can use +
  • rgb "<color>"
    Sets the color. You can use { <perl special> } for <color>.

  • pt <pt>
    Sets the font size in points.