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: mwuerr am 14 Juli 2025, 23:46:17...
0C0613 for COOLING SYSTEM HC2
can you send me a test version?

sorry for the late reply
just add the line in a txt-editor like below, test it.
After you positive feedback, I can commit it to the repository
immi
my %sets539only =(
"p75passiveCooling"           => {cmd2=>"0A0575", argMin =>   "0",    argMax =>  "4",         type =>"1clean", unit =>""},  
"p99PumpRateHC"               => {cmd2=>"0A02CB", argMin =>   "0",    argMax =>  "100",       type =>"5temp",  unit =>" %"},
"p99PumpRateDHW"              => {cmd2=>"0A02CC", argMin =>   "0",    argMax =>  "100",       type =>"5temp",  unit =>" %"} ,
"p99CoolingHC1Switch"         => {cmd2=>"0B0287", argMin =>   "0",    argMax =>  "1",         type =>"1clean", unit =>""},
"p99CoolingHC1AreaFan"        => {cmd2=>"0B0613", argMin =>   "0",    argMax =>  "1",         type =>"1clean", unit =>""},

takoda

Hi Immi,
I'm having an issue with the values outputVentilatorPower and inputVentilatorPower in sGlobal. I have an LWZ 304 Trend with firmware 7.09. Both values are being reported as 6538.6, while mainVentilatorPower is showing plausible readings. I received a tip in the other Thread and tried experimenting a bit with the firmware attribute, but it didn't make any difference.

Do you have any other ideas?

Thanks in advance!

sGlobal
outsideTemp: 12.7 flowTemp: 31.5 returnTemp: 30 hotGasTemp: 36.9 dhwTemp: 48 flowTempHC2: -60
evaporatorTemp: 31.8 condenserTemp: 30.2 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: 0 evaporatorIceMonitor: 0
signalAnode: 0 evuRelease: 1 ovenFireplace: 1 STB: 0 outputVentilatorPower: 6538.6 inputVentilatorPower: 6538.6
mainVentilatorPower: 0 outputVentilatorSpeed: 26 inputVentilatorSpeed: 24 mainVentilatorSpeed: 0
outside_tempFiltered: 13.1 relHumidity: 0 dewPoint: 0 P_Nd: 8.41 P_Hd: 14.91 actualPower_Qc: 0.000
 actualPower_Pel: 0.000 collectorTemp: -60 insideTemp: -60 windowOpen: 0 quickAirVent: 0 flowRate: 0 p_HCw: 1.46 humidityAirOut: 35.92

immi

Zitat von: takoda am 24 September 2025, 22:16:47Hi Immi,
I'm having an issue with the values outputVentilatorPower and inputVentilatorPower in sGlobal. I have an LWZ 304 Trend with firmware 7.09. Both values are being reported as 6538.6, while mainVentilatorPower is showing plausible readings. I received a tip in the other Thread and tried experimenting a bit with the firmware attribute, but it didn't make any difference.
Do you have any other ideas?

Hi takoda

example of decoding
set attribute for thz "verbose 5", read sGlobal, you find in log the raw register, something like

2025.09.29 08:21:17.609 5: THZ_ReadAnswer: uc unpack: '01003EFBFDA8006A00EB00DB013D01DEFDA800F600CB00E3000011010E010E0000002500260000006600000000037503AC00000000000000001003'

look at position 50    --> 010E  -->  270 --> outputVentilatorPower: 27

which is interpreted as
   
outsideTemp: 10.7 flowTemp: 23.8 returnTemp: 21.9 hotGasTemp: 30.8 dhwTemp: 47.7 flowTempHC2: -60 evaporatorTemp: 20.5 condenserTemp: 22.8 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: 27 inputVentilatorPower: 27 mainVentilatorPower: 0 outputVentilatorSpeed: 37 inputVentilatorSpeed: 38 mainVentilatorSpeed: 0 outside_tempFiltered: 10.2 relHumidity: 0 dewPoint: 0 P_Nd: 8.98 P_Hd: 8.89 actualPower_Qc: 0.000 actualPower_Pel: 0.000 collectorTemp: -60 insideTemp: 24.7 windowOpen: 0 quickAirVent: 0


explanation
https://github.com/fhem/fhem-mirror/blob/master/fhem/FHEM/00_THZ.pm
if  you read in the code at about line 297, it is written what (outputVentilatorPower), where (position 50), and how to interprete the values (hex 4long to be divided by 10)

[" outputVentilatorPower: ",50, 4, "hex", 10],    [" inputVentilatorPower: ",54, 4, "hex", 10],    [" mainVentilatorPower: ",    58, 4, "hex", 10],

Solution
there are two possibilities for your finrmware: the position of the information you try to interprete is moved in the tecalor-register or the format (e.g. maybe you have to divide by 100 and not by 10)

please share the raw register for sGlobal and SFan; they should have similar fan values

b.r. immi

takoda

Hi immi, thanks for your response.

Here are the raw registers of sGlobal and sFan:

sGlobal:
2025.09.29 13:03:38 5: THZ_Get: Try to get 'sGlobal'
2025.09.29 13:03:38 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2025.09.29 13:03:38 5: Mythz sending 02
2025.09.29 13:03:38 5: DevIo_SimpleWrite Mythz: 02
2025.09.29 13:03:38 5: Mythz start Function THZ_ReadAnswer
2025.09.29 13:03:38 5: THZ_ReadAnswer: uc unpack: '10'
2025.09.29 13:03:38 5: Mythz sending 0100FCFB1003
2025.09.29 13:03:38 5: DevIo_SimpleWrite Mythz: 0100FCFB1003
2025.09.29 13:03:38 5: Mythz start Function THZ_ReadAnswer
2025.09.29 13:03:38 5: THZ_ReadAnswer: uc unpack: '10'
2025.09.29 13:03:38 5: Mythz start Function THZ_ReadAnswer
2025.09.29 13:03:38 5: THZ_ReadAnswer: uc unpack: '02'
2025.09.29 13:03:38 5: Mythz sending 10
2025.09.29 13:03:38 5: DevIo_SimpleWrite Mythz: 10
2025.09.29 13:03:38 5: Mythz start Function THZ_ReadAnswer
2025.09.29 13:03:38 5: THZ_ReadAnswer: uc unpack: '010001FBFDA800B000FC00F400E901B7FDA8FDA800E000F5000033FF6AFF6A0000001B001A000000AE00000000037404B20000000000000000000000900000000000F400F300E600D500E6000000000EC51003'
2025.09.29 13:03:38 5: Mythz sending 10
2025.09.29 13:03:38 5: DevIo_SimpleWrite Mythz: 10
2025.09.29 13:03:38 5: Parse message: 01FBFDA800B000FC00F400E901B7FDA8FDA800E000F5000033FF6AFF6A0000001B001A000000AE00000000037404B20000000000000000000000900000000000F400F300E600D500E6000000000EC5
2025.09.29 13:03:38 5: Message length: 158

sFan:
2025.09.29 13:06:29 5: THZ_Get: Try to get 'sFan'
2025.09.29 13:06:29 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2025.09.29 13:06:29 5: Mythz sending 02
2025.09.29 13:06:29 5: DevIo_SimpleWrite Mythz: 02
2025.09.29 13:06:29 5: Mythz start Function THZ_ReadAnswer
2025.09.29 13:06:29 5: THZ_ReadAnswer: uc unpack: '10'
2025.09.29 13:06:29 5: Mythz sending 0100E9E81003
2025.09.29 13:06:29 5: DevIo_SimpleWrite Mythz: 0100E9E81003
2025.09.29 13:06:29 5: Mythz start Function THZ_ReadAnswer
2025.09.29 13:06:29 5: THZ_ReadAnswer: uc unpack: '10'
2025.09.29 13:06:29 5: Mythz start Function THZ_ReadAnswer
2025.09.29 13:06:29 5: THZ_ReadAnswer: uc unpack: '02'
2025.09.29 13:06:29 5: Mythz sending 10
2025.09.29 13:06:29 5: DevIo_SimpleWrite Mythz: 10
2025.09.29 13:06:29 5: Mythz start Function THZ_ReadAnswer
2025.09.29 13:06:29 5: THZ_ReadAnswer: uc unpack: '010017E8000000000000000000000000000000000000000000000000000000191B008C008CF1F1001003'
2025.09.29 13:06:29 5: Mythz sending 10
2025.09.29 13:06:29 5: DevIo_SimpleWrite Mythz: 10
2025.09.29 13:06:29 5: Parse message: 17E8000000000000000000000000000000000000000000000000000000191B008C008CF1F100
2025.09.29 13:06:29 5: Message length: 76

Thank You!

immi

Zitat von: takoda am 29 September 2025, 13:43:42Hi immi, thanks for your response.
Here are the raw registers of sGlobal and sFan:

sGlobal:'010001FBFDA800B000FC00F400E901B7FDA8FDA800E000F5000033FF6AFF6A0000001B001A000000AE00000000037404B20000000000000000000000900000000000F400F300E600D500E6000000000EC51003'
sFan:'010017E8000000000000000000000000000000000000000000000000000000191B008C008CF1F1001003'


I do not know how to interprete FF6A and F1 and get the same number in base10.

can you please read on your physical tecalor display the value of outputVentilatorPower?
and at the same time, confirm the raw data of sFan and sGlobal ?

sunrise

Can someone confirm that for THZ firmware 2.06 / 02.16 the readings 
`hcOpMode` and `dhwOpMode` behave as follows?

- `hcOpMode`: switches between *normal* (day) and *setback* (night) according to the heating schedule (`pHeatProg`) 
- `dhwOpMode`: almost always stays at *normal*, even outside the DHW program (`pDHWProg`) 
- both may also show *standby*, *manual* or *holiday* in other situations 

Is this interpretation correct, or does someone see different behavior on newer firmware?
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

Lythie

Dear Immi,

I recently have set a stateformat in fhem for MyTHZ. I wanted it to appear nicely in overviews.

attr Mythz stateFormat Wärmepumpe Kompressor, Solar SolarPumpe, Modus dhwOpMode
After that I constantly got "closed connection" errors; after fhem-restart the first read request succeeded, all afterwards failee with that message.

2025.12.10 22:35:06 3: THZ_Get: Error msg2:  closed connection -- 0A1771 ->
2025.12.10 22:37:07 3: THZ_Get: Error msg2:  closed connection -- 0A0930 ->
2025.12.10 22:39:09 3: THZ_Get: Error msg2:  closed connection -- 0A1792 ->

Raising loglevel I saw a weired german text as "state" instead of the expected "opened". Here you see an example, first request succeeded, second one (and all subsequent ones) didn't.

2025.12.10 23:02:56 5: THZ_Get: Try to get 'p01RoomTempDayHC1'
2025.12.10 23:02:56 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2025.12.10 23:02:56 5: Mythz sending 02
2025.12.10 23:02:56 5: DevIo_SimpleWrite Mythz: 02
2025.12.10 23:02:56 5: Mythz start Function THZ_ReadAnswer
2025.12.10 23:02:56 5: THZ_ReadAnswer: uc unpack: '10'
2025.12.10 23:02:56 5: Mythz sending 0100110B00051003
2025.12.10 23:02:56 5: DevIo_SimpleWrite Mythz: 0100110B00051003
2025.12.10 23:02:56 5: Mythz start Function THZ_ReadAnswer
2025.12.10 23:02:56 5: THZ_ReadAnswer: uc unpack: '10'
2025.12.10 23:02:56 5: Mythz start Function THZ_ReadAnswer
2025.12.10 23:02:56 5: THZ_ReadAnswer: uc unpack: '02'
2025.12.10 23:02:56 5: Mythz sending 10
2025.12.10 23:02:56 5: DevIo_SimpleWrite Mythz: 10
2025.12.10 23:02:56 5: Mythz start Function THZ_ReadAnswer
2025.12.10 23:02:56 5: THZ_ReadAnswer: uc unpack: '01003E0B0005012C1003'
2025.12.10 23:02:56 5: Mythz sending 10
2025.12.10 23:02:56 5: DevIo_SimpleWrite Mythz: 10
2025.12.10 23:02:56 5: Parse message: 3E0B0005012C
2025.12.10 23:02:56 5: Message length: 12
2025.12.10 23:02:59 5: THZ_Get: Try to get 'p01RoomTempDayHC1'
2025.12.10 23:02:59 5: THZ_Get_Comunication: Check if port is open. State = '(Wärmepumpe 0, Solar 0, Modus normal)'
2025.12.10 23:02:59 3: THZ_Get: Error msg2:  closed connection -- 0B0005 ->

Apparently, the stateformat is not to be used for THZ as the code queries the formatted state, not the original state variable. Don't know if that can be changed. If not a documentation hint would be nice.

Best regards,
Lythie
Rasbpi 4 mit Originalnetzteil, fhem zur Heizungsanbindung, vzlogger für Stromzähler, httpmod für Tibber-Bridge, influxDB und Grafana, PV S/O mit 23kWp ÜE, THZ403Sol inkl. 2 Kollektoren, ohne Zirkulationspumpe, Bau aus 2011 als KfW70/EnEV2009 mit 255qm Fläche, Jahresheizwärmebedarf 12.500 kWh/a