mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-02 19:15:31 +00:00
msg: logging
git-svn-id: https://svn.fhem.de/fhem/trunk@9538 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a4ec4807b6
commit
4b2df64792
@ -69,11 +69,12 @@ sub CommandMsg($$;$$) {
|
|||||||
} else {
|
} else {
|
||||||
fhem "define msgConfig msgConfig";
|
fhem "define msgConfig msgConfig";
|
||||||
$globalDevName = "msgConfig";
|
$globalDevName = "msgConfig";
|
||||||
$return .= "Global configuration device msgConfig was created.";
|
$return .= "Global configuration device msgConfig was created.\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $msg eq "" || $msg =~ /^\?[\s\t]*$/ || $msg eq "help" ) {
|
if ( $msg eq "" || $msg =~ /^\?[\s\t]*$/ || $msg eq "help" ) {
|
||||||
return
|
return
|
||||||
|
$return .
|
||||||
"Usage: msg [<type>] [<\@device>|<e-mail address>] [<priority>] [|<title>|] <message>";
|
"Usage: msg [<type>] [<\@device>|<e-mail address>] [<priority>] [|<title>|] <message>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1826,10 +1827,16 @@ s/^[\s\t]*\|([\w\süöäß^°!"§$%&\/\\()<>=?´`"+\[\]#*@€]+)\|[\s\t]+//
|
|||||||
|
|
||||||
Log3 $logDevice, 3,
|
Log3 $logDevice, 3,
|
||||||
"msg $device: ID=$messageID.$sentCounter TYPE=$type[$i] ROUTE=$gatewayDev RECIPIENT=$subRecipient STATUS=$routeStatus PRIORITY=$loopPriority($priorityCat) TITLE='$loopTitle' MSG='$msg'"
|
"msg $device: ID=$messageID.$sentCounter TYPE=$type[$i] ROUTE=$gatewayDev RECIPIENT=$subRecipient STATUS=$routeStatus PRIORITY=$loopPriority($priorityCat) TITLE='$loopTitle' MSG='$msg'"
|
||||||
if ( $priorityCat ne "" );
|
if ( $priorityCat ne "" && $subRecipient ne "");
|
||||||
Log3 $logDevice, 3,
|
Log3 $logDevice, 3,
|
||||||
"msg $device: ID=$messageID.$sentCounter TYPE=$type[$i] ROUTE=$gatewayDev RECIPIENT=$subRecipient STATUS=$routeStatus PRIORITY=$loopPriority TITLE='$loopTitle' MSG='$msg'"
|
"msg $device: ID=$messageID.$sentCounter TYPE=$type[$i] ROUTE=$gatewayDev RECIPIENT=$subRecipient STATUS=$routeStatus PRIORITY=$loopPriority TITLE='$loopTitle' MSG='$msg'"
|
||||||
if ( $priorityCat eq "" );
|
if ( $priorityCat eq "" && $subRecipient ne "");
|
||||||
|
Log3 $logDevice, 3,
|
||||||
|
"msg $device: ID=$messageID.$sentCounter TYPE=$type[$i] ROUTE=$gatewayDev STATUS=$routeStatus PRIORITY=$loopPriority($priorityCat) TITLE='$loopTitle' MSG='$msg'"
|
||||||
|
if ( $priorityCat ne "" && $subRecipient eq "");
|
||||||
|
Log3 $logDevice, 3,
|
||||||
|
"msg $device: ID=$messageID.$sentCounter TYPE=$type[$i] ROUTE=$gatewayDev STATUS=$routeStatus PRIORITY=$loopPriority TITLE='$loopTitle' MSG='$msg'"
|
||||||
|
if ( $priorityCat eq "" && $subRecipient eq "");
|
||||||
|
|
||||||
$messageSent = 1 if ($error == 0);
|
$messageSent = 1 if ($error == 0);
|
||||||
$messageSentDev = 1 if ($error == 0);
|
$messageSentDev = 1 if ($error == 0);
|
||||||
@ -1839,12 +1846,16 @@ s/^[\s\t]*\|([\w\süöäß^°!"§$%&\/\\()<>=?´`"+\[\]#*@€]+)\|[\s\t]+//
|
|||||||
|| $routeStatus eq "UNDEFINED" )
|
|| $routeStatus eq "UNDEFINED" )
|
||||||
{
|
{
|
||||||
Log3 $logDevice, 3,
|
Log3 $logDevice, 3,
|
||||||
"msg $device: ID=$messageID.$sentCounter TYPE=$type[$i] ROUTE=$gatewayDev RECIPIENT=$subRecipient STATUS=$routeStatus PRIORITY=$loopPriority TITLE='$loopTitle' '$msg'";
|
"msg $device: ID=$messageID.$sentCounter TYPE=$type[$i] ROUTE=$gatewayDev RECIPIENT=$subRecipient STATUS=$routeStatus PRIORITY=$loopPriority TITLE='$loopTitle' '$msg'" if ($subRecipient ne "");
|
||||||
|
Log3 $logDevice, 3,
|
||||||
|
"msg $device: ID=$messageID.$sentCounter TYPE=$type[$i] ROUTE=$gatewayDev STATUS=$routeStatus PRIORITY=$loopPriority TITLE='$loopTitle' '$msg'" if ($subRecipient eq "");
|
||||||
$gatewaysStatus{$gatewayDev} = $routeStatus;
|
$gatewaysStatus{$gatewayDev} = $routeStatus;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Log3 $logDevice, 3,
|
Log3 $logDevice, 3,
|
||||||
"msg $device: ID=$messageID.$sentCounter TYPE=$type[$i] ROUTE=$gatewayDev RECIPIENT=$subRecipient STATUS=$routeStatus PRIORITY=$loopPriority TITLE='$loopTitle' '$msg'";
|
"msg $device: ID=$messageID.$sentCounter TYPE=$type[$i] ROUTE=$gatewayDev RECIPIENT=$subRecipient STATUS=$routeStatus PRIORITY=$loopPriority TITLE='$loopTitle' '$msg'" if ($subRecipient ne "");
|
||||||
|
Log3 $logDevice, 3,
|
||||||
|
"msg $device: ID=$messageID.$sentCounter TYPE=$type[$i] ROUTE=$gatewayDev STATUS=$routeStatus PRIORITY=$loopPriority TITLE='$loopTitle' '$msg'" if ($subRecipient eq "");
|
||||||
$messageSent = 2 if ( $messageSent != 1 );
|
$messageSent = 2 if ( $messageSent != 1 );
|
||||||
$messageSentDev = 2 if ( $messageSentDev != 1 );
|
$messageSentDev = 2 if ( $messageSentDev != 1 );
|
||||||
$gatewaysStatus{$gatewayDev} = $routeStatus;
|
$gatewaysStatus{$gatewayDev} = $routeStatus;
|
||||||
|
@ -75,8 +75,8 @@ my $db = {
|
|||||||
'light' => {
|
'light' => {
|
||||||
|
|
||||||
'HUEDevice' => {
|
'HUEDevice' => {
|
||||||
'Normal' => '{my $state=ReadingsVal("%DEVICE%","state","off"); fhem "set %DEVICE% blink 2 1"; fhem "sleep 4;set %DEVICE%:FILTER=state!=$state $state"}',
|
'Normal' => '{my $state=ReadingsVal("%DEVICE%","state","off"); fhem "set %DEVICE% blink 2 1"; fhem "sleep 4.25;set %DEVICE%:FILTER=state!=$state $state"}',
|
||||||
'High' => '{my $state=ReadingsVal("%DEVICE%","state","off"); fhem "set %DEVICE% blink 10 1"; fhem "sleep 20;set %DEVICE%:FILTER=state!=$state $state"}',
|
'High' => '{my $state=ReadingsVal("%DEVICE%","state","off"); fhem "set %DEVICE% blink 10 1"; fhem "sleep 20.25;set %DEVICE%:FILTER=state!=$state $state"}',
|
||||||
'Low' => 'set %DEVICE% alert select',
|
'Low' => 'set %DEVICE% alert select',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user