From 0671bc5d98fdd8bd6aa3e653713d2961e3f2fdc2 Mon Sep 17 00:00:00 2001
From: rudolfkoenig <>
Date: Wed, 21 Oct 2015 08:40:46 +0000
Subject: [PATCH] FHEMWEB.pm: add showUsedFiles and editFileList Attributes
(Forum #42376)
git-svn-id: https://svn.fhem.de/fhem/trunk@9574 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
fhem/FHEM/01_FHEMWEB.pm | 1664 ++++++++++++++++++++-------------------
1 file changed, 860 insertions(+), 804 deletions(-)
diff --git a/fhem/FHEM/01_FHEMWEB.pm b/fhem/FHEM/01_FHEMWEB.pm
index 1373a3296..b203bbfea 100755
--- a/fhem/FHEM/01_FHEMWEB.pm
+++ b/fhem/FHEM/01_FHEMWEB.pm
@@ -144,6 +144,7 @@ FHEMWEB_Initialize($)
column
defaultRoom
editConfig:1,0
+ editFileList:textField-long
endPlotNow:1,0
endPlotToday:1,0
fwcompress:0,1
@@ -166,6 +167,7 @@ FHEMWEB_Initialize($)
reverseLogs:0,1
roomIcons
sortRooms
+ showUsedFiles:0,1
sslVersion
smallscreen:unused
smallscreenCommands:0,1
@@ -1786,13 +1788,25 @@ FW_style($$)
my $cfgFileName = $1;
FW_displayFileList("config file", $cfgFileName)
if(!configDBUsed());
- FW_displayFileList("Own modules and helper files",
- FW_fileList("$MW_dir/^(.*sh|[0-9][0-9].*Util.*pm|.*cfg|.*holiday".
- "|myUtilsTemplate.pm|.*layout)\$"));
- FW_displayFileList("gplot files",
- FW_fileList("$FW_gplotdir/^.*gplot\$"));
- FW_displayFileList("styles",
- FW_fileList("$FW_cssdir/^.*(css|svg)\$"));
+
+ my $efl = AttrVal($FW_wname, 'editFileList',
+ "Own modules and helper files:\$MW_dir:^(.*sh|[0-9][0-9].*Util.*pm|".
+ ".*cfg|.*holiday|myUtilsTemplate.pm|.*layout)\$\n".
+ "Gplot files:\$FW_gplotdir:^.*gplot\$\n".
+ "Styles:\$FW_cssdir:^.*(css|svg)\$");
+ foreach my $l (split(/[\r\n]/, $efl)) {
+ my ($t, $v, $re) = split(":", $l, 3);
+ $v = eval $v;
+ my @fList;
+ if($v eq $FW_gplotdir && AttrVal($FW_wname,'showUsedFiles',0)) {
+ @fList = defInfo('TYPE=SVG','GPLOTFILE');
+ @fList = map { "$_.gplot" } @fList;
+ @fList = map { "$_.configDB" } @fList if configDBUsed();
+ } else {
+ @fList = FW_fileList("$v/$re");
+ }
+ FW_displayFileList($t, @fList);
+ }
FW_pO $end;
} elsif($a[1] eq "select") {
@@ -2825,118 +2839,27 @@ FW_widgetOverride($$)
Attributes
-
- - webname
- Path after the http://hostname:port/ specification. Defaults to fhem,
- i.e the default http address is http://localhost:8083/fhem
-
+ - addStateEvent
-
- - refresh
- If set, a http-equiv="refresh" entry will be genererated with the given
- argument (i.e. the browser will reload the page after the given
- seconds).
-
+
+ - allowedCommands
+ A comma separated list of commands allowed from this FHEMWEB
+ instance.
If set to an empty list , (i.e. comma only)
+ then this FHEMWEB instance will be read-only.
If set to
+ get,set
, then this FHEMWEB instance will only allow
+ regular usage of the frontend by clicking the icons/buttons/sliders but
+ not changing any configuration.
-
- - plotmode
- Specifies how to generate the plots:
-
- - SVG
- The plots are created with the SVG module.
- This is the default.
- - gnuplot
- The plots are created with the gnuplot program. Note: this mode
- ist only available due to historic reasons.
-
- - gnuplot-scroll
- Like the gnuplot-mode, but scrolling to historical values is alos
- possible, just like with SVG.
-
-
-
-
- - 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 SVG. Default is 800,160 for desktop, and 480,160 for
- smallscreen.
-
-
-
- - nrAxis
- the number of axis for which space should be reserved on the left and
- right sides of a plot and optionaly how many axes should realy be used
- on each side, separated by comma: left,right[,useLeft,useRight]. You
- can set individual numbers by setting the nrAxis of the SVG. Default is
- 1,1.
-
-
-
- - SVGcache
- if set, cache plots which won't change any more (the end-date is prior
- to the current timestamp). The files are written to the www/SVGcache
- directory. Default is off.
- See also the clearSvgCache command for clearing the cache.
-
-
-
- - editConfig
- If this FHEMWEB attribute is set to 1, then you will be able to edit
- the FHEM configuration file (fhem.cfg) in the "Edit files" section.
- After saving this file a rereadcfg is executed automatically, which has
- a lot of side effects.
-
-
-
- - endPlotToday
- If this FHEMWEB attribute is set to 1, then week and month plots will
- end today. Else the current week or the current month will be shown.
+ This attribute intended to be used together with hiddenroom/hiddengroup
-
-
- - endPlotNow
- If this FHEMWEB attribute is set to 1, then day and hour plots will
- end at current time. Else the whole day, the 6 hour period starting at
- 0, 6, 12 or 18 hour or the whole hour will be shown. This attribute
- is not used if the SVG has the attribute startDate defined.
-
+ Note:allowedCommands should work as intended, but no guarantee
+ can be given that there is no way to circumvent it. If a command is
+ allowed it can be issued by URL manipulation also for devices that are
+ hidden.
-
- - ploteditor
- Configures if the Plot editor should be shown
- in the SVG detail view.
- Can be set to always, onClick or never. Default is always.
-
-
-
- - plotfork [<Δp>]
- If set to a nonzero value, run part of the processing (e.g. SVG plot generation or RSS feeds) in
- parallel processes. Actually, child processes are forked whose
- priorities are the FHEM process' priority plus Δp.
- Higher values mean lower priority. e.g. use Δp= 10 to renice the
- child processes and provide more CPU power to the main FHEM process.
- Δp is optional and defaults to 0.
- Note: do not use it
- on Windows and on systems with small memory footprint.
-
-
-
- - plotEmbed 0
- SVG plots are rendered as part of <embed> tags, as in the past
- this was the only way to display SVG, and it allows to render them in
- parallel, see plotfork.
- Setting plotEmbed to 0 will render SVG in-place, but as a side-effect
- makes the plotfork attribute meaningless.
-
-
-
- - plotWeekStartDay
- Start the week-zoom of the SVG plots with this day.
- 0 is Sunday, 1 is Monday, etc.
+ - allowfrom
@@ -2964,234 +2887,47 @@ FW_widgetOverride($$)
-
- - HTTPS
- Enable HTTPS connections. This feature requires the perl module
- IO::Socket::SSL, to be installed with cpan -i IO::Socket::SSL or
- apt-get install libio-socket-ssl-perl; OSX and the FritzBox-7390
- already have this module.
-
- A local certificate has to be generated into a directory called certs,
- this directory must be in the modpath
- directory, at the same level as the FHEM directory.
-
- mkdir certs
- cd certs
- openssl req -new -x509 -nodes -out server-cert.pem -days 3650 -keyout server-key.pem
-
-
-
-
- - addStateEvent
-
-
- - allowedCommands
- A comma separated list of commands allowed from this FHEMWEB
- instance.
If set to an empty list , (i.e. comma only)
- then this FHEMWEB instance will be read-only.
If set to
- get,set
, then this FHEMWEB instance will only allow
- regular usage of the frontend by clicking the icons/buttons/sliders but
- not changing any configuration.
+
+ - closeConn
+ If set, a TCP Connection will only serve one HTTP request. Seems to
+ solve problems on iOS9 for WebApp startup.
+
- This attribute intended to be used together with hiddenroom/hiddengroup
-
-
- Note:allowedCommands should work as intended, but no guarantee
- can be given that there is no way to circumvent it. If a command is
- allowed it can be issued by URL manipulation also for devices that are
- hidden.
-
- - allowfrom
-
-
-
- - stylesheetPrefix
- prefix for the files style.css, svg_style.css and svg_defs.svg. If the
- file with the prefix is missing, the default file (without prefix) will
- be used. These files have to be placed into the FHEM directory, and can
- be selected directly from the "Select style" FHEMWEB menu entry. Example:
-
- attr WEB stylesheetPrefix dark
-
- Referenced files:
-
- darksvg_defs.svg
- darksvg_style.css
- darkstyle.css
-
-
-
- Note:if the argument contains the string smallscreen or touchpad,
- then FHEMWEB will optimize the layout/access for small screen size (i.e.
- smartphones) or touchpad devices (i.e. tablets)
-
- The default configuration installs 3 FHEMWEB instances: port 8083 for
- desktop browsers, port 8084 for smallscreen, and 8085 for touchpad.
-
- If touchpad or smallscreen is specified, then WebApp support is
- activated: After viewing the site on the iPhone or iPad in Safari, you
- can add a link to the home-screen to get full-screen support. Links are
- rendered differently in this mode to avoid switching back to the "normal"
- browser.
+
+ - column
+ Allows to display more than one column per room overview, by specifying
+ the groups for the columns. Example:
+
+ attr WEB column LivingRoom:FS20,notify|FHZ,notify DiningRoom:FS20|FHZ
+
+ In this example in the LivingRoom the FS20 and the notify group is in
+ the first column, the FHZ and the notify in the second.
+ Notes: some elements like SVG plots and readingsGroup can only be part of
+ a column if they are part of a group.
+ This attribute can be used to sort the groups in a room, just specify
+ the groups in one column.
+ Space in the room and group name has to be written as %20 for this
+ attribute.
-
-
- - iconPath
- colon separated list of directories where the icons are read from.
- The directories start in the fhem/www/images directory. The default is
- $styleSheetPrefix:default:fhemSVG:openautomation
- Set it to fhemSVG:openautomation to get only SVG images.
-
-
+
+ - csrfToken
+ If set, FHEMWEB requires the value of this attribute as fwcsrf
+ Parameter for each command. If the value is random, then a random
+ number will be generated on each FHEMWEB start. It is used as
+ countermeasure for Cross Site Resource Forgery attacks.
+ Default is not active.
+
-
- - hiddenroom
- Comma separated list of rooms to "hide", i.e. not to show. Special
- values are input, detail and save, in which case the input areas, link
- to the detailed views or save button is hidden (although each aspect
- still can be addressed through URL manipulation).
- The list can also contain values from the additional "Howto/Wiki/FAQ"
- block.
-
-
-
-
- - hiddengroup
- Comma separated list of groups to "hide", i.e. not to show in any room
- of this FHEMWEB instance.
- Example: attr WEBtablet hiddengroup FileLog,dummy,at,notify
-
-
-
-
- - menuEntries
- Comma separated list of name,html-link pairs to display in the
- left-side list. Example:
- attr WEB menuEntries fhem.de,http://fhem.de,culfw.de,http://culfw.de
- attr WEB menuEntries AlarmOn,http://fhemhost:8083/fhem?cmd=set%20alarm%20on
-
-
-
-
- - nameDisplay
- The argument is perl code, which is executed for each single device in
- the room to determine the name displayed. $DEVICE is the name of the
- current device, and $ALIAS is the value of the alias attribute or the
- name of the device, if no alias is set. E.g. you can add a a global
- userattr named alias_hu for the Hungarian translation, and specify
- nameDisplay for the hungarian FHEMWEB instance as
-
- AttrVal($d, "alias_hu", $devName)
-
-
-
-
-
- - longpoll
- Affects devices states in the room overview only.
- In this mode status update is refreshed more or less instantaneously,
- and state change (on/off only) is done without requesting a complete
- refresh from the server.
- Default is on.
-
-
-
-
- - longpollSVG
- Reloads an SVG weblink, if an event should modify its content. Since
- an exact determination of the affected events is too complicated, we
- need some help from the #FileLog definition in the .gplot file: the
- filter used there (second parameter) must either contain only the
- deviceName or have the form deviceName.event or deviceName.*. This is
- always the case when using the Plot
- editor. The SVG will be reloaded for any event triggered by
- this deviceName.
- Default is off.
-
-
-
-
-
- - redirectCmds
- Clear the browser URL window after issuing the command by redirecting
- the browser, as a reload for the same site might have unintended
- side-effects. Default is 1 (enabled). Disable it by setting this
- attribute to 0 if you want to study the command syntax, in order to
- communicate with FHEMWEB.
-
-
-
-
- - fwcompress
- Enable compressing the HTML data (default is 1, i.e. yes, use 0 to switch it off).
-
-
-
-
- - reverseLogs
- Display the lines from the logfile in a reversed order, newest on the
- top, so that you dont have to scroll down to look at the latest entries.
- Note: enabling this attribute will prevent FHEMWEB from streaming
- logfiles, resulting in a considerably increased memory consumption
- (about 6 times the size of the file on the disk).
-
-
-
-
- - CORS
- If set to 1, FHEMWEB will supply a "Cross origin resource sharing"
- header, see the wikipedia for details.
-
-
-
-
- - icon
- Set the icon for a device in the room overview. There is an
- icon-chooser in FHEMWEB to ease this task. Setting icons for the room
- itself is indirect: there must exist an icon with the name
- ico.png in the iconPath.
-
-
-
-
- - roomIcons
- Space separated list of room:icon pairs, to override the default
- behaviour of showing an icon, if there is one with the name of
- "icoRoomName". This is the correct way to remove the icon for the room
- Everything, or to set one for rooms with / in the name (e.g.
- Anlagen/EDV). The first part is treated as regexp, so space is
- represented by a dot. Example:
- attr WEB roomIcons Anlagen.EDV:icoEverything
-
-
-
-
- - sortRooms
- Space separated list of rooms to override the default sort order of the
- room links. As the rooms in this attribute are actually regexps, space
- in the roomname has to be specified as dot (.).
- Example:
- attr WEB sortRooms DG OG EG Keller
-
-
-
-
- - defaultRoom
- show the specified room if no room selected, e.g. on execution of some
- commands. If set hides the motd. Example:
- attr WEB defaultRoom Zentrale
-
-
-
-
- - sortby
- Take the value of this attribute when sorting the devices in the room
- overview instead of the alias, or if that is missing the devicename
- itself.
-
-
+
+ - CssFiles
+ Space separated list of .css files to be included. The filenames
+ are relative to the www directory. Example:
+
+ attr WEB CssFiles pgm2/mystyle.css
+
+
- cmdIcon
@@ -3203,6 +2939,21 @@ FW_widgetOverride($$)
+
+ CORS
+ If set to 1, FHEMWEB will supply a "Cross origin resource sharing"
+ header, see the wikipedia for details.
+
+
+
+
+ defaultRoom
+ show the specified room if no room selected, e.g. on execution of some
+ commands. If set hides the motd. Example:
+ attr WEB defaultRoom Zentrale
+
+
+
devStateIcon
First form:
@@ -3250,6 +3001,350 @@ FW_widgetOverride($$)
+
+ editConfig
+ If this FHEMWEB attribute is set to 1, then you will be able to edit
+ the FHEM configuration file (fhem.cfg) in the "Edit files" section.
+ After saving this file a rereadcfg is executed automatically, which has
+ a lot of side effects.
+
+
+
+ editFileList
+ Specify the list of Files shown in "Edit Files" section. It is a
+ newline separated list of triples, the first is the Title, the next is
+ the directory to search for, the third the regular expression. Default
+ is:
+
+
+ Own modules and helper files:$MW_dir:^(.*sh|[0-9][0-9].*Util.*pm|.*cfg|.*holiday|myUtilsTemplate.pm|.*layout)$
+ Gplot files:$FW_gplotdir:^.*gplot$
+ Styles:$FW_cssdir:^.*(css|svg)$
+
+
+
+
+
+ endPlotNow
+ If this FHEMWEB attribute is set to 1, then day and hour plots will
+ end at current time. Else the whole day, the 6 hour period starting at
+ 0, 6, 12 or 18 hour or the whole hour will be shown. This attribute
+ is not used if the SVG has the attribute startDate defined.
+
+
+
+ endPlotToday
+ If this FHEMWEB attribute is set to 1, then week and month plots will
+ end today. Else the current week or the current month will be shown.
+
+
+
+
+ fwcompress
+ Enable compressing the HTML data (default is 1, i.e. yes, use 0 to switch it off).
+
+
+
+
+ hiddenroom
+ Comma separated list of rooms to "hide", i.e. not to show. Special
+ values are input, detail and save, in which case the input areas, link
+ to the detailed views or save button is hidden (although each aspect
+ still can be addressed through URL manipulation).
+ The list can also contain values from the additional "Howto/Wiki/FAQ"
+ block.
+
+
+
+
+ hiddengroup
+ Comma separated list of groups to "hide", i.e. not to show in any room
+ of this FHEMWEB instance.
+ Example: attr WEBtablet hiddengroup FileLog,dummy,at,notify
+
+
+
+
+ HTTPS
+ Enable HTTPS connections. This feature requires the perl module
+ IO::Socket::SSL, to be installed with cpan -i IO::Socket::SSL or
+ apt-get install libio-socket-ssl-perl; OSX and the FritzBox-7390
+ already have this module.
+
+ A local certificate has to be generated into a directory called certs,
+ this directory must be in the modpath
+ directory, at the same level as the FHEM directory.
+
+ mkdir certs
+ cd certs
+ openssl req -new -x509 -nodes -out server-cert.pem -days 3650 -keyout server-key.pem
+
+
+
+
+
+ icon
+ Set the icon for a device in the room overview. There is an
+ icon-chooser in FHEMWEB to ease this task. Setting icons for the room
+ itself is indirect: there must exist an icon with the name
+ ico.png in the iconPath.
+
+
+
+
+ iconPath
+ colon separated list of directories where the icons are read from.
+ The directories start in the fhem/www/images directory. The default is
+ $styleSheetPrefix:default:fhemSVG:openautomation
+ Set it to fhemSVG:openautomation to get only SVG images.
+
+
+
+
+ JavaScripts
+ Space separated list of JavaScript files to be included. The filenames
+ are relative to the www directory. For each file an additional
+ user-settable FHEMWEB attribute will be created, to pass parameters to
+ the script. The name of this additional attribute gets the Param
+ suffix, directory and the fhem_ prefix will be deleted. Example:
+
+ attr WEB JavaScripts codemirror/fhem_codemirror.js
+ attr WEB codemirrorParam { "theme":"blackboard", "lineNumbers":true }
+
+
+
+
+ longpoll
+ Affects devices states in the room overview only.
+ In this mode status update is refreshed more or less instantaneously,
+ and state change (on/off only) is done without requesting a complete
+ refresh from the server.
+ Default is on.
+
+
+
+
+ longpollSVG
+ Reloads an SVG weblink, if an event should modify its content. Since
+ an exact determination of the affected events is too complicated, we
+ need some help from the #FileLog definition in the .gplot file: the
+ filter used there (second parameter) must either contain only the
+ deviceName or have the form deviceName.event or deviceName.*. This is
+ always the case when using the Plot
+ editor. The SVG will be reloaded for any event triggered by
+ this deviceName.
+ Default is off.
+
+
+
+
+
+ menuEntries
+ Comma separated list of name,html-link pairs to display in the
+ left-side list. Example:
+ attr WEB menuEntries fhem.de,http://fhem.de,culfw.de,http://culfw.de
+ attr WEB menuEntries AlarmOn,http://fhemhost:8083/fhem?cmd=set%20alarm%20on
+
+
+
+
+ nameDisplay
+ The argument is perl code, which is executed for each single device in
+ the room to determine the name displayed. $DEVICE is the name of the
+ current device, and $ALIAS is the value of the alias attribute or the
+ name of the device, if no alias is set. E.g. you can add a a global
+ userattr named alias_hu for the Hungarian translation, and specify
+ nameDisplay for the hungarian FHEMWEB instance as
+
+ AttrVal($d, "alias_hu", $devName)
+
+
+
+
+
+ nrAxis
+ the number of axis for which space should be reserved on the left and
+ right sides of a plot and optionaly how many axes should realy be used
+ on each side, separated by comma: left,right[,useLeft,useRight]. You
+ can set individual numbers by setting the nrAxis of the SVG. Default is
+ 1,1.
+
+
+
+ ploteditor
+ Configures if the Plot editor should be shown
+ in the SVG detail view.
+ Can be set to always, onClick or never. Default is always.
+
+
+
+ plotEmbed 0
+ SVG plots are rendered as part of <embed> tags, as in the past
+ this was the only way to display SVG, and it allows to render them in
+ parallel, see plotfork.
+ Setting plotEmbed to 0 will render SVG in-place, but as a side-effect
+ makes the plotfork attribute meaningless.
+
+
+
+ plotfork [<Δp>]
+ If set to a nonzero value, run part of the processing (e.g. SVG plot generation or RSS feeds) in
+ parallel processes. Actually, child processes are forked whose
+ priorities are the FHEM process' priority plus Δp.
+ Higher values mean lower priority. e.g. use Δp= 10 to renice the
+ child processes and provide more CPU power to the main FHEM process.
+ Δp is optional and defaults to 0.
+ Note: do not use it
+ on Windows and on systems with small memory footprint.
+
+
+
+ plotmode
+ Specifies how to generate the plots:
+
+ - SVG
+ The plots are created with the SVG module.
+ This is the default.
+
+ - gnuplot
+ The plots are created with the gnuplot program. Note: this mode
+ ist only available due to historic reasons.
+
+ - gnuplot-scroll
+ Like the gnuplot-mode, but scrolling to historical values is alos
+ possible, just like with SVG.
+
+
+
+
+ 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 SVG. Default is 800,160 for desktop, and 480,160 for
+ smallscreen.
+
+
+
+ plotWeekStartDay
+ Start the week-zoom of the SVG plots with this day.
+ 0 is Sunday, 1 is Monday, etc.
+
+
+
+ redirectCmds
+ Clear the browser URL window after issuing the command by redirecting
+ the browser, as a reload for the same site might have unintended
+ side-effects. Default is 1 (enabled). Disable it by setting this
+ attribute to 0 if you want to study the command syntax, in order to
+ communicate with FHEMWEB.
+
+
+
+
+ refresh
+ If set, a http-equiv="refresh" entry will be genererated with the given
+ argument (i.e. the browser will reload the page after the given
+ seconds).
+
+
+
+ reverseLogs
+ Display the lines from the logfile in a reversed order, newest on the
+ top, so that you dont have to scroll down to look at the latest entries.
+ Note: enabling this attribute will prevent FHEMWEB from streaming
+ logfiles, resulting in a considerably increased memory consumption
+ (about 6 times the size of the file on the disk).
+
+
+
+
+ roomIcons
+ Space separated list of room:icon pairs, to override the default
+ behaviour of showing an icon, if there is one with the name of
+ "icoRoomName". This is the correct way to remove the icon for the room
+ Everything, or to set one for rooms with / in the name (e.g.
+ Anlagen/EDV). The first part is treated as regexp, so space is
+ represented by a dot. Example:
+ attr WEB roomIcons Anlagen.EDV:icoEverything
+
+
+
+
+ smallscreenCommands
+ If set to 1, commands, slider and dropdown menues will appear in
+ smallscreen landscape mode.
+
+
+
+ sortby
+ Take the value of this attribute when sorting the devices in the room
+ overview instead of the alias, or if that is missing the devicename
+ itself.
+
+
+
+
+ showUsedFiles
+ In the Edit files section, show only the used files.
+ Note: currently this is only working for the "Gplot files" section.
+
+
+
+
+ sortRooms
+ Space separated list of rooms to override the default sort order of the
+ room links. As the rooms in this attribute are actually regexps, space
+ in the roomname has to be specified as dot (.).
+ Example:
+ attr WEB sortRooms DG OG EG Keller
+
+
+
+ sslVersion
+ See the global attribute sslVersion.
+
+
+
+ stylesheetPrefix
+ prefix for the files style.css, svg_style.css and svg_defs.svg. If the
+ file with the prefix is missing, the default file (without prefix) will
+ be used. These files have to be placed into the FHEM directory, and can
+ be selected directly from the "Select style" FHEMWEB menu entry. Example:
+
+ attr WEB stylesheetPrefix dark
+
+ Referenced files:
+
+ darksvg_defs.svg
+ darksvg_style.css
+ darkstyle.css
+
+
+
+ Note:if the argument contains the string smallscreen or touchpad,
+ then FHEMWEB will optimize the layout/access for small screen size (i.e.
+ smartphones) or touchpad devices (i.e. tablets)
+
+ The default configuration installs 3 FHEMWEB instances: port 8083 for
+ desktop browsers, port 8084 for smallscreen, and 8085 for touchpad.
+
+ If touchpad or smallscreen is specified, then WebApp support is
+ activated: After viewing the site on the iPhone or iPad in Safari, you
+ can add a link to the home-screen to get full-screen support. Links are
+ rendered differently in this mode to avoid switching back to the "normal"
+ browser.
+
+
+
+
+ SVGcache
+ if set, cache plots which won't change any more (the end-date is prior
+ to the current timestamp). The files are written to the www/SVGcache
+ directory. Default is off.
+ See also the clearSvgCache command for clearing the cache.
+
+
webCmd
Colon separated list of commands to be shown in the room overview for a
@@ -3283,6 +3378,13 @@ FW_widgetOverride($$)
+
+ webname
+ Path after the http://hostname:port/ specification. Defaults to fhem,
+ i.e the default http address is http://localhost:8083/fhem
+
+
+
widgetOverride
@@ -3385,75 +3487,8 @@ FW_widgetOverride($$)
-
-
- column
- Allows to display more than one column per room overview, by specifying
- the groups for the columns. Example:
-
- attr WEB column LivingRoom:FS20,notify|FHZ,notify DiningRoom:FS20|FHZ
-
- In this example in the LivingRoom the FS20 and the notify group is in
- the first column, the FHZ and the notify in the second.
- Notes: some elements like SVG plots and readingsGroup can only be part of
- a column if they are part of a group.
- This attribute can be used to sort the groups in a room, just specify
- the groups in one column.
- Space in the room and group name has to be written as %20 for this
- attribute.
-
-
-
- closeConn
- If set, a TCP Connection will only serve one HTTP request. Seems to
- solve problems on iOS9 for WebApp startup.
-
-
-
-
- CssFiles
- Space separated list of .css files to be included. The filenames
- are relative to the www directory. Example:
-
- attr WEB CssFiles pgm2/mystyle.css
-
-
-
-
- JavaScripts
- Space separated list of JavaScript files to be included. The filenames
- are relative to the www directory. For each file an additional
- user-settable FHEMWEB attribute will be created, to pass parameters to
- the script. The name of this additional attribute gets the Param
- suffix, directory and the fhem_ prefix will be deleted. Example:
-
- attr WEB JavaScripts codemirror/fhem_codemirror.js
- attr WEB codemirrorParam { "theme":"blackboard", "lineNumbers":true }
-
-
-
-
- csrfToken
- If set, FHEMWEB requires the value of this attribute as fwcsrf
- Parameter for each command. If the value is random, then a random
- number will be generated on each FHEMWEB start. It is used as
- countermeasure for Cross Site Resource Forgery attacks.
- Default is not active.
-
-
-
- smallscreenCommands
- If set to 1, commands, slider and dropdown menues will appear in
- smallscreen landscape mode.
-
-
- sslVersion
- See the global attribute sslVersion.
-
-
-
=end html
=begin html_DE
@@ -3513,124 +3548,29 @@ FW_widgetOverride($$)
- Attributes
+ Attribute
-
- - webname
- Der Pfad nach http://hostname:port/ . Standard ist fhem,
- so ist die Standard HTTP Adresse http://localhost:8083/fhem
+ - addStateEvent
+
+
+ - allowedCommands
+ Eine Komma getrennte Liste der erlaubten Befehle. Bei einer leeren
+ Liste (, dh. nur ein Komma) wird dieser FHEMWEB-Instanz "read-only".
+
Falls es auf get,set
gesetzt ist, dann sind in dieser
+ FHEMWEB Instanz keine Konfigurationsänderungen möglich, nur
+ "normale" Bedienung der Schalter/etc.
+
+ Dieses Attribut sollte zusammen mit dem hiddenroom/hiddengroup
+ Attributen verwendet werden.
+
+ Achtung: allowedCommands sollte wie hier beschrieben
+ funktionieren, allerdings können wir keine Garantie geben,
+ daß man sie nicht überlisten, und Schaden anrichten kann.
-
- - refresh
- Damit erzeugen Sie auf den ausgegebenen Webseiten einen automatischen
- Refresh, z.B. nach 5 Sekunden.
+ - allowfrom
-
- - plotmode
- Spezifiziert, wie Plots erzeugt werden sollen:
-
- - SVG
- Die Plots werden mit Hilfe des SVG Moduls als SVG
- Grafik gerendert. Das ist die Standardeinstellung.
-
- - gnuplot
- Die Plots werden mit Hilfe des gnuplot Programmes erzeugt. Diese
- Option ist aus historischen Gründen vorhanden.
-
-
- - gnuplot-scroll
- Wie gnuplot, der einfache Zugriff auf historische Daten ist aber
- genauso möglich wie mit dem SVG Modul.
-
-
-
-
-
- - plotsize
- gibt die Standardbildgröße aller erzeugten Plots an als
- Breite,Höhe an. Um einem individuellen Plot die Größe zu
- ändern muss dieses Attribut bei der entsprechenden SVG Instanz
- gesetzt werden. Default sind 800,160 für Desktop und 480,160
- für Smallscreen
-
-
-
- - nrAxis
- (bei mehrfach-Y-Achsen im SVG-Plot) Die Darstellung der Y Achsen
- benötigt Platz. Hierdurch geben Sie an wie viele Achsen Sie
- links,rechts [useLeft,useRight] benötigen. Default ist 1,1 (also 1
- Achse links, 1 Achse rechts).
-
-
-
- - SVGcache
- Plots die sich nicht mehr ändern, werden im SVGCache Verzeichnis
- (www/SVGcache) gespeichert, um die erneute, rechenintensive
- Berechnung der Grafiken zu vermeiden. Default ist 0, d.h. aus.
- Siehe den clearSvgCache Befehl um diese Daten zu löschen.
-
-
-
- - editConfig
- Falls dieses FHEMWEB Attribut (auf 1) gesetzt ist, dann kann man die
- FHEM Konfigurationsdatei in dem "Edit files" Abschnitt bearbeiten. Beim
- Speichern dieser Datei wird automatisch rereadcfg ausgefuehrt, was
- diverse Nebeneffekte hat.
-
-
-
- - endPlotToday
- Wird dieses FHEMWEB Attribut gesetzt, so enden Wochen- bzw. Monatsplots
- am aktuellen Tag, sonst wird die aktuelle Woche/Monat angezeigt.
-
-
-
- - endPlotNow
- Wenn Sie dieses FHEMWEB Attribut auf 1 setzen, werden Tages und
- Stunden-Plots zur aktuellen Zeit beendet. (Ähnlich wie
- endPlotToday, nur eben minütlich).
- Ansonsten wird der gesamte Tag oder eine 6 Stunden Periode (0, 6, 12,
- 18 Stunde) gezeigt. Dieses Attribut wird nicht verwendet, wenn das SVG
- Attribut startDate benutzt wird.
-
-
-
- - ploteditor
- Gibt an ob der Plot Editor in der SVG detail
- ansicht angezeigt werden soll. Kann auf always, onClick oder never
- gesetzt werden. Der Default ist always.
-
-
-
- - plotfork
- Normalerweise wird die Ploterstellung im Hauptprozess ausgeführt,
- FHEM wird wärend dieser Zeit nicht auf andere Ereignisse
- reagieren.
- Falls dieses Attribut auf einen nicht 0 Wert gesetzt ist, dann wird die
- Berechnung in weitere Prozesse ausgelagert. Das kann die Berechnung auf
- Rechnern mit mehreren Prozessoren beschleunigen, allerdings kann es auf
- Rechnern mit wenig Speicher (z.Bsp. FRITZ!Box 7390) zum automatischen
- Abschuss des FHEM Prozesses durch das OS führen.
-
-
-
- - plotEmbed 0
- SVG Grafiken werden als Teil der <embed> Tags dargestellt, da
- früher das der einzige Weg war SVG darzustellen, weiterhin
- erlaubt es das parallele Berechnen via plotfork (s.o.)
- Falls plotEmbed auf 0 gesetzt wird, dann werden die SVG Grafiken als
- Teil der HTML-Seite generiert, was leider das plotfork Attribut
- wirkungslos macht.
-
-
-
- - plotWeekStartDay
- Starte das Plot in der Wochen-Ansicht mit diesem Tag.
- 0 ist Sonntag, 1 ist Montag, usw.
-
-
- basicAuth, basicAuthMsg
Fragt username/password zur Autentifizierung ab. Es gibt mehrere
@@ -3660,224 +3600,10 @@ FW_widgetOverride($$)
-
- HTTPS
- Ermöglicht HTTPS Verbindungen. Es werden die Perl Module
- IO::Socket::SSL benötigt, installierbar mit cpan -i
- IO::Socket::SSL oder apt-get install libio-socket-ssl-perl; (OSX und
- die FritzBox-7390 haben dieses Modul schon installiert.)
-
- Ein lokales Zertifikat muss im Verzeichis certs erzeugt werden.
- Dieses Verzeichnis muss im modpath
- angegeben werden, also auf der gleichen Ebene wie das FHEM Verzeichnis.
- Beispiel:
-
- mkdir certs
- cd certs
- openssl req -new -x509 -nodes -out server-cert.pem -days 3650 -keyout
- server-key.pem
-
-
-
-
-
- addStateEvent
-
-
- allowedCommands
- Eine Komma getrennte Liste der erlaubten Befehle. Bei einer leeren
- Liste (, dh. nur ein Komma) wird dieser FHEMWEB-Instanz "read-only".
-
Falls es auf get,set
gesetzt ist, dann sind in dieser
- FHEMWEB Instanz keine Konfigurationsänderungen möglich, nur
- "normale" Bedienung der Schalter/etc.
-
- Dieses Attribut sollte zusammen mit dem hiddenroom/hiddengroup
- Attributen verwendet werden.
-
- Achtung: allowedCommands sollte wie hier beschrieben
- funktionieren, allerdings können wir keine Garantie geben,
- daß man sie nicht überlisten, und Schaden anrichten kann.
-
-
- allowfrom
-
-
-
- stylesheetPrefix
- Präfix für die Dateien style.css, svg_style.css und
- svg_defs.svg. Wenn die Datei mit dem Präfix fehlt, wird die Default
- Datei (ohne Präfix) verwendet. Diese Dateien müssen im FHEM
- Ordner liegen und können direkt mit "Select style" im FHEMWEB
- Menüeintrag ausgewählt werden. Beispiel:
-
- attr WEB stylesheetPrefix dark
-
- Referenzdateien:
-
- darksvg_defs.svg
- darksvg_style.css
- darkstyle.css
-
-
-
- Anmerkung:Wenn der Parametername smallscreen oder touchpad
- enthält, wird FHEMWEB das Layout/den Zugriff für entsprechende
- Geräte (Smartphones oder Touchpads) optimieren
-
- Standardmäßig werden 3 FHEMWEB Instanzen aktiviert: Port 8083
- für Desktop Browser, Port 8084 für Smallscreen, und 8085
- für Touchpad.
-
- Wenn touchpad oder smallscreen benutzt werden, wird WebApp support
- aktiviert: Nachdem Sie eine Seite am iPhone oder iPad mit Safari
- angesehen haben, können Sie einen Link auf den Homescreen anlegen um
- die Seite im Fullscreen Modus zu sehen. Links werden in diesem Modus
- anders gerendert, um ein "Zurückfallen" in den "normalen" Browser zu
- verhindern.
-
-
-
- iconPath
- Durch Doppelpunkt getrennte Aufzählung der Verzeichnisse, in
- welchen nach Icons gesucht wird. Die Verzeichnisse müssen unter
- fhem/www/images angelegt sein. Standardeinstellung ist:
- $styleSheetPrefix:default:fhemSVG:openautomation
- Setzen Sie den Wert auf fhemSVG:openautomation um nur SVG Bilder zu
- benutzen.
-
-
-
- hiddenroom
- Eine Komma getrennte Liste, um Räume zu verstecken, d.h. nicht
- anzuzeigen. Besondere Werte sind input, detail und save. In diesem
- Fall werden diverse Eingabefelder ausgeblendent. Durch direktes Aufrufen
- der URL sind diese Räume weiterhin erreichbar!
- Ebenso können Einträge in den Logfile/Commandref/etc Block
- versteckt werden.
-
-
- hiddengroup
- Wie hiddenroom (siehe oben), jedoch auf Gerätegruppen bezogen.
-
- Beispiel: attr WEBtablet hiddengroup FileLog,dummy,at,notify
-
-
-
- menuEntries
- Komma getrennte Liste; diese Links werden im linken Menü angezeigt.
- Beispiel:
- attr WEB menuEntries fhem.de,http://fhem.de,culfw.de,http://culfw.de
- attr WEB menuEntries
- AlarmOn,http://fhemhost:8083/fhem?cmd=set%20alarm%20on
-
-
-
- nameDisplay
- Das Argument ist Perl-Code, was für jedes Gerät in der
- Raum-Übersicht ausgeführt wird, um den angezeigten Namen zu
- berechnen. Dabei kann man die Variable $DEVICE für den aktuellen
- Gerätenamen, und $ALIAS für den aktuellen alias bzw. Name,
- falls alias nicht gesetzt ist, verwenden. Z.Bsp. für eine FHEMWEB
- Instanz mit ungarischer Anzeige fügt man ein global userattr
- alias_hu hinzu, und man setzt nameDisplay für diese FHEMWEB
- Instanz auf dem Wert:
-
- AttrVal($d, "alias_hu", $devName)
-
-
-
-
-
- longpoll
- Dies betrifft die Aktualisierung der Gerätestati in der
- Weboberfläche. Ist longpoll aktiviert, werden
- Statusänderungen sofort im Browser dargestellt. ohne die Seite
- manuell neu laden zu müssen. Standard ist aktiviert.
-
-
-
-
- longpollSVG
- Lädt SVG Instanzen erneut, falls ein Ereignis dessen Inhalt
- ändert. Funktioniert nur, falls der dazugehörige #FileLog
- Definition in der .gplot Datei folgenden Form hat: deviceName.Event
- bzw. deviceName.*. Wenn man den Plot
- Editor benutzt, ist das übrigens immer der Fall. Die SVG Datei
- wird bei jedem auslösenden Event dieses Gerätes neu
- geladen. Standard ist aus.
-
-
-
- redirectCmds
- Damit wird das URL Eingabefeld des Browser nach einem Befehl geleert.
- Standard ist eingeschaltet (1), ausschalten kann man es durch
- setzen des Attributs auf 0, z.Bsp. um den Syntax der Kommunikation mit
- FHEMWEB zu untersuchen.
-
-
-
- fwcompress
- Aktiviert die HTML Datenkompression (Standard ist 1, also ja, 0 stellt
- die Kompression aus).
-
-
-
- reverseLogs
- Damit wird das Logfile umsortiert, die neuesten Einträge stehen
- oben. Der Vorteil ist, dass man nicht runterscrollen muss um den
- neuesten Eintrag zu sehen, der Nachteil dass FHEM damit deutlich mehr
- Hauptspeicher benötigt, etwa 6 mal so viel, wie das Logfile auf
- dem Datenträger groß ist. Das kann auf Systemen mit wenig
- Speicher (FRITZ!Box) zum Terminieren des FHEM Prozesses durch das
- Betriebssystem führen.
-
-
-
- CORS
- Wenn auf 1 gestellt, wird FHEMWEB einen "Cross origin resource sharing"
- Header bereitstellen, näheres siehe Wikipedia.
-
-
-
- icon
- Damit definiert man ein Icon für die einzelnen Geräte in der
- Raumübersicht. Es gibt einen passenden Link in der Detailansicht
- um das zu vereinfachen. Um ein Bild für die Räume selbst zu
- definieren muss ein Icon mit dem Namen ico<Raumname>.png im
- iconPath existieren (oder man verwendet roomIcons, s.u.)
-
-
-
- roomIcons
- Leerzeichen getrennte Liste von room:icon Zuordnungen
- Der erste Teil wird als regexp interpretiert, daher muss ein
- Leerzeichen als Punkt geschrieben werden. Beispiel:
- attr WEB roomIcons Anlagen.EDV:icoEverything
-
-
-
- sortRooms
- Durch Leerzeichen getrennte Liste von Räumen, um deren Reihenfolge
- zu definieren.
- Da die Räume in diesem Attribut als Regexp interpretiert werden,
- sind Leerzeichen im Raumnamen als Punkt (.) zu hinterlegen.
- Beispiel:
- attr WEB sortRooms DG OG EG Keller
-
-
-
- defaultRoom
- Zeigt den angegebenen Raum an falls kein Raum explizit ausgewählt
- wurde. Achtung: falls gesetzt, wird motd nicht mehr angezeigt.
- Beispiel:
- attr WEB defaultRoom Zentrale
-
-
-
- sortby
- Der Wert dieses Attributs wird zum sortieren von Geräten in
- Räumen verwendet, sonst wäre es der Alias oder, wenn keiner
- da ist, der Gerätename selbst.
+
+ closeConn
+ Falls gesetzt, wird pro TCP Verbindung nur ein HTTP Request
+ durchgeführt. Für iOS9 WebApp startups scheint es zu helfen.
@@ -3891,6 +3617,59 @@ FW_widgetOverride($$)
+
+ column
+ Damit werden mehrere Spalten für einen Raum angezeigt, indem
+ sie verschiedene Gruppen Spalten zuordnen. Beispiel:
+
+ attr WEB column LivingRoom:FS20,notify|FHZ,notify DiningRoom:FS20|FHZ
+
+
+ In diesem Beispiel werden im Raum LivingRoom die FS20 sowie die notify
+ Gruppe in der ersten Spalte, die FHZ und das notify in der zweiten
+ Spalte angezeigt.
+
+ Anmerkungen: einige Elemente, wie SVG Plots und readingsGroup
+ können nur dann Teil einer Spalte sein wenn sie in group stehen. Dieses Attribut kann man zum sortieren
+ der Gruppen auch dann verwenden, wenn man nur eine Spalte hat.
+ Leerzeichen im Raum- und Gruppennamen sind für dieses Attribut als
+ %20 zu schreiben.
+
+
+
+ CORS
+ Wenn auf 1 gestellt, wird FHEMWEB einen "Cross origin resource sharing"
+ Header bereitstellen, näheres siehe Wikipedia.
+
+
+
+ csrfToken
+ Falls gesetzt, wird der Wert des Attributes als fwcsrf Parameter bei
+ jedem ueber FHEMWEB abgesetzten Kommando verlangt. Falls der Wert
+ random ist, dann wird ein Zufallswert beim jeden FHEMWEB Start neu
+ generiert.
+ Es dient zum Schutz von Cross Site Resource Forgery Angriffen.
+ Default ist leer, also nicht aktiv.
+
+
+
+ CssFiles
+ Leerzeichen getrennte Liste von .css Dateien, die geladen werden.
+ Die Dateinamen sind relativ zum www Verzeichnis anzugeben. Beispiel:
+
+ attr WEB CssFiles pgm2/mystyle.css
+
+
+
+
+ defaultRoom
+ Zeigt den angegebenen Raum an falls kein Raum explizit ausgewählt
+ wurde. Achtung: falls gesetzt, wird motd nicht mehr angezeigt.
+ Beispiel:
+ attr WEB defaultRoom Zentrale
+
+
devStateIcon
Erste Variante:
@@ -3939,6 +3718,348 @@ FW_widgetOverride($$)
+
+ editConfig
+ Falls dieses FHEMWEB Attribut (auf 1) gesetzt ist, dann kann man die
+ FHEM Konfigurationsdatei in dem "Edit files" Abschnitt bearbeiten. Beim
+ Speichern dieser Datei wird automatisch rereadcfg ausgefuehrt, was
+ diverse Nebeneffekte hat.
+
+
+
+ editFileList
+ Definiert die Liste der angezeigten Dateien in der "Edit Files" Abschnitt.
+ Es ist eine Newline getrennte Liste von Tripeln bestehend aus Titel,
+ Verzeichnis für die Suche, und Regexp. Die Voreinstellung ist:
+
+
+ Own modules and helper files:$MW_dir:^(.*sh|[0-9][0-9].*Util.*pm|.*cfg|.*holiday|myUtilsTemplate.pm|.*layout)$
+ Gplot files:$FW_gplotdir:^.*gplot$
+ Styles:$FW_cssdir:^.*(css|svg)$
+
+
+
+
+
+ endPlotNow
+ Wenn Sie dieses FHEMWEB Attribut auf 1 setzen, werden Tages und
+ Stunden-Plots zur aktuellen Zeit beendet. (Ähnlich wie
+ endPlotToday, nur eben minütlich).
+ Ansonsten wird der gesamte Tag oder eine 6 Stunden Periode (0, 6, 12,
+ 18 Stunde) gezeigt. Dieses Attribut wird nicht verwendet, wenn das SVG
+ Attribut startDate benutzt wird.
+
+
+
+ endPlotToday
+ Wird dieses FHEMWEB Attribut gesetzt, so enden Wochen- bzw. Monatsplots
+ am aktuellen Tag, sonst wird die aktuelle Woche/Monat angezeigt.
+
+
+
+ fwcompress
+ Aktiviert die HTML Datenkompression (Standard ist 1, also ja, 0 stellt
+ die Kompression aus).
+
+
+
+ hiddengroup
+ Wie hiddenroom (siehe oben), jedoch auf Gerätegruppen bezogen.
+
+ Beispiel: attr WEBtablet hiddengroup FileLog,dummy,at,notify
+
+
+
+ hiddenroom
+ Eine Komma getrennte Liste, um Räume zu verstecken, d.h. nicht
+ anzuzeigen. Besondere Werte sind input, detail und save. In diesem
+ Fall werden diverse Eingabefelder ausgeblendent. Durch direktes Aufrufen
+ der URL sind diese Räume weiterhin erreichbar!
+ Ebenso können Einträge in den Logfile/Commandref/etc Block
+ versteckt werden.
+
+
+ HTTPS
+ Ermöglicht HTTPS Verbindungen. Es werden die Perl Module
+ IO::Socket::SSL benötigt, installierbar mit cpan -i
+ IO::Socket::SSL oder apt-get install libio-socket-ssl-perl; (OSX und
+ die FritzBox-7390 haben dieses Modul schon installiert.)
+
+ Ein lokales Zertifikat muss im Verzeichis certs erzeugt werden.
+ Dieses Verzeichnis muss im modpath
+ angegeben werden, also auf der gleichen Ebene wie das FHEM Verzeichnis.
+ Beispiel:
+
+ mkdir certs
+ cd certs
+ openssl req -new -x509 -nodes -out server-cert.pem -days 3650 -keyout
+ server-key.pem
+
+
+
+
+
+
+ icon
+ Damit definiert man ein Icon für die einzelnen Geräte in der
+ Raumübersicht. Es gibt einen passenden Link in der Detailansicht
+ um das zu vereinfachen. Um ein Bild für die Räume selbst zu
+ definieren muss ein Icon mit dem Namen ico<Raumname>.png im
+ iconPath existieren (oder man verwendet roomIcons, s.u.)
+
+
+
+ iconPath
+ Durch Doppelpunkt getrennte Aufzählung der Verzeichnisse, in
+ welchen nach Icons gesucht wird. Die Verzeichnisse müssen unter
+ fhem/www/images angelegt sein. Standardeinstellung ist:
+ $styleSheetPrefix:default:fhemSVG:openautomation
+ Setzen Sie den Wert auf fhemSVG:openautomation um nur SVG Bilder zu
+ benutzen.
+
+
+
+ JavaScripts
+ Leerzeichen getrennte Liste von JavaScript Dateien, die geladen werden.
+ Die Dateinamen sind relativ zum www Verzeichnis anzugeben. Für
+ jede Datei wird ein zusätzliches Attribut angelegt, damit der
+ Benutzer dem Skript Parameter weiterreichen kann. Bei diesem
+ Attributnamen werden Verzeichnisname und fhem_ Präfix entfernt
+ und Param als Suffix hinzugefügt. Beispiel:
+
+
+ attr WEB JavaScripts codemirror/fhem_codemirror.js
+ attr WEB codemirrorParam { "theme":"blackboard", "lineNumbers":true }
+
+
+
+
+ longpoll
+ Dies betrifft die Aktualisierung der Gerätestati in der
+ Weboberfläche. Ist longpoll aktiviert, werden
+ Statusänderungen sofort im Browser dargestellt. ohne die Seite
+ manuell neu laden zu müssen. Standard ist aktiviert.
+
+
+
+
+ longpollSVG
+ Lädt SVG Instanzen erneut, falls ein Ereignis dessen Inhalt
+ ändert. Funktioniert nur, falls der dazugehörige #FileLog
+ Definition in der .gplot Datei folgenden Form hat: deviceName.Event
+ bzw. deviceName.*. Wenn man den Plot
+ Editor benutzt, ist das übrigens immer der Fall. Die SVG Datei
+ wird bei jedem auslösenden Event dieses Gerätes neu
+ geladen. Standard ist aus.
+
+
+
+ menuEntries
+ Komma getrennte Liste; diese Links werden im linken Menü angezeigt.
+ Beispiel:
+ attr WEB menuEntries fhem.de,http://fhem.de,culfw.de,http://culfw.de
+ attr WEB menuEntries
+ AlarmOn,http://fhemhost:8083/fhem?cmd=set%20alarm%20on
+
+
+
+ nameDisplay
+ Das Argument ist Perl-Code, was für jedes Gerät in der
+ Raum-Übersicht ausgeführt wird, um den angezeigten Namen zu
+ berechnen. Dabei kann man die Variable $DEVICE für den aktuellen
+ Gerätenamen, und $ALIAS für den aktuellen alias bzw. Name,
+ falls alias nicht gesetzt ist, verwenden. Z.Bsp. für eine FHEMWEB
+ Instanz mit ungarischer Anzeige fügt man ein global userattr
+ alias_hu hinzu, und man setzt nameDisplay für diese FHEMWEB
+ Instanz auf dem Wert:
+
+ AttrVal($d, "alias_hu", $devName)
+
+
+
+
+
+ nrAxis
+ (bei mehrfach-Y-Achsen im SVG-Plot) Die Darstellung der Y Achsen
+ benötigt Platz. Hierdurch geben Sie an wie viele Achsen Sie
+ links,rechts [useLeft,useRight] benötigen. Default ist 1,1 (also 1
+ Achse links, 1 Achse rechts).
+
+
+
+ ploteditor
+ Gibt an ob der Plot Editor in der SVG detail
+ ansicht angezeigt werden soll. Kann auf always, onClick oder never
+ gesetzt werden. Der Default ist always.
+
+
+
+ plotEmbed 0
+ SVG Grafiken werden als Teil der <embed> Tags dargestellt, da
+ früher das der einzige Weg war SVG darzustellen, weiterhin
+ erlaubt es das parallele Berechnen via plotfork (s.o.)
+ Falls plotEmbed auf 0 gesetzt wird, dann werden die SVG Grafiken als
+ Teil der HTML-Seite generiert, was leider das plotfork Attribut
+ wirkungslos macht.
+
+
+
+ plotfork
+ Normalerweise wird die Ploterstellung im Hauptprozess ausgeführt,
+ FHEM wird wärend dieser Zeit nicht auf andere Ereignisse
+ reagieren.
+ Falls dieses Attribut auf einen nicht 0 Wert gesetzt ist, dann wird die
+ Berechnung in weitere Prozesse ausgelagert. Das kann die Berechnung auf
+ Rechnern mit mehreren Prozessoren beschleunigen, allerdings kann es auf
+ Rechnern mit wenig Speicher (z.Bsp. FRITZ!Box 7390) zum automatischen
+ Abschuss des FHEM Prozesses durch das OS führen.
+
+
+
+ plotmode
+ Spezifiziert, wie Plots erzeugt werden sollen:
+
+ - SVG
+ Die Plots werden mit Hilfe des SVG Moduls als SVG
+ Grafik gerendert. Das ist die Standardeinstellung.
+
+ - gnuplot
+ Die Plots werden mit Hilfe des gnuplot Programmes erzeugt. Diese
+ Option ist aus historischen Gründen vorhanden.
+
+
+ - gnuplot-scroll
+ Wie gnuplot, der einfache Zugriff auf historische Daten ist aber
+ genauso möglich wie mit dem SVG Modul.
+
+
+
+
+
+ plotsize
+ gibt die Standardbildgröße aller erzeugten Plots an als
+ Breite,Höhe an. Um einem individuellen Plot die Größe zu
+ ändern muss dieses Attribut bei der entsprechenden SVG Instanz
+ gesetzt werden. Default sind 800,160 für Desktop und 480,160
+ für Smallscreen
+
+
+
+ plotWeekStartDay
+ Starte das Plot in der Wochen-Ansicht mit diesem Tag.
+ 0 ist Sonntag, 1 ist Montag, usw.
+
+
+
+ redirectCmds
+ Damit wird das URL Eingabefeld des Browser nach einem Befehl geleert.
+ Standard ist eingeschaltet (1), ausschalten kann man es durch
+ setzen des Attributs auf 0, z.Bsp. um den Syntax der Kommunikation mit
+ FHEMWEB zu untersuchen.
+
+
+
+ refresh
+ Damit erzeugen Sie auf den ausgegebenen Webseiten einen automatischen
+ Refresh, z.B. nach 5 Sekunden.
+
+
+
+ reverseLogs
+ Damit wird das Logfile umsortiert, die neuesten Einträge stehen
+ oben. Der Vorteil ist, dass man nicht runterscrollen muss um den
+ neuesten Eintrag zu sehen, der Nachteil dass FHEM damit deutlich mehr
+ Hauptspeicher benötigt, etwa 6 mal so viel, wie das Logfile auf
+ dem Datenträger groß ist. Das kann auf Systemen mit wenig
+ Speicher (FRITZ!Box) zum Terminieren des FHEM Prozesses durch das
+ Betriebssystem führen.
+
+
+
+ roomIcons
+ Leerzeichen getrennte Liste von room:icon Zuordnungen
+ Der erste Teil wird als regexp interpretiert, daher muss ein
+ Leerzeichen als Punkt geschrieben werden. Beispiel:
+ attr WEB roomIcons Anlagen.EDV:icoEverything
+
+
+
+ sortby
+ Der Wert dieses Attributs wird zum sortieren von Geräten in
+ Räumen verwendet, sonst wäre es der Alias oder, wenn keiner
+ da ist, der Gerätename selbst.
+
+
+
+ showUsedFiles
+ Zeige nur die verwendeten Dateien in der "Edit files" Abschnitt.
+ Achtung: aktuell ist das nur für den "Gplot files" Abschnitt
+ implementiert.
+
+
+
+
+ sortRooms
+ Durch Leerzeichen getrennte Liste von Räumen, um deren Reihenfolge
+ zu definieren.
+ Da die Räume in diesem Attribut als Regexp interpretiert werden,
+ sind Leerzeichen im Raumnamen als Punkt (.) zu hinterlegen.
+ Beispiel:
+ attr WEB sortRooms DG OG EG Keller
+
+
+
+ smallscreenCommands
+ Falls auf 1 gesetzt werden Kommandos, Slider und Dropdown Menüs im
+ Smallscreen Landscape Modus angezeigt.
+
+
+ sslVersion
+ Siehe das global Attribut sslVersion.
+
+
+
+ stylesheetPrefix
+ Präfix für die Dateien style.css, svg_style.css und
+ svg_defs.svg. Wenn die Datei mit dem Präfix fehlt, wird die Default
+ Datei (ohne Präfix) verwendet. Diese Dateien müssen im FHEM
+ Ordner liegen und können direkt mit "Select style" im FHEMWEB
+ Menüeintrag ausgewählt werden. Beispiel:
+
+ attr WEB stylesheetPrefix dark
+
+ Referenzdateien:
+
+ darksvg_defs.svg
+ darksvg_style.css
+ darkstyle.css
+
+
+
+ Anmerkung:Wenn der Parametername smallscreen oder touchpad
+ enthält, wird FHEMWEB das Layout/den Zugriff für entsprechende
+ Geräte (Smartphones oder Touchpads) optimieren
+
+ Standardmäßig werden 3 FHEMWEB Instanzen aktiviert: Port 8083
+ für Desktop Browser, Port 8084 für Smallscreen, und 8085
+ für Touchpad.
+
+ Wenn touchpad oder smallscreen benutzt werden, wird WebApp support
+ aktiviert: Nachdem Sie eine Seite am iPhone oder iPad mit Safari
+ angesehen haben, können Sie einen Link auf den Homescreen anlegen um
+ die Seite im Fullscreen Modus zu sehen. Links werden in diesem Modus
+ anders gerendert, um ein "Zurückfallen" in den "normalen" Browser zu
+ verhindern.
+
+
+
+ SVGcache
+ Plots die sich nicht mehr ändern, werden im SVGCache Verzeichnis
+ (www/SVGcache) gespeichert, um die erneute, rechenintensive
+ Berechnung der Grafiken zu vermeiden. Default ist 0, d.h. aus.
+ Siehe den clearSvgCache Befehl um diese Daten zu löschen.
+
+
webCmd
Durch Doppelpunkte getrennte Auflistung von Befehlen, die für ein
@@ -3971,6 +4092,11 @@ FW_widgetOverride($$)
nicht für die FHEMWEBInstanz.
+
+ webname
+ Der Pfad nach http://hostname:port/ . Standard ist fhem,
+ so ist die Standard HTTP Adresse http://localhost:8083/fhem
+
widgetOverride
@@ -4102,76 +4228,6 @@ FW_widgetOverride($$)
-
- column
- Damit werden mehrere Spalten für einen Raum angezeigt, indem
- sie verschiedene Gruppen Spalten zuordnen. Beispiel:
-
- attr WEB column LivingRoom:FS20,notify|FHZ,notify DiningRoom:FS20|FHZ
-
-
- In diesem Beispiel werden im Raum LivingRoom die FS20 sowie die notify
- Gruppe in der ersten Spalte, die FHZ und das notify in der zweiten
- Spalte angezeigt.
-
- Anmerkungen: einige Elemente, wie SVG Plots und readingsGroup
- können nur dann Teil einer Spalte sein wenn sie in group stehen. Dieses Attribut kann man zum sortieren
- der Gruppen auch dann verwenden, wenn man nur eine Spalte hat.
- Leerzeichen im Raum- und Gruppennamen sind für dieses Attribut als
- %20 zu schreiben.
-
-
-
- closeConn
- Falls gesetzt, wird pro TCP Verbindung nur ein HTTP Request
- durchgeführt. Für iOS9 WebApp startups scheint es zu helfen.
-
-
-
- CssFiles
- Leerzeichen getrennte Liste von .css Dateien, die geladen werden.
- Die Dateinamen sind relativ zum www Verzeichnis anzugeben. Beispiel:
-
- attr WEB CssFiles pgm2/mystyle.css
-
-
-
-
- JavaScripts
- Leerzeichen getrennte Liste von JavaScript Dateien, die geladen werden.
- Die Dateinamen sind relativ zum www Verzeichnis anzugeben. Für
- jede Datei wird ein zusätzliches Attribut angelegt, damit der
- Benutzer dem Skript Parameter weiterreichen kann. Bei diesem
- Attributnamen werden Verzeichnisname und fhem_ Präfix entfernt
- und Param als Suffix hinzugefügt. Beispiel:
-
-
- attr WEB JavaScripts codemirror/fhem_codemirror.js
- attr WEB codemirrorParam { "theme":"blackboard", "lineNumbers":true }
-
-
-
-
- csrfToken
- Falls gesetzt, wird der Wert des Attributes als fwcsrf Parameter bei
- jedem ueber FHEMWEB abgesetzten Kommando verlangt. Falls der Wert
- random ist, dann wird ein Zufallswert beim jeden FHEMWEB Start neu
- generiert.
- Es dient zum Schutz von Cross Site Resource Forgery Angriffen.
- Default ist leer, also nicht aktiv.
-
-
-
- smallscreenCommands
- Falls auf 1 gesetzt werden Kommandos, Slider und Dropdown Menüs im
- Smallscreen Landscape Modus angezeigt.
-
-
- sslVersion
- Siehe das global Attribut sslVersion.
-
-