THZ / LWZ Tecalor Stiebel Eltron Heizung

Begonnen von Heiner, 02 Juni 2013, 11:39:13

Vorheriges Thema - Nächstes Thema

andre.k

Hi immi,

I re-engineered the register of my firmware. Could you please test and apply the patchfile.


--- 00_THZ.pm 2015-01-24 18:18:52.204114685 +0100
+++ /opt/fhem/FHEM/00_THZ.pm 2015-01-25 21:19:08.984477324 +0100
@@ -300,11 +300,27 @@
%getsonly539=(%getsonly539, %getsonly439);

my %getsonly206 = (
+ "pFan" => {cmd2=>"01", type =>"01pxx206", unit =>""},
+ "pExpert" => {cmd2=>"02", type =>"02pxx206", unit =>""},
+ "pDefrostEva" => {cmd2=>"03", type =>"03pxx206", unit =>""},
+ "pDefrostAA" => {cmd2=>"04", type =>"04pxx206", unit =>""},
+ "pHeat1" => {cmd2=>"05", type =>"05pxx206", unit =>""},
+ "pHeat2" => {cmd2=>"06", type =>"06pxx206", unit =>""},
+ "pDHW" => {cmd2=>"07", type =>"07pxx206", unit =>""},
+ "pSolar" => {cmd2=>"08", type =>"08pxx206", unit =>""},
+ "pCircPump" => {cmd2=>"0A", type =>"0Apxx206", unit =>""},
+ "pHeatProg" => {cmd2=>"0B", type =>"0Bpxx206", unit =>""},
+ "pDHWProg" => {cmd2=>"0C", type =>"0Cpxx206", unit =>""},
+ "pFanProg"    => {cmd2=>"0D", type =>"0Dpxx206", unit =>""},
+ "pRestart" => {cmd2=>"0E", type =>"0Epxx206", unit =>""},
+ "pAbsence" => {cmd2=>"0F", type =>"0Fpxx206", unit =>""},
+ "pDryHeat" => {cmd2=>"10", type =>"10pxx206", unit =>""},
"sSol" => {cmd2=>"16", type =>"16sol", unit =>""},
"p01-p12" => {cmd2=>"17", type =>"17pxx206", unit =>""},
"sDHW" => {cmd2=>"F3", type =>"F3dhw", unit =>""},
"sHC1" => {cmd2=>"F4", type =>"F4hc1", unit =>""},
"sHC2" => {cmd2=>"F5", type =>"F5hc2", unit =>""},
+ "sSystem" => {cmd2=>"F6", type =>"F6syst206", unit =>""},
"sHistory" => {cmd2=>"09", type =>"09his206", unit =>""},
"sLast10errors" => {cmd2=>"D1", type =>"D1last206", unit =>""},
         "sGlobal"       => {cmd2=>"FB", type =>"FBglob206", unit =>""},  #allFB
@@ -1014,10 +1030,88 @@
      [" x20: ", 20, 4, "hex2int", 1], [" x24: ", 24, 4, "hex2int", 1],
      [" x28: ", 28, 4, "hex2int", 1], [" x32: ", 32, 2, "hex2int", 1]
      ],
+  "01pxx206" => [
+ ["p37Fanstage1AirflowInlet: ", 4, 2, "hex", 1],
+ [" p38Fanstage2AirflowInlet: ", 6, 2, "hex", 1],
+ [" p39Fanstage3AirflowInlet: ", 8, 2, "hex", 1],
+ [" p40Fanstage1AirflowOutlet: ", 10, 2, "hex", 1],
+ [" p41Fanstage2AirflowOutlet: ", 12, 2, "hex", 1],
+ [" p42Fanstage3AirflowOutlet: ", 14, 2, "hex", 1],
+ [" p43UnschedVent3: ", 16, 4, "hex", 1],
+ [" p44UnschedVent2: ", 20, 4, "hex", 1],
+ [" p45UnschedVent1: ", 24, 4, "hex", 1],
+ [" p46UnschedVent0: ", 28, 4, "hex", 1],
+ [" p75PassiveCooling: ", 32, 2, "hex", 1]
+ ],
+  "05pxx206" => [
+ ["p13GradientHC1: ", 4, 4, "hex", 10],
+ [" p14LowEndHC1: ", 8, 4, "hex", 10],
+ [" p15RoomInfluenceHC1: ", 12, 2, "hex", 10],
+ [" p16GradientHC2: ", 14, 4, "hex", 10],
+ [" p17LowEndHC2: ", 18, 4, "hex", 10],
+ [" p18RoomInfluenceHC2: ", 22, 2, "hex", 10],
+ [" p19FlowProportionHC1: ", 24, 4, "hex", 10],
+ [" p20FlowProportionHC2: ", 28, 4, "hex", 10],
+ [" MaxSetHeatFlowTempHC1: ", 32, 4, "hex", 10],
+ [" MinSetHeatFlowTempHC1: ", 36, 4, "hex", 10],
+ [" MaxSetHeatFlowTempHC2: ", 40, 4, "hex", 10],
+ [" MinSetHeatFlowTempHC2: ", 44, 4, "hex", 10],
+ ],
+  "06pxx206" => [
+ ["p21Hist1: ", 4, 2, "hex", 10],
+ [" p22Hist2: ", 6, 2, "hex", 10],
+ [" p23Hist3: ", 8, 2, "hex", 10],
+ [" p24Hist4: ", 10, 2, "hex", 10],
+ [" p25Hist5: ", 12, 2, "hex", 10],
+ [" p26Hist6: ", 14, 2, "hex", 10],
+ [" p27Hist7: ", 16, 2, "hex", 10],
+ [" p28Hist8: ", 18, 2, "hex", 10],
+ [" p29HistAsymmetry: ", 20, 2, "hex", 1],
+ [" p30integralComponent: ", 22, 4, "hex", 1],
+ [" p31MaxBoostStages: ", 26, 2, "hex", 1],
+ [" MaxHeatFlowTemp: ", 28, 4, "hex", 10],
+ [" p49SummerModeTemp: ", 32, 4, "hex", 10],
+ [" p50SummerModeHysteresis: ", 36, 4, "hex", 10],
+ [" p77OutTempAdjust: ", 40, 4, "hex", 1],
+ [" p78DualModePoint: ", 44, 4, "hex", 10],
+ [" p79ReHeatingDelay: ", 48, 2, "hex", 1]
+ ],
+ "07pxx206" => [
+ ["p32HystDHW: ", 4, 2, "hex", 10],
+ [" p33BoosterTimeoutDHW: ", 6, 2, "hex", 1],
+ [" p34TempLimitBoostDHW: ", 8, 4, "hex", 10],
+ [" p35PasteurisationInterval: ", 12, 2, "hex", 1],
+ [" p36MaxDurationDHWLoad: ", 14, 2, "hex", 1],
+ [" PasteurisationTemp: ", 16, 4, "hex", 10],
+ [" MaxBoostStagesDHW: ", 20, 2, "hex", 1],
+ [" p84EnableDHWBuffer: ", 22, 2, "hex", 1]
+ ],
+  "08pxx206" => [
+ ["p80EnableSolar: ", 4, 2, "hex", 1],
+ [" p81DiffTempSolarLoading: ", 6, 4, "hex", 10],
+ [" p82DelayCompStartSolar: ", 10, 2, "hex", 1],
+ [" p84DHWTempSolarMode: ", 12, 4, "hex", 10],
+ [" HystDiffTempSolar: ", 16, 4, "hex", 1],
+ [" CollectLimitTempSolar: ", 20, 4, "hex", 10]
+ ],
+  "0Apxx206" => [
+ ["p54MinPumpCycles: ", 4, 2, "hex", 1],
+ [" p55MaxPumpCycles: ", 6, 4, "hex", 1],
+ [" p56OutTempMaxPumpCycles: ", 10, 4, "hex", 10],
+ [" p57OutTempMinPumpCycles: ", 14, 4, "hex", 10],
+ [" p58SuppressTempCaptPumpStart: ", 18, 4, "hex", 1]
+ ],
+  "10pxx206" => [
+ ["p70StartDryHeat: ", 4, 2, "hex", 1],
+ [" p71BaseTemp: ", 6, 4, "hex", 10],
+ [" p72PeakTemp: ", 10, 4, "hex", 10],
+ [" p73TempDuration: ", 14, 4, "hex", 1],
+ [" p74TempIncrease: ", 18, 4, "hex", 10]
+ ],
   "17pxx206" => [["p01RoomTempDay: ", 4, 4,  "hex",  10], [" p02RoomTempNight: ", 8,  4, "hex", 10],
      [" p03RoomTempStandby: ", 12, 4,  "hex", 10], [" p04DHWsetDayTemp: ", 16, 4,  "hex", 10],
      [" p05DHWsetNightTemp: ", 20, 4,  "hex", 10], [" p06DHWsetStandbyTemp: ", 24, 4,  "hex", 10],
-       [" p07FanStageDay: ", 28, 2,  "hex", 1], [" p08FanStageNight: ", 30, 4,  "hex", 1],
+       [" p07FanStageDay: ", 28, 2,  "hex", 1], [" p08FanStageNight: ", 30, 2,  "hex", 1],
      [" p09FanStageStandby: ", 32, 2,  "hex", 1], [" p10RoomTempManual: ", 34, 4,  "hex", 10],
      [" p11DHWsetManualTemp: ", 38, 4,  "hex", 10],  [" p12FanStageManual: ", 42, 2,  "hex", 1],
     ],
@@ -1033,11 +1127,11 @@
      [" fault2CODE: ", 32, 4, "faultmap", 1], [" fault2TIME: ", 36, 4, "hex2time", 1],  [" fault2DATE: ", 40, 4, "hexdate", 100],
      [" fault3CODE: ", 44, 4, "faultmap", 1], [" fault3TIME: ", 48, 4, "hex2time", 1],  [" fault3DATE: ", 52, 4, "hexdate", 100]
      ],
-  "F3dhw"  => [["dhw_temp: ", 4, 4, "hex2int", 10], [" outside_temp: ", 8, 4, "hex2int", 10],
+  "F3dhw"  => [["dhw_temp: ", 4, 4, "hex2int", 10], [" outside_temp: ", 8, 4, "hex2int", 10],
      [" dhw_set_temp: ", 12, 4, "hex2int", 10],  [" comp_block_time: ", 16, 4, "hex2int", 1],
-       [" x20: ", 20, 4, "hex2int", 1], [" heat_block_time: ", 24, 4, "hex2int", 1],
-       [" x28: ", 28, 4, "hex2int", 1], [" x32: ", 32, 4, "hex2int", 1],
-       [" x36: ", 36, 4, "hex", 1]
+       [" x20: ", 20, 4, "hex2int", 1], [" heat_block_time: ", 24, 4, "hex2int", 1],
+       [" BoosterStage: ", 28, 2, "hex", 1], [" x30: ", 30, 4, "hex", 1],
+       [" OpMode: ", 34, 2, "opmodehc", 1], [" x36: ", 36, 4, "hex", 1]
      ],
   "F4hc1"  => [["outsideTemp: ", 4, 4, "hex2int", 10], [" x08: ", 8, 4, "hex2int", 10],
      [" returnTemp: ", 12, 4, "hex2int", 10],  [" integralHeat: ", 16, 4, "hex2int", 1],
@@ -1053,6 +1147,8 @@
      [" heatTemp: ", 20, 4, "hex2int", 10], [" stellgroesse: ", 24, 4, "hex2int", 10],
      [" seasonMode: ", 30, 2, "somwinmode", 1],[" opMode: ", 36, 2, "opmodehc", 1]
     ],
+  "F6syst206" => [["LüfterstufeManuell: ", 30, 2, "hex", 1], [" RestlaufzeitLüfter: ", 36, 4, "hex", 1]
+ ],
   "FBglob" => [["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],
@@ -1090,9 +1186,9 @@
      [" outputVentilatorPower: ", 48, 2, "hex", 1],  [" inputVentilatorPower: ", 50, 2, "hex", 1], [" mainVentilatorPower: ", 52, 2, "hex", 1],
      [" outputVentilatorSpeed: ", 56, 2, "hex", 1], [" inputVentilatorSpeed: ", 58, 2, "hex", 1],  [" mainVentilatorSpeed: ", 60, 2, "hex", 1],
      [" outside_tempFiltered: ", 64, 4, "hex2int", 10], [" relHumidity: ", 70, 4, "n.a.", 1],
-       [" dewPoint: ", 82, 4, "n.a.", 1],
-       [" P_Nd: ", 86, 4, "n.a.", 1], [" P_Hd: ", 90, 4, "n.a.", 1],
-       [" actualPower_Qc: ", 94, 8, "n.a.", 1], [" actualPower_Pel: ", 102, 8, "n.a.", 1],
+       #[" dewPoint: ", 82, 4, "n.a.", 1],
+       #[" P_Nd: ", 86, 4, "n.a.", 1], [" P_Hd: ", 90, 4, "n.a.", 1],
+       #[" actualPower_Qc: ", 94, 8, "n.a.", 1], [" actualPower_Pel: ", 102, 8, "n.a.", 1],
      [" collectorTemp: ", 4,  4, "hex2int", 10], [" insideTemp: ", 32, 4, "hex2int", 10] #, [" x84: ", 84, 4, "donottouch", 1]
      ],
   "FCtime" => [["Weekday: ", 4, 1,  "weekday", 1], [" Hour: ", 6, 2, "hex", 1],


The response message for Register FB in my firmware is shorter. Therefore I commented out the parsing elements which are out of the message, otherwise I got error messages in the log file.

Thanks
Andre

immi

Hi Andre
excellent patch!!
I will check it this evening carefully.
I do not want to change the order of FB, because I would like that people exchange their basic plot configuration.
The warning about message lenght will be fixed like this
[" actualPower_Qc: ",      50, 8, "n.a.", 1],   [" actualPower_Pel: ",      50, 8, "n.a.", 1],
immi

brinkmicha

Hello,
these are my first steps with FHEM.
I get the following error.


2015.01.26 16:11:40 5: THZ_Get: Try to get 'p03RoomTempStandbyHC2SummerMode'
2015.01.26 16:11:40 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2015.01.26 16:11:40 5: Mythz sending 02
2015.01.26 16:11:40 5: SW: 02
2015.01.26 16:11:40 5: Mythz start Funktion THZ_ReadAnswer
2015.01.26 16:11:40 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2015.01.26 16:11:40 5: THZ_Get: Error msg2: 'InterfaceNotRespondig'
2015.01.26 16:11:40 5: Mythz/RAW: 10
2015.01.26 16:11:40 2: Mythz/RAW: 10


Strawberry Fhem console:

given is experimental at ./FHEM/00_THZ.pm line 559, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 560, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 564, <$fh> line 7.
given is experimental at ./FHEM/00_THZ.pm line 575, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 576, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 577, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 578, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 579, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 580, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 581, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 582, <$fh> line 7.
given is experimental at ./FHEM/00_THZ.pm line 597, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 598, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 604, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 615, <$fh> line 7.
given is experimental at ./FHEM/00_THZ.pm line 1172, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1173, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1174, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1175, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1176, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1177, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1178, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1179, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1180, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1181, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1182, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1183, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1184, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1185, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1186, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1187, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1188, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1189, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1190, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1191, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1192, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1193, <$fh> line 7.
when is experimental at ./FHEM/00_THZ.pm line 1194, <$fh> line 7.


FHEM is loaded onto a Win8.1 64 bit, Strawberry Perl 5.20.1.1-32bit
I connect the heatpump (LWZ403) via usb2ser.
The software of the heatpump is 2.36.
Can you help me?

immi

#1308
Hi    brinkmicha
happy you want to join us

6 comments from my side:

  • you can ignore all "experimental" warnings
  • never tested fhem on windows: dont´t you have a unix computer? I mean: do you really want to run your win8 24h/day? Is not cheaper a RASPI?
  • what is usb2ser? a normal direct connection with a USB dongle?
  • have you used "attr Mythz firmware 2.06"  in config file?
  • please post your config file
  • which THZ-FHEM version are you using? The current is 0.127
immi

brinkmicha

Hi immi,
my Win8 is on a Zotac ID86 -> 10W. I use the system for the Stiebel and Solaredge Software.
There is no USB or LAN Port on my LWZ403sol from 2008. So I use the Serial Port like Robert Penz http://robert.penz.name/heat-pump-lwz/.
I use the THZ-FHEM version 0.127.
No, I have not used "attr Mythz firmware 2.06"  in config file...  where it must be entered?
Here is the config...

Thanks
brinkmicha

immi

#1310
at the beginning
just after define Mythz THZ com4@9600


define Mythz THZ com4@9600
attr Mythz firmware 2.06


immi

brinkmicha

Hi immi,

behave the same...   :(

more ideas? 

brinkmicha

immi

Zitat von: brinkmicha am 26 Januar 2015, 20:08:40
Hi immi,
behave the same...   :(
if it is behaving the same (you have problem with p03RoomTempStandbyHC2SummerMode), it means you have not done what I said correctly --> "attr Mythz firmware 2.06"

if it is not behaving the same, post the logs
immi

andre.k

Zitat von: immi am 26 Januar 2015, 09:24:02
I do not want to change the order of FB, because I would like that people exchange their basic plot configuration.
The warning about message lenght will be fixed like this
[" actualPower_Qc: ",      50, 8, "n.a.", 1],   [" actualPower_Pel: ",      50, 8, "n.a.", 1],
immi
Hi immi,
I aggree with you, we should not change the order of values in the readings. I fix it in your way.
Another problem is line#1137
$parsingcmd = substr($message,2,6) if ($parsingcmd =~ m/(0A|0B|0C)/) ;
In Firmware 2.x the command is always 1 Byte. Could you add the condition like "firmware" ne "2.06"?
Thank You.
Andre

immi

Hi Andre
I merged it, and tested it for my firmware
please check it again before I upload it.
immi

andre.k

Hi immi,

great, it works perfect.
Andre

immi

uploaded v0.128 tomorrow you can update
-changelog: now most of parameters can be read from old firmwares


willybauss

Zitat von: brinkmicha am 26 Januar 2015, 20:08:40
Hi immi,

behave the same... 

more ideas? 

brinkmicha


Du solltest zuerst wissen, ob überhaupt die Kommunikationsstrecke ok ist => eine Fehlerquelle ausschließen. Wenn Du den HeatpumpMonitor erwähnst, dann kennst Du ja den grundsätzlichen Ablauf der Kommunikation. Das kannst Du mit einer Terminalsoftware testen.  Was Robert Penz nicht erwähnt: zwischen Antwort der LWZ und dem nächsten Befehl muss ein Zeitfenster von min.10, max. 500ms eingehalten werden.

Unter Windows kannst Du dieses Terminal https://sites.google.com/site/terminalbpp/ verwenden, um direkt mit der LWZ zu "reden". Durch seine Makrofähigkeit kann man das Zeitfenster in Form von Delays berücksichtigen. Ein Makro, um sGlobal abzufragen, wäre dann

$02%DLY0010$01$00$FC$FB$10$03%DLY0010$10

Die Firmwareversion erhältst Du mit

$02%DLY0010$01$00$FE$FD$10$03%DLY0010$10

Wenn Du damit Antworten bekommst (im ersten Fall den größeren Datenblock, im zweiten Fall einen kürzeren, jeweils im Hex-Format), dann stimmt Deine Kommunikation zwischen PC und LWZ.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

immi

Hi brinkmicha

I think I understood where  the problem with Windows is
https://github.com/mhop/fhem-mirror/blob/master/fhem/FHEM/DevIo.pm
# NOTE2: This works on Windows only for TCP connections
Sub DevIo_SimpleReadWithTimeout($$)
Sub DevIo_TimeoutRead($$)


I do not know if it can be fixed, but let´s try.
Please update to v0.128
Please change line 768 of 00_THZ.pm

my $buf = DevIo_SimpleReadWithTimeout($hash, 0.7);

with

select(undef, undef, undef, 0.025); # this is a delay of 25ms
my $buf = DevIo_DoSimpleRead($hash);



then start fhem with option "attr Mythz firmware 2.06"
after that post your complete log as file
immi

brinkmicha

Hi immi,

we're on the right way!  :)

Here my logs...

brinkmicha