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

you can find the register via reverse enginnering (man in the middle) if you have a service software or by trial and error
in this case, there is also a easy debug feature in the module at line 1821
you can  call it via
get Mythz debug_read_raw_register_slow
It locks fhem for some minutes and at the end writes the results in logfile and in the filesystem "data.txt".
It makes very sense that you share all your register-outputs, uploading in the forum data.txt


considering github; do not make pull-request there; publish your code changes in the forum here and I decide how to merge them

sunrise

Zitat von: immi am 11 Juni 2020, 10:50:31
line 1897
i tell fhem which %sets and %gets to use for 2.14
just add a simical case for 2.16
What is the difference between sets and setsonly, and for getsonly2xx and getsonly214, respectively?
        elsif ($attrVal eq "2.14") {
            %sets = (%sets206, %setsonly214);
            %gets = (%getsonly2xx, %getsonly214, %sets206);
            THZ_Refresh_all_gets($hash);
        }


Now I have just copied that elsif clause with the same variables (of course with $attrVal eq "2.16" instead, but the rest the same). Does that (currently) make sense?


Zitat von: immi am 11 Juni 2020, 10:50:31
line 829
here I define %getsonly214 as a list of registers 01,02,F2,F4,FB and how we decode the answer from the heatpump (respectively 01pxx214, 02pxx206 ....)
Similarly, here I have copied the block for %getsonly214 but renamed to to %getsonly216 as a start.


Zitat von: immi am 11 Juni 2020, 10:50:31
line 73
here is defined how to decode the answer from the heatpump for 01pxx214
Finally, here I again copied the block 01pxx216 and renamed it to 01pxx214 (and kept the other stuff unchanged.

Now I would go checking what happens.

If you think I already made a mistake, please kindly let me know. Thanks a lot! :)


Since I am (again) new to FHEM, I still have to find out how to load the updated 00_THZ.pm for testing.
Viele Grüße/kind regards
sunrise
_________________
Tecalor THZ 303 (SOL, 2006/09-2008/08), FW 2.16 | FHEM THZ module testing with FW 2.06 (INTEGRAL, 2006/12-2008/08) & FW 2.14 (SOL, 2002/10-2004/08) on Raspberry Pi 2

immi

Zitat von: sunrise am 13 Juni 2020, 11:34:46
What is the difference between sets and setsonly, and for getsonly2xx and getsonly214, respectively?
getsonly2xx is a common denominator of registers which are equals for all 2.xx; specialities of 2.14 shoul be in getsonly214

when you give me your specialities of 2.16, we can think how to organize them.
immi

sunrise

Ok, sounds good. I am still searching the wiki and other sources to understand how I either replace the official 00_THZ.pm in my FHEM installation, or how to load it after renaming it to e.g. 00_THZ_test.pm. If you happen to have a quick hint for me where to look for that, I would be very grateful. :) Maybe I am looking in the wrong places.  :blush:

PS:
"Specialties" in my case would be anything different or in addition to the INTEGRAL firmware 2.06, I assume, since it has the same age as my SOL 2.16 firmware. Maybe it makes to first ignore "specialties" and confirm the other (identical) parameters?
Viele Grüße/kind regards
sunrise
_________________
Tecalor THZ 303 (SOL, 2006/09-2008/08), FW 2.16 | FHEM THZ module testing with FW 2.06 (INTEGRAL, 2006/12-2008/08) & FW 2.14 (SOL, 2002/10-2004/08) on Raspberry Pi 2

immi

Zitat von: sunrise am 13 Juni 2020, 12:05:29
Ok, sounds good. I am still searching the wiki and other sources to understand how I either replace the official 00_THZ.pm in my FHEM installation, or how to load it after renaming it to e.g. 00_THZ_test.pm. If you happen to have a quick hint for me where to look for that, I would be very grateful. :)
just overright it and restart fhem;
you can always get the original from github or just by updating fhem

sunrise

Viele Grüße/kind regards
sunrise
_________________
Tecalor THZ 303 (SOL, 2006/09-2008/08), FW 2.16 | FHEM THZ module testing with FW 2.06 (INTEGRAL, 2006/12-2008/08) & FW 2.14 (SOL, 2002/10-2004/08) on Raspberry Pi 2

willybauss

look on your fhem server in /opt/fhem/FHEM. The used version is located there. Move it to a different directory or rename it, in order to have a backup. Then copy the modified file to /opt/fhem/FHEM.

That's my understanding of what you should do.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

sunrise

Great, so easy - thank you! :)

ZitatAttributes:
firmware    2.16
interval_sGlobal    300
interval_sHistory    28800
interval_sLast10errors    120

I have marked below in red font what I find "not normal" (at least I suspect there a problem with the readings due to different firmware).

get sDHW:
ZitatdhwTemp: 50.9 outsideTemp: 21.3 dhwSetTemp: 48 compBlockTime: 0 out: 001C heatBlockTime: 2812 dhwBoosterStage: 0 pasteurisationMode: 0 dhwOpMode: normal x36: D368
The "x36: D368" looks strange here.

get sFan:
ZitatstatusAFC: 0 supplyFanSpeedCAL: 0 exhaustFanSpeedCAL: 0 supplyFanAirflowCAL: 0 exhaustFanAirflowCAL: 0 supplyFanSpeed: 0 exhaustFanSpeed: 0 supplyFanAirflowSet: 0 exhaustFanAirflowSet: 0 supplyFanSpeedTarget: 0 exhaustFanSpeedTarget: 0 supplyFanSpeed0: 0 exhaustFanSpeed0: 0 supplyFanSpeed200: 2.5 exhaustFanSpeed200: 742.4 airflowTolerance: 170 airflowCalibrationInterval: 0 timeToCalibration: 170

get sGlobal:
ZitatoutsideTemp: 21.3 flowTemp: 31.7 returnTemp: 30.1 hotGasTemp: 63.8 dhwTemp: 50.9 flowTempHC2: 0 evaporatorTemp: 19.9 condenserTemp: 32.6 mixerOpen: 0 mixerClosed: 0 heatPipeValve: 0 diverterValve: 0 dhwPump: 0 heatingCircuitPump: 0 solarPump: 0 compressor: 0 boosterStage2: 0 boosterStage3: n.a. boosterStage1: 0 highPressureSensor: 1 lowPressureSensor: 1 evaporatorIceMonitor: 1 signalAnode: 0 evuRelease: n.a. ovenFireplace: 0 STB: n.a. outputVentilatorPower: 57 inputVentilatorPower: 57 mainVentilatorPower: 0 outputVentilatorSpeed: 30 inputVentilatorSpeed: 26 mainVentilatorSpeed: 0 outsideTempFiltered: 21.6 relHumidity: n.a. dewPoint: n.a. P_Nd: n.a. P_Hd: n.a. actualPower_Qc: n.a. actualPower_Pel: n.a. collectorTemp: 93.6 insideTemp: 0
insideTemp is 0, because I have no inside temperature measurement

get sHC1:
ZitatoutsideTemp: 21.2 x08: FF4D returnTemp: 30.2 integralHeat: 0 flowTemp: 31.7 heatSetTemp: 23.7 heatTemp: 30.6 seasonMode: summer integralSwitch: 100 hcOpMode: normal roomSetTemp: 1459.2 x60: 5.7 x64: 0000 insideTempRC: 0 x72: 0200 x76: 0000 onHysteresisNo: 0 offHysteresisNo: 1 hcBoosterStage: 0
The "x08: FF4D" looks strange here, as well as the "normal roomSetTemp: 1459.2" and following 3 parameters ("x64", "x72", and "x76"), at least I wonder about these parameters' names. Do they mean parameters P64, P72, and P76?

get sHC2:
ZitatoutsideTemp: 21.2 returnTemp: 30.2 vorlaufTemp: 0 heatSetTemp: 20.6 heatTemp: 30.2 stellgroesse: -100 seasonMode: summer hcOpMode: normal
I have no HC2, but nevertheless these values are shown. Is that ok? (I mean THZ module testing-wise)

get sHistory:
ZitatoperatingHours1: 180 operatingHours2: 182 heatingHours: 23156 DHWhours: 10201 coolingHours: 0
The "heatingHours" in reality is much larger (>10 years of use), but maybe that is because of technical repair with electricity switched off a while ago by an SE technician.

get sProgram:
ZitatopMode: automatic ProgStateHC: normal ProgStateDHW: normal ProgStateFAN: setback BaseTimeAP0: 10926 StatusAP0: 0 StartTimeAP0: 0 EndTimeAP0: 0

get sSol:
ZitatcollectorTemp: 93.6 dhwTemp: 50.9 flowTemp: 31.7 edSolPump: 0 out: 0004 status: CC
Note that I have no collectors connected with my THZ.

get sSystem:
ZitatuserSetFanStage: 0 userSetFanRemainingTime: 0 lastErrors:

get sTimedate:
ZitatWeekday: Sunday pClockHour: 12 pClockMinutes: 11 Sec: 59 pClockYear: 20 pClockMonth: 6 pClockDay: 14

The other values look ok - at least in so far I could check them on the LCD display. Some of them change within seconds, e.g. fan speeds, so I just checked them for plausibility.
Viele Grüße/kind regards
sunrise
_________________
Tecalor THZ 303 (SOL, 2006/09-2008/08), FW 2.16 | FHEM THZ module testing with FW 2.06 (INTEGRAL, 2006/12-2008/08) & FW 2.14 (SOL, 2002/10-2004/08) on Raspberry Pi 2

sunrise

Sorry, I forgot the log - see now below. There, too, are some values that do not look right. Specifically, almost everything that is HC1-related and HC2-related, seems awkward.

get zBackupParameters:
Zitat#Sun Jun 14 12:32:06 2020
set Mythz  p01-p12 p01RoomTempDay: 21 p02RoomTempNight: 20 p03RoomTempStandby: 10 p04DHWsetTempDay: 48 p05DHWsetTempNight: 48 p06DHWsetTempStandby: 10 p07FanStageDay: 1 p08FanStageNight: 3 p09FanStageStandby: 2 p10HCTempManual: 35 p11DHWsetTempManual: 45 p12FanStageManual: 2
set Mythz  p01RoomTempDay 21 °C
set Mythz  p01RoomTempDayHC2 4E0C08FC02BC7F00 °C
set Mythz  p02RoomTempNight 20 °C
set Mythz  p03RoomTempStandby 10 °C
set Mythz  p03RoomTempStandbyHC1 700B08FC02BC1F00000003206000 °C
set Mythz  p03RoomTempStandbyHC1SummerMode 700B08FC02BC1F00000003206000 °C
set Mythz  p04DHWsetDayTemp 0A0A010064009600C8003C °C
set Mythz  p04DHWsetTempDay 48 °C
set Mythz  p05DHWsetTempNight 48 °C
set Mythz  p06DHWsetStandbyTemp 0A0A010064009600C8003C °C
set Mythz  p06DHWsetTempStandby 10 °C
set Mythz  p07FanStageDay 1
set Mythz  p08FanStageNight 3
set Mythz  p09FanStageStandby 2
set Mythz  p10HCTempManual 35 °C
set Mythz  p11DHWsetTempManual 45 °C
set Mythz  p12FanStageManual 2
set Mythz  p13GradientHC1 0.4
set Mythz  p14LowEndHC1 3 K
set Mythz  p15RoomInfluenceHC1 0
set Mythz  p16GradientHC2 0.6
set Mythz  p17LowEndHC2 0 K
set Mythz  p18RoomInfluenceHC2 0
set Mythz  p19FlowProportionHC1 30 %
set Mythz  p20FlowProportionHC2 100 %
set Mythz  p21Hyst1 4 K
set Mythz  p22Hyst2 3 K
set Mythz  p23Hyst3 3 K
set Mythz  p24Hyst4 2 K
set Mythz  p25Hyst5 1 K
set Mythz  p29HystAsymmetry 2
set Mythz  p30integralComponent 100 Kmin
set Mythz  p32HystDHW 2 K
set Mythz  p33BoosterTimeoutDHW 90 min
set Mythz  p34BoosterDHWTempAct 0A0A010064009600C8003C °C
set Mythz  p34TempLimitBoostDHW -5 °C
set Mythz  p35PasteurisationInterval 30 Days
set Mythz  p36DHWMaxTime 0A0A010064009600C8003C
set Mythz  p36MaxDurationDHWLoad 12 h
set Mythz  p37Fanstage1AirflowInlet 0 m3/h
set Mythz  p38Fanstage2AirflowInlet 100 m3/h
set Mythz  p39Fanstage3AirflowInlet 0 m3/h
set Mythz  p40Fanstage1AirflowOutlet 135 m3/h
set Mythz  p41Fanstage2AirflowOutlet 0 m3/h
set Mythz  p42Fanstage3AirflowOutlet 170 m3/h
set Mythz  p43UnschedVent3 100 min
set Mythz  p44UnschedVent2 135 min
set Mythz  p45UnschedVent1 170 min
set Mythz  p46UnschedVent0 60 min
set Mythz  p47CompressorRestartDelay 20 min
set Mythz  p48MainFanSpeed 60 %
set Mythz  p49SummerModeTemp 17 °C
set Mythz  p50SummerModeHysteresis 2 K
set Mythz  p54MinPumpCycles 1 /Day
set Mythz  p55MaxPumpCycles 25 /Day
set Mythz  p56OutTempMaxPumpCycles 15 °C
set Mythz  p57OutTempMinPumpCycles 20 °C
set Mythz  p58SuppressTempCaptPumpStart 60 s
set Mythz  p75PassiveCooling 0
set Mythz  p77OutTempFilterTime 1 h
set Mythz  p78DualModePoint -1 °C
set Mythz  p79BoosterTimeoutHC 20 min
set Mythz  p80EnableSolar 0
set Mythz  p99FrostProtectionBoost 0A0A010064009600C8003C °C
set Mythz  pHeat1 p13GradientHC1: 0.4 p14LowEndHC1: 3 p15RoomInfluenceHC1: 0 p16GradientHC2: 0.6 p17LowEndHC2: 0 p18RoomInfluenceHC2: 0 p19FlowProportionHC1: 30 p20FlowProportionHC2: 100 MaxSetHeatFlowTempHC1: 45 MinSetHeatFlowTempHC1: 5 MaxSetHeatFlowTempHC2: 35 MinSetHeatFlowTempHC2: 5
set Mythz  pHeat2 p21Hyst1: 4 p22Hyst2: 3 p23Hyst3: 3 p24Hyst4: 2 p25Hyst5: 1 p26Hyst6: 1 p27Hyst7: 1 p28Hyst8: 1 p29HystAsymmetry: 2 p30integralComponent: 100 p31MaxBoostStages: 3 MaxHeatFlowTemp: 75 p49SummerModeTemp: 17 p50SummerModeHysteresis: 2 p77OutTempFilterTime: 1 p78DualModePoint: -1 p79BoosterTimeoutHC: 20
set Mythz  pHeatProg progHC1StartTime: 23:00 progHC1EndTime: 07:00 progHC1Monday: 1 progHC1Tuesday: 1 progHC1Wednesday: 1 progHC1Thursday: 1 progHC1Friday: 1 progHC1Saturday: 0 progHC1Sunday: 0 progHC1Enable: 0 progHC2StartTime: 00:00 progHC2EndTime: 08:00 progHC2Monday: 0 progHC2Tuesday: 0 progHC2Wednesday: 0 progHC2Thursday: 0 progHC2Friday: 0 progHC2Saturday: 1 progHC2Sunday: 1 progHC2Enable: 0
set Mythz  pHolidayBeginMonth 0A0A010064009600C8003C
set Mythz  pHolidayEndDay 0A0A010064009600C8003C
set Mythz  progDHWEnable 0
set Mythz  progDHWEndTime 07:00
set Mythz  progDHWFriday 1
set Mythz  progDHWMonday 1
set Mythz  progDHWSaturday 0C
set Mythz  progDHWStartTime 23:00
set Mythz  progDHWSunday 1
set Mythz  progDHWThursday 1
set Mythz  progDHWTuesday too
set Mythz  progDHWWednesday 1
set Mythz  progFAN1Enable 1
set Mythz  progFAN1EndTime 08:00
set Mythz  progFAN1Friday 1
set Mythz  progFAN1Monday 1
set Mythz  progFAN1Saturday 1
set Mythz  progFAN1StartTime 12:00
set Mythz  progFAN1Sunday 1
set Mythz  progFAN1Thursday 1
set Mythz  progFAN1Tuesday 1
set Mythz  progFAN1Wednesday 1
set Mythz  progFAN2Enable 0
set Mythz  progFAN2EndTime 07:30
set Mythz  progFAN2Friday 0
set Mythz  progFAN2Monday 0
set Mythz  progFAN2Saturday 1
set Mythz  progFAN2StartTime 22:00
set Mythz  progFAN2Sunday 1
set Mythz  progFAN2Thursday 0
set Mythz  progFAN2Tuesday 0
set Mythz  progFAN2Wednesday 0
set Mythz  progHC1Enable 0
set Mythz  progHC1EndTime 07:00
set Mythz  progHC1Friday 1
set Mythz  progHC1Monday 1
set Mythz  progHC1Saturday 0
set Mythz  progHC1StartTime 23:00
set Mythz  progHC1Sunday 0
set Mythz  progHC1Thursday 1
set Mythz  progHC1Tuesday 1
set Mythz  progHC1Wednesday 1
set Mythz  progHC2Enable 0
set Mythz  progHC2EndTime 08:00
set Mythz  progHC2Friday 0
set Mythz  progHC2Monday 0
set Mythz  progHC2Saturday 1
set Mythz  progHC2StartTime 00:00
set Mythz  progHC2Sunday 1
set Mythz  progHC2Thursday 0
set Mythz  progHC2Tuesday 0
set Mythz  progHC2Wednesday 0

All the below parameters have values that I do not understand/recognise (also from the log):
Zitat
set Mythz  programDHW_Fr_1 0A0A010064009600C8003C
set Mythz  programDHW_Mo-Fr_0 0A0A010064009600C8003C
set Mythz  programDHW_Mo-So_0 0A0A010064009600C8003C
set Mythz  programDHW_Sa-So_0 0A0A010064009600C8003C
set Mythz  programDHW_Sa_1 0A0A010064009600C8003C
set Mythz  programDHW_So_0 0A0A010064009600C8003C
set Mythz  programDHW_Tu_0 0A0A010064009600C8003C
set Mythz  programDHW_We_0 0A0A010064009600C8003C
set Mythz  programDHW_We_2 0A0A010064009600C8003C
set Mythz  programFan_Fr_0 0A0A010064009600C8003C
set Mythz  programFan_Fr_2 0A0A010064009600C8003C
set Mythz  programFan_Mo-Fr_2 0A0A010064009600C8003C
set Mythz  programFan_Mo-So_1 0A0A010064009600C8003C
set Mythz  programFan_Mo-So_2 0A0A010064009600C8003C
set Mythz  programFan_Mo_0 0A0A010064009600C8003C
set Mythz  programFan_Mo_2 0A0A010064009600C8003C
set Mythz  programFan_Sa-So_2 0A0A010064009600C8003C
set Mythz  programFan_Sa_2 0A0A010064009600C8003C
set Mythz  programFan_So_1 0A0A010064009600C8003C
set Mythz  programFan_Th_0 0A0A010064009600C8003C
set Mythz  programFan_Th_2 0A0A010064009600C8003C
set Mythz  programFan_Tu_1 0A0A010064009600C8003C
set Mythz  programFan_We_1 0A0A010064009600C8003C
set Mythz  programHC1_Fr_1 700B08FC02BC1F00000003206000
set Mythz  programHC1_Mo-Fr_0 700B08FC02BC1F00000003206000
set Mythz  programHC1_Mo-So_0 700B08FC02BC1F00000003206000
set Mythz  programHC1_Sa-So_0 700B08FC02BC1F00000003206000
set Mythz  programHC1_Sa_1 700B08FC02BC1F00000003206000
set Mythz  programHC1_So_0 700B08FC02BC1F00000003206000
set Mythz  programHC1_Th_1 700B08FC02BC1F00000003206000
set Mythz  programHC1_Tu_0 700B08FC02BC1F00000003206000
set Mythz  programHC1_We_2 700B08FC02BC1F00000003206000

set Mythz  programHC2_Fr_0 4E0C08FC02BC7F00
set Mythz  programHC2_Fr_2 4E0C08FC02BC7F00
set Mythz  programHC2_Mo-Fr_2 4E0C08FC02BC7F00
set Mythz  programHC2_Mo-So_1 4E0C08FC02BC7F00
set Mythz  programHC2_Mo-So_2 4E0C08FC02BC7F00
set Mythz  programHC2_Mo_2 4E0C08FC02BC7F00
set Mythz  programHC2_Sa-So_2 4E0C08FC02BC7F00
set Mythz  programHC2_Sa_2 4E0C08FC02BC7F00
set Mythz  programHC2_So_1 4E0C08FC02BC7F00
set Mythz  programHC2_Th_0 4E0C08FC02BC7F00
set Mythz  programHC2_Th_2 4E0C08FC02BC7F00
set Mythz  programHC2_Tu_1 4E0C08FC02BC7F00
set Mythz  programHC2_We_1 4E0C08FC02BC7F00


The value "4E0C08FC02BC7F00" appears for all HC2-related parameters. Remember that I have no HC2 (at least not to my knowledge), but only one "Heizkreis". Maybe that is the reason for these strange values? What should the behaviour be for parameters that are not applicable? Should the values be "n.a." or null/0/zero, or something else?

The value "700B08FC02BC1F00000003206000" appears for all HC1-related parameters, but I understand that I must have at least HC1 (one "Heizkreis"), right? Then why do all HC1-related values appear like this?

My suspection: If there is only one "Heizkreis" (heating circuit, HC), then the above shown parameters for HC1 and HC2 are not applicable and show values that do not make sense. Can somebody please confirm this or let me know how this is to be understood? Thank you so much!

PS:
Some HC1- and HC2-related values are ok, though, e.g. P13 through P20.
Viele Grüße/kind regards
sunrise
_________________
Tecalor THZ 303 (SOL, 2006/09-2008/08), FW 2.16 | FHEM THZ module testing with FW 2.06 (INTEGRAL, 2006/12-2008/08) & FW 2.14 (SOL, 2002/10-2004/08) on Raspberry Pi 2

willybauss

I added a complete set of readings from my firmware version 4.19. You'll see that at least a part of your mentioned issues exist here as well, e.g. the strange x36 reading. Reason is that during the reengineering work phase nobody had an idea what kind of property x36 may be, and even nobody missed a useful parameter what could be mapped to x36. Therefore nobody made efforts to interpret the reading in any way. So, if you really miss an important property you may try to find it inside the given readings or alternatively find out additional readings ... But it may be useless effort to try interpreting readings what hadn't been mapped to useful properties since years.


sBoostDHWTotal
362 kWh

sBoostHCTotal
2335 kWh

sControl
heatRequest: 5 heatRequest2: 5 hcStage: 0 dhwStage: 0 heatStageControlModul: 0 compBlockTime: 0 pasteurisationMode: 0 defrostEvaporator: 00 boosterStage2: 0 solarPump: 0 boosterStage1: 0 compressor: 0 heatPipeValve: 0 diverterValve: 0 dhwPump: 0 heatingCircuitPump: 0 mixerOpen: 0 mixerClosed: 0 sensorBits1: 00 sensorBits2: 01 boostBlockTimeAfterPumpStart: 0 boostBlockTimeAfterHD: 0

sDHW
dhwTemp: 45.9 outsideTemp: 18.4 dhwSetTemp: 41 compBlockTime: 0 out: 0004 heatBlockTime: 2775 dhwBoosterStage: 0 pasteurisationMode: 0 dhwOpMode: normal x36: CE70

sDisplay
switchingProg: 1 compressor: 0 heatingHC: 0 heatingDHW: 0 boosterHC: 0 filterBoth: 0 ventStage: 0 pumpHC: 0 defrost: 0 filterUp: 0 filterDown: 0 cooling: 0 service: 0

sElectrDHWDay
2632 Wh

sElectrDHWTotal
5870 kWh

sElectrHCDay
666 Wh

sElectrHCTotal
17623 kWh

sFan
inputFanSpeed: 24 outputFanSpeed: 23 pFanstageXAirflowInlet: 50 pFanstageXAirflowOutlet: 63 inputFanPower: 17 outputFanPower: 21

sFirmware
version: 04.19

sFirmware-Id
HW: 73 SW: 2.08 Date: MAR 9 2011

sGlobal
outsideTemp: 15.2 flowTemp: 25.9 returnTemp: 25 hotGasTemp: 49 dhwTemp: 45.5 flowTempHC2: -60 evaporatorTemp: 21.9 condenserTemp: 26.1 mixerOpen: 0 mixerClosed: 0 heatPipeValve: 0 diverterValve: 0 dhwPump: 0 heatingCircuitPump: 0 solarPump: 0 compressor: 0 boosterStage3: 0 boosterStage2: 0 boosterStage1: 0 highPressureSensor: 0 lowPressureSensor: 1 evaporatorIceMonitor: 0 signalAnode: 0 evuRelease: 1 ovenFireplace: 0 STB: 0 outputVentilatorPower: 21 inputVentilatorPower: 17 mainVentilatorPower: 0 outputVentilatorSpeed: 22 inputVentilatorSpeed: 24 mainVentilatorSpeed: 0 outside_tempFiltered: 15.2 relHumidity: 42 dewPoint: 0 P_Nd: 8.33 P_Hd: 11.59 actualPower_Qc: 0.000 actualPower_Pel: 0.000 collectorTemp: -60 insideTemp: 24.3 windowOpen: 0 quickAirVent: 0

sHC1
outsideTemp: 15.3 x08: -49.9 returnTemp: 25 integralHeat: 0 flowTemp: 26 heatSetTemp: 8 heatTemp: 25.3 seasonMode: summer integralSwitch: 250 hcOpMode: normal roomSetTemp: 23 x60: 0 x64: 563.2 insideTempRC: 23.9 x72: 0 x76: 2.2 onHysteresisNo: 0 offHysteresisNo: 1 hcBoosterStage: 0

sHC2
outsideTemp: 18.5 returnTemp: 24.8 vorlaufTemp: -60 heatSetTemp: 8 heatTemp: 24.8 stellgroesse: -100 seasonMode: summer hcOpMode: setback
2020-06-13 09:50:35
sHeatDHWDay
6086 Wh

sHeatDHWTotal
16939 kWh

sHeatHCDay
59 Wh

sHeatHCTotal
63787 kWh

sHeatRecoveredDay
1976 Wh

sHeatRecoveredTotal
17541 kWh

sHistory
compressorHeating: 14699 compressorCooling: 0 compressorDHW: 3813 boosterDHW: 31 boosterHeating: 562

sLast10errors
number_of_faults: 0 fault0CODE: n.a. fault0TIME: 00:00 fault0DATE: 00.00 fault1CODE: n.a. fault1TIME: 00:00 fault1DATE: 00.00 fault2CODE: n.a. fault2TIME: 00:00 fault2DATE: 00.00 fault3CODE: n.a. fault3TIME: 00:00 fault3DATE: 00.00

sSol
collectorTemp: -60 dhwTemp: 45.9 flowTemp: 25.3 edSolPump: 0 out: 0004 status: 11

sTimedate
Weekday: Saturday Hour: 9 Min: 52 Sec: 28 Date: 2020/6/13
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

immi

Hi  Willy
it is some time we have not done any reverse eng...... remember the good old days moving in the dark :)

Hi Sunrise
happy you start to have fun. Maybe also andre.k can give you a hint. He decoded most of 2.x untill now.

immi

sunrise

 Thank you so much! I will further look into this. However, i see no point in trying to find out about parameters that have been and still are unknown for such a long time, especially when I can find workarounds (primarily, I am interested and a more effective cooling and found the recent hints very promising, but the thread here is for the code, so I will stick to the topic ;)).

BTW, I had used the heatpump monitor from Robert Penz and remember - vaguely, though - also the reengineering. That was indeed very tough.
Viele Grüße/kind regards
sunrise
_________________
Tecalor THZ 303 (SOL, 2006/09-2008/08), FW 2.16 | FHEM THZ module testing with FW 2.06 (INTEGRAL, 2006/12-2008/08) & FW 2.14 (SOL, 2002/10-2004/08) on Raspberry Pi 2

andre.k

Hi sunrise

the parameter names like x08 are not reengineered. The names are placeholders. The number 08 is the position in the answer string returned from THZ
Zitatget sHC1:
Zitat

    outsideTemp: 21.2 x08: FF4D returnTemp: 30.2 integralHeat: 0 flowTemp: 31.7 heatSetTemp: 23.7 heatTemp: 30.6 seasonMode: summer integralSwitch: 100 hcOpMode: normal roomSetTemp: 1459.2 x60: 5.7 x64: 0000 insideTempRC: 0 x72: 0200 x76: 0000 onHysteresisNo: 0 offHysteresisNo: 1 hcBoosterStage: 0

The "x08: FF4D" looks strange here, as well as the "normal roomSetTemp: 1459.2" and following 3 parameters ("x64", "x72", and "x76"), at least I wonder about these parameters' names. Do they mean parameters P64, P72, and P76?

In your code for version 2.16 you should use the parsing for sHC1 like version 2.06


"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],     [" hcOpMode: ", 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]
         ],

sunrise

Thank you! Now I have lots of information and kind hints from all of you to try something and report back. Please bear with me, as it will take a few days.
Viele Grüße/kind regards
sunrise
_________________
Tecalor THZ 303 (SOL, 2006/09-2008/08), FW 2.16 | FHEM THZ module testing with FW 2.06 (INTEGRAL, 2006/12-2008/08) & FW 2.14 (SOL, 2002/10-2004/08) on Raspberry Pi 2

sunrise

I would like to use the nonblocking function because of my older system/firmware and lots of "too slow" messages in the log. I already set the baudrate both in /etc/ser2net.cfg and in fhem to 9600.

Zitat von: andre.k am 23 August 2017, 11:17:02
Das Feature wird über zwei Attribute im Modul THZ gesteuert:
1. Das Atrribut "nonblocking" schaltet das Feature ein/aus (1=ein, 0=aus). Standartmäßig, d.h, wenn das Attribut nicht vorhanden ist, ist das Feature ausgeschaltet. Man hat also dann das gewohnte Verhalten.
2. Das Attritut "simpleReadTimeout" legt die Zeit fest, die Maximal auf eine Antwort von der THZ geartet wird. Hier kann man den optimalen Wert ausprobieren. Je höher der Wert, desto weniger Fehlermeldungen sollten im Logfile erscheinen. Bei mir habe ich den Wert auf 8 sec. gesetzt. Hinweis: Die Wartezeit wir intern begrenzt, falls das nonblocking nicht auf 1 gesetzt wurde. Damit wird verhindert, dass THZ blockiert.
These 2 attributes do not seem to "stick" when the fhem service is restarted. Is this intended, or do I have some problem here?

Furthermore, I have a question about the below Perl warning inthe log: What is this about?
Zitat2020.06.19 13:01:57 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/00_THZ.pm line 982.
2020.06.19 13:01:57 3: opened||||||
2020.06.19 13:01:58 3: telnetForBlockingFn_1592564517: port 44375 opened
2020.06.19 13:01:58 3: [Mythz] THZ_GetRefresh(sGlobal) BlockingCall started
2020.06.19 13:01:58 3: Opening Mythz device /dev/ttyUSB0
2020.06.19 13:01:58 3: Setting Mythz serial parameters to 9600,8,N,1
2020.06.19 13:01:58 3: Mythz device opened
2020.06.19 13:01:58 3: Setting Mythz serial parameters to 9600,8,N,1
2020.06.19 13:01:58 1: /dev/ttyUSB0 reappeared (Mythz)

I use quote instead of code tags below, because with code tags I cannot highlight in 00_THZ.pm the line (982) in question:
Zitat
sub THZ_GetRefresh($) {
   my ($par)=@_;
   my $hash=$par->{hash};
   my $command=$par->{command};   
    my $name =$hash->{NAME};
   my $interval = AttrVal($name, ("interval_".$command), 0);
   if (AttrVal($name, "nonblocking" , "0")  =~ /1/ ) {
        if (!(exists($hash->{helper}{RUNNING_PID}))) {
            DevIo_CloseDev($hash);          #close device in parent process
            #$hash->{STATE}="disconnected";
            my $bctimeout = (AttrVal($name, "simpleReadTimeout", "0.5"))*2 +1;
            my $dev = $hash->{DeviceName};
            #$hash->{connection} =$hash->{STATE} ."||". $hash->{USBDev} ."||". $hash->{TCPDev} ."||". $hash->{conn} ."||". $hash->{FD} ."||". $selectlist{"$name.$dev"} ;
            $hash->{connection} =$hash->{STATE} ."||". $hash->{TCPDev} ."||". $hash->{FD} ."||". $selectlist{"$name.$dev"} ;
            Log3 $hash, 3,  $hash->{connection};
           
            $hash->{helper}{RUNNING_PID} = BlockingCall("THZ_GetNB", $name."|".$command, "THZ_GetNBDone", $bctimeout, "THZ_GetNBAbort", $hash);
            Log3 $hash, 3, "[$name] THZ_GetRefresh($command) BlockingCall started";
        }
        else {
            Log3 $hash, 3, "[$name] THZ_GetRefresh($command) rescheduled (Blocking Call is still running)";
            InternalTimer(gettimeofday() + 2, "THZ_GetRefresh", $par, 1);
            return;
        }
    }
    else {
      THZ_Get($hash, $hash->{NAME}, $command) if ($hash->{STATE} ne "disconnected");
    }
   
    if (($interval) and ($hash->{STATE} ne "disconnected")) {
           $interval = 60 if ($interval < 60); #do not allow intervall <60 sec
           InternalTimer(gettimeofday()+ $interval, "THZ_GetRefresh", $par, 1) ;
   }
    if ($command =~ "sFirmware") {  # model summary for statistics
        my $sFirmwareId = join('', (split(/ |:/, ReadingsVal($name,"sFirmware-Id"," : : : ")))[0..6]);
        my $sFirmware= (split(/ /, ReadingsVal($name,"sFirmware","  ")))[1];
        $hash->{model}= sprintf("%.5s%s%s", AttrVal($name,"firmware","n.a.")."______", $sFirmware, $sFirmwareId);
       }
   
    return;
}
Viele Grüße/kind regards
sunrise
_________________
Tecalor THZ 303 (SOL, 2006/09-2008/08), FW 2.16 | FHEM THZ module testing with FW 2.06 (INTEGRAL, 2006/12-2008/08) & FW 2.14 (SOL, 2002/10-2004/08) on Raspberry Pi 2