diff --git a/FHEM/01_FHEMWEB.pm b/FHEM/01_FHEMWEB.pm
index 1a96d65e9..94e4b9650 100755
--- a/FHEM/01_FHEMWEB.pm
+++ b/FHEM/01_FHEMWEB.pm
@@ -63,8 +63,8 @@ use vars qw($FW_subdir); # Sub-path in URL, used by FLOORPLAN/weblink
use vars qw(%FW_pos); # scroll position
use vars qw($FW_cname); # Current connection name
use vars qw(%FW_hiddenroom); # hash of hidden rooms, used by weblink
-use vars qw($FW_plotmode);# Global plot mode (WEB attribute), used by weblink
-use vars qw($FW_plotsize);# Global plot size (WEB attribute), used by weblink
+use vars qw($FW_plotmode);# Global plot mode (WEB attribute), used by SVG
+use vars qw($FW_plotsize);# Global plot size (WEB attribute), used by SVG
use vars qw(%FW_webArgs); # all arguments specified in the GET
use vars qw(@FW_fhemwebjs);# List of fhemweb*js scripts to load
use vars qw($FW_detail); # currently selected device for detail view
@@ -2350,7 +2350,7 @@ FW_ActivateInform()
plotsize
the default size of the plot, in pixels, separated by comma:
width,height. You can set individual sizes by setting the plotsize of
- the weblink. Default is 800,160 for desktop, and 480,160 for
+ the SVG. Default is 800,160 for desktop, and 480,160 for
smallscreen.
@@ -2362,19 +2362,6 @@ FW_ActivateInform()
See also the clearSvgCache command for clearing the cache.
-
- fixedrange
- Can be applied to weblink devices (FHEMWEB).
- Contains two time specs in the form YYYY-MM-DD separated by a space.
- In plotmode gnuplot-scroll or SVG the given time-range will be used,
- and no scrolling for this weblinks will be possible. Needed e.g. for
- looking at last-years data without scrolling.
- If the value is one of day, week, month, year than set the zoom level
- for this weblink independently of the user specified zoom-level.
- This is useful for pages with multiple plots: one of the plots is best
- viewed in with the default (day) zoom, the other one with a week zoom.
-
-
endPlotToday
If this FHEMWEB attribute ist set to 1, then week and month plots will
@@ -2409,12 +2396,7 @@ FW_ActivateInform()
accepted.
Example:
- attr WEB basicAuth { "$user:$password" eq "admin:secret" }
- attr WEB basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
-
- or if you defined multiple users on the Fritzbox:
-
- attr WEB basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$user", "$password") }
+ attr WEB basicAuth { "$user:$password" eq "admin:secret" }
diff --git a/FHEM/98_SVG.pm b/FHEM/98_SVG.pm
index 2255f31c6..8e6a48e77 100755
--- a/FHEM/98_SVG.pm
+++ b/FHEM/98_SVG.pm
@@ -16,8 +16,8 @@ use vars qw($FW_cssdir); # css directory
use vars qw($FW_detail); # currently selected device for detail view
use vars qw($FW_dir); # base directory for web server
use vars qw($FW_gplotdir);# gplot directory for web server: the first
-use vars qw($FW_plotmode);# Global plot mode (WEB attribute), used by weblink
-use vars qw($FW_plotsize);# Global plot size (WEB attribute), used by weblink
+use vars qw($FW_plotmode);# Global plot mode (WEB attribute), used by SVG
+use vars qw($FW_plotsize);# Global plot size (WEB attribute), used by SVG
use vars qw($FW_room); # currently selected room
use vars qw($FW_subdir); # Sub-path in URL, used by FLOORPLAN/weblink
use vars qw($FW_wname); # Web instance
@@ -27,7 +27,7 @@ use vars qw(%FW_webArgs); # all arguments specified in the GET
use vars qw($FW_formmethod);
my $SVG_RET; # Returned data (SVG)
-sub SVG_calcWeblink($$);
+sub SVG_calcOffsets($$);
sub SVG_doround($$$);
sub SVG_fmtTime($$);
sub SVG_pO($);
@@ -48,7 +48,7 @@ SVG_Initialize($)
my ($hash) = @_;
$hash->{DefFn} = "SVG_Define";
- $hash->{AttrList} = "fixedrange plotsize label title plotfunction";
+ $hash->{AttrList} = "fixedrange startDate plotsize label title plotfunction";
$hash->{SetFn} = "SVG_Set";
$hash->{FW_summaryFn} = "SVG_FwFn";
$hash->{FW_detailFn} = "SVG_FwFn";
@@ -537,10 +537,10 @@ SVG_substcfg($$$$$$)
}
##################
-# Calculate either the number of scrollable weblinks (for $d = undef) or
+# Calculate either the number of scrollable SVGs (for $d = undef) or
# for the device the valid from and to dates for the given zoom and offset
sub
-SVG_calcWeblink($$)
+SVG_calcOffsets($$)
{
my ($d,$wl) = @_;
@@ -569,7 +569,14 @@ SVG_calcWeblink($$)
$off = 0 if(!$off);
$off += $FW_pos{off} if($FW_pos{off});
- my $now = time();
+ my $now;
+ my $st = AttrVal($wl, "startDate", undef);
+ if($st) {
+ $now = mktime(0,0,12,$3,$2-1,$1-1900,0,0,-1)
+ if($st =~ m/(\d\d\d\d)-(\d\d)-(\d\d)/);
+ }
+ $now = time() if(!$now);
+
my $zoom = $FW_pos{zoom};
$zoom = "day" if(!$zoom);
$zoom = $frx if ($frx); #for fixedrange {day|week|...} klaus
@@ -677,7 +684,7 @@ SVG_showLog($)
}
}
- SVG_calcWeblink($d,$wl);
+ SVG_calcOffsets($d,$wl);
if($pm =~ m/gnuplot/) {
@@ -1494,9 +1501,27 @@ SVG_pO($)
Attributes
- - fixedrange
- - plotsize
- - plotmode
+
+ - fixedrange
+ Contains two time specs in the form YYYY-MM-DD separated by a space.
+ In plotmode gnuplot-scroll or SVG the given time-range will be used,
+ and no scrolling for this weblinks will be possible. Needed e.g. for
+ looking at last-years data without scrolling.
+ If the value is one of day, week, month, year than set the zoom level
+ for this weblink independently of the user specified zoom-level.
+ This is useful for pages with multiple plots: one of the plots is best
+ viewed in with the default (day) zoom, the other one with a week zoom.
+
+
+
+ - startDate
+ Set the start date for the plot. Used for demo installations.
+
+
+ - plotsize
+
+ - plotmode
+
- label
Double-Colon separated list of values. The values will be used to replace