mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
49_SSCam: contrib 9.5.0
git-svn-id: https://svn.fhem.de/fhem/trunk@22422 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a788e1aa1c
commit
2cfe1da41a
@ -326,17 +326,11 @@ sub Set {
|
||||
|
||||
# Übernahme Link-Parameter
|
||||
my $link = "{$defs{$strmd}{LINKFN}('$defs{$strmd}{LINKPARENT}','$defs{$strmd}{LINKNAME}','$defs{$strmd}{LINKMODEL}')}";
|
||||
readingsSingleUpdate($hash,"clientLink", $link, 0);
|
||||
# readingsSingleUpdate($hash,"clientLink", $link, 0);
|
||||
push @r, "clientLink:$link";
|
||||
|
||||
if(@r) {
|
||||
readingsBeginUpdate($hash);
|
||||
|
||||
for my $elem (@r) {
|
||||
my ($rn,$rval) = split ":", $elem, 2;
|
||||
readingsBulkUpdate($hash, $rn, $rval);
|
||||
}
|
||||
|
||||
readingsEndUpdate($hash, 0);
|
||||
setReadings($hash, \@r, 0);
|
||||
}
|
||||
|
||||
webRefresh($hash);
|
||||
@ -349,14 +343,7 @@ sub Set {
|
||||
push @r, "parentState:initialized";
|
||||
push @r, "state:initialized";
|
||||
|
||||
readingsBeginUpdate($hash);
|
||||
|
||||
for my $elem (@r) {
|
||||
my ($rn,$rval) = split ":", $elem, 2;
|
||||
readingsBulkUpdate($hash, $rn, $rval);
|
||||
}
|
||||
|
||||
readingsEndUpdate($hash, 0);
|
||||
setReadings($hash, \@r, 0);
|
||||
|
||||
webRefresh($hash);
|
||||
|
||||
@ -651,6 +638,31 @@ sub delReadings {
|
||||
return;
|
||||
}
|
||||
|
||||
################################################################
|
||||
# set Readings
|
||||
# $rref = Referenz zum Array der zu setzenen Reading
|
||||
# (Aufbau: <Reading>:<Wert>)
|
||||
# $event = 1 wenn Event generiert werden soll
|
||||
################################################################
|
||||
sub setReadings {
|
||||
my $hash = shift;
|
||||
my $rref = shift;
|
||||
my $event = shift;
|
||||
|
||||
my $name = $hash->{NAME};
|
||||
|
||||
readingsBeginUpdate($hash);
|
||||
|
||||
for my $elem (@$rref) {
|
||||
my ($rn,$rval) = split ":", $elem, 2;
|
||||
readingsBulkUpdate($hash, $rn, $rval);
|
||||
}
|
||||
|
||||
readingsEndUpdate($hash, $event);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
################################################################
|
||||
# liefert String aller Streamingdevices außer MODEL = master
|
||||
# und füllt Hash %sdevs{Alias} = Devicename zu Auflösung
|
||||
|
Loading…
Reference in New Issue
Block a user