mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-29 17:37:09 +00:00
98_autocreate.pm: update links in the doc, allow creating dummies
git-svn-id: https://svn.fhem.de/fhem/trunk@29378 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ae9aae6352
commit
eee79f6bdc
@ -70,8 +70,20 @@ autocreate_Initialize($)
|
|||||||
$hash->{DefFn} = "autocreate_Define";
|
$hash->{DefFn} = "autocreate_Define";
|
||||||
$hash->{NotifyFn} = "autocreate_Notify";
|
$hash->{NotifyFn} = "autocreate_Notify";
|
||||||
$hash->{AttrFn} = "autocreate_Attr";
|
$hash->{AttrFn} = "autocreate_Attr";
|
||||||
$hash->{AttrList}= "autosave filelog device_room weblink weblink_room " .
|
no warnings 'qw';
|
||||||
"disable ignoreTypes autocreateThreshold";
|
my @attrList = qw(
|
||||||
|
autocreateThreshold
|
||||||
|
autosave
|
||||||
|
device_room
|
||||||
|
disable
|
||||||
|
filelog
|
||||||
|
ignoreTypes
|
||||||
|
weblink
|
||||||
|
weblink_room
|
||||||
|
);
|
||||||
|
use warnings 'qw';
|
||||||
|
$hash->{AttrList} = join(" ", @attrList);
|
||||||
|
|
||||||
my %ahash = ( Fn=>"CommandCreateLog",
|
my %ahash = ( Fn=>"CommandCreateLog",
|
||||||
Hlp=>"<device>,create log/weblink for <device>",
|
Hlp=>"<device>,create log/weblink for <device>",
|
||||||
ModuleName => "autocreate" );
|
ModuleName => "autocreate" );
|
||||||
@ -131,7 +143,7 @@ autocreate_Notify($$)
|
|||||||
$s =~ s/ -temporary//;
|
$s =~ s/ -temporary//;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($s =~ m/^UNDEFINED ([^ ]*) ([^ ]*) (.*)$/) {
|
if($s =~ m/^UNDEFINED ([^ ]*) ([^ ]*)(.*)$/) {
|
||||||
my ($name, $type, $arg) = ($1, $2, $3);
|
my ($name, $type, $arg) = ($1, $2, $3);
|
||||||
next if(AttrVal($me, "disable", undef));
|
next if(AttrVal($me, "disable", undef));
|
||||||
|
|
||||||
@ -210,11 +222,11 @@ autocreate_Notify($$)
|
|||||||
|
|
||||||
my $count = keys %{$hash->{received}{$type}{$arg}};
|
my $count = keys %{$hash->{received}{$type}{$arg}};
|
||||||
Log3 $me, 4, "autocreate: received $count event(s) for ".
|
Log3 $me, 4, "autocreate: received $count event(s) for ".
|
||||||
"'$type $arg' during the last $interval seconds";
|
"'$type$arg' during the last $interval seconds";
|
||||||
|
|
||||||
if( $count < $min_count ) {
|
if( $count < $min_count ) {
|
||||||
Log3 $me, 4, "autocreate: ignoring event for ".
|
Log3 $me, 4, "autocreate: ignoring event for ".
|
||||||
"'$type $arg': at least $min_count needed";
|
"'$type$arg': at least $min_count needed";
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -236,8 +248,8 @@ autocreate_Notify($$)
|
|||||||
|
|
||||||
####################
|
####################
|
||||||
if(!$hash) {
|
if(!$hash) {
|
||||||
$cmd = "$name $type $arg";
|
$cmd = "$name $type$arg";
|
||||||
$cmd = "-temporary $name $type $arg" if($temporary);
|
$cmd = "-temporary $name $type$arg" if($temporary);
|
||||||
Log3 $me, 2, "autocreate: define $cmd";
|
Log3 $me, 2, "autocreate: define $cmd";
|
||||||
$ret = CommandDefine(undef, $cmd);
|
$ret = CommandDefine(undef, $cmd);
|
||||||
if($ret) {
|
if($ret) {
|
||||||
@ -729,7 +741,7 @@ autocreate_Attr(@)
|
|||||||
=item summary_DE Erzeugt FHEM-Geräte automatisch
|
=item summary_DE Erzeugt FHEM-Geräte automatisch
|
||||||
=begin html
|
=begin html
|
||||||
|
|
||||||
<a name="autocreate"></a>
|
<a id="autocreate"></a>
|
||||||
<h3>autocreate</h3>
|
<h3>autocreate</h3>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
@ -739,7 +751,7 @@ autocreate_Attr(@)
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<a name="autocreatedefine"></a>
|
<a id="autocreate-define"></a>
|
||||||
<b>Define</b>
|
<b>Define</b>
|
||||||
<ul>
|
<ul>
|
||||||
<code>define <name> autocreate</code><br>
|
<code>define <name> autocreate</code><br>
|
||||||
@ -776,16 +788,16 @@ autocreate_Attr(@)
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<a name="autocreateset"></a>
|
<a id="autocreate-set"></a>
|
||||||
<b>Set</b> <ul>N/A</ul><br>
|
<b>Set</b> <ul>N/A</ul><br>
|
||||||
|
|
||||||
<a name="autocreateget"></a>
|
<a id="autocreate-get"></a>
|
||||||
<b>Get</b> <ul>N/A</ul><br>
|
<b>Get</b> <ul>N/A</ul><br>
|
||||||
|
|
||||||
<a name="autocreateattr"></a>
|
<a id="autocreate-attr"></a>
|
||||||
<b>Attributes</b>
|
<b>Attributes</b>
|
||||||
<ul>
|
<ul>
|
||||||
<a name="autosave"></a>
|
<a id="autocreate-attr-autosave"></a>
|
||||||
<li>autosave<br>
|
<li>autosave<br>
|
||||||
After creating a device, automatically save the config file with the
|
After creating a device, automatically save the config file with the
|
||||||
command <a href="#save">save</a> command. Default is 1 (i.e. on), set
|
command <a href="#save">save</a> command. Default is 1 (i.e. on), set
|
||||||
@ -794,22 +806,22 @@ autocreate_Attr(@)
|
|||||||
attribute instead.
|
attribute instead.
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<a name="device_room"></a>
|
<a id="autocreate-attr-device_room"></a>
|
||||||
<li>device_room<br>
|
<li>device_room<br>
|
||||||
"Put" the newly created device in this room. The name can contain the
|
"Put" the newly created device in this room. The name can contain the
|
||||||
wildcards %TYPE and %NAME, see the example above.</li><br>
|
wildcards %TYPE and %NAME, see the example above.</li><br>
|
||||||
|
|
||||||
<a name="filelogattr"></a>
|
<a id="autocreate-attr-filelog"></a>
|
||||||
<li>filelog<br>
|
<li>filelog<br>
|
||||||
Create a filelog associated with the device. The filename can contain
|
Create a filelog associated with the device. The filename can contain
|
||||||
the wildcards %TYPE and %NAME, see the example above. The filelog will
|
the wildcards %TYPE and %NAME, see the example above. The filelog will
|
||||||
be "put" in the same room as the device.</li><br>
|
be "put" in the same room as the device.</li><br>
|
||||||
|
|
||||||
<a name="weblinkattr"></a>
|
<a id="autocreate-attr-weblink"></a>
|
||||||
<li>weblink<br>
|
<li>weblink<br>
|
||||||
Create an SVG associated with the device/filelog.</li><br>
|
Create an SVG associated with the device/filelog.</li><br>
|
||||||
|
|
||||||
<a name="weblink_room"></a>
|
<a id="autocreate-attr-weblink_room"></a>
|
||||||
<li>weblink_room<br>
|
<li>weblink_room<br>
|
||||||
"Put" the newly created SVG 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>
|
wildcards %TYPE and %NAME, see the example above.</li><br>
|
||||||
@ -817,7 +829,7 @@ autocreate_Attr(@)
|
|||||||
<li><a href="#disable">disable</a></li>
|
<li><a href="#disable">disable</a></li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<a name="ignoreTypes"></a>
|
<a id="autocreate-attr-ignoreTypes"></a>
|
||||||
<li>ignoreTypes<br>
|
<li>ignoreTypes<br>
|
||||||
This is a regexp, to ignore certain devices, e.g. the neighbours FHT.
|
This is a regexp, to ignore certain devices, e.g. the neighbours FHT.
|
||||||
You can specify more than one, with usual regexp syntax, e.g.<br>
|
You can specify more than one, with usual regexp syntax, e.g.<br>
|
||||||
@ -829,7 +841,7 @@ autocreate_Attr(@)
|
|||||||
type:name (same procedure as in notify and FileLog).
|
type:name (same procedure as in notify and FileLog).
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<a name="autocreateThreshold"></a>
|
<a id="autocreate-attr-autocreateThreshold"></a>
|
||||||
<li>autocreateThreshold<br>
|
<li>autocreateThreshold<br>
|
||||||
A list of <type>:<count>:<interval> triplets. A new
|
A list of <type>:<count>:<interval> triplets. A new
|
||||||
device is only created if there have been at least <code>count</code>
|
device is only created if there have been at least <code>count</code>
|
||||||
@ -841,7 +853,7 @@ autocreate_Attr(@)
|
|||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<a name="createlog"></a>
|
<a id="createlog"></a>
|
||||||
<b>createlog</b>
|
<b>createlog</b>
|
||||||
<ul>
|
<ul>
|
||||||
Use this command to manually add a FileLog and an SVG to an existing
|
Use this command to manually add a FileLog and an SVG to an existing
|
||||||
@ -850,7 +862,7 @@ autocreate_Attr(@)
|
|||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<a name="usb"></a>
|
<a id="usb"></a>
|
||||||
<b>usb</b>
|
<b>usb</b>
|
||||||
<ul>
|
<ul>
|
||||||
Usage:
|
Usage:
|
||||||
@ -880,7 +892,7 @@ autocreate_Attr(@)
|
|||||||
|
|
||||||
=begin html_DE
|
=begin html_DE
|
||||||
|
|
||||||
<a name="autocreate"></a>
|
<a id="autocreate"></a>
|
||||||
<h3>autocreate</h3>
|
<h3>autocreate</h3>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
@ -891,7 +903,7 @@ autocreate_Attr(@)
|
|||||||
über EM1010PC) werden NICHT automatisch erzeugt.
|
über EM1010PC) werden NICHT automatisch erzeugt.
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
<a name="autocreatedefine"></a>
|
<a id="autocreatedefine"></a>
|
||||||
<b>Define</b>
|
<b>Define</b>
|
||||||
<ul>
|
<ul>
|
||||||
<code>define <name> autocreate</code><br>
|
<code>define <name> autocreate</code><br>
|
||||||
@ -936,16 +948,16 @@ autocreate_Attr(@)
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<a name="autocreateset"></a>
|
<a id="autocreate-set"></a>
|
||||||
<b>Set</b> <ul>N/A</ul><br>
|
<b>Set</b> <ul>N/A</ul><br>
|
||||||
|
|
||||||
<a name="autocreateget"></a>
|
<a id="autocreate-get"></a>
|
||||||
<b>Get</b> <ul>N/A</ul><br>
|
<b>Get</b> <ul>N/A</ul><br>
|
||||||
|
|
||||||
<a name="autocreateattr"></a>
|
<a id="autocreate-attr"></a>
|
||||||
<b>Attribute</b>
|
<b>Attribute</b>
|
||||||
<ul>
|
<ul>
|
||||||
<a name="autosave"></a>
|
<a id="autocreate-attr-autosave"></a>
|
||||||
<li>autosave<br>
|
<li>autosave<br>
|
||||||
Nach der Erzeugung eines neuen Gerätes wird automatisch die
|
Nach der Erzeugung eines neuen Gerätes wird automatisch die
|
||||||
Konfigurationsdatei mit dem Befehl <a href="#save">save</a>
|
Konfigurationsdatei mit dem Befehl <a href="#save">save</a>
|
||||||
@ -955,25 +967,25 @@ autocreate_Attr(@)
|
|||||||
das global autosave Attribut verwenden.
|
das global autosave Attribut verwenden.
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<a name="device_room"></a>
|
<a id="autocreate-attr-device_room"></a>
|
||||||
<li>device_room<br>
|
<li>device_room<br>
|
||||||
"Schiebt" das neu erstellte Gerät in diesen Raum. Der Name kann
|
"Schiebt" das neu erstellte Gerät in diesen Raum. Der Name kann
|
||||||
die Wildcards %NAME und %TYPE enthalten, siehe oben stehendes
|
die Wildcards %NAME und %TYPE enthalten, siehe oben stehendes
|
||||||
Beispiel.</li><br>
|
Beispiel.</li><br>
|
||||||
|
|
||||||
<a name="filelogattr"></a>
|
<a id="autocreate-attr-filelog"></a>
|
||||||
<li>filelog<br>
|
<li>filelog<br>
|
||||||
Erstellt ein Filelog welches zu einem Gerät gehört. Der
|
Erstellt ein Filelog welches zu einem Gerät gehört. Der
|
||||||
Dateiname darf die Wildcards %NAME und %TYPE enthalten, siehe oben
|
Dateiname darf die Wildcards %NAME und %TYPE enthalten, siehe oben
|
||||||
stehendes Beispiel. Das Filelog wird in den gleichen Raum "geschoben"
|
stehendes Beispiel. Das Filelog wird in den gleichen Raum "geschoben"
|
||||||
wie das zugehörige Gerät.</li><br>
|
wie das zugehörige Gerät.</li><br>
|
||||||
|
|
||||||
<a name="weblinkattr"></a>
|
<a id="autocreate-attr-weblink"></a>
|
||||||
<li>weblink<br>
|
<li>weblink<br>
|
||||||
Erzeugt ein SVG, welches mit dem Gerät/Filelog verknüpft
|
Erzeugt ein SVG, welches mit dem Gerät/Filelog verknüpft
|
||||||
ist.</li><br>
|
ist.</li><br>
|
||||||
|
|
||||||
<a name="weblink_room"></a>
|
<a id="autocreate-attr-weblink_room"></a>
|
||||||
<li>weblink_room<br>
|
<li>weblink_room<br>
|
||||||
"Schiebt" das neu erstellte SVG in den bezeichneten Raum. Der Name kann
|
"Schiebt" das neu erstellte SVG in den bezeichneten Raum. Der Name kann
|
||||||
die Wildcards %NAME und %TYPE enthalten, siehe oben stehendes
|
die Wildcards %NAME und %TYPE enthalten, siehe oben stehendes
|
||||||
@ -982,7 +994,7 @@ autocreate_Attr(@)
|
|||||||
<li><a href="#disable">disable</a></li>
|
<li><a href="#disable">disable</a></li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<a name="ignoreTypes"></a>
|
<a id="autocreate-attr-ignoreTypes"></a>
|
||||||
<li>ignoreTypes<br>
|
<li>ignoreTypes<br>
|
||||||
Dies ist ein Regexp, um bestimmte Geräte zu ignorieren, z.b. der
|
Dies ist ein Regexp, um bestimmte Geräte zu ignorieren, z.b. der
|
||||||
Funk-Heizungsthermostat (FHT) des Nachbarn. In dem Ausdruck können
|
Funk-Heizungsthermostat (FHT) des Nachbarn. In dem Ausdruck können
|
||||||
@ -996,7 +1008,7 @@ autocreate_Attr(@)
|
|||||||
bei notify und FileLog).
|
bei notify und FileLog).
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<a name="autocreateThreshold"></a>
|
<a id="autocreate-attr-autocreateThreshold"></a>
|
||||||
<li>autocreateThreshold<br>
|
<li>autocreateThreshold<br>
|
||||||
Eine Liste of <type>:<count>:<interval> tripeln. Ein
|
Eine Liste of <type>:<count>:<interval> tripeln. Ein
|
||||||
neues Device wird nur dann erzeugt wenn es mindestens <code>count</code>
|
neues Device wird nur dann erzeugt wenn es mindestens <code>count</code>
|
||||||
@ -1009,7 +1021,7 @@ autocreate_Attr(@)
|
|||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<a name="createlog"></a>
|
<a id="createlog"></a>
|
||||||
<b>createlog</b>
|
<b>createlog</b>
|
||||||
<ul>
|
<ul>
|
||||||
Dieser Befehl wird für ein manuelles Hinzufügen eines Logfile
|
Dieser Befehl wird für ein manuelles Hinzufügen eines Logfile
|
||||||
@ -1019,7 +1031,7 @@ autocreate_Attr(@)
|
|||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<a name="usb"></a>
|
<a id="usb"></a>
|
||||||
<b>usb</b>
|
<b>usb</b>
|
||||||
<ul>
|
<ul>
|
||||||
Verwendung:
|
Verwendung:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user