From 7368a1410d2e85c3b61c9df3360722fc905dbde4 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Fri, 27 Feb 2015 18:08:24 +0000 Subject: [PATCH] fhem.pl: add status parameter to inform git-svn-id: https://svn.fhem.de/fhem/trunk@8105 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index eb60144a2..822b3486f 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -282,7 +282,7 @@ $readingFnAttributes = "event-on-change-reading event-on-update-reading ". Hlp=>",read the commands from " }, "inform" => { Fn=>"CommandInform", ClientFilter => "telnet", - Hlp=>"{on|timer|raw|off},echo all events to this client" }, + Hlp=>"{on|off|raw|timer|status},echo all events to this client" }, "iowrite" => { Fn=>"CommandIOWrite", Hlp=>" ,write raw data with iodev" }, "list" => { Fn=>"CommandList", @@ -2438,7 +2438,12 @@ CommandInform($$) my $name = $cl->{NAME}; return "Usage: inform {on|timer|raw|off} [regexp]" - if($param !~ m/^(on|off|raw|timer)/); + if($param !~ m/^(on|off|raw|timer|status)/); + + if($param eq "status") { + my $i = $inform{$name}; + return $i ? ($i->{type} . ($i->{regexp} ? " ".$i->{regexp} : "")) : "off"; + } delete($inform{$name}); if($param !~ m/^off/) {