From 74a31cda23e44fe05773a107f2647a9a68b23d88 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sat, 26 Sep 2009 09:26:09 +0000 Subject: [PATCH] Set CUL state after reconnect git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@444 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/00_CUL.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/FHEM/00_CUL.pm b/FHEM/00_CUL.pm index bfbb7e0aa..af8d73409 100755 --- a/FHEM/00_CUL.pm +++ b/FHEM/00_CUL.pm @@ -72,7 +72,7 @@ CUL_Initialize($) $hash->{GetFn} = "CUL_Get"; $hash->{SetFn} = "CUL_Set"; $hash->{StateFn} = "CUL_SetState"; - $hash->{AttrList}= "do_not_notify:1,0 dummy:1,0 filtertimeout repeater:1,0 " . + $hash->{AttrList}= "do_not_notify:1,0 dummy:1,0 filtertimeout " . "showtime:1,0 model:CUL,CUR loglevel:0,1,2,3,4,5,6 " . "CUR_id_list"; $hash->{ShutdownFn} = "CUL_Shutdown"; @@ -95,10 +95,8 @@ CUL_Define($$) return "FHTID must be H1H2, with H1 and H2 hex and both smaller than 64" if(uc($a[3]) !~ m/^[0-6][0-9A-F][0-6][0-9A-F]$/); $hash->{FHTID} = uc($a[3]); - $hash->{STATE} = "defined"; $attr{$name}{savefirst} = 1; - $attr{$name}{repeater} = 1; if($dev eq "none") { Log 1, "CUL device is none, commands will be echoed only"; @@ -977,8 +975,10 @@ CUL_OpenDev($$) } else { Log 3, "CUL opened $dev for $name"; } - + + $hash->{STATE}=""; # Allow InitDev to set the state my $ret = CUL_DoInit($hash); + if($ret) { CUL_CloseDev($hash); Log 1, "Cannot init $dev, ignoring it";