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

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

Vorheriges Thema - Nächstes Thema

ioT4db

now i got it. i thought it was already implemented in verion 4.39. sorry   ::)
FHEM auf Synology mittels Docker,  Jeelink-Clone 1x für PCA301 und 1x für Lacrosse, THZ304SOL, Homematic: CUL_HM / M-MOD-RPI-PCB, Pushover, Xiaomi s50

andre.k

Zitatone other question: what is "calibration speed"

Hi immi,

I don't know the exactly meaning of this value. It has something to do with the daily air volume adjustment.  The value is changed a little bit every day after air flow calibration at 4:00 pm.

TheTrumpeter

I just had a look as I did not try to find parameters for a long time...

p58 is 0A0611 with fw 5.39
suggested name: p58_timeoutTemperature_HC

Min/Max as per manual: 0-120
stored value has just to be converted do decimal, no further formula needed.
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

börni

Hello all,

I've checked the last view days my log frequently and I've again and again the following entries:


2018.02.11 20:54:34 3: THZ_Get: Error msg2:  decode: command not known -- 16 -> 01031A161003
2018.02.11 20:54:48 3: THZ_Get: Error msg2:  decode: command not known -- FE -> 010302FE1003
2018.02.11 20:55:41 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step2 -- 0B ->
2018.02.11 20:55:41 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1426.
2018.02.11 20:55:41 3: THZ_Get: Error msg2:   THZ_Get_Com: error found at step0 15 NAK!! -- 17 -> 15
2018.02.11 20:55:42 1: PERL WARNING: Use of uninitialized value $err in concatenation (.) or string at ./FHEM/00_THZ.pm line 1016.
2018.02.11 20:55:42 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/00_THZ.pm line 1016.
2018.02.11 20:55:42 3: Mythz/RAW: 02 -  -
2018.02.11 20:56:59 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 05 ->
2018.02.11 20:57:14 3: THZ_Parsing: offset(16) + length(4) is longer then message : '1D08089801F47F00'
2018.02.11 20:57:14 3: THZ_Parsing: offset(20) + length(4) is longer then message : '1D08089801F47F000000'
2018.02.11 20:57:39 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 06 ->
2018.02.11 20:57:41 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0D ->


two of them are currently registered and in preparation ... but what about the others?

Thanks for some comments in advance.
     -  Fabian
Loxberry auf RPi3 mit FHEM / LWZ303i V.2.06 / Loxone / eisfair Server (LMS/NAS/cloud/et.) / Fronius WR mit 9,3 kwp

andre.k

Zitat von: TheTrumpeter am 11 Februar 2018, 21:03:50
I just had a look as I did not try to find parameters for a long time...

p58 is 0A0611 with fw 5.39
suggested name: p58_timeoutTemperature_HC

Min/Max as per manual: 0-120
stored value has just to be converted do decimal, no further formula needed.

Because we have this parameter alraedy in 2.x. I would suggest to use the same reading name "p58SuppressTempCaptPumpStart"



andre.k

#725
Zitat von: börni am 11 Februar 2018, 21:05:30


2018.02.11 20:55:41 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step2 -- 0B ->

Hi Fabian,
this error is a communication timeout and is not unusual in firmware 2.x. The THZ needs sometimes much more time to respond (up to 10 sec) than the timeout value, which is currently 1 sec in nonblocking mode. How many such errors do you have per day?

TheTrumpeter

Zitat von: andre.k am 11 Februar 2018, 22:03:56
Because we have this parameter alraedy in 2.x. I would suggest to use the same reading name "p58SuppressTempCaptPumpStart"
Of course I agree; I did not know that.
It wasn't difficult to find. I feel that the calibrateable parameters are all stored "dec2hex" and could be found very easy. Unfortunately I do not have time yet to search for the missing ones.
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

andre.k

Hi immi,

as you probably know the revision 2.14 has solar pump but only 2 electrical boosters. The 2.06 has 3 electrical boosters but no solar pump.
I would suggest we change the sGlobal parsing to reflect the difference in FHEM.
Both versions should have an own hash element "FBglob206" and "FBglob214"
In 2.06 we need
      [" solarPump: ",     44, 1, "n.a", 1],      [" compressor: ",     44, 1, "bit0", 1],
      [" boosterStage3: ",     44, 1, "bit3", 1],      [" boosterStage2: ", 44, 1, "bit2", 1],
      [" boosterStage1: ",     44, 1, "bit1", 1],      [" highPressureSensor: ", 54, 1, "bit3", 1],

in 2.14 I'd like
      [" solarPump: ",     44, 1, "bit2", 1],      [" compressor: ",     44, 1, "bit0", 1],
      [" boosterStage2: ",     44, 1, "bit3", 1],      [" boosterStage3: ", 44, 1, "n.a.", 1],
      [" boosterStage1: ",     44, 1, "bit1", 1],      [" highPressureSensor: ", 54, 1, "bit3", 1],


Furthermore we should remove get "sFirmware-Id" from 2.06. The register doesn't exist in this firmware (peter456 has confirmed this) and please remove the following (experimantal) gets from 2.14:
"sLVR" (this is sFan)
"sF0"
"sF1"
"sEF"
The following patch has all these changes
--- 00_THZ.pm 2018-02-16 20:40:41.973829111 +0100
+++ 00_THZ.178.pm 2018-02-16 20:55:38.529812388 +0100
@@ -2,7 +2,7 @@
# 00_THZ
# $Id: 00_THZ.pm 16126 2018-02-08 21:05:03Z immi $
# by immi 1/2018
-my $thzversion = "0.177";
+my $thzversion = "0.178";
# this code is based on the hard work of Robert; I just tried to port it
# http://robert.penz.name/heat-pump-lwz/
########################################################################################
@@ -294,7 +294,7 @@
      [" actualPower_Qc: ",     94, 8, "esp_mant", 1], [" actualPower_Pel: ", 102, 8, "esp_mant", 1],
      [" collectorTemp: ",     4,  4, "hex2int", 10], [" insideTemp: ",     32, 4, "hex2int", 10]
      ],
-  "FBglob206" => [["outsideTemp: ", 8, 4, "hex2int", 10], [" flowTemp: ",         12, 4, "hex2int", 10],
+  "FBglob214" => [["outsideTemp: ", 8, 4, "hex2int", 10], [" flowTemp: ",         12, 4, "hex2int", 10],
      [" returnTemp: ",     16, 4, "hex2int", 10],  [" hotGasTemp: ",         20, 4, "hex2int", 10],
      [" dhwTemp: ",     24, 4, "hex2int", 10],  [" flowTempHC2: ",         28, 4, "hex2int", 10],
      [" evaporatorTemp: ",     36, 4, "hex2int", 10],  [" condenserTemp: ",     40, 4, "hex2int", 10],
@@ -302,7 +302,28 @@
      [" heatPipeValve: ",     45, 1, "bit3", 1],      [" diverterValve: ", 45, 1, "bit2", 1],
      [" dhwPump: ",     45, 1, "bit1", 1],      [" heatingCircuitPump: ", 45, 1, "bit0", 1],
      [" solarPump: ",     44, 1, "bit2", 1],      [" compressor: ",     44, 1, "bit0", 1],
-       [" boosterStage3: ",     44, 1, "bit3", 1],      [" boosterStage2: ", 44, 1, "n.a.", 1],
+       [" boosterStage2: ",     44, 1, "bit3", 1],      [" boosterStage3: ", 44, 1, "n.a.", 1],
+       [" boosterStage1: ",     44, 1, "bit1", 1],      [" highPressureSensor: ", 54, 1, "bit3", 1],
+       [" lowPressureSensor: ", 54, 1, "bit2", 1],      [" evaporatorIceMonitor: ", 55, 1, "bit3", 1],
+       [" signalAnode: ",     54, 1, "bit1", 1],      [" evuRelease: ",     48, 1, "n.a.", 1],
+       [" ovenFireplace: ",     54, 1, "bit0", 1],      [" STB: ",         48, 1, "n.a.", 1],
+       [" outputVentilatorPower: ",48, 2, "hex", 1],  [" inputVentilatorPower: ", 50, 2, "hex", 1], [" mainVentilatorPower: ", 52, 2, "hex", 255/100],         
+          [" outputVentilatorSpeed: ",56, 2, "hex", 1],     [" inputVentilatorSpeed: ", 58, 2, "hex", 1],  [" mainVentilatorSpeed: ", 60, 2, "hex", 1],
+          [" outsideTempFiltered: ",64, 4, "hex2int", 10], [" relHumidity: ",     70, 4, "n.a.", 1],
+          [" dewPoint: ",     5, 4, "n.a.", 1],
+       [" P_Nd: ",         5, 4, "n.a.", 1],     [" P_Hd: ",         5, 4, "n.a.", 1],
+       [" actualPower_Qc: ",     5, 8, "n.a.", 1],     [" actualPower_Pel: ", 5, 8, "n.a.", 1],
+       [" collectorTemp: ",     4,  4, "hex2int", 10], [" insideTemp: ",     32, 4, "hex2int", 10]
+       ],
+  "FBglob206" => [["outsideTemp: ", 8, 4, "hex2int", 10], [" flowTemp: ",         12, 4, "hex2int", 10],
+       [" returnTemp: ",     16, 4, "hex2int", 10],  [" hotGasTemp: ",         20, 4, "hex2int", 10],
+       [" dhwTemp: ",     24, 4, "hex2int", 10],  [" flowTempHC2: ",         28, 4, "hex2int", 10],
+       [" evaporatorTemp: ",     36, 4, "hex2int", 10],  [" condenserTemp: ",     40, 4, "hex2int", 10],
+       [" mixerOpen: ",     47, 1, "bit1", 1],      [" mixerClosed: ",     47, 1, "bit0", 1],
+       [" heatPipeValve: ",     45, 1, "bit3", 1],      [" diverterValve: ", 45, 1, "bit2", 1],
+       [" dhwPump: ",     45, 1, "bit1", 1],      [" heatingCircuitPump: ", 45, 1, "bit0", 1],
+       [" solarPump: ",     44, 1, "n.a", 1],      [" compressor: ",     44, 1, "bit0", 1],
+       [" boosterStage3: ",     44, 1, "bit3", 1],      [" boosterStage2: ", 44, 1, "bit2", 1],
      [" boosterStage1: ",     44, 1, "bit1", 1],      [" highPressureSensor: ", 54, 1, "bit3", 1],
      [" lowPressureSensor: ", 54, 1, "bit2", 1],      [" evaporatorIceMonitor: ", 55, 1, "bit3", 1],
      [" signalAnode: ",     54, 1, "bit1", 1],      [" evuRelease: ",     48, 1, "n.a.", 1],
@@ -790,7 +811,6 @@
   "sDHW"     => {cmd2=>"F3", type =>"F3dhw",    unit =>""},
   "sHC2"     => {cmd2=>"F5", type =>"F5hc2",    unit =>""},
   "sSystem"     => {cmd2=>"F6", type =>"F6sys206", unit =>""},
-  "sGlobal"       => {cmd2=>"FB", type =>"FBglob206", unit =>""}, 
   "sTimedate" => {cmd2=>"FC", type =>"FCtime206", unit =>""},
   "inputVentilatorSpeed"=> {parent=>"sGlobal",              unit =>" %"},
   "outputVentilatorSpeed"=>{parent=>"sGlobal",              unit =>" %"},
@@ -804,7 +824,7 @@
   "pFan"              => {cmd2=>"01", type =>"01pxx206", unit =>""},
   "sLast10errors"      => {cmd2=>"D1", type =>"D1last206", unit =>""},
   "sFirmware" => {cmd2=>"FD", type =>"FDfirm",   unit =>""},
-  "sFirmware-Id" => {cmd2=>"FE", type =>"FEfirmId", unit =>""},
+  "sGlobal"       => {cmd2=>"FB", type =>"FBglob206", unit =>""}, 
  );

my %getsonly214 = (
@@ -812,10 +832,7 @@
   "pExpert"     => {cmd2=>"02", type =>"02pxx206", unit =>""},
   "sControl"  => {cmd2=>"F2", type =>"F2type", unit =>""},
   "sHC1"     => {cmd2=>"F4", type =>"F4hc1214",    unit =>""},
-  "sLVR"  => {cmd2=>"E8", type =>"E8tyype", unit =>""},
-  "sF0"  => {cmd2=>"F0", type =>"F0type", unit =>""},
-  "sF1"  => {cmd2=>"F1", type =>"F1type", unit =>""},
-  "sEF"  => {cmd2=>"EF", type =>"EFtype", unit =>""},
+  "sGlobal"       => {cmd2=>"FB", type =>"FBglob214", unit =>""}, 
  );


Best Regards
Andre

immi

hiTrumpeter and andre.
thanks for the contribution, which I implemented and committed
you can update to 0.178

börni

Loxberry auf RPi3 mit FHEM / LWZ303i V.2.06 / Loxone / eisfair Server (LMS/NAS/cloud/et.) / Fronius WR mit 9,3 kwp


LeJoke

Hello,

hope this is the correct forum ...
Was anybody able yet to connect to a LWZ304 trend / eco?

I am using a serial cable @115.000 baud; Prolific 2303 RS223_USB and Win10 with Hterm. LWZ is SW version 5.09 / ID 7562

I can get a basic connection with sending 02 receiving response 10, but non of the other command seems to work ...
only when preceding a 02 to another command a get some more response from the LWZ (e.g. 02  01 00 FE FD 10 03 gives response 10  10 02)

Any idea what might be wrong ?
Resp. might trend / eco not be supported (according to the manual trend / eco do not support ISG web, only the integral models) - on the other hand when the service guy was here, he had a connection via the serial port

Thanks

immi

Zitat von: LeJoke am 19 Februar 2018, 12:29:39
Hello,
hope this is the correct forum ...
Was anybody able yet to connect to a LWZ304 trend / eco?
I am using a serial cable @115.000 baud; Prolific 2303 RS223_USB and Win10 with Hterm. LWZ is SW version 5.09 / ID 7562
I can get a basic connection with sending 02 receiving response 10, but non of the other command seems to work ...
only when preceding a 02 to another command a get some more response from the LWZ (e.g. 02  01 00 FE FD 10 03 gives response 10  10 02)
Any idea what might be wrong ?
Hi LeJoke
Yes if you want to help developing the 00_THZ module, you are correct writing here.
If you search in the forum, I described several times the protocoll, which is quite critical to timing.

Question: why don`t you use the module THZ with FHEM as it is?

If you understand german, look at the nice help page from Willy (incl. templates).
https://forum.fhem.de/index.php/topic,33452.0.html
https://wiki.fhem.de/wiki/Tecalor_THZ_Heatpump
If you prefer engl. I will help you in PM.

There was a user in the forum  using THZ on Windows in the past (brinkmicha), but I really suggest you to use a RasPi or a NAS with UNIX.
immi

LeJoke

Danke immi,

dein Hinweis war wohl zielführend.
Habe beim nochmaligen Suche im Forum diesen Hinweis von willybause gefunden, mit dem der sanity check unter Windows funktioniert hat
https://forum.fhem.de/index.php/topic,13132.1317.html
D.h. bei Verwendung von terminalbpp mit den entsprechenden delays in der Kommunikation bekomme ich jetzt auch plausible Antworten zurück.
Jetzt bin ich mir recht sicher, dass meine Anlage auch "kompatibel" ist und werde für den nächsten Schritt FHEM auf linux einsetzen


willybauss

ups, solche Sachen habe ich mal geschrieben  ::). Daran konnte ich mich schon gar nicht mehr erinnern. Danke für den Link.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS