2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 01:14:19 +00:00

HMlan: change state display

git-svn-id: https://svn.fhem.de/fhem/trunk@7331 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2014-12-27 09:38:13 +00:00
parent 30c8184306
commit e51f6febcc

View File

@ -129,7 +129,7 @@ sub HMLAN_Define($$) {#########################################################
$hash->{helper}{assIdRep} = 0;
$hash->{helper}{assIdCnt} = 0;
HMLAN_condUpdate($hash,253);#set disconnected
$hash->{STATE} = "disconnected";
readingsSingleUpdate($hash,"state","disconnected",1);
$hash->{owner} = "";
my $ret = DevIo_OpenDev($hash, 0, "HMLAN_DoInit");
@ -842,7 +842,7 @@ sub HMLAN_DoInit($) {##########################################################
my $name = $hash->{NAME};
my $id = AttrVal($name, "hmId", "999999");
delete $hash->{READINGS}{state};
# readingsSingleUpdate($hash,"state","init",1);
HMLAN_SimpleWrite($hash, "A$id") if($id ne "999999");
HMLAN_assignIDs($hash);
@ -995,10 +995,10 @@ sub HMLAN_condUpdate($$) {#####################################################
!$hash->{helper}{cnd}{$HMcnd});
$hash->{helper}{cnd}{$HMcnd}++;
if ($HMcnd == 4){#HMLAN needs a rest. Supress all sends exept keep alive
$hash->{STATE} = "overload";
readingsSingleUpdate($hash,"state","overload",1);
}
else{
$hash->{STATE} = "opened"
readingsSingleUpdate($hash,"state","opened",1)
if (InternalVal($name,"STATE","") eq "overload");
}