diff --git a/CHANGED b/CHANGED index 0c55510ff..f21a676b5 100644 --- a/CHANGED +++ b/CHANGED @@ -1,5 +1,7 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - feature: 72_FB_CALLLIST: new readings/events "count-..." implemented to + count different call types - change: 72_FB_CALLMONITOR: removed klicktel.de for reverse search, as the service is not available anymore - bugfix: 49_SSCam: fix in autocreateCams and take snapshot diff --git a/FHEM/72_FB_CALLLIST.pm b/FHEM/72_FB_CALLLIST.pm index 03a27d91d..8f6599404 100755 --- a/FHEM/72_FB_CALLLIST.pm +++ b/FHEM/72_FB_CALLLIST.pm @@ -231,21 +231,9 @@ sub FB_CALLLIST_Set($@) { delete($hash->{helper}{DATA}); - if(AttrVal($name, "create-readings", "0") eq "1") - { - readingsBeginUpdate($hash); - - readingsBulkUpdate($hash, "numberOfCalls", 0, 1); - - for my $reading (grep { /^\d+-/ } keys %{$hash->{READINGS}}) - { - readingsBulkUpdate($hash, $reading, ""); - readingsDelete($hash, $reading); - } - - readingsEndUpdate($hash, 1); - } - + # update readings if neccessary + FB_CALLLIST_createReadings($hash); + # Inform all FHEMWEB clients FB_CALLLIST_updateFhemWebClients($hash); @@ -480,14 +468,14 @@ sub FB_CALLLIST_Notify($$) Log3 $name, 5, "FB_CALLLIST ($name) - processed connect event for call id $call_id"; } - if($event eq "disconnect" ) + if($event eq "disconnect") { $data->{call_duration} = ReadingsVal($fb, "call_duration", undef); $data->{finished} = gettimeofday(); if($data->{last_event} =~ /^call|ring$/) { - $data->{missed_call} = 1; + $data->{missed_call} = 1; } delete($data->{running_call}); @@ -510,8 +498,6 @@ sub FB_CALLLIST_Notify($$) # Update readings FB_CALLLIST_createReadings($hash); - - } ############################################################################################################ @@ -919,7 +905,6 @@ sub FB_CALLLIST_list2html($) $ret .= ""; } - $ret .= "