mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-28 11:01:59 +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
|
# Übernahme Link-Parameter
|
||||||
my $link = "{$defs{$strmd}{LINKFN}('$defs{$strmd}{LINKPARENT}','$defs{$strmd}{LINKNAME}','$defs{$strmd}{LINKMODEL}')}";
|
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) {
|
if(@r) {
|
||||||
readingsBeginUpdate($hash);
|
setReadings($hash, \@r, 0);
|
||||||
|
|
||||||
for my $elem (@r) {
|
|
||||||
my ($rn,$rval) = split ":", $elem, 2;
|
|
||||||
readingsBulkUpdate($hash, $rn, $rval);
|
|
||||||
}
|
|
||||||
|
|
||||||
readingsEndUpdate($hash, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
webRefresh($hash);
|
webRefresh($hash);
|
||||||
@ -349,14 +343,7 @@ sub Set {
|
|||||||
push @r, "parentState:initialized";
|
push @r, "parentState:initialized";
|
||||||
push @r, "state:initialized";
|
push @r, "state:initialized";
|
||||||
|
|
||||||
readingsBeginUpdate($hash);
|
setReadings($hash, \@r, 0);
|
||||||
|
|
||||||
for my $elem (@r) {
|
|
||||||
my ($rn,$rval) = split ":", $elem, 2;
|
|
||||||
readingsBulkUpdate($hash, $rn, $rval);
|
|
||||||
}
|
|
||||||
|
|
||||||
readingsEndUpdate($hash, 0);
|
|
||||||
|
|
||||||
webRefresh($hash);
|
webRefresh($hash);
|
||||||
|
|
||||||
@ -651,6 +638,31 @@ sub delReadings {
|
|||||||
return;
|
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
|
# liefert String aller Streamingdevices außer MODEL = master
|
||||||
# und füllt Hash %sdevs{Alias} = Devicename zu Auflösung
|
# und füllt Hash %sdevs{Alias} = Devicename zu Auflösung
|
||||||
|
Loading…
x
Reference in New Issue
Block a user