mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
71_ZM_Monitor: improving statistics
git-svn-id: https://svn.fhem.de/fhem/trunk@20406 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6626b3e8be
commit
b580e5221f
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- change: 71_ZM_Monitor: now writing internal 'model'
|
||||||
- feature: 74_AMADDevice: add class support for openApp,
|
- feature: 74_AMADDevice: add class support for openApp,
|
||||||
fix bug then change attr remoteServer set Internal MODEL
|
fix bug then change attr remoteServer set Internal MODEL
|
||||||
- change: 76_SMAInverter: readings bat_loadtotal / bat_loadtoday included,
|
- change: 76_SMAInverter: readings bat_loadtotal / bat_loadtoday included,
|
||||||
|
@ -474,8 +474,9 @@ sub ZoneMinder_UpdateMonitorAttributes {
|
|||||||
my $function = ZoneMinder_GetConfigValueByKey($hash, $monitorData, 'Function');
|
my $function = ZoneMinder_GetConfigValueByKey($hash, $monitorData, 'Function');
|
||||||
my $enabled = ZoneMinder_GetConfigValueByKey($hash, $monitorData, 'Enabled');
|
my $enabled = ZoneMinder_GetConfigValueByKey($hash, $monitorData, 'Enabled');
|
||||||
my $streamReplayBuffer = ZoneMinder_GetConfigValueByKey($hash, $monitorData, 'StreamReplayBuffer');
|
my $streamReplayBuffer = ZoneMinder_GetConfigValueByKey($hash, $monitorData, 'StreamReplayBuffer');
|
||||||
|
my $monitorType = ZoneMinder_GetConfigValueByKey($hash, $monitorData, 'Type');
|
||||||
|
|
||||||
my $msg = "monitor:$monitorId|$function|$enabled|$streamReplayBuffer";
|
my $msg = "monitor:$monitorId|$function|$enabled|$streamReplayBuffer|$monitorType";
|
||||||
|
|
||||||
my $dispatchResult = Dispatch($hash, $msg, undef);
|
my $dispatchResult = Dispatch($hash, $msg, undef);
|
||||||
}
|
}
|
||||||
|
@ -392,11 +392,12 @@ sub ZM_Monitor_handleMonitorUpdate {
|
|||||||
my ( $io_hash, $message ) = @_;
|
my ( $io_hash, $message ) = @_;
|
||||||
|
|
||||||
my $ioName = $io_hash->{NAME};
|
my $ioName = $io_hash->{NAME};
|
||||||
my @msgTokens = split(/\|/, $message); #$message = "$monitorId|$function|$enabled|$streamReplayBuffer";
|
my @msgTokens = split(/\|/, $message); #$message = "$monitorId|$function|$enabled|$streamReplayBuffer|$monitorType";
|
||||||
my $zmMonitorId = $msgTokens[0];
|
my $zmMonitorId = $msgTokens[0];
|
||||||
my $function = $msgTokens[1];
|
my $function = $msgTokens[1];
|
||||||
my $enabled = $msgTokens[2];
|
my $enabled = $msgTokens[2];
|
||||||
my $streamReplayBuffer = $msgTokens[3];
|
my $streamReplayBuffer = $msgTokens[3];
|
||||||
|
my $monitorType = $msgTokens[4];
|
||||||
my $logDevAddress = $ioName.'_'.$zmMonitorId;
|
my $logDevAddress = $ioName.'_'.$zmMonitorId;
|
||||||
|
|
||||||
if ( my $hash = $modules{ZM_Monitor}{defptr}{$logDevAddress} ) {
|
if ( my $hash = $modules{ZM_Monitor}{defptr}{$logDevAddress} ) {
|
||||||
@ -406,6 +407,8 @@ sub ZM_Monitor_handleMonitorUpdate {
|
|||||||
my $bufferChanged = readingsBulkUpdateIfChanged($hash, 'streamReplayBuffer', $streamReplayBuffer);
|
my $bufferChanged = readingsBulkUpdateIfChanged($hash, 'streamReplayBuffer', $streamReplayBuffer);
|
||||||
readingsEndUpdate($hash, 1);
|
readingsEndUpdate($hash, 1);
|
||||||
|
|
||||||
|
$hash->{model} = $monitorType;
|
||||||
|
|
||||||
ZM_Monitor_UpdateStreamUrls($hash);
|
ZM_Monitor_UpdateStreamUrls($hash);
|
||||||
|
|
||||||
return $hash->{NAME};
|
return $hash->{NAME};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user