2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

01_FHEMWEB.pm: optional global in logpoll (Forum #47634)

git-svn-id: https://svn.fhem.de/fhem/trunk@10571 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2016-01-19 06:54:56 +00:00
parent 682411162f
commit 274645dc9c

View File

@ -667,6 +667,7 @@ FW_answerCall($)
$filter = "room!=.+" if($filter eq "room=Unsorted"); $filter = "room!=.+" if($filter eq "room=Unsorted");
my %h = map { $_ => 1 } devspec2array($filter); my %h = map { $_ => 1 } devspec2array($filter);
$h{global} = 1 if( $me->{inform}{addglobal} );
$h{"#FHEMWEB:$FW_wname"} = 1; $h{"#FHEMWEB:$FW_wname"} = 1;
$me->{inform}{devices} = \%h; $me->{inform}{devices} = \%h;
%FW_visibleDeviceHash = FW_visibleDevices(); %FW_visibleDeviceHash = FW_visibleDevices();
@ -2554,7 +2555,12 @@ FW_Notify($$)
my $tn = TimeNow(); my $tn = TimeNow();
my $max = int(@{$events}); my $max = int(@{$events});
for(my $i = 0; $i < $max; $i++) { for(my $i = 0; $i < $max; $i++) {
if( $events->[$i] !~ /: /) { if($events->[$i] !~ /: /) {
if($dev->{NAME} eq 'global') { # Forum #47634
my($type,$args) = split(' ', $events->[$i], 2);
push @data, FW_longpollInfo($h->{fmt}, "$dn-$type", $args, $args);
}
next; #ignore 'set' commands next; #ignore 'set' commands
} }
my ($readingName,$readingVal) = split(": ",$events->[$i],2); my ($readingName,$readingVal) = split(": ",$events->[$i],2);