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

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

Vorheriges Thema - Nächstes Thema

danillo

Mir ist aufgefallen, dass bei mir sDisplay und sGlobal unterschiedliche Werte für compressor zur gleichen Zeit anzeigen.
Zitat
outsideTemp: 8.3 flowTemp: 23.5 returnTemp: 24 hotGasTemp: 40.6 dhwTemp: 47.7 flowTempHC2: 23 evaporatorTemp: 18.1 condenserTemp: 24.3 mixerOpen: 0 mixerClosed: 0 heatPipeValve: 0 diverterValve: 0 dhwPump: 0 heatingCircuitPump: 1 solarPump: 0 compressor: 1 boosterStage3: 0 boosterStage2: 0 boosterStage1: 0 highPressureSensor: 0 lowPressureSensor: 0 evaporatorIceMonitor: 1 signalAnode: 0 evuRelease: 0 ovenFireplace: 0 STB: 0 outputVentilatorPower: 35 inputVentilatorPower: 35 mainVentilatorPower: 0 outputVentilatorSpeed: 21 inputVentilatorSpeed: 21 mainVentilatorSpeed: 0 outside_tempFiltered: 8.2 relHumidity: 42.3 dewPoint: 0 P_Nd: 10.96 P_Hd: 13.86 actualPower_Qc: 0.000 actualPower_Pel: 0.000 collectorTemp: -60 insideTemp: -60
ZitatswitchingProg: 1 compressor: 0 heatingHC: 1 heatingDHW: 0 boosterHC: 0 filterBoth: 0 ventStage: 0 pumpHC: 1 defrost: 0 filterUp: 0 filterDown: 0
Gerade dürfte der Compressor aufgrund der Sperre durch den Netzanbieter nämlich nicht an sein.

immi

excellent you do not have anymore the strange "$", your heatpump is fine :)

now you have to make some trial and error;
1) start with hc1
2) pay attention to refresh the value in fhem at the same time you read in the display (you see a timestamp in fhem on the right of the reading)
3) look at the code of 00_THZ.pm from line 164

"F4hc1"  => [["outsideTemp: ", 4, 4, "hex2int", 10], [" x08: ", 8, 4, "hex2int", 10],
      [" returnTemp: ", 12, 4, "hex2int", 10],  [" integralHeat: ", 16, 4, "hex2int", 1],
      [" flowTemp: ", 20, 4, "hex2int", 10], [" heatSetTemp: ", 24, 4, "hex2int", 10],
      [" heatTemp: ", 28, 4, "hex2int", 10], 
      [" seasonMode: ", 38, 2, "somwinmode", 1],    #[" x40: ", 40, 4, "hex2int", 1],
      [" integralSwitch: ", 44, 4, "hex2int", 1], [" opMode: ", 48, 2, "opmodehc", 1],
      #[" x52: ", 52, 4, "hex2int", 1],
      [" roomSetTemp: ", 56, 4, "hex2int", 10],  [" x60: ", 60, 4, "hex2int", 10],
      [" x64: ", 64, 4, "hex2int", 10],  [" insideTempRC: ",     68, 4, "hex2int", 10],
      [" x72: ", 72, 4, "hex2int", 10],  [" x76: ", 76, 4, "hex2int", 10],
      [" onHysteresisNo: ", 32, 2, "hex", 1], [" offHysteresisNo: ", 34, 2, "hex", 1],
      [" HCBoosterStage: ", 36, 2, "hex", 1]

This is how I interprete  register F4 into sHC1
each element  is ["textstring ",    startposition, length, "encoding", divisor]
e.g. ["outsideTemp: ",    4, 4, "hex2int", 10]
F4-C2F4003F000000FF000000F800F900FC00000101610800640100000000C80000000000F1020000000017

003f hex --> 63  -->divided by 10 --> 6,3°C for outsidetemperature

4) if you have the impression that 2 parameter are exchanged; just exchange  the startingposition in the code and restart fhem

5) it is very helpfull to change the settemperature (sollwert) to strange values, which are easier to find.

6)when you think you have a clear understanding how your registers are encoded, tell me and I can modify the module according your hints

the same can be done for sHC2 which is in register F5 and so on
immi


danillo


immi

Zitat von: danillo am 28 November 2016, 08:14:47
I will do so, but it will take a while  ;)
take your time; post your increments and all your questions.
immi

The Spirit

how can i find out the actual fan speed? i mean 0, 1, 2 or 3?
THZ 304 Eco Baujahr 2015

willybauss

Zitat von: The Spirit am 01 Januar 2017, 20:14:58
how can i find out the actual fan speed? i mean 0, 1, 2 or 3?

Unfortunately the sGlobal reading just provides you with set values in kind of

Zitat...  outputVentilatorPower: 21 inputVentilatorPower: 24 ...

So you may need to match the set values to levels yourself.

1. set ventilation to level e.g. 1
2. read out sGlobal to get the  outputVentilatorPower, inputVentilatorPower values
3. repeat for levels 2 and 3
4. match values to levels 1, 2, 3

But since this seems to be a common topic for all of us I'd like to ask immi if it is possible to get all 3 set values from the THZ, so that the module could do the matching itself, returning the actual set level?
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

immi

Hi willy
the following code generates a reading named fanstage each time sGlobal is updated;
have a look

define thzfanstageif DOIF ([Mythz:sGlobal:[outputVentilatorPower. (\d+)]] < [Mythz:p40Fanstage1AirflowOutlet:d:$1/4.3] ) (setreading Mythz fanstage 0)   \
                 DOELSEIF ([Mythz:sGlobal:[outputVentilatorPower. (\d+)]] < [Mythz:p41Fanstage2AirflowOutlet:d:$1/4.3] ) (setreading Mythz fanstage 1)  \
                 DOELSEIF ([Mythz:sGlobal:[outputVentilatorPower. (\d+)]] < [Mythz:p42Fanstage3AirflowOutlet:d:$1/4.3] ) (setreading Mythz fanstage 2)  \
                 DOELSE (setreading Mythz fanstage 3)
attr thzfanstageif do always


usecase
p40Fanstage1AirflowOutlet 115 m3/h
outputVentilatorPower: 29
the conversion factor is about 4 for me; i used 4.3 to have some tolarance


almost forgot;
I wish everybody a wondefull 2017
immi

willybauss

Hi immi,

same to you: have a happy and healthy new year.

Interresting and easy solution. In my case the factor is 3.0; might be related to the airflow resistance of the piping system. So I may need to use e.g. 3.5 for calculation inside the DOIF to be on the safe side.

Do you have any experience what may happen in summer, using passive cooling mode? In this case the set value may be increased (passive cooling mode 1) or set to zero (passive cooling mode 2) , thus reporting a wrong fan stage.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

willybauss

you may add

attr devStateIcon cmd_1:vent_ventilation_level_0@red cmd_2:vent_ventilation_level_1@green cmd_3:vent_ventilation_level_2@blue cmd_4:vent_ventilation_level_3@red


to visualize the current state.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

immi

Zitat von: willybauss am 02 Januar 2017, 07:15:48
Do you have any experience what may happen in summer, using passive cooling mode? In this case the set value may be increased (passive cooling mode 1) or set to zero (passive cooling mode 2) , thus reporting a wrong fan stage.
my outputVentilatorPower for stage1 is between 28 an an 30 over the year, exept for passive cooling
just plot it over the year and see; I am sure you save sGlobal on a regolar basis
depending on which passivecooling you use, it could make sense to use inputVentilatorPower for calculation

just curious: what are your actual values of outputVentilatorPower for stage 1, 2 and 3? and p40 p41 p42?
immi


toggle

Das Verhältnis airflowOutlet / outputVentilatorPower kann nicht linear sein. Wenn ich mich nicht täusche, nimmt der Strömungswiderstand quadratisch mit der Geschwindigkeit zu. Und mit dem Widerstand nimmt auch die aufzuwendende Energie zu.
THZ404SOL (FW 5.39, SW ID 7278, 14.03.2014)

willybauss

Zitat von: immi am 02 Januar 2017, 11:30:51
just curious: what are your actual values of outputVentilatorPower for stage 1, 2 and 3? and p40 p41 p42?
immi

63, 150, 300m³
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

immi

Zitat von: toggle am 02 Januar 2017, 20:04:50
Das Verhältnis airflowOutlet / outputVentilatorPower kann nicht linear sein. Wenn ich mich nicht täusche, nimmt der Strömungswiderstand quadratisch mit der Geschwindigkeit zu. Und mit dem Widerstand nimmt auch die aufzuwendende Energie zu.
i agree completely, but
you just need to have a trshold inbetween the values; you do not need to model the values.
just try.

fernsehjens

Hallo und vielen Dank an alle die hier eine Super-Arbeit leisten!
Ich habe seit Ende des Jahres 2001 eine LWZ303i die bis heute ihre Dienste ohne Probleme tut. Schon länger beschäftige ich mich dem Thema die Daten aus der Anlage zu loggen und kenne die Arbeit von Robert Penz und auch eure FHEM-Anwendung.
In den letzten Tagen habe ich endlich meinen alten Raspberry hervorgeholt, FHEM installiert und die serielle Anbindung hergestellt - es funktioniert!!!
Einige Probleme treten natürlich bei der alten Firmware (get Mythz sFirmware: 010301FD1003 msg2 command not known; auf dem Eprom ist 2.03 aufgedruckt) noch auf:

Immer wenn ich die Mythz-Konfigurationseite aufrufe stürzt FHEM ab: Illegal division by zero at ./FHEM/00_THZ.pm line 1686


Nach readRAWRegisters die data.txt:
01-A101284B64284B64003C003C003C003C01
02-B80201011D4B4B
03-16030096000A009600641464
04-690464
05-C5050001001E000006000000001E006402260032028A0032
06-AE06281E14140A0A0A0A0200640702EE0096001E0001FFEC14
07-ED07143C00001E0C006407
08-AB08000014003214003C0005000007
09-2A097AA70000579727EA0000000000
0A-630A010120003C00BE003C
0B-3C0B07D002587F01000000007F00
0C-D30C083402087F01
0D-F10D07EE02587F0108FC01907F00
0E-CD0E003C00640000001E
0F-100F0000000000
10-A8100000FA01900002000A
11-010012111003-UpTempLimitDefrostEvaporatorEnd: 539.3 MaxTimeDefrostEvaporator: 4099 LimitTempCondenserElectBoost: 0 LimitTempCondenserDefrostTerm: 0 CompressorRestartDelay: 0 MainFanSpeed: 0-command not known

Bis jetzt habe ich mich noch nicht getraut einen Parameter zu senden, wie kann ich weiter vorgehen?
Jens

immi

Zitat von: fernsehjens am 03 Januar 2017, 20:39:04
Immer wenn ich die Mythz-Konfigurationseite aufrufe stürzt FHEM ab: Illegal division by zero at ./FHEM/00_THZ.pm line 1686
Hi Jens
which version of thz do you have? try to update fhem with the command update and restart
on which hardware are you running fhem?
immi