mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-19 06:36:04 +00:00
00_MQTT2_CLIENT.pm: delete readingList when setting bridgeRegexp (Forum #84790)
git-svn-id: https://svn.fhem.de/fhem/trunk@17712 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ab50bff79f
commit
9b3432965f
@ -270,7 +270,7 @@ MQTT2_CLIENT_Read($@)
|
||||
if(AttrVal($name, "verbose", 1) >= 5) {
|
||||
my $pltxt = $pl;
|
||||
$pltxt =~ s/([^ -~])/"(".ord($1).")"/ge;
|
||||
Log3 $name, 5, "$cpt: $pltxt";
|
||||
Log3 $name, 5, "$name: received $cpt $pltxt";
|
||||
}
|
||||
|
||||
####################################
|
||||
@ -328,6 +328,7 @@ MQTT2_CLIENT_doPublish($$$$)
|
||||
my $name = $hash->{NAME};
|
||||
return if(IsDisabled($name));
|
||||
$val = "" if(!defined($val));
|
||||
Log3 $name, 5, "$name: sending PUBLISH $topic $val";
|
||||
addToWritebuffer($hash,
|
||||
pack("C",0x30).
|
||||
MQTT2_CLIENT_calcRemainingLength(2+length($topic)+length($val)).
|
||||
|
@ -332,6 +332,12 @@ MQTT2_DEVICE_Attr($$)
|
||||
return "$dev $attrName regexp error: $@" if($@);
|
||||
$modules{MQTT2_DEVICE}{defptr}{bridge}{$par1} = $par2;
|
||||
}
|
||||
|
||||
if($init_done) {
|
||||
my $name = $hash->{NAME};
|
||||
AnalyzeCommandChain(undef,
|
||||
"deleteattr $name readingList; deletereading $name .*");
|
||||
}
|
||||
}
|
||||
|
||||
return undef;
|
||||
@ -437,9 +443,12 @@ MQTT2_DEVICE_Undef($$)
|
||||
will create different MQTT2_DEVICE instances for different hex numbers in
|
||||
the topic. Note: the newClientId is enclosed in "", as it is a perl
|
||||
expression, should be unique, and the automatically created device will
|
||||
be created also with this name.
|
||||
|
||||
be created also with this name.<br>
|
||||
<br>
|
||||
Multiple tuples of <regexp> newClientId are separated by newline.
|
||||
<br>
|
||||
Note: setting bridgeRegexp will remove th readingList attribute and all
|
||||
readings.
|
||||
</li><br>
|
||||
|
||||
<a name="devicetopic"></a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user