From 8500cc9c1135e0698e56c6ad3895f7b55401abba Mon Sep 17 00:00:00 2001 From: herrmannj <> Date: Sun, 17 Jan 2016 18:35:36 +0000 Subject: [PATCH] 32_TechemHKV.pm: add some older hkv version git-svn-id: https://svn.fhem.de/fhem/trunk@10561 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/32_TechemHKV.pm | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/fhem/FHEM/32_TechemHKV.pm b/fhem/FHEM/32_TechemHKV.pm index 55c3a4373..7bdce97a1 100644 --- a/fhem/FHEM/32_TechemHKV.pm +++ b/fhem/FHEM/32_TechemHKV.pm @@ -26,7 +26,8 @@ TechemHKV_Initialize(@) { # require "Broker.pm"; # TECHEM HKV - $hash->{Match} = "^b..446850[\\d]{8}6980....A0.*"; + # 61, 64 without T1 and T2 + $hash->{Match} = "^b..446850[\\d]{8}(61|64|69)80....A0.*"; $hash->{DefFn} = "TechemHKV_Define"; $hash->{UndefFn} = "TechemHKV_Undef"; @@ -99,8 +100,8 @@ TechemHKV_Notify (@) { if (($e[0] eq 'ATTR') && ($e[2] eq 'rfmode') && ($e[3] ne 'WMBus_T')) { readingsBeginUpdate($hash); readingsBulkUpdate($hash, "state", "standby (IO missing)", 1); - readingsBulkUpdate($hash, "temp1", "--.--"); - readingsBulkUpdate($hash, "temp2", "--.--"); + readingsBulkUpdate($hash, "temp1", "--.--") if exists($hash->{READINGS}->{'temp1'}); # exlude versions without t1,t2 + readingsBulkUpdate($hash, "temp2", "--.--") if exists($hash->{READINGS}->{'temp2'}); readingsEndUpdate($hash, 1); } } @@ -121,10 +122,12 @@ TechemHKV_Receive(@) { $hash->{METER} = $typeText{$msg->{type}}; delete $hash->{CHANGETIME}; # clean up, workaround for fhem prior http://forum.fhem.de/index.php/topic,47474.msg391964.html#msg391964 - readingsBeginUpdate($hash); - readingsBulkUpdate($hash, "temp1", $msg->{temp1}); - readingsBulkUpdate($hash, "temp2", $msg->{temp2}); - readingsEndUpdate($hash, 1); + if (($msg->{version} || '') eq '69') { + readingsBeginUpdate($hash); + readingsBulkUpdate($hash, "temp1", $msg->{temp1}); + readingsBulkUpdate($hash, "temp2", $msg->{temp2}); + readingsEndUpdate($hash, 1); + } # day period changed $ats = ReadingsTimestamp($hash->{NAME},"current_period", "0"); @@ -401,7 +404,7 @@ TechemHKV_crc16_13757(@) {