THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.

Begonnen von immi, 02 Februar 2015, 11:42:16

Vorheriges Thema - Nächstes Thema

immi

Zitat von: andre.k am 13 September 2017, 17:19:36
For me runs currently 1) with known drawbacks and 3) without any problems.
Hi Andre
Have you already implemented and tested 3) ?
If not we can try, but I do not know when I will find time with a clear mind.
immi

immi

Hi Andre
I uploaded v0.170
I started implementing a rudimental version of the loop approach.
Let us see if it is better then nonblocking
if you want to test, uncomment THZ_Testloopapproach in line724

For the user not interested in programming: you will not see any change.
immi

andre.k

#632
Zitat von: immi am 15 September 2017, 12:43:47
Have you already implemented and tested 3) ?
Hi immi,

sorry for my late answer. Yes I can provide you my code for option 3)
At the moment I use this only for background updates THZ_GetRefresh. For testing only change this line.
      #THZ_Get($hash, $hash->{NAME}, $command) if ($hash->{STATE} ne "disconnected");
      THZ_AddWriteQueue($hash, $command) if ($hash->{STATE} ne "disconnected");

short explanation:
I did not touch the get/set funtionality for sychronous communication.
I only changed one function (THZ_Read).
All other funtions are additionaly.
Basicly I impelmented a state machine to handle different communication steps in $hash->{helper}{COMSTAT}
(start/command/confirm/response).
and a write queue $hash->{helper}{QUEUE} for THZ commands (currently only get commands)

ToDos:

  • Get commands with cmd3 are not yet implemented
  • THZ_AvoidCollisions needs to be changed
Here is the complete code:
########################################################################################
# sub THZ_Read($)
# called from the global loop, when the select for hash reports data
########################################################################################
sub THZ_Read($) {
  my ($hash) = @_;

  my $buf = DevIo_SimpleRead($hash);
  return "" if(!defined($buf));

  my $name = $hash->{NAME};
  my $state = $hash->{helper}{COMSTAT};
  my $data = $hash->{PARTIAL} . uc(unpack('H*', $buf));
  Log3 $name, 5, "[$name] read ($state): $data";
 
  if ($state eq "start") {
    # start of communication "02" sent; wait for acknowledge "10"
    if ($data eq "10") {
      $hash->{helper}{COMSTAT} = "command";
      THZ_HandleWriteQueue($hash);
    }
    elsif ($data eq "15") {
      # THZ is busy
      Log3 $hash, 3, "[$name] NAK received at state: $state";
      # wait still for "02"
      $hash->{helper}{COMSTAT} = "confirm";
    }
  }
  elsif ($state eq "command") {
    # THZ_command sent; wait for ACK
    if ($data eq "10") {
      $hash->{helper}{COMSTAT} = "confirm";
    }
    elsif ($data eq "1002") {
      $hash->{helper}{COMSTAT} = "confirm";
      THZ_HandleWriteQueue($hash);
    }
    elsif ($data eq "15") {
      # THZ is busy; never seen at this state
      Log3 $hash, 3, "[$name] NAK received at state: $state";
    }
  }
  elsif ($state eq "confirm") {
    # wait for STX
    if ($data eq "02") {
      THZ_HandleWriteQueue($hash);
    }
  }
  elsif ($state eq "response") {
    # wait for response
    if ($data =~ m/1003$/) {
      # valid response packet received, write acknowledge
      THZ_HandleWriteQueue($hash);
      RemoveInternalTimer($hash, "THZ_TimeoutCommunication");
      # parse response, update readings, shift queue and start next command
      THZ_HandleResponse($hash, $data);
    }
    else {
      # save the partial data
      $hash->{PARTIAL} = $data;
    }
  }
}


########################################################################################
# sub THZ_HandleResponse($$)
# decode and parse response message and update reading
# error handling
########################################################################################
sub  THZ_HandleResponse($$) {
  my ($hash, $msg) = @_;
  my $name = $hash->{NAME};
  my ($err, $dmsg) = THZ_decode($msg);
  if (defined($err)) {
    Log3 $hash, 3, "[$name] THZ_HandleResponse: $err";
    THZ_RetryCommunication($hash);
  }
  else{
    my $rval = THZ_Parse1($hash, $dmsg);
    my $rname = $hash->{helper}{QUEUE}[0];
    Log3 $hash, 5, "[$name] THZ_HandleResponse: $rname - $rval";
    readingsSingleUpdate($hash, $rname, $rval, 1);
    THZ_ResetCommunication($hash);
  }
}


########################################################################################
# sub THZ_HandleWriteQueue($)
# handle the write queue depending from communication status
# the queue is an array of THZ commands (get or set)
########################################################################################
sub THZ_HandleWriteQueue($) {
  my ($hash) = @_;
  my $arr = $hash->{helper}{QUEUE};
  my $name = $hash->{NAME};
  my $state = $hash->{helper}{COMSTAT};
 
  return if ($hash->{STATE} ne "opened");

  if(defined($arr) && @{$arr} > 0) {
    my $cmd = $arr->[0];
    my $cmdhash = $gets{$cmd};
    # TODO: handling of double commands cmd2/cmd3
    while  (!defined ($cmdhash->{cmd2}) or defined ($cmdhash->{cmd3})) {
      # skip commands with parent but without cmd2
      if (THZ_ShiftWriteQueue($hash) == 0) {
        delete($hash->{helper}{COMSTAT});
        return;
      }
      $cmd = $arr->[0];
      $cmdhash = $gets{$cmd};
    }
    Log3 $hash, 5, "[$name] write queue ($state) for command: $cmd";
    if ($state eq "start") {
      # start communication
      DevIo_SimpleWrite($hash, "02", 1);
      # start timer
      my $to = (AttrVal($name, "simpleReadTimeout", "10"));
      InternalTimer(gettimeofday() + $to, "THZ_TimeoutCommunication", $hash);
    }
    elsif ($state eq "command") {
      # write command
      # TODO: set commands
      DevIo_SimpleWrite($hash, THZ_encodecommand($cmdhash->{cmd2},"get"), 1);
    }
    elsif ($state eq "confirm") {
      DevIo_SimpleWrite($hash, "10", 1);
      $hash->{helper}{COMSTAT} = "response";
    }
    elsif ($state eq "response") {
      DevIo_SimpleWrite($hash, "10", 1);
      $hash->{helper}{COMSTAT} = "start";
    }
  }
}


########################################################################################
# sub THZ_AddWriteQueue($$)
# add a THZ command to the queue
########################################################################################
sub THZ_AddWriteQueue($$) {
  my ($hash, $cmd) = @_;
  my $name = $hash->{NAME};
  my $arr = $hash->{helper}{QUEUE};

  Log3 $hash, 5, "[$name] add command to write queue: $cmd";
  if(!$arr || 0 == scalar(@{$arr})) {
    # create queue
    $hash->{helper}{QUEUE} = [ $cmd ];
  }
  else {
    # append command to queue
    push(@{$arr}, $cmd);
  }
  if (!defined($hash->{helper}{COMSTAT})) {
    #start communication
    $hash->{helper}{COMSTAT} = "start";
    $hash->{helper}{RETRY} = 1;
    THZ_HandleWriteQueue($hash);
  }
}


########################################################################################
# sub THZ_ShiftWriteQueue($)
# shift write queue
# returns the queue length
########################################################################################
sub THZ_ShiftWriteQueue($) {
  my ($hash) = @_;
  my $name = $hash->{NAME};
  my $arr = $hash->{helper}{QUEUE};

  if(defined($arr) && @{$arr} > 0) {
    # shift queue
    shift(@{$arr});
    my $cmd = defined($arr->[0]) ? $arr->[0] : "(empty)";
    Log3 $hash, 5, "[$name] shift write queue next command: $cmd";
    # delete empty queue
    delete($hash->{helper}{QUEUE}) if(@{$arr} == 0);
    return @{$arr};
  }
  return 0;
}


########################################################################################
# sub THZ_TimeoutCommunication($)
# handle communication timeout
########################################################################################
sub THZ_TimeoutCommunication($) {
  my ($hash) = @_;
  my $name = $hash->{NAME};

  Log3 $hash, 4, "[$name] communication timeout ($hash->{helper}{COMSTAT})";
  THZ_RetryCommunication($hash);
}


########################################################################################
# sub THZ_RetryCommunication($)
# error handling and retry THZ communication
########################################################################################
sub THZ_RetryCommunication($) {
  my ($hash) = @_;
  my $name = $hash->{NAME};
  my $arr = $hash->{helper}{QUEUE};
  my $retry = $hash->{helper}{RETRY};

  if ($retry < 5) {
    Log3 $hash, 4, "[$name] communication retry $retry command: $arr->[0] ($hash->{helper}{COMSTAT})";
    $hash->{helper}{COMSTAT} = "start";
    $hash->{PARTIAL} = "";
    $hash->{helper}{RETRY} += 1;
    THZ_HandleWriteQueue($hash);
  }
  else {
    Log3 $hash, 3, "[$name] communication retry exceeded command: $arr->[0] ($hash->{helper}{COMSTAT})";
    THZ_ResetCommunication($hash);
  }
}


########################################################################################
# sub THZ_ResetCommunication($)
# start next THZ command
########################################################################################
sub THZ_ResetCommunication($) {
  my ($hash) = @_;
  my $name = $hash->{NAME};

  Log3 $hash, 5, "[$name] restart communication";
  # reset communication state
  $hash->{PARTIAL} = "";
  $hash->{helper}{RETRY} = 1;
  delete($hash->{helper}{COMSTAT});
  # shift write queue
  if (THZ_ShiftWriteQueue($hash) > 0) {
    # start next command
    $hash->{helper}{COMSTAT} = "start";
    THZ_HandleWriteQueue($hash) ;
  }
}


Andre

immi

Hi Andre
thanks for sharing
I will have a look untill the weeek-end
immmi

andre.k

Hi immi,

could you have a look at the following patch. I' like to add some changes for 2.14 (I'm not sure for 2.xx) firmware:
- parse error messages
- set command to reset errors (this is a setonly register (not readable) , so that some changes in THZ_Set needs to be done (could be useful for all firmaware versions too)
- THZ_Attr needs to be changed to fill the %gets and %sets slightly different

And I would suggest to remove all nonblocking code. It was an nice try, but I think the better way is the loop approach or subprocess.pm. If you want, I can send you a patch for removing the nonblocking code.

Andre

--- 00_THZ.pm 2017-10-05 13:09:56.282148137 +0200
+++ 00_THZ.170.pm 2017-10-06 10:13:55.942628726 +0200
@@ -137,7 +137,7 @@
      [" p03RoomTempStandby: ", 12, 4,  "hex", 10], [" p04DHWsetTempDay: ", 16, 4,  "hex", 10],
      [" p05DHWsetTempNight: ", 20, 4,  "hex", 10], [" p06DHWsetTempStandby: ", 24, 4,  "hex", 10],
      [" p07FanStageDay: ", 28, 2,  "hex", 1], [" p08FanStageNight: ", 30, 2,  "hex", 1],
-       [" p09FanStageStandby: ", 32, 2,  "hex", 1], [" p10RoomTempManual: ", 34, 4,  "hex", 10],
+       [" p09FanStageStandby: ", 32, 2,  "hex", 1], [" p10HCTempManual: ", 34, 4,  "hex", 10],
      [" p11DHWsetTempManual: ", 38, 4,  "hex", 10],  [" p12FanStageManual: ", 42, 2,  "hex", 1],
      ],
   "D1last" => [["number_of_faults: ", 4, 2, "hex", 1],
@@ -193,7 +193,8 @@
      [" heatTemp: ", 20, 4, "hex2int", 10], [" stellgroesse: ", 24, 4, "hex2int", 10],
      [" seasonMode: ", 30, 2, "somwinmode",1], [" opMode: ", 36, 2, "opmodehc", 1]
     ],
-  "F6sys206" => [["LüfterstufeManuell: ", 30, 2, "hex", 1], [" RestlaufzeitLüfter: ", 36, 4, "hex", 1]
+  "F6sys206" => [["UserSetFanStage: ", 30, 2, "hex", 1], [" UserSetFanRemainingTime: ", 36, 4, "hex", 1],
+        [" LastErrors: ", 4, 8, "hex2error", 1],
     ],
   "FBglob" => [["outsideTemp: ", 8, 4, "hex2int", 10], [" flowTemp: ", 12, 4, "hex2int", 10],
      [" returnTemp: ", 16, 4, "hex2int", 10], [" hotGasTemp: ", 20, 4, "hex2int", 10],
@@ -528,7 +529,7 @@
   "p07FanStageDay" => {parent=>"p01-p12", argMin =>   "0", argMax =>    "3", unit =>""},
   "p08FanStageNight" => {parent=>"p01-p12", argMin =>   "0", argMax =>    "3", unit =>""},
   "p09FanStageStandby" => {parent=>"p01-p12", argMin =>   "0", argMax =>    "3", unit =>""},
-  "p10RoomTempManual" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "65", unit =>" °C"},
+  "p10HCTempManual" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "65", unit =>" °C"},
   "p11DHWsetTempManual" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "65", unit =>" °C"},
   "p12FanStageManual"  => {parent=>"p01-p12", argMin =>   "0", argMax =>   "3",        unit =>""},
   "p80EnableSolar"  => {parent=>"pSolar", argMin =>   "0", argMax =>   "1",        unit =>""},
@@ -539,7 +540,9 @@
   "pClockMinutes"      => {parent=>"sTimedate", argMin =>  "0", argMax =>  "59", unit =>""}
  );

-
+my %setsonly214 = (
+  "ResetErrors" => {cmd2=>"F8",     argMin =>   "0", argMax =>  "0", type =>"0clean",  unit =>""}
+);

########################################################################################
#
@@ -636,6 +639,7 @@
my %OpModeHC = ("1" =>"normal", "2" => "setback", "3" =>"standby", "4" =>"restart", "5" =>"restart");
my %SomWinMode = ( "01" =>"winter", "02" => "summer");
my %weekday = ( "0" =>"Monday", "1" => "Tuesday", "2" =>"Wednesday", "3" => "Thursday", "4" => "Friday", "5" =>"Saturday", "6" => "Sunday" );
+my %weekdaymap = ( "1" =>"Mon", "2" => "Tue", "3" =>"Wed", "4" => "Thu", "5" => "Fri", "6" =>"Sat", "7" => "Sun" );
my %faultmap = ( "0" =>"n.a.", "1" => "F01_AnodeFault", "2" => "F02_SafetyTempDelimiterEngaged", "3" => "F03_HighPreasureGuardFault", "4" => "F04_LowPreasureGuardFault", "5" => "F05_OutletFanFault", "6" => "F06_InletFanFault", "7" => "F07_MainOutputFanFault", "11" => "F11_LowPreasureSensorFault", "12"=> "F12_HighPreasureSensorFault", "15" => "F15_DHW_TemperatureFault",  "17" => "F17_DefrostingDurationExceeded", "20" => "F20_SolarSensorFault", "21" => "F21_OutsideTemperatureSensorFault", "22" => "F22_HotGasTemperatureFault", "23" => "F23_CondenserTemperatureSensorFault", "24" => "F24_EvaporatorTemperatureSensorFault", "26" => "F26_ReturnTemperatureSensorFault", "28" => "F28_FlowTemperatureSensorFault", "29" => "F29_DHW_TemperatureSensorFault", "30" => "F30_SoftwareVersionFault", "31" => "F31_RAMfault", "32" => "F32_EEPromFault", "33" => "F33_ExtractAirHumiditySensor", "34" => "F34_FlowSensor", "35" => "F35_minFlowCooling", "36" => "F36_MinFlowRate", "37" => "F37_MinWaterPressure", "40" => "F40_FloatSwitch", "50" => "F50_SensorHeatPumpReturn", "51" => "F51_SensorHeatPumpFlow",  "52" => "F52_SensorCondenserOutlet" );
my $firstLoadAll = 0;
my $noanswerreceived = 0;
@@ -1041,7 +1223,12 @@
   if (defined($err))  {  Log3 $hash->{NAME}, 3, "THZ_Set: Error msg:  $err -- $cmdHex2 -> $msg"; return($cmdHex2 . "-". $msg ."--" . $err);}
   else {
select(undef, undef, undef, 0.25);
- $msg=THZ_Get($hash, $name, $cmd);
+ if defined($gets{$cmd}) {
+    $msg=THZ_Get($hash, $name, $cmd);
+  }
+  else {
+    $msg=$cmd.": OK";
+  }
#take care of program of the week
if ($a[1] =~ /Mo-So/){
    select(undef, undef, undef, 0.05);
@@ -1419,6 +1614,24 @@
   return ($num);
}

+####################################
+#
+# bitmap2string - convert from bitmap to concatenated string
+#
+# parameter: bitmap representing yes/no, hashref to stringmapping
+# returns: concatenated string
+#
+########################################################################################
+sub bitmap2string($$) {
+  my($bitmap, $href) = @_;
+  my $idx = 1;
+  my $res = "";
+  foreach my $bit (split //, $bitmap) {
+    $res .= $href->{$idx} if ($bit);
+    $idx++;
+  }
+  return $res;
+}

####################################
#
@@ -1611,7 +1841,8 @@
       elsif ($Type eq "opmodehc") {$value= $OpModeHC{hex($value)};}
       elsif ($Type eq "esp_mant") {$value= sprintf("%.3f", unpack('f', pack( 'L',  reverse(hex($value)))));}
       elsif ($Type eq "somwinmode") {$value= $SomWinMode{($value)};}
-      elsif ($Type eq "hex2wday") {$value= unpack('b7', pack('H*',$value));}
+      elsif ($Type eq "hex2wday") {$value= bitmap2string(unpack('b7', pack('H*',$value)), \%weekdaymap);}
+      elsif ($Type eq "hex2error") {$value= bitmap2string(unpack('b32', pack('H*',$value)), \%faultmap);}
       elsif ($Type eq "weekday") {$value= $weekday{($value)};}
       elsif ($Type eq "faultmap") {$value= $faultmap{(hex($value))};}
       elsif ($Type eq "quater") {$value= quaters2time($value);}
@@ -1716,8 +1943,8 @@
       }
       elsif ($attrVal eq "2.14") {
         THZ_RemoveInternalTimer("THZ_GetRefresh");
-        %sets = %sets206;
-        %gets = (%getsonly2xx, %getsonly214, %sets);
+        %sets = (%sets206, %setsonly214);
+        %gets = (%getsonly2xx, %getsonly214, %sets206);
         THZ_Refresh_all_gets($hash);
       }
       elsif ($attrVal eq "5.39") {


immi

Hi Andre
I know I am not making my homeworks, and I quite slow, sorry :)

1)For hex2wday why do you need an additional function?
I do not have the raw data, but something like this should work
elsif ($Type eq "hex2wday") {$value= $weekday{((hex($value) &  0b0007) / 0b0007)};}
or like this
elsif ($Type eq "hex2wday") {$value= unpack('b7', pack('H*',$value));  $value= $weekday{($value)};}



2) writing to F8, a register which you cannot read, looks scary
how did you come to the idea to write to F8 and exactly what value?
if you read F8 what do you get as answer? do you get a 0103 or something else?
0100F9F81003-->0103FCF81003

3) >>And I would suggest to remove all nonblocking code.
still not sure where fhem is going to; I have not decided jet to kill nonblocking in THZ
immi

andre.k

#636
Hi immi,

No problem, I always appreciate your effort.

Zitat1)For hex2wday why do you need an additional function?

Because my hex value represents a bit vector, one bit stands for one weekday.
0000011 -> SatSun
1111111 -> MonTueWedThuFriSatSun

I would like to translate the bit vector to a concatenated string of weekdays.

Zitathow did you come to the idea to write to F8 and exactly what value?

I checked this with my service program from Stiebel Eltron. There is a dialog to reset the head pump errors,
which sends  01 80 79 F8 00 10 03.

If I try to read the F8 register/command then I got 0103.

Andre

immi

Hi Andre
thanks for the explanation
v 0.171 uploaded
I only changed in your code the following
if defined($gets{$cmd}) {
to
if (defined($gets{$cmd})) {
otherwise you get some errors in some per versions
immi

andre.k


Blixman

Hi,

i'm using the THZ module to control my THZ 504. This works very well for nearly a year. Thanks to everyone for development.
Today i tried to display the integralHeat value from sHC1 but its always zero. Maybe the value is stored in another register?
Is there anything i can do to help implementing this?

Thanks!

Blixman

immi

Zitat von: Blixman am 24 Oktober 2017, 08:38:39
Today i tried to display the integralHeat value from sHC1 but its always zero. Maybe the value is stored in another register?  Is there anything i can do to help implementing this?
Hi Blixman
happy you like fhem and thz
to your question: first I would look to the raw data of your hc1
if you want to better understand the protocol, just start fhem with verbose 5 and get hc1
e.g.

2017.10.24 20:06:21 5: THZ_Get: Try to get 'sHC1'
2017.10.24 20:06:21 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2017.10.24 20:06:21 5: Mythz sending 02
2017.10.24 20:06:21 5: SW: 02
2017.10.24 20:06:21 5: Mythz start Function THZ_ReadAnswer
2017.10.24 20:06:21 5: THZ_ReadAnswer: uc unpack: '10'
2017.10.24 20:06:21 5: Mythz sending 0100F5F41003
2017.10.24 20:06:21 5: SW: 0100F5F41003
2017.10.24 20:06:21 5: Mythz start Function THZ_ReadAnswer
2017.10.24 20:06:21 5: THZ_ReadAnswer: uc unpack: '1002'
2017.10.24 20:06:21 5: Mythz sending 10
2017.10.24 20:06:21 5: SW: 10
2017.10.24 20:06:21 5: Mythz start Function THZ_ReadAnswer
2017.10.24 20:06:21 5: THZ_ReadAnswer: uc unpack: '010064F40088FF6700FA000500FA00FE00F900010001000000650100000000E10000160000E500013616001003'
2017.10.24 20:06:21 5: Mythz sending 10
2017.10.24 20:06:21 5: SW: 10
2017.10.24 20:06:21 5: Parse message: 64F40088FF6700FA000500FA00FE00F900010001000000650100000000E10000160000E50001361600
2017.10.24 20:06:21 5: Message length: 82

the interpretation of HC1 register F4 is implemented in lines 164-176 of 00_THZ.pm
maybe you have a different encoding
immi

immi

interesting; looking in the statistics I find a nice variety
2.06_02.06
2.06_02.15
4.39t04.39HW74SW2.08
5.39_05.19HW113SW3.16
5.39_05.39HW113SW3.16
n.a._04.09HW72SW2.08
n.a._04.19HW73SW2.08
n.a._04.39HW74SW2.06
n.a._04.39HW74SW2.08
n.a._04.39HW74SW2.11
n.a._05.09HW113SW3.16
n.a._05.19HW113SW3.12
n.a._07.19HW242SW7.01

and I see for the first time a 7.xx

Blixman

#642
Hello again,

many thanks for your support. Since yesterday, there must be another version in the statistics: n.a._07.59HW98SW4.02. This is my THZ 540.
I just did what you mentioned, but i think that the value of integralHeat is not in the parsed message. Here is an excerpt of my logfile at verbose  5 an get sHC1:

2017.10.25 06:32:03 5: THZ_Get: Try to get 'sHC1'
2017.10.25 06:32:03 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2017.10.25 06:32:03 5: THZ504 sending 02
2017.10.25 06:32:03 5: SW: 02
2017.10.25 06:32:03 5: THZ504 start Function THZ_ReadAnswer
2017.10.25 06:32:03 5: THZ_ReadAnswer: uc unpack: '10'
2017.10.25 06:32:03 5: THZ504 sending 0100F5F41003
2017.10.25 06:32:03 5: SW: 0100F5F41003
2017.10.25 06:32:03 5: THZ504 start Function THZ_ReadAnswer
2017.10.25 06:32:03 5: THZ_ReadAnswer: uc unpack: '10'
2017.10.25 06:32:03 5: THZ504 start Function THZ_ReadAnswer
2017.10.25 06:32:03 5: THZ_ReadAnswer: uc unpack: '02'
2017.10.25 06:32:03 5: THZ504 sending 10
2017.10.25 06:32:03 5: SW: 10
2017.10.25 06:32:03 5: THZ504 start Function THZ_ReadAnswer
2017.10.25 06:32:03 5: THZ_ReadAnswer: uc unpack: '0100ACF400A20000012A000001440064013100000002101008006402000000009600FB000000E70000000000171003'
2017.10.25 06:32:03 5: THZ504 sending 10
2017.10.25 06:32:03 5: SW: 10
2017.10.25 06:32:03 5: Parse message: ACF400A20000012A0000014400640131000000021008006402000000009600FB000000E7000000000017
2017.10.25 06:32:03 5: Message length: 84


Here you can see the values shown in fhem:
outsideTemp: 16.2 x08: 0 returnTemp: 29.8 integralHeat: 0 flowTemp: 32.4 heatSetTemp: 10 heatTemp: 30.5 seasonMode: summer integralSwitch: 100 opMode: setback roomSetTemp: 15 x60: 25.1 x64: 0 insideTempRC: 23.1 x72: 0 x76: 0 onHysteresisNo: 0 offHysteresisNo: 0 HCBoosterStage: 0

So i tried to interpret the received message:

ACF4
outsideTemp:         00A2
x08: 0000
returnTemp: 012A
integralHeat:         0000
flowTemp: 0144
heatSetTemp:         0064
heatTemp: 0131
onHysteresisNo:         00
offHysteresisNo:        00
HCBoosterstage:         00
seasonMode: 02
x40: 1008
integralSwitch:         0064
opMode: 02
x50:         00
x52: 0000
roomSetTemp:         0096
x60: 00FB
x64: 0000
insideTempRC:         00E7
x72: 0000
x76: 0000
x80: 0017


The first thing that is different is the message length, mine is 84, yours is 82.  The value for integralHeat is always '0000'. Maybe x80: 0017 (23) is the value i'm looking for?

Any suggestions for finding the integralHeat value?

Thanks in advance.

Blixman

TheTrumpeter

Zitat von: Blixman am 25 Oktober 2017, 06:58:08
Any suggestions for finding the integralHeat value?
If it's there in HC1, it should be rather easy to find:
In winter mode the value decreases whenever heatpump is off and circuitpump is on.
It's freezed when heatpump and circuitpump are off.
It's set to 0 when heatpump is switched on.
It increases when heatpump and circuitpump are on.
It's set to 0 when heatpump is switched off.

So you only have to dump the value several times (for example when heatpump is on, do it every 5min) and check which value increases.
FHEM auf RPi3, THZ (LWZ404SOL), RPII2C & I2C_MCP342x (ADCPiZero), PowerMap, CustomReadings, RPI_GPIO, Twilight, nanoCUL (WMBus für Diehl Wasserzähler & Regenerationszähler für BWT AqaSmart), ESPEasy, TPLinkHS110

philipp_b

Ich logge seit gestern meine LWZ 504 und das integralHeat zeigt bei mir auch immer 0 an.