2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

corrections for the demo package

git-svn-id: https://svn.fhem.de/fhem/trunk@3767 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2013-08-22 21:05:37 +00:00
parent b2c8c0fdf5
commit 1757b64e15
3 changed files with 17 additions and 17 deletions

View File

@ -216,11 +216,11 @@ autocreate_Notify($$)
next if(!$wdef);
my ($gplotfile, $stuff) = split(/:/, $wdef);
next if(!$gplotfile);
my $wlname = "weblink_$name";
my $wlname = "SVG_$name";
$wlname .= "_$wnr" if($wnr > 1);
$wnr++;
delete($defs{$wlname}); # If we are re-creating it with createlog.
$cmd = "$wlname weblink fileplot $flname:$gplotfile:CURRENT";
$cmd = "$wlname SVG fileplot $flname:$gplotfile:CURRENT";
Log3 $me, 2, "autocreate: define $cmd";
$ret = CommandDefine(undef, $cmd);
if($ret) {
@ -253,13 +253,13 @@ autocreate_Notify($$)
$nrcreated++;
}
if($defs{"weblink_$old"}) {
CommandRename(undef, "weblink_$old weblink_$new");
my $hash = $defs{"weblink_$new"};
if($defs{"SVG_$old"}) {
CommandRename(undef, "SVG_$old SVG_$new");
my $hash = $defs{"SVG_$new"};
$hash->{LINK} =~ s/$old/$new/g;
$hash->{DEF} =~ s/$old/$new/g;
$attr{"weblink_$new"}{label} =~ s/$old/$new/g;
Log3 $me, 2, "autocreate: renamed weblink_$old to weblink_$new";
$attr{"SVG_$new"}{label} =~ s/$old/$new/g;
Log3 $me, 2, "autocreate: renamed SVG_$old to SVG_$new";
$nrcreated++;
}
}
@ -521,16 +521,16 @@ autocreate_Attr(@)
"#autoload_undefined_devices">autoload_undefined_devices</a>
is set, so that modules for unknnown devices are automatically loaded.
The autocreate module intercepts the UNDEFINED event generated by each
module, creates a device and optionally also FileLog and weblink
module, creates a device and optionally also FileLog and SVG
entries.<br>
<b>Note 1:</b> devices will be created with a unique name, which contains
the type and a unique id for this type. When <a href="#rename">renaming
</a> the device, the automatically created filelog and weblink devices
</a> the device, the automatically created filelog and SVG devices
will also be renamed.<br>
<b>Note 2:</b> you can disable the automatic creation by setting the
<a href="#disable">disable</a> attribute, in this case only the rename
hook is active, and you can use the <a href="#createlog">createlog</a>
command to add FileLog and weblink to an already defined device.
command to add FileLog and SVG to an already defined device.
</ul>
<br>
@ -573,11 +573,11 @@ autocreate_Attr(@)
<a name="weblinkattr"></a>
<li>weblink<br>
Create a weblink associated with the device/filelog.</li><br>
Create an SVG associated with the device/filelog.</li><br>
<a name="weblink_room"></a>
<li>weblink_room<br>
"Put" the newly weblink in this room. The name can contain the
"Put" the newly created SVG in this room. The name can contain the
wildcards %TYPE and %NAME, see the example above.</li><br>
<li><a href="#disable">disable</a></li>
@ -596,7 +596,7 @@ autocreate_Attr(@)
<a name="createlog"></a>
<b>createlog</b>
<ul>
Use this command to manually add a FileLog and a weblink to an existing
Use this command to manually add a FileLog and an SVG to an existing
device. E.g. if a HomeMatic device is created automatically by something
else then a pairing message, the model is unknown, so no plots will be
generated. You can set the model/subtype attribute manually, and then call

View File

@ -405,11 +405,10 @@ sub
structure_Attr($@)
{
my ($type, @list) = @_;
my %ignore = ("alias"=>1, "room"=>1, "group"=>1, "icon"=>1,
"devStateIcon"=>1, "webCmd"=>1, "stateFormat"=>1 );
return undef if($list[1] eq "alias" ||
$list[1] eq "room" ||
$list[1] =~ m/clientstate/ ||
$list[1] eq "loglevel");
return undef if($ignore{$list[1]} || $list[1] =~ m/clientstate/);
my $me = $list[0];
my $hash = $defs{$me};

View File

@ -2,6 +2,7 @@ FS20.off light_light_dim_00.svg
FS20.on light_light_dim_100.svg
off light_light_dim_00.svg
on light_light_dim_100.svg
on-for-timer light_light_dim_100.svg
Aus light_light_dim_00.svg
An light_light_dim_100.svg