diff --git a/contrib/HMRPC/00_HMRPC.pm b/contrib/HMRPC/00_HMRPC.pm index d10eda36d..1574c6476 100755 --- a/contrib/HMRPC/00_HMRPC.pm +++ b/contrib/HMRPC/00_HMRPC.pm @@ -3,7 +3,7 @@ # HomeMatic XMLRPC API Device Provider # Written by Oliver Wagner # -# V0.4 +# V0.5 # ########################################################### # diff --git a/contrib/HMRPC/01_HMDEV.pm b/contrib/HMRPC/01_HMDEV.pm index cfc33d4dd..47c3b5ee6 100644 --- a/contrib/HMRPC/01_HMDEV.pm +++ b/contrib/HMRPC/01_HMDEV.pm @@ -2,7 +2,7 @@ # HMRPC Device Handler # Written by Oliver Wagner # -# V0.4 +# V0.5 # ################################################ # @@ -84,6 +84,13 @@ HMDEV_Parse($$) return "UNDEFINED HMDEV_$addr HMDEV $addr"; } + # Let's see whether we can update our devinfo now + if(!defined $hash->{devinfo}) + { + $hash->{hmdevinfo}=$hash->{IODev}{devicespecs}{$addr}; + $hash->{hmdevtype}=$hash->{devinfo}{TYPE}; + } + # # Ok update the relevant reading # @@ -92,13 +99,25 @@ HMDEV_Parse($$) $hash->{READINGS}{$attrid}{TIME}=TimeNow(); # Note that we always trigger a change on PRESS_LONG/PRESS_SHORT events # (they are sent whenever a button is pressed, and there is no change back) + # We also never trigger a change on the RSSI readings, for efficiency purposes if(!defined $currentval || ($currentval ne $mp[3]) || ($attrid =~ /^PRESS_/)) { - if(!($currentval =~ m/^RSSI_/)) + if(defined $currentval && !($currentval =~ m/^RSSI_/)) { push @changed, "$attrid: $mp[3]"; } $hash->{READINGS}{$attrid}{VAL}=$mp[3]; + # Also update the STATE + my $state=""; + foreach my $key (sort(keys(%{$hash->{READINGS}}))) + { + if(length($state)) + { + $state.=" "; + } + $state.=$key.": ".$hash->{READINGS}{$key}{VAL}; + } + $hash->{STATE}=$state; } $hash->{CHANGED}=\@changed; diff --git a/contrib/HMRPC/HMRPC.txt b/contrib/HMRPC/HMRPC.txt index e5ad75b37..1a72e023c 100644 --- a/contrib/HMRPC/HMRPC.txt +++ b/contrib/HMRPC/HMRPC.txt @@ -2,7 +2,7 @@ HMRPC - xmlrpc-basierte Homematic-Integration fuer fhem ======================================================= Von Oliver Wagner -V0.4 +V0.5 Uebersicht ---------- @@ -132,6 +132,13 @@ V0.4 - HMRPC: Fehlermeldung statt Abbruch, wenn eine Testverbindung zum HMRPC: PRESS_ loest nun wirklich jedesmal ein changed aus. import_webui: Pattern korrigiert, so dass nun auch die virtuellen Taster erkannt werden + +V0.5 - HMDEV: Es wird nun STATE sinnvoll gesetzt, als Zusammenfasung aller + READINGS + HMRPC: Der newDevices-Aufruf wird nun ausgewertet und die uebermittelten + Device/Channel-Informationen werden an die HMDEV-Objekte gehanden, als + "hmdevinfo"; gleichzeitig wird "hmdevtype" auf den HM-Devicetyp + Anhang ------