mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
10_EnOcean: autocreate routines changed
git-svn-id: https://svn.fhem.de/fhem/trunk@23408 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
48050a5bba
commit
0042f03141
@ -868,7 +868,7 @@ sub EnOcean_Define($$) {
|
|||||||
#Log3 $name, 2, "EnOcean $name Teach IODev: $ioDev" if (defined $ioDev);
|
#Log3 $name, 2, "EnOcean $name Teach IODev: $ioDev" if (defined $ioDev);
|
||||||
|
|
||||||
my ($autocreateFilelog, $autocreateHash, $autocreateName, $autocreateDeviceRoom, $autocreateWeblinkRoom) =
|
my ($autocreateFilelog, $autocreateHash, $autocreateName, $autocreateDeviceRoom, $autocreateWeblinkRoom) =
|
||||||
('./log/' . $name . '-%Y.log', undef, 'autocreate', 'EnOcean', 'Plots');
|
('./log/' . $name . '-%Y.log', undef, undef, 'EnOcean', 'Plots');
|
||||||
my ($cmd, $eep, $ret);
|
my ($cmd, $eep, $ret);
|
||||||
my $filelogName = "FileLog_$name";
|
my $filelogName = "FileLog_$name";
|
||||||
$def = "00000000";
|
$def = "00000000";
|
||||||
@ -883,7 +883,7 @@ sub EnOcean_Define($$) {
|
|||||||
$autocreateDeviceRoom = AttrVal($name, "room", $autocreateDeviceRoom);
|
$autocreateDeviceRoom = AttrVal($name, "room", $autocreateDeviceRoom);
|
||||||
if ($init_done) {
|
if ($init_done) {
|
||||||
Log3 $name, 2, "EnOcean define " . join(' ', @a);
|
Log3 $name, 2, "EnOcean define " . join(' ', @a);
|
||||||
if (!defined(AttrVal($autocreateName, "disable", undef)) && !exists($defs{$filelogName})) {
|
if (defined($autocreateName) && !defined(AttrVal($autocreateName, "disable", undef)) && !exists($defs{$filelogName})) {
|
||||||
# create FileLog
|
# create FileLog
|
||||||
$autocreateFilelog = $attr{$autocreateName}{filelog} if (exists $attr{$autocreateName}{filelog});
|
$autocreateFilelog = $attr{$autocreateName}{filelog} if (exists $attr{$autocreateName}{filelog});
|
||||||
$autocreateFilelog =~ s/%NAME/$name/g;
|
$autocreateFilelog =~ s/%NAME/$name/g;
|
||||||
@ -15907,7 +15907,7 @@ sub EnOcean_CreateSVG($$$) {
|
|||||||
my ($ctrl, $hash, $eepSVG) = @_;
|
my ($ctrl, $hash, $eepSVG) = @_;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
my ($autocreateHash, $autocreateName, $autocreateDeviceRoom, $autocreateWeblinkRoom) =
|
my ($autocreateHash, $autocreateName, $autocreateDeviceRoom, $autocreateWeblinkRoom) =
|
||||||
(undef, 'autocreate', 'EnOcean', 'Plots');
|
(undef, undef, 'EnOcean', 'Plots');
|
||||||
my $filelogName = "FileLog_$name";
|
my $filelogName = "FileLog_$name";
|
||||||
my ($cmd, $eep, $weblinkName, $weblinkHash, $ret);
|
my ($cmd, $eep, $weblinkName, $weblinkHash, $ret);
|
||||||
if (defined($eepSVG) && $eepSVG =~ m/^([A-Za-z0-9]{2})-([A-Za-z0-9]{2})-([A-Za-z0-9]{2})$/i) {
|
if (defined($eepSVG) && $eepSVG =~ m/^([A-Za-z0-9]{2})-([A-Za-z0-9]{2})-([A-Za-z0-9]{2})$/i) {
|
||||||
@ -15930,7 +15930,7 @@ sub EnOcean_CreateSVG($$$) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!defined(AttrVal($autocreateName, "disable", undef)) && exists($defs{$filelogName})) {
|
if (defined($autocreateName) && !defined(AttrVal($autocreateName, "disable", undef)) && exists($defs{$filelogName})) {
|
||||||
if (exists $EnO_eepConfig{$eep}{GPLOT}) {
|
if (exists $EnO_eepConfig{$eep}{GPLOT}) {
|
||||||
# add GPLOT parameters
|
# add GPLOT parameters
|
||||||
$attr{$filelogName}{logtype} = $EnO_eepConfig{$eep}{GPLOT} . $attr{$filelogName}{logtype}
|
$attr{$filelogName}{logtype} = $EnO_eepConfig{$eep}{GPLOT} . $attr{$filelogName}{logtype}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user