mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 17:36:39 +00:00
33_readingsGroup.pm: added timestamp update for FW_addToWritebuffer
fixed updates for format suffixes git-svn-id: https://svn.fhem.de/fhem/trunk@20686 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
df9e8689cf
commit
7cd54f2dc8
@ -1109,6 +1109,7 @@ readingsGroup_2html($;$)
|
||||
($informid,$v,$devStateIcon) = readingsGroup_value2html($hash,$calc,$name,$name2,$n,$v,$cell_row,$cell_column,$type);
|
||||
next if( !defined($informid) );
|
||||
#$informid = "informId=\"$d-item:$cell_row:$item\"" if( $format );
|
||||
$informid =~ s/"$/:$format"/ if( $format );
|
||||
|
||||
my $cell_style0 = lookup2($hash->{helper}{cellStyle},$name,$n,$v,$cell_row,0);
|
||||
my $cell_style = lookup2($hash->{helper}{cellStyle},$name,$n,$v,$cell_row,$cell_column);
|
||||
@ -1218,8 +1219,6 @@ readingsGroup_Update($$$)
|
||||
my ($hash, $item, $value) = @_;
|
||||
my $name = $hash->{NAME};
|
||||
|
||||
#Log 1, "$name, $item, $value";
|
||||
|
||||
$hash->{changed} = 1;
|
||||
|
||||
if( $hash->{alwaysTrigger} ) {
|
||||
@ -1234,7 +1233,13 @@ readingsGroup_Update($$$)
|
||||
$ntfy->{inform}{type} ne "status");
|
||||
next if( !$ntfy->{inform}{devices}{$name} );
|
||||
if(!FW_addToWritebuffer($ntfy,
|
||||
FW_longpollInfo($ntfy->{inform}{fmt}, "$name-$item", "", $value )."\n" )) {
|
||||
FW_longpollInfo($ntfy->{inform}{fmt}, "$name-$item", "", $value ) ."\n" )) {
|
||||
my $name = $ntfy->{NAME};
|
||||
Log3 $name, 4, "Closing connection $name due to full buffer in FW_Notify";
|
||||
TcpServer_Close($ntfy, 1);
|
||||
}
|
||||
if(!FW_addToWritebuffer($ntfy,
|
||||
FW_longpollInfo($ntfy->{inform}{fmt}, "$name-$item-ts", "", TimeNow() ) ."\n" )) {
|
||||
my $name = $ntfy->{NAME};
|
||||
Log3 $name, 4, "Closing connection $name due to full buffer in FW_Notify";
|
||||
TcpServer_Close($ntfy, 1);
|
||||
@ -1298,8 +1303,10 @@ readingsGroup_Notify($$)
|
||||
$hash->{DEF} =~ s/ $//;
|
||||
}
|
||||
readingsGroup_updateDevices($hash);
|
||||
|
||||
} elsif( $dev->{NAME} eq "global" && $s =~ m/^DEFINED ([^ ]*)$/) {
|
||||
readingsGroup_updateDevices($hash);
|
||||
|
||||
} else {
|
||||
next if(AttrVal($name,"disable", undef));
|
||||
|
||||
@ -1511,7 +1518,11 @@ readingsGroup_Notify($$)
|
||||
$value = "<div $value_style>$value</div>" if( $value_style );
|
||||
|
||||
#FIXME: create {'$n.$reading'} = $value hash to avaid multiple events and calculations if same reading is included multiple times
|
||||
if( $format ) {
|
||||
$triggers{"$n.$reading:$format"} = $value;
|
||||
} else {
|
||||
$triggers{"$n.$reading"} = $value;
|
||||
}
|
||||
|
||||
if( my $cells = $hash->{helper}{positions}{"$n.$reading"} ) {
|
||||
foreach my $cell ( split( ',', $cells ) ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user