10_pilight_ctrl: add log messages (list devicename)

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@8797 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
risiko79
2015-06-21 18:23:43 +00:00
parent 05f5b31644
commit 98fe4be7e5

View File

@@ -139,6 +139,8 @@ sub pilight_ctrl_CheckReadingState($)
my $state = ReadingsVal($me,"state",undef);
if (defined($state) && $state ne "opened" && $state ne "disconnected") {
Log3 $me, 3, "$me(CheckReadingState): Unknown error: unnormal value for reading state";
my $l = fhem("list $me",1);
Log3 $me, 5, "$me(CheckReadingState): Unknown error: $l";
setReadingsVal($hash, "state", undef, TimeNow());
$hash->{STATE} = $hash->{helper}{CON};
$hash->{STATE} = "opened" if ($hash->{helper}{CON} eq "connected");