FHEM Forum

FHEM - Anwendungen => Heizungssteuerung/Raumklima => Thema gestartet von: immi am 02 Februar 2015, 11:42:16

Titel: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 02 Februar 2015, 11:42:16
Dear all
In FHEM, the communication (logging and controlling) to THZ Tecalor (aka LWZ Stiebel Eltron) heatpump has been implemented.
Module 00_THZ.pm reached a good maturity level (now version 0.130), but remember: do not relay on it for critical applications.
It has been written for experienced users, with a deep understanding of the heatpump. Always think twice before writing back to the heatpump.

Please consider that no official documentation from Tecalor exists.  At the moment, by reverse engineering, 3 groups of heatpumps have been identified. The optional attribute "firmware" takes care of fixing the differences.

Please start with reading the wiki and the command_ref:
DE http://www.fhemwiki.de/wiki/Tecalor_THZ_W%C3%A4rmepumpe
EN http://www.fhemwiki.de/wiki/Tecalor_THZ_Heatpump
En/de http://fhem.de/commandref.html#THZ

Please use this thread, if you want to discuss about the module itself, bug-fixes, code improvements.
A second thread  THZ Tecalor (LWZ Stiebel Eltron) Wärmepumpe -Optimierung und Erfahrungsaustausch (http://forum.fhem.de/index.php/topic,33452.0.html.html) should be used for heatpump optimization and experience exchange.

Before posting please
1)   read the original thread with 1397 posts http://forum.fhem.de/index.php/topic,13132.1395.html
2)   keep FHEM updated: use the update command and restart fhem
3)   post in English as preferred language: your question will be probably better understood. German is also fine as second choice.

have fun
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 02 Februar 2015, 18:56:07
v.130 works great for me with a room temp probe. The operating point on the heating curve is now spot on! :) See screen shot. Thanks also for finding p99 "inside therm correction".
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 03 Februar 2015, 23:29:47
v 0.131 uploaded
changelog
- added p35PasteurisationInterval, p35PasteurisationTemp,   p34BoosterDHWTempAct, p99DHWmaxFlowTemp, p89DHWeco
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 04 Februar 2015, 11:31:17
Hi,

wie versprochen die Erweiterungen mit dem Display...



# Aufruf der Intervalle, hier werden benötigt
attr Mythz interval_sGlobal 300
attr Mythz interval_sHC1 300
attr Mythz interval_sFlowRate 300
attr Mythz interval_sDisplay 300

#userReadings  hier werden die Userreagings für das Display generiert

attr Mythz userReadings sD_outsideTemp {(split ' ',ReadingsVal("Mythz","sHC1",0))[1]}, sD_flowTemp {(split ' ',ReadingsVal("Mythz","sHC1",0))[9]}, sD_returnTemp {(split ' ',ReadingsVal("Mythz","sHC1",0))[5]}, sD_insideTempRC {(split ' ',ReadingsVal("Mythz","sHC1",0))[27]}, sD_sFlowRate {(split ' ',ReadingsVal("Mythz","sFlowRate",0))[0]}, sD_dhw_temp {(split ' ',ReadingsVal("Mythz","sDHW",0))[1]}, sD_switchingProg {(split ' ',ReadingsVal("Mythz","sDisplay",0))[1]}, sD_compressor {(split ' ',ReadingsVal("Mythz","sDisplay",0))[3]}, sD_heatingHC {(split ' ',ReadingsVal("Mythz","sDisplay",0))[5]}, sD_heatingDHW {(split ' ',ReadingsVal("Mythz","sDisplay",0))[7]}, sD_boosterHC {(split ' ',ReadingsVal("Mythz","sDisplay",0))[9]}, sD_filterBoth {(split ' ',ReadingsVal("Mythz","sDisplay",0))[11]}, sD_ventStage {(split ' ',ReadingsVal("Mythz","sDisplay",0))[13]}, sD_pumpHC {(split ' ',ReadingsVal("Mythz","sDisplay",0))[15]}, sD_defrost {(split ' ',ReadingsVal("Mythz","sDisplay",0))[17]}, sD_filterUp {(split ' ',ReadingsVal("Mythz","sDisplay",0))[19]}, sD_filterDown {(split ' ',ReadingsVal("Mythz","sDisplay",0))[21]}

#### Status Symbole des Displays werden generiert

define rg_thz_stat readingsGroup \
Mythz:<Schaltprogramm>,sD_switchingProg \
Mythz:<Verdichter>,sD_compressor \
Mythz:<Heizen>,sD_heatingHC \
Mythz:<Warmwasserbereitung>,sD_heatingDHW \
Mythz:<Elektrische_Nachheizstufen>,sD_boosterHC \
Mythz:<Heizkreispumpe>,sD_pumpHC \
Mythz:<Abtauen_Verdampfer>,sD_defrost \
Mythz:<Lüfterstufe>,sD_ventStage \
Mythz:<Filter_oben>,sD_filterUp \
Mythz:<Filter_unten>,sD_filterDown \
Mythz:<Filterwechsel_ou>,sD_filterBoth

#Attribute für Status

attr rg_thz_stat alias Status
attr rg_thz_stat group THZ
attr rg_thz_stat room Sysintern
attr rg_thz_stat nonames 1

# Zuweisung der readings in Verbindung mit Symbolen

attr rg_thz_stat valueIcon {'sD_switchingProg.1'=>'hourglass@blue','sD_switchingProg.0'=>'hourglass', 'sD_compressor.1'=>'sani_garden_pump@blue','sD_compressor.0'=>'sani_garden_pump', 'sD_heatingHC.1'=>'sani_floor_heating_neutral@blue','sD_heatingHC.0'=>'sani_floor_heating_neutral', 'sD_heatingDHW.1'=>'sani_domestic_waterworks@blue','sD_heatingDHW.0'=>'sani_domestic_waterworks', 'sD_boosterHC.1'=>'sani_heating_boost@red','sD_boosterHC.0'=>'sani_heating_boost', 'sD_pumpHC.1'=>'sani_pump@blue','sD_pumpHC.0'=>'sani_pump', 'sD_defrost.1'=>'weather_frost@blue','sD_defrost.0'=>'weather_frost', 'sD_ventStage.1'=>'vent_ventilation_level_3@blue','sD_ventStage.0'=>'vent_ventilation', 'sD_filterUp.1'=>'vent_ventilation_level_manual_m@red','sD_filterUp.0'=>'vent_ventilation_level_automatic', 'sD_filterDown.1'=>'vent_ventilation_level_manual_m@red','sD_filterDown.0'=>'vent_ventilation_level_automatic', 'sD_filterBoth.1'=>'vent_ventilation_level_manual_m@red','sD_filterBoth.0'=>'vent_ventilation_level_automatic'}

# Anzeige der Prozesswerte aus den userreadings von oben

define rg_thz readingsGroup \
Mythz:<%temp_outside>,<Aussentemperatur>,sD_outsideTemp \
Mythz:<%temp_inside>,<Innentemperatur>,sD_insideTempRC \
Mythz:<%sani_supply_temp@red>,<Vorlauf>,sD_flowTemp \
Mythz:<%sani_return_temp@blue>,<Rücklauf>,sD_returnTemp \
Mythz:<%sani_pump>,<Durchfluss>,sD_sFlowRate \
Mythz:<%sani_boiler_temp@BD7800>,<Wassertemperatur>,sD_dhw_temp

# Attribute der Prozesswerte

attr rg_thz alias Prozesswerte
attr rg_thz group THZ
attr rg_thz room Sysintern

# Formatierung der Prozesswerte

attr rg_thz valueFormat { sD_outsideTemp => '%.1f °C', sD_insideTempRC => '%.1f °C', sD_flowTemp => '%.1f °C', sD_returnTemp => '%.1f °C', sD_sFlowRate => '%.1f cl/min', sD_dhw_temp => '%.1f °C' }



Ist jetzt die erste Version ist so ein eine Mischung aus Andre.k bzw dem Anzeigen der Prozesswerte aus dem Wiki.

Ich finde es ganz praktisch weil man alles wesentliche auf einem Blick hat.

LG

Belu
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 04 Februar 2015, 16:05:53
Hi Belu, Hi Andre.k
I like both solution a lot.
But, I do not want to update sDisplay too often (e.g. each 30 sec)
What I miss is, an automatic way to update sDisplay before the webpage is generated.
Untill we find it, it makes sense to add a button "refresh"
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 05 Februar 2015, 09:19:28
@Immi,

ich finde ja das du recht hast, das mit den Intervallen nimmt überhand. Da sollten wir zusammenlegen bzw die Daten reduzieren. meinen sD_ Userreadings. Man benötigt sie nur wenn man schaut, wenn ich den HTTP aufruf mache. soll heißen wenn ich mich in FHEM einloggen kann er gern alle 30 Sekunden einen refresh machen, aber nur dann. In der ganzen Zeit wo ich nicht auf FHEM zugreife sollten die Daten auch nicht wirklich regestriert werden.

Hast du eine Idee wie man das umsetzt?
Aktuell ist es ja so das er nur ein Logeintrag schreibt aus den userreadings wenn wirklich eine Statusänderung des Wertes erfolgt, habe mir die Log genau angeschaut.

Was mir noch aufgefallen ist, es sind ja einige Readings Doppelt die auch geloggt werden.

sHC1 und sGlobal z.b

2015-02-05_08:54:24 Mythz sGlobal: outsideTemp: -5.7 flowTemp: 24.6 returnTemp: 23 hotGasTemp: 29.8 dhwTemp: 46.3 flowTempHC2: -60 evaporatorTemp: 5.3 condenserTemp: 23.5 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: 31 inputVentilatorPower: 30 mainVentilatorPower: 0 outputVentilatorSpeed: 29 inputVentilatorSpeed: 22 mainVentilatorSpeed: 0 outside_tempFiltered: -6.9 relHumidity: 0 dewPoint: 0 P_Nd: 5.33 P_Hd: 10.28 actualPower_Qc: 0.000 actualPower_Pel: 0.000 collectorTemp: -60 insideTemp: 26

2015-02-05_08:55:19 Mythz sHC1: outsideTemp: -5.7 x08: -32.5 returnTemp: 23 integralHeat: -4 flowTemp: 24.6 heatSetTemp: 26 heatTemp: 23.4 seasonMode: winter integralSwitch: 100 opMode: normal roomSetTemp: 20 x60: 0 x64: 691.2 insideTempRC: 22.7 x72: 0 x76: 2.7

outsideTemp returnTemp flowTemp das sind ja werte die wirklich doppelt sind und nicht notwendig.

Die sGlobal z.b wird ja alle 5 Minuten komplett geschrieben. Es gibt werte die werden immer mit geschrieben. Könnte man da nicht so ne Änderung einbringen das nur geschrieben wird was sich geändert hat.
Dadurch würde sich die Datenlast direkt um 50 % reduzieren. bei sDiyplay hätten wir vielleicht 50 Logeinträge pro Tage, bei sGlobal wären es auch sicherlich wesentlich weniger.


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 05 Februar 2015, 12:45:28
Zitat von: belu am 05 Februar 2015, 09:19:28
Könnte man da nicht so ne Änderung einbringen das nur geschrieben wird was sich geändert hat.
sGlobal (as well as the other multi-data readings) always needs to have same sequence of data (sort order, number of values). Otherwise you wouldn't be able to create gplots or data extraction for other purposes; all data extractions rely on index number inside the data string.

For limiting the readings when no web UI is open you could do it similarly as my photovoltaik logging solution:

+*{sunrise_rel("REAL",-3600)} set PV_Zaehler INTERVAL 300
+*{sunset_rel("REAL",+1800)} set PV_Zaehler INTERVAL 3600

Just the triggers need to be replaced by something like "web UI open/closed". But this sounds easier that it might be ...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 05 Februar 2015, 21:56:09
Zitat von: belu am 05 Februar 2015, 09:19:28
Hast du eine Idee wie man das umsetzt?
no. I am still searcing for the perfect setting. My actual setting is

attr Mythz event-min-interval s.*:4800
attr Mythz event-on-change-reading .*

This means log only what changes. If something starting with "s" does not change for 80 min log it anyhow.
This does not influence sGlobal and sHC1, which are changing very often because contain many parameters.
Solution split sGlobal and sHC1 and log on change.
This is not elegant, therefore I do not do it :)
------------------
sDisplay doesn´t need to be logged at all--> easy
complex part (at least for me) is to update it only before the webpage is built
------------------
p.s. I like the elegant solution from Willy "changing the refresh interval depending on the time during the date", which I will use for another device.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 06 Februar 2015, 00:27:12
Also meine Raspberry Pi 2 ist heute gekommen. Das wirklich ein Unterschied... Das ist erstmal die bessere Lösung :D
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 06 Februar 2015, 13:10:43
Zitat von: belu am 06 Februar 2015, 00:27:12
Also meine Raspberry Pi 2 ist heute gekommen. Das wirklich ein Unterschied... Das ist erstmal die bessere Lösung :D

meiner sollte heute ankommen :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 06 Februar 2015, 16:39:50
So lange meiner bei 2 - 3% CPU-Auslastung rum dümpelt sehe ich keinen Grund zum Raspi2, es sei denn die Zugriffszeiten auf die Filelogs, die im Filesystem meines NAS ausgelagert sind (NFS-mount) werden dramatisch besser.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 06 Februar 2015, 17:00:11
I installed a internal temp sensor last week-end;  The NXP KTY81 component has a terrible off-set of -5k :)

Now I am trying to understand the data delivered by the new parameter sHC1->insideTempRC
something is wrong if you look at following plot

In red you find the actual temp of a reliable sensor 1 meter away.
In brown you find the actual temp of the NXP-KTY81 (sHC1->insideTempRC)
In lila you find the flow temperature.

What you see is that when the compressor starts and the flow temperature increases, the NXP-KTY81 suddently decreases.
This makes no sense to me now, maybe you have an explanation or maybe you have the same behaviour.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: toggle am 06 Februar 2015, 19:07:26
Are you sure that this is the intended use of insideTempRC? According to the feedback I think that this parameter is only valid if you have a remote control. In my heat pump the returned value is always 21. Shouldn't the additional temp sensor be displayed in sGlobal->roomTemp?

If the analog circuit for the temp sensor is not stabilzed properly any spikes etc. could influence the A/D converter.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 06 Februar 2015, 20:20:21
Zitat von: toggle am 06 Februar 2015, 19:07:26
Are you sure that this is the intended use of insideTempRC? According to the feedback I think that this parameter is only valid if you have a remote control. In my heat pump the returned value is always 21. Shouldn't the additional temp sensor be displayed in sGlobal->roomTemp?

If the analog circuit for the temp sensor is not stabilzed properly any spikes etc. could influence the A/D converter.
before installing the kty81 
sGlobal->roomTemp was -60C and sHC1->insideTempRC was always set-temp

after installing it,
sGlobal->roomTemp is the measured temperature and sHC1->insideTempRC is roomtemp plus p99RoomThermCorrection

what you mean by stabilizing? you mean shielding the cable? 
from the my measurements I should have spikes (pulses) which are 25 min long
strange
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: toggle am 06 Februar 2015, 20:24:23
Zitat von: immi am 06 Februar 2015, 20:20:21
what you mean by stabilizing? you mean shielding the cable? 
No, I meant the hardware implementation of the A/D part on the main board.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 06 Februar 2015, 21:03:52
Zitat von: immi am 06 Februar 2015, 17:00:11
I installed a internal temp sensor last week-end;  The NXP KTY81 component has a terrible off-set of -5k
I do not yet understand completely. Did you connect the sensor to X5 panel, pin 5 and 6, labeled as "Raumfühler" ?
If yes: the temperature of this sensor is shown as sGlobal.insideTemp in the data log.

The value sHC1.insideTempRC has nothing to do with this sensor. sHC1.insideTempRC is the value which is read from an external display. If you read out sHC1.insideTempRC values while not having an external display installed I don't believe that you get valid values.

edit:
I added a plot showing both values. The vertical difference is the offset of the sensor; it can be corrected using a userReading. The delay of the red curve is due to the fact that the external sensor ( sGlobal.insideTemp) is mounted inside a wall which causes delayed and equalized values.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 06 Februar 2015, 21:21:04
Zitat von: willybauss am 06 Februar 2015, 21:03:52
I do not yet understand completely. Did you connect the sensor to X5 panel, pin 5 and 6, labeled as "Raumfühler" ?
If yes: the temperature of this sensor is shown as sGlobal.insideTemp in the data log.
correct
Zitat
The value sHC1.insideTempRC has nothing to do with this sensor. sHC1.insideTempRC is the value which is read from an external display. If you read out sHC1.insideTempRC values while not having an external display installed I don't believe that you get valid values.
not true in my system
sHC1.insideTempRC = sGlobal.insideTemp  + p99RoomThermCorrection

This is not my problem. My problem why sGlobal.insideTemp (or its offset sHC1.insideTempRC) goes down each time the compressor goes on

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 06 Februar 2015, 21:34:59
ok, now I understand. Where is the sensor located? Close to a hose having flow temperature? You should retest while having both sensors ( brown and red curve) VERY close together.

Is the cable a twisted pair type, not routed in parallel to the compressor's power cable?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 06 Februar 2015, 21:43:06
Another topic:
Can anyone imagine the meaning of the x08 value (sHC1.x08) ? There is a FW bug inside the THZ which is obviously related to this value. The bug is, that sometimes the HC1 pump stays on, even after heating cycle has ended, see screen shot.

The endlessly working pump causes a very fast increase of integral value, causing the compressor to start up again very soon.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 06 Februar 2015, 21:53:51
>>You should retest while having both sensors ( brown and red curve) VERY close together.
not possible; the KTY81 is in the wall and the good one is outside..... no pipes near both.

Zitat von: willybauss am 06 Februar 2015, 21:34:59
Is the cable a twisted pair type, not routed in parallel to the compressor's power cable?
willy
I hope you are right with crosstalk, which could  cause sGlobal.insideTemp to go down each time the compressor runs.
I try to move the cable now. It is in the same hole as the power supply of the heatpump.

>>You should retest while having both sensors ( brown and red curve) VERY close together.
not possible; the KTY81 is in the wall and the good one is outside..... no pipes near both.
Without the compressor running, they show very similar values.

p.s. I will have a look to x08 as soon as I understand my issue.
you know only woman can multitask :)
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 07 Februar 2015, 00:28:15
ZitatI try to move the cable now. It is in the same hole as the power supply of the heatpump.

I would think this could be the issue, the induction of the power cable could cause this. Try to move the sensor cable away from there. Just let it hang outside for test purposes.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 07 Februar 2015, 08:56:53
Zitat von: houseowner123 am 07 Februar 2015, 00:28:15
I would think this could be the issue, the induction of the power cable could cause this. Try to move the sensor cable away from there. Just let it hang outside for test purposes.
That's the reason why I asked for twisted pair cable. Mine lays in parallel to all the other THZ cables in a cable duct for >4 meters, but without any trouble.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 07 Februar 2015, 11:35:54
Hi,


here is the link to the new thread  THZ Tecalor (LWZ Stiebel Eltron) Wärmepumpe -Optimierung und Erfahrungsaustausch (http://forum.fhem.de/index.php?topic=33452.0.html).

immi:
Please add the link to the initial contribution of this thread as well as to the last contribution in the initial thread.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 07 Februar 2015, 11:38:15
attr Mythz event-min-interval s.*:4800
attr Mythz event-on-change-reading .*


does not work for me at all. I have zero recordings from the night! :(
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 07 Februar 2015, 18:12:43
immi: regarding the heating curve I noted that the ordinate scale is quite large ranging from 10...50°C for HC temp. It is the mixture of flow and return and I think that max. should be 35°C, so that the curve is more noticeable. Do you think that is possible? I cannot change the settings myself for it.
Heating point is off the curve because the oven is on.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 07 Februar 2015, 22:00:10
@immi
regarding to your sHC1.insideTempRC topic: today I unplugged the external display for a few hours to watch how the values behave in this case. Unplugging (approx. 9:00 am) doesn't matter at all. But reconnect at 8:25pm shows a surprising behavior. The value dropped by 1.8K, which is almost exactly the same as the offest correction value of the external display (1.7k). Hopefully this can help you in any way to solve your issue.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 08 Februar 2015, 12:09:58
Hallo alle zusammen,

vielen Dank nochmals an alle Experten hier. Mein FHEM-Monitoring läuft mittlerweile super stabil und ich bekomme auf einer Seite den Überblick über alle wichtigen Werte (siehe Anhang).
Was mir noch fehlt ist die Änderung der Parameter meiner LWZ303i (Firmware 2.06) über FHEM. Wir waren z.B. Anfang des Jahres für eine Woche im Urlaub. Mein Ziel in so einem Zeitraum wäre z.B., dass ich den Sollwert der WW-Bereitung herunterstelle und am letzten Urlaubstag per Internet diesen Sollwert wieder zurückstelle. Meine Frage an Immi wäre, ob es möglich ist für die Firmware 2.06 wenigstens die Parameter "p01-p12" änderbar zu machen?

freundliche Grüße
Peter
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 08 Februar 2015, 12:18:55
today I came across an old posting of last year
ZitatOpMode implemented readonly ("1" =>"Standby", "11" => "Automatic", "3" =>"DAYmode", "4" =>"SetBack", "5" =>"DHWmode", "14" =>"Manual", "0" =>"Emergency")
It looks like there's a bug in the implementation: FHEM always reports "setback" while in fact the THZ works in automatic mode.

@immi
Could you please have a look into the code?

Thanks
Willy
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 08 Februar 2015, 12:51:55
Zitat von: peter456 am 08 Februar 2015, 12:09:58
Hallo alle zusammen,

vielen Dank nochmals an alle Experten hier. Mein FHEM-Monitoring läuft mittlerweile super stabil und ich bekomme auf einer Seite den Überblick über alle wichtigen Werte (siehe Anhang).
Was mir noch fehlt ist die Änderung der Parameter meiner LWZ303i (Firmware 2.06) über FHEM. Wir waren z.B. Anfang des Jahres für eine Woche im Urlaub. Mein Ziel in so einem Zeitraum wäre z.B., dass ich den Sollwert der WW-Bereitung herunterstelle und am letzten Urlaubstag per Internet diesen Sollwert wieder zurückstelle. Meine Frage an Immi wäre, ob es möglich ist für die Firmware 2.06 wenigstens die Parameter "p01-p12" änderbar zu machen?

freundliche Grüße
Peter

Hi Peter,

I'm about to implement an update for the subroutine THZ_Set. There is a significant difference between the 2.x Firmware and the later versions. In version 2.x a single  parameter value has to be written in groups of parameters. For example if you want to change P01 you have to write all parameter from P01 to P12 to the THZ. All parameters from 01 to 12 will be written with the same command 0x17.
So I'm on the way.

@Immi: What do you think about using sliders and list boxes for validation of set values:
"p01RoomTempDay:slider,10,0.1,30,1"
or
"p07FanStageDay:0,1,2,3"


This could increase the usability for gui users a little bit.
Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 08 Februar 2015, 14:10:56
Zitat von: willybauss am 08 Februar 2015, 12:18:55
today I came across an old posting of last yearIt looks like there's a bug in the implementation: FHEM always reports "setback" while in fact the THZ works in automatic mode.

@immi
Could you please have a look into the code?

Thanks
Willy

I can confirm this! Seems like a bug.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 08 Februar 2015, 15:22:34
Zitat von: houseowner123 am 08 Februar 2015, 14:10:56
today I came across an old posting of last yearIt looks like there's a bug in the implementation: FHEM always reports "setback" while in fact the THZ works in automatic mode.
I can confirm this! Seems like a bug.

maybe we look at different places, therefore please be more specific.
pOpMode supports DAYmode DHWmode automatic emergency manual setback standby
My pOpMode is in automatic: this means HC1 will switch between normal(daymode) and setback according to programHC1xxx

2015-02-08_06:02:20 Mythz sHC1: outsideTemp: -0.1 x08: 0.3 returnTemp: 27.4 integralHeat: 2 flowTemp: 27.7 heatSetTemp: 28.3 heatTemp: 27.4 seasonMode: winter integralSwitch: 101 opMode: setback roomSetTemp: 21.9 x60: 0 x64: 563.2 insideTempRC: 22.8 x72: 0.1 x76: 2255
2015-02-08_14:58:55 Mythz sHC1: outsideTemp: 5.3 x08: -13.7 returnTemp: 25 integralHeat: -3 flowTemp: 25.5 heatSetTemp: 27.3 heatTemp: 25.1 seasonMode: winter integralSwitch: 101 opMode: normal roomSetTemp: 22 x60: 0 x64: 563.2 insideTempRC: 22.7 x72: 0.1 x76: 1333.4
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 08 Februar 2015, 15:53:57
Zitat von: andre.k am 08 Februar 2015, 12:51:55
@Immi: What do you think about using sliders and list boxes for validation of set values:
"p01RoomTempDay:slider,10,0.1,30,1"
or
"p07FanStageDay:0,1,2,3"

This could increase the usability for gui users a little bit.
Andre
Hi Andre
I tried list and slider last year, but on some browser (android) was not working fine.
In 12 monthes, the frontend improved a lot!!... maybe now all issues are gone.
Could you show me just for  "p07FanStageDay:0,1,2,3" show would you like to implement?
---------------------------

How do I validate the parameter before writing? easy I check the interval and I round the data.
set Mythz p99FanStageParty 1.7 will set a 1
set Mythz p99FanStageParty 4.7 will give an error with the allowed intervall

Concernig writing to old heatpump, you have the complexity of seveal parameter in one register.
I think the user should not be able to change more than one parameter in one register at the time.
I was thinking to the following:
1) split all register during reading in single parameters
2) for writing "set Mythz p13GradientHC1 0.3", you know that p13GradientHC1 is in register 05. You read it again completely and overwrite only the bytes involved

I started 2) some weeks ago, at line 614 there is also a reminder on what should be done.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 08 Februar 2015, 16:05:55
this is what I found during this weekend:

the heatpumps has 4 modi concerning room temperute:
1) room_thermometer not connected and room_display not connected
sGlobal.insideTemp =-60
sHC1.insideTempRC = sHC1.roomSetTemp

2) room_thermometer connected to KTY81 and room_display not connected
sGlobal.insideTemp = resistance between X5-pin5 and X5-pin6 (conversion table of a NXP-KTY81)
sHC1.insideTempRC = sGlobal.insideTemp  + p99RoomThermCorrection

3) room_thermometer not connected  and room_display connected (hypothesis)
sGlobal.insideTemp = -60
sHC1.insideTempRC = room_display remperature

4) room_thermometer connected to KTY81 and room_display connected (hypothesis)
sGlobal.insideTemp = resistance between X5-pin5 and X5-pin6 (conversion table of a NXP-KTY81)
sHC1.insideTempRC = room_display remperature

I cannot reproduce 3 and 4 because I do not have a second display...  someone else has to confirm (connect something //press reset button // wait 3 min. // confirm or write new theory)

some more information of the X5-pin5 and X5-pin6:
open 5V
short 2.5mA
with KTY81 1.1mA and 2.4V
Do not use long cables; do not use twisted cable; do not roll the cable if longer than necessary; move the cable as far as possible from the current supply.
I am still not 100% happy.. but  I see some improvements after following te above simple rules.
I do not have an oscilloscope or a freqanalyzer at home for digging deeper :( 
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 08 Februar 2015, 16:12:31
Zitat von: immi am 08 Februar 2015, 15:22:34
maybe we look at different places, therefore please be more specific.
You're completely right. I just looked in the frequent readings sHC1 and sGlobal, but not in pOpMode. Since I don't use any time programs it's obvious that setback never changes to normal.

Please take it as a user error and rate me one step down in next user ranking  ;) .
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 08 Februar 2015, 16:53:55
Zitat von: immi am 08 Februar 2015, 15:53:57
Hi Andre
I tried list and slider last year, but on some browser (android) was not working fine.
In 12 monthes, the frontend improved a lot!!... maybe now all issues are gone.
Could you show me just for  "p07FanStageDay:0,1,2,3" show would you like to implement?
---------------------------

How do I validate the parameter before writing? easy I check the interval and I round the data.
set Mythz p99FanStageParty 1.7 will set a 1
set Mythz p99FanStageParty 4.7 will give an error with the allowed intervall

Concernig writing to old heatpump, you have the complexity of seveal parameter in one register.
I think the user should not be able to change more than one parameter in one register at the time.
I was thinking to the following:
1) split all register during reading in single parameters
2) for writing "set Mythz p13GradientHC1 0.3", you know that p13GradientHC1 is in register 05. You read it again completely and overwrite only the bytes involved

I started 2) some weeks ago, at line 614 there is also a reminder on what should be done.
immi

Hi immi,

here my ideas. First the definition of the set parameter. We need some additional infos concerning the position and the length of the parameter similar to the parsing elements.
my %sets206 = (
    "p01RoomTempDay" => {cmd2=>"17", argMin =>  "10", argMax =>   "30", pos=>[4, 4, "hex", 10], unit =>" °C"},
    "p02RoomTempNight" => {cmd2=>"17", argMin =>  "10", argMax =>   "30", pos=>[8, 4, "hex", 10], unit =>" °C"},
    "p03RoomTempStandby" => {cmd2=>"17", argMin =>  "10", argMax =>   "30", pos=>[12, 4, "hex", 10],  unit =>" °C"},
    "p04DHWsetDayTemp" => {cmd2=>"17", argMin =>  "10", argMax =>   "55", pos=>[16, 4, "hex", 10],  unit =>" °C"},
    "p05DHWsetNightTemp" => {cmd2=>"17", argMin =>  "10", argMax =>   "55", pos=>[20, 4, "hex", 10],  unit =>" °C"},
    "p06DHWsetStandbyTemp" => {cmd2=>"17", argMin =>  "10", argMax =>   "55", pos=>[24, 4, "hex", 10],  unit =>" °C"},
    "p07FanStageDay" => {cmd2=>"17", argMin =>   "0", argMax =>    "3", pos=>[28, 2, "hex", 1],  unit =>""},
    "p08FanStageNight" => {cmd2=>"17", argMin =>   "0", argMax =>    "3", pos=>[30, 2, "hex", 1],  unit =>""},
    "p09FanStageStandby" => {cmd2=>"17", argMin =>   "0", argMax =>    "3", pos=>[32, 2, "hex", 1],  unit =>""},
    "p10RoomTempManual" => {cmd2=>"17", argMin =>  "10", argMax =>   "65", pos=>[34, 4, "hex", 10],  unit =>" °C"},
    "p11DHWSetTempManual" => {cmd2=>"17", argMin =>  "10", argMax =>   "65", pos=>[38, 4, "hex", 10],  unit =>" °C"},
    "p12FANStageManual" => {cmd2=>"17", argMin =>  "0", argMax =>   "3", pos=>[42, 2, "hex", 1],  unit =>""}
);

In the moment I didn't use the sliders. This would be just for convenience and we can add this later. I think we need your check of min/max anyway, because I'm not shure if the slider and listbox definition is only used in the the browser gui or always.
Next the addition I already tested für the THZ_Set(). Inserted after your test for min/max.
#handle write back for old firmware if the attribute 206 is set.
  if((AttrVal($hash->{NAME}, "firmware" , "4.39") eq "2.06")) {

my $pos = $cmdhash->{pos}[0];
my $len = $cmdhash->{pos}[1];
my $dec = $cmdhash->{pos}[3];
my $subst;
Log3 $hash->{NAME}, 3, "write register/pos/arg to THZ: '$cmdHex2/$pos/$arg'";

#read before write the register
$cmdHex2=THZ_encodecommand($cmdHex2, "get");
($err, $msg) = THZ_Get_Comunication($hash,  $cmdHex2);
if (defined($err))     {
Log3 $hash->{NAME}, 5, "THZ_Set: error read register: '$err'";
return ($msg ."\n msg " . $err);
}
Log3 $hash->{NAME}, 3, "answer from THZ: $msg";
$arg *= $dec; #shift the decimal point
if ($len eq "4") {
$subst = sprintf("%04X",$arg);
}
elsif ($len eq "2"){
$subst = sprintf("%02X",$arg);
}
substr($msg, $pos, $len, $subst); # substitute the parameter in the message payload
Log3 $hash->{NAME}, 3, "write to    THZ: $msg";

# write the message to THZ
substr($msg, 0, 2, ""); #remove the checksum from the head of the payload
$cmdHex2=THZ_encodecommand($msg, "set");
($err, $msg) = THZ_Get_Comunication($hash, $cmdHex2);
Log3 $hash->{NAME}, 3, "written     THZ: $msg";
if (defined($err))     {
Log3 $hash->{NAME}, 5, "THZ_Set: error write register: '$err'";
return ($msg ."\n msg " . $err);
}
return $msg;
  } #end 2.06 handling

With these modification I can already set parameter. I still need to modify the THZ_Get() and the THZ_Parse1() to handle single values from multiple value register. I have the following idea:
1) We intruduce an 3rd parameter in THZ_Parse1() with the $cmdhash->{pos}
$msg2 = THZ_Parse1($hash,$msg2,$cmdhash->{pos});
2) If this parameter is defined we use the parsing information from $cmdhash->{pos}
3) If not, the parsing information is searched based on the type of command (the current approach).
What do you think?

Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 08 Februar 2015, 17:07:28
Zitat von: andre.k am 08 Februar 2015, 12:51:55
Hi Peter,

I'm about to implement an update for the subroutine THZ_Set. There is a significant difference between the 2.x Firmware and the later versions. In version 2.x a single  parameter value has to be written in groups of parameters. For example if you want to change P01 you have to write all parameter from P01 to P12 to the THZ. All parameters from 01 to 12 will be written with the same command 0x17.
So I'm on the way.

Alles klar immi. Sage bescheid wenn ich was testen soll.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 08 Februar 2015, 17:13:44
Zitat von: peter456 am 08 Februar 2015, 17:07:28
Alles klar immi. Sage bescheid wenn ich was testen soll.

Wir melden uns.
Hattest Du Dir eigentlich die anderen Parameter größer als P12 schon mal angesehen? Stimmen die Readings mit denen in Deiner THZ überein?
Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 08 Februar 2015, 17:44:39
Hi Andre
>>In the moment I didn't use the sliders.
good idea; let us think later on frontend.
----------------
your %sets206 is fine for me
writing will not be a big problem; just some small changes in your code.
----------------
the reading change has a big impact.
if we let people read all %sets206, the initialization at the fhem start will take very very long (especially at 9600):
You read 12 times register "17" because each time you purge 85% of the message.
Give me a week to think on it... it is not a small change.
immi

Hi Peter
>>Hattest Du Dir eigentlich die anderen Parameter größer als P12 schon mal angesehen? Stimmen die Readings mit denen in Deiner THZ überein?
andre is right: please test
immi

Hi Willy
I will remember it during your next goal & performance dialogue :)
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 08 Februar 2015, 22:49:49
Hallo Andre,

im Anhang die Ergebnisse meines Parameterabgleichs. Bei falschen Werten habe ich meine richtigen Parametern in Klammer (gelb markiert) dargestellt. Ich denke die Solar-Parameter brauchen wir nicht zu beachten, da meine LWZ303i keine Solarfunktion hat.

Gruß
Peter
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 09 Februar 2015, 22:37:21
Zitat von: immi am 08 Februar 2015, 16:05:55
3) room_thermometer not connected  and room_display connected (hypothesis)
sGlobal.insideTemp = -60
sHC1.insideTempRC = room_display remperature

4) room_thermometer connected to KTY81 and room_display connected (hypothesis)
sGlobal.insideTemp = resistance between X5-pin5 and X5-pin6 (conversion table of a NXP-KTY81)
sHC1.insideTempRC = room_display remperature

I cannot reproduce 3 and 4 because I do not have a second display...  someone else has to confirm (connect something //press reset button // wait 3 min. // confirm or write new theory)
I can confirm 4).
I remember to have disconnected the KTY81 for testing months ago; so I definitely can confirm  3a) (sGlobal.insideTemp = -60) as well.  sHC1.insideTempRC did not yet exist in that point in time; but I'm 99,999% sure that your assumption for 3b) is correct.

I need to mention that the room display has - same as the display inside the THZ -  its own ThermCorrection value. The THZ display's ThermCorrection value (p99) is used to correct the temperature measured between  X5-pin5 and X5-pin6, while the ThermCorrection value of the room display corrects the offset of  the room display. You do not need to take this into account in code, since FHEM reads sHC1.insideTempRC in it's final, already corrected state.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 09 Februar 2015, 22:40:59
Zitat von: immi am 04 Februar 2015, 16:05:53
Hi Belu, Hi Andre.k
I like both solution a lot.
But, I do not want to update sDisplay too often (e.g. each 30 sec)
What I miss is, an automatic way to update sDisplay before the webpage is generated.
Untill we find it, it makes sense to add a button "refresh"
immi

Today I came across an interresting looking phrase in readingsGroup wiki (http://www.fhemwiki.de/wiki/ReadingsGroup#Definition):

ZitatDie Aktualisierung im Browserfenster geschieht per longpoll und überträgt nur die jeweils geänderten Zellen. Wenn eine readingsGroup in keinem Browserfenster angezeigt wird findet keine longpoll aktualisierung statt.
Is this what you're looking for?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 10 Februar 2015, 07:36:16
Guten Morgen Willy,

Das mit der Aktualisierung der User oder Group readings ist klar. Das Problem ist das THZ Modul das ja den Output für die Readings bereit stellen muss. Das hat aktuell einen Intervall und da ist das was Immi nicht möchte. Das THZ Modul soll nur einen Intervall erzeugen wenn jemand eingelogt ist oder halt einen Refresh Button.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 10 Februar 2015, 20:35:10
Zitat von: peter456 am 08 Februar 2015, 22:49:49
Hallo Andre,

im Anhang die Ergebnisse meines Parameterabgleichs. Bei falschen Werten habe ich meine richtigen Parametern in Klammer (gelb markiert) dargestellt. Ich denke die Solar-Parameter brauchen wir nicht zu beachten, da meine LWZ303i keine Solarfunktion hat.

Gruß
Peter

Hallo Peter,

danke fürs testen. Ich habe die Fehler gefunden und werde sie korrigieren. Bei pFAN (Register 01) haben wir aber einen Unterschied zwischen Deiner und meiner Firmware. In meiner 2.14 kann ich die Lüfter bis 250 m3/h einstellen. Dafür genügt ein Datenbyte zum kodieren. In Deiner Firmaware 2.06 kann der wert bis 280 eingestellt werden. Das passt dann nicht mehr in ein Byte. Daher werden vermutlich für jede Einstellung von P37...P42 zwei Bytes in der Payload werwendet. Um das zu verfizieren benötige ich die folgende vollständige Message aus dem Logfile (Dazu musst du das Attribut verbose=5 setzen).2015.02.10 20:30:39 5: Parse message: 4A015A8AC85A8AC8003C003C003C003C00
Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 10 Februar 2015, 21:53:58
Zitat von: andre.k am 10 Februar 2015, 20:35:10
Hallo Peter,

danke fürs testen. Ich habe die Fehler gefunden und werde sie korrigieren. Bei pFAN (Register 01) haben wir aber einen Unterschied zwischen Deiner und meiner Firmware. In meiner 2.14 kann ich die Lüfter bis 250 m3/h einstellen. Dafür genügt ein Datenbyte zum kodieren. In Deiner Firmaware 2.06 kann der wert bis 280 eingestellt werden. Das passt dann nicht mehr in ein Byte. Daher werden vermutlich für jede Einstellung von P37...P42 zwei Bytes in der Payload werwendet. Um das zu verfizieren benötige ich die folgende vollständige Message aus dem Logfile (Dazu musst du das Attribut verbose=5 setzen).2015.02.10 20:30:39 5: Parse message: 4A015A8AC85A8AC8003C003C003C003C00
Andre

Hallo Andre,
Hier die vollständige Antwort vom Register pFan:
2015.02.10 21:49:19 5: Mythz sending 10
2015.02.10 21:49:19 5: SW: 10
2015.02.10 21:49:19 5: Parse message: F401007300AD00E6007300A300E6003C003C003C003C0000
2015.02.10 21:49:19 5: Message length: 48
2015.02.10 21:49:19 5: Triggering Mythz (1 changes)
2015.02.10 21:49:19 5: Notify loop for Mythz pFan: p37Fanstage1AirflowInlet: 0 p38Fanstage2AirflowInlet: 115 p39Fanstage3AirflowInlet: 0 p40Fanstage1AirflowOutlet: 173 p41Fanstage2AirflowOutlet: 0 p42Fanstage3AirflowOutlet: 230 p43UnschedVent3: 115 p44UnschedVent2: 163 p45UnschedVent1: 230 p46UnschedVent0: 60 p75PassiveCooling: 0
2015.02.10 21:49:19 4: eventTypes: THZ Mythz pFan: p37Fanstage1AirflowInlet: 0 p38Fanstage2AirflowInlet: 115 p39Fanstage3AirflowInlet: 0 p40Fanstage1AirflowOutlet: 173 p41Fanstage2AirflowOutlet: 0 p42Fanstage3AirflowOutlet: 230 p43UnschedVent3: 115 p44UnschedVent2: 163 p45UnschedVent1: 230 p46UnschedVent0: 60 p75PassiveCooling: 0 -> pFan: p37Fanstage1AirflowInlet: .* p38Fanstage2AirflowInlet: .* p39Fanstage3AirflowInlet: .* p40Fanstage1AirflowOutlet: .* p41Fanstage2AirflowOutlet: .* p42Fanstage3AirflowOutlet: .* p43UnschedVent3: .* p44UnschedVent2: .* p45UnschedVent1: .* p46UnschedVent0: .* p75PassiveCooling: .*

Gruß
Peter
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: NaCkHaYeD am 11 Februar 2015, 23:14:35
Hi,

bin neu hier, dementsprechend ein paar Fragen/Anmerkungen:

- Gibt es eine Möglichkeit die aktuelle Uhrzeit vom Raspi an die THZ zu senden (Hintergrund: THZ läuft etwas davon)?
- Was ist der Parameter "evuRelease"
- Bei ein paar Diagrammen von euch, sehe ich eine Luftfeuchtigkeit. Welcher Param ist das denn? Ich sehe unter den sGlobal ein relHumidity der bei mir aber immer 0 ist.
- Gibt es einen Parameter, welcher mir sagt, dass der Filter getauscht werden muss?

Ach ja, ich habe eine THZ 403 SOL mit Firmware 4.39

Ansonsten, ich schätze eure Arbeit wirklich sehr. Dank euch kann ich die Prozesswerte auslesen, die Anlage größtenteils elegant bedienen und das beste eine Mail mir senden, wenn wieder der Wodte Differenz Sensor ausgelöst hat.

mfg
Thomas
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 12 Februar 2015, 07:56:08
Zitat von: NaCkHaYeD am 11 Februar 2015, 23:14:35
Hi,

bin neu hier, dementsprechend ein paar Fragen/Anmerkungen:

Hallo Thomas, willkommen in "neuen" Forum. Im alten Forum gibt es größtenteils Antworten auf Deine Fragen. Markus, willy was haltet ihr von einem FAQ irgendwo?

- Gibt es eine Möglichkeit die aktuelle Uhrzeit vom Raspi an die THZ zu senden (Hintergrund: THZ läuft etwas davon)?
  Keine Ahnung, aber Sachen mit einen s davor lassen sich eigentlich nicht verstellen.

- Was ist der Parameter "evuRelease"
  Es gibt Energieversorger, die in Spitzenbelastungszeiten, der WP den Strom entziehen für 2 hr am Tag. Das wird über den "evuRelease" geregelt, der dann 0 ist wenn der Strom weg ist.

- Bei ein paar Diagrammen von euch, sehe ich eine Luftfeuchtigkeit. Welcher Param ist das denn? Ich sehe unter den sGlobal ein relHumidity der bei mir aber immer 0 ist.
  Luftfeuchtewird nur angezeigt falls Du ein 2. Bedienteil (FES) in einem der Räume hast. Für alle anderen ist der Wert Null.

- Gibt es einen Parameter, welcher mir sagt, dass der Filter getauscht werden muss?
Es gibt einen internen Zähler (glaube 182 Tage), der dann erscheint, wenn die Anlage nie ausgeschaltet wurde. Der der Zähler setzt sich selber auf Null, wenn die Anlage mal vom Strom getrennt wird. Damit ist es ein unverlässliches Feature.


Ansonsten, ich schätze eure Arbeit wirklich sehr. Dank euch kann ich die Prozesswerte auslesen, die Anlage größtenteils elegant bedienen und das beste eine Mail mir senden, wenn wieder der Wodte Differenz Sensor ausgelöst hat.

Die meiste Arbeit haben immi, willy, micomat und auch Godmorgen gemacht. Dein Haus ist wahrscheinlich zu luftdicht, wenn der Sensor ständig auslöst, trotz des Vorheizregisters der SOL. In neuen Häusern wird eine so eine Lüftungsklappe direkt am Schornstein verbaut, was das Problem beheben soll
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 12 Februar 2015, 08:29:59
Hi,


erst mal willkommen. Für diese Fragen ist eigentlich der andere Thread  (http://forum.fhem.de/index.php?topic=33452.new#new)gedacht. Hier geht es hauptsächlich um die Codeentwicklung des THZ-Moduls. Der Rest ist ja bereits perfekt beantwortet.
Gruß
Willy

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 12 Februar 2015, 08:37:39
Das geht aus dem Namen und Beschreibung des Threads nicht hervor. Vielleicht sollte da das Wort Newbees auftauchen. Hätte selber nicht gewusst, wo ich hätte posten sollen.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 12 Februar 2015, 12:31:21
Zitat von: NaCkHaYeD am 11 Februar 2015, 23:14:35
- Gibt es einen Parameter, welcher mir sagt, dass der Filter getauscht werden muss?
- ... wenn wieder der Wodte Differenz Sensor ausgelöst hat.
Das mit dem Filtertausch geht lt. Tecalor Manal über den Anstieg der Lüfterdrehzahl, die notwendig ist, um die eingestellte Luftmenge aufrecht zu erhalten. Aber wie bereits genannt: Bei Stromausfall wird der Wert zurück gesetzt und ist damit sinnlos.

Ich nehme an, der "Wodte Differenz Sensor" ist ein Unterdrucksensor für einen Holzofen. Wenn der anschlägt läuft entweder die Dunstabzughaube mit Abluft nach draußen, oder Zu- und Abluft ist nicht symmetrisch eingestellt. Ein ganz leichter, kaum messbarer Unterdruck ist aber optimal, um Bauschäden zu vermeiden. Bei Überdruck könnte Raumluft durch Ritzen nach draußen wandern. Dabei kühlt sie sich ab, Feuchtigkeit fällt aus und modert irgend wo in der Außenwand vor sich hin.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 12 Februar 2015, 14:24:25
Hi all,

Maybe you could help me with the following question: does the 00_THZ module support unscheduled ventilation program activation ? In my LWZ 403 Sol I can do it from front control panel, but could not find if this can be done remotely via Fhem. There are parameters P43 - P46 available, still I am not sure how the unscheduled ventilation can actually be triggered...

Regards
Marek
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: toggle am 12 Februar 2015, 19:37:55
Zitat von: NaCkHaYeD am 11 Februar 2015, 23:14:35
- Gibt es eine Möglichkeit die aktuelle Uhrzeit vom Raspi an die THZ zu senden (Hintergrund: THZ läuft etwas davon)?
Technisch wäre es möglich. Meine THZ 404 hat folgende Register für die Uhrzeit und das Datum:
0a 0122 - Tag (1. Byte)
0a 0123 - Monat  (1. Byte)
0a 0124 - Jahr  (1. Byte)
0a 0125 - Stunde  (1. Byte)
0a 0126 - Minute  (1. Byte)

@immi: Gibt es diese Register auch in anderen Versionen?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: NaCkHaYeD am 12 Februar 2015, 21:25:15
Danke für eure Antworten. Nur kurz, das falscher Thread:
- Filter: Ich tausche jeden Monat, da ich Meterware kaufe. Jedoch bin ich dennoch gezwungen alle x-Tage die Anlage laut Kundendienst zu resetten. Daraus schliesse ich, die Messung der Anlage ist Unsinn, auch die Quittierung per Spannungsreset.
- Druckdifferenzsensor: Das Problem war, dass Firmen mit der Technik überfordert sind. Wodkte misst zwischen Rauchrohr und Innenrohr und das mit 2mP oder so. Da hatte ein kleiner Windstoss oben am Schornstein genügt. Nun baue ich per Lüftung etwas Überdruck auf, damit ich immer einen Luftstrom aus dem Haus hinaus habe, bzw. in Richtung Rauchrohr hätte. Keine Lüftung und Feuer funktioniert nicht, da auch die WP über den Abluftkanal laut Tecalor Luft ansaugt. Ja Haus ist sehr dicht.

Weiterhin habe ich auch sporatisch die Logs voll mit
2015.02.01 07:24:15 1: /dev/ttyUSB0 disconnected, waiting to reappear (Mythz)
2015.02.01 07:24:17 3: Setting Mythz baudrate to 115200
2015.02.01 07:24:17 1: /dev/ttyUSB0 reappeared (Mythz)

Hier hatte ich mal gelesen, dass dies vom Kompressor, bzw. elektromagnetischen Störungen kommen kann. Eventuell ist auch die 11m lange, zwar gute aktive USB Leitung das Problem. Diese wird vom Raspi mit Spannung vom USB versorgt. Wobei 115k eigentlich keine Geschwindigkeit ist. Gibt es hier Ideen, oder handelt es sich eventuell um einen Fehler im Programm

Vielen Dank euch
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 12 Februar 2015, 21:45:33
Zitat von: mlb am 12 Februar 2015, 14:24:25
Maybe you could help me with the following question: does the 00_THZ module support unscheduled ventilation program activation ?
Marek
HI Marek
the unscheduled ventilation  is not completely implemented because some info are missing.
I do not miss it because I use fhem for it: look at the end of the wiki for an example how to create a button "60 min off" http://www.fhemwiki.de/wiki/Tecalor_THZ_Heatpump


hi NaCkHaYeD
it is possble to set the time from fhem, if someone implements it.
nevertheless I do not see how this feature could be usefull. you set it  and do not change it for 10 years.

concerning your comunication issue: it is common to people with direct usb. As you said several hypothesis have been made. I have no issue with a very long serial cable.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: NaCkHaYeD am 12 Februar 2015, 22:29:49
The wish/issue with the time is, that i like one master clock, so the slave take the time of the masters.
The raspberry can synchronize to Internet time, so my idea was, why don´t send the time to the thz maybe each month.

At the Moment i am Standing at the beginning of fhem programming, but in my opinion Setting it from fhem should not be the Problem, that was my idea.

with regards.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 12 Februar 2015, 22:34:38
Zitat von: immi am 12 Februar 2015, 21:45:33
the unscheduled ventilation  is not completely implemented because some info are missing.
I do not miss it because I use fhem for it

Thanks immi. Yes, I have seen this - however I have some concerns about controlling it via changing Pxx parameters. If I understand how the electronic board works - each change of any Pxx parameter is written to internal flash memory. Of course that's not a problem if you change parameters occasionally, but in case you would change those a couple of times per day - those memory chips have limited number of writes and so one day they could simply stop working because of it... I simply have thrown away too many flash drives to ignore this risk...   :-\
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 13 Februar 2015, 15:22:45
Zitat von: mlb am 12 Februar 2015, 22:34:38
Thanks immi. Yes, I have seen this - however I have some concerns about controlling it via changing Pxx parameters. If I understand how the electronic board works - each change of any Pxx parameter is written to internal flash memory. Of course that's not a problem if you change parameters occasionally, but in case you would change those a couple of times per day - those memory chips have limited number of writes and so one day they could simply stop working because of it... I simply have thrown away too many flash drives to ignore this risk...   :-\

I agree to your fear, but untill someone explain me how to implement it, I will not do it; as I wrote before, info is missing.

One more thing: Are you sure that the unscheduled feature in the heatpump does not write to the eprom?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 13 Februar 2015, 19:42:50
Zitat von: immi am 13 Februar 2015, 15:22:45
One more thing: Are you sure that the unscheduled feature in the heatpump does not write to the eprom?

I just did a test: started unscheduled ventilation, and after a while I switched the heatpump off. After starting it again the ventilation did not restart - so that would suggest the unscheduled status is not written to non-volatile memory.

I'm happy to do some tests with my LWZ, just I do not have external controller, and so no means to intercept the sequence that would start it... Still, please let me know if you'd have ideas how to test it without external control unit.

regards
Marek

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 14 Februar 2015, 13:18:58
Zitat von: mlb am 13 Februar 2015, 19:42:50
I'm happy to do some tests with my LWZ, just I do not have external controller, and so no means to intercept the sequence that would start it... Still, please let me know if you'd have ideas how to test it without external control unit.
The display is connected to the THZ via CAN bus. This is valid for every display, no matter if it is external or the internal one. So monitoring the CAN bus is necessary, no matter where the display is located.

Up to now we know that it is possible to write the unscheduled vent. parameters into the THZ's memory via FHEM, which "should" be same as writing them via the display. But doing this via FHEM/serial port doesn't activate the unscheduled ventilation, while the same write action via the display activates the newly written parameters. So the assumption is that there's a flag to be set at the end of changing parameters, which the display obviously sets automatically at the end of the process.

Zitat von: mlb am 13 Februar 2015, 19:42:50
I just did a test: started unscheduled ventilation, and after a while I switched the heatpump off. After starting it again the ventilation did not restart - so that would suggest the unscheduled status is not written to non-volatile memory.

But you might have noticed that the parameter changes you made in order to activate the unscheduled ventilation in fact ARE written to the memory and can be read even after a reset. So there's definitely a write action during every usage of this feature.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 14 Februar 2015, 15:42:35
Thanks Willy, this explains a lot. Still, it sounds like the ventilation could be activated by additional command that could be sent independently to parameters write command. Are you saying that if we had CAN interface attached to RPi (for example http://skpang.co.uk/catalog/pican-canbus-board-for-raspberry-pi-p-1196.html (http://skpang.co.uk/catalog/pican-canbus-board-for-raspberry-pi-p-1196.html)) - we would be able to read the complete sequence?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: godmorgon am 14 Februar 2015, 16:04:36
The register you are looking for is 0a05dd. It accepts a short integer with the desired fan stage (0, 1, 2, 3). Writing to that register starts the unscheduled ventilation. After the specified time elapsed the register keeps the value unchanged but the unscheduled ventilation stops.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 14 Februar 2015, 16:16:55
Zitat von: godmorgon am 14 Februar 2015, 16:04:36
The register you are looking for is 0a05dd. It accepts a short integer with the desired fan stage (0, 1, 2, 3). Writing to that register starts the unscheduled ventilation. After the specified time elapsed the register keeps the value unchanged but the unscheduled ventilation stops.
thanks for sharing. I will have a look.
I am now curious: how have you found out?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: godmorgon am 14 Februar 2015, 16:29:20
Zitat von: immi am 14 Februar 2015, 16:16:55
I am now curious: how have you found out?
Set the fan stage for unscheduled ventilation to 1.
Perform register scan.
Set the fan stage for unscheduled ventilation to 2.
Perform register scan.
Run diff and check for changes 1->2.

Cheers,
godmorgon
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 14 Februar 2015, 16:51:11
Zitat von: godmorgon am 14 Februar 2015, 16:29:20
Set the fan stage for unscheduled ventilation to 1.
Perform register scan.
Set the fan stage for unscheduled ventilation to 2.
Perform register scan.
Run diff and check for changes 1->2.
the old school :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 14 Februar 2015, 17:22:16
Zitat von: mlb am 14 Februar 2015, 15:42:35
Thanks Willy, this explains a lot. Still, it sounds like the ventilation could be activated by additional command that could be sent independently to parameters write command. Are you saying that if we had CAN interface attached to RPi (for example http://skpang.co.uk/catalog/pican-canbus-board-for-raspberry-pi-p-1196.html (http://skpang.co.uk/catalog/pican-canbus-board-for-raspberry-pi-p-1196.html)) - we would be able to read the complete sequence?
Yes, that's what I believe. But it's no more necessary after godmorgon's

« Antwort #59 am: Heute um 16:04:36 »

@godmorgon:
you're fantastic - that's what we've been looking for since last spring. Thanks a lot.

@immi:
You already know how my question to looks like  :) ...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 14 Februar 2015, 18:59:26
Zitat von: godmorgon am 14 Februar 2015, 16:04:36
The register you are looking for is 0a05dd. It accepts a short integer with the desired fan stage (0, 1, 2, 3). Writing to that register starts the unscheduled ventilation. After the specified time elapsed the register keeps the value unchanged but the unscheduled ventilation stops.
it is working. Deploy this night with 2 other small things.

for people scared to age the the epprom
--button: 60 min off --> 2 writes to the eeprom
--unscheduled ventilation --> probably 3 writes to the eeprom
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 14 Februar 2015, 19:32:49
Zitat von: godmorgon am 14 Februar 2015, 16:04:36
The register you are looking for is 0a05dd. It accepts a short integer with the desired fan stage (0, 1, 2, 3). Writing to that register starts the unscheduled ventilation. After the specified time elapsed the register keeps the value unchanged but the unscheduled ventilation stops.

Simply fantastic!  ;D

Zitat von: immi am 14 Februar 2015, 18:59:26
--unscheduled ventilation --> probably 3 writes to the eeprom

Why would you say so? Writing to register would not necessarily mean eeprom operation.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: godmorgon am 14 Februar 2015, 19:37:48
Zitat von: immi am 14 Februar 2015, 18:59:26
--button: 60 min off --> 2 writes to the eeprom
--unscheduled ventilation --> probably 3 writes to the eeprom
How so?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 14 Februar 2015, 20:55:16
Zitat von: mlb am 13 Februar 2015, 19:42:50
I just did a test: started unscheduled ventilation, and after a while I switched the heatpump off. After starting it again the ventilation did not restart.

I wrote probably because I was not sure how to interprete the above experiment: following info missing
old condition
-fan moving at speed 0123?
-unscheduled ventilation setting 0123?
unscheduled ventilation activated to 0123?
-fan moving at speed 0123?
-unscheduled ventilation setting 0123?
after reset
-fan moving at speed 0123?
-unscheduled ventilation setting 0123?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 14 Februar 2015, 21:22:30
After heatpump restart the fan is not started again, that's why I think when you start unscheduled ventilation from control panel - there are two actions performed:

Thanks to godmorgon effort it seems we could just trigger second action, without need of updating P43-46 parameters each time the ventilation is started :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 14 Februar 2015, 21:38:52
v 0132 uploaded; tomorrow you can update
- added p99startUnschedVent
- splitting of big register implemented; this is needed for writing in old 206 firmware.
- vertical range in the heating curve changed to 15..35°C as requested.

@all I changed lots of code for the splitting, update only if you need.
@all with old firmware, wait for Andre testing!!
@Andre:please comment out line 797. Can you test the writing in the old firmware? No actual writing takes place. I didn´t finish subTHZ_Set: just 50%. I want your feedback before going on.

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 15 Februar 2015, 00:01:16
Thanks!

Zitat von: immi am 14 Februar 2015, 21:38:52
- added p99startUnschedVent

Yes I can see the new parameter, but I cannot change it and also ventilation does not start when I try to set it to something different than 0. I'm just wondering if that's because I'm still on 4.38 firmware and it works fine for others? When I start unscheduled ventilation from control panel - yes I can see non-zero value for p99startUnschedVent, so reading works fine.

Zitat von: immi am 14 Februar 2015, 21:38:52
- vertical range in the heating curve changed to 15..35°C as requested.

Could the upper limit be defined by a parameter? My heating curve actually goes above 40°C, and now the graph looks strange...
Of course I could stop using this graph, just it's pretty cool to see it.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 Februar 2015, 09:39:23
Zitat von: mlb am 15 Februar 2015, 00:01:16
Thanks!

Yes I can see the new parameter, but I cannot change it and also ventilation does not start when I try to set it to something different than 0. I'm just wondering if that's because I'm still on 4.38 firmware and it works fine for others? When I start unscheduled ventilation from control panel - yes I can see non-zero value for p99startUnschedVent, so reading works fine.
interesting, it worked for me with 0 but have not tested other numbers
@godmorgon: how is a 1  implemented in the register 0a05dd0100 or 0a05dd0001?

Zitat
Could the upper limit be defined by a parameter? My heating curve actually goes above 40°C, and now the graph looks strange...
Of course I could stop using this graph, just it's pretty cool to see it.
I will provide a parameter by next release.
You are perfectly right.
----
In the meanwhile you can play with function_heatSetTemp($$)
it provides the data on the curve: e.g. outside temp from -15 to 30, you use function_heatSetTemp(-15,30)
you can create a personalized .gplot with logproxy

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: godmorgon am 15 Februar 2015, 10:15:22
Zitat von: immi am 15 Februar 2015, 09:39:23
interesting, it worked for me with 0 but have not tested other numbers
@godmorgon: how is a 1  implemented in the register 0a05dd0100 or 0a05dd0001?
IIRC the heat pump uses big endian for most registers. So a short int would correspond to 00 01. Didn't you do a read check first? ;-)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 15 Februar 2015, 11:13:41
Zitat von: immi am 15 Februar 2015, 09:39:23
interesting, it worked for me with 0 but have not tested other numbers

Yes, 0 works for me too, in my case it stops unscheduled event. Just anything above 0 gives no heatpump reaction, so godmorgon sounds right about incorrect bits order.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 Februar 2015, 11:58:29
Zitat von: godmorgon am 15 Februar 2015, 10:15:22
IIRC the heat pump uses big endian for most registers. So a short int would correspond to 00 01.
and this is how it was implemented 0a05dd0001

@mlb
the register is strange:
I made a few tests: sometime I have to set it 2 times before it is activated.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: godmorgon am 15 Februar 2015, 12:04:23
0 is supposed to stop ventilation for a period specified by "unsched. vent time stage 0". After that the ventilation should return to the default fan stage. I don't have a clue how to terminate unscheduled ventilation.

I also noticed that setting unscheduled ventilation on the control panel does not always start it immediately.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 Februar 2015, 12:10:31
hypothesis:
could be that it starts immediately only if you set the same value, already set in the register?

e.g.
register has a 0 and you want unscheduled 1 --> you have to set 2 times: one for changing and one for activating?
register has a 0 and you want unscheduled 0 --> you have to set 1 time for activating

p.s. I have never liked this feature.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 15 Februar 2015, 12:43:33
Hmm setting it twice does not activate ventilation nor change register value, at least in my case... Yes, I have also noticed when starting from control panel - there is usually delay after unscheduled ventilation is activated.

In my case unscheduled ventilation is very useful feature. I have a fireplace that is connected to heating system. So sometimes when I start the fire, there is a bit of smoke getting into room and then it is useful to increase ventilation to clean the air. Also when it happens to prepare food with intensive smell propagating to other rooms - it is useful feature too. In such cases I need to go to garage and activate ventilation from control panel manually, and it would be so much easier just to draw smartphone from the pocket and start it instantly... :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 15 Februar 2015, 12:53:30
Zitat von: immi am 14 Februar 2015, 21:38:52
v 0132 uploaded; tomorrow you can update
- added p99startUnschedVent
- splitting of big register implemented; this is needed for writing in old 206 firmware.
- vertical range in the heating curve changed to 15..35°C as requested.

@all I changed lots of code for the splitting, update only if you need.
@all with old firmware, wait for Andre testing!!
@Andre:please comment out line 797. Can you test the writing in the old firmware? No actual writing takes place. I didn´t finish subTHZ_Set: just 50%. I want your feedback before going on.

immi
Hi immi,
your new version works fine. It's a good idea to introduce a parent child relation for register with multiple values. But we need to be careful with spelling of the readings, because we use the names twice in %parsing and in %sets/%gets, e.g.
p12FanStageManual <> p12FANStageManual

I would suggest to rename some readings.
     "p01RoomTempDay" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "30", unit =>" °C"},
     "p02RoomTempNight" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "30", unit =>" °C"},
     "p03RoomTempStandby" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "30", unit =>" °C"},
-    "p04DHWsetDayTemp" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "55", unit =>" °C"},
-    "p05DHWsetNightTemp" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "55", unit =>" °C"},
-    "p06DHWsetStandbyTemp" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "55", unit =>" °C"},
+    "p04DHWsetTempDay" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "55", unit =>" °C"},
+    "p05DHWsetTempNight" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "55", unit =>" °C"},
+    "p06DHWsetTempStandby" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "55", unit =>" °C"},
     "p07FanStageDay" => {parent=>"p01-p12", argMin =>   "0", argMax =>    "3", unit =>""},
     "p08FanStageNight" => {parent=>"p01-p12", argMin =>   "0", argMax =>    "3", unit =>""},
     "p09FanStageStandby" => {parent=>"p01-p12", argMin =>   "0", argMax =>    "3", unit =>""},
     "p10RoomTempManual" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "65", unit =>" °C"},
-    "p11DHWSetTempManual" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "65", unit =>" °C"},
-    "p12FANStageManual" => {parent=>"p01-p12", argMin =>   "0", argMax =>   "3", unit =>""}
+    "p11DHWsetTempManual" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "65", unit =>" °C"},
+    "p12FanStageManual" => {parent=>"p01-p12", argMin =>   "0", argMax =>   "3", unit =>""}
     

In the patch I corrected also some typos and some bugs from my first version of parsing elements.
Andre
 
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 Februar 2015, 13:56:08
v0.133 uploaded
- andres path
- autoscale of heatcurve for mlb
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 15 Februar 2015, 14:22:05
Cheers immi :)

I'm happy to confirm the unscheduled ventilation started working after I created a control for it:
define Fan.Unscheduled dummy
attr Fan.Unscheduled devStateIcon 0:vent_ventilation_level_0 1:vent_ventilation_level_1 2:vent_ventilation_level_2 3:vent_ventilation_level_3
attr Fan.Unscheduled group THZ-Fans
attr Fan.Unscheduled room Heating
attr Fan.Unscheduled setList 0 1 2 3
attr Fan.Unscheduled webCmd 0:1:2:3
define Notify_p99startUnschedVent notify Fan.Unscheduled set Mythz p99startUnschedVent $EVENT
define Notify_UnschedVent notify (Mythz.p99startUnschedVent.*) setstate Fan.Unscheduled $EVTPART1


No idea why it did not work when I was trying to send values directly...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 15 Februar 2015, 15:19:32
I hate these unnecessary safety features.   >:( So, how can I enable to edit fhem.cgf? I tried so far: editConfig1; editConfig=1; editConfig 1; editConfig:1; editConfig: 1
Nothing worked, nothing in the documentation expect for that you should set editConfig to 1.

Help would be appreciated. Thanks!

PS: Do I need to change the entry directly in 01_FHEMWEB.pm? editConfig: 1,0
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 Februar 2015, 15:30:00
Zitat von: houseowner123 am 15 Februar 2015, 15:19:32
I hate these unnecessary safety features.   >:( So, how can I enable to edit fhem.cgf? I tried so far: editConfig1; editConfig=1; editConfig 1
Nothing worked, nothing in the documentation expect for that you should set editConfig to 1.
OT
I read about this nice idea:) here http://forum.fhem.de/index.php/topic,33708.0.html
please post where Rudolf will read your opinion;
in the development area you are readonly.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 15 Februar 2015, 19:00:37
Zitat von: houseowner123 am 15 Februar 2015, 15:19:32
I hate these unnecessary safety features.   >:( So, how can I enable to edit fhem.cgf?
The right way is:
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 15 Februar 2015, 19:06:47
Thank you so much, Willy!  :D
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 15 Februar 2015, 19:23:09
Zitat von: immi am 15 Februar 2015, 13:56:08
v0.133 uploaded
- andres path
- autoscale of heatcurve for mlb
Immi, have you included the rest of the THZ_Set code for old firmware? Or do you still wait for testing?
Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 15 Februar 2015, 19:30:21
Zitat von: houseowner123 am 15 Februar 2015, 19:06:47
Thank you so much, Willy!  :D
As long as you're not familiar with the FHEM user interface (and therefore with FHEM at all?) you should avoid modifying the fhem.cfg manually. The above mentioned usage is given almost everywhere in fhem. E.g. if you want to create a new plot just navigate to
Everything - FileLog - FileLog_Mythz
and there click on the "Create_SVG_Plot" button, what brings you into the graphical UI for plot creation.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 Februar 2015, 19:39:52
Zitat von: andre.k am 15 Februar 2015, 19:23:09
Immi, have you included the rest of the THZ_Set code for old firmware? Or do you still wait for testing?
Andre
Andre
I just managed to avoid that you read p01-p12 13 times during inizialization.
rest of the THZ_Set code will come with the next one, maybe this night; now the children have to be prepared for bed
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 15 Februar 2015, 20:21:25
Immi,

I don't want to push you :)
Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 15 Februar 2015, 21:17:17
Zitat von: willybauss am 15 Februar 2015, 19:30:21
As long as you're not familiar with the FHEM user interface (and therefore with FHEM at all?) you should avoid modifying the fhem.cfg manually. The above mentioned usage is given almost everywhere in fhem. E.g. if you want to create a new plot just navigate to
Everything - FileLog - FileLog_Mythz
and there click on the "Create_SVG_Plot" button, what brings you into the graphical UI for plot creation.

I know "create_SVG_Plot" button. ;) I find the documentation not really beginner-friendly. So I have been doing things in the them.cfg. Not elegant, I don't understand everything that I do there but through trial and error I get by.  ;)

Back to the unschedules event. To my mind, it only works in conjunction with a duration that needs to be set. I also noticed a bug in the software. When I am in from of the display it never takes the setting the first time. I always have to entire it twice. Does anybody else have this issue too? The new button for me starts the unscheduled event but only at the fan stage setting that was there before. I had setback stage 1--> wanted to trigger unscheduled stage 3--> result was unscheduled stage 1

edit: Just as I thought: activating the trigger twice, does the trick. :) Is there a certain delay necessary?

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 15 Februar 2015, 21:30:48
immi, you are great, thank you! :D

I also updated other fhem files from trunk, and overall it looks really nice.

@Willy - so far I tested unscheduled ventilation modes 0, 1, 2 - and they seem to work fine after I created controller for it, without prior update of unscheduled times. Just sometimes ventilatio does not start - I need to look at documentation, maybe it's related to other parameters. And of course it does not start when compressor is running.

My software version is 4.38, and at Fhem I set it as 4.39. So far I have not noticed serious issues with Fhem.  The only thing I have noticed are strange parameters at sHC1:
outsideTemp: -0.8 x08: 7 returnTemp: 17.7 integralHeat: 77 flowTemp: 32.6 heatSetTemp: 22.9 heatTemp: 32.6 seasonMode: winter integralSwitch: 90 opMode: setback roomSetTemp: 16.5 x60: 0 x64: 563.2 insideTempRC: 22.5 x72: 0 x76: 2.2
- but I do not know if those are working for others, or they are simply not yet supported by 00_THZ.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 15 Februar 2015, 21:39:01
Zitat von: mlb am 15 Februar 2015, 14:22:05
I'm happy to confirm the unscheduled ventilation started working after I created a control for it:

I managed to add a few sliders for setting the times as well. The final result is shown here (http://forum.fhem.de/index.php/topic,33452.msg262224.html#msg262224).

I'd like to do the same for party mode as well, but I noticed that "party-time" is a read-only setting => why?. Additionally I assume there's a hidden flag for activation as well, which would need to be found first.

edit:
link updated
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 15 Februar 2015, 22:48:53
Your sliders look very useful, would you mind posting example code for one slider?


Zitat von: willybauss am 15 Februar 2015, 21:39:01
I'd like to do the same for party mode as well, but I noticed that "party-time" is a read-only setting

Indeed - p99FanStageParty I could set value 0 to 3 without errors, but there is no parameter on the list to modify party time range.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 15 Februar 2015, 22:58:33
Ah I found it on wiki at release notes:

Zitatv0.108
    Party-Time set removed as it has never worked

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 15 Februar 2015, 23:11:14
Zitat von: mlb am 15 Februar 2015, 22:48:53
Your sliders look very useful, would you mind posting example code for one slider?
Link to the code is in my post above, here again:  HERE IS THE LINK AGAIN (http://forum.fhem.de/index.php/topic,33452.msg262224.html#msg262224)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 15 Februar 2015, 23:59:03
Thanks. I do not know why, but your previous link kept redirecting me to my own previous message, that's why I asked.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 16 Februar 2015, 07:22:55
the link was wrong => updated now
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 16 Februar 2015, 09:25:25
Zitat von: mlb am 15 Februar 2015, 21:30:48
My software version is 4.38, and at Fhem I set it as 4.39. So far I have not noticed serious issues with Fhem.  The only thing I have noticed are strange parameters at sHC1:
outsideTemp: -0.8 x08: 7 returnTemp: 17.7 integralHeat: 77 flowTemp: 32.6 heatSetTemp: 22.9 heatTemp: 32.6 seasonMode: winter integralSwitch: 90 opMode: setback roomSetTemp: 16.5 x60: 0 x64: 563.2 insideTempRC: 22.5 x72: 0 x76: 2.2
not too serius during carneval monday  ;D
The xXX just tell you values the heatpump delivers. We do not have a names for them. Someone has to find them out or ask tecalor for documentation.

v0.133+ uploaded
- fixed: According the manual our p99RoomThermCorrection is actually P76


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 16 Februar 2015, 12:37:55
oh man! you're so fast and i Really have no time to write the wiki articles =(
if somebody can write a short update for the "changelog" in the wiki, I'll add this :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 20 Februar 2015, 14:56:52
@immi: I am not sure if this is THZ-specific, or more general topic. I know we can request data from THZ on interval basis. But we also do not want to do it too frequently. 
However, I think we may have one exception -  when we send a a command to THZ, often it would be very useful to refresh status from THZ  at the next step, just to make sure the command has been actually successful. Is there a way of doing it?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 Februar 2015, 15:13:27
Zitat von: mlb am 20 Februar 2015, 14:56:52
@immi: I am not sure if this is THZ-specific, of more general topic. I know we can request data from THZ on interval basis. But we also do not want to do it too frequently. 
However, I think we may have one exception -  when we send a a command to THZ, often it would be very useful to refresh status from THZ  at the next step, just to make sure the command has been actually successful. Is there a way of doing it?

The same register will always be read immediately automaticaly for confirmation after writing.
Other registers can be activated per "notify"; please look in the manual.
Example:you can tell fhem to read again sGlobal, each time you change the ventilator speed.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 20 Februar 2015, 16:05:29
Zitat von: immi am 20 Februar 2015, 15:13:27
Example:you can tell fhem to read again sGlobal, each time you change the ventilator speed.

Nice :) Just - how to do that?  I checked documentation and tried it - but seems like I do not understand it because the following does not work (last line does not trigger refresh):

define Fan.Unscheduled dummy
attr Fan.Unscheduled alias Start
attr Fan.Unscheduled devStateIcon 0:vent_ventilation_level_0 1:vent_ventilation_level_1 2:vent_ventilation_level_2 3:vent_ventilation_level_3
attr Fan.Unscheduled group THZ-FansUnscheduled
attr Fan.Unscheduled setList 0 1 2 3
attr Fan.Unscheduled webCmd 0:1:2:3
define Notify_p99startUnschedVent notify Fan.Unscheduled set Mythz p99startUnschedVent $EVENT
define Notify_UnschedVent notify (Mythz.p99startUnschedVent.*) setstate Fan.Unscheduled $EVTPART1
define Notify_UnschedVentRefresh notify Fan.Unscheduled get Mythz sGlobal
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 20 Februar 2015, 17:54:06
=> monitor window shows you the name on which your notify should trigger
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 20 Februar 2015, 18:39:29
Willy - yes I have done that already, and Event Monitor shows "dummy Fan.Unscheduled <number>", as expected. That's why I'm asking here, because my Notify_UnschedVentRefresh is not being triggered, so I cannot see any event about getting sGlobal that would follow the start of ventilation.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 20 Februar 2015, 19:03:53
It suddenly started working!  ;D
And with the code exactly like I published earlier. I still do not understand why, does fhem require a couple of restarts before new notify is checked? Anyway, thanks for suggestions!
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 Februar 2015, 20:54:18
just uploaded v0134
- write mode for old firmwares enabled; THZ_Set has been rewritten strongly

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 20 Februar 2015, 21:36:15
Hi immi,

I've just decoded some additional values in register sHC1 (0xF4). The following parsing rules work in my firmware 2.14, but may be these are the same in newer versions.


[" OnHysteresisNo: ", 32, 2, "hex", 1],
[" OffHysteresisNo: ", 34, 2, "hex", 1],
[" HCBoosterStage: ", 36, 2, "hex", 1]


Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 Februar 2015, 21:54:00
Hi Andre
HCBoosterStage: is selfexplaining
what represent the other 2?

x72: 0.1 x76: -535.4 onHysteresisNo: 0 offHysteresisNo: 1 HCBoosterStage: 0
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 20 Februar 2015, 22:22:44
Just a short update on my issue - it seems Fhem has a problem when you declare more than one notify for the same device, then it randomly selects just one that's why it did not work initially. So I changed the definition, and also added delayed refresh of the status (because fans do not start immediately, sometimes the spin up takes a while):

define Notify_p99startUnschedVent notify Fan.Unscheduled set Mythz p99startUnschedVent $EVENT;; define UnschedRefreshDelay1 at +00:00:15 get Mythz sGlobal;;define UnschedRefreshDelay2 at +00:00:35 get Mythz sGlobal
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 20 Februar 2015, 22:36:58
Zitat von: immi am 20 Februar 2015, 21:54:00
Hi Andre
HCBoosterStage: is selfexplaining
what represent the other 2?

x72: 0.1 x76: -535.4 onHysteresisNo: 0 offHysteresisNo: 1 HCBoosterStage: 0
Hi immi,

I'm not sure. Both parameter are displayed in my heat pump program (see screen shot). I guess these are the actual used hysteresis (from parameter P21 .. P 28)
Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 Februar 2015, 22:37:57
Zitat von: mlb am 20 Februar 2015, 22:22:44

define Notify_p99startUnschedVent notify Fan.Unscheduled set Mythz p99startUnschedVent $EVENT;; define UnschedRefreshDelay1 at +00:00:15 get Mythz sGlobal;;define UnschedRefreshDelay2 at +00:00:35 get Mythz sGlobal


why don´t you use "sleep" instead of at?
look in the wiki http://www.fhemwiki.de/wiki/Notify
define ntfy1 notify Fernbedienung:.* set Lampe1 $EVENT ;; sleep 7.5;; set Lampe2 $EVENT
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: der-Lolo am 20 Februar 2015, 23:12:32
Hello together,
in the moment we do not have a THZ heater solution - but in the future we get one.
I write here just to stay better in touch with this thread...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 21 Februar 2015, 09:00:21
Zitat von: der-Lolo am 20 Februar 2015, 23:12:32
Hello together,
in the moment we do not have a THZ heater solution - but in the future we get one.
I write here just to stay better in touch with this thread...
Welcome in club
please consider also Willy´s post http://forum.fhem.de/index.php/topic,33452.30.html for sharing user experience and optimization
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 21 Februar 2015, 10:53:10
Zitat von: der-Lolo am 20 Februar 2015, 23:12:32
Hello together,
in the moment we do not have a THZ heater solution - but in the future we get one.
I write here just to stay better in touch with this thread...
Hi Michael,
welcome to the club  :) . If you'll decide for the 504 model there might be some additional work for immi, since 504 is not yet implemented; but all x03 and x04 models work smoothly.

Willy
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 21 Februar 2015, 10:58:03
Zitat von: mlb am 20 Februar 2015, 18:39:29
Willy - yes I have done that already, and Event Monitor shows "dummy Fan.Unscheduled <number>", as expected. That's why I'm asking here, because my Notify_UnschedVentRefresh is not being triggered, so I cannot see any event about getting sGlobal that would follow the start of ventilation.
It also depends on the way how you implement your changes. If you edit fhem.cfg and save it manually, you need to do a "rereadcfg" or better a "shutdown restart" to activate the new code.
It's always better to use the available UIs for modifications instead of modifying fhem.cfg. But in this case you need to have in mind that the changes are activated immediately BUT are NOT written to fhem.cfg automatically. This has to be forced by a "Save config".
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 21 Februar 2015, 11:28:05
I just upgraded to version 0.134. Many thanks to immi for the graet functionality to write multi value registers.
@all: Could you please test the new version deeply, especially the users of old firmware. Here some new features:
- Writing of parameters/settings is possible for old firmware versions 2.x. In this version only p1..p12 are writable.
- Handling of different payload  for register pFAN  (p37...p46/p75) in firmaware 2.06 vs. 2.14
- New register sProgram (Not parsed in this version, please check the availibility of the register in Firmaware 2.06, in my 2.14 it exists and contains e.g. the operating mode (manual/automatic)

We would like your feedback befor we go further to implement additional set parameters. What use cases make sense in FHEM? Some parameter are may be too dangerous to change with FHEM.



Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 21 Februar 2015, 14:14:09
today I noticed strange messages when starting fhem from the command line:
$ Starting fhem...
main::THZ_Get() called too early to check prototype at ./FHEM/00_THZ.pm line 944, <$fh> line 89.


I don't know if it is related to v.0.134 or to installation of a different SW (http://willy-tech.de/raspberry-pi-control-center/) on my RaspberryPi today. Fhem started anyway, but I didn't have access to the THZ via USB1:
ZitatMythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?

what worked perfectly for months before. For any reason it worked again after switching USB1 and USB0 in fhem.cfg. This is strange as well, since I tried to fix the USB port numbers as mentioned e.g. here (http://www.forum-raspberrypi.de/Thread-tutorial-laufwerk-geraet-immer-der-selben-geraetedateien-zuweisen-udev).

Any idea?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 21 Februar 2015, 16:04:36
>$ Starting fhem...
>main::THZ_Get() called too early to check prototype at ./FHEM/00_THZ.pm line 944, <$fh> line 89.

hi willy
the warning is not a problem, you have an issue somewhere else.
I forgot (deleted) the prototype of one subfunction.
Now the warning is gone.
just uploaded v0.135 with the fix
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: der-Lolo am 21 Februar 2015, 17:02:45
@willy: i was also working on USB problems today - maybe you will try to get the right device by using /dev/serial/by-id/ for me and the first one wire test environment everything looks fine that way without udev rules.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 21 Februar 2015, 17:21:53
Zitat von: immi am 20 Februar 2015, 22:37:57
why don´t you use "sleep" instead of at?
look in the wiki http://www.fhemwiki.de/wiki/Notify
define ntfy1 notify Fernbedienung:.* set Lampe1 $EVENT ;; sleep 7.5;; set Lampe2 $EVENT

Thanks, sleep works. But I found another issue: double use of $EVENT does not work in my case. For first command $EVENT has correct value, but for second one (in your example set Lamp2) $EVENT has the value of zero.

So in my case
define Notify_p99startUnschedVent notify Fan.Unscheduled set Mythz p99startUnschedVent $EVENT;;sleep 2;;set Mythz p99startUnschedVent $EVENT;; sleep 15;; get Mythz sGlobal;;sleep 15;; get Mythz sGlobal

sets p99startUnschedVent twice as expected, just second command always sets p99startUnschedVent to zero.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 21 Februar 2015, 18:25:40
Zitat von: mlb am 21 Februar 2015, 17:21:53
sets p99startUnschedVent twice as expected, just second command always sets p99startUnschedVent to zero.
If this is true (and I do not understand why, strange), use { } syntax for notify and copy $EVENT in a variable, and then use the variable for setting.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 21 Februar 2015, 19:35:10
Zitat von: der-Lolo am 21 Februar 2015, 17:02:45
@willy: i was also working on USB problems today - maybe you will try to get the right device by using /dev/serial/by-id/ for me and the first one wire test environment everything looks fine that way without udev rules.
I don't understand completely - do you want me to update the links manually after reboot? If that works I could put this action into a fhem startup script easily.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: der-Lolo am 21 Februar 2015, 19:41:04
no, the idea behind that is not to point on a special port - pick the right device in your config with the id from the device, it doesnt matter if it is connected to usb0 usb1 or where ever...
have a look here...
http://forum.fhem.de/index.php/topic,30704.0.html (http://forum.fhem.de/index.php/topic,30704.0.html)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 21 Februar 2015, 20:17:26
ok, understood. Now I did as follows - and it works:

Zitat$ ll  /dev/serial/by-id
total 0
drwxr-xr-x 2 root root 100 Jan  1  1970 .
drwxr-xr-x 4 root root  80 Jan  1  1970 ..
lrwxrwxrwx 1 root root  13 Jan  1  1970 usb-busware.de_CUL868-if00 -> ../../ttyACM0
lrwxrwxrwx 1 root root  13 Jan  1  1970 usb-EnOcean_GmbH_EnOcean_USB_300_DA_FTWMW5A3-if00-port0 -> ../../ttyUSB1
lrwxrwxrwx 1 root root  13 Jan  1  1970 usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0 -> ../../ttyUSB0
pi@raspberrypi ~ $

Then I changed the USB port definition in fhem from
define Mythz THZ /dev/ttyUSB0@115200

into
define Mythz THZ /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0@115200

which obviously should work all the time, independent from sort order of the USB ports.

I did same for the other two devices. After a few days of testing incl. reboot of Raspi I'll add it to the beginner thread in the other forum thread.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: der-Lolo am 21 Februar 2015, 20:20:29
yes - thats the way it should work...
For one wire also - but i was not changing the ports right now, im not 100 percent sure.

your timestamp looks not good...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 21 Februar 2015, 20:23:13
that's the time stamp of the device files, which I can't change. The date itself is fine:
pi@raspberrypi ~ $ date
Sat Feb 21 20:21:43 CET 2015
pi@raspberrypi ~ $
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 22 Februar 2015, 09:06:17
Zitat von: immi am 21 Februar 2015, 18:25:40
If this is true (and I do not understand why, strange), use { } syntax for notify and copy $EVENT in a variable, and then use the variable for setting.

Somehow it's true, checked a couple of times... Indeed, the {} syntax works correctly  :)
define Notify_p99startUnschedVent notify Fan.Unscheduled {my $LastSetVent=$EVENT;;fhem("set Mythz p99startUnschedVent $LastSetVent;;sleep 3;;set Mythz p99startUnschedVent $LastSetVent;;sleep 15;;get Mythz sGlobal;;sleep 15;;get Mythz sGlobal")}
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: THZ_Haus am 22 Februar 2015, 10:00:59
Hallo,

wie kann ich gelesene Werte z.B. die Warmwassertemperatur überwachen.
Soll heißen Wert größer 50 Grad, dann soll eine E-Mail versendet werden.

Gleiches gilt bei Störungen, welche ausgelesen werden.

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: der-Lolo am 22 Februar 2015, 10:19:53
Für solche Sachen ist dieser Thread hier nicht gedacht...
Übrigens auch im erstem Post ist der Optimierungsbereich verlinkt -
http://forum.fhem.de/index.php/topic,33452.0.html.html (http://forum.fhem.de/index.php/topic,33452.0.html.html)
Les dort mal ein wenig!
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Februar 2015, 10:40:03
if you updated in the last days, you have seen 3 new parameters in sHC1, discovered by Andre
   
outsideTemp: 6.2 x08: 8.6 returnTemp: 24.6 integralHeat: 28 flowTemp: 25.1 heatSetTemp: 19.6 heatTemp: 24.6 seasonMode: winter integralSwitch: 101 opMode: standby roomSetTemp: 18 x60: 6.9 x64: 563.2 insideTempRC: 22 x72: 0 x76: 2.2 onHysteresisNo: 0 offHysteresisNo: 1 HCBoosterStage: 0

I still do not understand what they are for: do you want to keep them?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 22 Februar 2015, 11:52:56
Zitat von: andre.k am 21 Februar 2015, 11:28:05
I just upgraded to version 0.134. Many thanks to immi for the graet functionality to write multi value registers.
@all: Could you please test the new version deeply, especially the users of old firmware. Here some new features:
- Writing of parameters/settings is possible for old firmware versions 2.x. In this version only p1..p12 are writable.
- Handling of different payload  for register pFAN  (p37...p46/p75) in firmaware 2.06 vs. 2.14
- New register sProgram (Not parsed in this version, please check the availibility of the register in Firmaware 2.06, in my 2.14 it exists and contains e.g. the operating mode (manual/automatic)

We would like your feedback befor we go further to implement additional set parameters. What use cases make sense in FHEM? Some parameter are may be too dangerous to change with FHEM.
Hallo Andre,
ich habe heute mein FHEM auf die Version 0.135 aktualisiert. Meine LWZ hat die Firmware 2.06.
Das Schreiben der Parameter p01-p12 funktioniert soweit richtig. Das funktioniert aber meistens erst beim 2. oder 3. Versuch. Die Komma-Werte (z.B. 22.1) werden anscheint schlechter übernommen als ganze Werte. Bei Parametern p08FanStageNight und p09FanStageStandby scheint das Lesen noch falsch programmiert zu sein. Wenn ich z.B. p08FanStageNight auswähle und dann "get" betätige, dann bekomme ich nicht den ausgelesenen Wert angezeigt, sondern das Auswahlfeld "get" wechselt von p08FanStageNight auf p01-p12.

Das Auslesen von pFan funktioniert jetzt auch bei meiner Firmware richtig. Super Arbeit von dir und von immi. Vielen Dank.
p37Fanstage1AirflowInlet: 115 p38Fanstage2AirflowInlet: 173 p39Fanstage3AirflowInlet: 230 p40Fanstage1AirflowOutlet: 115 p41Fanstage2AirflowOutlet: 163 p42Fanstage3AirflowOutlet: 230 p43UnschedVent3: 60 p44UnschedVent2: 60 p45UnschedVent1: 60 p46UnschedVent0: 60 p75PassiveCooling: 0 

Das neue Register sProgram wird bei mir so angezeigt:
05EE018F01010202000025F300000004B0000004B0
Gruß Peter
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 22 Februar 2015, 13:21:34
Zitat von: immi am 22 Februar 2015, 10:40:03
if you updated in the last days, you have seen 3 new parameters in sHC1, discovered by Andre
   
outsideTemp: 6.2 x08: 8.6 returnTemp: 24.6 integralHeat: 28 flowTemp: 25.1 heatSetTemp: 19.6 heatTemp: 24.6 seasonMode: winter integralSwitch: 101 opMode: standby roomSetTemp: 18 x60: 6.9 x64: 563.2 insideTempRC: 22 x72: 0 x76: 2.2 onHysteresisNo: 0 offHysteresisNo: 1 HCBoosterStage: 0

I still do not understand what they are for: do you want to keep them?

Please keep it for watching. In the HCBoosterStage: I got the follwing values so far:
0=aus
1=Solar
2=V1

The other two parameter seems to be always 0 or 1 here is my output:

outsideTemp: 9.1 x08: -44.3 returnTemp: 27.4 integralHeat: -87 flowTemp: 31.9 heatSetTemp: 29 heatTemp: 28.6 seasonMode: winter integralSwitch: 100 opMode: normal roomSetTemp: 0 x60: 0 x64: -1433.6 insideTempRC: 0 x72: 0 x76: 0 onHysteresisNo: 1 offHysteresisNo: 0 HCBoosterStage: 2

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 22 Februar 2015, 14:02:05
Zitat von: peter456 am 22 Februar 2015, 11:52:56
Hallo Andre,
ich habe heute mein FHEM auf die Version 0.135 aktualisiert. Meine LWZ hat die Firmware 2.06.
Das Schreiben der Parameter p01-p12 funktioniert soweit richtig. Das funktioniert aber meistens erst beim 2. oder 3. Versuch. Die Komma-Werte (z.B. 22.1) werden anscheint schlechter übernommen als ganze Werte. Bei Parametern p08FanStageNight und p09FanStageStandby scheint das Lesen noch falsch programmiert zu sein. Wenn ich z.B. p08FanStageNight auswähle und dann "get" betätige, dann bekomme ich nicht den ausgelesenen Wert angezeigt, sondern das Auswahlfeld "get" wechselt von p08FanStageNight auf p01-p12.

Das Auslesen von pFan funktioniert jetzt auch bei meiner Firmware richtig. Super Arbeit von dir und von immi. Vielen Dank.
p37Fanstage1AirflowInlet: 115 p38Fanstage2AirflowInlet: 173 p39Fanstage3AirflowInlet: 230 p40Fanstage1AirflowOutlet: 115 p41Fanstage2AirflowOutlet: 163 p42Fanstage3AirflowOutlet: 230 p43UnschedVent3: 60 p44UnschedVent2: 60 p45UnschedVent1: 60 p46UnschedVent0: 60 p75PassiveCooling: 0 

Das neue Register sProgram wird bei mir so angezeigt:
05EE018F01010202000025F300000004B0000004B0
Gruß Peter
Hi Peter,

I have the same behavior. Sometimes I have to set parameter twice, probably a timing issue.
Concerning the p08 and p09 I have the same situation like you only in case of return value=0. When I get value=1..3 it works.
Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Februar 2015, 17:15:54
Zitat von: andre.k am 22 Februar 2015, 14:02:05
I have the same behavior. Sometimes I have to set parameter twice, probably a timing issue.
I would introduce a 0.5s sleep after the reading the parent register ( line 832)
select(undef, undef, undef, 0.5);
Zitat
Concerning the p08 and p09 I have the same situation like you only in case of return value=0. When I get value=1..3 it works.
can you provide a log with verbose5?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 22 Februar 2015, 18:53:02
Zitat von: immi am 22 Februar 2015, 17:15:54
I would introduce a 0.5s sleep after the reading the parent register ( line 832)
select(undef, undef, undef, 0.5);can you provide a log with verbose5?
Hi immi , I just run the commands p08 and p09 . The appendix is the log file with verbose 5.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Februar 2015, 19:24:49
Zitat von: peter456 am 22 Februar 2015, 18:53:02
Hi immi , I just run the commands p08 and p09 . The appendix is the log file with verbose 5.
Peter, you do not have problem with writing; you have problems with every reading also.
Andre, I hope your logfile does not look the same.

I just uploaded v0136 with some waittimes for old firmwares.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 22 Februar 2015, 20:25:43
immi, my logfile looks ok.
2015.02.22 20:18:27 5: THZ_Get: Try to get 'p09FanStageStandby'
2015.02.22 20:18:27 5: THZ_Get: Try to get 'p01-p12'
2015.02.22 20:18:27 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2015.02.22 20:18:27 5: SW: 02
2015.02.22 20:18:27 5: myWP start Funktion THZ_ReadAnswer
2015.02.22 20:18:27 5: THZ_ReadAnswer: uc unpack: '10'
2015.02.22 20:18:27 5: SW: 010018171003
2015.02.22 20:18:27 5: myWP start Funktion THZ_ReadAnswer
2015.02.22 20:18:27 5: THZ_ReadAnswer: uc unpack: '10'
2015.02.22 20:18:27 5: myWP start Funktion THZ_ReadAnswer
2015.02.22 20:18:27 5: THZ_ReadAnswer: uc unpack: '02'
2015.02.22 20:18:27 5: SW: 10
2015.02.22 20:18:27 5: myWP start Funktion THZ_ReadAnswer
2015.02.22 20:18:27 5: double read 1 activated 01
2015.02.22 20:18:27 5: double read 1 result with buf1  0100
2015.02.22 20:18:27 5: double read 2 activated 0100
2015.02.22 20:18:27 5: double read 2 result with buf1  0100B8
2015.02.22 20:18:27 5: double read 3 activated 0100B8
2015.02.22 20:18:27 5: double read 3 result with buf1  0100B81700C8
2015.02.22 20:18:27 5: double read 4 activated 0100B81700C8
2015.02.22 20:18:27 5: double read 4 result with buf1  0100B81700C800BE
2015.02.22 20:18:27 5: double read 5 activated 0100B81700C800BE
2015.02.22 20:18:27 5: double read 5 result with buf1  0100B81700C800BE00
2015.02.22 20:18:27 5: double read 6 activated 0100B81700C800BE00
2015.02.22 20:18:27 5: double read 6 result with buf1  0100B81700C800BE00A001
2015.02.22 20:18:27 5: double read 7 activated 0100B81700C800BE00A001
2015.02.22 20:18:27 5: double read 7 result with buf1  0100B81700C800BE00A001C20190
2015.02.22 20:18:27 5: double read 8 activated 0100B81700C800BE00A001C20190
2015.02.22 20:18:27 5: double read 8 result with buf1  0100B81700C800BE00A001C201900064
2015.02.22 20:18:27 5: double read 9 activated 0100B81700C800BE00A001C201900064
2015.02.22 20:18:27 5: double read 9 result with buf1  0100B81700C800BE00A001C20190006402
2015.02.22 20:18:27 5: double read 10 activated 0100B81700C800BE00A001C20190006402
2015.02.22 20:18:27 5: double read 10 result with buf1  0100B81700C800BE00A001C20190006402010000
2015.02.22 20:18:27 5: double read 11 activated 0100B81700C800BE00A001C20190006402010000
2015.02.22 20:18:27 5: double read 11 result with buf1  0100B81700C800BE00A001C20190006402010000E601
2015.02.22 20:18:27 5: double read 12 activated 0100B81700C800BE00A001C20190006402010000E601
2015.02.22 20:18:27 5: double read 12 result with buf1  0100B81700C800BE00A001C20190006402010000E601D602
2015.02.22 20:18:27 5: double read 13 activated 0100B81700C800BE00A001C20190006402010000E601D602
2015.02.22 20:18:27 5: double read 13 result with buf1  0100B81700C800BE00A001C20190006402010000E601D6021003
2015.02.22 20:18:27 5: THZ_ReadAnswer: uc unpack: '0100B81700C800BE00A001C20190006402010000E601D6021003'
2015.02.22 20:18:27 5: SW: 10
2015.02.22 20:18:27 5: Parse message: B81700C800BE00A001C20190006402010000E601D602
2015.02.22 20:18:27 5: Message length: 44
2015.02.22 20:19:56 5: THZ_Get: Try to get 'p01RoomTempDay'
2015.02.22 20:19:56 5: THZ_Get: Try to get 'p01-p12'
2015.02.22 20:19:56 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2015.02.22 20:19:56 5: SW: 02
2015.02.22 20:19:56 5: myWP start Funktion THZ_ReadAnswer
2015.02.22 20:19:56 5: THZ_ReadAnswer: uc unpack: '10'
2015.02.22 20:19:56 5: SW: 010018171003
2015.02.22 20:19:56 5: myWP start Funktion THZ_ReadAnswer
2015.02.22 20:19:56 5: THZ_ReadAnswer: uc unpack: '10'
2015.02.22 20:19:56 5: myWP start Funktion THZ_ReadAnswer
2015.02.22 20:19:56 5: THZ_ReadAnswer: uc unpack: '02'
2015.02.22 20:19:56 5: SW: 10
2015.02.22 20:19:56 5: myWP start Funktion THZ_ReadAnswer
2015.02.22 20:19:56 5: double read 1 activated 01
2015.02.22 20:19:56 5: double read 1 result with buf1  0100
2015.02.22 20:19:56 5: double read 2 activated 0100
2015.02.22 20:19:56 5: double read 2 result with buf1  0100B817
2015.02.22 20:19:56 5: double read 3 activated 0100B817
2015.02.22 20:19:56 5: double read 3 result with buf1  0100B81700C800
2015.02.22 20:19:56 5: double read 4 activated 0100B81700C800
2015.02.22 20:19:56 5: double read 4 result with buf1  0100B81700C800BE00
2015.02.22 20:19:56 5: double read 5 activated 0100B81700C800BE00
2015.02.22 20:19:56 5: double read 5 result with buf1  0100B81700C800BE00A001C2
2015.02.22 20:19:56 5: double read 6 activated 0100B81700C800BE00A001C2
2015.02.22 20:19:56 5: double read 6 result with buf1  0100B81700C800BE00A001C20190
2015.02.22 20:19:56 5: double read 7 activated 0100B81700C800BE00A001C20190
2015.02.22 20:19:56 5: double read 7 result with buf1  0100B81700C800BE00A001C2019000
2015.02.22 20:19:56 5: double read 8 activated 0100B81700C800BE00A001C2019000
2015.02.22 20:19:56 5: double read 8 result with buf1  0100B81700C800BE00A001C2019000640201
2015.02.22 20:19:56 5: double read 9 activated 0100B81700C800BE00A001C2019000640201
2015.02.22 20:19:56 5: double read 9 result with buf1  0100B81700C800BE00A001C20190006402010000
2015.02.22 20:19:56 5: double read 10 activated 0100B81700C800BE00A001C20190006402010000
2015.02.22 20:19:56 5: double read 10 result with buf1  0100B81700C800BE00A001C20190006402010000E6
2015.02.22 20:19:56 5: double read 11 activated 0100B81700C800BE00A001C20190006402010000E6
2015.02.22 20:19:56 5: double read 11 result with buf1  0100B81700C800BE00A001C20190006402010000E601D602
2015.02.22 20:19:56 5: double read 12 activated 0100B81700C800BE00A001C20190006402010000E601D602
2015.02.22 20:19:56 5: double read 12 result with buf1  0100B81700C800BE00A001C20190006402010000E601D6021003
2015.02.22 20:19:56 5: THZ_ReadAnswer: uc unpack: '0100B81700C800BE00A001C20190006402010000E601D6021003'
2015.02.22 20:19:56 5: SW: 10
2015.02.22 20:19:56 5: Parse message: B81700C800BE00A001C20190006402010000E601D602
2015.02.22 20:19:56 5: Message length: 44


The reading p09FanStageStandby should be "0", but is not returned.
p01RoomTempDay works fine.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Februar 2015, 21:01:29
Hi Andre
nice log, I feel better.
I just simulated B81700C800BE00A001C20190006402010000E601D602:
it is not a bug, it is a feature of fhem ;D
p09FanStageStandby  is "0" and "0" is returned
   
p09FanStageStandby 0   2015-02-22 20:46:50

you just do not see it as answer in the frontend
this affects all versions and all gets which return "0".
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 22 Februar 2015, 21:11:12
Hi immi,
then I am reassured :D

Would it be helpful having an addidional Log3 message in THZ_Get(), if the get is from memory?

Andre

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Februar 2015, 21:41:14
Zitat von: andre.k am 22 Februar 2015, 21:11:12
Hi immi,
then I am reassured :D

Would it be helpful having an addidional Log3 message in THZ_Get(), if the get is from memory?

I added it 10 min before for debugging your message
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 23 Februar 2015, 20:06:33
Zitat von: immi am 22 Februar 2015, 19:24:49
Peter, you do not have problem with writing; you have problems with every reading also.
Andre, I hope your logfile does not look the same.

I just uploaded v0136 with some waittimes for old firmwares.
immi
Hi immi,
what can I do to eliminate the Problems with reading from LWZ?
In my opinion, the monitoring of my LWZ works quite well.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 23 Februar 2015, 23:02:22
I just uploaded v 0.137
changelog
heatcurve has been improved:
- 2 curves are now displayed: one with insideTemp influence (green), the other without(blue).
- heatcurve should support also old firmware (please Andre test it)

@Peter: I am happy if you are happy with the THZ module. Let Andre make the tests for your older firmware.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 26 Februar 2015, 23:16:47
Zitat von: immi am 23 Februar 2015, 23:02:22
- 2 curves are now displayed: one with insideTemp influence (green), the other without(blue).

I think autoscaling does not work after adding second curve.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 27 Februar 2015, 00:09:27
Zitat von: mlb am 26 Februar 2015, 23:16:47
I think autoscaling does not work after adding second curve.
fixed and uploaded

p.s are you sure you need such a high blue line. Don´t you think your p13GradientHC1 and p14LowEndHC1 are too high?
If I were you, I would slowly reduce to
p13GradientHC1           -->  0.35
p14LowEndHC1            --> 3 K
p15RoomInfluenceHC1 --> 60 %
maybe later you can reduce more: mine are much lower
please keep on the discussion in http://forum.fhem.de/index.php/topic,33452.0.html
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 27 Februar 2015, 08:16:05
Zitat von: immi am 27 Februar 2015, 00:09:27
p.s are you sure you need such a high blue line. Don´t you think your p13GradientHC1 and p14LowEndHC1 are too high?
Unexpected but positive side effect of adding the second curve: now it helps to unmask wrong settings  :) .
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 27 Februar 2015, 10:45:01
Yes they are likely too high :) The reason is my main heating source is fireplace connected to house heating system and I have been using LWZ just for DHW and absences - and so I was really looking forward to analyze graphs from FHEM to understand if and how should I use LWZ for heating... That's why I have all these questions.  I'm also looking at electricity consumption, but so far I could not find a good method to analyse it for a period of time, especially when I have 2-tariff electricity meter (in my case I have cheaper energy for 13:00-15:00 and 22:00-06:00 hours).

@immi - thanks, I adjusted those values - let's see what happens :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 27 Februar 2015, 13:23:20
Zitat von: mlb am 27 Februar 2015, 10:45:01
I'm also looking at electricity consumption, but so far I could not find a good method to analyse it...
Youless LS110 is my suggestion (http://bg-etech.de/os/product_info.php/products_id/44). Easy installation, no need to change anything in the power cabling, direct LAN access, supported in FHEM. I use it sonce a few months to track my PV energy creation.
Just in case of bidirectional power meter it might get complicated. I'll need to investigate that soon.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 27 Februar 2015, 14:58:06
Zitat von: mlb am 27 Februar 2015, 10:45:01
Yes they are likely too high :) The reason is my main heating source is fireplace connected to house heating system and I have been using LWZ just for DHW and absences - and so I was really looking forward to analyze graphs from FHEM to understand if and how should I use LWZ for heating... That's why I have all these questions.  I'm also looking at electricity consumption, but so far I could not find a good method to analyse it for a period of time, especially when I have 2-tariff electricity meter (in my case I have cheaper energy for 13:00-15:00 and 22:00-06:00 hours).
In parallel to monitoring, I would program the programHC1XX programDHWXX so that you have 1K more in the heating-set-temp and in the hotwater-set-temp between 13:00-15:00.
During this hours, your current is cheeper and normally in winter the air is hotter.
I wouldn´t do it between 22:00-06:00, because the current is cheeper but it is on avarage colder.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 27 Februar 2015, 17:00:21
Zitat von: immi am 27 Februar 2015, 14:58:06
In parallel to monitoring, I would program the programHC1XX programDHWXX so that you have 1K more in the heating-set-temp and in the hotwater-set-temp between 13:00-15:00.

Absolutely, I have done that already for some time, and have even 5K difference for DHW and a bit less for HC so I use energy more efficiently. Here I had a problem with setting P59 that caused the pump to start prematurely, so I set it to zero. It took several weeks before I understood what this setting does... :)

Still I was hoping to register values like sElectrDHWDay or sElectrHCDay on daily basis just to track usage in different months, just for some reason they are not shown on graphs reasonably.

Zitat von: willybauss am 27 Februar 2015, 13:23:20
Youless LS110 is my suggestion (http://bg-etech.de/os/product_info.php/products_id/44). Easy installation, no need to change anything in the power cabling, direct LAN access, supported in FHEM. I use it sonce a few months to track my PV energy creation.

Thanks - good itea, I will look at it. Just I noticed it needs the old type of meter with rotating plate, they are no longer used here... maybe I could find a used one.

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 27 Februar 2015, 17:03:45
Zitat von: mlb am 27 Februar 2015, 17:00:21

Thanks - good itea, I will look at it. Just I noticed it needs the old type of meter with rotating plate, they are no longer used here... maybe I could find a used one.

The old meters are not a requirement. It works just fine with modern IR meters as I can report. Whether you want to upload your data to bidgely you need to decide.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 27 Februar 2015, 18:23:28
I was also looking at PQc and Pel. Most of times values seem rather reasonable, but sometimes they look too good to be true - like the peak here: can it be the heatpump temporarily has over 700% of  efficiency gain?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 27 Februar 2015, 19:28:01
Zitat von: mlb am 27 Februar 2015, 17:00:21
Still I was hoping to register values like sElectrDHWDay or sElectrHCDay on daily basis just to track usage in different months, just for some reason they are not shown on graphs reasonably.
you simply could write the daily values to the log file at 23:59 every night and create a graph later on


Zitat von: mlb am 27 Februar 2015, 17:00:21
Thanks - good itea, I will look at it. Just I noticed it needs the old type of meter with rotating plate, they are no longer used here... maybe I could find a used one.

The Youless has a config menu where you can enter the numper of pulses per kWh, so you're completely free on which kind of meter you choose.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 27 Februar 2015, 22:55:07
@mlb: Good news for you: The Youless LS110 can be programmed in FHEM to take care of the low and high priced energy usage: http://forum.fhem.de/index.php/topic,16105.msg162791.html#msg162791
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 28 Februar 2015, 09:40:37
Zitat von: mlb am 27 Februar 2015, 18:23:28
I was also looking at PQc and Pel. Most of times values seem rather reasonable, but sometimes they look too good to be true - like the peak here: can it be the heatpump temporarily has over 700% of  efficiency gain?
I also have such peaks somtetimes; do not know where they come from
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 28 Februar 2015, 13:20:16
Hi,

it looks like my MyTHZ Module does not work. Stop Working Yesterday at 15:02. Version 1.37

This is the actual answer Log Verbose 5

2015.02.28 13:10:31 5: Mythz start Funktion THZ_ReadAnswer
2015.02.28 13:10:31 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2015.02.28 13:10:31 5: THZ_Get: Error msg2: 'InterfaceNotRespondig error found at step1 error found at step2'
2015.02.28 13:10:32 5: THZ_Get: Try to get 'programHC2_Tu_1'
2015.02.28 13:10:32 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2015.02.28 13:10:32 5: Mythz sending 02
2015.02.28 13:10:32 5: SW: 02
2015.02.28 13:10:32 5: Mythz start Funktion THZ_ReadAnswer
2015.02.28 13:10:32 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2015.02.28 13:10:32 5: THZ_Get: Error msg2: 'InterfaceNotRespondig error found at step1 error found at step2'

i checked the USB connection on linux, restart raspberry update raspberry, all ok, mythz does not work.

Thats not good...

My THZ works without problems. i Checked Display and Paramter, works....

Restart THZ.... Now THZ and MyTHZ Modul works again.

Can the MyTHZ Modul kill the THZ UART USB Modul?






Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 28 Februar 2015, 15:55:54
Have I understood correctly?
your UART USB interface in your heatpump stopped working and restarted only after you restarted the heatpump.
If this is the case, only Tecalor can anwser your question.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 28 Februar 2015, 16:38:59
Hi,

Also nochmal zum Verständnis, MyTHZ Modul bekommt keine Antwort mehr von der THZ. Habe dann alles geupdatet und mehrmals neugestartet ohne Erfolg. Im Raspian dann USB überprüft alles Ok und da.

Verbose auf 5 gestellt und da ist dann das von eben gekommen. Keine Antwort.
War schon recht ratlos. Habe die THZ dann geschaut ob alles ok ist. Istwerte alle ok und verändern sich. Habe dann einen 10 Sekunden reset gemacht und dann ist alles wieder in Ordnung.

Ist jetzt natürlich nicht so prall. Ursachenforschung ist hier schwierig.

Hast schon recht. Mal beobachten. System war so 60 Tage an.

LG
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 01 März 2015, 19:33:43
v 0.138 uploaded
- p32HystDHW added
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 02 März 2015, 07:02:51
Zitat von: belu am 28 Februar 2015, 13:20:16
Hi,

it looks like my MyTHZ Module does not work. Stop Working Yesterday at 15:02. Version 1.37

This is the actual answer Log Verbose 5

2015.02.28 13:10:31 5: Mythz start Funktion THZ_ReadAnswer
2015.02.28 13:10:31 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2015.02.28 13:10:31 5: THZ_Get: Error msg2: 'InterfaceNotRespondig error found at step1 error found at step2'
2015.02.28 13:10:32 5: THZ_Get: Try to get 'programHC2_Tu_1'
2015.02.28 13:10:32 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2015.02.28 13:10:32 5: Mythz sending 02
2015.02.28 13:10:32 5: SW: 02
2015.02.28 13:10:32 5: Mythz start Funktion THZ_ReadAnswer
2015.02.28 13:10:32 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2015.02.28 13:10:32 5: THZ_Get: Error msg2: 'InterfaceNotRespondig error found at step1 error found at step2'

i checked the USB connection on linux, restart raspberry update raspberry, all ok, mythz does not work.

Thats not good...

My THZ works without problems. i Checked Display and Paramter, works....

Restart THZ.... Now THZ and MyTHZ Modul works again.

Can the MyTHZ Modul kill the THZ UART USB Modul?


did you try to disconnect/reconnect the USB cable before resetting everything? sometimes a hard break is needed on USB. that may belong to the THZ, but it also may belong to the (sometimes quite instable) USB on the RasPi.
I also saw such behavior sometimes in the past.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 02 März 2015, 09:45:31
Hi micomat,

Yes i have disconnect the cable from the Usb port and changed to an other. But no connect with MyThz the THZ will not give a answer...

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 02 März 2015, 11:34:06
hm... so that may be a special problem :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 02 März 2015, 11:58:21
my 2 cents:
Belu's UART USB interface in his heatpump stopped working
Belu said that restarting the PI or disconnecting the cable did´t help.
The  UART USB interface  restarted only after Belu resetted the heatpump.

I see 3 possible root-cause
1)   Firmware bug. The heatpump went in a Software-State which did not support serial communication.
2)   Hardware problem: The heatpump went in a Hardware-State which did not support serial communication.
        a.      Emv/emc caused it
        b.         An electronic component of the heatpump electronics is wearing out

1 and 2a are statistical events equally distributed over time. I would do nothing.
2b is also a statistical event but will increase its frequency of appearance. Keep an eye on it.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 02 März 2015, 12:20:49
@ belu:
Could it have happened that the USB port had a small line drop and afterwards got a new port number, e.g. switched from ...USB0 to ...USB1? That's what I had a few days ago. Locking the port number by using a udev definition didn't help reliably. My solution (http://forum.fhem.de/index.php/topic,33211.msg264942.html#msg264942) was quite simple.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 02 März 2015, 23:19:25
Zitat von: immi am 12 Februar 2015, 21:45:33
it is possble to set the time from fhem, if someone implements it.
nevertheless I do not see how this feature could be usefull. you set it  and do not change it for 10 years.
Today I got the reason for having the THZ's time synchronized tu the FHEM server. I added a few rows to my config in order to get total values per day:
define GetsHeatHCDay at *23:59:00 get Mythz sHeatHCDay
attr GetsHeatHCDay room Heizung
define GetsElectrDHWDay at *23:59:00 get Mythz sElectrDHWDay
attr GetsElectrDHWDay room Heizung
define GetsElectrHCDay at *23:59:00 get Mythz sElectrHCDay
attr GetsElectrHCDay room Heizung
define GetsHeatDHWDay at *23:59:00 get Mythz sHeatDHWDay
attr GetsHeatDHWDay room Heizung
define GetsHeatRecoveredDay at *23:59:00 get Mythz sHeatRecoveredDay
attr GetsHeatRecoveredDay room Heizung


Surprisingly all the logged values were close to zero. Debugging showed that there's a time offset between the THZ and the fhem server; so the values had been read at approx. 00:01 instead of 23:59. As a workaround I use 23:55:00 now, hoping that the difference won't increase so far.

btw: monthly values can be read using this code:

define GetsBoostDHWTotal at *00:01:00 {if($mday == 1) { "get Mythz sBoostDHWTotal" }}
attr GetsBoostDHWTotal room Heizung
define GetsBoostHCTotal at *00:01:00 {if($mday == 1) { "get Mythz sBoostHCTotal" }}
attr GetsBoostHCTotal room Heizung
define GetsElectrDHWTotal at *00:01:00 {if($mday == 1) { "get Mythz sElectrDHWTotal" }}
attr GetsElectrDHWTotal room Heizung
define GetsElectrHCTotal at *00:01:00 {if($mday == 1) { "get Mythz sElectrHCTotal" }}
attr GetsElectrHCTotal room Heizung
define GetsHeatDHWTotal at *00:01:00 {if($mday == 1) { "get Mythz sHeatDHWTotal" }}
attr GetsHeatDHWTotal room Heizung
define GetsHeatHCTotal at *00:01:00 {if($mday == 1) { "get Mythz sHeatHCTotal" }}
attr GetsHeatHCTotal room Heizung
define GetsHeatRecoveredTotal at *00:01:00 {if($mday == 1) { "get Mythz sHeatRecoveredTotal" }}
attr GetsHeatRecoveredTotal room Heizung
define GetsHistory at *00:01:00 {if($mday == 1) { "get Mythz sHistory" }}
attr GetsHistory room Heizung


edit: code updated
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 02 März 2015, 23:53:34
>> .. hoping that the difference won't increase so far.
Hi Willy
you can monitor the drift with

sTimedate
Weekday: Monday Hour: 23 Min: 2 Sec: 30 Date: 2015/3/2
2015-03-02 23:01:43


I see 7 second drift in the last 10 month.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 03 März 2015, 07:52:13
I see a difference of 24 seconds - so the code using 23:59:00 should have worked  :-\ .
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 03 März 2015, 09:18:52
Zitat von: willybauss am 03 März 2015, 07:52:13
I see a difference of 24 seconds - so the code using 23:59:00 should have worked  :-\ .
Willy
if you are using a RasPi, for sure you update the time at boot from internet (no real-time clock)
How often you update time afterwards?
If you google, you should see that a RasPi could drift half-a-second every hour.

As opposite, the heatpump has a real-time clock.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 03 März 2015, 09:26:46
I sync all of my computers, including Raspi but excluding THZ, once per day using my Fritz box as time server. Fritz box is being synced once per day with an internet time server.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 04 März 2015, 13:31:19
All,

I've just updated the release history in both (DE/EN) Wiki pages and added some corrections.
Thanks to Rene for preparing all the data.

Markus
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 04 März 2015, 14:25:38
Thanks Markus and Rene.!!
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 05 März 2015, 01:19:49
@immi

I'm just testing the new raspberry pi 2 with Fhem. In general it is a bit faster, but also I have noticed that perl uses just a single thread when generating graphs - so there is no real benefit from 4 cores new raspi is equipped with. I was just wondering if this is something you could consider for the future, or the chart generation is outside of THZ module?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 05 März 2015, 18:27:39
Zitat von: mlb am 05 März 2015, 01:19:49
I'm just testing the new raspberry pi 2 with Fhem. In general it is a bit faster, but also I have noticed that perl uses just a single thread when generating graphs - so there is no real benefit from 4 cores new raspi is equipped with. I was just wondering if this is something you could consider for the future, or the chart generation is outside of THZ module?
Hi
fhem is single thread,
some effort is made in 4 directions:
1) taking the computation out of server and into client
2) generating plots in advance; this could be triggered with "notify" or "at" http://www.fhemwiki.de/wiki/Creating_Plots_-_caching_SVG%27s
3) http://www.fhemwiki.de/wiki/Blocking_Call
4) SubProcess.pm  http://forum.fhem.de/index.php/topic,34320.0.html . I am testing it and there is lots todo.

nevertheless for speeding up multiple plots, file access speed should be increased.
To my opinion, the bottleneck is reading 4 or 5 times the huge logsfiles.
My feeling is that in some cases, for generating graphs, a good RAM-caching strategy is very effective; have you tried using a ramdisk for logs?

If you are an expert with perl-multithreading (a nice oxymoron), or you have lots of time please get involved.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 05 März 2015, 20:08:06
I'm far from being a good developer, although yes, a while ago I did some small development myself for home automation, including multi-threading in C - just never in Perl...

Zitat von: immi am 05 März 2015, 18:27:39
nevertheless for speeding up multiple plots, file access speed should be increased.
I actually tested that at first instance :) Since the new raspi has 1GB of RAM, I created ramdisk and copied log files there - easy thing to do, you just need
sudo mkdir -p /ram
sudo mount -t tmpfs -o size=50m tmpfs /ram
sudo chmod 777 /ram

and ramdisk is at  /ram, where 50m is the size, 50 Megabytes in my case.  Then of course not to lose log files in case of power failure - they can be periodically synchronized with non-volatile storage, preferably via rsync.

Then I had a look at htop to see how the new hardware is handling Fhem and saw just a single core at 100% - that's where my question was coming from.

No problem - this is not a must-have feature, although a good home automation system in my opinion should use multi-threading - separate threads to handle separate external devices, as they usually communicate in asynchronous mode. In my home automation system devices communicate over IP, commands are sent via http and statuses broadcasted via UDP. It works very well, just since Fhem seems to be single-threaded - I have some doubts I could successfully integrate it, also because of language barrier I have when trying to understand other comments written in German.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 05 März 2015, 21:13:42
ZitatIn my home automation system devices communicate over IP, commands are sent via http and statuses broadcasted via UDP. It works very well, just since Fhem seems to be single-threaded - I have some doubts I could successfully integrate it, also because of language barrier I have when trying to understand other comments written in German.
I have 160 defined entities (17 lights, 15 windowshutters, 10 termostate, gas-sensor, heatpump...) in fhem, which are working quite well together on a cheap NAS, where mail-server a web-server is also running.
FHEm code is improving every day, because many people are contributing. Multithreading will come, I am sure.

Concerning german... It is not my mother language, therefore, when I comunicate here I write in I-english.
Someone answer in D-english. Do not be scared of it.

Concerning perl. I am learning it by writing 00_THZ.pm.


p.s. I haven´t understood. Did you see an improovement with the ramdisk?
I must say, that I do not like the 100% CPU time; strange.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 05 März 2015, 22:12:58
Nice :) I have similar, a bit larger size - around 250 outputs, 100+ inputs, 30+ DACs,  and a couple other things. The control logic is already there, written in C. I know is not very portable, but when I run it on old raspi - it only takes 4 to 5% of CPU.  I'm just lacking a good visualisation and reporting. I know I could use Fhem to send commands via http, just the problem is to collect statuses that are sent asynchronously over UDP.

Zitat von: immi am 05 März 2015, 21:13:42
p.s. I haven´t understood. Did you see an improovement with the ramdisk?
I must say, that I do not like the 100% CPU time; strange.

Yes, there was a noticeable improvement when using ramdisk. Still, when you have 4 graphs on the same page - there is some time to wait before Fhem refreshes all of them. And a single core of raspi 2 is about 50% faster than CPU on "classic" raspi (I have two of those).

By the way - it is easy to add RTC to raspi - I have something like this, based on DS1302 (http://www.zedt.eu/tech/hardware/using-ds1302-real-time-clock-module-raspberry-pi/) - working already for 2 years without problem, I actually combined it with NTP and created internal time server for my network.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 März 2015, 12:09:01
v 0139 uploaded
changelog: added pClockDay, pClockMonth, pClockYear, pClockHour, pClockMinutes

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 16 März 2015, 20:05:15
works perfectly, thanks.

Updating the THZ time monthly could look like

define SetClockMinutes at *00:27:00 {if($mday == 1) { "set Mythz pClockMinutes 27" }}
attr SetClockMinutes room Heizung


(assuming that the drift is less than 27 minutes per month  ;) )
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 16 März 2015, 21:05:30
Zitat von: immi am 23 Februar 2015, 23:02:22
I just uploaded v 0.137
changelog
heatcurve has been improved:
- 2 curves are now displayed: one with insideTemp influence (green), the other without(blue).
- heatcurve should support also old firmware (please Andre test it)

@Peter: I am happy if you are happy with the THZ module. Let Andre make the tests for your older firmware.
Hallo Andre.k,

hast du schon bei deiner LWZ die Heizkurve getestet?
Wenn das funktioniert, wie kann ich das bei mir einrichten?
Gruß
Peter
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 16 März 2015, 22:43:05
Zitat von: peter456 am 16 März 2015, 21:05:30
Hallo Andre.k,
hast du schon bei deiner LWZ die Heizkurve getestet?
Wenn das funktioniert, wie kann ich das bei mir einrichten?
Hi Peter
It should work for everyone the same.

define wl_hr2 weblink htmlCode <div class="SVGplot"><embed src="/fhem/THZ_PrintcurveSVG/" type="image/svg+xml" /></div> <a href="/fhem?detail=wl_hr2">wl_hr2</a><br>
attr wl_hr2 room heatpump

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 17 März 2015, 09:08:03
Vielen Dank Immi.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 17 März 2015, 21:53:09
Hi immi,
hi peter,

today I've found some time to test the heat curve function. There is a small bug in the title string. Line 1543 should be
  ($p13GradientHC1, $p14LowEndHC1, $p15RoomInfluenceHC1) = (split ' ',ReadingsVal($devname,"pHeat1",0))[1,3,5];


The red working point looks good but the blue curve seems to be strange. Do you have an idea?

Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 17 März 2015, 23:38:40
Andre
your changes makes sense  so far.

have a look also here some lines later
  my ($heatSetTemp, $roomSetTemp, $insideTemp) = (split ' ',ReadingsVal($devname,"sHC1",0))[11,21,27];

from your plot $roomSetTemp, $insideTemp are 1°C and -2892°C respectively; this makes no sense

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 18 März 2015, 10:06:50
That's probably because I don't have an inside temperature sensor. And my old THZ doesn't have an externel (remote) control unit.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 März 2015, 11:12:19
Zitat von: andre.k am 18 März 2015, 10:06:50
That's probably because I don't have an inside temperature sensor. And my old THZ doesn't have an externel (remote) control unit.
Andre, the missing temp sensore is not the problem.
$roomSetTemp=1 actually 0 is a problem.
please post the original and the parsed register of sHC1.
Probably you need a different parsing of sHC1.
thanks
Immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 18 März 2015, 15:06:49
Immi, you are right. We need a different parsing rule for roomSetTemp in my firmware and probably for 2.06.

[" roomSetTemp: ",   62, 4, "hex2int", 10]
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 März 2015, 17:07:43
Hi Andre
can you look also at insidetemp in sHC1?
If the sensor is not connected, insideTempRC should be equal to $roomSetTemp.

Hi Peter
do you have a temperature sensor connected?
can you post an example of your register sHC1; I mean the hex values?
you can get it with verbose5
thanks
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 18 März 2015, 18:48:13
Hi Immi,
ja ich habe einen Innen-Temperatursensor an der LWZ.
Hier sind die Daten vom Register sHC1:
2015.03.18 18:41:27 5: THZ_ReadAnswer: uc unpack: '010072F4007D020701A7000001D600CC01B500010002121800640100000000CD0000000000E100000000B61003'
2015.03.18 18:41:27 5: Mythz sending 10
2015.03.18 18:41:27 5: SW: 10
2015.03.18 18:41:27 5: Parse message: 72F4007D020701A7000001D600CC01B500010002121800640100000000CD0000000000E100000000B6
2015.03.18 18:41:27 5: Message length: 82
2015.03.18 18:41:27 5: Triggering Mythz (1 changes)
2015.03.18 18:41:27 5: Notify loop for Mythz sHC1: outsideTemp: 12.5 x08: 51.9 returnTemp: 42.3 integralHeat: 0 flowTemp: 47 heatSetTemp: 20.4 heatTemp: 43.7 seasonMode: summer integralSwitch: 100 opMode: normal roomSetTemp: 20.5 x60: 0 x64: 0 insideTempRC: 22.5 x72: 0 x76: 0 onHysteresisNo: 0 offHysteresisNo: 1 HCBoosterStage: 0
2015.03.18 18:41:27 5: rg_thz: not on any display, ignoring notify
2015.03.18 18:41:27 5: rg_thz_stat: not on any display, ignoring notify

Meine Heizkurve (siehe Anhang) sieht soweit gut aus, oder?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 18 März 2015, 19:40:14
The curve with the special parsing now looks ok, but I don't find an value for insideTempRC equal to roomSetTemp in the message.

2015.03.18 19:20:01 5: Parse message: 5BF40065001A01FD002302320105020C00020001011D00640200000000000000BE024F000000000002000000E6
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 März 2015, 19:50:30
ok
then I fork sHC1 for you (2.14) but not for peter (2.06)

v0140 uploaded
please test tomorrow.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 22 März 2015, 20:25:13
Hi immi,

V0.140 works fine.
Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 28 März 2015, 10:23:18
Thanks immi - heating curves finally are working fine for me too :) They did not before, I think there was a problem wish scaling
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 28 März 2015, 14:41:26
Happy it works and that you like it
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 31 März 2015, 14:31:29
Hi immi,

for the 2.x users I implemented the set parameter time and date. These are may be useful for summer/winter time adjustment, although some days too late :D
--- 00_THZ.140.pm       2015-03-31 13:39:50.957769638 +0200
+++ 00_THZ.pm   2015-03-31 12:16:29.712267229 +0200
@@ -237,10 +237,10 @@
              [" Date: ",               12, 2, "year", 1],              ["/",           14, 2, "hex", 1],
              ["/",                     16, 2, "hex", 1]
             ],
-  "FCtime206" => [["Weekday: ", 7, 1,  "weekday", 1],  [" Hour: ",     8, 2, "hex", 1],
-             [" Min: ",                10, 2,  "hex", 1],              [" Sec: ",      12, 2, "hex", 1],
-             [" Date: ",               14, 2, "year", 1],              ["/",           18, 2, "hex", 1],
-             ["/",                     20, 2, "hex", 1]
+  "FCtime206" => [["Weekday: ", 7, 1,  "weekday", 1],  [" pClockHour: ", 8, 2, "hex", 1],
+             [" pClockMinutes: ", 10, 2,  "hex", 1],   [" Sec: ", 12, 2, "hex", 1],
+             [" pClockYear: ", 14, 2, "hex", 1],       [" pClockMonth: ", 18, 2, "hex", 1],
+             [" pClockDay: ",  20, 2, "hex", 1]
             ],
   "FDfirm" => [["version: ",   4, 4, "hex", 100]
             ],
@@ -496,7 +496,12 @@
   "p09FanStageStandby" => {parent=>"p01-p12", argMin =>   "0", argMax =>    "3",       unit =>""},
   "p10RoomTempManual"  => {parent=>"p01-p12", argMin =>  "10", argMax =>   "65",       unit =>" °C"},
   "p11DHWsetTempManual"        => {parent=>"p01-p12", argMin =>  "10", argMax =>   "65",       unit =>" °C"},
-  "p12FanStageManual"  => {parent=>"p01-p12", argMin =>   "0", argMax =>   "3",        unit =>""}
+  "p12FanStageManual"  => {parent=>"p01-p12", argMin =>   "0", argMax =>   "3",        unit =>""},
+  "pClockDay"          => {parent=>"sTimedate", argMin =>  "1", argMax =>  "31", unit =>""},
+  "pClockMonth"                => {parent=>"sTimedate", argMin =>  "1", argMax =>  "12", unit =>""},
+  "pClockYear"         => {parent=>"sTimedate", argMin =>  "12", argMax =>  "20",  unit =>""},
+  "pClockHour"         => {parent=>"sTimedate", argMin =>  "0", argMax =>  "23", unit =>""},
+  "pClockMinutes"      => {parent=>"sTimedate", argMin =>  "0", argMax =>  "59", unit =>""}
  );

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 31 März 2015, 17:00:37
Hi Andre
I spend lots of time with the "partent" data stucture.
But now it seams to repay.
I will have a look this night.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 31 März 2015, 21:11:57
v 0.141 uploaded:
- set parameter time and date for 2.x users implemented
- comment out of line706 //opened

this is a small update for people having newer firmware.
Please test anyway because I removed a small piece of code, which (to my opinion) is not neded anymore, because devio.pm has been fixed.
If after updating, Mythz remains disconnected for long time, take away the comment "#" from line 706.
Please give me feedback anyway.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 03 April 2015, 15:37:52
Das Umstellen der Zeit funktioniert gut.
Für mich eine sehr wichtige Funktion.
Vielen Dank.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: michaelk68 am 05 April 2015, 10:05:57
Hi immi,

with v0.141 I have problems with THZ disconnected after a while.
When I uncomment line 706 I got error
"msg2 InterfaceNotRespondig error found at step1 error found at step2"
any ideas?

Michael

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 05 April 2015, 13:58:50
Zitat von: michaelk68 am 05 April 2015, 10:05:57
with v0.141 I have problems with THZ disconnected after a while.
When I uncomment line 706 I got error
"msg2 InterfaceNotRespondig error found at step1 error found at step2"
any ideas?
yes, to my opinion it has nothing to do with line 706 or v0.141.
It disconnect because you have no connection.
0) what was your previous installed version v0.140?
1) is it happening sporadically (now and then) or always
2) If always; have you installed additional usb devices or upgraded your linux? could it be that you are using the wrong usb path? Willy had some troublle after updating his raspi; the /dev/usbsomething changed to /dev/usbsomethingelse.

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 05 April 2015, 20:27:44
Zitat von: immi am 05 April 2015, 13:58:50
... Willy had some troublle after updating his raspi; the /dev/usbsomething changed to /dev/usbsomethingelse.
Topic is described here (http://forum.fhem.de/index.php/topic,33452.msg271164.html#msg271164).
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 12 April 2015, 14:44:25
Let us assume that I would be able to implement the manual OnOff of the heating circuit pump.
What are the consequence of an unintentional misuse?
Could the the heating circuit be misused in summer to move the heat from the living room to the basement (which is colder)?

I would like to know your opinion before starting.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: der-Lolo am 12 April 2015, 16:34:32
Is there such a big difference in the floors that it makes sense? Maybe there is another way to bring some cold fresh water in the system...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 12 April 2015, 17:43:48
Zitat von: der-Lolo am 12 April 2015, 16:34:32
Is there such a big difference in the floors that it makes sense? Maybe there is another way to bring some cold fresh water in the system...
Now I have 4K  between basement (19°C) and sleep-room (23°C).
Don´t get me wrong, it is not for now, but for this summer.
Last summer, I experienced 6K delta.

Maybe, there is a better way: The best way would be to generate hotwater, with the exceding heat; But this is out of my capabilities.
but back to my question: What are the consequence of an unintentional misuse?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 12 April 2015, 20:42:30
For moving the heat to a different room it is definitely the right way to use the heating circuit pump. Water is a medium which can carry much more energy than air of the ventilation.

The risk of misuse is: pump can be switched off accidentally while heat pump or (worst case) booster is active. In case of heat pump it will just cause a high presure failure and switch it off.In case of booster it can damage the booster or it can set your house on fire.

Risk analyses says: low risk, but extremely high impact if it happens => don't do it.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 12 April 2015, 21:04:54
Hi,

Ich finde die Idee gut, das Risiko das der überschaubar. Also bei meiner 304 ist es so das da ein 2 Wege Ventil drin ist. Entweder Heizkreis oder Warmwasser Bereitung.
Wenn wir die Kreislaufpumpe extern ansteuern um die Zurkulation vom Keller zu den heißeren Räumen nutzen passiert nichts auch wenn die Pumpe dann Warmwasser bereiten möchte.
Ich hatte ja genau diesen Fall schon gehabt. Ventil hing und hatte dann 45 Grad Vorlauf Temperatur. Ganz zur Sicherheit gibt es noch den Sicherheitstemperatur begrenzter.
Gefahr sehe ich in einem Punkt. Kondensbildung.
Angenommen 80 % Luftfeuchte. 25 Grad im Schlafzimmer und 16 Grad Kaltes Wasser aus dem Keller. Schon haben wir Kondensat wo wir nicht brauchen können. Stiebel hat nicht umsonst die Kühlfunktion nur mit einem zweiten Display freigeschaltet der genau die Luftfeuchte im Führungsraum überwacht.

LG
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: der-Lolo am 12 April 2015, 21:07:46
den Taupunkt im raum zu überwachen wäre aber sicher nicht das problem...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 12 April 2015, 21:30:28
Das Problem ist nicht, dass die Pumpe sich aus versehen einschaltet, sondern dass sie sich im falschen Moment ABschaltet, nämlich dann, wenn grade mit dem Heizstab geheizt wird. Dafür gibt es keine Sicherheitsfunktion. Der Heizstab heizt weiter, bekommt die Hitze nicht weg und brennt entweder durch oder er setzt die Anlage in Brand.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 12 April 2015, 22:02:13
Also die hat den STB über 75 Grad schaltet der den Heizstab frei...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 12 April 2015, 23:06:13
Interesting discussion, thanks to all
fyi I never needed the booster in the last 2 years; very very unlikely in Summer.

p.s I found the register controlling the pump of the heating circuit; I still do not know whether I want to make it easily available to everyone.

Toastbrot if you are interested in risk management, there are 2 very interesting books from Taleb: The Black Swan and Antifragile. I really like the author.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 12 April 2015, 23:46:52
So immi you See a potential to use manual circulation for cooling. Can you calculate how long you need cooling to see a reduction in room temperature of maybe just 1K. Dew point you can test. When you see floor condensation buildup then it is too much. It makes a difference whether you have laminate or tile flooring. The question is: how does the thz 304 achieve its cooling function? And why does the 303 have no cooling option? Is it just marketing or are the large technical differences? I would be interested if it doesn't break the thz.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 13 April 2015, 00:22:19
Zitat von: houseowner123 am 12 April 2015, 23:46:52
So immi you See a potential to use manual circulation for cooling.
Not cooling: 
Just an idea to move the heat in the basement, which (luckily in winter but unfortunately in sommer) is not an infinite cold reservuar.
If you limit the game only to 2 rooms upstairs and you have 5K delta between upstairs and basement, maybe you get  1 or 2K less in the sleep rooms.

How long? I do not know
how does the thz 304 achieve its cooling function? no idea
And why does the 303 have no cooling option? no idea

For 1K less, I am not really scared of condensing-water. I want to be sure that I do not damage the heat-pump, before trying.

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 13 April 2015, 07:55:40
304 cooling functionality is realized by inverting the heating cycle: keep cold inhouse, move heat out using the exhaust ventilator. This is a mechanically built in function (software support as well of course), which the 303 doesn't have.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 20 April 2015, 17:59:48
Hi,
may be a total silly question but I just think of making use of HZ2 as second Heatingcircle when I detected that my THZ 403SOL have no possibility to connect such Heatcircle 2.

Am I mad, I have the config Parameter but no physical Connection option. Their are at the TopLeft just 4 Tupes, 2 for Hotwater and 2 for Heating. On the bottom right there are 2 more for SOL.

Sorry for asking this here as it has nothing todo with FHEM nor with code improvement, but here are the experts.

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 April 2015, 11:25:38
Hi Heiner
My question is why do you need a second HC?

Sorry for the late answer,
I wanted to give you a qualified one, but I do not know anyone with 2 HC installed.
As you see on the manuals SOL and ECO are the same in this point.
http://www.tecalor.de/dam/jcr:8c31554d-ecb0-4e05-a951-4a6bbea4e9e1/bedienung---installation-luftungsgerat-thz-303-403-sol.pdf
http://www.tecalor.de/dam/jcr:e3453746-0903-43a0-847d-9c78fee1804d/312700-38495-9030_THZ_304-404_Integral_eco_Installation_de.pdf

in both cases, if you want a second HC, you have to install a second pump.
I would reformulate your question in: where I PUT the second pump, inside the box or outside?
Outside: Look at page 24 of this http://www.stiebel-eltron.cz/imperia/md/content/mba/166459_33599_7939_lwz_303_und_sol.pdf

I would try also to search here www.haustechnikdialog.de

p.s. If you want, you can also keep on the discussion in german here
http://forum.fhem.de/index.php/topic,33452.0.html
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 22 April 2015, 12:04:56
Thanks Immi, I overlooked this page 24, it is a little more than just another pump outside in order to be able to deal with all parameter around a heating circle you need to measure some temps as well, however I understand it now.

Reason for asking is that I have a Pool at home and thought of using this second circle to Heat it especially in spring and autumn when weather is nice but the water temp still is a little cold.

But here and now it is clear what would need to happen, Thanks again.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 April 2015, 15:16:57
Hi Heiner,
Actually for your application, you can connect the pool to HC1 with 2 valves controlling when do you want to heat the pool.

---
Moreover, in summer,  you could circulate HC1 in the pool and without any effort (1 pipe, 2 valves and 1 thermometer) you can cool down your living room in summer!!
Assume you have 26°C in your living room and 22 in the pool, you just have to circulate to cool down your livingroom.

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 April 2015, 19:13:12
back to the module
what do you think about the following interfece potential change of backend: see picture.
Front-end can still be configured as you like.
I would be happy for some feedback, before rolling out
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 22 April 2015, 21:26:59
I realized it similarly in my dashboard months ago, see screenshot. Disadvantage of sliders is that it's not so easy to find exactly the right value; might work better in case you limit the possible range to a very narrow one.

opmode is t.b. changed very rarely. Curently I'm thinking about an automatic change of opmode in a way like this, executed every night at e.g. 3 am: (code is just roughly written down so far, no syntax check etc. done)
if (Mythz.inside_temp < Mythz.p01RoomTempNightHC1) AND (Mythz.pOpMode = "DHWmode") then
set Mythz pOpMode automatic
endif

if (Mythz.inside_temp > (Mythz.p01RoomTempNightHC1 + 1)) AND Mythz.outsidetemp > 4 AND (Mythz.pOpMode = "automatic") then
set Mythz pOpMode DHWmode
endif


My intention is not on avoiding manual setting of opmode, but on saving energy: this could avoid useless heating cycles at approx. 4 am, when the house is still warm enough, warmed up by sunshine of previous day. Currently the heating cycle starts anyway, just caused by low outside temperature. I don't want to set room influence to more than the current 70%, therefore I need such an alternative solution.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 24 April 2015, 17:12:33
Zitat von: willybauss am 22 April 2015, 21:26:59
Disadvantage of sliders ...
I agree completely; moreover you have no indication of the unit with a slider.....so I am not sure I will upload it to the repository.
The only advantage is that you cannot type a wrong value in the backend
have a look....

p.s. If you have a front-end like willy, you will not see any difference.
p.s.2 I also added a firmware "4.39technician" to enable  manual control: "zPumpHC", "zPumpDHW"


immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 26 April 2015, 23:40:39
Meanwhile I had a bit of success in automatic THZ mode switching between automatic and DHW mode. Looks like it works; at least it doesn't end up in error messages when I save the 99_myUtils.pl. But testing is not so easy, since there's a very limited number of chances when temperatures fit required values.

@immi:
For that reason I would like you to have a look on the code, since I'm not really familiar with perl coding.
BR
Willy

Code in 99_myUtils.pm:
######## ThzSummerWinterMode ############################################
## Aufruf   { ThzSummerWinterMode() }
sub ThzSummerWinterMode () {
if(fhem( "Mythz.inside_temp" ) lt fhem( "Mythz.p01RoomTempNightHC1" ) and ( fhem( "Mythz.pOpMode" ) eq "DHWmode")) {
   fhem( "set Mythz pOpMode automatic" );
    }
if(fhem( "Mythz.inside_temp" ) gt ( fhem( "Mythz.p01RoomTempNightHC1" ) + 1 ) and ( fhem( "Mythz.outsidetemp") gt 4 ) and (fhem( "Mythz.pOpMode" ) eq "automatic")) {
   fhem( "set Mythz pOpMode DHWmode ");
    }
}


Code in fhem.cfg:

define CheckThzMode at *02:00:00  { ThzSummerWinterMode() }
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 27 April 2015, 00:09:15
I agree with willy, the slider can be almost as nerve racking as the stupid jog dial on the LWZ itself. OpMode I change once in a while, especially pur setback when I am gone for just 1 or 2 days. Therefore, I like your option 2, immi. Vacation cools the house to uncomfortable temp. In the summer it is no problem. Willy: Why do you play around with automatic and DHW toggle options ? When May is here, just setting OpMode to DHW until End of Sept. seems easier? So, where is the (energy-saving?) advantage of your option?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 27 April 2015, 01:17:22
Hi Willy
no need for perl coding
try something like this

define opmodechange DOIF (([Mythz:sHC1:[insideTempRC. (\d+)]] < [Mythz:p01RoomTempNightHC1:d]) and ([Mythz:sHC1:pOpMode] eq "DHWmode")) (set Mythz pOpMode automatic)
attr opmodechange cmdpause 7200
attr opmodechange room heatpump


[Mythz:sHC1:[insideTempRC. (\d+)]] means look in sHC1 and take the valuee after insideTempRC
[Mythz:p01RoomTempNightHC1:d] means take the reading and disgard the °C
the attribute is over there in case the temperature is dancing up and down. It says do not trigger again before 7200s.

I have not tested it. Improve it with an else.... just look in commandref
define di_threshold DOIF ([sensor:temperature]<([sensor:default]-[sensor:hysteresis])) (set heating on) DOELSEIF ([sensor:temperature]>[sensor:default]) (set heating off)

p.s. If you implement the else you can skip checking opmode
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 27 April 2015, 08:16:34
Zitat von: houseowner123 am 27 April 2015, 00:09:15
... When May is here, just setting OpMode to DHW until End of Sept. seems easier? So, where is the (energy-saving?) advantage of your option?
Zitat von: willybauss am 22 April 2015, 21:26:59
... Curently I'm thinking about an automatic change of opmode ..., executed every night at e.g. 3 am...
My intention is not on avoiding manual setting of opmode, but on saving energy: this could avoid useless heating cycles at approx. 4 am, when the house is still warm enough, warmed up by sunshine of previous day. Currently the heating cycle starts anyway, just caused by low outside temperature. I don't want to set room influence to more than the current 70%, therefore I need such an alternative solution.
These unnecessary nightly heating cycles happen in spring time and most probably im autumn as well over a period of ~ 2 months. Savind 2 hours * 1.5kW every night will save a lot of energy.

@immi:
Thanks a lot. I'll have a look into your suggestion in next few days.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 28 April 2015, 19:47:50
Thanks willy, I will check it out and report back.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 29 April 2015, 22:07:18
Hi since 3 days I habe issues with the THZ module. I do not get ans data anymore and my log keeps empty.
If I do a manual GET i do geht this mesage: msg2 closed connection

Ans clue what vor why this is?

I use V 141
If i define a new device i geht the readings for some minutes, thereafter same effect. Somit can exclude wrong setting of attributes vor a impact of DBLog.
Last thing before was that i define  SYSMON Device to See my BananPi, but reemoved it again.

Log is silent, no Entry about THZ

Thanks for your hell.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 29 April 2015, 22:12:26
v 0142 uploaded
- firmware 4.39technician added to enable  manual control: zPumpHC, zPumpDHW
- dropbox for opmode added (backend only)
- multiple select buttons for simple parameters like fanstage  (backend only)

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 29 April 2015, 22:15:23
Zitat von: Heiner am 29 April 2015, 22:07:18
Hi since 3 days I habe issues with the THZ module. I do not get ans data anymore and my log keeps empty.
If I do a manual GET i do geht this mesage: msg2 closed connection
I use V 141
Since when are you using v0141? I uploaded it 4 weeks ago. Can you exclude a problem with it?

I just looked at sysmon: it looks in all usb ports ... are you sure sysmon is not loaded in your fhem?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 29 April 2015, 22:57:21
Zitat von: immi am 27 April 2015, 01:17:22
Hi Willy
no need for perl coding
try something like this

define opmodechange DOIF (([Mythz:sHC1:[insideTempRC. (\d+)]] < [Mythz:p01RoomTempNightHC1:d]) and ([Mythz:sHC1:pOpMode] eq "DHWmode")) (set Mythz pOpMode automatic)
attr opmodechange cmdpause 7200
attr opmodechange room heatpump

...
Hi immi,

unfortunately DOIF ends up in

Zitatopmodechange DOIF: unknown expression format: pOpMode
After having checked commandref and wiki I still don't understand the problem. Any idea from your side?
Willy

edit:
[Mythz:sHC1:pOpMode] has to be replaced by  [Mythz:pOpMode]   ==> fixed
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 29 April 2015, 23:07:52
@immi:

Is the short syntax, e.g.  [Mythz:pOpMode]  limited to DOIF, of can it be a general replacement for the lengthy ReadingsVal(...) ?

I tried to use it in combination with a normal "if", but it doesn't seem to work.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 30 April 2015, 13:56:50
Zitat von: willybauss am 29 April 2015, 23:07:52
@immi:
Is the short syntax, e.g.  [Mythz:pOpMode]  limited to DOIF, of can it be a general replacement for the lengthy ReadingsVal(...) ?
I tried to use it in combination with a normal "if", but it doesn't seem to work.

TO my knoledge it is limited to some modules like DOIF or IF.... just look to commandref

pay attention it works in "IF" as module not as perl command: perl command are between { }

Der IF-Befehl dient in erster Linie zur Vereinfachung der Schreibweise in Kombination mit anderen FHEM-Modulen wie at, notify oder DOIF. Intern wird der IF-Befehl zur Ausführung in einen Perl if-Befehl umgesetzt. Das soll anhand von Beispielen verdeutlicht werden:

IF ([switch] eq "off") (set lamp on)
entspricht:
{if (Value('switch') eq "off"){fhem('set lamp on')}}


IF ([living_room:temperature] > 12) (set lamp on, set lamp2 off)
entspricht:
{if (ReadingVal('living_room','temperature','') > 12) {fhem('set lamp on');;fhem('set lamp2 off')}}


IF ([bathroom:humidity] > 70) (set led red) ELSE (set led green)
entspricht:
{if (ReadingsVal('bathroom','humidity','') > 70) {fhem('set led red')} else {fhem('set led green')}}



immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 30 April 2015, 19:01:59
Hi Immi, Im pretty sure  Ihave 141 a liilte while, however can check with one older Version.

I realy wonder to be the only one....

Will try with Verbose 5 tötet some Logfile Feedback
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 30 April 2015, 21:31:23
I found a older V108, same effect

I switched to verbose 5 but the log is not super helpfull
.2015.04.30 21:23:18 5: THZ_Get: Try to get 'p01RoomTempDayHC1'
2015.04.30 21:23:18 5: THZ_Get_Comunication: Check if port is open. State = '(automatic)'
2015.04.30 21:23:18 5: THZ_Get: Error msg2: 'closed connection'


If i do a shutdown Rastatt however the THZ reading works AG least once

Die anyone has any idea what I could check or change ?

All other Moduls seem to work fine.
Could it be a defect in my serial to USB converter? should that drive a General Debian log file somewhere?

And suggestion is welcome
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 30 April 2015, 22:44:16
Hi Heiner
well it remains only to:
1) force update to all modules
2) restart the linux
3) post all logfiles (not only mythz) with verbose 5

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 01 Mai 2015, 08:36:07
Zitat von: immi am 30 April 2015, 13:56:50
TO my knoledge it is limited to some modules like DOIF or IF.... just look to commandref
..
Thanks. Looks like I should rework my code completely to shorten it by using IF instead of if.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 01 Mai 2015, 10:00:42
Zitat von: willybauss am 01 Mai 2015, 08:36:07
Thanks. Looks like I should rework my code completely to shorten it by using IF instead of if.
remember not to use IF between {}
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 01 Mai 2015, 13:16:27
It looks like it's not possible to just redefine a previous  'at' or  'notify' into a 'DOIF'. The code is ok and acepted by fhem, but doesn't react on any events. I had to delete the previous definition first and then add the new one. This sequence works.

I started with switches etc. (can be tested easily) and will now go on with Mythz. I'll add the updated config code to the other thread as soon as it works well and is tested for a few days.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: der-Lolo am 01 Mai 2015, 13:54:10
DOIF and IF are quit easy to get things running, the syntax is easy to handle and nice to organize...
DOIF and IF can also work together... For example something like this...
([pl_soBad] eq "on") (
IF ([pr_soBad] eq "present")
   (IF ([player:config] eq "auto") (set sonos_Bad Volume 12,
   set sonos_Wohnzimmer AddMember sonos_Bad, attr pr_soBad disable 1,
   set EntertainmentEvents add Bad Lautsprecher im Automatikmode angeschaltet und zur Wohnzimmer Wiedergabe hinzugefügt...)
   ELSE (set EntertainmentEvents add Der Bad Lautsprecher ist im Sonossystem zur Wiedergabe bereit...,
   attr pr_soBad disable 1)
   )
ELSE
   (set pl_soBad off,set EntertainmentEvents add Netzwerkeinbindung missglückt, ich versuche den Player neu zu starten.,
   define at_pl_soBad at +00:00:05 set pl_soBad on)
)

I am using this modules for a longer time now - and i am still happy...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 01 Mai 2015, 15:51:38
Error found, but I do not get what is wrong.

the whole morning I played around with different fhem.cfg files.

Now I detected that the line

attr Heizung stateFormat pOpmode

cause the Problem.But why.

I just wanted to see on the Device that Popmode and it works and Shows "automatic" rather than "open" as without this Attribute. But it cause the Problem of not being able to perform any GET command anymore.

Is my idea wrong, or shall we state a hint in the Wiki?


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 01 Mai 2015, 17:54:53
Zitat von: Heiner am 01 Mai 2015, 15:51:38
Error found,
attr Heizung stateFormat pOpmode
cause the Problem.But why.
I just wanted to see on the Device that Popmode and it works and Shows "automatic" rather than "open" as without this Attribute. But it cause the Problem of not being able to perform any GET command anymore.
Is my idea wrong, or shall we state a hint in the Wiki?
You cannot change the status of the interface. I check it before reading and writing


if you want to see or change the opmode, do something like this

define opmode readingsProxy Mythz:pOpMode
attr opmode alias Operation Mode
attr opmode group THZ
attr opmode room pompa
attr opmode setFn {$CMD = "$READING $CMD"}
attr opmode setList state:automatic,standby,DAYmode,setback,DHWmode,manual,emergency
attr opmode webCmd state


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 15 Mai 2015, 11:54:34
Hi, comming back to Immi's Feedback from April:
ZitatActually for your application, you can connect the pool to HC1 with 2 valves controlling when do you want to heat the pool.

---
Moreover, in summer,  you could circulate HC1 in the pool and without any effort (1 pipe, 2 valves and 1 thermometer) you can cool down your living room in summer!!
Assume you have 26°C in your living room and 22 in the pool, you just have to circulate to cool down your livingroom.

I agree just one Heatcircle is needed. if I have a electrical 3way Valve to Switch "Vorlauf" between usual Heating circuit and "Poolwater heat exchanger" i do not really a second valve for the "Ruecklauf" - if nothing goes in, nothing can get out. Correct?

ok, so two elements I Need which are the 3-way valve and the heat exchanger. For a water heatexchanger there are some conditions to work more effectivly, one is a larger Delta Temp, the second is a larger flow.

I could now build a dummy which Switch my valve for
- a limited Duration:
- heating the pool (move 3 way valve into the other Position)
- increase flow temp (different heatcurve)
- increase flow (l/h)
- after the Duration move back to original values
- switch back valve

Question:

Can I somehow influence the flow of the pump with any given Parameter of the THZ? Or do I need to manually adjust at the pump itself?
Which Parameter do I change to what value to get a flow temp of ideally stable 50° at a outside temp of about 20°?

Asumme Sommermode must be at about 30°, to enable heating Option
Day Temp and Night Temp at about 50°
Gradient to 0
Flow Proportion ?
Low End ?

In case I would like to use this to cool down my home, I need a second valve to bring the flow from pump via poolhetexchanger to house heating and back to the pump. But being realistic, if i heat the Pool to about 25-27°, cooling the home is only usefull for outside temps beyond 30°. Can we Switch the heatpump on without heating, means in summermode?






Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 Mai 2015, 15:42:08
Zitat von: Heiner am 15 Mai 2015, 11:54:34
Question:
Can I somehow influence the flow of the pump with any given Parameter of the THZ? Or do I need to manually adjust at the pump itself?
Not to my knoledge
Zitat
Which Parameter do I change to what value to get a flow temp of ideally stable 50° at a outside temp of about 20°?
50°C vorlauf for the pool??
I wouldn´t do it
Zitat
In case I would like to use this to cool down my home, I need a second valve to bring the flow from pump via poolhetexchanger to house heating and back to the pump. But being realistic, if i heat the Pool to about 25-27°, cooling the home is only usefull for outside temps beyond 30°. Can we Switch the heatpump on without heating, means in summermode?
Yes, If the question is: can we switch the heatcircuit and the heatpump-compressor indipendently?
But you have to be very carefull in what you do; you could really damage your tecalor.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 22 Mai 2015, 16:38:36
My feature to switch between DHW mode and automatic mode works quite well, but tonight I observed an unexpected behavior:
# prüfe alle 2 Stunden um xx:03:00 ob zu kalt und schalte ggf. Heizung ein
define OpModeDhwToAuto at +*02:00:00 IF (([Mythz:sHC1:[insideTempRC. (\d+)]] < [Mythz:p02RoomTempNightHC1:d]) and ([Mythz:pOpMode] eq "DHWmode")) (set Mythz pOpMode automatic)
attr OpModeDhwToAuto alignTime 00:03:00
attr OpModeDhwToAuto room Heizung

# prüfe 1 mal nachts un 2 Uhr, ob innen und aussen warm genug und schalte ggf, Heizung aus
define OpModeAutoToDhw at *02:02:00 IF (([Mythz:sHC1:[insideTempRC. (\d+)]] > [Mythz:p02RoomTempNightHC1:d]) and ([Mythz:outside_temp] > 4) and ([Mythz:pOpMode] eq "automatic")) (set Mythz pOpMode DHWmode)
attr OpModeAutoToDhw room Heizung

p02RoomTempNightHC1  is set to 21.5 °C.
So I expect the mode to switch from DHW to automatic just if insideTempRC is less than 21.5°C. But tonight this switch happened while insideTempRC was at 21.9°C. Can anyone imagine why?  As far as I understand the regular expression   (\d+)  should just cut the ' °C' part, but should not cut the '.9' as well. May I need to replace the dot by a comma, or what could be the root cause and/or the solution?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: der-Lolo am 22 Mai 2015, 21:26:38
Hey Willi,
i don't know what happens there, but when i try with Regex things i allways use a page like that one
http://www.regexr.com/
Copy & paste the related event to the field - an the REGEX to the line more in top...

enjoy & good luck!

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Mai 2015, 21:58:21
Zitat von: willybauss am 22 Mai 2015, 16:38:36
So I expect the mode to switch from DHW to automatic just if insideTempRC is less than 21.5°C. But tonight this switch happened while insideTempRC was at 21.9°C. Can anyone imagine why?  As far as I understand the regular expression   (\d+)  should just cut the ' °C' part, but should not cut the '.9' as well. May I need to replace the dot by a comma, or what could be the root cause and/or the solution?

Hi Willy
it probably truncates...
instead of insideTempRC. (\d+)
try following

insideTempRC. (-?\d+(\.\d+)?)
or
insideTempRC. (\S+)

I just tested them with http://www.regexr.com/ from der-lolo and they seam to work

p.s. why don´t you use doif intead of at+if ?
doif  shows you each condition in the frontend.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 23 Mai 2015, 08:12:12
@ der-Lolo:
Thanks for the link - looks really good

@ immi:
Looks like  (\S+)  should work and is much easier than the other one. I'll test it for a while.

at + IF  <=> DOIF:
I had already changed everything to DOIF, but then I realized that the clear visibility of next execution time was gone. DOIF shows in the frontend something like

DOIF
Mythz.alarm_insideTempHigh  cmd_2
Mythz.alarm_insideTempLow   cmd_2


while the at + IF combination shows e.g.
at
OpModeAutoToDhw   Next: 02:02:00
OpModeDhwToAuto   Next: 10:03:00
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 23 Mai 2015, 08:21:29
a different topic:
I frequently observe the issue, that unscheduled fan selector changes  (p43 ... p46)  are often not accepted by the THZ, though correctly requested via FHEM or via display. Again: even THZ display driven changes are not always executed by the THZ !

I believe I'm not the only one having this problem.

I wonder if I should enhance my fhem code to check shortly after every change if it works and redo the action if necessary. On the other side I think it's a more common issue and therefore might belong to the THZ module.

Any comments?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 23 Mai 2015, 12:36:14
Hi Willy
I thought on "unscheduled fan"
the peculiar feature about the parameter is that its status does tell you if it is active or not.
this means that you have to  monitor the speed of the fan in order to chek if it is activated..... and combining the two readings (to make it really failproof) is not easy.

therefore I differenciate.

If I want something "now" like "turn off the  vent for 1h because someone cuts  the grass", I use FHEM with the button 60minoff.
Easy and reliable.

If I want something automatic like "increase the speed of the vent for 30 min if airquality is low", I prefer unscheduled-fan.
It is not reliable, but I do not care, because if it doesn´t  start now, it will start 30 min later, if the airquality is still bad.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 23 Mai 2015, 21:30:25
unfortunately I do not yet have a connection between fan speed and air quality, so I have to do it manually. And in that case there's no automatic re-check every 30 minutes ...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: NaCkHaYeD am 20 Juli 2015, 23:26:33
Hi,

ich wollte wie in diesem Thread schon Mal besprochen mir eine Mail bei diversen Events auf Handy schicken lassen, z.B. wenn der Unterdrucksensor geschalten hat, da dieser bei mir resettet werden muss. Hierzu benutze ich
define Mythz.alarm_ovenFireplace notify Mythz { if (((split ' ',ReadingsVal("Mythz","sGlobal",0))[49]) < ReadingsVal("Mythz", "ovenFireplace_old", 0)) { DebianMail('abc@@xyz.de','Alarm Waermepumpe, Unterdrucksensor','Unterdrucksensor für Kamin hat ausgelöst. Bitte an der Messdose oberhalb vom Kühlschrank die rechte Taste(Enter) zur Quittierung für 3sec drücken.','') ;; } fhem("setreading Mythz ovenFireplace_old ". ((split ' ',ReadingsVal("Mythz","sGlobal",0))[49]));; }

Dies funktioniert soweit bis auf zwei Einschränkungen.

1. Bei Stromausfall geht der Sensor auf Störung. Eine Mail kann aber nicht gesendet werden, da auch die DSL Leitung tod ist. Geht die Leitung wieder ist mein Trigger mit ovenFireplace < ovenFireplace_old vorüber.
2. Der Sensor macht ab und dann einen Selbsttest, d.h. auch hier bekommt die Wärmepumpe den Schaltkontakt mit. Die Mail darf aber nicht verschickt werden.

Idee:
1. Ich habe mir in SendMail einen Rückgabewert eingebaut, der das Successful prüft und so der Gedanke erst dann die Variable ovenFireplace in ovenFireplaceOld kopiert
2. Ich wollte mir mit ovenFireplace < ovenFireplace_old ein Event Triggern, dass beim nächsten Mal Lesen der sGlobals prüft, ob immer noch der Fehler ansteht. Wenn ja, dann erst Mail.

Problem:
Ich scheitere klaglos an FHEM Notify etc. Hat jemand eine Idee wie man einen Einschaltverzögerer baut und zusätzlich noch den positiven SendMail abfragt. Also dass ich SendMail mit "&&" verknüseln muss, dass weiß ich, jedoch wie der ganze Abschnitt lauten muss.

mfg
NaCkHaYeD
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 21 Juli 2015, 00:58:23
Zitat von: willybauss am 23 Mai 2015, 08:21:29
I frequently observe the issue, that unscheduled fan selector changes  (p43 ... p46)  are often not accepted by the THZ, though correctly requested via FHEM or via display. Again: even THZ display driven changes are not always executed by the THZ !

I believe I'm not the only one having this problem.

I wonder if I should enhance my fhem code to check shortly after every change if it works and redo the action if necessary. On the other side I think it's a more common issue and therefore might belong to the THZ module.

Any comments?

I can confirm - it usually does not start for me immediately when I'm trying to activate any of unscheduled fans level.
However I have noticed that my LWZ usually starts fans if I do a sequence:

step 1 - start level x
step 2 - pause a couple of seconds
step 3 - start level 0
step 4 - pause a couple of seconds
step 5 - start level x
(where x is in 1..3)

I wonder if you experienced such behaviour too... if so, maybe it would be worth to automate it?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: NaCkHaYeD am 21 Juli 2015, 09:18:12
About the unscheduled fan selector changes i can also confirm this issue. I Need about two or three times pressing the Level setting, otherwise the THZ seems to ignore it. I think it doesn´t depend on the Level I press. I can also press three times the same, and it works also.

Anyway, nice FHEM Lib, i appreciate the work on it. It is not a big deal for me.

mfg
NaCkHaYeD
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 24 Juli 2015, 11:13:50
FHEM could help starting ventilation automatically at night (and p75passiveCooling = 1), after specific conditions are met.. I had a look at DOIF function, just the following returns error at set Mythz p99startUnschedVent 1, I have no idea why...
define AutoCoolingVentilation DOIF ([23:00-04:00] and [Mythz:inside_temp] > 26 and [Mythz:outside_temp] < 19 and [Mythz:outputVentilatorPower] eq 0) (set Mythz p99startUnschedVent 1)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 24 Juli 2015, 14:59:24
Hi mlb
there are may things that could be a problem
1) eq  expects a string "0"  ; or you can use == 0
2) do you have user-defined inside_temp, outside_temp and  outputVentilatorPower outside of sGlobal?
or rewording, what happens when you write {ReadingsVal("Mythz","inside_temp","NaN")} or {ReadingsVal("Mythz","outputVentilatorPower","NaN")}

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 24 Juli 2015, 20:06:46
Hi immi

Readings seem to work fine, please see the attached screenshot... Where this error could come from?

Also in log file I have 2015.07.24 20:02:25 2: AutoCoolingVentilationTest: set Mythz p99startUnschedVent 3: 3

Regards
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 24 Juli 2015, 22:30:50
if you get such a logfile it means the doif worked fine
2015.07.24 20:02:25 2: AutoCoolingVentilationTest: set Mythz p99startUnschedVent 3: 3

I have no idea what is the error field: you shoud ask damian, as PM and post the anwer here, or under Automatisierung
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Damian am 24 Juli 2015, 22:55:52
Zitat von: mlb am 24 Juli 2015, 20:06:46
Hi immi

Readings seem to work fine, please see the attached screenshot... Where this error could come from?

Also in log file I have 2015.07.24 20:02:25 2: AutoCoolingVentilationTest: set Mythz p99startUnschedVent 3: 3

Regards

error is set if the return value of the function (here: set Mythz p99startUnschedVent 3) is not zero or not "". But it has no effect on the execution.

Damian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 25 Juli 2015, 00:13:48
Thanks, this explains  it :)

So here is the function that works for me:

define AutoCoolingVentilation DOIF (([23:00-24:00] or [00:00-03:00]) and [Mythz:inside_temp] > 26 and [Mythz:outside_temp] < 19 and [Mythz:outputVentilatorPower] ==  0) ({fhem("set Mythz p99startUnschedVent 3")};;;;sleep 1)
attr AutoCoolingVentilation room Heating


This additional sleep 1 forces return value 0. And fans are started as needed, they are cooling my house at the moment (because of passive cooling set to 1). I set unscheduled ventilation level 3 at 60% of fans power, so with combination of active cooling mode 1 exhaust fan goes to 80% and input fan is stopped. Last night I activated it manually and worked pretty well (with some windows slightly open), and now it starts automatically  8)

Thanks again for support.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 25 Juli 2015, 10:11:43
excellent mbl and Damian
I do not think that "sleep" blocks fhem for 1s; but to be sure I would prefer return()
{fhem "set Mythz p99startUnschedVent","3";;return()}
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: NaCkHaYeD am 05 August 2015, 09:09:53
@mlb
Ich persönlich sehe bei deiner Lösung momentan zwei Probleme:
1. Es wird nicht geprüft, ob die Lüfter per manueller Eingabe stillstehen, z.B. wenn es draußen brennt und die Lüftung nicht laufen darf.
2. Es wird nicht geprüft, ob die Fenster gekippt sind. Dieser Fall könnte gegenüber 1. öfters vorkommen.

Ich habe einen ähnlichen Fall zwecks Lüftung und Temperatur. Sinn der doppelten Zeitangabe ist es, das Lüftungsprogram abzubilden, welches unterschiedlich zwischen Werktag und Wochenende ist. Ebenso wird geprüft ob die Drehzahl der Lüfter 0 ist. Bei hoher Aussentemperatur wird die Lüftung von 250 auf 125 m³/h abgesenkt. Im Umkehrschluss, wenn die Innentemperatur zu niedrig ist, die Lüftung in der Nacht von 125 auf 200 m³/h erhöht.
Die Prüfung erfolgt pro Stunde, der manuelle Eingriff ist ebenso eine Stunde lang.
Ausbaustufe zwei wird sein, die manuellen Eingriff am Tag zu zählen und die Anzahl in der Nacht gegenzusteuern.

# Lüftung im Sommer bei hoher Außentemperatur absenken
define VentSommerReduziert DOIF ([+[1]:00] and ([?06:30-18:59|12345] or [?07:30-19:29|06]) and ([Myhtu21dogcD:temperature] > 24.5 and [Myhtu21dwzcD:temperature] > 24.5) and [Mythz:AussenTemp] > 26.0 and [Mythz:VentZuluft] ne 0 and [Mythz:VentAbluft] ne 0) (set Mythz p39Fanstage3AirflowInlet 125;;set Mythz p42Fanstage3AirflowOutlet 125;;set Mythz p43UnschedVent3 60;;set Mythz p99startUnschedVent 3;;sleep 1)
attr VentSommerReduziert room 11_Heizung_Hand

# Lüftung im Sommer bei niedriger Außentemperatur erhöhen
define VentSommerErhoeht DOIF ([+[1]:00] and ([?19:00-06:29|12345] or [?19:30-07:29|06]) and ([Myhtu21dogcD:temperature] > 24.5 and [Myhtu21dwzcD:temperature] > 24.5) and [Mythz:AussenTemp] < 23.0 and [Mythz:VentZuluft] ne 0 and [Mythz:VentAbluft] ne 0) (set Mythz p39Fanstage3AirflowInlet 200;;set Mythz p42Fanstage3AirflowOutlet 200;;set Mythz p43UnschedVent3 60;;set Mythz p99startUnschedVent 3;;sleep 1)
attr VentSommerErhoeht room 11_Heizung_Hand


Dies soll aber nur eine Anregung, keine Kritik sein.

@immi
return() nimmt er bei mir nicht, ungültiges Kommando

mfg
NaCkHaYeD
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 05 August 2015, 11:08:02
Zitat von: NaCkHaYeD am 05 August 2015, 09:09:53
return() nimmt er bei mir nicht, ungültiges Kommando

Hi
you have probably forgotten to use the brackets correctly.
"return" is a perl command and not a fhem command.
read here http://fhem.de/commandref_DE.html FHEM-Befehlstypen

gruß
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 09 August 2015, 09:16:04
v 0.143 uploaded
added heatcurves to backend, added p77OutThermFilterTime
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: NaCkHaYeD am 10 August 2015, 13:08:04
Hi,

habe mir noch auch eine Sommer/Winter Automatik gebaut, jedoch funktioniert diese leider nicht. Habe schon diverse Möglichkeiten ausgetestet.
Per Logig wird die Lüfterdrehzahl 3 geändert, das manuelle 3er Intervall auf 60min gestellt, und die manuellen Lüfterstufe gesetzt.
Nun ist es so, dass es nicht zuverlässig funktioniert, obwohl im Log meines Erachtens die sets vorhanden sind. Die THZ zeigt mir aber an, dass Sie auf Manuell steht, jedoch scheinbar in einer falschen Stufe, eben die, welche gerade durch das THZ-Programm aktiv ist. Also 1 (Tag) bzw. 2 (Nacht).

Logs:

2015.08.10 13:00:02 2: VentSommerReduziertSetDrehzahl: set Mythz p39Fanstage3AirflowInlet 125;set Mythz p42Fanstage3AirflowOutlet 125: 125 m3/h
125 m3/h
2015.08.10 13:00:02 2: VentSommerReduziertSetDrehzahl: set Mythz p39Fanstage3AirflowInlet 125;set Mythz p42Fanstage3AirflowOutlet 125: 125 m3/h
125 m3/h
2015.08.10 13:00:12 2: VentSommerReduziertSetZeit: set Mythz p43UnschedVent3 55;sleep 1: 55 min
2015.08.10 13:00:13 2: VentSommerReduziertSetZeit: set Mythz p43UnschedVent3 55;sleep 1: 55 min
2015.08.10 13:00:21 2: VentSommerReduziertSetModus: set Mythz p99startUnschedVent 3;sleep 1: 3
2015.08.10 13:00:22 2: VentSommerReduziertSetModus: set Mythz p99startUnschedVent 3;sleep 1: 3
2015.08.10 13:00:31 2: VentSommerReduziertSetModus2: set Mythz p99startUnschedVent 3;sleep 1: 3
2015.08.10 13:00:32 2: VentSommerReduziertSetModus2: set Mythz p99startUnschedVent 3;sleep 1: 3


Programm:

define VentAutoMode Dummy
attr VentAutoMode devStateIcon man:vent_ventilation_level_manual_m sommer:weather_summer winter:weather_winter
attr VentAutoMode group 02_automatische_Drehzahlsteuerung
attr VentAutoMode room 12_Heizung_Vent
set  VentAutoMode man
attr VentAutoMode setList state:man,sommer,winter
attr VentAutoMode webCmd man:sommer:winter         

define VentSommerReduziertDrehzahl Dummy
attr VentSommerReduziertDrehzahl group 02_automatische_Drehzahlsteuerung
set VentSommerReduziertDrehzahl 125
attr VentSommerReduziertDrehzahl room 12_Heizung_Vent
attr VentSommerReduziertDrehzahl setList state:slider,70,5,280
attr VentSommerReduziertDrehzahl webCmd state

define VentSommerErhoehtDrehzahl Dummy
attr VentSommerErhoehtDrehzahl group 02_automatische_Drehzahlsteuerung
set VentSommerErhoehtDrehzahl 200
attr VentSommerErhoehtDrehzahl room 12_Heizung_Vent
attr VentSommerErhoehtDrehzahl setList state:slider,70,5,280
attr VentSommerErhoehtDrehzahl webCmd state

define VentSommerInnenTemp Dummy
attr VentSommerInnenTemp group 02_automatische_Drehzahlsteuerung
set VentSommerInnenTemp 24.5
attr VentSommerInnenTemp room 12_Heizung_Vent
attr VentSommerInnenTemp setList state:textField
attr VentSommerInnenTemp webCmd state

define VentSommerReduziertAussenTemp Dummy
attr VentSommerReduziertAussenTemp group 02_automatische_Drehzahlsteuerung
set VentSommerReduziertAussenTemp 26.0
attr VentSommerReduziertAussenTemp room 12_Heizung_Vent
attr VentSommerReduziertAussenTemp setList state:textField
attr VentSommerReduziertAussenTemp webCmd state

define VentSommerErhoehtAussenTemp Dummy
attr VentSommerErhoehtAussenTemp group 02_automatische_Drehzahlsteuerung
set VentSommerErhoehtAussenTemp 23.0
attr VentSommerErhoehtAussenTemp room 12_Heizung_Vent
attr VentSommerErhoehtAussenTemp setList state:textField
attr VentSommerErhoehtAussenTemp webCmd state

define VentSommerErhoehtTempDifferenz Dummy
attr VentSommerErhoehtTempDifferenz group 02_automatische_Drehzahlsteuerung
set VentSommerErhoehtTempDifferenz 1.0
attr VentSommerErhoehtTempDifferenz room 12_Heizung_Vent
attr VentSommerErhoehtTempDifferenz setList state:textField
attr VentSommerErhoehtTempDifferenz webCmd state

# Lüftung im Sommer bei hoher Außentemperatur absenken
# Zunächst die Drehzahlen und Dauer setzen, falls noch nicht erfolgt
define VentSommerReduziertSetDrehzahl DOIF ([VentAutoMode] eq "sommer" and [+[1]:00] and ([?06:30-19:01|12345] or [?07:30-19:01|06]) and (([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > [VentSommerInnenTemp] and [Mythz:AussenTemp] > [VentSommerReduziertAussenTemp] and ([Mythz:p39Fanstage3AirflowInlet] ne [VentSommerReduziertDrehzahl] or [Mythz:p42Fanstage3AirflowOutlet] ne [VentSommerReduziertDrehzahl])) (set Mythz p39Fanstage3AirflowInlet [VentSommerReduziertDrehzahl];;set Mythz p42Fanstage3AirflowOutlet [VentSommerReduziertDrehzahl])
# dann die Lüftung auf 60min
define VentSommerReduziertSetZeit DOIF ([VentAutoMode] eq "sommer" and [([+[1]:00] + 10)] and ([?06:30-19:01|12345] or [?07:30-19:01|06]) and (([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > [VentSommerInnenTemp] and [Mythz:AussenTemp] > [VentSommerReduziertAussenTemp] and [Mythz:VentZuluft] != 0 and [Mythz:VentAbluft] != 0) (set Mythz p43UnschedVent3 55;;sleep 1)
# dann die Lüftung auf manuell stellen
define VentSommerReduziertSetModus DOIF ([VentAutoMode] eq "sommer" and [([+[1]:00] + 20)] and ([?06:30-19:01|12345] or [?07:30-19:01|06]) and (([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > [VentSommerInnenTemp] and [Mythz:AussenTemp] > [VentSommerReduziertAussenTemp] and [Mythz:VentZuluft] != 0 and [Mythz:VentAbluft] != 0) (set Mythz p99startUnschedVent 3;;sleep 1)
define VentSommerReduziertSetModus2 DOIF ([VentAutoMode] eq "sommer" and [([+[1]:00] + 30)] and ([?06:30-19:01|12345] or [?07:30-19:01|06]) and (([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > [VentSommerInnenTemp] and [Mythz:AussenTemp] > [VentSommerReduziertAussenTemp] and [Mythz:VentZuluft] != 0 and [Mythz:VentAbluft] != 0) (set Mythz p99startUnschedVent 3;;sleep 1)
attr VentSommerReduziertSetDrehzahl room 12_Heizung_Vent
attr VentSommerReduziertSetZeit room 12_Heizung_Vent
attr VentSommerReduziertSetModus room 12_Heizung_Vent
attr VentSommerReduziertSetModus2 room 12_Heizung_Vent
attr VentSommerReduziertSetDrehzahl group 00_DOIF
attr VentSommerReduziertSetZeit group 00_DOIF
attr VentSommerReduziertSetModus group 00_DOIF
attr VentSommerReduziertSetModus2 group 00_DOIF

# Lüftung im Sommer bei niedriger Außentemperatur erhöhen
# Zunächst die Drehzahlen und Dauer setzen, falls noch nicht erfolgt
define VentSommerErhoehtSetDrehzahl DOIF ([VentAutoMode] eq "sommer" and [+[1]:00] and ([?19:00-06:01|12345] or [?19:30-07:01|06]) and (((([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > [VentSommerInnenTemp] and [Mythz:AussenTemp] < [VentSommerErhoehtAussenTemp]) or ((([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > ([Mythz:AussenTemp] + [VentSommerErhoehtTempDifferenz]))) and ([Mythz:p39Fanstage3AirflowInlet] ne [VentSommerErhoehtDrehzahl] or [Mythz:p42Fanstage3AirflowOutlet] ne [VentSommerErhoehtDrehzahl])) (set Mythz p39Fanstage3AirflowInlet [VentSommerErhoehtDrehzahl];;set Mythz p42Fanstage3AirflowOutlet [VentSommerErhoehtDrehzahl])
# dann die Lüftung auf 60min
define VentSommerErhoehtSetZeit DOIF ([VentAutoMode] eq "sommer" and [([+[1]:00] + 10)] and ([?19:00-06:01|12345] or [?19:30-07:01|06]) and (((([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > [VentSommerInnenTemp] and [Mythz:AussenTemp] < [VentSommerErhoehtAussenTemp]) or ((([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > ([Mythz:AussenTemp] + [VentSommerErhoehtTempDifferenz]))) and [Mythz:VentZuluft] != 0 and [Mythz:VentAbluft] != 0) (set Mythz p43UnschedVent3 55;;sleep 1)
# dann die Lüftung auf manuell stellen
define VentSommerErhoehtSetModus DOIF ([VentAutoMode] eq "sommer" and [([+[1]:00] + 20)] and ([?19:00-06:01|12345] or [?19:30-07:01|06]) and (((([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > [VentSommerInnenTemp] and [Mythz:AussenTemp] < [VentSommerErhoehtAussenTemp]) or ((([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > ([Mythz:AussenTemp] + [VentSommerErhoehtTempDifferenz]))) and [Mythz:VentZuluft] != 0 and [Mythz:VentAbluft] != 0) (set Mythz p99startUnschedVent 3;;sleep 1)
define VentSommerErhoehtSetModus2 DOIF ([VentAutoMode] eq "sommer" and [([+[1]:00] + 30)] and ([?19:00-06:01|12345] or [?19:30-07:01|06]) and (((([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > [VentSommerInnenTemp] and [Mythz:AussenTemp] < [VentSommerErhoehtAussenTemp]) or ((([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > ([Mythz:AussenTemp] + [VentSommerErhoehtTempDifferenz]))) and [Mythz:VentZuluft] != 0 and [Mythz:VentAbluft] != 0) (set Mythz p99startUnschedVent 3;;sleep 1)
attr VentSommerErhoehtSetDrehzahl room 12_Heizung_Vent
attr VentSommerErhoehtSetZeit room 12_Heizung_Vent
attr VentSommerErhoehtSetModus room 12_Heizung_Vent
attr VentSommerErhoehtSetModus2 room 12_Heizung_Vent
attr VentSommerErhoehtSetDrehzahl group 00_DOIF
attr VentSommerErhoehtSetZeit group 00_DOIF
attr VentSommerErhoehtSetModus group 00_DOIF
attr VentSommerErhoehtSetModus2 group 00_DOIF


Gestern Nacht hatte ich per Diagramm den Zustand, dass jedes zweite Mal es funktioniert hat, deswegen habe ich jetzt probehalber mal  die Zeit auf 55 min gestellt, bei Interval 60min. Ebenso gebe ich nun zwei Mal das Kommando.

Ich habe aber wie gesagt auch festgestellt, wenn ich selber das Kommando gebe, dass es nicht zuverlässig per FHEM funktioniert. Immer erst auf den zweiten Drücker.

mfg
NaCkHaYeD
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 10 August 2015, 15:53:55
Zitat von: NaCkHaYeD am 10 August 2015, 13:08:04
Ich habe aber wie gesagt auch festgestellt, wenn ich selber das Kommando gebe, dass es nicht zuverlässig per FHEM funktioniert
The tecalor understands the command but sometimes does not obey: it requires that you repeat the command twice, without waiting too much.
The problem is typical for "set Mythz p99startUnschedVent x", and has nothing to do with FHEM.
If you search in the forum, some users noted that this is happening also if you use the tecalor display interface.

So if you want to change the speed of the ventilator you have 2 possibilities.
1)   Use "set Mythz p08FanStageNight x" and after that change it to "y" (always works)
2)   Use  "set Mythz p99startUnschedVent x" and repeat it until the tecalor wants to obey
I prefer the second possibility.
e.g.
([co20:voc] > 1900 and [Mythz:sGlobal:[inputVentilatorPower. (\d+)]] < 29) (set Mythz p99startUnschedVent 2)

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 11 August 2015, 02:49:36
Zitat von: immi am 09 August 2015, 09:16:04
v 0.143 uploaded
added heatcurves to backend, added p77OutThermFilterTime

Thanks, immi!
What exactly is p77 OutThermFilterTime showing?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 11 August 2015, 11:14:02
Zitat von: micomat am 11 August 2015, 02:49:36
What exactly is p77 OutThermFilterTime showing?
Hi
quote from tecalor

Direktanwahl: P77
Um zu vermeiden, dass bei schnellen Außentemperaturänderungen
die Heizkurve verschoben wird und dadurch die Wärmepumpe
ständig ein- und ausschaltet, wird die Außentemperatur
gedämpft. Es wird ein Mittelwert über die eingestellte Zeit gebildet.
Die Dämpfung kann unter diesem Parameter zwischen
0 und 24 Stunden variiert werden.

ciao
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 14 August 2015, 07:48:07
Thx!
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: NaCkHaYeD am 17 August 2015, 11:55:06
Hi,

bin jetzt von außerplanmässige Lüftung auf Drehzahl 3 (Party) gegangen, da das THZ Feature nicht zuverlässig funktioniert. Von 10 Versuchen haben 4-6 immer pro Tag funktioniert. Selbst wenn man das Kommando gegeben, Istwerte rückgelesen, wiederholt hat.

Mein Code ist wie folgt, wobei nur der Sommerbetrieb momentan umgesetzt:

define VentAutoMode Dummy
attr VentAutoMode devStateIcon man:vent_ventilation_level_manual_m sommer:weather_summer winter:weather_winter
attr VentAutoMode group 02_automatische_Drehzahlsteuerung
attr VentAutoMode room 12_Heizung_Vent
set  VentAutoMode man
attr VentAutoMode setList state:man,sommer,winter
attr VentAutoMode webCmd man:sommer:winter

define VentSommerReduziertDrehzahl Dummy
attr VentSommerReduziertDrehzahl group 02_automatische_Drehzahlsteuerung
set VentSommerReduziertDrehzahl 125
attr VentSommerReduziertDrehzahl room 12_Heizung_Vent
attr VentSommerReduziertDrehzahl setList state:slider,70,5,280
attr VentSommerReduziertDrehzahl webCmd state

define VentSommerErhoehtDrehzahl Dummy
attr VentSommerErhoehtDrehzahl group 02_automatische_Drehzahlsteuerung
set VentSommerErhoehtDrehzahl 200
attr VentSommerErhoehtDrehzahl room 12_Heizung_Vent
attr VentSommerErhoehtDrehzahl setList state:slider,70,5,280
attr VentSommerErhoehtDrehzahl webCmd state

define VentSommerInnenTemp Dummy
attr VentSommerInnenTemp group 02_automatische_Drehzahlsteuerung
set VentSommerInnenTemp 24.5
attr VentSommerInnenTemp room 12_Heizung_Vent
attr VentSommerInnenTemp setList state:textField
attr VentSommerInnenTemp webCmd state

define VentSommerReduziertAussenTemp Dummy
attr VentSommerReduziertAussenTemp group 02_automatische_Drehzahlsteuerung
set VentSommerReduziertAussenTemp 26.0
attr VentSommerReduziertAussenTemp room 12_Heizung_Vent
attr VentSommerReduziertAussenTemp setList state:textField
attr VentSommerReduziertAussenTemp webCmd state

define VentSommerErhoehtAussenTemp Dummy
attr VentSommerErhoehtAussenTemp group 02_automatische_Drehzahlsteuerung
set VentSommerErhoehtAussenTemp 23.0
attr VentSommerErhoehtAussenTemp room 12_Heizung_Vent
attr VentSommerErhoehtAussenTemp setList state:textField
attr VentSommerErhoehtAussenTemp webCmd state

define VentSommerErhoehtTempDifferenz Dummy
attr VentSommerErhoehtTempDifferenz group 02_automatische_Drehzahlsteuerung
set VentSommerErhoehtTempDifferenz 1.0
attr VentSommerErhoehtTempDifferenz room 12_Heizung_Vent
attr VentSommerErhoehtTempDifferenz setList state:textField
attr VentSommerErhoehtTempDifferenz webCmd state

# Lüftung im Sommer bei hoher Außentemperatur absenken
define VentSommerReduziert DOIF ([VentAutoMode] eq "sommer" and [+600] and ([?06:30-19:01|12345] or [?07:30-19:01|06]) and (([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > [VentSommerInnenTemp] and [Mythz:AussenTemp] > [VentSommerReduziertAussenTemp] and [Mythz:VentZuluft] != 0 and [Mythz:VentAbluft] != 0 and [Mythz:p07FanStageDay] != 3) (set Mythz p39Fanstage3AirflowInlet [VentSommerReduziertDrehzahl];;set Mythz p42Fanstage3AirflowOutlet [VentSommerReduziertDrehzahl];;set Mythz p07FanStageDay 3;;) DOELSEIF (([VentAutoMode] ne "sommer" or [+600] and ((([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) <= [VentSommerInnenTemp] or [Mythz:AussenTemp] <= [VentSommerReduziertAussenTemp])) and [Mythz:p07FanStageDay] != 2) (set Mythz p07FanStageDay 2;;)
attr VentSommerReduziert do always
attr VentSommerReduziert room 12_Heizung_Vent
attr VentSommerReduziert group 00_DOIF

# Lüftung im Sommer bei niedriger Außentemperatur erhöhen
define VentSommerErhoeht DOIF ([VentAutoMode] eq "sommer" and [+600] and ([?19:00-23:59|12345] or [?00:00-06:01|12345] or [?19:30-23:59|06] or [?00:00-07:01|06]) and (((([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > [VentSommerInnenTemp] and [Mythz:AussenTemp] < [VentSommerErhoehtAussenTemp]) or ((([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > ([Mythz:AussenTemp] + [VentSommerErhoehtTempDifferenz]))) and [Mythz:VentZuluft] != 0 and [Mythz:VentAbluft] != 0 and [Mythz:p08FanStageNight] != 3) (set Mythz p39Fanstage3AirflowInlet [VentSommerErhoehtDrehzahl];;set Mythz p42Fanstage3AirflowOutlet [VentSommerErhoehtDrehzahl];;set Mythz p08FanStageNight 3;;) DOELSEIF (([VentAutoMode] ne "sommer" or [+600] and (((([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) <= [VentSommerInnenTemp] or [Mythz:AussenTemp] >= [VentSommerErhoehtAussenTemp]) and ((([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) <= ([Mythz:AussenTemp] + [VentSommerErhoehtTempDifferenz])))) and [Mythz:p08FanStageNight] != 1) (set Mythz p08FanStageNight 1)
attr VentSommerErhoeht do always
attr VentSommerErhoeht room 12_Heizung_Vent
attr VentSommerErhoeht group 00_DOIF


Er bewirkt, dass zur Tageszeit, die Lüftung(250m³/h --> 125m³/h) reduziert wird, wenn eine Innentemperatur (24.5°C), Außentemperatur (26°C). überschritten wird. Ebenso wird in der Nacht bei unterschreiten einer Außentemperatur (23°C) und überschreiten einer Innentemperatur (26°C) oder einer Temperaturdifferenz von Innen zu Außen (1°C) die Lüftung (125m³/h --> 200m³h) erhöht. Alle Werte einstellbar über GUI. Geprüft wird alle 10min per DOIF. Die Drehzahlen werden auf Drehzahl 3 geschrieben und die Stufe am Tag zwischen 2 und 3, sowie in der Nacht zwischen 2 und 3 hin- und hergeschalten.

Für den Winter plan ich das selbige nur mit Luftfeuchtigkeit.
Das auswerten des VOC-Wertes habe ich noch unterlassen, da ich noch nicht genau die Zusammenhänge kenne. (nicht zuverlässig Stabil). Scheinbar sinkt die Luftqualität, wenn es im Haus zu Warm, Feucht wird.

mfg
NaCkHaYeD
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 17 August 2015, 21:42:15
v 0.144 uploaded, you can upgrade tomorrow
- fixed warning $Math::Round::half"
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 17 August 2015, 22:23:54
@ NaCkHaYeD:
sieht aber mächtig aus. Da müsste ich mir 5 Knoten ins Hirn machen, um das so hin zu bekommen. Bin halt kein gebürtiger Softi.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: NaCkHaYeD am 20 August 2015, 23:22:46
Hi,

habs noch mal korrigieren müssen, wer daran interessiert ist/war.

define VentAutoMode Dummy
attr VentAutoMode devStateIcon man:vent_ventilation_level_manual_m sommer:weather_summer winter:weather_winter
attr VentAutoMode group 02_automatische_Drehzahlsteuerung
attr VentAutoMode room 12_Heizung_Vent
set  VentAutoMode man
attr VentAutoMode setList state:man,sommer,winter
attr VentAutoMode webCmd man:sommer:winter

define VentSommerReduziertDrehzahl Dummy
attr VentSommerReduziertDrehzahl group 02_automatische_Drehzahlsteuerung
set VentSommerReduziertDrehzahl 125
attr VentSommerReduziertDrehzahl room 12_Heizung_Vent
attr VentSommerReduziertDrehzahl setList state:slider,70,5,280
attr VentSommerReduziertDrehzahl webCmd state

define VentSommerErhoehtDrehzahl Dummy
attr VentSommerErhoehtDrehzahl group 02_automatische_Drehzahlsteuerung
set VentSommerErhoehtDrehzahl 200
attr VentSommerErhoehtDrehzahl room 12_Heizung_Vent
attr VentSommerErhoehtDrehzahl setList state:slider,70,5,280
attr VentSommerErhoehtDrehzahl webCmd state

define VentSommerInnenTemp Dummy
attr VentSommerInnenTemp group 02_automatische_Drehzahlsteuerung
set VentSommerInnenTemp 24.5
attr VentSommerInnenTemp room 12_Heizung_Vent
attr VentSommerInnenTemp setList state:textField
attr VentSommerInnenTemp webCmd state

define VentSommerReduziertAussenTemp Dummy
attr VentSommerReduziertAussenTemp group 02_automatische_Drehzahlsteuerung
set VentSommerReduziertAussenTemp 26.0
attr VentSommerReduziertAussenTemp room 12_Heizung_Vent
attr VentSommerReduziertAussenTemp setList state:textField
attr VentSommerReduziertAussenTemp webCmd state

define VentSommerErhoehtAussenTemp Dummy
attr VentSommerErhoehtAussenTemp group 02_automatische_Drehzahlsteuerung
set VentSommerErhoehtAussenTemp 23.0
attr VentSommerErhoehtAussenTemp room 12_Heizung_Vent
attr VentSommerErhoehtAussenTemp setList state:textField
attr VentSommerErhoehtAussenTemp webCmd state

define VentSommerErhoehtTempDifferenz Dummy
attr VentSommerErhoehtTempDifferenz group 02_automatische_Drehzahlsteuerung
set VentSommerErhoehtTempDifferenz 1.0
attr VentSommerErhoehtTempDifferenz room 12_Heizung_Vent
attr VentSommerErhoehtTempDifferenz setList state:textField
attr VentSommerErhoehtTempDifferenz webCmd state

# Lüftung im Sommer bei hoher Außentemperatur absenken
define VentSommerReduziert DOIF ([VentAutoMode] eq "sommer" and [+600] and ([?06:30-19:01|12345] or [?07:30-19:01|06]) and (([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > [VentSommerInnenTemp] and [Mythz:AussenTemp] > [VentSommerReduziertAussenTemp] and [Mythz:VentZuluft] != 0 and [Mythz:VentAbluft] != 0 and [Mythz:p07FanStageDay] != 3) (set Mythz p39Fanstage3AirflowInlet [VentSommerReduziertDrehzahl];;set Mythz p42Fanstage3AirflowOutlet [VentSommerReduziertDrehzahl];;set Mythz p07FanStageDay 3;;) DOELSEIF (([VentAutoMode] ne "sommer" or [+600] and ((([?06:30-19:01|12345] or [?07:30-19:01|06]) and ((([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) <= [VentSommerInnenTemp] or [Mythz:AussenTemp] <= [VentSommerReduziertAussenTemp]) or ([?19:00-23:59|12345] or [?00:00-06:01|12345] or [?19:30-23:59|06] or [?00:00-07:01|06])))) and [Mythz:p07FanStageDay] != 2) (set Mythz p07FanStageDay 2)
attr VentSommerReduziert do always
attr VentSommerReduziert room 12_Heizung_Vent
attr VentSommerReduziert group 00_DOIF

# Lüftung im Sommer bei niedriger Außentemperatur erhöhen
define VentSommerErhoeht DOIF ([VentAutoMode] eq "sommer" and [+600] and ([?19:00-23:59|12345] or [?00:00-06:01|12345] or [?19:30-23:59|06] or [?00:00-07:01|06]) and (([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > [VentSommerInnenTemp] and ([Mythz:AussenTemp] < [VentSommerErhoehtAussenTemp] or (([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) > ([Mythz:AussenTemp] + [VentSommerErhoehtTempDifferenz])) and [Mythz:VentZuluft] != 0 and [Mythz:VentAbluft] != 0 and [Mythz:p08FanStageNight] != 3) (set Mythz p39Fanstage3AirflowInlet [VentSommerErhoehtDrehzahl];;set Mythz p42Fanstage3AirflowOutlet [VentSommerErhoehtDrehzahl];;set Mythz p08FanStageNight 3;;) DOELSEIF (([VentAutoMode] ne "sommer" or [+600] and ((([?19:00-23:59|12345] or [?00:00-06:01|12345] or [?19:30-23:59|06] or [?00:00-07:01|06]) and (    (([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) <= [VentSommerInnenTemp] or [Mythz:AussenTemp] >= [VentSommerErhoehtAussenTemp] or (([Myhtu21dogcD:temperature] + [Myhtu21dwzcD:temperature]) / 2) <= ([Mythz:AussenTemp] + [VentSommerErhoehtTempDifferenz]))) or ([?06:30-19:01|12345] or [?07:30-19:01|06]))) and [Mythz:p08FanStageNight] != 1) (set Mythz p08FanStageNight 1)
attr VentSommerErhoeht do always
attr VentSommerErhoeht room 12_Heizung_Vent
attr VentSommerErhoeht group 00_DOIF


Das Problem war, wenn ein Tag/Nacht durch war und standen beide Lüfterstufen noch auf 3, die Drehzahl wurde aber vom letzten beschrieben. Dies hatte zur Folge das das neue Programm nicht mehr die Drehzahlen angepasst hat.

@willibaus:
Softi ja, aber FHEM und gerade DOIF ist noch ein Buch mit sieben Siegeln. Frage nicht wie oft ich mich aus der Weboberfläche ausgeschlossen habe, weil der DOIF jeden Zyklus aktiv war. Dann geht's zur Linux Konsole, das nächste Buch mit sieben Siegeln für einen Windows Programmierer. Wenn dann noch die SD Karte wegen einem Dateizuordnungsfehler nicht mehr bootet, bzw. Kernel Panics auftreten, dann....... Aber nach jedem Tief kommt ein Hoch und man lernt immer dazu. Hab dennoch meine drei Raspis gerne...

@all
Beschwert sich eigentlich keiner bei Tecalor/Stiebel wenn die manuellen Lüfterstufen nicht zuverlässig funktionieren. Ich weiß noch wo ich vor Weihnachten eingezogen bin und die Heizung ständig ausgestiegen ist. Sämtliche teuere Techniker wären aufgeschmissen gewesen, möchte gar nicht an das Geld denken über die Feiertage. Die Heizung meldete immer Fehler Hochdruckspeicher. Laut Beschreibung die vollkommen falsche Abhilfe, ebenso die vermeintlich verstopften Filter die es laut Beschreibung an den Ecken gar nicht gibt. Das Problem war einfach nur, dass die Warmwassertemperatur bei aktiven Eco-Mode zu hoch war. Halbes Grad runter und schon ging es. Laut Beschreibung sollte es bei Ecomode eben nicht zu solchen Problemen kommen, da die Heizung solange die Temperatur senkt, bis es passt, soweit die Theorie, die Praxis sieht anders aus. Kann euch gar nicht sagen, wie oft ich die Heizungsrohre entlüftet haben  ::)

mfg
NaCkHaYeD
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 21 August 2015, 09:07:56
Man sollte tatsächlich mal den Support fragen. Habe grade leider keine Zeit für sowas.

Meine Vermutung ging ursprünglich in die Richtung, dass dem CAN-Bus evtl. der Abschlusswiderstand am Leitungsende fehlt und deshalb durch Reflektionen die Signale unlesbar sind. Nun scheint das Problem aber auch bei Anlagen ohne zweites Display aufzutreten. Dann ist diese Theorie wohl falsch.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 21 August 2015, 10:32:05
Hi NaCkHaYeD
A short hint from my side, which we discussed in the forum before.
Nobody seams to know how Tecalor is saving the register (at hardware level).
No doku is available.

please consider that nobody knows the mission profile of the memory: e.g MeanTimeBetweeFailure, how often can you rewrite the same register in 10years?
The problem of data-retention is not trivial.
I expect that in the best case they made an average calculation of 1 change every day, coming probably to 3600 rewrite of the same register.

if you change the register 3 times a day, expect 1/3 of lifetime of the memory.

The best way is to get an answer from tecalor. Otherwise you can find the memory-cell in the PCB and look for a datasheet in internet.

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: NaCkHaYeD am 22 August 2015, 21:24:45
Dear Immi,

on the PCB i found the following components:
AMIC A29800TV-70F  - NOR Flash Memory (100000 Write/Erase Cycles)
74HC373D Si-Gate CMOS Device
ULN2003A Transistors
MB90F347CE CPU
IS62C1024AL-35TLI RAM

So for me it seems that the NOR Flash is the important device. With 20 Years, 365 Days, i can rewrite the Register 13 times a day. So we should be save at this Point. But i will try to find something out about this issue. This device will be sold about 1,35€, but a new Mainboard will cost about 750€

mfg
NaCkHaYeD
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 23 August 2015, 18:21:27
I expect that, in the future, the cost of a new Mainboard will only increase.
So it is usefulll to damp the memory now, somehow.
Moreover, if we get enough knoledge, we can consider sharing or upgrading the firmwares.

The flashing tool is included in a subdirectory of  the LWZ_303_Bedieneinh_Version_5_10,
in which unfortunatelly are only very very old firmware files (mhx) attached.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: skyper am 05 September 2015, 14:05:34
Hi all,

i have a stiebel 403sol with firmware 3.39
is there a known problem with this firmware or fully supported ? (not listed in the wiki)

my serial connection (12m far away) only works with 57600 baud and not very good. (not faster, not slower)
often there is "Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?"
or an simple get sFirmware shows: 01 msg2 new unknown answer, next time "msg2 InterfaceNotRespondig "

i have the software "LWZ_303_Bedieneinh_NEU_Version_5_10" works well - is it easy to update the firmware ?
Can anybody send a new firmware, changelog and manual for updating?

Any hints are welcome
thanks !
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 05 September 2015, 19:19:19
Zitat von: skyper am 05 September 2015, 14:05:34
i have a stiebel 403sol with firmware 3.39
is there a known problem with this firmware or fully supported ? (not listed in the wiki)
my serial connection (12m far away) only works with 57600 baud and not very good. (not faster, not slower)
often there is "Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?"
or an simple get sFirmware shows: 01 msg2 new unknown answer, next time "msg2 InterfaceNotRespondig "
welcome in FHEM
I have 10m shielded telefon cable and I have no issue with double your speed. My serial connection is really stable. Your problem could be in crosstalking (e.g.  the high current cable of the heatpump). Test with a short cable temporary, before starting speculating.

Have you got one positive anser from the heatpump? I am interested in register sFirmware and sFirmware-Id
Please upload also all full log-files
Do you have FHEM updated?

ciao
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 05 September 2015, 21:13:10
Welcome also from my side.

Since your heatpump communicates with 57600 baud you can give up trying other speeds. There's just one single speed setting for each firmware revision. In your case it's 57600.

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: skyper am 06 September 2015, 18:48:19
hello immi & willybauss,

i made a newcomer mistake... ;)
fhem version question was good - never though about an update test, it was an new Debian install one week old. i did not check version!! (perhaps a notice in debian-install would be good, that an update is required.)

THANKS guys!!!  now much more infos are loading, looking good in the first moment. (just updated 5 mins ago, while i was typing this answer)
i will report back, when there are more questions.

byebye
skyper
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 16 September 2015, 12:41:03
Zitat von: immi am 03 Februar 2015, 23:29:47
v 0.131 uploaded
changelog
- added p35PasteurisationInterval, p35PasteurisationTemp,   p34BoosterDHWTempAct, p99DHWmaxFlowTemp, p89DHWeco
immi

any idea what P34 is about? Mine shows me -10°C
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 16 September 2015, 21:05:04
Zitat von: micomat am 16 September 2015, 12:41:03
any idea what P34 is about? Mine shows me -10°C
12.2.3 Temperature enable - electric booster heater
[MENU/DHW/PARAMETER, P34]
If the outside temperature falls below the value selected under "BOOSTER T ACTIVATE", the electric booster heater for DHW heating is immediately switched on. This means heating is not interrupted for longer than necessary.

p.s I was tempter to answer RTFM, but you are right,  the explanation is definitely not clear
https://xkcd.com/293/
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 17 September 2015, 08:38:07
thanks immi!

Zitat von: immi am 16 September 2015, 21:05:04
p.s I was tempter to answer RTFM, but you are right,  the explanation is definitely not clear
https://xkcd.com/293/

i love this one :D
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 01 Oktober 2015, 01:08:12
v0.145 uploaded
changelog "00_THZ: bugfix register sLast10errors"

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 01 Oktober 2015, 08:38:43
Is this bugfix related to friesenjung's recent issue? In this case you might give him a hint in the other thread, please.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: ioT4db am 01 Oktober 2015, 10:03:30
Erster Test nach dem Bugfixing ist positiv:

Reading vor Bugfix:
number_of_faults: 1 fault0CODE:  fault0TIME: 66:48 fault0DATE: 30.09 fault1CODE: n.a. fault1TIME: 00:00 fault1DATE: 0 fault2CODE: n.a. fault2TIME: 00:00 fault2DATE: 0 fault3CODE: n.a. fault3TIME: 00:00 fault3DATE: 0


Reading nach Bugfix:
number_of_faults: 1 fault0CODE: F34_FlowSensor fault0TIME: 05:31 fault0DATE: 30.09 fault1CODE: n.a. fault1TIME: 00:00 fault1DATE: 0 fault2CODE: n.a. fault2TIME: 00:00 fault2DATE: 0 fault3CODE: n.a. fault3TIME: 00:00 fault3DATE: 0

Danke...
Titel: AW:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: ioT4db am 11 Oktober 2015, 20:59:06
Hallo Immi,

hier der Raw Register für das Problem sLast10errors und dem Datumsproblem 03.10.:

2015.10.11 20:51:42 5: Cmd: >get Mythz sLast10errors<
2015.10.11 20:51:42 5: THZ_Get: Try to get 'sLast10errors'
2015.10.11 20:51:42 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2015.10.11 20:51:42 5: Mythz sending 02
2015.10.11 20:51:42 5: SW: 02
2015.10.11 20:51:42 5: Mythz start Funktion THZ_ReadAnswer
2015.10.11 20:51:42 5: THZ_ReadAnswer: uc unpack: '10'
2015.10.11 20:51:42 5: Mythz sending 0100D2D11003
2015.10.11 20:51:42 5: SW: 0100D2D11003
2015.10.11 20:51:42 5: Mythz start Funktion THZ_ReadAnswer
2015.10.11 20:51:42 5: THZ_ReadAnswer: uc unpack: '10'
2015.10.11 20:51:42 5: Mythz start Funktion THZ_ReadAnswer
2015.10.11 20:51:42 5: THZ_ReadAnswer: uc unpack: '02'
2015.10.11 20:51:42 5: Mythz sending 10
2015.10.11 20:51:42 5: SW: 10
2015.10.11 20:51:42 5: Mythz start Funktion THZ_ReadAnswer
2015.10.11 20:51:42 5: double read 1 activated 01005ED10101220030013601000000
2015.10.11 20:51:42 5: double read 1 result with buf1  01005ED10101220030013601000000000000000000000000000000000000
2015.10.11 20:51:42 5: double read 2 activated 01005ED10101220030013601000000000000000000000000000000000000
2015.10.11 20:51:42 5: double read 2 result with buf1  01005ED10101220030013601000000000000000000000000000000000000000000000000000000000000000000000000
2015.10.11 20:51:42 5: double read 3 activated 01005ED10101220030013601000000000000000000000000000000000000000000000000000000000000000000000000
2015.10.11 20:51:42 5: double read 3 result with buf1  01005ED10101220030013601000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2015.10.11 20:51:42 5: double read 4 activated 01005ED10101220030013601000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2015.10.11 20:51:42 5: double read 4 result with buf1  01005ED101012200300136010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001003
2015.10.11 20:51:42 5: THZ_ReadAnswer: uc unpack: '01005ED101012200300136010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001003'
2015.10.11 20:51:42 5: Mythz sending 10
2015.10.11 20:51:42 5: SW: 10
2015.10.11 20:51:42 5: Parse message: 5ED10101220030013601000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2015.10.11 20:51:42 5: Message length: 128
2015.10.11 20:51:42 5: Triggering Mythz (1 changes)
2015.10.11 20:51:42 5: Notify loop for Mythz sLast10errors: number_of_faults: 1 fault0CODE: F34_FlowSensor fault0TIME: 03:04 fault0DATE: 3.1 fault1CODE: n.a. fault1TIME: 00:00 fault1DATE: 0 fault2CODE: n.a. fault2TIME: 00:00 fault2DATE: 0 fault3CODE: n.a. fault3TIME: 00:00 fault3DATE: 0
2015.10.11 20:51:42 5: Triggering Mythz.alarm_boosterDHW


VG
Daniel
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 11 Oktober 2015, 22:26:15
thnks daniel
v. 0.146 uploaded, tomorrow you can upgrade
-sLast10errors fix for datum
-sFirmware has now 4 digits: e.g. version: 04.39; before was version: 4.39
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 11 Oktober 2015, 23:13:48
A little warning: if you run your FHEM on Ubuntu and upgrade your Linux kernel to version 3.13.0-60 - serial connection to LWZ gets interrupted every 5 seconds and so FHEM is unable to communicate correctly with heat pump. I'm still trying to understand what is causing it; rollback to kernel 3.13.0-40 helps.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 12 Oktober 2015, 07:37:31
hi mbl
serial connection issue should influence also other systems like enocean and cul; they are all based on a dongle with inside a usb-serial interface.
look here
http://forum.fhem.de/index.php/topic,41782.0.html
http://forum.fhem.de/index.php/topic,41836.msg342621.html
info could be interesting in Server-Linux.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 12 Oktober 2015, 23:28:23
hi immi

Yes that's the same issue... It works fine with 3.13.0-40, so we need to hold on with kernel update to latest until it is fixed.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: tom_1 am 16 Oktober 2015, 10:19:30
Hi,
thanks to this forum i managed to connect my LWZ403 with a Rasperry on FHEM. I used the standard confic from the Wiki. The connection works, but the plots only work for the Aussentemp.

In the attachment you will find an example where I tried to plot the watertemp. But in the graph it does not show me any line or value.

this is the code for the plots i put in the config (standard from wiki)

define FileLog_Mythz FileLog ./log/Mythz-%Y-%m.log Mythz
define wal_0 SVG FileLog_Mythz:thz:CURRENT
attr wal_0 room Heizung
define wal_1 SVG FileLog_Mythz:thz1:CURRENT
attr wal_1 room Heizung
define wal_2 SVG FileLog_Mythz:thz2:CURRENT
attr wal_2 room Heizung
define wal_3 SVG FileLog_Mythz:thz3:CURRENT
attr wal_3 room Heizung
define wal_4 SVG FileLog_Mythz:thz4:CURRENT
attr wal_4 room Heizung




Has somebody an idea???

thank you in advance.

regards

Tom

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 16 Oktober 2015, 11:39:44
HI Tom
use the config from Willy; it has very nice examples.
http://forum.fhem.de/index.php/topic,33452.0.html
If you are new to fhem please read also the introduction to fhem.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 16 Oktober 2015, 12:41:04
Hi Tom,

welcome to the forum!

Please try to avoid working manually in the config files and use the UI instead (which you showed us in your attached screen dump). Your config UI looks very empty. As immi said: start with my examples. The gplot config files have to be copied into directory /opt/fhem/www/gplot. But take care when editing them manually: In the gplot config file the # rows are not comments, but part of the configuration data.

As long as you have just a few curves in a graph it can be handled using the UI. Just in case you want to add more than 5...6 cuerves to one graph you might need to edit the config file manually. But in this case it might need a restart of FHEM to activate the changes, what is not necessary when you use the UI.



Best Regards
Willy
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: tom_1 am 18 Oktober 2015, 08:53:10
Hello Willy,
thousand thanks for your support. I followed your instructions and now everyting is working fine.

Concerning the plots I still have one small question. I used your part of the code for the plots and the plot files.
One problem is, that the value "innentemp" is not being recorded constantly in the plot. In the example you see that at around 8 o´clock the value is shown, but not before and after.

(http://fs5.directupload.net/images/151018/temp/rjgsun6y.png) (http://www.directupload.net/file/d/4144/rjgsun6y_png.htm)

Can you pls give me a hint, what is wrong???

Thank you!

Tom
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 Oktober 2015, 15:53:47
Hi Tom
please upload the image to fhem..... I cannot open it correctly.
Even better, it would make more sense to upload your logfile, which you should look like
fhem/log/Mythz-%Y-%m.log
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 18 Oktober 2015, 17:08:23
Do you have a external THZ display or an external temperature sensor in your living room at all? Otherwise you cannot measure the inside temperature of course.

Assuming you have one:

The log file, which immi mentioned, should contain rows like e.g.
Zitat2015-10-18_16:47:05 Mythz sHC1: outsideTemp: 8 x08: -31.4 returnTemp: 23.6 integralHeat: -45 flowTemp: 24.4 heatSetTemp: 26 heatTemp: 23.8 seasonMode: winter integralSwitch: 200 opMode: setback roomSetTemp: 21.5 x60: 0 x64: 563.2 insideTempRC: 22.1 x72: 0 x76: 2.2 onHysteresisNo: 0 offHysteresisNo: 1 HCBoosterStage: 0

One entry in this lot of values is the inside temperature. It is being extracted as a single-row entry by a code in the config file:
Zitatattr Mythz userReadings Rel_humidity:sGlobal {((split ' ',ReadingsVal("Mythz","sGlobal",0))[67]) + 11.5}, flow_temp:sGlobal {((split ' ',ReadingsVal("Mythz","sGlobal",0))[3])}, return_temp:sGlobal {((split ' ',ReadingsVal("Mythz","sGlobal",0))[5])}, outside_temp:sGlobal {((split ' ',ReadingsVal("Mythz","sGlobal",0))[1])}, dhw_temp:sGlobal {((split ' ',ReadingsVal("Mythz","sGlobal",0))[9])}, inside_temp:sHC1 {((split ' ',ReadingsVal("Mythz","sHC1",0))[27])}, CopHC:sHeatRecoveredDay {sprintf("%.2f", ReadingsNum("Mythz","sHeatHCDay",1) / ReadingsNum("Mythz","sElectrHCDay",1))}, CopDHW:sHeatRecoveredDay {sprintf("%.2f", ReadingsNum("Mythz","sHeatDHWDay",1) / ReadingsNum("Mythz","sElectrDHWDay",1))}

... resulting in an additional row in the log file:
Zitat2015-10-18_16:47:05 Mythz inside_temp: 22.1

Now you should check if all of these steps happen always in your log file. Maybe sometimes the connection of the THZ to inside temp. sensor or external display gets lost.

note:
There's another inside temperature entry in the 'Mythz sGlobal' section of the logs. Don't rely on this entry, since it does not factor in the measuring offset of your inside temperature measurement. It has to be used just if you do not have an external display, but just an external temperature sensor.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: tom_1 am 18 Oktober 2015, 19:07:01
Hi,
yes I have an external display.
insidetemp i have found in the logfile (BUT without timestamp????). So apparently the problem is, that i do not have this splitted line for inside temp...
I checked the config file, but there have have the code for splitted line.
???
Attache another screenshot from the plot and the config and log file.
Thank you!!
Tom
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 Oktober 2015, 20:05:52
Zitat von: tom_1 am 18 Oktober 2015, 19:07:01
Hi,
yes I have an external display.
insidetemp i have found in the logfile (BUT without timestamp????). So apparently the problem is, that i do not have this splitted line for inside temp...

eh.... look at line 124 of your logfile
2015-10-18_13:27:23 Mythz inside_temp: 18.8
everything is working fine, maybe too cold   :-\
each time you read again sHC1 also inside_temp will be updated; this means that if you want inside_temp to be updated you have to update sHC1 on a regular basis like you do for sGlobal.
attr Mythz interval_sHC1 300

--
one more hint from my side
I would prefer
attr Mythz interval_sGlobal 300
instead of
define atMythzGlobal at +*00:05:00 {fhem "get Mythz sGlobal","1";;return()}

you will see no difference, but the attribute version of the update is much more elegant
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 18 Oktober 2015, 20:11:19
the sHC1 row exists just once in your log file, read automatically during startup of FHEM. You don't have a row in your config which forces a frequent reading of sHC1. It should look like e.g. (row marked in bold font)
Zitatdefine Mythz THZ /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0@115200
attr Mythz icon sani_heating
attr Mythz interval_sGlobal 300
attr Mythz interval_sHC1 300
attr Mythz interval_sHistory 3600
attr Mythz interval_sLast10errors 3600
The other rows in my example may be required as well, if you want e.g. to be informed by email in case of failures etc.


Your complex way of frequent reading
Zitatdefine atMythzGlobal at +*00:05:00 {fhem "get Mythz sGlobal","1";;return()}
define atMythzHistory at +*08:00:00 {fhem "get Mythz sHistory","1";;return()}
is not necessary.

PS:
immi was faster  :'(
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 30 Oktober 2015, 00:34:21
Zitat von: mlb am 12 Oktober 2015, 23:28:23
It works fine with 3.13.0-40, so we need to hold on with kernel update to latest until it is fixed.

It did not take too long, the new kernel 3.13.0-66 has fixed problem with serial ports, and is FHEM working fine again :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 07 November 2015, 07:26:01
Hi,

strange but sometimes my fhem seems to lag due to the Mythz module... Im using ser2net with two RasPi.
When this happens I see logs like:

2015.11.07 07:22:50 1: 192.168.178.50:2003 disconnected, waiting to reappear (Mythz)
2015.11.07 07:22:51 1: 192.168.178.50:2003 reappeared (Mythz)
2015.11.07 07:22:52 1: 192.168.178.50:2003 disconnected, waiting to reappear (Mythz)
2015.11.07 07:22:53 1: 192.168.178.50:2003 reappeared (Mythz)
2015.11.07 07:22:55 1: 192.168.178.50:2003 disconnected, waiting to reappear (Mythz)
2015.11.07 07:22:56 1: 192.168.178.50:2003 reappeared (Mythz)
2015.11.07 07:22:57 1: 192.168.178.50:2003 disconnected, waiting to reappear (Mythz)
2015.11.07 07:22:58 1: 192.168.178.50:2003 reappeared (Mythz)
2015.11.07 07:23:00 1: 192.168.178.50:2003 disconnected, waiting to reappear (Mythz)
2015.11.07 07:23:03 1: 192.168.178.50:2003 reappeared (Mythz)
2015.11.07 07:23:05 1: 192.168.178.50:2003 disconnected, waiting to reappear (Mythz)
2015.11.07 07:23:09 1: 192.168.178.50:2003 reappeared (Mythz)
2015.11.07 07:23:10 1: 192.168.178.50:2003 disconnected, waiting to reappear (Mythz)
2015.11.07 07:23:14 1: 192.168.178.50:2003 reappeared (Mythz)
2015.11.07 07:23:16 1: 192.168.178.50:2003 disconnected, waiting to reappear (Mythz)
2015.11.07 07:23:19 1: 192.168.178.50:2003 reappeared (Mythz)

2015.11.07 07:20:40 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2015.11.07 07:20:41 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2015.11.07 07:20:41 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2015.11.07 07:20:42 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?



I recently updated my fhem, no idea if that might get together?

Best,
Markus
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 07 November 2015, 13:10:40
Hi Markus
You have to give more infos:
how often and since when?
When have you updated last time? Have you updated also the raspi?
If you update now again is the problem gone?
Do you have some issues with your router (unlikely because ser2net is fantasic stable also in bad ethernet/wlan connections)?
Have you made some mantainance on the heatpump like filter change?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 07 November 2015, 16:11:57
hi immi
i had this from the very beginning on. but as i found my thz offline yesterday is started to investigate. raspi is up2date and no maintenance was made in the heatpump. fhem is also updated.

thanks
markus
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 08 November 2015, 14:55:43
okay, it looks like ser2net is refusing connections on telnet port when there is still a "hanging" open connection.
I set up a job which restarts ser2net now periodically...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 08 November 2015, 16:55:57
I Markus
it is wise to restart a raspi every now and then.

I never had multiple connections issues. I use a very old fritzbox (modified to frretz) which I use in the basement for several things. (uptime 266 days)
i confured its ser2net like this
2003:raw:500:/dev/ttyUSB0:115200 NONE 1STOPBIT 8DATABITS

if you google you will find that some ser2net allow multiple connections e.g. https://github.com/longshine/ser2nets
I compiled ser2net 3 years ago with frretz, do not aks me which flauvor of ser2net i am using.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 09 November 2015, 07:17:26
Yes, it's also kinda strange to me... Well I'll see if that helps

Thanks for your reply
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: kriforum am 22 Dezember 2015, 00:16:15
Hi all,

since roughly 3 years I'm an owner of a THZ403SOL, and was amazed from the beginning by the possibility to read out and control the heatpump (HP).
I've got running a RasPi with FHEM for some (non HP related) HomeMatic modules. When I started to use this, there was not yet any possibility to connect the HP to FHEM. Therefore I'm currently logging on the same RasPi my HP data using an ISG and the scripts from FRAD (myenergy-portal.de). Works OK, however I was only rarely using the data to optimize my HP due to missing a comfortable data evaluation possibility.

Yesterday I saw by chance what's going on here - wow!
As always a small group of heavily engaged people, compliments and thanks in advance!

Now my question:
Has anyone got an idea, if it's possible or what happens when using the ISG in parallel to FHEM with myTHZ scripts via USB?

Obviously the target is to have FHEM as final solution, however until this is running fine, I don't want to miss the ISG web access.

Thanks in advance,
Christian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Dezember 2015, 06:27:25
Hi Christian
you have to try to know if the 2 system, work in parallel.
I am optimistic.
Anyhow, if you are familiar with fhem, what you have to loose? some euro for the cables and 1h work.

very interesting let us know
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 22 Dezember 2015, 06:38:56
Hi Christian,

welcome to the THZ part of FHEM.

I assume the ISG to be plugged into the white serial connector behind the right door, right? So the only way to use FHEM in parallel would be plugging a USB cable directly to the USB connector on the HP's main board. The interresting question is, if the data transfer of both connections can coexist or confuse each other. I believe nobody tried it out so far.

From my and others' experience we'll talk about a couple of days until it will be running stable, especially since you're already familiar with FHEM. Start with my configuration example, shown in the other thread (see link on page 1) and modify it to your needs.

Which firmware version does your THZ use? A few of the older ones caused code update effort in the THZ module frequently.

Best Regards
Willy
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: kriforum am 22 Dezember 2015, 10:58:18
Thanks for the friendly welcome.
The ISG is connected to the CAN bus, there's a dedicated connector available for this, on the right top of the warm water storage (where the power cables are connected, too).
Thus serial and USB connectors both are available, due to datarate reasons I decided to connect to USB (cable already in place).
I have to setup my RasPi/FHEM again, as the last power outage ruined the filesystem completely and using the entire backup doesn't make sense (too old version of FHEM).
I will let you know as soon as something works - or I need further assistance... :)
My FW is 4.39.
For my understanding the ISG doesn't necessarily write anything to the THZ as long as no user interaction is done, however there's a steady communication ongoing btw THZ and ISG according to a flashing LED on the ISG (part of the CAN protocol I assume).
Therefore I'd rather disconnect it before attaching it to FHEM.

BR
Christian

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: kriforum am 22 Dezember 2015, 11:17:14
Actually it just comes to my mind, that when the service technician from Stiebel connected his laptop last time, the ISG was connected all the time, too - as far as I remember. And he definitely changed parameters.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Dezember 2015, 13:19:09
Problem:
I saw in another forum that many service technician change the Tecalor user parameters without asking.
Sometimes because they do a firmware update and they do not backup the Tecalor user parameters.

It would be very easy to implement a backup feature for all parameters. But I will not do it, I want to prevent people from messing around with too many parameters automatically.

Instead I am thinking to something like this:
A new command should save all pXXX in a backupfile with a special text format (see attch.)
The file makes very easy to restore all (or some) parameter with  one copy&paste in a telnet fhem session.


Any hint before I implement it?

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 22 Dezember 2015, 13:26:50
Yes immi, that would be helpful, especially when you have set summer or winter setting or let's say intermediate setting for spring/fall.
Can you save it under your chosen name or is it generic date plus something else?

Thanks,
René
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Dezember 2015, 13:35:04
Zitat von: houseowner123 am 22 Dezember 2015, 13:26:50
Can you save it under your chosen name or is it generic date plus something else?
something like this?
thz_2015_12_22.save
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 22 Dezember 2015, 13:45:01
Zitat von: immi am 22 Dezember 2015, 13:35:04
something like this?
thz_2015_12_22.save

Yes please. :)

Another request: Do we know anybody here and (elsewhere) who is using HC2? That would be only relevant for an Einliegerwohnung. So can HC2 settings be omitted.

Another thing that really bugs me: I have lots of double entries for the same parameter and also lots of outdated experimental parameters that we used in previous version long long time ago when we were looking for the meaning of certain registers. So how do I get rid of all thos obsolete things? Can you implement a cleanup in the code looking for double entries and obsolete settings?

Thanks,
René
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Dezember 2015, 14:01:13
Zitat von: houseowner123 am 22 Dezember 2015, 13:45:01
So how do I get rid of all thos obsolete things? Can you implement a cleanup in the code looking for double entries and obsolete settings?
deletereading Mythz .*
shutdown restart
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: houseowner123 am 22 Dezember 2015, 14:04:38
Do I substitute the * with the name of the parameter?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Dezember 2015, 14:12:57
Zitat von: houseowner123 am 22 Dezember 2015, 14:04:38
Do I substitute the * with the name of the parameter?
no. just delete all and restart. You will se no sideeffect.
deletereading Mythz .*
shutdown restart
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Dezember 2015, 15:08:08
0.147 uploaded.

get Mythz zBackupParameters implemented

It saves all pXXX in a backupfile with a special text format.
The file makes very easy to restore all (or some) parameter with  one copy&paste in a telnet fhem session.
The filename is completed with the current date.
I suggest that you clean-up and restart fhem before using the command, so that you have fresh readings.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 22 Dezember 2015, 19:52:47
sounds nice. In which Location do you save the file?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Dezember 2015, 20:10:08
Zitat von: willybauss am 22 Dezember 2015, 19:52:47
sounds nice. In which Location do you save the file?
I read the attibute "global statefile" and change the filename;
For me ./fhem/log/Mythz-date.backup
the backup-file-path is shown after using the command.

I will probably use the backup-file 2 times in the next 15 years. after flashing the firmware or  after changing the pcb (when it will fail). Maybe other users find further benefits.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 22 Dezember 2015, 22:13:29
I'll give it a try after Christmas.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: glücksgriff am 27 Dezember 2015, 15:12:57
Hallo und fröhliche Weihnachten alle zusammen,

hätte mal ne frage. Ich kann dank eurer Hilfe seit ca 1 Jahr die Daten meiner LWZ auslesen und loggen. Ausgelesen wird über Raspberry mittels USB Kabel, übertragen über WLAN. Leider habe ich dass Problem dass mir die Daten immer nur ca. 6 Wochen gespeichert werden. Dann fängt das System zu spinnen an( aktuelle Daten werden angezeigt. Logdateien aber nicht mehr abgespeichert). Wenn ich das System neu auflege, funktioniert es wieder perfekt, für ca 6 Wochen.

Kann es daran liegen dass ich auf die SD-Karte speichere. Wohin speichert Ihr.

L.G.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 27 Dezember 2015, 16:07:26
Zitat von: glücksgriff am 27 Dezember 2015, 15:12:57
Kann es daran liegen dass ich auf die SD-Karte speichere. Wohin speichert Ihr.
fröhliche Weihnachten
Possible, very possible
My data and my fhem is  on a nas.
But you can decide also to put only the data on the nas, or make backups or ....

I would suggest you to look here.
http://forum.fhem.de/index.php/board,32.0.html 
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 27 Dezember 2015, 17:19:40
Loggst du in eine Date pro Monat oder pro Jahr?
wenns pro jahr ist, könnte das logfile einfach zu groß werden.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 27 Dezember 2015, 22:50:25
Auch bei mir landen alle Daten auf einem NAS. Jeden Monat ein neues Logfile, sonst dauert der Aufbau der Charts einfach zu lange, weil die Dateien zu groß werden. SD-Karten sind nicht für ständiges beschreiben gebaut. Deshalb alles, was regelmäßig geschrieben werden muss, aufs NAS.
Was passiert denn nach 6 Wochen? Werden die Dateien nicht mehr gespeichert und nach einem Reboot ist alles wieder gut, oder musst Du das komplette System neu aufsetzen? Schon mal versucht, jede Woche automatisch einen Reboot zu machen, z.B. per Cron-Job? Kühlkörper auf den wichtigsten Bauteilen des Raspi und Kühlöffnungen im Gehäuse helfen sicher auch.
Du könntest auch das SYSMON-Modul von FHEM installieren, um mehr über Dein System zu erfahren (Prozessorauslastung, Speicherbedarf, Temperatur, ...). Oder erst mal einen "top" aufrufen und checken, was für Prozesse Dir in die Quere kommen.
Weißt Du denn, ob fhem oder die WLAN-Verbindung das Problem ist?

ach ja: nachträglich herzlichen Glückwunsch zu Weihnachten, oder so ähnlich
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: NaCkHaYeD am 06 Januar 2016, 20:45:00
Hi,

ich habe zwei Raspberry Clients als Slaves zum ermittlen von Temperatur, Feuchtigkeit, Luftqualität. Beide senden die Daten per FHEM2FHEM an den Server Raspy.
Der Server Raspi legt die Logs pro Tag an. Eines zum Wetterdienst, eines pro Raspi Client, eines für den Raspi Server, eines für das PiFace was meine Zirkulationspumpe erstellt. Interval in etwa 5min.
Alle Daten werden per Cron Job um 0:01 per Network Share an das NAS gesendet.
Ebenso werden bei allen Raspi´s die Logs älter 365 Tagen per Cron gelöscht.
Jeden Sonntag sichern sich alle Raspis per RaspiBackup komplett auf das NAS. Hier werden die letzten 5 Sicherungen gehalten.
In jedem Raspi ist eine 16GB Karte verbaut.

Mal schauen ob dies alles save ist, da der Kleine am Kabel gerupft hat und die SD karte gebrochen ist, kaum sichtbar. Fehler: SD Karte ist so heiß wie eine Herdplatte innerhalb von Sekunden. Finde ich nicht so lustig da Brandquelle. Was so eine SD Karte alles anrichten kann. Immerhin hat es der Raspi überlebt.
Morgen gibt es eine Neue, dann wird retour gesichert.

mfg
NaCkHaYeD
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 06 Januar 2016, 21:58:27
Klingt interessant, obwohl so ein ganz kleines bisschen off topic. Wie sorgst Du denn beim RaspiBackup dafür, dass keine Prozesse laufen oder Dateien geöffnet sind? Nach dem Backup Reboot, um wieder alles einzuschalten?


PS:
Auch Dir Alles Gute zum Neuen Jahr  :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: NaCkHaYeD am 09 Januar 2016, 21:14:07
Hallo Willibaus,

stimmt du hast recht, das mit den laufenden Prozessen hatte ich nicht bedacht, jedoch läuft bei mir sowieso nur FHEM.
Du kannst aber mit -o, -a Parameter Scripte vor/nach dem Backup durchführen.

FHEM wird doch wohl sowieso nur die Datei beschreiben, wenn eine Ausgabe erfolgt.

Alles in allem hat bei mir der Restore erstmal funktioniert.

P.S.: Hätte ich wissen können, da es in meiner Welt ja die Volume Shadow Copies gibt.  :P

mfg.
NaCkHaYeD
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Frostie am 20 Januar 2016, 14:39:39
Hallo Zusammen,

ich bin neu in diesem Forum und wollte zunächst einmal vielen Dank sagen und meinen höchsten Respekt für die tolle Arbeit und die Bereitschaft das mit anderen zu teilen ausdrücken.

Especially thanks to Immi for this great module to control the THZ. Since I bought my house 3 years ago, I was continuously trying to optimize it, but it proved to be a little bit like running in the dark. Nevertheless the module and the ability to continously read out the status helps a lot.

As I have probably one of the earliest versions of the THZ (Firmware 2.15), the system has obviously some "childhood illnesses". E.g. continuously running the heat circulation pump while Solar is enabled. For this reason I am searching for a possibility to set p80 EnableSolar only then on 1 if the Collector Temperature is high enough. To write the term should not be the problem, but it is not possible to set the necessary parameter. I am only able to set p01-p12. I'm not sure if it is related to the Firmware Version (i set 2.06 in FHEM) or if it is not possible in general.

Maybe one of you knows the reason. I imagine to have read that is also possible to set the other parameters. Thank you a lot!

Thanks
Dominik
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 20 Januar 2016, 19:16:35
Hi Dominik

welcome to the THZ list :)
Do you get any error message when you try to set p80?
If not, set the verbose level of the THZ module to 5 and check again. At least you could get more information.

Best
Markus
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 Januar 2016, 22:50:14
Hi Dominik
welcome to fhem
you cannot set p80 because it is not implemented.
It is not implemented, because I cannot test it; I have a completely different firmware.

I enabled it now.

download the following file
stop fhem
overwrite the file manually
start fhem
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Frostie am 21 Januar 2016, 13:16:48
Thank you both for your quick answers!

@ Markus: I got the message that only p01-p12 can be set.

@ Immi: Great. Thanks a lot. I will try it as soon as possible and give feedback!

P.S. I ask my self how i survived without that module  ;) Just yesterday evening the THZ continously switched between making hot water and heating.
A syndrome appearing when the one-way velve doens't close correctly due to particles of dirt. Thus after switching the return water of the heat circuit can flow through the water circuit and cools it down in some seconds. I had the same situation last year and realized it after one week!
It is really so helpful to have the possibility to monitor the functionality!

MfG
Dominik
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 21 Januar 2016, 13:33:27
Yep, i know. I control my air vent with the THZ module better in winter mode to avoid humidity from being too low.
Thats not possible without THZ :)

Have you ever had a look at all the THZ info in fhemwiki? There are some more ReadingsGroups examples and so...

Best,
Markus
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Frostie am 21 Januar 2016, 14:08:57
That's true. The vent control is also a great benefit.
Yes, i already read the information in fhemwiki. Unfortunately e.g. the vent timeout for 60 min didn't work.
I suppose that there are some more functionalities that won't work with my firmware version. As Immi already stated, the module is primarily proved for newer versions.
The main parameters can be set and all paramters can be read. That's already more I ever had before and as I just started to use this module there is certainly a lot of time and room for experiments  ;) E.g. i like the idea to control the vent due to the status of presence (via mobile phone registration in the wlan) or in dependency of the air quality measured by a co2 usb stick.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 21 Januar 2016, 14:18:50
You can create your own timevent off for 60mins with DOIF or AT and notify if you need that ;)
p07fanStageDay and p08FanStageNight should be writeable. i do it automatically.

if you want to, i can send the config.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 21 Januar 2016, 16:32:48
Zitat von: Frostie am 21 Januar 2016, 13:16:48
@ Immi: Great. Thanks a lot. I will try it as soon as possible and give feedback!
Dominik, you are welcome
The only condition (gentlemen-agreement) for the support here, is that when you have a working solution for the old firmware, you share your experience with the forum and wiki.
Clearly depending on your time and know-how :)
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Frostie am 21 Januar 2016, 16:36:25
Gute Idee. Gerne  :) Wer würde da schon nein sagen ;)
Sollte ich mal etwas Zeit haben und etwas lohnendes dabei entstehen werde ich den Ball natürlich gerne auch zurückspielen ;)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Frostie am 21 Januar 2016, 16:37:24
Was just answering in that way  ;D as soon as i have some more experience to share i will of couse do that... ;)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Frostie am 21 Januar 2016, 22:34:25
Hello Immi,

just tried the new file. The entry appears and I can set p80 in FHEM. Unfortunately it doesn't work. In the moment I set the parameter the network connection to the Raspi gets lost and I have to take it from the energy source. The follwoing entry is written in the Log File. Any idea?

2016.01.21 22:19:03 1: PERL WARNING: Use of uninitialized value $cmd in concatenation (.) or string at ./FHEM/00_THZ.pm line 1280.
2016.01.21 22:19:03 1: PERL WARNING: Use of uninitialized value in hash element at ./FHEM/00_THZ.pm line 916.
Can't use an undefined value as an ARRAY reference at ./FHEM/00_THZ.pm line 928.

Thank you!
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Frostie am 21 Januar 2016, 22:40:53
Perhaps in addition:

in the single reading and entry is displayed: "p80EnableSolar argument"
while in the reading pSolar "p80EnableSolar 0" is written
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 21 Januar 2016, 23:10:02
Hi dominik
sorry there was a stupid error, which has been fixed.

If this new version still has problems please post the log with verbose level of the THZ module to 5
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Frostie am 21 Januar 2016, 23:43:09
Again what learned ... as Loddar Matthäus would say ;)

Here you are:

2016.01.21 23:33:14 5: Cmd: >set Mythz p80EnableSolar 1<
2016.01.21 23:33:14 1: PERL WARNING: Use of uninitialized value $cmd in concatenation (.) or string at ./FHEM/00_THZ.pm line 1280.
2016.01.21 23:33:14 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2016.01.21 23:33:15 5: Mythz sending 02
2016.01.21 23:33:15 5: SW: 02
2016.01.21 23:33:15 5: Mythz start Funktion THZ_ReadAnswer
2016.01.21 23:33:15 5: THZ_ReadAnswer: uc unpack: '10'
2016.01.21 23:33:15 5: Mythz sending 0100011003
2016.01.21 23:33:15 5: SW: 0100011003
2016.01.21 23:33:15 5: Mythz start Funktion THZ_ReadAnswer
2016.01.21 23:33:15 5: THZ_ReadAnswer: uc unpack: '10'
2016.01.21 23:33:15 5: Mythz start Funktion THZ_ReadAnswer
2016.01.21 23:33:15 5: THZ_ReadAnswer: uc unpack: '02'
2016.01.21 23:33:15 5: Mythz sending 10
2016.01.21 23:33:15 5: SW: 10
2016.01.21 23:33:15 5: Mythz start Funktion THZ_ReadAnswer
2016.01.21 23:33:15 5: double read 1 activated 01
2016.01.21 23:33:15 5: double read 1 result with buf1  0100
2016.01.21 23:33:15 5: double read 2 activated 0100
2016.01.21 23:33:15 5: double read 2 result with buf1  01009F
2016.01.21 23:33:15 5: double read 3 activated 01009F
2016.01.21 23:33:15 5: double read 3 result with buf1  01009FF3
2016.01.21 23:33:15 5: double read 4 activated 01009FF3
2016.01.21 23:33:15 5: double read 4 result with buf1  01009FF301
2016.01.21 23:33:15 5: double read 5 activated 01009FF301
2016.01.21 23:33:15 5: double read 5 result with buf1  01009FF301DF
2016.01.21 23:33:15 5: double read 6 activated 01009FF301DF
2016.01.21 23:33:15 5: double read 6 result with buf1  01009FF301DFFF
2016.01.21 23:33:15 5: double read 7 activated 01009FF301DFFF
2016.01.21 23:33:15 5: double read 7 result with buf1  01009FF301DFFF4F
2016.01.21 23:33:15 5: double read 8 activated 01009FF301DFFF4F
2016.01.21 23:33:15 5: double read 8 result with buf1  01009FF301DFFF4F01
2016.01.21 23:33:15 5: double read 9 activated 01009FF301DFFF4F01
2016.01.21 23:33:15 5: double read 9 result with buf1  01009FF301DFFF4F01C2
2016.01.21 23:33:15 5: double read 10 activated 01009FF301DFFF4F01C2
2016.01.21 23:33:15 5: double read 10 result with buf1  01009FF301DFFF4F01C200
2016.01.21 23:33:15 5: double read 11 activated 01009FF301DFFF4F01C200
2016.01.21 23:33:15 5: double read 11 result with buf1  01009FF301DFFF4F01C20000
2016.01.21 23:33:15 5: double read 12 activated 01009FF301DFFF4F01C20000
2016.01.21 23:33:15 5: double read 12 result with buf1  01009FF301DFFF4F01C2000031
2016.01.21 23:33:15 5: double read 13 activated 01009FF301DFFF4F01C2000031
2016.01.21 23:33:15 5: double read 13 result with buf1  01009FF301DFFF4F01C200003118
2016.01.21 23:33:15 5: double read 14 activated 01009FF301DFFF4F01C200003118
2016.01.21 23:33:15 5: double read 14 result with buf1  01009FF301DFFF4F01C20000311800
2016.01.21 23:33:15 5: double read 15 activated 01009FF301DFFF4F01C20000311800
2016.01.21 23:33:15 5: double read 15 result with buf1  01009FF301DFFF4F01C2000031180000
2016.01.21 23:33:15 5: double read 16 activated 01009FF301DFFF4F01C2000031180000
2016.01.21 23:33:15 5: double read 16 result with buf1  01009FF301DFFF4F01C200003118000000
2016.01.21 23:33:15 5: double read 17 activated 01009FF301DFFF4F01C200003118000000
2016.01.21 23:33:15 5: double read 17 result with buf1  01009FF301DFFF4F01C20000311800000001
2016.01.21 23:33:15 5: double read 18 activated 01009FF301DFFF4F01C20000311800000001
2016.01.21 23:33:15 5: double read 18 result with buf1  01009FF301DFFF4F01C2000031180000000100
2016.01.21 23:33:15 5: double read 19 activated 01009FF301DFFF4F01C2000031180000000100
2016.01.21 23:33:15 5: double read 19 result with buf1  01009FF301DFFF4F01C200003118000000010001
2016.01.21 23:33:15 5: double read 20 activated 01009FF301DFFF4F01C200003118000000010001
2016.01.21 23:33:15 5: double read 20 result with buf1  01009FF301DFFF4F01C200003118000000010001B0
2016.01.21 23:33:15 5: double read 21 activated 01009FF301DFFF4F01C200003118000000010001B0
2016.01.21 23:33:15 5: double read 21 result with buf1  01009FF301DFFF4F01C200003118000000010001B0BF
2016.01.21 23:33:15 5: double read 22 activated 01009FF301DFFF4F01C200003118000000010001B0BF
2016.01.21 23:33:15 5: double read 22 result with buf1  01009FF301DFFF4F01C200003118000000010001B0BF10
2016.01.21 23:33:15 5: double read 23 activated 01009FF301DFFF4F01C200003118000000010001B0BF10
2016.01.21 23:33:15 5: double read 23 result with buf1  01009FF301DFFF4F01C200003118000000010001B0BF1003
2016.01.21 23:33:15 5: THZ_ReadAnswer: uc unpack: '01009FF301DFFF4F01C200003118000000010001B0BF1003'
2016.01.21 23:33:15 5: Mythz sending 10
2016.01.21 23:33:15 5: SW: 10
2016.01.21 23:33:15 5: read before write from THZ: F301DFFF4F01C200003118000000010001B0BF
2016.01.21 23:33:15 1: PERL WARNING: Use of uninitialized value in hash element at ./FHEM/00_THZ.pm line 916.
Can't use an undefined value as an ARRAY reference at ./FHEM/00_THZ.pm line 928.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Frostie am 21 Januar 2016, 23:45:18
@ Markus, now I understand your hint to verbose 5 ;) Always thought LogFile is LogFile
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Frostie am 21 Januar 2016, 23:58:58
with the new PM the edit "argument" has gone. But the situation stays. Here is the Log:

2016.01.21 23:33:14 5: Cmd: >set Mythz p80EnableSolar 1<
2016.01.21 23:33:14 1: PERL WARNING: Use of uninitialized value $cmd in concatenation (.) or string at ./FHEM/00_THZ.pm line 1280.
2016.01.21 23:33:14 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2016.01.21 23:33:15 5: Mythz sending 02
2016.01.21 23:33:15 5: SW: 02
2016.01.21 23:33:15 5: Mythz start Funktion THZ_ReadAnswer
2016.01.21 23:33:15 5: THZ_ReadAnswer: uc unpack: '10'
2016.01.21 23:33:15 5: Mythz sending 0100011003
2016.01.21 23:33:15 5: SW: 0100011003
2016.01.21 23:33:15 5: Mythz start Funktion THZ_ReadAnswer
2016.01.21 23:33:15 5: THZ_ReadAnswer: uc unpack: '10'
2016.01.21 23:33:15 5: Mythz start Funktion THZ_ReadAnswer
2016.01.21 23:33:15 5: THZ_ReadAnswer: uc unpack: '02'
2016.01.21 23:33:15 5: Mythz sending 10
2016.01.21 23:33:15 5: SW: 10
2016.01.21 23:33:15 5: Mythz start Funktion THZ_ReadAnswer
2016.01.21 23:33:15 5: double read 1 activated 01
2016.01.21 23:33:15 5: double read 1 result with buf1  0100
2016.01.21 23:33:15 5: double read 2 activated 0100
2016.01.21 23:33:15 5: double read 2 result with buf1  01009F
2016.01.21 23:33:15 5: double read 3 activated 01009F
2016.01.21 23:33:15 5: double read 3 result with buf1  01009FF3
2016.01.21 23:33:15 5: double read 4 activated 01009FF3
2016.01.21 23:33:15 5: double read 4 result with buf1  01009FF301
2016.01.21 23:33:15 5: double read 5 activated 01009FF301
2016.01.21 23:33:15 5: double read 5 result with buf1  01009FF301DF
2016.01.21 23:33:15 5: double read 6 activated 01009FF301DF
2016.01.21 23:33:15 5: double read 6 result with buf1  01009FF301DFFF
2016.01.21 23:33:15 5: double read 7 activated 01009FF301DFFF
2016.01.21 23:33:15 5: double read 7 result with buf1  01009FF301DFFF4F
2016.01.21 23:33:15 5: double read 8 activated 01009FF301DFFF4F
2016.01.21 23:33:15 5: double read 8 result with buf1  01009FF301DFFF4F01
2016.01.21 23:33:15 5: double read 9 activated 01009FF301DFFF4F01
2016.01.21 23:33:15 5: double read 9 result with buf1  01009FF301DFFF4F01C2
2016.01.21 23:33:15 5: double read 10 activated 01009FF301DFFF4F01C2
2016.01.21 23:33:15 5: double read 10 result with buf1  01009FF301DFFF4F01C200
2016.01.21 23:33:15 5: double read 11 activated 01009FF301DFFF4F01C200
2016.01.21 23:33:15 5: double read 11 result with buf1  01009FF301DFFF4F01C20000
2016.01.21 23:33:15 5: double read 12 activated 01009FF301DFFF4F01C20000
2016.01.21 23:33:15 5: double read 12 result with buf1  01009FF301DFFF4F01C2000031
2016.01.21 23:33:15 5: double read 13 activated 01009FF301DFFF4F01C2000031
2016.01.21 23:33:15 5: double read 13 result with buf1  01009FF301DFFF4F01C200003118
2016.01.21 23:33:15 5: double read 14 activated 01009FF301DFFF4F01C200003118
2016.01.21 23:33:15 5: double read 14 result with buf1  01009FF301DFFF4F01C20000311800
2016.01.21 23:33:15 5: double read 15 activated 01009FF301DFFF4F01C20000311800
2016.01.21 23:33:15 5: double read 15 result with buf1  01009FF301DFFF4F01C2000031180000
2016.01.21 23:33:15 5: double read 16 activated 01009FF301DFFF4F01C2000031180000
2016.01.21 23:33:15 5: double read 16 result with buf1  01009FF301DFFF4F01C200003118000000
2016.01.21 23:33:15 5: double read 17 activated 01009FF301DFFF4F01C200003118000000
2016.01.21 23:33:15 5: double read 17 result with buf1  01009FF301DFFF4F01C20000311800000001
2016.01.21 23:33:15 5: double read 18 activated 01009FF301DFFF4F01C20000311800000001
2016.01.21 23:33:15 5: double read 18 result with buf1  01009FF301DFFF4F01C2000031180000000100
2016.01.21 23:33:15 5: double read 19 activated 01009FF301DFFF4F01C2000031180000000100
2016.01.21 23:33:15 5: double read 19 result with buf1  01009FF301DFFF4F01C200003118000000010001
2016.01.21 23:33:15 5: double read 20 activated 01009FF301DFFF4F01C200003118000000010001
2016.01.21 23:33:15 5: double read 20 result with buf1  01009FF301DFFF4F01C200003118000000010001B0
2016.01.21 23:33:15 5: double read 21 activated 01009FF301DFFF4F01C200003118000000010001B0
2016.01.21 23:33:15 5: double read 21 result with buf1  01009FF301DFFF4F01C200003118000000010001B0BF
2016.01.21 23:33:15 5: double read 22 activated 01009FF301DFFF4F01C200003118000000010001B0BF
2016.01.21 23:33:15 5: double read 22 result with buf1  01009FF301DFFF4F01C200003118000000010001B0BF10
2016.01.21 23:33:15 5: double read 23 activated 01009FF301DFFF4F01C200003118000000010001B0BF10
2016.01.21 23:33:15 5: double read 23 result with buf1  01009FF301DFFF4F01C200003118000000010001B0BF1003
2016.01.21 23:33:15 5: THZ_ReadAnswer: uc unpack: '01009FF301DFFF4F01C200003118000000010001B0BF1003'
2016.01.21 23:33:15 5: Mythz sending 10
2016.01.21 23:33:15 5: SW: 10
2016.01.21 23:33:15 5: read before write from THZ: F301DFFF4F01C200003118000000010001B0BF
2016.01.21 23:33:15 1: PERL WARNING: Use of uninitialized value in hash element at ./FHEM/00_THZ.pm line 916.
Can't use an undefined value as an ARRAY reference at ./FHEM/00_THZ.pm line 928.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 22 Januar 2016, 07:02:11
wait for it :)
immi is the THZ master. he'll find a way ;)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Januar 2016, 11:15:26
Hi Dominik
thanks for the logs
another update here
Just to be sure:
always make sure
than post the logs
immi

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 22 Januar 2016, 16:26:55
Hier ist mal das DOIF, dass bei ueberschreiten der Luftfeuchtigkeit die Lueftung einschaltet sofern sie aus ist:

define di_highhum DOIF (([TF_BADOG:humidity] > 60 ) or ([TF_WZ:humidity] > 60 ) or ([RT_Schlafzimmer_Climate:humidity] > 55 ) and ([Mythz:Betriebsart] eq "winter") and ([Mythz:Zuluftventilator] == 0)) (set Mythz p07FanStageDay 2,set Mythz p08FanStageNight 2,define offagainafterhighhum1 at +01:00:00 set Mythz p07FanStageDay 0,define offagainafterhighhum2 at +01:00:00 set Mythz p08FanStageNight 0)

Bitte beachte, dass die Betriebsart aus einem userReading kommt.

Und hier die Zeitsteuerung:
Lueftung an:
define LueftungAn at +*03:00:00 {if ((ReadingsVal("Mythz","Betriebsart",0) eq "winter") && (ReadingsVal("Mythz","Zuluftventilator",0) == 0)) {fhem "set Mythz p07FanStageDay 1; set Mythz p08FanStageNight 1"}}
Lueftung aus:

define LueftungAus at+*03:00:00 {if ((ReadingsVal("Mythz","Betriebsart",0) eq "winter") && (ReadingsVal("Mythz","Zuluftventilator",0) > 0)) {fhem "set Mythz p07FanStageDay 0; set Mythz p08FanStageNight 0"}}
attr LueftingAus alignTime 00:30


Hier wird die Lueftung entsprechend Sommermodus/Wintermodus an oder ausgeschaltet.
Sommermodus:
define Summermode notify Mythz:Betriebsart.* {if ((ReadingsVal("Mythz","Betriebsart",0) eq "summer") && (ReadingsVal("Mythz","Zuluftventilator",0) == 0)) {fhem "set Mythz p07FanStageDay 1; set Mythz p08FanStageNight 1"}}
Wintermodus:
define Wintermode notify Mythz:Betriebsart.* {if ((ReadingsVal("Mythz","Betriebsart",0) eq "winter") && (ReadingsVal("Mythz","Zuluftventilator",0) > 0)) {fhem "set Mythz p07FanStageDay 0; set Mythz p08FanStageNight 0"}}
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Frostie am 22 Januar 2016, 17:40:02
Hey guys,

really unbelievable great support here! Thank you so much!

@ Immi: Now it works. Perfect. Thanks a lot.

@ Markus: Thank you for the code. I will try parts of it in the next days. The control in depedance of humidty is something that probably won't work in my home. We mostly have to fight too low humidty. I'm happy if we can hold 30%. Really dry air. Mostly a beer or glas of wine is helpfull ;)

I have implemented a humidty control in the garage using the dewpoint module and status control via Piface. If the given conditions are true it opens the port a little bit to vent the garage. Works good, but the last days were definitly too cold. -20 degrees last night... If someone is interested in the code...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Januar 2016, 21:59:37
Zitat von: Frostie am 22 Januar 2016, 17:40:02
really unbelievable great support here! Thank you so much!
@ Immi: Now it works. Perfect. Thanks a lot.
So that I understand: what are the possible values of p80EnableSolar? only 0 and 1?
Do you need also  p81,p82,p84?
When you have time, please write something for the thz wiki, concerning your experience with your old firmware; and send it to Markus. I do not have an account in fhem-wiki.

Zitat
I have implemented a humidty control in the garage using the dewpoint module and status control via Piface. If the given conditions are true it opens the port a little bit to vent the garage. Works good, but the last days were definitly too cold. -20 degrees last night... If someone is interested in the code...
post in german the code in FHEM»Codeschnipsel
or in engl. in englishcorner

I want do do something with humidity for my basement (which is not connected to the THZ ventilation); still not sure how and what. Luckily,  I discovered the "joy" of aliexpress and I am waiting for 44 supercheap objects (e.g. esp8622, DHT22..), if they arrive before summer :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Frostie am 24 Januar 2016, 08:40:44
Yes. The possible values are only 0 and 1 and will set it depending on the Kollektor Temp. On 1 the heat circulation pump seems to run all the Time.

Having some time I will do this.

Thank you for the offer but 81,82 and 84 are not absolutely necessary, because i won't change them over and over again.

I also discovered the joy of "china shipping". Not such a joy was the letter i got yesterday that i have to come to the Customs Office to pick up the delivery because it was't declarated correctly.  ::) The customs Office has such employee-friendly opening times  :P
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 24 Januar 2016, 19:19:53
v 0.148 uploaded
- p80 implemented for older firmware
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 24 Januar 2016, 20:15:21
not directly related to THZ, but might be interesting anyway:


I ordered a 5" touchscreen HDMI display (http://de.aliexpress.com/item/800-480-Banana-Pi-5-inch-LCD-HDMI-Touch-Screen-Display-Module-TFT-LCD-Raspberry-Pi/32375436526.html) and attached it to my Raspberry Pi. It was a direct China import for approx. 33€ incl. shipping cost. Installation of touchscreen driver and virtual display keyboard was a bit tricky, but finally works smoothly.


Up to now the RasPi worked completely headless, which worked most of the time. But sometimes the RasPi reboots unexpectedly (don't know the reason yet) and in rare cases this causes corrupted directory entries which stop the boot sequence. So I had to carry the TV to basement to have a display for RasPi or alternatively bring the RasPi to living room to identify and fix the issue. Now I can simply switch on the display's backlight and read the display messages. In this state the virtual keyboard does not work yet, since it needs the grapics UI. So I add a USB keyboard temporarily.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: ioT4db am 30 Januar 2016, 00:13:48
Hallo zusammen,

ich würde mir gern den Statuswert für den Volumenstrom der THZ abrufen.

Dieser ist aber in der aktuellen Version nicht vorhanden oder habe ich Ihn nur übersehen?

Ist dieser Wert dann vlt. noch irgendwo in den Raw-Werten vorhanden und nur noch nicht identifiziert?

Freu mich auf Infos...

Gruß und Danke schonmal...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 30 Januar 2016, 13:13:31
Darüber ist glaube ich keinem vor uns was bekannt. In sHC1 gibt es ein paar nicht identifizierte Werte


x60:  x64:  x72: 0x76:


Evtl. passt ja da was?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: kriforum am 30 Januar 2016, 15:26:01
Hi again,

Just wanted to update you on my progress (last post 22.12.15).
I have now since a few days running the logging via FHEM. The RasPi is connected via USB in parallel to the ISG Web from Stiebel (had bought that earlier).

I was wondering if both work in parallel, but so far this is the case.
As finally both access the CAN bus, this shouldn't be a problem, as there is also the possibility to have two operating panels connected.
However I don't want to know what happens when both try to write something into any register at the same time...

I did the FHEM setup mainly using Willy's guidelines and also his config and plots.
Main issues were wrong coding table in my editor leading to wrong characters in fhem.cfg and looking for the SSL update for successfully sending mails.

Now the next stage is optimizing my HP... My plots by far do not look as nice as Willy's (on page 1 of the THZ optimization thread).

Will let you know.

For the time being my big thank you for all your work and efforts!


Gesendet von iPad mit Tapatalk
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 30 Januar 2016, 16:30:56
Hi kriforum
happy to hear, that you are happy with fhem.
I am curious: is there still a use case where you would say ISG-Web is better than fhem?
or you are going to sell it now :)
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: kriforum am 30 Januar 2016, 17:26:27
Most of the time I used it for checking any states or changing the fan stages - both works as least as good with FHEM.

Writing new parameters, e.g. fan activation times, did not always work reliably, therefore I changed it directly on the operation panel - if at all.

What is useful is to operate the HP from abroad via VPN, but I can do this now also with FHEM.

I think I will keep it for a while and if nothing unexpected happens will sell it.

It's nice for people who want to have a plug and play solution, and I also used it for logging (by parsing the parameter status HTML page generated by the ISG), but to operate that separate SW was much more effort than with FHEM now. And also that required input from the guy who did the logging SW.

Finally the ISG is too expensive in comparison. If one wants to have a service solution from Stiebel (remote access) it's required. But these are additional cost on top.

One time Stiebel updated my firmware remotely (on my request), therefore I think it's finally a potential security topic, too.

I'll keep you updated. Let me know if you want to know more about my ISG experience.

Christian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: ioT4db am 30 Januar 2016, 20:08:13
Zitat von: willybauss am 30 Januar 2016, 13:13:31
Darüber ist glaube ich keinem vor uns was bekannt. In sHC1 gibt es ein paar nicht identifizierte Werte


x60:  x64:  x72: 0x76:


Evtl. passt ja da was?
Hallo Willy,

hab die Werte mal verglichen. Leider scheint keines der oben genannten mit dem "Volumenstrom" übereinzustimmen bzw. zu "harmonieren".

Da der Volumenstrom ja auch beim aufheizen von Warmwasser "anliegt" wäre es auch eher ein Wert, den ich in sGlobal vermuten würde. Da scheint aber schon alles "erforscht" zu sein, oder?

Grüße
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 31 Januar 2016, 13:19:10
sGlobal dürfte komplett sein, vermute ich. Der Volumenstrom bei WW dürfte aber anders sein als beim heizen, denn da wird er ja, wenn ich mich nicht täusche, durch die Brauchwasserpumpe erzeugt. Die hat i.d.R. eine andere Einstellung. Ich habe diesen Wert allerdings nie gemessen.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre1979 am 31 Januar 2016, 16:06:38
Hallo Zusammen,

ich freue mich, dass ich hier ein so informatives Forum gefunden habe, um mein Projekt: "Überwachung THZ 303" zu realisieren.

Ich habe eine THZ303 Bj. 2007 mit Firmware 2.05 !!! in der fhem.cfg ist attr firmware 2.06 gesetzt. Baudrate 9600.
Eine Verbindung konnte ich nach einigen Stunden probieren und einstellen, herstellen und das ganze funktioniert schon sehr zuverlässig. Ich habe mir diverse Statusanzeigen zusammengebastelt, damit ich immer einen Überblick habe, was die THZ gerade macht.

So, nun zu einem kleinen Problem.

Wenn ich den Parameter sProgramm auslese, erhalte ich einen recht langen String. In einem Teil des String, kann man erkennen, ob die Anlage im Automatik oder Handbetrieb ist. Gibt es eine Möglichkeit, beim Auslesen des Wertes nur einen Teil des String zu beachten, damit ich dann zB. 00 für Handbetrieb oder 01 für Automatik als Wert bekomme.

hand betrieb
90EE00050102010200000195000000000000000000

automatik Betrieb
91EE01050102010200000195000000000000000000

Vielen Dank für Eure Anregungen.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 31 Januar 2016, 16:57:26
Hi, und willkommen im Forum.

Ich vermute mal, dass fhem die Möglichkeit bietet, aus Strings Teile auszuschneiden. Das hat dann aber nichts mit dem THZ-Modul zu tun, sondern wäre dann eine generelle fhem-Funktionalität. Alternativ gibt es immer die Möglichkeit, perl-Code in Anweisungen zu verwenden oder sich in /opt/fhem/FHEM/99_myUtils.pm eigenen perl-Code zu schreiben, den man dann entsprechend aufruft.


Das war bei mir immer eine Bastelei mit try&error, deshalb kann ich Dir da nicht wirklich helfen. Aber Du könntest mal in meiner Beispielkonfiguration im anderen Thread schauen, wie ich den Versand von Emails im Alarmfall gebaut habe. Das geht ebenfalls über den Aufruf eigenen perl-Codes.


Edit:
Ich sehe grade bei Dir "Beiträge: 1", d.h. Du hast noch gar keine FHEM-Erfahrung (?). Dann ist aller Anfang schwer => lesen, lesen, lesen. Die Jungs in den anderen Forenbereichen sind nicht immer so begeistert wie wir, wenn sie Anfängerfragen zum 17. mal beantworten sollen. Es gibt im Forum auch einen Bereich für "Anfängerfragen".
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 31 Januar 2016, 21:49:11
Zitat von: andre1979 am 31 Januar 2016, 16:06:38
hand betrieb
90EE00050102010200000195000000000000000000

automatik Betrieb
91EE01050102010200000195000000000000000000


Hi Andre
welcome
you are getting the raw register "EE" because I have not implemented the parsing for it; I have a newer firmware and the registers are not documented.
Now if you tell me more about the red part of the register, I can implement a parsing for it.

e.g.
91     -crc-
EE     -register name-
01     -operation mode-
0501 -I am tired-
02    - I go to sleep
010200000195000000000000000000

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 07 Februar 2016, 15:33:06
Zitat von: andre1979 am 31 Januar 2016, 16:06:38
hand betrieb
90EE00050102010200000195000000000000000000

automatik Betrieb
91EE01050102010200000195000000000000000000

Vielen Dank für Eure Anregungen.

Hallo Andre,

das Register EE gibt es auch in meiner Firmware (2.14).  Bei mir setzt sich der String wie folgt zusammen:

01        Betriebsart   (0=manuell;1=automatic)
05        ??     
01        ??     
02        HC progstat   (1=normal;2=setback;3=standby)
01        DHW progstat   (1=normal;2=setback;3=standby)
02        FAN progstat   (1=normal;2=setback;3=standby)
00000195  Basiszeit AP0 (Minutenzähler)   
00        AP0 status   (0=anwesend; 1=abwesend)
00000000  Beginn AP0 (in Minuten)   
00000000  Endzeit AP0 (in Minuten)

Einige der Werte beziehen sich auf das Abwesenheitsprogramm AP0. Das habe ich bisher (in 12 Jahren) noch nie genutzt. Die Programmstatuswerte kann man auch über andere Register abfragen. Daher war die Auswertung von Register EE bei mir bisher nicht Prio 1. Im aktuellen Release 0.148 von 00_THZ kannst Du Dir deshalb nur die Rohdaten ansehen. Es ist aber leicht möglich den Parser zu ergänzen. Ich habe das jetzt bei mir mal getestet und so müsste es aussehen:
"EEprg206" => [["OpMode: ", 4, 2, "hex", 1], [" ProgStateHC: ", 10, 2, "opmodehc", 1], [" ProgStateDHW: ", 12, 2, "opmodehc", 1],
         [" ProgStateFAN: ", 14, 2, "opmodehc", 1], [" BaseTimeAP0: ", 16, 8, "hex", 1], [" StatusAP0: ", 24, 2, "hex", 1],
         [" StartTimeAP0: ", 26, 8, "hex", 1], [" EndTimeAP0: ", 34, 8, "hex", 1]
         ],


Vielleicht kann immi das auch im nächsten Release einfügen. Du kannst das ja danach mal mit Deiner Firmware 2.05 testen.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 07 Februar 2016, 22:40:03
v 0.149 uploaded
- EEprg206 implemented by Andre.k for Andre for older firmwares

p.s. not tested on old firmwares, but I trust completely Andre.K
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 10 Februar 2016, 08:21:53
Hallo,
Ich habe heute meine LWZ mit Firmware 2.06 auf die neue Version 0.149 upgedatet.
Wie kann ich die Daten aus EEprg206 auslesen?
Grüße Peter
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 10 Februar 2016, 08:28:18
Wenn Du im Userinterface von Mythz bist, dann sollten eigentlich alle möglichen "get" Befehle im entsprechenden Pull-Down-Menü (ziemlich weit oben) zur Auswahl angeboten werden. Ist da nichts dabei?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 10 Februar 2016, 08:38:43
Nein. Habe jetzt  gerade nochmals alle Einträge bei "Get" durchsucht. Da ist nichts dabei was "EEprg206" heißt.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 10 Februar 2016, 08:52:01
Hier sind Screenshots aller Einträge bei "Get".
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 10 Februar 2016, 09:33:36
Hi Peter
--- relevant only for old firmwares
EEprg206 is the parsing rule (decoding) of  sProgram
untill last week sProgram was not parsed

this means, you should get sProgram
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 10 Februar 2016, 09:42:20
Vielen Dank.
Das scheint bei mir zu funktionieren.
Hier die Antwort auf sProgram bei meiner LWZ:
OpMode: 1 ProgStateHC: setback ProgStateDHW: setback ProgStateFAN: setback BaseTimeAP0: 57052 StatusAP0: 0 StartTimeAP0: 1200 EndTimeAP0: 1200
Titel: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: NaCkHaYeD am 15 Februar 2016, 20:52:12
Hi,

p56OutTempMaxPumpCycles return value: Argument does not match the allowed inerval Min 1 ...... Max 20

Range kann zwischen 0..20 sein. (THZ 403 SOL v4.39)
Range bei den Min Cycles 0..25.

mfg
NaCkHaYeD
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 16 Februar 2016, 09:48:23
Hi NaCkHaYeD
is it a question or a statement?
have a look at the datasheet
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: NaCkHaYeD am 16 Februar 2016, 21:03:58
It´s a Statement.

My fhem Version only allows me to enter values between 1..20, but 0.20 are possible.
So it was a change request  ;D

Thought that i was wrong, because my version is not actual, but doublecheck with the git, it is still the same. So maybe you can change the argMin to 0 in the next release.

Thanks for your work.

mfg
NaCkHaYeD
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 17 Februar 2016, 07:13:33
v0150 uploaded
min value of P57and56 set to 0

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: NaCkHaYeD am 17 Februar 2016, 20:02:14
Thx, that was fast  ;D
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 24 Februar 2016, 19:48:14
Hi,

Habe nun ein Verbindungsproblem. Gerät ist ne Raspberry PI 2, ist jetzt 8 Monate stabil gelaufen. Letzte Woche keine Connection mehr über Mythz. Habe alles mal Neugestartet. Als Wärmepumpe und Raspberry. Dann lief es.
Nun schon wieder. Es ist sonst nichts angeschlossen. Mehrmals Neugestartet. Ohne Erfolg.

lsusb zeigt mir nur die Hubs und keine Geräte.
usb-devices zeigt nur die Hubs an. Irgendwie komisch.

Kabel gewechselt. Keinen Erfolg. Morgen gehe ich mal mit einem anderen Rechner dran. Hoffen wir das es dann läuft. Sonst würde es auf einen Defekt der Steuerplatine deuten.

Hat jemand noch ne Idee?

LG
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 24 Februar 2016, 20:08:08
Koennte durchaus ein Problem mit dem USB Hub sein.
Ich hab meine THZ mittlerweile direkt am PI angeschlossen. Seitdem keine Probleme mehr :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 24 Februar 2016, 20:08:52
gehst Du direkt per USB auf die THZ, oder ist da noch ein Serial-USB-Umsetzer dazwischen? Wenn direkt, dann bleibt Die der andere Weg ja noch als Notlösung, falls da tatsächlich was die Grätsche gemacht hat.
Nimm die THZ ggf. mal für ne Minute ganz vom Stromnetz.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 24 Februar 2016, 20:25:44
Hab mir so ein 5 M USB Kabel gekauft und bin direkt drauf per USB auf der Raspberry.
Also ich bekomm keine Verbindung über USB mehr hin. Kabel getauscht. Raspberry getauscht. Windows Pc angeschlossen.
Auf den Raspberry gibt es per LSUSB keine wirkliche Ausgabe. Außer den internen USB Hubs.
Irgendwie ziemlich schlecht. Hatte die THZ 10 min ausgeschaltet. Auch keine Änderung.

Das echt nicht schön....


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 24 Februar 2016, 20:47:12
5m ist schon ziemlich an der USB Laengengrenze.
Ich hab auch lange mit Hub und Kabel herumgetan bis ich eine funktionierende Konstellation hatte.
Versuch mal irgendwie ein kurzes USB Kabel ohne HUB auf den RPi. Wenn das nicht hilft bin ich ratlos. Dann kannst Du es nur noch mit der seriellen Schnittstelle der THZ versuchen :-(
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 24 Februar 2016, 20:51:02
Habe schon 1,5 m Kabel dran gemacht mit Raspberry und einem Windows Laptop. Keine Reaktion.
Das echt kein gutes Zeichen.
Morgen messe ich die Platine mal durch. Ob da irgendwas komisch ist.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 24 Februar 2016, 20:58:55
soweit ich das beurteilen kann ist auf der THZ auch nur ein serial2usb converter embedded.
wenn der den geist aufgegeben hat (beispielsweise wegen einer schlechten rueckspeisung durch einen USB-hub oder so...) dann siehts wirklich dunkel aus. dann hilft nur noch serial attachment.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 25 Februar 2016, 15:27:58
Well Belu
\off-topic\
I would wait for warmer days, then you can consider to exchange the embedded serial2usb chip with a ESP8266 (2€ to 6€)
You can flash the ESP8266 to be a simple wifi ser2net.
This would be a real killer app.
I am in love with ESP8266; I  have 2 ESP8266 at home to play with. So many ideas, so less free time :(
\off-topic\

Pay attention; if really the issue is the embedded serial2usb chip, you should consider ordering a new pcb.
Try to feel with your hands how hot are the different regions of the PCB, for debugging.
An optical inspection could also reveal burned metal lines....
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 25 Februar 2016, 20:14:58
Hi Immi,

also optisch sieht alles gut aus. Spannungen liegen auch an. Bekomme von der Raspberry auf 4,86 V statt 5 V. Denke das ist ok vom Spannungsfall auf 5 m.
Auf dem X9 komme ich an.  Da ist der Embedded Chip den Micomat meinte Sila CP 102, finde leider nix im Netz dazu.

Sieht nix kaputt aus.

LG
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 25 Februar 2016, 21:05:37
das ist ein SILABS CP210X (2102) Chip.
siehe
https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 25 Februar 2016, 21:40:47
Hi,

Danke Micomat, hab mir direkt das Datenblatt mal gezogen und konnte einiges auf der Platine identifizieren. Werde morgen mal die Versorgungsspannugen überprüfen.
Angenommen nur der UArt ist defekt. Meint ihr ich bekomm den gewechselt?
Kleinere Bauform hab ich bei OneWire Modulen schon auf Platinen verlötet.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 26 Februar 2016, 06:12:46
wenn Du Dir das zutraust... Wieso nicht? Ich koennte es nicht ;)
Wobei es vielleicht besser waer das an einem waermeren Tag zu machen. Nur fuer den Fall der Faelle...

Parallel wuerde ich aber versuchen von der RS232 die Daten zu bekommen. Das waere ein Anhaltspunkt mehr ob der UART kaputt ist.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 26 Februar 2016, 10:59:05
Belu
I looked at the pictures; nothing strange.

Marcus is right, you should really understand which component is defect before starting to solder/desolder.

For this kind of debugging, I bought for 6€ a USB-LogicAnalysier-24MHz-8CH @aliexpress.
It is not so nice as 20T€ professional tools... but for 6€ including delivery it is great;
maybe you find also something in ebay; for sure, you do not want to wait 6 weeks delivery from china.

ciao
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 26 Februar 2016, 11:42:17
Guten morgen,

also ich habe nun mal den Silabs CP2102 genau uner die Lupe genommen.

@micomat, ist alles schon ziemlich klein, aber wenn man alles ausbaut mit Lötpaste und einem Heißluftfön müsste man den doch wieder sauber eingelötet bekommen.

Belegt am Chip sind:

GND:
Gemeinsamer Ground USB / Ground Platine

VDD:
Gemessen gegen Ground 3,438 V DC so wie ich es sehe werden die über den internen Spannungs Regulator erzeugt und wird durch Regin erzeug. Unbahängig ob USB angeschlossen wird oder nicht. Laut Anleitung 3 - 3,6 V typisch 3,3 V

Regin:
Gemessen gegen Ground 4,967 V DC, also die ankommende Spannung von der Hauptplatine, sollen 5 V sein, laut Anleitung 4.0 - 5.25 V


USB D+ nicht messbar
USB D- nicht messbar

VBus:

Hier wird gemessen ob ein USB Kabel Angeschlossen ist um ein Netzwerk auf zu bauen.
Es ist ein Digigtaler Eingang, Es liegt vBus Paralell zu einem Widerstand an, der Widerstand Hat 166 kOhm und liegt gegen Ground, ich messe da 4,720 V DC, laut Anleitung sollte die input detection threshold 2,5 V DC also sind wir höher und schalten Sicher. Min Max sind -0.3 - 5,8 V DC also auch hier innerhalb der Parameter.

Not RST

Hier wird gemessen ob ein interner Reset von externer Quelle auszuführen ist. Es liegen an 4,948 V DC gegen GND
Es ist ein Digigtaler Eingang, wenn der 15 microSekunden auf 0 ist wird ein Reset ausgeführt. Schaltschelle High 0,7*VDD = 2,55 V DC, Low*0,25 VDD = 0,85 V DC. Sollte passen.

RS232
TXD nicht messbar
RXD nicht messbar


Es ist für mich also alles Normal, das einzige was wirklich komisch ist. Wenn ich RST gegen Ground messe, also die 4,948 V führt die Anlage einen reset aus, mein Multimeter ist eigentlich sehr hochomhig und hochwertig.

Hat jemand ne Idee wie ich USB und RS232 überprüfen kann?

LG

Hier mal zwei bessere Bilder

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 26 Februar 2016, 13:09:56
Hi,

@Immi,  USB-LogicAnalysier-24MHz-8CH gibt es nicht lieferbar in DE und geht irgendwie zu tief...

Ich habe mir jetzt überlegt das es das irgendwo alles nicht wert ist. Wenn RS232 geht sollte das reichen. Die Idee über ein ESP8266 zu gehen gefällt mir sehr gut, denke da gibt es einige die sich darüber freuen würden.

Aktuell, wollte die Stecker und Pins da holen.

Wegen dem RS232 Converter für das Raspberry, hab da einen alten Prolific adapter aber es damit noch nie ans laufen gebrachte, habe mal geschaut Willy hat was von einem FT232R Chipsatz erwähnt das dieser gut mit der Raspberry läuft.
Habe da direkt so ein Kabel gefunden.

https://www.reichelt.de/Programmer-Entwicklungstools/TTL-232R-RPI/3/index.html?&ACTION=3&LA=5&ARTICLE=133760&GROUPID=2969&artnr=TTL+232R+RPI

Klappt das? könnte da direkt den Stecker drauf machen und fertig....

LG
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 26 Februar 2016, 15:49:39
Zitat von: belu am 26 Februar 2016, 13:09:56
Wegen dem RS232 Converter für das Raspberry, hab da einen alten Prolific adapter aber es damit noch nie ans laufen gebrachte, habe mal geschaut Willy hat was von einem FT232R Chipsatz erwähnt das dieser gut mit der Raspberry läuft.
Habe da direkt so ein Kabel gefunden.
https://www.reichelt.de/Programmer-Entwicklungstools/TTL-232R-RPI/3/index.html?&ACTION=3&LA=5&ARTICLE=133760&GROUPID=2969&artnr=TTL+232R+RPI

Belu
pay attention TTL logick will explode if you connect it to the 10V  RS232 (the 3 pin in the front )
follow this instructions http://robert.penz.name/heat-pump-lwz/
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 26 Februar 2016, 16:53:16
Danke Immi,

hab schon verstanden, gehe auf den RS232 Adapter:

http://www.reichelt.de/USB-Konverter/DIGITUS-DA-70156/3/index.html?&ACTION=3&LA=5&ARTICLE=99617&GROUPID=6105&artnr=DIGITUS+DA-70156

Werde mir aber noch einen CP2102 Entwickler bestellen

http://www.ebay.de/itm/CP2102-USB-TTL-Platine-fur-Arduino-pro-mini-brenner-Download-kabel-CP12013-/271834747732?hash=item3f4a9d1354:g:7mQAAOSw7aBVJ--t

hab mir das mal angeschaut mit den ESP8266, sieht echt gut aus mit dem NodeMcu Lua. Lese mich da noch was ein und dann bestelle ich mal ein paar.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 26 Februar 2016, 17:56:36
Bin über den Prolific 2303 über rs232 wieder online auf der Kiste.

Bis zum Eintreffen des Der Steckers bleibt es mal so...

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 26 Februar 2016, 19:21:55
top :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 23 März 2016, 10:42:09
Hi, gehoert vielleicht nicht genau hier hin aber ich versuche gerade mir eine Alarm Mail zukommen zu lassen falls sowas bei der THZ auftritt.

Die THZ hat schon das attribut

event-on-update-reading   s.*

Jetzt hab ich den notify unten erstellt, der funktioniert aber leider nicht. Was mach ich falsch?
define Alarm notify Heizung:sLast10errors:* { DebianMail('a.b@c.de', 'Alarm Heizung', 'Achtung Fehlermeldung',) }

die geschweifte Klammer alein funktioniert und erzeugt eine Mail. Aber die notification klappt nicht. Ich habs auch shcon mal mit
Zitat(Heizung.sLast10errors.*)
versucht, geht aber ebensowenig.

Danke fue die Anfaengerhilfe.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 23 März 2016, 18:36:50
Hi Heiner
does it work without event-on-update-reading?
I do not use this attibute
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 24 April 2016, 10:25:55
Hi immi,
looks like there's a bug in the code. Today I got a message

extraVent_ALL: set Mythz p46UnschedVent0 1000: Argument does not match the allowed inerval Min 0 ...... Max 900


But the manual says for the allowed ranges
ZitatLÜFTUNGZEIT AUSS. STUFE 0 P46 0-1000 Minuten
LÜFTUNGZEIT AUSS. STUFE 1 P45 0-1000 Minuten
LÜFTUNGZEIT AUSS. STUFE 2 P44 0-1000 Minuten
LÜFTUNGZEIT AUSS. STUFE 3 P43 0-1000 Minuten
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 24 April 2016, 17:54:03
Hi Willy
please change lines 335 to 338 (red marked value):
"p46UnschedVent0"   => {cmd2=>"0A0571", argMin =>   "0", argMax =>  "900",   type =>"1clean",  unit =>" min"},
"p45UnschedVent1"   => {cmd2=>"0A0572", argMin =>   "0", argMax =>  "900",   type =>"1clean",  unit =>" min"},   
"p44UnschedVent2"   => {cmd2=>"0A0573", argMin =>   "0", argMax =>  "900",   type =>"1clean",  unit =>" min"},   
"p43UnschedVent3"   => {cmd2=>"0A0574", argMin =>   "0", argMax =>  "900",   type =>"1clean",  unit =>" min"},   

Test which is the maximum value, that the tecalor accepts; Could be 999 or 1000 or 1100
I do not trust the datasheet of the tecalor anymore.
I cannot test now.
I will deploy the patch after your feedback.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 24 April 2016, 22:13:45
tested with p46 ==> 1000, works.

I don't want to test/use bigger values, since they would be out of manufacturer's spec.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 25 April 2016, 20:03:40
v 0.151 uploaded
-UnschedVent range extended to 1000
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: belu am 29 Mai 2016, 16:36:51
Hallo,

Immi, was wolltest du genau wissen, habe die aktuellste Platine und Software drauf.

sFirmware version: 05.19
   
sFirmware-Id HW: 113 SW: 3.16 Date: DEC 10 2014

Ich habe mir jetzt noch 4 von diesen Rehau CO20 Luftqualitätssensoren bestellt. Mal schauen was die taugen.

LG

Belu
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 30 Mai 2016, 20:06:52
Danke Belu
do you see any difference or improvement?

offtopic.
4 co20; pay attention how you want to connect them.
The best way would be a cable.
If you, instead, go over IP, please consider, that the module co20 is written very low level.
I do not think that you can use ser2net, without some code modification (no rocket science, but a patch has to be dome).
I am disappointment to tell you because, I love ser2net.
I remmember that someone (I think willy) instead of ser2net used fhem2fhem for co20.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 31 Mai 2016, 20:25:59
Yes, I tried fhem2fhem for a while. But effort and power consumption for additional Raspis was too much. So I replaced the solution by a USB-to-RJ45 adapter (https://www.amazon.de/dp/B001TOG6MM/ref=pe_386171_37038021_TE_3p_dp_1). Using cat5 network cables for USB extension allows easy setup (same as pure USB) as well as long distances.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: The Spirit am 23 Juni 2016, 15:27:57
HI.
Gibt es eigentlich Unterschiede, ob ich per USB oder RS232 drauf gehe?
Ich hätte die USB Variante bevorzugt, da ich FHEM auf einem RasPi betreibe und dort USB direkt vorhanden ist.
Wo finde ich die USB-Buchse an der Tecalor?
Hat da jemand ein Foto für mich?
Danke
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 23 Juni 2016, 16:33:10
so gesehen macht es keinen Unterschied da die usb über einen internen serial2usb Converter angebunden ist. sie ist nicht so einfach zu erreichen da die Steuerung freigelegt werden muss.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 23 Juni 2016, 18:05:36
Zitat von: The Spirit am 23 Juni 2016, 15:27:57
HI.
Gibt es eigentlich Unterschiede, ob ich per USB oder RS232 drauf gehe?
Ich hätte die USB Variante bevorzugt, da ich FHEM auf einem RasPi betreibe und dort USB direkt vorhanden ist.
Wo finde ich die USB-Buchse an der Tecalor?
Hat da jemand ein Foto für mich?
Danke
es kommt darauf an wie lange ist die kabel.
kurze kabel --> USB direktt könnte einfacher sein
sehr lange kabel --> RS232 ist besser un  billiger
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: The Spirit am 24 Juni 2016, 08:53:20
Zitat von: immi am 23 Juni 2016, 18:05:36
es kommt darauf an wie lange ist die kabel.
kurze kabel --> USB direktt könnte einfacher sein
sehr lange kabel --> RS232 ist besser un  billiger
immi
danke.
Kabel bis zum Pi wird um die 6-7m sein.
Dann also RS232.
Wo genau ist der Stecker eigentlich?
Sehe leider immer nur kleine Ausschnitte. Gibt es wo ein Bild wo man mal die ganze Anlage sieht mit dem Stecker drauf?
Danke
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 24 Juni 2016, 09:54:30
wenn du die tuer auf der rechten seite aufmachst, ist oben der 3-polige diagnosestecker.
eine Anleitung wie Du den auf eine "normale" RS232 umbaust findest du hier: http://robert.penz.name/heat-pump-lwz/
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 24 Juni 2016, 14:53:22
Die Teile zum Bau des Steckers bekommst Du alle bei Reichelt. USB-Seriell-Umsetzer ebenfalls.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 25 Juni 2016, 09:59:49
Further 2 ideas, which I have not tried
1) you can think to "RS232/TTL Wandler mit MAX3232"
http://www.pollin.de/shop/dt/MTQ2OTgxOTk-/Bauelemente_Bauteile/Entwicklerboards/Sonstige_Boards/RS232_TTL_Wandler_mit_MAX3232.html
You connect the ttl directly to the raspi internal serial (MAX3232 should be 3.3v compliant)
On the rs232 side, you desolder the rs232-plug and solder a cheap shielded isdn cable.

2) you save all the long cables and go wireless with a esp8266 as ser2net repeater
here you have to look if you find ttl logic directly in your tecalor board; otherwise a max3232 is also needed.

If you have never used a soldering iron, forget it and follow Willy and Marcus advise.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Karle am 02 Juli 2016, 12:22:25
Hi !

I often can find in the log file the following line:

2016.07.02 09:28:49 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2016.07.02 09:28:49 2: Mythz/RAW: 10
2016.07.02 09:48:49 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2016.07.02 09:48:49 2: Mythz/RAW: 10
2016.07.02 10:08:04 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2016.07.02 10:08:04 2: Mythz/RAW: 10
2016.07.02 10:08:29 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2016.07.02 10:08:29 2: Mythz/RAW: 10
2016.07.02 10:08:39 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2016.07.02 10:08:39 2: Mythz/RAW: 10
2016.07.02 10:08:49 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2016.07.02 10:08:49 2: Mythz/RAW: 10
2016.07.02 10:28:49 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2016.07.02 10:28:49 2: Mythz/RAW: 10
2016.07.02 10:48:49 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2016.07.02 10:48:49 2: Mythz/RAW: 10
2016.07.02 11:08:04 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2016.07.02 11:08:04 2: Mythz/RAW: 10
2016.07.02 11:08:29 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2016.07.02 11:08:29 2: Mythz/RAW: 10
2016.07.02 11:08:39 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2016.07.02 11:08:39 2: Mythz/RAW: 10
2016.07.02 11:08:49 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2016.07.02 11:08:49 2: Mythz/RAW: 10
2016.07.02 11:09:31 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2016.07.02 11:09:31 2: Mythz/RAW: 10
2016.07.02 11:28:49 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2016.07.02 11:28:49 2: Mythz/RAW: 10
2016.07.02 11:48:49 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?

Can someone tell me what is the reason for that respectively what can I do against it ? The functionality (logging) is working.

I updated my system some days ago from a RPI 1 to the odroid C2, i had this issue with both machines (I think with the Odroid i have more of this lines in the logfile).

Greets Karl
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 02 Juli 2016, 14:08:01
Hi Karl
It looks like you tecalor is busy and ansers very late.
I jut uploaded version 0.152 introducing a delay for you.

update fhem tomorrow; restart and tell me if you seen an improvement.

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Karle am 02 Juli 2016, 15:11:50
Hi Immi,

thank you, I will update the next days and check if it is gone.

It is an LWZ 303 i (Stiebel), but with no special things. It also was restartet 3-4 days ago.

Greets Karl
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 03 Juli 2016, 11:32:24
Actually I have the problem, that my THZ does not switch off ventilation if I set p7 or p8 to 0. The code part of my DOIF looks like

DOELSEIF
    ( ([extraVent_Wohnzimmer_value] == 0)
  and ([extraVent_Schlafzimmer_value] == 0)
  and ([Mythz:sGlobal:[inputVentilatorPower. (\d+)]] > 10)
  and ([Mythz:sGlobal:[dhwPump. (\d+)]] == 0)
  and ([Mythz:Rel_humidity] < 60)
  and ([RandomTimer_BinAbwesend] eq "ja") )
        ((set Mythz p07FanStageDay 0),
(set Mythz p08FanStageNight 0),
(attr extraVent_ALL cmdpause 1:1:1:7200),
{Log 1,"Ventilation set to level 0"})


In the log I see every two hours (=> cmdpause 7200) an entry "Ventilation set to level 0", but the inputVentilatorPower value stays on 17 all the time.

Unfortunately I cannot reboot the THZ currently, since I'm on vacation in Italy; so I just have remote access.

Any idea?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 03 Juli 2016, 12:12:44
HI willy
the problem is not related to THZ module nor to your tecalor:
from command ref

DOIF (Bedingung1)
(set ...) ## erster Befehl der ersten Sequenz soll um eine Sekunde verzögert werden
(set ...) ## zweiter Befehl der ersten Sequenz soll um 2 Sekunden nach dem ersten Befehl verzögert werden
DOELSEIF (Bedingung2)
(set ...) ## erster Befehl der zweiten Sequenz soll um 3 Sekunden verzögert werden
(set ...) ## zweiter Befehl der zweiten Sequenz soll um 0,5 Sekunden nach dem ersten Befehl verzögert werden

attr <DOIF-module> wait 1,2:3,0.5


I see 3 potential failures in your definition
1) the additinal comas between the commands
2) the redundant brackets
3) "attr extraVent_ALL cmdpause" which should be outside of the DOIF-definition, if addresing the same istance.

not sure of any: test it, otherwise post in the DOIF part of the forum, where the manteiner of DOIF can support you

enjoy your holyday, and avoid the football topic
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 03 Juli 2016, 12:45:23
Hi immi,

even if I try to set the level on the command line it doesn't work:

set Mythz p07FanStageDay 0
or
set Mythz p07FanStageDay 2

does not take any effect. I assume the DOIF's cmdpause to be inactive in this case, right?

The whole DOIF code looks like


DOIF
   (( ([extraVent_Wohnzimmer_value] == 3)
   or ([extraVent_Schlafzimmer_value] == 3) )
  and ([Mythz:sGlobal:[inputVentilatorPower. (\d+)]] < 55) )
        ((set Mythz p07FanStageDay 3),
(set Mythz p08FanStageNight 3),
(attr extraVent_ALL cmdpause 7200:7200:7200:7200),
{Log 1,"Ventilation set to level 3"})
DOELSEIF
   (( ([extraVent_Wohnzimmer_value] == 2)
   or ([extraVent_Schlafzimmer_value] == 2)
   or ([Mythz:Rel_humidity] > 70) )
and ( ([Mythz:sGlobal:[inputVentilatorPower. (\d+)]] > 55)
   or  ([Mythz:sGlobal:[inputVentilatorPower. (\d+)]] < 30) ))
        ((set Mythz p07FanStageDay 2),
(set Mythz p08FanStageNight 2),
(attr extraVent_ALL cmdpause 1:7200:7200:7200),
{Log 1,"Ventilation set to level 2"})
DOELSEIF
   (( ([extraVent_Wohnzimmer_value] == 1)
   or ([extraVent_Schlafzimmer_value] == 1)
   or ([Mythz:sGlobal:[dhwPump. (\d+)]] > 0) )
and ( ([Mythz:sGlobal:[inputVentilatorPower. (\d+)]] > 30)
   or  ([Mythz:sGlobal:[inputVentilatorPower. (\d+)]] < 10) ))
        ((set Mythz p07FanStageDay 1),
(set Mythz p08FanStageNight 1),
(attr extraVent_ALL cmdpause 1:1:7200:7200),
{Log 1,"Ventilation set to level 1"})
DOELSEIF
    ( ([extraVent_Wohnzimmer_value] == 0)
  and ([extraVent_Schlafzimmer_value] == 0)
  and ([Mythz:sGlobal:[inputVentilatorPower. (\d+)]] > 10)
  and ([Mythz:sGlobal:[dhwPump. (\d+)]] == 0)
  and ([Mythz:Rel_humidity] < 60)
  and ([RandomTimer_BinAbwesend] eq "ja") )
        ((set Mythz p07FanStageDay 2),
(set Mythz p08FanStageNight 0),
(attr extraVent_ALL cmdpause 1:1:1:7200),
{Log 1,"Ventilation set to level 0"})


As you see the cmdpause's are set intentionally, to allow switching to higher levels immediately, but reject switching to lower levels for 2 hours. This is the most important part of the code to avoid switching up and down too often.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 03 Juli 2016, 12:47:33
Another idea: may p09FanStageStandby be active as long as vacation time is set via the pHoliday* settings? I have to check the THZ manual.

btw:
Yesterday we had a nice evening in Pisa downtown, open air public viewing incl. fish and Chianti. But most of the visitors clapped their hands in wrong situations  ::) ... Both teams had been equal, just good luck on our side. Don't worry.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 03 Juli 2016, 13:10:22
Zitat von: willybauss am 03 Juli 2016, 12:47:33
Another idea: may p09FanStageStandby be active as long as vacation time is set via the pHoliday* settings? I have to check the THZ manual.

Manual is not really clear on these details, but

set Mythz p09FanStageStandby 0

sets the level to 0. So I have to enhance my DOIF for vacation times. As an immediate solution I'll switch off vacation mode and accept heating up DHW once per day.

immi:
Is there a flag indicating current state of vacation mode, or do I need to calculate it dealing with all these pHoliday* variables? A flag would be a nice feature  ;)

edit:
pOpmode might be the right one, but missing in commandref. I try to find in source code of module.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 03 Juli 2016, 14:36:03
I'm a bit confused:

get pOpMode

reports "DHWmode", no matter if vacation mode is set or unset. But as I mentioned above: ventilation in vacation mode behaves as it was in standby mode. So pOpMode doesn't seem to report the right value in case of vacation, at least for ventilation.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 03 Juli 2016, 14:45:13
Sometimes I complain on the missing documentation of the tecalor.
But I assume that the main issue is the missing logic in the registers of the firmware.
The more we reverse eng. the more we see very strange things.

pOpMode should be the one to look at... but :(

try to look in sHC1, there is another opMode

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 03 Juli 2016, 18:00:34
Zitat von: immi am 03 Juli 2016, 14:45:13
try to look in sHC1, there is another opMode

Thanks for the hint. sHC1.opMode is the right one:
==> standby in case of vacation
==> setback in normal case

So I need to enhance the DOIF by this value.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 03 Juli 2016, 18:56:00
Zitat von: willybauss am 03 Juli 2016, 18:00:34
Thanks for the hint. sHC1.opMode is the right one:
==> standby in case of vacation
==> setback in normal case

==> standby in case of vacation
==> setback in night case (nightabsenkung)
==> normal in normal case (day-normal)

setback and normal of sHC1.opMode are determined by programHC1_xxx, probably.
I do not know what happens, if you have different  times for programHC1_xxx and programFan_xxx
immi



Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Karle am 04 Juli 2016, 14:27:35
Zitat von: immi am 02 Juli 2016, 14:08:01
Hi Karl
It looks like you tecalor is busy and ansers very late.
I jut uploaded version 0.152 introducing a delay for you.

update fhem tomorrow; restart and tell me if you seen an improvement.

immi

Hi Immi,

I updated the module and restartet FHEM, now it looks, that i have even more of this errors (nearly every minute, in the past it was ~20 minutes).

So this did not solve the issue.

Greets Karl
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 04 Juli 2016, 19:15:09
Zitat von: Karle am 04 Juli 2016, 14:27:35
Hi Immi,
I updated the module and restartet FHEM, now it looks, that i have even more of this errors (nearly every minute, in the past it was ~20 minutes).
So this did not solve the issue.
Greets Karl
Hi Karl
this makes no sense: are you using windows?
if your fhem is running on unix, change  line 1142c0f 00_THZ.pm 

$buf = DevIo_SimpleReadWithTimeout($hash, 0.7) if(!defined($buf)) ; #added for Karl Antwort msg468515

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Karle am 04 Juli 2016, 19:24:04
no it is running on linux (debian based on odroid C2).

I will try to change the file.

Karl

Edit: File changed ... restart ... I will check the log later or tomorrow
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Karle am 05 Juli 2016, 16:50:40
I checked the logfile today, the message did not appear.

The only thing I saw two times was the following:

2016.07.05 09:02:13 1: /dev/ttyUSB1 disconnected, waiting to reappear (Mythz)
2016.07.05 09:02:15 3: Setting Mythz serial parameters to 115200,8,N,1
2016.07.05 09:02:15 1: /dev/ttyUSB1 reappeared (Mythz)

greets Karl
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 05 Juli 2016, 23:18:19
Hi Karle
ok please devide the 2 problems
I try to explain you what happens:
by adding line 1142 with 0.7, you just ask fhem to be more patience and wait 0.5+0.7 seconds before complaining of the tecalor and drop the comunication..
the question is why your tecalor needs so much time to react sometimes, and what is the microcontroller of your tecalor doing all the time :)

the reconnect/connect issue can be ignored; I have no solution
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Karle am 06 Juli 2016, 12:14:49
I also think the connect/reconnect is no problem. It appears 1-3 times a day for some seconds.

With the bigger delay the other message disappeares. Why my LWZ has this high delay I don't know. There is everything standard. Maybe I have another firmware than your machine.

In the past with the slow raspberry Pi I did not have this problem so much, maybe the faster odroid is the reason for that.

But it seems all fine now.

Greets Karl
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 06 Juli 2016, 13:02:22
have you tried to reduce the speed to 57600bps? maybe the messages are just too fast?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Karle am 07 Juli 2016, 12:40:29
Zitat von: micomat am 06 Juli 2016, 13:02:22
have you tried to reduce the speed to 57600bps? maybe the messages are just too fast?

no not yet, do you use the 57600 bps ? I don't know why it is set to 115200.

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 07 Juli 2016, 22:04:59
Zitat von: Karle am 07 Juli 2016, 12:40:29
no not yet, do you use the 57600 bps ? I don't know why it is set to 115200.
Also mine is set to 115200; I do not know why and I do not know if it can be changed or it is hardcoded.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 08 Juli 2016, 07:13:07
Just a guess, I've had some modem issues in the early computer years where 115200 which is double 57600 was a problem for some controllers :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 08 Juli 2016, 13:22:05
As far as I remember we had this topic in the past some times, and in none of all cases it was possible to access the THZ with different baud rates. So I still believe it's hard coded.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 14 Juli 2016, 19:31:02
IMHO it depends on cable quality and length - in my case the cable has about 5 meters and with 115200 it had problems, and after reducing the speed it has been working fine and very stable.


Sent from my iPhone using Tapatalk
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: twiederh am 04 August 2016, 18:02:45
Hallo,
mit der neuesten Version 0.152 laufen plötzlich die Messwerte für Aussen-, Vorlauf-, Rücklauf etc. von der FHEM Installationsanleitung für das THZ-Modul nicht mehr. Bei mir war es so, dass die letzten Werte vom 22. Juli waren, vermutlich dem Tag, an dem ich ein Update auf FHEM gestartet habe. Ich habe das Modul noch mal von vorne nach Anleitung konfiguriert, leider erscheinen die Werte in der Tabelle jetzt überhaupt nicht mehr. Leider habe ich keinerlei Informationen gefunden, was sich da geändert hat und wie ich die Werte wieder einlesen kann. Kann mir hier bitte jemand helfen?

Ich beziehe mich auf diese Anleitung: http://www.fhemwiki.de/wiki/Tecalor_THZ_Wärmepumpe (http://www.fhemwiki.de/wiki/Tecalor_THZ_W%C3%A4rmepumpe)

Gruss,
Thomas.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 04 August 2016, 18:41:55
normalerweise postet immi hier immer welche aenderungen in den versionen erfolgt sind.
was sagt denn dein THZ-log in fhem? irgendwelche fehlermeldungen?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 05 August 2016, 08:43:35
Zitat von: twiederh am 04 August 2016, 18:02:45
Hallo,
mit der neuesten Version 0.152 laufen plötzlich die Messwerte für Aussen-, Vorlauf-, Rücklauf etc. von der FHEM Installationsanleitung für das THZ-Modul nicht mehr. Bei mir war es so, dass die letzten Werte vom 22. Juli waren, vermutlich dem Tag, an dem ich ein Update auf FHEM gestartet habe. Ich habe das Modul noch mal von vorne nach Anleitung konfiguriert, leider erscheinen die Werte in der Tabelle jetzt überhaupt nicht mehr. Leider habe ich keinerlei Informationen gefunden, was sich da geändert hat und wie ich die Werte wieder einlesen kann. Kann mir hier bitte jemand helfen?
Hi Thomas
only the userReadings (Aussen-, Vorlauf-, Rücklauf ) or all parameters coming from the tecalor?
please post your settings
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: twiederh am 05 August 2016, 09:48:45
Hi,
all other readings are ok. I do not see anything unusual in the logs:
2016-08-05_09:35:56 Waermepumpe sGlobal: outsideTemp: 20 flowTemp: 31.8 returnTemp: 32.8 hotGasTemp: 29 dhwTemp: 39.5 flowTempHC2: -60 evaporatorTemp: 26.9 condenserTemp: 33.2 mixerOpen: 0 mixerClosed: 0 heatPipeValve: 0 diverterValve: 0 dhwPump: 1 heatingCircuitPump: 0 solarPump: 1 compressor: 0 boosterStage3: 0 boosterStage2: 0 boosterStage1: 0 highPressureSensor: 0 lowPressureSensor: 1 evaporatorIceMonitor: 0 signalAnode: 0 evuRelease: 1 ovenFireplace: 1 STB: 0 outputVentilatorPower: 55 inputVentilatorPower: 0 mainVentilatorPower: 0 outputVentilatorSpeed: 33 inputVentilatorSpeed: 0 mainVentilatorSpeed: 0 outside_tempFiltered: 18.5 relHumidity: 0 dewPoint: 0 P_Nd: 11.92 P_Hd: 12.3 actualPower_Qc: 0.000 actualPower_Pel: 0.000 collectorTemp: 56.6 insideTemp: -60
2016-08-05_09:36:24 Waermepumpe sLast10errors: number_of_faults: 1 fault0CODE: F07_MainOutputFanFault fault0TIME: 17:32 fault0DATE: 28.12 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
2016-08-05_09:38:24 Waermepumpe sLast10errors: number_of_faults: 1 fault0CODE: F07_MainOutputFanFault fault0TIME: 17:32 fault0DATE: 28.12 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

As it looks the heat pump is polled regularly, the values that should be processed in the readings group are being read from the heat pump correctly. As written the initial symptom was that the values did not change anymore, the four variables that I want to display in the dashboard remained the same with a timestamp of July 22. Now that I set the heat pump up again from scratch the values do not appear under the THZ item anymore as opposed to before where they appeared above the p-Values in the readings.

I have three graphs built from the values, all three are continuously written, because of that it took me a while to figure out that the values in the dashboard did not change anymore. Even if I retrieve sGlobal manually, I see the required values, it is the processing that ceased to work.

Best regards,
Thomas.

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 05 August 2016, 11:28:19
Hi Thomas
thanks for the logs
But, I asked for your settings: your config files
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: twiederh am 05 August 2016, 11:44:42
Hi Immy, sorry, I missed that:
define MyDashboard Dashboard
attr MyDashboard userattr dashboard_tab2backgroundimage dashboard_tab2colcount dashboard_tab2devices dashboard_tab2groups dashboard_tab2icon dashboard_tab2name dashboard_tab2rowcentercolwidth dashboard_tab2sorting
attr MyDashboard dashboard_activetab 1
attr MyDashboard dashboard_row top-center
attr MyDashboard dashboard_showtogglebuttons 0
attr MyDashboard dashboard_tab1colcount 1
attr MyDashboard dashboard_tab1groups THZ
attr MyDashboard dashboard_tab1name micofhem
attr MyDashboard dashboard_tab1sorting t0c100,THZ,true,170,253
define MyDashboard_weblink weblink htmlCode {DashboardAsHtml("MyDashboard")}
attr MyDashboard_weblink room DashboardRoom
define FileLog_Waermepumpe FileLog ./log/Waermepumpe-%Y.log Waermepumpe
define Waermepumpe THZ 192.168.1.167:2003
attr Waermepumpe interval_sGlobal 300
attr Waermepumpe interval_sHistory 28800
attr Waermepumpe interval_sLast10errors 120
attr Waermepumpe room Heizung
attr Waermepumpe userReadings AussenTemp:sGlobal {(split ' ',ReadingsVal("Waermepumpe","sGlobal",0))[1]}, VorlaufTemp:sGlobal {(split ' ',ReadingsVal("Waermepumpe","sGlobal",0))[3]}, RuecklaufTemp:sGlobal {(split ' ',ReadingsVal("Waermepumpe","sGlobal",0))[5]}, WWTemp:sGlobal {(split ' ',ReadingsVal("Waermepumpe","sGlobal",0))[9]}, KollektorTemp:sGlobal {(split ' ',ReadingsVal("Waermepumpe","sGlobal",0))[79]}
define rg_thz readingsGroup Waermepumpe:<%temp_outside>,<Aussen>,AussenTemp Waermepumpe:<%sani_supply_temp@red>,<Vorlauf>,VorlaufTemp Waermepumpe:<%sani_return_temp@blue>,<Rücklauf>,RuecklaufTemp Waermepumpe:<%sani_boiler_temp@BD7800>,<Wasser>,WWTemp Waermepumpe:<%sani_solar_temp>,<Kollektor>,KollektorTemp
attr rg_thz alias Heizung Temperaturen
attr rg_thz group THZ
attr rg_thz room Heizung
attr rg_thz valueFormat { AussenTemp => '%1.f °C', VorlaufTemp => '%1.f °C', AussenTemp=> '%1.f °C', RuecklaufTemp=> '%1.f °C', WWTemp=> '%1.f °C', KollektorTemp=> '%1.f °C' }



I basically took the example over with only changing MyTHZ to Waermepumpe.
Best regards,
Thomas.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 05 August 2016, 12:41:05
have a try adding ".*"
attr Waermepumpe userReadings AussenTemp:sGlobal.* {(split ' ',ReadingsVal("Waerm
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: twiederh am 05 August 2016, 13:29:24
Hi Immy,
better now, after adding the .* to all reading values I at least get decimal values now but only rounded to the next full decimal (so 54 degrees when the real value is 53.6). I thought from the configuration that the display should be using floating point values.

Best regards,
Thomas.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 05 August 2016, 16:26:35
Hi Thomas
So, your problem with ".*" had nothing to do with 00_THZ.pm Version 0.152.
The syntax of userReading changed with the notify module 4 or 6 weeks ago (it wasn't me  :) )

Now you have a second problem: wrong/unexpected rounding.
please update, reboot, and post your setting and relevant logs

Hi Markus
would you be so nice to update the fhem wiki; the example with userreadings is outdated and needs ".*"
I think Willy has already updated his confifile example.

immi

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: twiederh am 06 August 2016, 07:27:37
Hi Immy,
here is the current configuration:

define MyDashboard Dashboard
attr MyDashboard userattr dashboard_tab2backgroundimage dashboard_tab2colcount dashboard_tab2devices dashboard_tab2groups dashboard_tab2icon dashboard_tab2name dashboard_tab2rowcentercolwidth dashboard_tab2sorting
attr MyDashboard dashboard_activetab 1
attr MyDashboard dashboard_row top-center
attr MyDashboard dashboard_showtogglebuttons 0
attr MyDashboard dashboard_tab1colcount 1
attr MyDashboard dashboard_tab1groups THZ
attr MyDashboard dashboard_tab1name micofhem
attr MyDashboard dashboard_tab1sorting t0c100,THZ,true,170,253
define MyDashboard_weblink weblink htmlCode {DashboardAsHtml("MyDashboard")}
attr MyDashboard_weblink room DashboardRoom
define FileLog_Waermepumpe FileLog ./log/Waermepumpe-%Y.log Waermepumpe
define Waermepumpe THZ 192.168.1.167:2003
attr Waermepumpe interval_sGlobal 300
attr Waermepumpe interval_sHistory 28800
attr Waermepumpe interval_sLast10errors 120
attr Waermepumpe room Heizung
attr Waermepumpe userReadings AussenTemp:sGlobal.* {(split ' ',ReadingsVal("Waermepumpe","sGlobal",0))[1]}, VorlaufTemp:sGlobal.* {(split ' ',ReadingsVal("Waermepumpe","sGlobal",0))[3]}, RuecklaufTemp:sGlobal.* {(split ' ',ReadingsVal("Waermepumpe","sGlobal",0))[5]}, WWTemp:sGlobal.* {(split ' ',ReadingsVal("Waermepumpe","sGlobal",0))[9]}, KollektorTemp:sGlobal.* {(split ' ',ReadingsVal("Waermepumpe","sGlobal",0))[79]}
define rg_thz readingsGroup Waermepumpe:<%temp_outside>,<Aussen>,AussenTemp Waermepumpe:<%sani_supply_temp@red>,<Vorlauf>,VorlaufTemp Waermepumpe:<%sani_return_temp@blue>,<Rücklauf>,RuecklaufTemp Waermepumpe:<%sani_boiler_temp@BD7800>,<Wasser>,WWTemp Waermepumpe:<%sani_solar_temp>,<Kollektor>,KollektorTemp
attr rg_thz alias Heizung Temperaturen
attr rg_thz group THZ
attr rg_thz room Heizung
attr rg_thz valueFormat { AussenTemp => '%1.f °C', VorlaufTemp => '%1.f °C', AussenTemp=> '%1.f °C', RuecklaufTemp=> '%1.f °C', WWTemp=> '%1.f °C', KollektorTemp=> '%1.f °C' }


And here is the current log:

2016-08-06_07:21:37 Waermepumpe sLast10errors: number_of_faults: 1 fault0CODE: F07_MainOutputFanFault fault0TIME: 17:32 fault0DATE: 28.12 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
2016-08-06_07:23:37 Waermepumpe sLast10errors: number_of_faults: 1 fault0CODE: F07_MainOutputFanFault fault0TIME: 17:32 fault0DATE: 28.12 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
2016-08-06_07:25:37 Waermepumpe sLast10errors: number_of_faults: 1 fault0CODE: F07_MainOutputFanFault fault0TIME: 17:32 fault0DATE: 28.12 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
2016-08-06_07:26:08 Waermepumpe sGlobal: outsideTemp: 16.3 flowTemp: 28.9 returnTemp: 24.4 hotGasTemp: 25 dhwTemp: 49.6 flowTempHC2: -60 evaporatorTemp: 24.8 condenserTemp: 25.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: 1 STB: 0 outputVentilatorPower: 55 inputVentilatorPower: 0 mainVentilatorPower: 0 outputVentilatorSpeed: 33 inputVentilatorSpeed: 0 mainVentilatorSpeed: 0 outside_tempFiltered: 18.8 relHumidity: 0 dewPoint: 0 P_Nd: 11.32 P_Hd: 11.05 actualPower_Qc: 0.000 actualPower_Pel: 0.000 collectorTemp: 17.2 insideTemp: -60
2016-08-06_07:26:08 Waermepumpe AussenTemp: 16.3
2016-08-06_07:26:08 Waermepumpe VorlaufTemp: 28.9
2016-08-06_07:26:08 Waermepumpe RuecklaufTemp: 24.4
2016-08-06_07:26:08 Waermepumpe WWTemp: 49.6
2016-08-06_07:26:08 Waermepumpe KollektorTemp: 17.2


Thanks for the help so far :-)

Best regards,
Thomas.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: twiederh am 06 August 2016, 07:32:19
Hi,
actually I found the solution: instead of %1.f the format needs to be %.1f now.

Thanks again for your help!

Best regards,
Thomas.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: micomat am 08 August 2016, 07:35:56
Zitat von: immi am 05 August 2016, 16:26:35

Hi Markus
would you be so nice to update the fhem wiki; the example with userreadings is outdated and needs ".*"
I think Willy has already updated his confifile example.

immi

sure, just give me some more time :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: ToniASA am 22 August 2016, 22:30:43
Hallo liebe Gemeinde,

ich bin neu in diesem Bereich und habe mich nächte lang durch diese Beiträge durchgelesen und getestet, jedoch bekomme ich das hier nicht zum laufen.

habe grundsätzlich mal das Problem zu verstehen, wie ich das alles aufbauen soll, da ich eine Schritt für Schritt Anleitung für Anfänger finde, was diese Anbindung angeht.
kann mir da jemand weiterhelfen?

wünshe allen einen tollen Abend und wäre super Klasse, wenn mir jemand helfen kann.

Besten Dank im Voraus und hoffe bis bald.

Toni
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 22 August 2016, 22:52:33
Dann hast Du offenbar auf der ersten Seite den Link zum Hilfethread übersehen:
https://forum.fhem.de/index.php/topic,33452.0.html.html (https://forum.fhem.de/index.php/topic,33452.0.html.html)

Damit solltest Du erst mal klar kommen. Detailfragen bitte dort klären; hier gehts eher um die Modul-(Software)Entwicklung.
Titel: THZ 504 data.txt
Beitrag von: danillo am 24 November 2016, 20:16:46
Zitat01-BF011DA0808000
02-010003021003-010306021003-command not known
03-010004031003-010307031003-command not known
04-010005041003-010308041003-command not known
05-010006051003-010309051003-command not known
06-010007061003-01030A061003-command not known
07-010008071003-01030B071003-command not known
08-010009081003-01030C081003-command not known
09-340901B4000000510000000000000222
0A-01000B0A1003-0104C40A01B41003-UNKNOWN REQUEST
0B-01000C0B1003-0104C50B01B41003-UNKNOWN REQUEST
0C-01000D0C1003-0104C60C01B41003-UNKNOWN REQUEST
0D-01000E0D1003-0103110D1003-command not known
0E-01000F0E1003-0103120E1003-command not known
0F-010010100F1003-0103130F1003-command not known
10-01001110101003-010314101003-command not known
11-010012111003-010315111003-command not known
12-010013121003-010316121003-command not known
13-010014131003-010317131003-command not known
14-010015141003-010318141003-command not known
15-010016151003-010319151003-command not known
16-8D16FDA801E1011100000A003C61081717
17-010018171003-01031B171003-command not known
18-010019181003-01031C181003-command not known
19-01001A191003-01031D191003-command not known
1A-01001B1A1003-01031E1A1003-command not known
1B-01001C1B1003-01031F1B1003-command not known
1C-01001D1C1003-0103201C1003-command not known
1D-01001E1D1003-0103211D1003-command not known
1E-01001F1E1003-0103221E1003-command not known
1F-0100201F1003-0103231F1003-command not known
20-010021201003-010324201003-command not known
21-010022211003-010325211003-command not known
22-010023221003-010326221003-command not known
23-010024231003-010327231003-command not known
24-010025241003-010328241003-command not known
25-010026251003-010329251003-command not known
26-010027261003-01032A261003-command not known
27-010028271003-01032B271003-command not known
28-010029281003-01032C281003-command not known
29-01002A291003-01032D291003-command not known
2A-01002B182A1003-01032E2A1003-command not known
2B-01002C2B181003-01032F2B1003-command not known
2C-01002D2C1003-0103302C1003-command not known
2D-01002E2D1003-0103312D1003-command not known
2E-01002F2E1003-0103322E1003-command not known
2F-0100302F1003-0103332F1003-command not known
30-010031301003-010334301003-command not known
31-010032311003-010335311003-command not known
32-010033321003-010336321003-command not known
33-010034331003-010337331003-command not known
34-010035341003-010338341003-command not known
35-010036351003-010339351003-command not known
36-010037361003-01033A361003-command not known
37-010038371003-01033B371003-command not known
38-010039381003-01033C381003-command not known
39-01003A391003-01033D391003-command not known
3A-01003B3A1003-01033E3A1003-command not known
3B-01003C3B1003-01033F3B1003-command not known
3C-01003D3C1003-0103403C1003-command not known
3D-01003E3D1003-0103413D1003-command not known
3E-01003F3E1003-0103423E1003-command not known
3F-0100403F1003-0103433F1003-command not known
40-010041401003-010344401003-command not known
41-010042411003-010345411003-command not known
42-010043421003-010346421003-command not known
43-010044431003-010347431003-command not known
44-010045441003-010348441003-command not known
45-010046451003-010349451003-command not known
46-010047461003-01034A461003-command not known
47-010048471003-01034B471003-command not known
48-010049481003-01034C481003-command not known
49-01004A491003-01034D491003-command not known
4A-01004B4A1003-01034E4A1003-command not known
4B-01004C4B1003-01034F4B1003-command not known
4C-01004D4C1003-0103504C1003-command not known
4D-01004E4D1003-0103514D1003-command not known
4E-01004F4E1003-0103524E1003-command not known
4F-0100504F1003-0103534F1003-command not known
50-010051501003-010354501003-command not known
51-010052511003-010355511003-command not known
52-010053521003-010356521003-command not known
53-010054531003-010357531003-command not known
54-010055541003-010358541003-command not known
55-010056551003-010359551003-command not known
56-010057561003-01035A561003-command not known
57-010058571003-01035B571003-command not known
58-010059581003-01035C581003-command not known
59-01005A591003-01035D591003-command not known
5A-01005B5A1003-01035E5A1003-command not known
5B-01005C5B1003-01035F5B1003-command not known
5C-01005D5C1003-0103605C1003-command not known
5D-01005E5D1003-0103615D1003-command not known
5E-01005F5E1003-0103625E1003-command not known
5F-0100605F1003-0103635F1003-command not known
60-010061601003-010364601003-command not known
61-010062611003-010365611003-command not known
62-010063621003-010366621003-command not known
63-010064631003-010367631003-command not known
64-010065641003-010368641003-command not known
65-010066651003-010369651003-command not known
66-010067661003-01036A661003-command not known
67-010068671003-01036B671003-command not known
68-010069681003-01036C681003-command not known
69-01006A691003-01036D691003-command not known
6A-01006B6A1003-01036E6A1003-command not known
6B-01006C6B1003-01036F6B1003-command not known
6C-01006D6C1003-0103706C1003-command not known
6D-01006E6D1003-0103716D1003-command not known
6E-01006F6E1003-0103726E1003-command not known
6F-0100706F1003-0103736F1003-command not known
70-010071701003-010374701003-command not known
71-010072711003-010375711003-command not known
72-010073721003-010376721003-command not known
73-010074731003-010377731003-command not known
74-010075741003-010378741003-command not known
75-010076751003-010379751003-command not known
76-010077761003-01037A761003-command not known
77-010078771003-01037B771003-command not known
78-010079781003-01037C781003-command not known
79-01007A791003-01037D791003-command not known
7A-01007B7A1003-01037E7A1003-command not known
7B-01007C7B1003-01037F7B1003-command not known
7C-01007D7C1003-0103807C1003-command not known
7D-01007E7D1003-0103817D1003-command not known
7E-01007F7E1003-0103827E1003-command not known
7F-0100807F1003-0103837F1003-command not known
80-010081801003-010384801003-command not known
81-010082811003-010385811003-command not known
82-010083821003-010386821003-command not known
83-010084831003-010387831003-command not known
84-010085841003-010388841003-command not known
85-010086851003-010389851003-command not known
86-010087861003-01038A861003-command not known
87-010088871003-01038B871003-command not known
88-010089881003-01038C881003-command not known
89-01008A891003-01038D891003-command not known
8A-01008B8A1003-01038E8A1003-command not known
8B-01008C8B1003-01038F8B1003-command not known
8C-01008D8C1003-0103908C1003-command not known
8D-01008E8D1003-0103918D1003-command not known
8E-01008F8E1003-0103928E1003-command not known
8F-0100908F1003-0103938F1003-command not known
90-010091901003-010394901003-command not known
91-010092911003-010395911003-command not known
92-010093921003-010396921003-command not known
93-010094931003-010397931003-command not known
94-010095941003-010398941003-command not known
95-010096951003-010399951003-command not known
96-010097961003-01039A961003-command not known
97-010098971003-01039B971003-command not known
98-010099981003-01039C981003-command not known
99-01009A991003-01039D991003-command not known
9A-01009B9A1003-01039E9A1003-command not known
9B-01009C9B1003-01039F9B1003-command not known
9C-01009D9C1003-0103A09C1003-command not known
9D-01009E9D1003-0103A19D1003-command not known
9E-01009F9E1003-0103A29E1003-command not known
9F-0100A09F1003-0103A39F1003-command not known
A0-0100A1A01003-0103A4A01003-command not known
A1-0100A2A11003-0103A5A11003-command not known
A2-0100A3A21003-0103A6A21003-command not known
A3-0100A4A31003-0103A7A31003-command not known
A4-0100A5A41003-0103A8A41003-command not known
A5-0100A6A51003-0103A9A51003-command not known
A6-0100A7A61003-0103AAA61003-command not known
A7-0100A8A71003-0103ABA71003-command not known
A8-0100A9A81003-0103ACA81003-command not known
A9-0100AAA91003-0103ADA91003-command not known
AA-0100ABAA1003-0103AEAA1003-command not known
AB-0100ACAB1003-0103AFAB1003-command not known
AC-0100ADAC1003-0103B0AC1003-command not known
AD-0100AEAD1003-0103B1AD1003-command not known
AE-0100AFAE1003-0103B2AE1003-command not known
AF-0100B0AF1003-0103B3AF1003-command not known
B0-0100B1B01003-0103B4B01003-command not known
B1-0100B2B11003-0103B5B11003-command not known
B2-0100B3B21003-0103B6B21003-command not known
B3-0100B4B31003-0103B7B31003-command not known
B4-0100B5B41003-0103B8B41003-command not known
B5-0100B6B51003-0103B9B51003-command not known
B6-0100B7B61003-0103BAB61003-command not known
B7-0100B8B71003-0103BBB71003-command not known
B8-0100B9B81003-0103BCB81003-command not known
B9-0100BAB91003-0103BDB91003-command not known
BA-0100BBBA1003-0103BEBA1003-command not known
BB-0100BCBB1003-0103BFBB1003-command not known
BC-0100BDBC1003-0103C0BC1003-command not known
BD-0100BEBD1003-0103C1BD1003-command not known
BE-0100BFBE1003-0103C2BE1003-command not known
BF-0100C0BF1003-0103C3BF1003-command not known
C0-0100C1C01003-0103C4C01003-command not known
C1-0100C2C11003-0103C5C11003-command not known
C2-0100C3C21003-0103C6C21003-command not known
C3-0100C4C31003-0103C7C31003-command not known
C4-0100C5C41003-0103C8C41003-command not known
C5-0100C6C51003-0103C9C51003-command not known
C6-0100C7C61003-0103CAC61003-command not known
C7-0100C8C71003-0103CBC71003-command not known
C8-0100C9C81003-0103CCC81003-command not known
C9-0100CAC91003-0103CDC91003-command not known
CA-0100CBCA1003-0103CECA1003-command not known
CB-0100CCCB1003-0103CFCB1003-command not known
CC-0100CDCC1003-0103D0CC1003-command not known
CD-0100CECD1003-0103D1CD1003-command not known
CE-0100CFCE1003-0103D2CE1003-command not known
CF-0100D0CF1003-0103D3CF1003-command not known
D0-D1D00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
D1-D2D10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
D2-5ED25338
D3-0100D4D31003-0103D7D31003-command not known
D4-0100D5D41003-0103D8D41003-command not known
D5-0100D6D51003-0103D9D51003-command not known
D6-0100D7D61003-0103DAD61003-command not known
D7-0100D8D71003-0103DBD71003-command not known
D8-0100D9D81003-0103DCD81003-command not known
D9-0100DAD91003-0103DDD91003-command not known
DA-0100DBDA1003-0103DEDA1003-command not known
DB-0100DCDB1003-0103DFDB1003-command not known
DC-0100DDDC1003-0103E0DC1003-command not known
DD-0100DEDD1003-0103E1DD1003-command not known
DE-0100DFDE1003-0103E2DE1003-command not known
DF-0100E0DF1003-0103E3DF1003-command not known
E0-0100E1E01003-0103E4E01003-command not known
E1-0100E2E11003-0103E5E11003-command not known
E2-0100E3E21003-0103E6E21003-command not known
E3-0100E4E31003-0103E7E31003-command not known
E4-0100E5E41003-0103E8E41003-command not known
E5-0100E6E51003-0103E9E51003-command not known
E6-0100E7E61003-0103EAE61003-command not known
E7-0100E8E71003-0103EBE71003-command not known
E8-5AE8020001654100015EBA0001669800016698000000010000000B0E102009008C008C232300
E9-F5E9086F056C087904F1034F000000000060081717FFC500000100
EA-0100EBEA1003-0103EEEA1003-command not known
EB-0100ECEB1003-0103EFEB1003-command not known
EC-0100EDEC1003-0103F0EC1003-command not known
ED-0100EEED1003-0103F1ED1003-command not known
EE-0100EFEE1003-0103F2EE1003-command not known
EF-0100F0EF1003-0103F3EF1003-command not known
F0-0100F1F01003-0103F4F01003-command not known
F1-0100F2F11003-0103F5F11003-command not known
F2-C4F20202020002000000606008000100000000
F3-6EF301E2004801C2000060080E8700010001661017
F4-69F40049000000F10000011200F700FA00000201600800640100000000C80091000000F40200$
F5-47F5004900F101010115010100A10201600801000000000012DE
F6-08F600001000010000
F7-13F701E2FDA801010037FDA800F20049011200F40100004F02AF0032011E0120
F8-0100F9F81003-0103FCF81003-command not known
F9-0100FAF91003-0103FDF91003-command not known
FA-FAFA0017FFF9FFF7FFF7FFEFFFEAFFF7FFE2FFE9FFF8FFECFFEEFFEDFFEAFFF9FFF0FFF8FFED
FB-B6FBFDA8004A011300F302AF01E30101FDA800370121600817015E015E02BC00090020001600$
FC-83FC0314013B100B18
FD-F7FD02F7
FE-97FE03B1845A000100055D21000667620402417567203236203230313520
FF-010000FF1003-010303FF1003-command not known
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 24 November 2016, 22:47:34
FYI:
in your memory dump you have a
register - answer_from_heatpump

FB is the register describing sGlobal and F4 is sHC1
so let us start with
FB-B6FBFDA8004A011300F302AF01E30101FDA800370121600817015E015E02BC00090020001600$
F4-69F40049000000F10000011200F700FA00000201600800640100000000C80091000000F40200$
they are shorter if compared with older firmwares and are terminated with "$"; very strange
is it reproducible? are they always like this; can you retry?

Do you see a mismatch between sGlobal (or sHC1) and the heatpump display?
immi 
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: danillo am 25 November 2016, 05:55:18
Also wenn ich die Werte für sHC1 neheme, sehe ich in FHEM
Zitat
outsideTemp: 6.2 x08: 0 returnTemp: 25.1 integralHeat: 0 flowTemp: 25 heatSetTemp: 24.9 heatTemp: 25 seasonMode: winter integralSwitch: 100 opMode: normal roomSetTemp: 20 x60: 0 x64: 0 insideTempRC: 24.1 x72: 51.2 x76: 0 onHysteresisNo: 0 offHysteresisNo: 0 HCBoosterStage: 1
Am Display sehe ich unter Info - Heizen
ZitatAußentemperatur 6,3
HK1 soll 24,8
HK1 ist 24,9
HK2 soll 24,2
HK2 ist 27,9
Vorlauf 24,7
Rücklauf 24,9
Druck im Heizkreis 2,19 bar
Durchfluss 19,8 l /min

Die Datei data.txt enthält zu der Zeit
Zitat
01-02010000000000
02-010003021003-010306021003-command not known
03-010004031003-010307031003-command not known
04-010005041003-010308041003-command not known
05-010006051003-010309051003-command not known
06-010007061003-01030A061003-command not known
07-010008071003-01030B071003-command not known
08-010009081003-01030C081003-command not known
09-3C0901B8000000520000000000000225
0A-140A01B80050
0B-01000C0B1003-0104C90B01B81003-UNKNOWN REQUEST
0C-01000D0C1003-0104CA0C01B81003-UNKNOWN REQUEST
0D-01000E0D1003-0103110D1003-command not known
0E-01000F0E1003-0103120E1003-command not known
0F-010010100F1003-0103130F1003-command not known
10-01001110101003-010314101003-command not known
11-010012111003-010315111003-command not known
12-010013121003-010316121003-command not known
13-010014131003-010317131003-command not known
14-010015141003-010318141003-command not known
15-010016151003-010319151003-command not known
16-7116FDA801DC00FC00000A003C60081717
17-010018171003-01031B171003-command not known
18-010019181003-01031C181003-command not known
19-01001A191003-01031D191003-command not known
1A-01001B1A1003-01031E1A1003-command not known
1B-01001C1B1003-01031F1B1003-command not known
1C-01001D1C1003-0103201C1003-command not known
1D-01001E1D1003-0103211D1003-command not known
1E-01001F1E1003-0103221E1003-command not known
1F-0100201F1003-0103231F1003-command not known
20-010021201003-010324201003-command not known
21-010022211003-010325211003-command not known
22-010023221003-010326221003-command not known
23-010024231003-010327231003-command not known
24-010025241003-010328241003-command not known
25-010026251003-010329251003-command not known
26-010027261003-01032A261003-command not known
27-010028271003-01032B271003-command not known
28-010029281003-01032C281003-command not known
29-01002A291003-01032D291003-command not known
2A-01002B182A1003-01032E2A1003-command not known
2B-01002C2B181003-01032F2B1003-command not known
2C-01002D2C1003-0103302C1003-command not known
2D-01002E2D1003-0103312D1003-command not known
2E-01002F2E1003-0103322E1003-command not known
2F-0100302F1003-0103332F1003-command not known
30-010031301003-010334301003-command not known
31-010032311003-010335311003-command not known
32-010033321003-010336321003-command not known
33-010034331003-010337331003-command not known
34-010035341003-010338341003-command not known
35-010036351003-010339351003-command not known
36-010037361003-01033A361003-command not known
37-010038371003-01033B371003-command not known
38-010039381003-01033C381003-command not known
39-01003A391003-01033D391003-command not known
3A-01003B3A1003-01033E3A1003-command not known
3B-01003C3B1003-01033F3B1003-command not known
3C-01003D3C1003-0103403C1003-command not known
3D-01003E3D1003-0103413D1003-command not known
3E-01003F3E1003-0103423E1003-command not known
3F-0100403F1003-0103433F1003-command not known
40-010041401003-010344401003-command not known
41-010042411003-010345411003-command not known
42-010043421003-010346421003-command not known
43-010044431003-010347431003-command not known
44-010045441003-010348441003-command not known
45-010046451003-010349451003-command not known
46-010047461003-01034A461003-command not known
47-010048471003-01034B471003-command not known
48-010049481003-01034C481003-command not known
49-01004A491003-01034D491003-command not known
4A-01004B4A1003-01034E4A1003-command not known
4B-01004C4B1003-01034F4B1003-command not known
4C-01004D4C1003-0103504C1003-command not known
4D-01004E4D1003-0103514D1003-command not known
4E-01004F4E1003-0103524E1003-command not known
4F-0100504F1003-0103534F1003-command not known
50-010051501003-010354501003-command not known
51-010052511003-010355511003-command not known
52-010053521003-010356521003-command not known
53-010054531003-010357531003-command not known
54-010055541003-010358541003-command not known
55-010056551003-010359551003-command not known
56-010057561003-01035A561003-command not known
57-010058571003-01035B571003-command not known
58-010059581003-01035C581003-command not known
59-01005A591003-01035D591003-command not known
5A-01005B5A1003-01035E5A1003-command not known
5B-01005C5B1003-01035F5B1003-command not known
5C-01005D5C1003-0103605C1003-command not known
5D-01005E5D1003-0103615D1003-command not known
5E-01005F5E1003-0103625E1003-command not known
5F-0100605F1003-0103635F1003-command not known
60-010061601003-010364601003-command not known
61-010062611003-010365611003-command not known
62-010063621003-010366621003-command not known
63-010064631003-010367631003-command not known
64-010065641003-010368641003-command not known
65-010066651003-010369651003-command not known
66-010067661003-01036A661003-command not known
67-010068671003-01036B671003-command not known
68-010069681003-01036C681003-command not known
69-01006A691003-01036D691003-command not known
6A-01006B6A1003-01036E6A1003-command not known
6B-01006C6B1003-01036F6B1003-command not known
6C-01006D6C1003-0103706C1003-command not known
6D-01006E6D1003-0103716D1003-command not known
6E-01006F6E1003-0103726E1003-command not known
6F-0100706F1003-0103736F1003-command not known
70-010071701003-010374701003-command not known
71-010072711003-010375711003-command not known
72-010073721003-010376721003-command not known
73-010074731003-010377731003-command not known
74-010075741003-010378741003-command not known
75-010076751003-010379751003-command not known
76-010077761003-01037A761003-command not known
77-010078771003-01037B771003-command not known
78-010079781003-01037C781003-command not known
79-01007A791003-01037D791003-command not known
7A-01007B7A1003-01037E7A1003-command not known
7B-01007C7B1003-01037F7B1003-command not known
7C-01007D7C1003-0103807C1003-command not known
7D-01007E7D1003-0103817D1003-command not known
7E-01007F7E1003-0103827E1003-command not known
7F-0100807F1003-0103837F1003-command not known
80-010081801003-010384801003-command not known
81-010082811003-010385811003-command not known
82-010083821003-010386821003-command not known
83-010084831003-010387831003-command not known
84-010085841003-010388841003-command not known
85-010086851003-010389851003-command not known
86-010087861003-01038A861003-command not known
87-010088871003-01038B871003-command not known
88-010089881003-01038C881003-command not known
89-01008A891003-01038D891003-command not known
8A-01008B8A1003-01038E8A1003-command not known
8B-01008C8B1003-01038F8B1003-command not known
8C-01008D8C1003-0103908C1003-command not known
8D-01008E8D1003-0103918D1003-command not known
8E-01008F8E1003-0103928E1003-command not known
8F-0100908F1003-0103938F1003-command not known
90-010091901003-010394901003-command not known
91-010092911003-010395911003-command not known
92-010093921003-010396921003-command not known
93-010094931003-010397931003-command not known
94-010095941003-010398941003-command not known
95-010096951003-010399951003-command not known
96-010097961003-01039A961003-command not known
97-010098971003-01039B971003-command not known
98-010099981003-01039C981003-command not known
99-01009A991003-01039D991003-command not known
9A-01009B9A1003-01039E9A1003-command not known
9B-01009C9B1003-01039F9B1003-command not known
9C-01009D9C1003-0103A09C1003-command not known
9D-01009E9D1003-0103A19D1003-command not known
9E-01009F9E1003-0103A29E1003-command not known
9F-0100A09F1003-0103A39F1003-command not known
A0-0100A1A01003-0103A4A01003-command not known
A1-0100A2A11003-0103A5A11003-command not known
A2-0100A3A21003-0103A6A21003-command not known
A3-0100A4A31003-0103A7A31003-command not known
A4-0100A5A41003-0103A8A41003-command not known
A5-0100A6A51003-0103A9A51003-command not known
A6-0100A7A61003-0103AAA61003-command not known
A7-0100A8A71003-0103ABA71003-command not known
A8-0100A9A81003-0103ACA81003-command not known
A9-0100AAA91003-0103ADA91003-command not known
AA-0100ABAA1003-0103AEAA1003-command not known
AB-0100ACAB1003-0103AFAB1003-command not known
AC-0100ADAC1003-0103B0AC1003-command not known
AD-0100AEAD1003-0103B1AD1003-command not known
AE-0100AFAE1003-0103B2AE1003-command not known
AF-0100B0AF1003-0103B3AF1003-command not known
B0-0100B1B01003-0103B4B01003-command not known
B1-0100B2B11003-0103B5B11003-command not known
B2-0100B3B21003-0103B6B21003-command not known
B3-0100B4B31003-0103B7B31003-command not known
B4-0100B5B41003-0103B8B41003-command not known
B5-0100B6B51003-0103B9B51003-command not known
B6-0100B7B61003-0103BAB61003-command not known
B7-0100B8B71003-0103BBB71003-command not known
B8-0100B9B81003-0103BCB81003-command not known
B9-0100BAB91003-0103BDB91003-command not known
BA-0100BBBA1003-0103BEBA1003-command not known
BB-0100BCBB1003-0103BFBB1003-command not known
BC-0100BDBC1003-0103C0BC1003-command not known
BD-0100BEBD1003-0103C1BD1003-command not known
BE-0100BFBE1003-0103C2BE1003-command not known
BF-0100C0BF1003-0103C3BF1003-command not known
C0-0100C1C01003-0103C4C01003-command not known
C1-0100C2C11003-0103C5C11003-command not known
C2-0100C3C21003-0103C6C21003-command not known
C3-0100C4C31003-0103C7C31003-command not known
C4-0100C5C41003-0103C8C41003-command not known
C5-0100C6C51003-0103C9C51003-command not known
C6-0100C7C61003-0103CAC61003-command not known
C7-0100C8C71003-0103CBC71003-command not known
C8-0100C9C81003-0103CCC81003-command not known
C9-0100CAC91003-0103CDC91003-command not known
CA-0100CBCA1003-0103CECA1003-command not known
CB-0100CCCB1003-0103CFCB1003-command not known
CC-0100CDCC1003-0103D0CC1003-command not known
CD-0100CECD1003-0103D1CD1003-command not known
CE-0100CFCE1003-0103D2CE1003-command not known
CF-0100D0CF1003-0103D3CF1003-command not known
D0-D1D00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
D1-D2D10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
D2-17D20C38
D3-0100D4D31003-0103D7D31003-command not known
D4-0100D5D41003-0103D8D41003-command not known
D5-0100D6D51003-0103D9D51003-command not known
D6-0100D7D61003-0103DAD61003-command not known
D7-0100D8D71003-0103DBD71003-command not known
D8-0100D9D81003-0103DCD81003-command not known
D9-0100DAD91003-0103DDD91003-command not known
DA-0100DBDA1003-0103DEDA1003-command not known
DB-0100DCDB1003-0103DFDB1003-command not known
DC-0100DDDC1003-0103E0DC1003-command not known
DD-0100DEDD1003-0103E1DD1003-command not known
DE-0100DFDE1003-0103E2DE1003-command not known
DF-0100E0DF1003-0103E3DF1003-command not known
E0-0100E1E01003-0103E4E01003-command not known
E1-0100E2E11003-0103E5E11003-command not known
E2-0100E3E21003-0103E6E21003-command not known
E3-0100E4E31003-0103E7E31003-command not known
E4-0100E5E41003-0103E8E41003-command not known
E5-0100E6E51003-0103E9E51003-command not known
E6-0100E7E61003-0103EAE61003-command not known
E7-0100E8E71003-0103EBE71003-command not known
E8-5BE8020001654100015EBA0001669800016698000000010000000B0E101515008C008C232300
E9-F6E9086F056C087904F1034F000000000061081717FFC500000100
EA-0100EBEA1003-0103EEEA1003-command not known
EB-0100ECEB1003-0103EFEB1003-command not known
EC-0100EDEC1003-0103F0EC1003-command not known
ED-0100EEED1003-0103F1ED1003-command not known
EE-0100EFEE1003-0103F2EE1003-command not known
EF-0100F0EF1003-0103F3EF1003-command not known
F0-0100F1F01003-0103F4F01003-command not known
F1-0100F2F11003-0103F5F11003-command not known
F2-C4F20202010001000000616108000100000000
F3-10F301DE004001C200006108000000010001685017
F4-C2F4003F000000FF000000F800F900FC00000101610800640100000000C80000000000F1020000000017
F5-63F5003F00FE00F6011700F600FD010161080100000000001DA6
F6-08F600001000010000
F7-75F701DFFDA800F700A8FDA800FF004000F900FD00F8010D016C010A00FE0102
F8-0100F9F81003-0103FCF81003-command not known
F9-0100FAF91003-0103FDF91003-command not known
FA-FAFA0017FFF9FFF7FFF7FFEFFFEAFFF7FFE2FFE9FFF8FFECFFEEFFEDFFEAFFF9FFF0FFF8FFED
FB-55FBFDA8003E00F800FA016B01DD00F6FDA800A70101610817015E015E0000001500150000003F019C0000034F0690000000000000000007FA00D30000000000FA0100010B010A00F80000000010DC
FC-77FC04052617100B19
FD-F7FD02F7
FE-97FE03B1845A000100055D21000667620402417567203236203230313520
FF-010000FF1003-010303FF1003-command not known
Titel: THZ 504 Unterschied sGlobal und sDisplay
Beitrag von: danillo am 25 November 2016, 17:48:25
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.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 25 November 2016, 19:55:20
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

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: danillo am 28 November 2016, 08:14:47
I will do so, but it will take a while  ;)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 29 November 2016, 22:49:27
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
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag 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?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 01 Januar 2017, 21:12:06
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?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 02 Januar 2017, 00:15:25
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
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 02 Januar 2017, 07:15:48
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.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 02 Januar 2017, 07:34:00
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.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 02 Januar 2017, 11:30:51
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

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag 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.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 02 Januar 2017, 22:07:01
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³
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 02 Januar 2017, 23:11:01
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.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: fernsehjens am 03 Januar 2017, 20:39:04
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
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 03 Januar 2017, 20:57:27
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
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 03 Januar 2017, 21:04:21
Hi immi,
as he already wrote: LWZ303i, FW rev. 2.03 assumed, Raspberry Pi, connected via serial port (Ser 2 USB converter assumed)
Willy
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 03 Januar 2017, 21:10:55
Hi Jens,

herzlich willkommen. Toll, dass so eine alte Anlage noch läuft; das macht mir Hoffnung. Wenn Du mal Zeit hast wäre ich an ein paar Infos über die Anlage interessiert, also was im Lauf der Jahre so an Wartung, Reparaturen, Verschleißteilen usw. anfiel. Allerdings bitte nicht hier (hier ist Modulsupport und Codeentwickling), sondern z.B. hier: https://forum.fhem.de/index.php?topic=33452.new;topicseen#new (https://forum.fhem.de/index.php?topic=33452.new;topicseen#new)

Gruß
Willy

PS:
Immer wieder schön zu sehen, wenn meine eigenen Plotdarstellungen woanders auch Gefallen finden  :).
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: fernsehjens am 03 Januar 2017, 21:30:10
Hi Immi,
when i do 'get Mythz sFirmware', i get: '010301FD1003 msg2 command not known';
perhaps the version of the LWZ303i is: 2.03 (sticker on Eprom).

FHEM runs on Raspberry B+, thz.pm is 0.153.

Hallo Willi,
im anderen Thread werde ich die Anlage demnächst ein wenig beschreiben.

Thanks Jens
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 03 Januar 2017, 23:07:47
Hi Jens
Zitat von: fernsehjens am 03 Januar 2017, 21:30:10
when i do 'get Mythz sFirmware', i get: '010301FD1003 msg2 command not known';
it is strange, that you cannot read register FD;
have a look again at data.txt
I am missing lots of registers; after readRAWRegisters you should wait more before reading data.txt

Zitat
FHEM runs on Raspberry B+, thz.pm is 0.153.
"Illegal division by zero at ./FHEM/00_THZ.pm line 1686"
it looks like your register F4 is formatted strangely or you have roomSetTemp = 0

try as attribute
attr Mythz firmware 2.14

restart fhem
wait 5 minutes and check agian if it crashes again

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: fernsehjens am 04 Januar 2017, 00:55:50
Hi immi,
yes with attr Mythz firmware 2.14 it works without crashes and i have the heat curve.

But on "get Mythz debug_read_raw_register_slow" there are only a few registers in data.txt.
There are some logs after reading the registers:
2017.01.04 00:40:13 3: THZ_Parsing: offset(12) + length(4) is longer then message : '010315111003'
2017.01.04 00:40:13 3: THZ_Parsing: offset(16) + length(4) is longer then message : '0103151110030000'
2017.01.04 00:40:13 3: THZ_Parsing: offset(20) + length(2) is longer then message : '01031511100300000000'
2017.01.04 00:40:13 3: THZ_Parsing: offset(22) + length(2) is longer then message : '0103151110030000000000'
2017.01.04 00:40:13 3: THZ_Parsing: offset(12) + length(4) is longer then message : '010316121003'
2017.01.04 00:40:13 3: THZ_Parsing: offset(16) + length(4) is longer then message : '0103161210030000'
2017.01.04 00:40:13 3: THZ_Parsing: offset(20) + length(2) is longer then message : '01031612100300000000'
2017.01.04 00:40:13 3: THZ_Parsing: offset(22) + length(2) is longer then message : '0103161210030000000000'
2017.01.04 00:40:13 3: THZ_Parsing: offset(12) + length(4) is longer then message : '010317131003'
2017.01.04 00:40:13 3: THZ_Parsing: offset(16) + length(4) is longer then message : '0103171310030000'
2017.01.04 00:40:13 3: THZ_Parsing: offset(20) + length(2) is longer then message : '01031713100300000000'
2017.01.04 00:40:13 3: THZ_Parsing: offset(22) + length(2) is longer then message : '0103171310030000000000'
2017.01.04 00:40:13 3: THZ_Parsing: offset(12) + length(4) is longer then message : '010318141003'
2017.01.04 00:40:13 3: THZ_Parsing: offset(16) + length(4) is longer then message : '0103181410030000'
2017.01.04 00:40:13 3: THZ_Parsing: offset(20) + length(2) is longer then message : '01031814100300000000'
2017.01.04 00:40:13 3: THZ_Parsing: offset(22) + length(2) is longer then message : '0103181410030000000000'
2017.01.04 00:40:14 3: THZ_Parsing: offset(12) + length(4) is longer then message : '010319151003'
2017.01.04 00:40:14 3: THZ_Parsing: offset(16) + length(4) is longer then message : '0103191510030000'
2017.01.04 00:40:14 3: THZ_Parsing: offset(20) + length(2) is longer then message : '01031915100300000000'
2017.01.04 00:40:14 3: THZ_Parsing: offset(22) + length(2) is longer then message : '0103191510030000000000'
2017.01.04 00:40:14 2: Mythz/RAW: 000000000000
2017.01.04 00:40:14 2: Mythz/RAW: 00000000
2017.01.04 00:40:14 2: Mythz/RAW: 00000000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 00000000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 00000000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 00000000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 00000000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 00000000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 00000000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 0000000000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 00000000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 00000000
2017.01.04 00:40:14 2: Mythz/RAW: 000000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 0000
2017.01.04 00:40:14 2: Mythz/RAW: 00000000
2017.01.04 00:40:14 2: Mythz/RAW: 001003
2017.01.04 00:40:15 2: Mythz/RAW: 02
2017.01.04 00:40:16 2: Mythz/RAW: 02
2017.01.04 00:40:17 2: Mythz/RAW: 02
2017.01.04 00:40:18 2: Mythz/RAW: 02
2017.01.04 00:40:19 2: Mythz/RAW: 02
2017.01.04 00:40:21 2: Mythz/RAW: 02

thanks
Jens
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 04 Januar 2017, 01:56:14
Hi Jens
you restart your system
if you are happy, just keep it like this, otherwise
attr Mythz verbose 5
wait 10min
post the fhemlogfile as file

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: fernsehjens am 04 Januar 2017, 10:18:52
Hi immi,
i´m happy but i do no trust myself to send a parameter to the LWZ.
Here is the logfile with "verbose 5", at 09:43 i send "get Mythz debug_read_raw_register_slow" again.

Thanks for support
Jens
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 04 Januar 2017, 11:16:20
hi jens
the logfile is ok, thanks
before writing back to the heatpump I would try to get p01-p12 with verbose5
I would like to see the log when you get p01-p12 with verbose5.
I, also, would like you to check all parameters connected with p01-p12.
Are they all well interpreted from fhem and equal to what you have in the heatpump?
p01RoomTempDay: p02RoomTempNight: p03RoomTempStandby: p04DHWsetTempDay: p05DHWsetTempNight: p06DHWsetTempStandby:   p07FanStageDay:  p08FanStageNight: p09FanStageStandby: p10RoomTempManual: p11DHWsetTempManual:  p12FanStageManual:
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: fernsehjens am 04 Januar 2017, 13:12:52
hi immi,
the parameters from p01-p12 are all the same like the heatpump:
p01RoomTempDay: 21.5 p02RoomTempNight: 21 p03RoomTempStandby: 16 p04DHWsetTempDay: 48 p05DHWsetTempNight: 43 p06DHWsetTempStandby: 38 p07FanStageDay: 2 p08FanStageNight: 0 p09FanStageStandby: 2 p10RoomTempManual: 26 p11DHWsetTempManual: 40 p12FanStageManual: 0
Jens
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 04 Januar 2017, 13:51:23
hi Jens
I do not see any problem:
Search in internet the tel-number of a tecalor technician ;)
Try to change p03RoomTempStandby from fhem and look if your tecalor accepted the change.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: fernsehjens am 04 Januar 2017, 22:56:11
Hi immi,
yes i do it!
I can change all Parameters to my heatpump,
thanks for help!
Jens
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: kriforum am 06 Januar 2017, 17:24:49
Dear all,

Happy New Year!
I'm running your module roughly one year now and everything's working fine - thanks so much for all your ongoing efforts.
I used to use an ISG gateway from Stiebel earlier (and then in parallel to the FHEM-Raspi), but actually I don't use the gateway any longer actively.

Last night I got some emails that the booster had been used (outside temp around -10°C), and I checked the plots (mainly the ones from Willy), then it came to my attention that in the power consumption plot there is only visible the power which goes to the compressor, not the one to the booster - which would be much nicer!

Looking to the available parameters, there are no daily booster power values (like for the HC), only total ones since commission. So for every refresh/reading a difference (sBoostDHWTotal_old - sBoostDHWTotal_ new) would need to be added to the HC power to show total power.

Do you agree?
Anyone already had the same wish/idea?

Thanks
Christian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 06 Januar 2017, 20:06:49
Zitat von: kriforum am 06 Januar 2017, 17:24:49
--- it came to my attention that in the power consumption plot there is only visible the power which goes to the compressor, not the one to the booster - which would be much nicer!
Don't know which plot you're talking about. Is it one of mine, or a self made one?

Zitat von: kriforum am 06 Januar 2017, 17:24:49
Looking to the available parameters, there are no daily booster power values (like for the HC), only total ones since commission. So for every refresh/reading a difference (sBoostDHWTotal_old - sBoostDHWTotal_ new) would need to be added to the HC power to show total power.
You can do this easily using a userReading.

It never came to my mind to check heating power (I assume in fact you're not talking about power, but energy) on daily basis.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 07 Januar 2017, 03:26:51
Hi Christian
i really appreciate that you like more fhem than ISG

I also do not understand really what you nead
I try to guess:
instead of sBoostDHWTotal_old - sBoostDHWTotal_ new
why don't you plot sBoostDHWTotal with delta-h or delta-d?
https://wiki.fhem.de/wiki/Creating_Plots
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: kriforum am 07 Januar 2017, 12:52:40
Thanks for getting back quickly.
I double checked the plot I were talking about, indeed it's the only one I made myself, beside others taken over from Willy. And yes, it shows the consumed energy for heating and water (wrong legend naming, true...). Sorry for not being more clear.

Basically I'm interested in the consumed energy to not get surprises - actually a fear which goes back to the times of the initial heating up of the house floors for drying them. Quite an amazing energy bill...

Your ideas are helpful and obvious and clearly show me that I have to get more involved again after a year of just using the system.

Thanks.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 07 Januar 2017, 13:15:52
as written above i would use delta-h for your plot4
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 07 Januar 2017, 13:37:24
Ok, now I understand what you're talking about. I don't know how to easily calculate the booster energy. Maybe you need to multiply booster power (related to actual booster stage) with duration.

May be easier to check the energy meter directly, e.g. using a Youless LS 110, which is supported by the JSONMETER module. For an electronic energy counter you may alternatively use a reading head (e.g. the one from Volkszaheler.org), supported by the OBIS module. If you need assistance for one of them please let me know.

I thought about checking the used energy via the THZ's built-in energy meter a few days ago. But then I compared the values of this counter with the energy meter's values, and the difference was far more than 10% ... not really useable.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: vinylsolution am 07 Januar 2017, 16:11:32
Hi,
today I setup fhem on a RPI and just connected successfully my THZ404 to fhem.

Now, I noticed a misbehaviour when reading out "sTimedate".
sTimedate returns the wrong weekday -> MONDAY but should be Saturday. All other sTimedate values are OK.
The THZ display shows the correct weekday.

Is this error a known issue?

My cofiguration:
THZ404 sFirmware version: 05.09
fhem
Latest Revision: 12991

File              Rev   Last Change

fhem.pl           12966 2017-01-05 20:26:04Z rudolfkoenig

00_THZ.pm         12633 2016-11-23 03:22:43Z immiimmi

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 07 Januar 2017, 17:29:42
ups - same on my side (303 SOL, 4.19). Seems to be a bug.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 07 Januar 2017, 18:58:50
@kriforum:

you could try using the statistics module, e.g. something similar to

define Statistik statistics Mythz
attr Statistik deltaReadings sHeatDHWTotal,sHeatHCTotal,sElectrDHWTotal,sElectrHCTotal,sBoostDHWTotal


Have a look into commandref for details.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 07 Januar 2017, 22:31:35
Zitat von: vinylsolution am 07 Januar 2017, 16:11:32
Now, I noticed a misbehaviour when reading out "sTimedate".
sTimedate returns the wrong weekday -> MONDAY but should be Saturday. All other sTimedate values are OK.
The THZ display shows the correct weekday.
Is this error a known issue?
bug-fix uploaded to svn
just update fhem
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: vinylsolution am 08 Januar 2017, 11:55:11
Thanks for the quick update but unfortunately it does not work for me, see screenshot.
I just typed "update" in fhem command line, maybe I am doing something wrong......
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: vinylsolution am 08 Januar 2017, 18:17:59
Hi immi,
your fix works. It was my fault - I did not restart the system after update.
Sorry for being stupid.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: michaelk68 am 13 Januar 2017, 07:39:18
Hi Immi,

I have a lwz 404 with a second display in the living room. Its assigned to hk2 for dew point monitoring while cooling.
My problem is, that I didn't get relHumidity and insideTempRC temperatures read in fhem, the values are 0 or the room set temp.
When I assign the second display to hk1, all is fine and I can see the values!
Firmware is 5.39.

what can I do?

Michael
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 13 Januar 2017, 21:23:54
Zitat von: michaelk68 am 13 Januar 2017, 07:39:18
Hi Immi,
I have a lwz 404 with a second display in the living room. Its assigned to hk2 for dew point monitoring while cooling.
My problem is, that I didn't get relHumidity and insideTempRC temperatures read in fhem, the values are 0 or the room set temp.
When I assign the second display to hk1, all is fine and I can see the values!
Firmware is 5.39.
what can I do?
Michael
this is how I decode the HC1 and HC2
sHC1
outsideTemp: -0.6 x08: -56.1 returnTemp: 24.4 integralHeat: -26 flowTemp: 25 heatSetTemp: 26.7 heatTemp: 24.5 seasonMode: winter integralSwitch: 101 opMode: normal roomSetTemp: 22 x60: 0 x64: 563.2 insideTempRC: 23.6 x72: 0 x76: 2.2 onHysteresisNo: 0 offHysteresisNo: 1 HCBoosterStage: 0

sHC2
outsideTemp: 6.1 returnTemp: 24.9 vorlaufTemp: -60 heatSetTemp: 25 heatTemp: 24.9 stellgroesse: -100 seasonMode: winter opMode: setback

HC1 and HC2 are respectively saved in register F4 and F5
I do not have 5.39 nor a second display, therefore I cannot help you much to improve the reverse-eng. of register F5.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 13 Januar 2017, 21:33:47
Hi immi,

our (Michael and me) hope was that you could give him a hint on how to find the right register, containing the required values but for HC2. I don't have the knowledge to teach him. Maybe there's a link to an older contribution where you described it (?).

Willy
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 13 Januar 2017, 21:38:53
Hello immi,

I found two more values, working at least with LWZ404SOL and fw5.39:

Set-power of heating circuit pump, 0A02CB, raw-value has to be divided by 10 to get %
set-power of DHW pump, 0A02CC, raw-value has to be divided by 10 to get %
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 14 Januar 2017, 17:17:45
Zitat von: TheTrumpeter am 13 Januar 2017, 21:38:53
Hello immi,
I found two more values, working at least with LWZ404SOL and fw5.39:
Set-power of heating circuit pump, 0A02CB, raw-value has to be divided by 10 to get %
set-power of DHW pump, 0A02CC, raw-value has to be divided by 10 to get %
Great job
both register are unkown to my firmware.
I can restrict them to your firmware: how do you want to call them?
pXXPowerHCpump?
pXXPowerDHWpump?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 14 Januar 2017, 17:33:41
Zitat von: willybauss am 13 Januar 2017, 21:33:47
Hi immi,
our (Michael and me) hope was that you could give him a hint on how to find the right register, containing the required values but for HC2. I don't have the knowledge to teach him. Maybe there's a link to an older contribution where you described it (?).
Hi Willy
I do not expect to find it outside F5 (HC2). There is still hope, because I have not decoded F5 completely
here you can find how to download the registers
https://forum.fhem.de/index.php/topic,33452.msg526493.html#msg526493 (https://forum.fhem.de/index.php/topic,33452.msg526493.html#msg526493)
here you can find how to debug/interprete the register F4, which is very similar to F5
https://forum.fhem.de/index.php/topic,33211.msg528445.html#msg528445  (https://forum.fhem.de/index.php/topic,33211.msg528445.html#msg528445)
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 14 Januar 2017, 21:05:08
Zitat von: immi am 14 Januar 2017, 17:17:45
I can restrict them to your firmware: how do you want to call them?
pXXPowerHCpump?
pXXPowerDHWpump?
Well, in German manual they're called "Pumpendrehzahl Warmwasser" and "Pumpendrehzahl Heizen". As they do not have a P-number, I'd say your suggestions are fine.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 Januar 2017, 10:59:31
Zitat von: TheTrumpeter am 14 Januar 2017, 21:05:08
Well, in German manual they're called "Pumpendrehzahl Warmwasser" and "Pumpendrehzahl Heizen". As they do not have a P-number, I'd say your suggestions are fine.
please test following patch

at line 497 add followings

my %sets539only =(
"p99PumpSpeedHC" => {cmd2=>"0A02CB", argMin =>   "0", argMax =>  "100", type =>"5temp",  unit =>" %"}, 
"p99PumpSpeedDHW" => {cmd2=>"0A02CC", argMin =>   "0", argMax =>  "100", type =>"5temp",  unit =>" %"} 
);


at about line 1560 update following

elsif ($attrVal eq "5.39") {
        THZ_RemoveInternalTimer("THZ_GetRefresh");
        %sets=(%sets439, %sets539only);
        %gets=(%getsonly539, %sets);
        THZ_Refresh_all_gets($hash);
      }


p.s. you can decide the naming if PumpSpeed or PumpRate
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 15 Januar 2017, 16:17:35
Works perfect.

Regarding name: I like "rate" more than "speed".
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 Januar 2017, 16:51:00
Zitat von: TheTrumpeter am 15 Januar 2017, 14:04:42
Hab' den Rückgabewert trotzdem mal ausgewertet, 0x1003 bzw. 4099d. Wüsste nicht mit welcher Umrechnung ich da auf 1,7bar kommen sollte.  :-\
You just have to be more creative: try
1003h     ->  turn   0310h    -->    784d -->  1,784 bar
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 Januar 2017, 16:59:55
v 0.155 uploaded
- new parameters for 5.39 by thetrumpeter msg561513:  "p99PumpRateHC" and "p99PumpRateDHW"      
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 15 Januar 2017, 20:04:07
Zitat von: immi am 15 Januar 2017, 16:51:00
You just have to be more creative: try
1003h     ->  turn   0310h    -->    784d -->  1,784 bar
immi
How to implement that to try if the value "lives" or is constant?
As of now I only added new registers and took the values "as they are". I could do that and see if the value changes.

Maybe that's the clue also for "Abluftfeuchte"...

You think they swapped lower and upper byte to prevent people from getting the values? Or why do they do that? Does not make sense to me... nor makes it sense to store only half of the physical value. What if pressure drops below 1bar?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 Januar 2017, 21:10:57
Zitat von: TheTrumpeter am 15 Januar 2017, 20:04:07
You think they swapped lower and upper byte to prevent people from getting the values? Or why do they do that? Does not make sense to me...
No it is not a safety measure. Sometimes they swap the bytes, maybe in your case not, and they divide the value over 2 registers.
I just think that many developers reworked the code over several firmwares, no-one cleaned up  and they wanted to mantain some compatibility with legacy products.
If you look at my code starting from line 1443, you see many strange encodings :)
I understand your frustration: But think it is much better than a sudoku :)
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 15 Januar 2017, 21:43:21
Hm... makes it more difficult  >:(

When I try to read 0A001F, I get "unknown request", so I cannot read it out nor swap the bytes. So it won't be the value I search for.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: toggle am 17 Januar 2017, 18:53:16
Zitat von: immi am 15 Januar 2017, 16:51:00
Hab' den Rückgabewert trotzdem mal ausgewertet, 0x1003 bzw. 4099d. Wüsste nicht mit welcher Umrechnung ich da auf 1,7bar kommen sollte.  :-\

You just have to be more creative: try
1003h     ->  turn   0310h    -->    784d -->  1,784 bar
Für mich sieht 0x1003 eher nach dem Ende der Message aus (DLE + ETX).
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 29 Januar 2017, 15:22:33
Hi immi,

I get duplicate events caused by my Mythz userReadings. After weeks of investigation I still don't have any idea where they might come from. The userReading definition looks like:

CopHC:sHeatRecoveredDay.* {sprintf("%.2f", ReadingsNum("Mythz","sHeatHCDay",1) / ReadingsNum("Mythz","sElectrHCDay",1))},
CopDHW:sHeatRecoveredDay.* {sprintf("%.2f", ReadingsNum("Mythz","sHeatDHWDay",1) / ReadingsNum("Mythz","sElectrDHWDay",1))},
PumpeDHW:sGlobal.* {(split ' ',ReadingsVal("Mythz","sGlobal",0))[25]},
PumpeHC:sGlobal.* {(split ' ',ReadingsVal("Mythz","sGlobal",0))[27]},
PumpeSol:sGlobal.* {(split ' ',ReadingsVal("Mythz","sGlobal",0))[29]},
Compress:sGlobal.* {(split ' ',ReadingsVal("Mythz","sGlobal",0))[31]},
Boost3:sGlobal.* {(split ' ',ReadingsVal("Mythz","sGlobal",0))[33]},
Boost2:sGlobal.* {(split ' ',ReadingsVal("Mythz","sGlobal",0))[35]},
Boost1:sGlobal.* {(split ' ',ReadingsVal("Mythz","sGlobal",0))[37]},
SwitchingProg:sDisplay.* {(split ' ',ReadingsVal("Mythz","sDisplay",0))[1]},
Compressor:sDisplay.* {(split ' ',ReadingsVal("Mythz","sDisplay",0))[3]},
HeatingHC:sDisplay.* {(split ' ',ReadingsVal("Mythz","sDisplay",0))[5]},
HeatingDHW:sDisplay.* {(split ' ',ReadingsVal("Mythz","sDisplay",0))[7]},
BoosterHC:sDisplay.* {(split ' ',ReadingsVal("Mythz","sDisplay",0))[9]},
FilterBoth:sDisplay.* {(split ' ',ReadingsVal("Mythz","sDisplay",0))[11]},
VentStage:sDisplay.* {(split ' ',ReadingsVal("Mythz","sDisplay",0))[13]},
PumpHC:sDisplay.* {(split ' ',ReadingsVal("Mythz","sDisplay",0))[15]},
Defrost:sDisplay.* {(split ' ',ReadingsVal("Mythz","sDisplay",0))[17]},
Service:sLast10errors.* {(split ' ',ReadingsVal("Mythz","sLast10errors",0))[1]},
Rel_humidity:sGlobal.* {(split ' ',ReadingsVal("Mythz","sGlobal",0))[67] + 11.5},
flow_temp:sGlobal.* {(split ' ',ReadingsVal("Mythz","sGlobal",0))[3]},
return_temp:sGlobal.* {(split ' ',ReadingsVal("Mythz","sGlobal",0))[5]},
outside_temp:sGlobal.* {(split ' ',ReadingsVal("Mythz","sGlobal",0))[1]},
dhw_temp:sGlobal.* {(split ' ',ReadingsVal("Mythz","sGlobal",0))[9]},
inside_temp:sHC1.* {(split ' ',ReadingsVal("Mythz","sHC1",0))[27]}


Setting an EventMonitor, filtered by any one of these userReadings shows that all these userReadings are duplicated - identical content and identical time stamp. The ones which are logged show up twice in the log file of course.

For debugging I did e.g. for "return_temp": I removed everything from my configuration where the phrase "return_temp" shows up, beside the definition in the userReading shown above. But still: as soon as I do a "get Mythz sGlobal" I get two events. Removing "return_temp" from the userReadings definition ends up in zero events of course.

Might this behavior be caused by the module itself? I tried going back from my current version 0.155 to 0.152 without success.

Yes, event-min-interval .*:1 solves the issue. But it would be much better to solve the root cause instead of putting a plaster on the result.

Any Idea?

BR Willy

edit:
related topic in Help-section (while DOIF turned out to be not the root cause meanwhile):  https://forum.fhem.de/index.php?topic=65327 (https://forum.fhem.de/index.php?topic=65327)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 29 Januar 2017, 19:48:19
do you see the duplicate for the userreading related to sGlobal or also for the one others (e.g. sHeatRecoveredDay)?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 29 Januar 2017, 21:05:08
I did a rough check for most of them now. It looks like the duplicates exist in the userReadings only, but not in single readings. This might mean that the issue is limited to "multi parameter readings" like sGlobal, sHC1, sDisplay etc., but does not exist in single parameter readings.
In detail:

userReadings which are logged show up twice in the log file and twice in the EventMonitor.

userReadings which are not logged show up  twice in EventMonitor (and of course not in the log file).

Others like get Mythz sHeatRecoveredDay, sElectrDHWDay, sElectrHCDay, sHeatDHWDay, sHeatHCDay are read directly by a get command, triggered by an "at" close to midnight. All of these are single parameter readings. Those are not affected from the issue, and show up once in EventMonitor.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 29 Januar 2017, 22:43:35
Hi willy
I update the all readings (with multiple or single parameters) with the same procedure.
I cannot reproduce your failure on my nas or on my mac.

related topic in Help-section (while DOIF turned out to be not the root cause meanwhile):  https://forum.fhem.de/index.php?topic=65327

I read the 3d and I do not understand why are so sure DOIF is not the connected to your problem.
If I have understood correctly, your issues is activated from a special formatting of DOIF.
I agree with Damian thet the 2 formatting "should" be equivalent, but unfortunatelly are not.

What happens if you modify sGlobal with setreading
setreading   Mythz sGlobal  outsideTemp: 1.5 flowTemp: 26.4 returnTemp: 24.2 hotGasTemp: 37.7 dhwTemp: 47.1 flowTempHC2: -60 evaporatorTemp: -1.5 condenserTemp: 25.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: 0 inputVentilatorPower: 0 mainVentilatorPower: 0 outputVentilatorSpeed: 0 inputVentilatorSpeed: 0 mainVentilatorSpeed: 0 outside_tempFiltered: 1.9 relHumidity: 0 dewPoint: 0 P_Nd: 4.87 P_Hd: 11.66 actualPower_Qc: 0.000 actualPower_Pel: 0.000 collectorTemp: -60 insideTemp: 27.6
Edit: I mean: do you get duplicated also from setreading?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 29 Januar 2017, 22:57:41
Is the 0.155 I'm using the latest version?

I have the same issue also for readings which are not at all related to the content of this DOIF. That's the reason why I said it's not related. But you're right. Formatting of this DOIF might work like a switch for something completely different - what does not really make the issue more understandable.

Modifying sGlobal with setreading leads to the same result: duplicates.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 29 Januar 2017, 23:05:54
Zitat von: willybauss am 29 Januar 2017, 22:57:41
Is the 0.155 I'm using the latest version?
yes

Zitat
I have the same issue also for readings which are not at all related to the content of this DOIF. That's the reason why I said it's not related. But you're right. Formatting of this DOIF might work like a switch for something completely different - what does not really make the issue more understandable.
:-X
Zitat
Modifying sGlobal with setreading leads to the same result: duplicates.
setreading is completely unrelated to my code (my code is not executed with it).
Theoretically if you define Mythz as a dummy, you should still see that setreading give you duplicates
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 29 Januar 2017, 23:24:37
So I should check other modules for duplicates as well  ???. Looks like a nightmare meanwhile. So, now I remember that a year or so ago I added a few event-min-interval's in other modules - maybe to avoid duplicates ...

I have to check; may take a while, since I'm VERY busy in the job currently.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 12 Februar 2017, 16:01:09
Hello immi,

Two more values for FW5.39:
0A0027 is max. flow temp HC1 ("Max. Vorlauftemp. HZ" (Heigrundeinstellungen))
0A0580 is p11DHWsetManualTemp

Both of them use type "5temp".
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 14 Februar 2017, 10:41:06
Zitat von: TheTrumpeter am 12 Februar 2017, 16:01:09
Hello immi,
Two more values for FW5.39:
0A0027 is max. flow temp HC1 ("Max. Vorlauftemp. HZ" (Heigrundeinstellungen))
0A0580 is p11DHWsetManualTemp
Both of them use type "5temp".

Hi Trumpeter
0A0580 is implemented since years; I do not understand

for 0A0027 it looks like also my older firmware is getting an answer, please check if it is plausible
0A0027-5A0A00270226
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 14 Februar 2017, 12:18:23
Sorry, I have overseen 0A0580 when parsing your code. (Cursor was below the line where it appears and I did not search in both directions.)

0A0027 does definitly work for my 5.39.
I changed it on the heatpump and read it in FHEM. The changed value is there in FHEM then.
Maybe it also works for other firmwares.

Zitat von: immi am 14 Februar 2017, 10:41:06
0A0027-5A0A00270226
I take 0x0226 as value. This is 550d and comes to 55,0°C.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 14 Februar 2017, 21:59:24
One more:

0A0180 is p36, DHWMaxTime. Unit "1clean" works for my FW5.39.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 Februar 2017, 00:42:34
Hi Trumpeter
ok  I will implement 0A0027 "5temp" and 0A0180 "1clean"
please suggest a name and an acceptable value range for both
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 15 Februar 2017, 09:33:12
Zitat von: immi am 15 Februar 2017, 00:42:34
0A0027 "5temp"
Range as per manual is 10-75°C.
Suggested name: p99HC1maxFlowTemp
Zitat von: immi am 15 Februar 2017, 00:42:34
0A0180 "1clean"
Range as per manual is 6-12h
Suggested name: p36DHWMaxTime

I'm still looking for some other readings/parameter, so there might be additional ones now and then.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 Februar 2017, 20:46:15
Zitat von: TheTrumpeter am 15 Februar 2017, 09:33:12
Range as per manual is 10-75°C.
Suggested name: p99HC1maxFlowTempRange as per manual is 6-12h
Suggested name: p36DHWMaxTime
done 0.156 committed
Zitat
I'm still looking for some other readings/parameter, so there might be additional ones now and then.
no problem, take yout time
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 15 Februar 2017, 21:29:41
Thanks.

Do you have an overview of all possible addresses/registers?
I think line 1489 gives more or less the possible registers starting with 0A, but what about any others?
I tried to read the first 256 starting with 0B, it returns a few new ones. How far to go there?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 16 Februar 2017, 11:28:05
Zitat von: TheTrumpeter am 15 Februar 2017, 21:29:41
Do you have an overview of all possible addresses/registers?
no
use with "0A", "0B" and "0C"
--
my @numbers = (1..65535);
....
my $cmd = "0A" . sprintf("%04X",  $indice);

--
pay attention that sometimes the heatpump stops reacting (for 1 or 2 seconds) if you you make too many requests too fast
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 16 Februar 2017, 13:15:03
OK thanks, that's what I already did for 0A when I then found out that line 1489 contains almost all the numbers of the registers that were responding.
Therefore I asked.

Zitat von: immi am 16 Februar 2017, 11:28:05
pay attention that sometimes the heatpump stops reacting (for 1 or 2 seconds) if you you make too many requests too fast
No response means, that some of the registers would be missing in the data.txt?

When I get "unknown request", the heatpump responds but does not give the data back. So these registers are not readable and could be skipped next time?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 16 Februar 2017, 15:02:42
Zitat von: TheTrumpeter am 16 Februar 2017, 13:15:03
OK thanks, that's what I already did for 0A when I then found out that line 1489 contains almost all the numbers of the registers that were responding.
Therefore I asked.
No response means, that some of the registers would be missing in the data.txt?
I do not remember exactly; I remember that I compared 2 runs  to be sure.
When I noticed different size of the files (more than 10%), I knew something got lost and I deleted the files.
Maybe with your newer tecalor, you do not have the issue.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 16 Februar 2017, 15:53:02
Well, maybe I try that then also.
I started a run on 0B just after lunch today; it stopped after only 24000 lines, but I do not know why.
Restarted it then, so I'll see when it stopps now.

One more point:
It seems that the run sometimes restarts itself just after it's already finished. Is that a wanted behaviour?
(I deactivated the line that deletes the data.txt, so it does not get deleted and I can stop the run when I see it was already finished for one time.)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 16 Februar 2017, 20:37:38
Zitat von: TheTrumpeter am 16 Februar 2017, 15:53:02
It seems that the run sometimes restarts itself just after it's already finished. Is that a wanted behaviour?
no.

the most reliable way to dump all register, is to wait 1 second in between;
but if you do it, it will take so long that you cannot compare the dump with the display, which has already changed.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 06 März 2017, 16:43:19
Another point... why is the lower limit for p04-p06 and p11 set to 14°C?
As per installation manual the lower limit is 10°C.

Same is for upper limit; it's set to 50°C although 55°C would be allowed as per manual.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 06 März 2017, 17:22:38
Zitat von: TheTrumpeter am 06 März 2017, 16:43:19
Another point... why is the lower limit for p04-p06 and p11 set to 14°C?
As per installation manual the lower limit is 10°C.
Same is for upper limit; it's set to 50°C although 55°C would be allowed as per manual.
I do not remember, why.
Please test them (change them in the code line 317...).
If it works, I will implement your proposal.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 06 März 2017, 21:03:19
Zitat von: immi am 06 März 2017, 17:22:38
If it works, I will implement your proposal.
Works with both 10°C and 55°C for all 4 parameters.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 07 März 2017, 22:46:37
Zitat von: TheTrumpeter am 06 März 2017, 21:03:19
Works with both 10°C and 55°C for all 4 parameters.
committed
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Kiteandy am 20 März 2017, 17:50:00
Hello,

I have a LWZ303i with Firmware 4.09 installed. Actually I am working for an implementation in Codesys with a WAGO CPU. The heatpump serial connection is connected to an internal RS232 interface of the WAGO CPU. During my work to try to implement the the communication I found your solution with fhem.
So after a few tries the connection is working fine. When I send 0x02 01 00 FC FB 10 03 followed by the acknowledgement comment 0x10 I get an reponse of "actual values" of the heatpump. All the "0xXF" commands are working fine. As far as I know is
- "02" : Starting command
- "01 00": Header for "get" ("01 80" for "send")
- "FC" : Checksum built by Header and command
- "FB" : Command
- "10 03": Footer

Now I am trying to get values like "operating mode". As far as I know the command is "0x0A 01 12".  Accoring to the previous configuration the sendstring must be "0x02 01 00 1E 0A 01 12 10 03". Unfortunately I get no response from the heatpump apart from just 0x10.

Maybe there is something wrong in my sendstring. But I don't know where?!
Please could someone help me to find the answer?

Best Regards
Andreas
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 März 2017, 20:25:05
Hallo andreas
-we are quite off-topic with fhem-
if you want to better understand the protocol, just start fhem with verbose 5

THZ_Get: Try to get 'pOpMode'
2017.03.20 20:13:02 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2017.03.20 20:13:02 5: SW: 02
2017.03.20 20:13:02 5: Mythz start Funktion THZ_ReadAnswer
2017.03.20 20:13:02 5: THZ_ReadAnswer: uc unpack: '10'
2017.03.20 20:13:02 5: SW: 01001E0A01121003
2017.03.20 20:13:02 5: Mythz start Funktion THZ_ReadAnswer
2017.03.20 20:13:02 5: THZ_ReadAnswer: uc unpack: '1002'
2017.03.20 20:13:02 5: SW: 10
2017.03.20 20:13:02 5: Mythz start Funktion THZ_ReadAnswer
2017.03.20 20:13:02 5: THZ_ReadAnswer: uc unpack: '0100290A01120B001003'
2017.03.20 20:13:02 5: SW: 10


send         02             
wait for    10
send         01001E0A01121003
wait for    10
wait for    02
send        10
wait for    0100290A01120B001003
send        10

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Kiteandy am 20 März 2017, 21:16:19
Hello immi,

thank you very much for your reply.
OK, the procedure was correct. I found a mistake in my checksum routine. Now the reply message is correct from what I get from the heatpump.

Best Regards
Andreas
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 17 April 2017, 13:13:24
Hello immi,

p49 is limited to 11°C at the lower end in FHEM, but the heatpump allows 10°C.
Could you fix that sometimes you do another change in the module?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 April 2017, 18:03:31
Zitat von: TheTrumpeter am 17 April 2017, 13:13:24
Hello immi,
p49 is limited to 11°C at the lower end in FHEM, but the heatpump allows 10°C.
Could you fix that sometimes you do another change in the module?
hope I do not forget it.
the next change should be to update the help in command-ref.
it would be great if someone would make a text proposal: both in engl. and german.
im module after line 1884
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 17 Mai 2017, 21:15:55
Hello immi,

I have just seen that p75 is restricted to 0-2 in FHEM, but it allows 0-4 in LWZ404SOL.
Can you please change that?
(Maybe togehter with p49 discussed earlier this year?)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 Mai 2017, 21:18:10
Hi
Are you using the attribute firmware 5.39?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 18 Mai 2017, 21:33:21
Yes, it's there.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 18 Mai 2017, 22:06:50
One more point as already announced:
Would you mind adding the signals "x40" and "x52" of sHC1 that are currently deactivated in your code at the end of sHC1 per default (or introduce a new attribute for it to activate it)?

I still do not know the content of these signals, but it drives me crazy to always have to modify your code after an update to activate them again  ;)

Same applies to "x84" of sGlobal although you say "do not touch" in your code. I do not want to touch it but just to monitor it...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 Mai 2017, 22:34:02
Hi TheTrumpeter
I uploaded your 2 improvements of p75 and p49
thanks for your suggestions.

---

for "x40" and "x52" of sHC1:
In the middle of HC1 noGO. Too many people are relying on the order of HC1.
I could consider adding at the end, if you find an interpretation for "x40" and "x52", and if many users accepts a small increase in their logfiles size.

"x84" of sGlobal:
I remember that I commented it out because some users experienced a crash each time it was read; I didn't check if I was reading outside the register.
Also here I could consider implementing it, if you find an interpretation for x84, and if many users accepts a small increase in their logfiles size.

immi 
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 19 Mai 2017, 09:37:48
Zitat von: immi am 18 Mai 2017, 22:34:02
In the middle of HC1 noGO. Too many people are relying on the order of HC1.
I could consider adding at the end, if you find an interpretation for "x40" and "x52", and if many users accepts a small increase in their logfiles size.
Of course only at the end; that's what I've initially written, maybe it was not clear enough.

Zitat von: immi am 18 Mai 2017, 22:34:02
"x84" of sGlobal:
I remember that I commented it out because some users experienced a crash each time it was read; I didn't check if I was reading outside the register.
I'm not 100% sure, but I think I've activated it some time ago and did not face any problem with it. I will check the log-files in the evening if it's there.

I do not know how much effort it would be to introduce a new attribute to activate or deactivate the output of "x"-parameters in the readings, but I feel that could be a good solution. It makes it easier for people who are looking for an interpretation of these values and would not bother people who do not want a minimal increase of logfile-size.

As an alternative you could introduce a new reading, "sDebug" (or something like that) which contains all the "x"-readings. But again I have no idea how much effort that would be.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 31 Mai 2017, 14:06:23
I still did not answer the point regarding x84 in older logs... I have it there in a log from January, seems that I activated it only for a very short time. Cannot remember any crash due to that.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 31 Mai 2017, 15:29:54
Zitat von: TheTrumpeter am 31 Mai 2017, 14:06:23
I still did not answer the point regarding x84 in older logs... I have it there in a log from January, seems that I activated it only for a very short time. Cannot remember any crash due to that.
The crash was coming in the case someone had an older tecalor. Register sGlobal is shorter for older tecalor and perl does not like when you look outside the variable.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 09 Juni 2017, 19:00:03
Hi immi,

my logfile shows frquent (3 ... 6 times per day) messages saying

Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?

This is not a new effect, I know it since years, and everything works fine. But from time to time I wonder if I can do something to avoid it. Is there a user accessible value to e.g. increase wait time?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 10 Juni 2017, 09:57:39
Zitat von: willybauss am 09 Juni 2017, 19:00:03
my logfile shows frquent (3 ... 6 times per day) messages saying
Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
This is not a new effect, I know it since years, and everything works fine. But from time to time I wonder if I can do something to avoid it. Is there a user accessible value to e.g. increase wait time?
Hi willy
since when do you have 6 of this logs per day? I have one per month.
is this increasing?
change following lines to get better logs
line 1068:   Log3 $hash->{NAME}, 3, "THZ_Get: Error msg2:  $err ---- $cmdHex2";
line 1080:   Log3 $hash->{NAME}, 3, "THZ_Get: Error msg3:  $err ---- $cmdHex3";

I see 2 ways:

1) I can make an attribute to remove the warning message from the logs (easy but it is just hiding the problem)
2) you can work on waittimes (I can hardcode it later): increase slowly (10% steps) and change only one at the time
- line 741:  $timedelay += 0.6;  this is the minimum waittime in seconds between 2 consequent scheduled readings; it prevents that the tecalor gets to busy e.g. by fhem start, then all register are read in sequence 
- line 1116: select(undef, undef, undef, 0.001); this is the minimum waittime in seconds between 2 consequent unscheduled readings
- line 1160: $buf = DevIo_SimpleReadWithTimeout($hash, 0.1) if(!defined($buf)) ; this is an additional waittime in seconds used in the comunication protocol of each reading.

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 10 Juni 2017, 14:14:41
Hi immi,

I don't think it's increasing. I believe I have these entries since 2 years or so. Normally I don't even check the logfile contents, as long as it stays small in monthly size. But currently I try to find the root cause, why my Homematic CUL stops working frequently; needs a 'reopen' then. I observed an approx. 70 ... 80% match of times tamps between CUL stop and these THZ entries. CUL stop happens approx. 2 ... 3 times per month. So I don't believe that CUL is root cause for THZ issue, but I think its the other way round - THZ issue might be cause for the CUL to stop working.

For that reason I wonder if increasing wait times may help. Is fhem blocked during these wait times? If yes, the CUL issue wouldn't be healed by increasing wait times further. I need to try it out. How long may these wait times be - few seconds?

As I understand, the message tells me that Mythz sends a request to the THZ, and the answer doesn't come in expected time frame, right? What can I do to have the THZ's answer earlier? Nothing I guess, right? I have a serial connection with approx. 4 - 5m cable. The cable ends in a serial-USB converter. The converter is plugged into an USB hub, directly connected to RaspberryPi's USB port.

Since the CUL issue happens very rarely we shouldn't expect an answer within weeks. We need to think in months though. I'll let you know as soon as I have any answers.

Thanks so far. Have a nice weekend.
Willy
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 10 Juni 2017, 23:12:21
Zitat von: willybauss am 10 Juni 2017, 14:14:41
Hi immi,
I don't think it's increasing. I believe I have these entries since 2 years or so. Normally I don't even check the logfile contents, as long as it stays small in monthly size. But currently I try to find the root cause, why my Homematic CUL stops working frequently; needs a 'reopen' then. I observed an approx. 70 ... 80% match of times tamps between CUL stop and these THZ entries. CUL stop happens approx. 2 ... 3 times per month. So I don't believe that CUL is root cause for THZ issue, but I think its the other way round - THZ issue might be cause for the CUL to stop working.
I have not changed anything in the protocoll since 1 year or more. Look since when do you have problems with CUL.

Zitat
What can I do to have the THZ's answer earlier? Nothing I guess, right?
nothing

Zitat
For that reason I wonder if increasing wait times may help. Is fhem blocked during these wait times?
timedelay in line 741 is not blocking fhem
timedelay in line 1116 is  blocking fhem (but 1 ms is not a problem)
timedelay in line  1159 and 1160 are  slowing down fhem only if there is a problem in the comunication

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 11 Juni 2017, 11:04:38
Zitat von: immi am 10 Juni 2017, 23:12:21
Look since when do you have problems with CUL.
Since I installed the CUL - approx. a year after Mythz.

I'll keep you informed, but it may take months, as I said.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 17 Juni 2017, 23:33:43
After having changed the code lines as you suggested the logs show:

2017.06.17 18:54:03 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2017.06.17 18:54:03 3: THZ_Get: Error msg2:  InterfaceNotRespondig error found at step1 ---- 0100320A091E1003
2017.06.17 18:54:04 3: THZ_Get: Error msg2:  CRC error in request ---- 0100D10A05C11003
2017.06.17 18:54:25 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2017.06.17 18:54:26 3: THZ_Get: Error msg2:  InterfaceNotRespondig error found at step1 ---- 0100A00B14801003
2017.06.17 18:54:42 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2017.06.17 18:54:42 3: THZ_Get: Error msg3:  InterfaceNotRespondig error found at step1 ---- 0100410A092D1003
2017.06.17 18:54:42 3: THZ_Get: Error msg2:  new unknown answer  ---- 0100980A05881003
2017.06.17 18:54:59 3: THZ_Get: Error msg2:  CRC error in request ---- 0100910A05811003
2017.06.17 18:55:15 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2017.06.17 18:55:15 3: THZ_Get: Error msg2:  InterfaceNotRespondig error found at step1 ---- 0100430A17211003
2017.06.17 18:55:23 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2017.06.17 18:55:23 3: THZ_Get: Error msg2:  InterfaceNotRespondig error found at step1 ---- 01007A0B05691003
2017.06.17 18:55:23 3: THZ_Get: Error msg2:  new unknown answer  ---- 0100830A17611003
2017.06.17 18:55:30 3: THZ_Get: Error msg2:  CRC error in request ---- 0100630C15411003
2017.06.17 18:55:32 3: Mythz NAK!!
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 Juni 2017, 16:36:57
I uploaded v0.160
-improved logging
-reduced blockingtime by NAK

Hi Willy
keep on monitoring, the logging should be more clear now, share futher logs
- InterfaceNotRespondig: your tecalor has ignored the request
- NAK: your tecalor has refused the request becase doing something else (e.g. busy with canbus or with slow eprom or...)
- CRC error in request: your tecalor received a request with a bad crc. (bitkipper) Could be a frequency issue in the serial port or EMV/EMC.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 21 Juni 2017, 21:54:45
Hello immi,

I found another value; it contains the total amout of heat from active-cooling:
"sCoolHCTotal"                => {cmd2=>"0A0648", cmd3=>"0A0649",     type =>"1clean", unit =>" kWh"},

Currently my THZ only has a value in 0A0648, but I assume it will be 2 bytes as all the other heat-counters.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 22 Juni 2017, 20:10:21
Hello immi,

Some more:

sets:
0B0287 is "Kühlbetrieb HK1", it's only one bit. If it's 1, then cooling is enabled, 0 is disabled.
0B0582 is "HK Temp. kühlen", it's in °C, divide the raw value by 10, then you get the physical value, ex. 0x00AF is 175d which is 17,5°C.
0B0583 is "Hyst. Vorlauftemp kühlen", it's in K, divide the raw value by 10, then you get the physical value.
0B0584 is "HK1 Raumtemperatur Hysterese",  it's in K, divide the raw value by 10, then you get the physical value.

gets:
0B0264 is the "dewpoint of HC1", it's in °C, divide the raw value by 10, then you get the physical value
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 24 Juni 2017, 23:01:38
I will have a look
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 25 Juni 2017, 21:19:33
Zitat von: immi am 18 Juni 2017, 16:36:57
Hi Willy
keep on monitoring ...
Yesterday's log, filtered for THZ related issues:

2017.06.24 00:17:34 3: THZ_Get: Error msg2:  decode: CRC error in request -- 0A0176 -> 01020D0A1003
2017.06.24 00:32:34 3: THZ_Get: Error msg2:  decode: CRC error in request -- 0A0176 -> 01020D0A1003
2017.06.24 02:49:36 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step2 -- 0A0176 ->
2017.06.24 04:44:36 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0A0176 ->
2017.06.24 04:44:49 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
2017.06.24 06:35:44 3: THZ_Get: Error msg2:  decode: new unknown answer  -- F4 -> 0101F6F41003
2017.06.24 06:44:36 3: THZ_Get: Error msg2:  decode: new unknown answer  -- 0A0176 -> 01010C0A1003
2017.06.24 08:25:44 3: THZ_Get: Error msg2:  decode: CRC error in request -- F4 -> 0102E7E41003
2017.06.24 08:52:35 1: /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0 disconnected, waiting to reappear (Mythz)
2017.06.24 08:52:37 3: Setting Mythz serial parameters to 115200,8,N,1
2017.06.24 08:52:37 1: /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0 reappeared (Mythz)
2017.06.24 08:53:22 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step2 -- 0A092C ->
2017.06.24 08:53:23 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A05B8 ->
2017.06.24 08:53:40 3: THZ_Get: Error msg2:  decode: new unknown answer  -- 0A0581 -> 01010C0A1003
2017.06.24 08:53:49 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0A17A2 ->
2017.06.24 09:43:29 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
2017.06.24 09:45:14 3: THZ_Get: Error msg2:   THZ_Get_Com: error found at step1  NAK!!  -- 0A0176 -> 15
2017.06.24 11:18:29 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
2017.06.24 12:44:15 3: THZ_Get: Error msg2:  decode: CRC error in request -- 0A0176 -> 01020D0A1003
2017.06.24 15:48:30 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
2017.06.24 16:15:15 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step2 -- 0A0176 ->
2017.06.24 17:54:15 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0A0176 ->
2017.06.24 18:07:15 3: THZ_Get: Error msg2:  decode: CRC error in request -- 0A0176 -> 01020D0A1003
2017.06.24 18:35:15 3: THZ_Get: Error msg2:  decode: CRC error in request -- 0A0176 -> 01020D0A1003
2017.06.24 22:40:15 3: THZ_Get: Error msg2:  decode: new unknown answer  -- 0A0176 -> 01010C0A1003
2017.06.24 23:18:30 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
2017.06.24 23:49:15 3: THZ_Get: Error msg2:  decode: CRC error in request -- 0A0176 -> 01020D0A1003
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 26 Juni 2017, 10:30:02
Hi immi,

sometimes I also have timouts when reading data from THZ. I have checked all logfiles of the last 2 years.
In the average there are about 60 timeouts per day, which is 5-6% of the schedued readings. Most of them are errors in step0 and step1.
In order to understand the timing of the communication better, I inserted an additional loop into the function THZ_ReadAnswer.

        my $buf;
        my $cnt = 0;
        #$buf = DevIo_SimpleReadWithTimeout($hash, 0.25) if(!defined($buf)) ; #added for Karl Antwort msg468515
        while (!defined($buf) and ($cnt < 400)) {
          $buf = DevIo_SimpleReadWithTimeout($hash, 0.001);
          $cnt ++;
        }
        Log3($hash, 5, "THZ_ReadAnswer: $cnt ms");

So I can measure the time for the reading process.  Usualy the THZ responds in less than 10ms. But sometimes I got timeouts after 400ms.
At the moment I observe the behavior. I'll come back...
Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 26 Juni 2017, 13:28:17
Zitat von: andre.k am 26 Juni 2017, 10:30:02
So I can measure the time for the reading process.  Usualy the THZ responds in less than 10ms. But sometimes I got timeouts after 400ms.
Hi Andre
I made a similar statistics 1 year ago. I have in mind following distribution
95% under 15ms 
4,95% up to 30ms.
0.05% no answer.

please keep me updated for your distribution above 400ms; We need to find a threshold to differentiate between no answer and slow answer.
The lower the threshold, the better the performance of fhem.
for this investigation please use in your while loop DevIo_SimpleReadWithTimeout($hash, 0.005);



Hi Willy
I see 3 cases for you: 0101, 0102 or no answer:

let us take tecalor answers 1002 CRC error in request -- F4 -> 0102E7E41003
you ask to read F4  and your tecalor understend E4 (bitkipper)
I have no idea why your tecalor gets a wrong bit ; maybe your should shield your serial data line, make it shorter or change the USB-Serial_Controller

0101 is even more interesting  0A0581 -> 01010C0A1003, I do not know what does 0101(hex) mean for tecalor
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 27 Juni 2017, 17:37:53
Hi immi,

sometimes after timeout I got a log entry like this2017.06.25 13:16:21 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step2 -- F3 ->
2017.06.25 13:16:25 2: myWP/RAW: 02
2
This RAW: 02 comes probably from funktion THZ_Read. These subroutine is never called from the module THZ self. Do you now when and from where the sub THZ_Read is called?
Second, only for advise :) Could you clean up the old Log calls and replace with the new Log3 calls (see topic https://forum.fhem.de/index.php/topic,14341.0/all.html (https://forum.fhem.de/index.php/topic,14341.0/all.html)). We don't need the old loglevel stuff ($115, GetLogLevel...)

Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 28 Juni 2017, 07:49:11
Zitat von: andre.k am 27 Juni 2017, 17:37:53
sometimes after timeout I got a log entry like this2017.06.25 13:16:21 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step2 -- F3 ->
2017.06.25 13:16:25 2: myWP/RAW: 02
2
This RAW: 02 comes probably from funktion THZ_Read. These subroutine is never called from the module THZ self. Do you now when and from where the sub THZ_Read is called?
Hi Andre
THZ_Read should watch the tecalor outside the comunication time frame. e.g if the tecalor start to send something without beeing asked. It never happened to me.
In your case something else happened. The timeout in THZ_ReadAnswer was reached and when the tecalor finally send the 02 was too late. THZ_Read collected the garbage.  Do not trust 13:16:21 and 13:16:25. I do not think that your tecalor needed 4 seconds to answer.
It is important to find a threshold to differentiate between no answer and slow answer.

Zitat
Second, only for advise :) Could you clean up the old Log calls and replace with the new Log3 calls (see topic https://forum.fhem.de/index.php/topic,14341.0/all.html (https://forum.fhem.de/index.php/topic,14341.0/all.html)). We don't need the old loglevel stuff ($115, GetLogLevel...)
Ok.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 29 Juni 2017, 20:36:07
Zitat von: immi am 26 Juni 2017, 13:28:17
Hi Willy
I see 3 cases for you: 0101, 0102 or no answer:
... maybe your should shield your serial data line, make it shorter or change the USB-Serial_Controller

OK. Sounds like a project for next winter or bad weather period. Currently I have different projects in garden etc.
Thanks for the hints.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 01 Juli 2017, 21:27:13
Zitat von: TheTrumpeter am 22 Juni 2017, 20:10:21
sets:
0B0287 is "Kühlbetrieb HK1", it's only one bit. If it's 1, then cooling is enabled, 0 is disabled.
0B0582 is "HK Temp. kühlen", it's in °C, divide the raw value by 10, then you get the physical value, ex. 0x00AF is 175d which is 17,5°C.
0B0583 is "Hyst. Vorlauftemp kühlen", it's in K, divide the raw value by 10, then you get the physical value.
0B0584 is "HK1 Raumtemperatur Hysterese",  it's in K, divide the raw value by 10, then you get the physical value.
gets:
0B0264 is the "dewpoint of HC1", it's in °C, divide the raw value by 10, then you get the physical value
Hi TheTrumpeter
I tested on my tecalor

0A0648, 0A0649, 0B0264 --> UNKNOWN REQUEST
0B0287-950B02870000
0B0582-650B058200D2
0B0583-A30B0583000F
0B0584-A40B0584000F

it does not make lots of sense on my tecalor which has no cooling.
Nevertheless, I can add them to the list of 5.39 specialities.
Please make a proposal like you did for 
"sCoolHCTotal"   => {cmd2=>"0A0648", cmd3=>"0A0649",     type =>"1clean", unit =>" kWh"},
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 02 Juli 2017, 20:08:44
Zitat von: immi am 01 Juli 2017, 21:27:13
Please make a proposal
0B0287 : p99CoolingHC1Switch, "on" sets it 0x0001 and "off" sets 0x0000
0B0582 : p99CoolingHC1SetTemp
0B0583 : p99CoolingHC1HystersisFlowTemp
0B0584 : p99CoolingHC1HystersisRoomTemp
0B0264 : sDewPointHC1

Thanks for your support in continuously improving the module.

PS: I feel the same parameters for HC2 are right after 0B0584, but as I have no HC2 I did not elaborate it.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 03 Juli 2017, 20:13:12
I committed v0.161
-speed up of initialization: your fhem start time will decrease of 5 seconds (depending on your hardware and config)
-added all new registers discovered by  TheTrumpeter (availabe only as 5.39 specialitiy)

Hi TheTrumpeter
please check the implementation, especially the range in which the register can be changed.

Zitat von: TheTrumpeter am 02 Juli 2017, 20:08:44
PS: I feel the same parameters for HC2 are right after 0B0584, but as I have no HC2 I did not elaborate it.
normally HC2 registers are in 0C0xxx

p.s. A short description of what the register does can be also helpfull for other 5.39 users
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 03 Juli 2017, 21:24:40
Zitat von: immi am 03 Juli 2017, 20:13:12
Hi TheTrumpeter
please check the implementation, especially the range in which the register can be changed.
p99HC1CoolingSetTemp is possible from 10-30°C, you've limited it to 15-27°C. That's not a big issue as I do not feel anybody would use values outside the range allowed by you.
p99HC1CoolingHysteresisFlowTemp lower limit is 0.5K, not 0K. Upper limit is fine with 5K
p99HC1CoolingHysteresisRoomTemp lower limit is 0.5K, not 0K. Upper limit is only 3K, not 5K

Zitat von: immi am 03 Juli 2017, 20:13:12
p.s. A short description of what the register does can be also helpfull for other 5.39 users
p99CoolingHC1Switch: enables or disables whether cooling-mode is permitted for HC1 or not.
p99CoolingHC1SetTemp: set temp for cooling-mode of HC1. When HC1-temp exceeds SetTemp+HysteresisFlowTemp, compressor will start. When HC1-temp drops below SetTemp-HysteresisFlowTemp, compressor will stop. Lower end shall be reached before FlowTemp drops below dewpoint+offset (default 2K, could be changed by StiebelEltron with service-laptop). Otherwise compressor will be switched-off and restarted just after p47.
p99CoolingHC1HystersisFlowTemp: see above
p99CoolingHC1HystersisRoomTemp: cooling-mode will be released when room-temp is above SetTemp+Hysteresis and will be stopped when room-temp is below SetTemp-Hysteresis (see manual)
sDewPointHC1: calculated DewPoint based on temperature and relative humidity at display.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 05 Juli 2017, 21:21:47
Zitat von: immi am 03 Juli 2017, 20:13:12
please check the implementation
One point I do not understand...
I modified the 00_THZ-module before the update to introduce the reading sDewPointHC1. I also added the attribute interval_sDewPointHC1.
Then the reading got stored into Mythz.log.

As you did not introduce the attribute for continuously update, I did it with a notify:
defmod Mythz.GetDewPoint notify Mythz:sGlobal:.* get Mythz sDewPointHC1

The reading got updated whenever sGlobal got updated, but it was never stored into Mythz.log.
Mythz.log is defined as
Zitatdefmod FileLog_Mythz FileLog ./log/Mythz-%Y-%m.log Mythz

I do not know the reason for that.
For example I get the readings for energy-consuption with an "at". These values are stored properly.

Any idea about that?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 06 Juli 2017, 09:34:20
Zitat von: TheTrumpeter am 05 Juli 2017, 21:21:47
The reading got updated whenever sGlobal got updated, but it was never stored into Mythz.log.
As far as I remember notify does not trigger logs ("at" generates logs). Maybe they added a special attribute in the meanwhile for notify
Not sure.  look in the forum under "notify"
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 06 Juli 2017, 12:25:22
Zitat von: immi am 06 Juli 2017, 09:34:20
As far as I remember notify does not trigger logs ("at" generates logs). Maybe they added a special attribute in the meanwhile for notify
Not sure. 
I already had a look into command-ref and could not find any hint regarding that.

Thanks anyway, I'll try the forum.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 06 Juli 2017, 18:23:50
Zitat von: TheTrumpeter am 05 Juli 2017, 21:21:47
defmod Mythz.GetDewPoint notify Mythz:sGlobal:.* get Mythz
Is it a typo ordentlich did your really use defmod instand of define?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 06 Juli 2017, 19:59:06
Zitat von: willybauss am 06 Juli 2017, 18:23:50
Is it a typo ordentlich did your really use defmod instand of define?
I used "define" when defining it. Later I used "raw definition" to copy the definition into this forum.
I reads out the values properly whenever sGlobal is updated, but it's not stored into file-log.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 07 Juli 2017, 23:12:37
Zitat von: immi am 28 Juni 2017, 07:49:11
Do not trust 13:16:21 and 13:16:25. I do not think that your tecalor needed 4 seconds to answer.
It is important to find a threshold to differentiate between no answer and slow answer.

Hi immi,
I'm pretty sure my THZ sometimes takes more than 5 seconds for an answer. (I've traced the serial communication in the ser2net server)
Even when I've increased the time in my reading loop to 10 seconds I got timeouts. This is definitly too long, in production I would not go over 500ms. To solve the timeout problem I see some options:
A) just ignore the timeouts
B) a modification in THZ_Get_Communication to restart the communication (step0: resend STX). I'm already testing.
C) reschedule the THZ_GetRefresh for the timed out Get

What do you think?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 08 Juli 2017, 09:01:41
Zitat von: andre.k am 07 Juli 2017, 23:12:37
Hi immi,
I'm pretty sure my THZ sometimes takes more than 5 seconds for an answer. (I've traced the serial communication in the ser2net server) Even when I've increased the time in my reading loop to 10 seconds I got timeouts.
10 seconds to reply, your heatbunp is very busy :)
Zitat
This is definitly too long, in production I would not go over 500ms.
completely agree
Zitat
To solve the timeout problem I see some options:
A) just ignore the timeouts
B) a modification in THZ_Get_Communication to restart the communication (step0: resend STX). I'm already testing.
C) reschedule the THZ_GetRefresh for the timed out Get
A and C are easy.
B would be more elegant;

In both A and B, how can we tell the heatpump that we want to stop the comunication (with ETX or EOT, see ascii table)?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 08 Juli 2017, 14:21:30
2 more paramters:

0A05B3: called "EINFRIERSCHUTZ NE" in German manual, divide raw-value by 10 to get °C. Allowed range: 10-30°C, suggested name "p99defrostfreezeprotectionbooster"
0A05B4: called "ABTAUABBR." in German manual, divide raw-value by 10 to get °C. Allowed range: 0-20°C, suggested name "p99defrostcancellation"
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 09 Juli 2017, 13:42:35
Zitat von: immi am 08 Juli 2017, 09:01:41
In both A and B, how can we tell the heatpump that we want to stop the comunication (with ETX or EOT, see ascii table)?
Thats a good question. I have no idea how we can stop a current communication, but we can start a new communication. We can send STX (02) and if the headpump is not yet ready it will send a NAK (15). Then wait and send 02 again until 10 is received.
sub THZ_Get_Comunication($$) {
  my ($hash, $cmdHex) = @_;
  my ($err, $msg) =("", " ");
  Log3 $hash->{NAME}, 5, "THZ_Get_Comunication: Check if port is open. State = '($hash->{STATE})'";
  if (!(($hash->{STATE}) eq "opened"))  { return("closed connection", "");}
 
  #slow down for old firmwares
  select(undef, undef, undef, 0.25) if (AttrVal($hash->{NAME}, "firmware" , "4.39")  =~ /^2/ );
  select(undef, undef, undef, 0.001);

  my $cnt = 1;
  my $cntmax = 5;
  my $success = 0;

  do {{
THZ_Write($hash,  "02"); # step0 --> STX start of text
($err, $msg) = THZ_ReadAnswer($hash); # read 10
if ($msg ne "10") {
if (!defined($err)) { # no timeout
if ($msg eq "15") { # received NAK?
select(undef, undef, undef, 0.5);
$err = "NAK";
} else {
$err = "UNKNOWN";
}
}
Log3 $hash, 5,  "THZ_Get_Com: step0 ($cnt) ($msg):".$err;
next;
}
Log3 $hash, 5,  "THZ_Get_Com: step0 ($cnt) ($msg)";
THZ_Write($hash,  $cmdHex); # step1 --> send request
($err, $msg) = THZ_ReadAnswer($hash); # read 10
if ($msg ne "10") {
if (!defined($err)) { # no timeout
if ($msg eq "15") { # received NAK?
select(undef, undef, undef, 0.5);
$err = "NAK";
} else {
$err = "UNKNOWN";
}
}
Log3 $hash, 5,  "THZ_Get_Com: step1 ($cnt) ($msg):".$err;
next;
}
($err, $msg) = THZ_ReadAnswer($hash); # read 02
$success = 1 if ($msg eq "02");
Log3 $hash, 5,  "THZ_Get_Com: step1 ($cnt) ($msg):".$err;
  }}
  until ($success or ($cnt ++ == $cntmax)); # step1 <-- STX start of text
 
  if ((defined($err)))  {
return("THZ_Get_Com: error step1 $err", $msg);
  }

  THZ_Write($hash,  "10");     # step2 --> DLE data link escape  // ack datatranfer
  ($err, $msg) = THZ_ReadAnswer($hash); # receive data from heatpump
  THZ_Write($hash,  "10");  # --> DLE
 
  if ((defined($err)))  {
    return("THZ_Get_Com: error step2 $err", $msg);
  }
  else  {
    return(THZ_decode($msg)); #clean up and remove footer and header
  }
}
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 09 Juli 2017, 16:26:33
Zitat von: andre.k am 09 Juli 2017, 13:42:35
Thats a good question. I have no idea how we can stop a current communication, but we can start a new communication. We can send STX (02) and if the headpump is not yet ready it will send a NAK (15). Then wait and send 02 again until 10 is received.
I cannot test it because i do not have the problem.
Nevertheless I expect that
1) the heatpump is not multitasking
2) if the heatpump is so busy, that it answers after 2 seconds, sending a second STX  after 0.5 seconds makes only think worse.

can you test your proposed code sending a ETX or EOT after 0.5 seconds?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 09 Juli 2017, 22:23:24
Zitat von: immi am 09 Juli 2017, 16:26:33
1) the heatpump is not multitasking
2) if the heatpump is so busy, that it answers after 2 seconds, sending a second STX  after 0.5 seconds makes only think worse.
can you test your proposed code sending a ETX or EOT after 0.5 seconds?
Other control chars than 0x02 are not responded from heatpump. So I think there is no way to tell the headpump we want to stop the communication. The only (known) handshake is sending 0x02 and wait for the answer 0x10.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 10 Juli 2017, 15:27:54
Information about active "cooling" is part of sDisplay-message, just add ", ["Cooling: ", 11, 1, "bit3", 1]" at the end of

  "0A0176Dis" => [[" switchingProg: ", 11, 1, "bit0", 1],  [" compressor: ", 11, 1, "bit1", 1],
      [" heatingHC: ", 11, 1, "bit2", 1],  [" heatingDHW: ", 10, 1, "bit0", 1],
      [" boosterHC: ", 10, 1, "bit1", 1],  [" filterBoth: ", 9, 1, "bit0", 1],
      [" ventStage: ", 9, 1, "bit1", 1],  [" pumpHC: ", 9, 1, "bit2", 1],
      [" defrost: ", 9, 1, "bit3", 1],  [" filterUp: ", 8, 1, "bit0", 1],
      [" filterDown: ", 8, 1, "bit1", 1][color=red][b]
],
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 10 Juli 2017, 17:54:40
v 0.163 uploaded
- all registers found from TheTrumpeter implemented
- moduleinfo compatibility added

fyi please read here https://forum.fhem.de/index.php/topic,73980.15.html
you can disable sending automatically statistics  (optional)
attr global sendStatistics manually
you can check which statistics are planned to be send to fhem.de without sending them
fheminfo
you can send statistics manually to fhem.de  (optional)
fheminfo send

e.g. in my case, i send following to fhem.de
THZ   4.39t04.39HW74SW2.08   
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 10 Juli 2017, 22:22:45
Hi immi,

could you please delete the following line
"sLast10errors" => {cmd2=>"D1", type =>"D1last206", unit =>""},
from %getsonly2xx.

This register 0xD1is not implemented in my firmware 2.14, but probably in 2.06. The line is already in %getsonly206, it should be OK for other 2.06 users.

Concerning my timeout issues I'm about to do some more tests. It could be helpful if we have different timeouts, depending if we wait for an answer from heatpump DLE 0x10 or STX 0x02. DLE is very quick (about 10ms). STX is up to 7700ms in some rare cases.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: philipp_b am 27 Juli 2017, 13:45:50
Hallo Zusammen,

ich bin noch neu bei FHEM und bin auch mit dem Wiki und Anfänger Tips überfordert :(

ich möchte gerne per (Loxone HTTP Befehle) Web Befehl die Volumenströme meiner LWZ504 ändern, aber ich weiß nicht wie ich das definieren muss in FHEM.

Nach dem Beispiel kann ich die Lüfterstufen ändern, aber ich weiß nicht wie man das abändern muss damit ich die Volumenströme einstellen kann.

kann mir da jemand Helfen Bitte?

Gruß
Philipp
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 27 Juli 2017, 14:45:23
Zitat von: philipp_b am 27 Juli 2017, 13:45:50
ich möchte gerne per (Loxone HTTP Befehle) Web Befehl die Volumenströme meiner LWZ504 ändern, aber ich weiß nicht wie ich das definieren muss in FHEM.
Nach dem Beispiel kann ich die Lüfterstufen ändern, aber ich weiß nicht wie man das abändern muss damit ich die Volumenströme einstellen kann.
Hi philipp
no idea how loxone works. If you can change p07FanStageDay, then you should be able to change also
"p37Fanstage1AirflowInlet"  "p38Fanstage2AirflowInlet"     "p39Fanstage3AirflowInlet"     "p40Fanstage1AirflowOutlet"     "p41Fanstage2AirflowOutlet" "p42Fanstage3AirflowOutlet"



Hi Andre
sorry I forgot your request, I will committ it this night
edit: upload done
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: philipp_b am 29 Juli 2017, 11:46:59
Vielen Dank, die loxone kann einfache http Befehle senden wie ich es über den webbrowser machen kann.

Da ist mir aufgefallen, dass ich über fhem bei meiner lwz504 die Abluft der Stufe 1 mit minimal 50m3 aber am Geräte Display bis 10m3 einstellen kann. Liegt das am THZ Modul oder kann man  das ändern?
Möchte gerne mir selber eine passivkühlung bauen.

Gruß
Philipp
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 29 Juli 2017, 12:37:50
Zitat von: philipp_b am 29 Juli 2017, 11:46:59
Da ist mir aufgefallen, dass ich über fhem bei meiner lwz504 die Abluft der Stufe 1 mit minimal 50m3 aber am Geräte Display bis 10m3 einstellen kann. Liegt das am THZ Modul oder kann man  das ändern?
Ist im THZ Modul so vorgegeben.
Auch wenn Du am Display der 504er 10m³ einstellen kannst, wird der Wert wirklich übernommen bzw. was steht denn in der Anleitung als Minimalluftstrom?
Ich kann bei meiner 404er am Display teilweise 50m³ einstellen, aber übernommen wird das dann nicht, sondern 80m³, weil das der Mindestvolumenstrom ist.
Zitat von: philipp_b am 29 Juli 2017, 11:46:59Möchte gerne mir selber eine passivkühlung bauen.
Warum verwendest Du nicht die vorhandene Passivkühlungsfunktion?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 29 Juli 2017, 12:43:35
Zitat von: TheTrumpeter am 02 Juli 2017, 20:08:44
0B0264 : sDewPointHC1
immi, would you be so kind and also add the following when you change the module next time?
                    ."interval_sDewPointHC1:0,60,120,180,300 "
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: philipp_b am 29 Juli 2017, 12:54:38
Die passivkühlung ist mir zu unflexibel, soweit ich verstanden habe wird jeden tag neu die Bedingung der Außentemperatur + 3 grad der Rauminnentemperatur - 3 grad abgefragt. Da ich aber keinen Fühler an der wp angeschlossen habe muss ich mit HK1 Raumtemperatur arbeiten, die bei mir aber im Sommer bei 14 Grad steht, weil sonst die wp ständig anfängt zu läuft...
So würde dann die passivkühlung nie aktiviert.
Zum testen hab ich die Raumtemperatur hochgesetzt, aber bei aktiver passivkühlung wird die Zuluft zu hoch gefahren, so dass sie uns dann zu laut ist.

Die Hz Zahl habe ich nicht kontrolliert, aber die 10m3 werden angenommen  und stehen dann auch in den Einstellungen.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 29 Juli 2017, 13:47:20
Zitat von: philipp_b am 29 Juli 2017, 12:54:38
Die passivkühlung ist mir zu unflexibel, soweit ich verstanden habe wird jeden tag neu die Bedingung der Außentemperatur + 3 grad der Rauminnentemperatur - 3 grad abgefragt.
Das ist richtig.
Die Passivkühlung bringt ohnehin sehr wenig. Ich habe meine Experimente damit mittlerweile wieder ad acta gelegt.

Zitat von: philipp_b am 29 Juli 2017, 12:54:38
Da ich aber keinen Fühler an der wp angeschlossen habe muss ich mit HK1 Raumtemperatur arbeiten, die bei mir aber im Sommer bei 14 Grad steht, weil sonst die wp ständig anfängt zu läuft...
Gehört zwar nicht hierher, aber: Dann hast Du irgendwas in den Heizparametern gröber falsch eingestellt. Die gefilterte Aussentemperatur fällt bei mir schon den ganzen Sommer über kaum unter 20°C. Da wird nie in den Winterbetrieb geschalten. Kontrollier' mal die Parameter; was Du machst ist ein schlechter Workaround anstatt das Problem wirklich zu lösen.

Zitat von: philipp_b am 29 Juli 2017, 12:54:38
Zum testen hab ich die Raumtemperatur hochgesetzt, aber bei aktiver passivkühlung wird die Zuluft zu hoch gefahren, so dass sie uns dann zu laut ist.
Wenn Du den Parameter Passivkühlung auf "Zulüften" hast, wird die Abluft abgeschaltet und die Zuluft hochgefahren. Diese Einstellung kannst Du aber komplett vergessen, das bringt keinerlei Kühleffekt. Lies dazu meine Untersuchungen mit einem kalibrierten Temperaturfühler an den Lüftungsdüsen.
Du musst den Passivkühlungs-Paramter auf "Ablüften" einstellen, dann funktioniert das genau umgekehrt. Durch die geöffneten Fenster in den Zulufträumen saugst Du die kühle Luft ins Haus.
Der Unterschied bzgl. Luftstrom durch die Fenster ist bei geöffneten Fenstern ggü. deaktivierter Passivkühlung durchaus fühlbar. Allzuviel Unterschied in der resultierenden Raumluft macht es aber nicht.

Zitat von: philipp_b am 29 Juli 2017, 12:54:38
Die Hz Zahl habe ich nicht kontrolliert, aber die 10m3 werden angenommen  und stehen dann auch in den Einstellungen.
Würd' mich interessieren, ob das wirklich funktioniert.
Was sagt die Bedienungsanleitung zum Mindestvolumenstrom?

120m³ sind bei mir gute 20Hz; viel weniger Drehzahl wird überhaupt keinen Druck und damit keinen Luftstrom mehr erzeugen können, deshalb wohl die untere Beschränkung auf 80m³ bei der 404. Würde mich wundern, wenn das bei der 504er anders wäre. Die Physik dahinter ist doch ähnlich.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 30 Juli 2017, 15:43:37
Zitat von: TheTrumpeter am 29 Juli 2017, 12:43:35
immi, would you be so kind and also add the following when you change the module next time?
                    ."interval_sDewPointHC1:0,60,120,180,300 "
done
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 31 Juli 2017, 13:48:05
Dear all
short explanation on the statistics
partecipation to the statistics is optional; expnained here https://forum.fhem.de/index.php/topic,33211.msg657982.html#msg657982
Privacy is very important for me therefore, I want to give complete transparency to what it is happening in the background.

up to now, following data has been collected,which you can find here
https://fhem.de/stats/statistics.html

Model variety for THZ
Model                                  # of installations   
4.39t04.39HW74SW2.08          1   
5.39_05.39HW113SW3.16     1   
n.a._04.19HW73SW2.08           1   
n.a._04.39HW74SW2.08           2   
n.a._05.19HW113SW3.12          1


explanation
4.39t    //   04.39 //    HW74SW2.08   
optional_firmware_attribute // sFirmware // sFirmware-Id
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 03 August 2017, 22:34:18
Zitat von: immi am 27 Juli 2017, 14:45:23
Hi Andre
sorry I forgot your request, I will committ it this night
edit: upload done
immi
Hi immi,
no problem.

In the meantime I've tested the nonblocking feature for the THZ_Get function, as you already started. This could be a solution for the timeout issues in old firmware. I think this can be generaly useful to make the modul more responsive.

1. I added a new attribute to switch nonblocking on/off
        ."nonblocking:0,1 "

2. some modifications in THZ_GetRefresh. If the attribute nonblocking is set to 1 then the new GetNB function is called in background. Otherwise the normal THZ_Get is called in foreground.

sub THZ_GetRefresh($) {
  my ($par)=@_;
  my $hash=$par->{hash};
  my $command=$par->{command};   
  my $name =$hash->{NAME};
  my $interval = AttrVal($hash->{NAME}, ("interval_".$command), 0);
  #my $replyc = ""; do we need this in background?
  if (AttrVal($name, "nonblocking" , "0")  =~ /1/ ) {
    if (!(exists($hash->{helper}{RUNNING_PID}))) {
      DevIo_CloseDev($hash);          #close device in parent process
      $hash->{helper}{RUNNING_PID} =
             BlockingCall("THZ_GetNB", $name."|".$command, "THZ_GetNBDone", 30, "THZ_GetNBAbort", $hash);
             Log3 $hash, 4, "[$name] THZ_GetRefresh($command) BlockingCall started";
    }
    else {
      Log3 $hash, 3, "[$name] THZ_GetRefresh($command) rescheduled (BlockingCall is still running)";
      InternalTimer(gettimeofday() + 1, "THZ_GetRefresh", $par, 1);
      return;
    }
  }
  else {
    THZ_Get($hash, $hash->{NAME}, $command) if ($hash->{STATE} ne "disconnected");
  }

  if ($interval) {
        $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);
  }
}



3. The new functions:
GetNB calls the THZ_Get
GetNBDone to refresh the reading
GetNBAbort kills the child process in case of an error, should never happen.

########################################################################################
#
# THZ_GetNB - NonBlocking Get parameter from heatpump
#
# Parameters: "name | command" (single string)
#
########################################################################################
sub THZ_GetNB($){
  my ($string) = @_;
  my ($name, $cmd) = split("\\|", $string);
  my $hash = $defs{$name};
  my $ret = DevIo_OpenDev($hash, 0, undef);         #open device in child process
  if (defined($ret)) {
    Log3 $hash, 3, "[$name] THZ_GetNB: open device $hash->{DeviceName} error:$ret";
    return ("$name|$cmd|$ret");
  }
  my $msg = THZ_Get($hash, $name, $cmd);
  DevIo_CloseDev($hash);                            #close device in child process
  if ($msg =~ m/\n/m) {                             #error message from get contains \n
    return ("$name|$cmd|[ERROR]");
  }
  else {
    return ("$name|$cmd|$msg");
  }
}


########################################################################################
#
# THZ_GetNBDone - Finish Function
#
# Parameters: "name | command | message" (single string)
#
########################################################################################
sub THZ_GetNBDone($){
  my ($string) = @_;
  my ($name, $cmd, $msg) = split("\\|", $string);
  my $hash = $defs{$name};
  Log3 $hash, 4, "[$name] THZ_GetNBDone: $cmd - $msg";
  if ($msg ne "[ERROR]") {
    readingsSingleUpdate($hash, $cmd, $msg, 1);
  }
  delete($hash->{helper}{RUNNING_PID});
  DevIo_OpenDev($hash, 1, undef);         #reopen device for parent process
}


########################################################################################
#
# THZ_GetNBAbort - Abort Function
#
# Parameter: hash
#
########################################################################################
sub THZ_GetNBAbort($){
  my ($hash) = @_;
  delete($hash->{helper}{RUNNING_PID});
  DevIo_OpenDev($hash, 1, undef);         #reopen device for parent process
  Log3 $hash->{NAME}, 3, "BlockingCall for ".$hash->{NAME}." was aborted";
}



4. The timeout in THZ_ReadAnswer can now be set to greater values. In my case 8 sec in the 2nd SimpleReadWithTimeout

my $buf = DevIo_SimpleReadWithTimeout($hash, 0.25);
$buf = DevIo_SimpleReadWithTimeout($hash, 8) if(!defined($buf)) ; #added for Karl Antwort msg468515


The last modification is in THZ_Parse1 and is not related to nonblocking. I got a lot of perl warnings for non initialized strings in "cmd2"

      foreach  my $cmdhash  (values %gets) {
     if (defined ($cmdhash->{cmd2}) and ($cmdhash->{cmd2} eq $parsingcmd))   #no cmd2 if parent exists in firmware 2.xx
{$msgtype = $cmdhash->{type} ;
last


If you have time could you please test the code in the attached patch.

Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 04 August 2017, 08:58:51
Hi Andre
2 problem where holding me back from nonblocking
- continuosly opening and closiing the serial interface (can be an overhead)
- possible collisions

thanks for the contribution; I will have a look this weekend
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 04 August 2017, 13:50:41
Zitat von: immi am 04 August 2017, 08:58:51
2 problem where holding me back from nonblocking
- continuosly opening and closiing the serial interface (can be an overhead)
Yes this is not very elegant. Is it realy a problem? You can not simultaneously read from the same device in the parent and child process, at least from tcp devices (I use ser2net). So therefore you need to close an reopen the device every time you start the child process. Maybe you don't need this with serial/USB devieces.
Zitat- possible collisions
This could be prevented by checking the device status in THZ_Get/Set

Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: philipp_b am 04 August 2017, 18:36:48
Zitat von: TheTrumpeter am 29 Juli 2017, 13:47:20
Das ist richtig.
Die Passivkühlung bringt ohnehin sehr wenig. Ich habe meine Experimente damit mittlerweile wieder ad acta gelegt.
Gehört zwar nicht hierher, aber: Dann hast Du irgendwas in den Heizparametern gröber falsch eingestellt. Die gefilterte Aussentemperatur fällt bei mir schon den ganzen Sommer über kaum unter 20°C. Da wird nie in den Winterbetrieb geschalten. Kontrollier' mal die Parameter; was Du machst ist ein schlechter Workaround anstatt das Problem wirklich zu lösen.
Wenn Du den Parameter Passivkühlung auf "Zulüften" hast, wird die Abluft abgeschaltet und die Zuluft hochgefahren. Diese Einstellung kannst Du aber komplett vergessen, das bringt keinerlei Kühleffekt. Lies dazu meine Untersuchungen mit einem kalibrierten Temperaturfühler an den Lüftungsdüsen.
Du musst den Passivkühlungs-Paramter auf "Ablüften" einstellen, dann funktioniert das genau umgekehrt. Durch die geöffneten Fenster in den Zulufträumen saugst Du die kühle Luft ins Haus.
Der Unterschied bzgl. Luftstrom durch die Fenster ist bei geöffneten Fenstern ggü. deaktivierter Passivkühlung durchaus fühlbar. Allzuviel Unterschied in der resultierenden Raumluft macht es aber nicht.
Würd' mich interessieren, ob das wirklich funktioniert.
Was sagt die Bedienungsanleitung zum Mindestvolumenstrom?

120m³ sind bei mir gute 20Hz; viel weniger Drehzahl wird überhaupt keinen Druck und damit keinen Luftstrom mehr erzeugen können, deshalb wohl die untere Beschränkung auf 80m³ bei der 404. Würde mich wundern, wenn das bei der 504er anders wäre. Die Physik dahinter ist doch ähnlich.

Ich habe nur die Raumtemperaturen Heizkreis 1 für Tag und Nacht geändert, sowie den Fußpunkt auf 0,5 gestellt, da mit "2" und Raumtemperatur HK1 auf "20°C" das Haus mit 24°C Innentemperatur bei 7°C Außentemperatur einfach zu warm war.
Da musste ich sonst auf Raumtemperatur HK1 auf 16°C stellen um auf ca 20-21°C Innentemperatur zu kommen.
Ansonsten sind alle Werte so wie es der Service Techniker bei der Inbetriebnahme eingestellt hatte, sowie nach dem Platinen Tausch da der aktivierterte "Feuchteschutz", die Lüftung total durcheinander geschmissen hat und sich auch nicht mehr überschreiben/Patchen usw ließ ...

Das die Passiv Kühlung mit der Zuluft nicht viel bringt, glaube ich auch so, aber wir haben noch keine Insektenschutzgitter, da möchte ich über Nacht keine Fenster offen lassen.

bei mir läuft die Lüftung bis 16-17Hz was 80m³ laut Wärmepumpe entspricht und ca 77-79m³ nach dem Volumenstrom Messgerät des Technikers.
alle darunter eingestellten Werte schalten den Radiator ab.


ich habe gleich noch eine Frage, ich konnte über die Loxone "Set" Befehle über HTTP senden, was ich aber noch gerne möchte, wäre die Werte abzufragen, was muss ich da machen? interessant finde ich vorallem die Werte aus "sglobal"

Gruß
Philipp
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 04 August 2017, 19:58:40
Zitat von: philipp_b am 04 August 2017, 18:36:48
Ich habe nur die Raumtemperaturen Heizkreis 1 für Tag und Nacht geändert, sowie den Fußpunkt auf 0,5 gestellt, da mit "2" und Raumtemperatur HK1 auf "20°C" das Haus mit 24°C Innentemperatur bei 7°C Außentemperatur einfach zu warm war.
Da musste ich sonst auf Raumtemperatur HK1 auf 16°C stellen um auf ca 20-21°C Innentemperatur zu kommen.
Ansonsten sind alle Werte so wie es der Service Techniker bei der Inbetriebnahme eingestellt hatte, sowie nach dem Platinen Tausch da der aktivierterte "Feuchteschutz", die Lüftung total durcheinander geschmissen hat und sich auch nicht mehr überschreiben/Patchen usw ließ ...
Klingt so, als ob die Heizkurve einfach viel zu steil wäre...
Es ist auch im Handbuch beschrieben, wie vorzugehen ist, wenn es ständig oder in der Übergangszeit zu warm oder zu kalt ist.
Im einen Fall wird der Fusspunkt, im anderen Fall die Steigung der Heizkurve verändert. Lies' Dir das mal durch - sind nur wenige Zeilen - und gehe danach vor.

Ich kann mir ohnehin keinen aktuellen Neubau mehr vorstellen, in dem man eine 504er von der Heizlast her brauchen würde... aber Du hast bisher ja noch keinerlei Angaben zu den Gegebenheiten gemacht.

Zitat von: philipp_b am 04 August 2017, 18:36:48
Das die Passiv Kühlung mit der Zuluft nicht viel bringt, glaube ich auch so, aber wir haben noch keine Insektenschutzgitter, da möchte ich über Nacht keine Fenster offen lassen.
Wenn Du einen "dichten Neubau" hast, bringt es gar nichts Zu- und Abluft auf stark unterschiedliche Werte zu stellen ohne mindestens ein Fenster zu öffnen.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: philipp_b am 04 August 2017, 20:37:58
Zitat von: TheTrumpeter am 04 August 2017, 19:58:40
Klingt so, als ob die Heizkurve einfach viel zu steil wäre...
Es ist auch im Handbuch beschrieben, wie vorzugehen ist, wenn es ständig oder in der Übergangszeit zu warm oder zu kalt ist.
Im einen Fall wird der Fusspunkt, im anderen Fall die Steigung der Heizkurve verändert. Lies' Dir das mal durch - sind nur wenige Zeilen - und gehe danach vor.

Ich kann mir ohnehin keinen aktuellen Neubau mehr vorstellen, in dem man eine 504er von der Heizlast her brauchen würde... aber Du hast bisher ja noch keinerlei Angaben zu den Gegebenheiten gemacht.
Wenn Du einen "dichten Neubau" hast, bringt es gar nichts Zu- und Abluft auf stark unterschiedliche Werte zu stellen ohne mindestens ein Fenster zu öffnen.

Fußpunkt 0,5
Steigung 0,3

mit den Einstellungen werde ich im Herbst mal spielen.

Unser Neubau ist noch nicht fertig, es fehlen noch die Zimmertüren, Außenputz und der Blower Door Test wurde noch nicht durchgeführt.
Heizlast kann ich dir auswändig gar nicht sagen, wir mussten unseren Heizungsbauer wechseln da der alte sehr viel Pfusch machte und uns sitzen ließ (sehr schön übern Winter, haben Anfang Oktober mit dem Estrich ausheizen (elektrisches Aufheizgerät) begonnen und wurden dann immer hingehalten, bis er dann Neujahr seine Sachen gepackt hat... bis dann unser neuer Heizungsbauer die neue Heizung installieren konnte, vergingen leider nochmal 3 Monate...

Ich kann nur sagen, wir haben ein KFW55 Haus, mit 3 Vollgeschosse je ca 89m² und unser Jahres-Primärenergiebedarf liegt bei 35kwh(m²a)

Das "offene Fenster" realisiere ich mit unserem raumluftunabhängigen Kamin, der im Keller noch offen ist, da merkt man es wies zieht.

Insektenschutzgitter kommt irgendwann ende August, bis dahin wollte ich es über die Zuluft realisieren, aber nach den Raumtemperatur Aufzeichnungen, ists wie du sagst eigentlich sinnlos.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 04 August 2017, 20:53:36
Zitat von: philipp_b am 04 August 2017, 20:37:58
Fußpunkt 0,5
Steigung 0,3

Ich kann nur sagen, wir haben ein KFW55 Haus, mit 3 Vollgeschosse je ca 89m² und unser Jahres-Primärenergiebedarf liegt bei 35kwh(m²a)
KFW55 sagt mir nichts, aber die 35kWh/m²/a sind ja eine Aussage.
Von der Fläche habe ich etwas weniger (ca. 3x 75m²), aber einen deutlich geringeren Energiebedarf von 8kWh/m²/a.
Mit der 404er habe ich Fusspunkt 1,5 und Steigung 0,23. Ich kenne aber den Unterschied zur 504 nicht, also ist der Vergleich auch nicht zulässig bzw. kann man daraus nichts ableiten. Aus dem Bauch heraus würde ich aber sagen, dass die Werte nicht so falsch sein können wie Du oben beschreibst.

Zitat von: philipp_b am 04 August 2017, 20:37:58
Das "offene Fenster" realisiere ich mit unserem raumluftunabhängigen Kamin, der im Keller noch offen ist, da merkt man es wies zieht.

Insektenschutzgitter kommt irgendwann ende August, bis dahin wollte ich es über die Zuluft realisieren, aber nach den Raumtemperatur Aufzeichnungen, ists wie du sagst eigentlich sinnlos.
Du kannst es über Abluft versuchen, wenn das durch den Kamin funktioniert. Damit saugst Du die Luft durch den Kamin ins Haus.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 04 August 2017, 21:48:30
Die Werte für Fußpunkt und Steigung sind ja Temperaturwerte, also Kelvin. Steigung 0,23 bedeutet, dass wenn die Außentemperatur um 1° sinkt, die Heizkreistemperatur um 0,23° steigt. Deshalb sollten diese Werte unabhängig vom Heizsystem und somit durchaus vergleichbar sein.

Die Werte für kWh/m²a im Energieausweis sind errechnet. Meines Wissens geht in diese Rechnung nicht ein, ob Zuheizung durch Sonneneinstrahlung erfolgt oder erhöhte Abkühlung durch eine Kaltluftschneise. Deshalb sind diese theoretischen Werte in der Praxis kaum vergleichbar. Dasselbe HAus an unterschiedlichen Standorten wird unterschiedlich hohe HEizkosten haben, obwohl der Energieausweis das nicht aussagt.

Ich vergleiche lieber anhand der Heizlast. Ich weiß z.B. aus Erfahrung, dass meine THZ303 bis -7°C ohne Heizstab das Haus erwärmen kann. Wenn ich den Bivalenzpunkt tiefer als -7° einstelle wird es an kalten Wintertagen kalt im Haus, obwohl die WP pausenlos läuft. Ein Blick ins Datenblatt sagt mir, dass die THZ 303SOL bei -7°C eine Heizleistung von 3,3KW bringt. Also hat mein Haus bei -7°C eine Heizlast von 3,3kW.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 04 August 2017, 21:55:45
Ich sehe grade, dass diese ganze Diskussion im falschen Forum ist. Hier wäre es wohl besser aufgehoben:
https://forum.fhem.de/index.php?topic=33452.new;topicseen#new
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 04 August 2017, 21:57:19
immi,
do you see a way to set p75passiveCooling via fhem? Currently it's a read-only parameter.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 04 August 2017, 22:05:59
Zitat von: willybauss am 04 August 2017, 21:48:30
Die Werte für kWh/m²a im Energieausweis sind errechnet. Meines Wissens geht in diese Rechnung nicht ein, ob Zuheizung durch Sonneneinstrahlung erfolgt oder erhöhte Abkühlung durch eine Kaltluftschneise. Deshalb sind diese theoretischen Werte in der Praxis kaum vergleichbar. Dasselbe HAus an unterschiedlichen Standorten wird unterschiedlich hohe HEizkosten haben, obwohl der Energieausweis das nicht aussagt.
Deshalb enthält zumindest mein Energieausweis die Berechnung sowohl für den "Referenzstandort" als auch für den tatsächlichen Standort.
Die Sonneneinstrahlung wird unabhängig davon aber sehrwohl berücksichtigt.

Zitat von: willybauss am 04 August 2017, 21:48:30
Ich vergleiche lieber anhand der Heizlast. Ich weiß z.B. aus Erfahrung, dass meine THZ303 bis -7°C ohne Heizstab das Haus erwärmen kann. Wenn ich den Bivalenzpunkt tiefer als -7° einstelle wird es an kalten Wintertagen kalt im Haus, obwohl die WP pausenlos läuft. Ein Blick ins Datenblatt sagt mir, dass die THZ 303SOL bei -7°C eine Heizleistung von 3,3KW bringt. Also hat mein Haus bei -7°C eine Heizlast von 3,3kW.
Einfach, aber sinnvoll. Du berücksichtigst aber nicht, dass die von Dir genannte Heizleistung nur bei deaktivierter Lüftung gilt. Bei aktivierter Lüftung bringt die Wärmepumpe mehr Leistung. Zumindest ist das lt. Leistungsdiagramm der x04SOL so.

Ich hatte selbst bei -15°C keinen Heizstab nötig, bei 120m³ Abluft. Lt. Datenblatt schafft die 404SOL bei -15°C ohne Wärmerückgewinnung ca. 3,1kW und mit Wärmerückgewinnung aus 200m³ Abluft bereits 5,5kW. Mit meinen 120m³ liege ich vielleicht in der Mitte, also 4,3kW bei -15°C.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 04 August 2017, 22:06:35
Zitat von: willybauss am 04 August 2017, 21:57:19
immi,
do you see a way to set p75passiveCooling via fhem? Currently it's a read-only parameter.
With FW5.39 it can be set on 404SOL.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 04 August 2017, 22:13:05
I'm sure it worked last year. But today

set Mythz p75passiveCooling 2

ends up in

ZitatUnknown argument p75passiveCooling, choose one of p01RoomTempDayHC1 p01RoomTempDayHC1SummerMode p01RoomTempDayHC2 p01RoomTempDayHC2SummerMode p02RoomTempNightHC1 p02RoomTempNightHC1SummerMode p02RoomTempNightHC2 p02RoomTempNightHC2SummerMode p03RoomTempStandbyHC1 p03RoomTempStandbyHC1SummerMode p03RoomTempStandbyHC2 p03RoomTempStandbyHC2SummerMode p04DHWsetDayTemp p05DHWsetNightTemp p06DHWsetStandbyTemp p07FanStageDay p08FanStageNight p09FanStageStandby p11DHWsetManualTemp p13GradientHC1 p14LowEndHC1 p15RoomInfluenceHC1 p16GradientHC2 p17LowEndHC2 p18RoomInfluenceHC2 p19FlowProportionHC1 p21Hyst1 p22Hyst2 p23Hyst3 p24Hyst4 p25Hyst5 p29HystAsymmetry p30integralComponent p32HystDHW p33BoosterTimeoutDHW p34BoosterDHWTempAct p35PasteurisationInterval p35PasteurisationTemp p36DHWMaxTime p37Fanstage1AirflowInlet p38Fanstage2AirflowInlet p39Fanstage3AirflowInlet p40Fanstage1AirflowOutlet p41Fanstage2AirflowOutlet p42Fanstage3AirflowOutlet p43UnschedVent3 p44UnschedVent2 p45UnschedVent1 p46UnschedVent0 p49SummerModeTemp p50SummerModeHysteresis p54MinPumpCycles p55MaxPumpCycles p56OutTempMaxPumpCycles p57OutTempMinPumpCycles p76RoomThermCorrection  ...

As you can see p75... is not listed as a valid option.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 04 August 2017, 22:49:29
Zitat von: willybauss am 04 August 2017, 21:57:19
immi,
do you see a way to set p75passiveCooling via fhem? Currently it's a read-only parameter.
fixed also for those not having the firmware attribute
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 04 August 2017, 22:53:29
I have

sFirmware  version: 04.19

or are you talking about something different?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 04 August 2017, 23:48:49
Zitat von: andre.k am 03 August 2017, 22:34:18
4. The timeout in THZ_ReadAnswer can now be set to greater values. In my case 8 sec in the 2nd SimpleReadWithTimeout
...
5. The last modification is in THZ_Parse1 and is not related to nonblocking. I got a lot of perl warnings for non initialized strings in "cmd2"
HI Andre
5 fixed.
4 added "simpleReadTimeout:0.25,0.5,1,2" attribute. I am planning to double it  when I get nonblocking working properly ( I need much more time)

v.166 uploaded

as always thanks for contributing.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 04 August 2017, 23:58:54
Zitat von: willybauss am 04 August 2017, 22:53:29
I have
sFirmware  version: 04.19
or are you talking about something different?
Willy
there is an attribute (not a reading) firmware, which you were not using, because your firmware is default.
without using the attribute, p75passiveCooling was disabled (my fault)
Now it should be fixed: you just need to update; no need for you to use the firmware attribute.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 07 August 2017, 20:43:43
Hi andre
i implemented your suggestions for  nonblocking and committed.
My strategy is that if you are calling manually a "set" or a "get" you should have priority.
I am still not very happy with sub THZ_AvoidCollisions.
I am still not very happy with the many opening and closing of the interface.
But it is a nice start  8)
immi


dear all
added attribute  nonblocking:0,1
the functionality is very very beta
without the attribute the module will behave as before
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 08 August 2017, 10:56:12
Hi immi,

many thanks. I'm testing the new version next weekend. I just had a look in the svn.
Zitat von: immi am 07 August 2017, 20:43:43
My strategy is that if you are calling manually a "set" or a "get" you should have priority.
that's difficult to achieve
ZitatI am still not very happy with sub THZ_AvoidCollisions.
yes it is pretty raugh ;)

Andre

BTW: I don't like all these select statements just to wait, because these are blocking the global fhem loop.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 14 August 2017, 20:21:37
Hi immi,

v168 is running and works fine. Thank you again.

I've still a problem with the function THZ_AvoidCollisions. The function is called from time to time, even in the backround. For checking, I commented out the call from THZ_Get, because this function ist called from nonblocking in the backgrout. No change, AvoidCollisions is still called (entries in log file). Possible collision in myWP was aborted
Second I additionaly commented out the THZ_AvoidCollisions from THZ_Set and everything is fine. It is silly because the THZ_Set is never called in backround. Do you have an idea?

Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 August 2017, 13:17:20
Zitat von: andre.k am 14 August 2017, 20:21:37
I've still a problem with the function THZ_AvoidCollisions. The function is called from time to time, even in the backround.
THZ_AvoidCollisions. is always called by THZ_Set and THZ_Get.
it checks if there is {RUNNING_PID}, otherwise returns
The non-blocking process do not have {RUNNING_PID}; therefore return.
Only parents, which have a non-blocking child, have {RUNNING_PID}.

Let us say you want a THZ_Set or a THZ_get from front-end, you check if a child is running by defined{RUNNING_PID} and kill it.
Please help me undertanding, where you see an issue.

Zitat
Second I additionaly commented out the THZ_AvoidCollisions from THZ_Set and everything is fine. It is silly because the THZ_Set is never called in backround.
THZ_AvoidCollision should kill everything  in the background and priotize the front-end.
Therefore it is also important for THZ_Set, because there could be a Get in the background..

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 15 August 2017, 13:53:59
ZitatTHZ_AvoidCollision should kill everything  in the background and priotize the front-end.
Therefore it is also important for SET, because there could be a Get in the background..
Understood, but I never did a SET in the WEBGUI and nevertheless I got entries in the Logfile. Where are the SET calls come from?
ZitatLet us say you want a THZ_Set or a THZ_get from front-end, you check if a child is running by defined{RUNNING_PID} and kill it.
Please help me undertanding, where you see an issue.
There is no issue. The approach is ok. But somehow child processes are killed although I do not set/get in front-end.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 August 2017, 16:00:23
Zitat von: andre.k am 15 August 2017, 13:53:59
Understood, but I never did a SET in the WEBGUI and nevertheless I got entries in the Logfile. Where are the SET calls come from?
I set interactively from webgui and from doif, on a regular basis
For both I want a syncronous answer, and if possible a 99.999% success rate.

Zitat
There is no issue. The approach is ok. But somehow child processes are killed although I do not set/get in front-end.
This cannot and should not happen. I cannot look at it on the short term. Maybe  in the next holiday
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 16 August 2017, 10:03:09
Hi immi,

ZitatThis cannot and should not happen

My Log is full of entries

2017.08.13 23:06:08 3: Possible collision in myWP was aborted

I debuged that the SET function is called regulary with the following paramter:

2017.08.16 09:31:00 1: DEBUG>myWP Set: ?

Maybe the Set function is called from the FHEM main loop to check the valid Set commands of the modul. To fix this we can move the THZ_AvoidCollisions function call after the first if-block.
    return "Unknown argument $cmd, choose one of  $setList";
  }
 
  return "\"set $name $cmd\" needs at least one further argument: <value-to-be-modified>" if(!defined($arg));

  Debug("$name Set: $cmd $arg");
  THZ_AvoidCollisions($hash);
 
 
  my $cmdHex2 = $cmdhash->{cmd2};
  my $argMax = $cmdhash->{argMax};
  my $argMin = $cmdhash->{argMin};
 
  #-- check the parameter range
  if ($cmdhash->{type} =~ /7prog|8party/) {         
    ($arg, $arg1)=split('--', $arg);


Could you please extend the range of timeout values in your next release.

            ."simpleReadTimeout:0.25,0.5,1,2,3,4,5,6,7,8,9,10 " #standard has been 0.5 since msg468515

Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 16 August 2017, 13:39:17
Zitat von: andre.k am 16 August 2017, 10:03:09
Maybe the Set function is called from the FHEM main loop to check the valid Set commands of the modul. To fix this we can move the THZ_AvoidCollisions function call after the first if-block.
Your hypothesis is correct.
the webinterface calls THZ_Set in order to know which possibilities/registers  THZ_Set offers.
Moving the call to THZ_AvoidCollisions after line 942, will fix the issue.
The same is for THZ_Get, for which THZ_AvoidCollisions should be after after line 1158
Would you be so nice to test it? I cannot untill weekend

Zitat
Could you please extend the range of timeout values in your next release.
I wanted to double them in case blocking_call parameter is enabled.
I do not want to have 8 seconds in the background with blocking
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 16 August 2017, 16:34:23
Hi immi,

ZitatWould you be so nice to test it? I cannot untill weekend

I've tested. It's working.


ZitatI wanted to double them in case blocking_call parameter is enabled.
I do not want to have 8 seconds in the background with blocking

I would implement in the other way round. If blocking attribut is NOT enabled then set the timeout value to a maximum value of 0.5 sec. So even the user selects an higher value, the timeout is set to 0.5 sec.

Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 19 August 2017, 12:02:06
Zitat von: andre.k am 16 August 2017, 16:34:23
I would implement in the other way round. If blocking attribut is NOT enabled then set the timeout value to a maximum value of 0.5 sec. So even the user selects an higher value, the timeout is set to 0.5 sec.
good idea

v 0.169 uploaded
ciao
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 22 August 2017, 14:04:10
Hallo an alle,

mich würde mal interessieren, wer noch das Nonblocking-Feature nutzen würde und dann seine Erfahrungen mitteilen könnte? Hat außer mir noch jemand eine THZ mit der alten Firmware 2.xx? Ich vermute nur die alten Modelle der THZ haben das Problem mit den sporadisch auftretenden Timeouts beim Warten auf Antwort. Vielleicht liegt es auch an der alten Hardware (serielles Inteface mit 9600 bps). Wie auch immer. Über Feedback wäre ich dankbar.

Andre


 
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 22 August 2017, 22:01:20
Zitat von: andre.k am 22 August 2017, 14:04:10
Hallo an alle,

mich würde mal interessieren, wer noch das Nonblocking-Feature nutzen würde und dann seine Erfahrungen mitteilen könnte? Hat außer mir noch jemand eine THZ mit der alten Firmware 2.xx? Ich vermute nur die alten Modelle der THZ haben das Problem mit den sporadisch auftretenden Timeouts beim Warten auf Antwort. Vielleicht liegt es auch an der alten Hardware (serielles Inteface mit 9600 bps). Wie auch immer. Über Feedback wäre ich dankbar.

Andre

Ich verfolge das jetzt schon ne Weile, bin aber grade nicht in der Lage, mich da reinzudenken. Deshalb:
Was macht es?
Wie erkenne ich, ob ich es brauche?
Welchen Vorteil habe ich davon?
Welche Nachteile?
Wie aufwändig ist es zu implementieren?
...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 23 August 2017, 11:00:14
Zitat von: willybauss am 22 August 2017, 22:01:20
Ich verfolge das jetzt schon ne Weile, bin aber grade nicht in der Lage, mich da reinzudenken. Deshalb:
Was macht es?
Wie erkenne ich, ob ich es brauche?
Welchen Vorteil habe ich davon?
Welche Nachteile?
Wie aufwändig ist es zu implementieren?
Hi Willy
As you know FHEM is blocked when 00_THZ is talking to the heatpump (no parallel processing).
This is not a problem if your communication with the heatpump is fast; but if your comunication takes some seconds for each register, fhem is not responsive anymore.
Andre and me are trying to develop a non-blocking 00_THZ.pm
It is very important for old heatpumps with serial inteface 9600bps.
There are some drawbacks on non-blocking actual implementation
1) more memory is allocated
2) more computing power is needed
3) devio (both serial interface management and ser2net) has to be improved or newly written
4)  if you are calling manually a "set" or a "get" you should have priority; I am not sure that it is working properly: no time to test carefully
5) lots of logs entries



If you still want to test it
- attribute simpleReadTimeout 3   ## you give up to 3 seconds to the heatpump to react
- attribute nonblocking 1              ## you enable nonblocking

If not, you will not see or experience any drawback

ciao immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 23 August 2017, 11:17:02
Zitat von: willybauss am 22 August 2017, 22:01:20
Ich verfolge das jetzt schon ne Weile, bin aber grade nicht in der Lage, mich da reinzudenken. Deshalb:

...

immi ist mir zwar zuvorgekommen, aber ich hole mal etwas weiter aus.
ZitatWas macht es?
1. FHEM arbeitet normalerweise nicht Multi-Tasking, d.h. alle FHEM-Module laufen in einzigen Prozess des Betriebssystems. Die einzelnen Module (bzw. die Funktionen z.B. Get oder Set) werden durch die FHEM-Hauptschleife aufgerufen. Das erfordert, dass sich jedes Modul kooperativ verhält und die Modulfunktionen so wenig wie möglich Zeit verbrauchen und so schnell wie möglich die Kontrolle wieder an die Hauptschleife zurückgeben. Eine einzelne Modulfunktion darf das Gesamtsystem nicht blockieren, z.B. indem sie auf eine Antwort von einem externen Gerät (in unserem Beispiel die THZ) wartet. Wenn nun aber, wie in meinem Fall das Gerät (THZ) doch länger benötigt, um seine Daten bereitzustellen, kann man das Warten/Lesen in einen eigenen Prozess auslagern. Dazu stellt FHEM ein Modul Blocking.pm zur Verfügung. Das haben wir jetzt im THZ-Modul integriert. Damit ist es möglich den Read-Timout auf höhere Werte (bis 10 sec) einzustellen, ohne dass FHEM blockiert wird.

ZitatWie erkenne ich, ob ich es brauche?
Wenn man viele Timeout-Meldungen
"THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow"

im Logfile hat (bei mir waren das machmal über 100 pro Tag) kann es sinnvoll sein, den Read-Timeout zu erhöhen und das Feature Non-Blocking zu verwenden. Ein Timeout beim Lesen bedeutet ein verlorener Wert in den Readings und damit im Logfile und das kann unter Umständen bei den Plots unschöne Effekte haben.

ZitatWelchen Vorteil habe ich davon?
Der Vorteil ist, dass beim Refresh der Readings im Hintergrund keine Werte mehr verlorengehen.

ZitatWelche Nachteile?
Es gibt aktuell keinen Nachteil aus Anwendersicht. Das Feature ist allerdings noch nicht so umfassend getestet und einige Dinge sind intern noch nicht optimal gelöst.

ZitatWie aufwändig ist es zu implementieren?

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.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 23 August 2017, 13:29:31
Könnte das eine Erklärung sein für das Problem, das ich vor einiger Zeit beschrieben hatte?:

Zitat von: willybauss am 09 Juni 2017, 19:00:03
Hi immi,

my logfile shows frquent (3 ... 6 times per day) messages saying

Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?

This is not a new effect, I know it since years, and everything works fine. But from time to time I wonder if I can do something to avoid it. Is there a user accessible value to e.g. increase wait time?

und
Zitat von: willybauss am 10 Juni 2017, 14:14:41
Hi immi,

I don't think it's increasing. I believe I have these entries since 2 years or so. Normally I don't even check the logfile contents, as long as it stays small in monthly size. But currently I try to find the root cause, why my Homematic CUL stops working frequently; needs a 'reopen' then. I observed an approx. 70 ... 80% match of times tamps between CUL stop and these THZ entries. CUL stop happens approx. 2 ... 3 times per month. So I don't believe that CUL is root cause for THZ issue, but I think its the other way round - THZ issue might be cause for the CUL to stop working.

For that reason I wonder if increasing wait times may help. Is fhem blocked during these wait times? If yes, the CUL issue wouldn't be healed by increasing wait times further. I need to try it out. How long may these wait times be - few seconds?

As I understand, the message tells me that Mythz sends a request to the THZ, and the answer doesn't come in expected time frame, right? What can I do to have the THZ's answer earlier? Nothing I guess, right? I have a serial connection with approx. 4 - 5m cable. The cable ends in a serial-USB converter. The converter is plugged into an USB hub, directly connected to RaspberryPi's USB port.

Since the CUL issue happens very rarely we shouldn't expect an answer within weeks. We need to think in months though. I'll let you know as soon as I have any answers.

Thanks so far. Have a nice weekend.
Willy

I had not yet time to change the cable against a shielded one, as immi suggested in an answer to this post. I'll do so in winter time.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 23 August 2017, 14:30:51
ZitatKönnte das eine Erklärung sein für das Problem, das ich vor einiger Zeit beschrieben hatte?:

Ja, könnte sein. In meiner Umgebung habe ich zwei Situationen, die diese Fehlermeldung verursachen:

a) THZ hat die Anfrage richtig empfangen, ist aber beschäftigt und kann nicht antworten. Hier hilft die Erhöhung des Timeouts und dann wäre nonblocking eine Lösung
b) THZ hat die Anfrage nicht erhalten, dann antwortet die THZ auch nicht und es hilft auch keine Erhöhung des Timeouts. Hier würde aber eine (sofortige) Wiederholung der Anfrage helfen, das ist aktuell aber nicht implementiert. (noch nicht, ich teste das gerade)

Die Schwierigkeit besteht darin die beiden Fälle zu erkennen bzw. zu unterscheiden, wenn man sie unterschiedlich behandeln will.

In beiden Fällen hat man im Logfile
Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 23 August 2017, 15:21:52
Super. Momentan bin ich ohnehin eher im Garten beschäftigt (Terrasse bauen). Wenn ich dann Richtung Winter wieder Zeit habe ist das womöglich schon abschließend implementiert. Klingt nach 'nem Plan  :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 26 August 2017, 13:24:50
Zitat von: andre.k am 22 August 2017, 14:04:10
Hallo an alle,

mich würde mal interessieren, wer noch das Nonblocking-Feature nutzen würde und dann seine Erfahrungen mitteilen könnte? Hat außer mir noch jemand eine THZ mit der alten Firmware 2.xx? Ich vermute nur die alten Modelle der THZ haben das Problem mit den sporadisch auftretenden Timeouts beim Warten auf Antwort. Vielleicht liegt es auch an der alten Hardware (serielles Inteface mit 9600 bps). Wie auch immer. Über Feedback wäre ich dankbar.

Andre

Hallo,
habe heute das Nonblocking-Feature bei meiner LWZ303i mit der alten Firmware 2.06 ausprobiert.
Hier ein Auszug aus der Log-Datei vor der Änderung:
2017.08.23 22:26:12 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
2017.08.23 22:26:13 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- F4 ->
2017.08.24 00:01:19 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
2017.08.24 00:06:19 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
2017.08.24 00:06:20 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- F4 ->
2017.08.24 00:16:21 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step2 -- FB ->
2017.08.24 00:16:21 3: THZ_Get: Error msg2:   THZ_Get_Com: error found at step0 15 NAK!! -- F4 -> 15
2017.08.24 00:16:23 3: Mythz/RAW: 02
2017.08.24 00:26:23 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
2017.08.24 00:31:23 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step2 -- FB ->
2017.08.24 00:31:23 3: THZ_Get: Error msg2:   THZ_Get_Com: error found at step0 15 NAK!! -- F4 -> 15
2017.08.24 00:31:23 3: Mythz/RAW: 02
2017.08.24 01:06:26 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step2 -- FB ->
2017.08.24 01:06:26 3: THZ_Get: Error msg2:   THZ_Get_Com: error found at step0 15 NAK!! -- F4 -> 15
2017.08.24 01:06:26 3: Mythz/RAW: 02
2017.08.24 04:21:40 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
2017.08.24 04:21:41 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- F4 ->

Nach dieser Änderung sieht das so aus:
2017.08.26 12:58:34 3: [Mythz] THZ_GetRefresh(sGlobal) BlockingCall started
2017.08.26 12:58:34 3: Opening Mythz device /dev/serial/by-id/usb-067b_2303-if00-port0
2017.08.26 12:58:34 3: Setting Mythz serial parameters to 9600,8,N,1
2017.08.26 12:58:34 3: Mythz device opened
2017.08.26 12:58:42 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
2017.08.26 12:58:43 3: Setting Mythz serial parameters to 9600,8,N,1
2017.08.26 12:58:43 1: /dev/serial/by-id/usb-067b_2303-if00-port0 reappeared (Mythz)
2017.08.26 12:58:55 3: [Mythz] THZ_GetRefresh(sHC1) BlockingCall started
2017.08.26 12:58:55 3: Opening Mythz device /dev/serial/by-id/usb-067b_2303-if00-port0
2017.08.26 12:58:55 3: Setting Mythz serial parameters to 9600,8,N,1
2017.08.26 12:58:55 3: Mythz device opened
2017.08.26 12:58:56 3: Setting Mythz serial parameters to 9600,8,N,1
2017.08.26 12:58:56 1: /dev/serial/by-id/usb-067b_2303-if00-port0 reappeared (Mythz)
2017.08.26 13:03:34 3: [Mythz] THZ_GetRefresh(sGlobal) BlockingCall started
2017.08.26 13:03:34 3: Opening Mythz device /dev/serial/by-id/usb-067b_2303-if00-port0
2017.08.26 13:03:35 3: Setting Mythz serial parameters to 9600,8,N,1
2017.08.26 13:03:35 3: Mythz device opened
2017.08.26 13:03:35 3: Setting Mythz serial parameters to 9600,8,N,1
2017.08.26 13:03:35 1: /dev/serial/by-id/usb-067b_2303-if00-port0 reappeared (Mythz)
2017.08.26 13:03:56 3: [Mythz] THZ_GetRefresh(sHC1) BlockingCall started
2017.08.26 13:03:56 3: Opening Mythz device /dev/serial/by-id/usb-067b_2303-if00-port0
2017.08.26 13:03:56 3: Setting Mythz serial parameters to 9600,8,N,1
2017.08.26 13:03:56 3: Mythz device opened
2017.08.26 13:03:56 3: Setting Mythz serial parameters to 9600,8,N,1
2017.08.26 13:03:56 1: /dev/serial/by-id/usb-067b_2303-if00-port0 reappeared (Mythz)
2017.08.26 13:08:35 3: [Mythz] THZ_GetRefresh(sGlobal) BlockingCall started
2017.08.26 13:08:35 3: Opening Mythz device /dev/serial/by-id/usb-067b_2303-if00-port0
2017.08.26 13:08:35 3: Setting Mythz serial parameters to 9600,8,N,1
2017.08.26 13:08:35 3: Mythz device opened
2017.08.26 13:08:36 3: Setting Mythz serial parameters to 9600,8,N,1
2017.08.26 13:08:36 1: /dev/serial/by-id/usb-067b_2303-if00-port0 reappeared (Mythz)
2017.08.26 13:08:56 3: [Mythz] THZ_GetRefresh(sHC1) BlockingCall started
2017.08.26 13:08:56 3: Opening Mythz device /dev/serial/by-id/usb-067b_2303-if00-port0
2017.08.26 13:08:56 3: Setting Mythz serial parameters to 9600,8,N,1
2017.08.26 13:08:56 3: Mythz device opened
2017.08.26 13:08:57 3: Setting Mythz serial parameters to 9600,8,N,1
2017.08.26 13:08:57 1: /dev/serial/by-id/usb-067b_2303-if00-port0 reappeared (Mythz)

Wie kann ich diese Ergebnisse bewerten?
Es gibt auf jeden Fall viel mehr Einträge im LOG.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 28 August 2017, 10:49:02
Hallo Peter,

interessant wäre die Anzahl der folgenden Fehlermeldungen pro Tag einmal mit und einmal ohne nonblocking:

THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found

Die Anzahl gleicher Logeinträge pro Tag kannst du z.B. so ermitteln:

grep InterfaceNotRespondig /opt/fhem/log/fhem-2017-08.log |uniq -c -w10

welchen Timout (Attribut simpleReadTimeout ) hast Du bei dir gesetzt?

Andre



Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 28 August 2017, 20:30:14
Zitat von: andre.k am 28 August 2017, 10:49:02
Hallo Peter,

interessant wäre die Anzahl der folgenden Fehlermeldungen pro Tag einmal mit und einmal ohne nonblocking:

THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found

Die Anzahl gleicher Logeinträge pro Tag kannst du z.B. so ermitteln:

grep InterfaceNotRespondig /opt/fhem/log/fhem-2017-08.log |uniq -c -w10

welchen Timout (Attribut simpleReadTimeout ) hast Du bei dir gesetzt?

Andre

Hallo Andre,

hier ist das Ergebnis der Fehlerhäufigkeit:


     56 2017.08.10 06:43:09 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
     11 2017.08.11 00:39:25 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
     24 2017.08.12 00:58:26 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
     35 2017.08.13 01:12:05 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
     47 2017.08.14 10:18:35 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
     23 2017.08.15 10:38:34 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
     15 2017.08.16 00:10:21 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
     31 2017.08.17 01:44:09 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
     30 2017.08.18 00:46:05 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
     31 2017.08.19 02:22:56 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
     11 2017.08.20 11:50:15 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
     19 2017.08.21 00:41:15 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
     32 2017.08.22 00:03:20 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
     12 2017.08.23 00:14:27 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
     19 2017.08.24 00:01:19 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
     24 2017.08.25 02:23:14 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
     26 2017.08.26 00:44:52 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
     18 2017.08.27 00:29:44 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
     12 2017.08.28 03:20:52 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->

Wenn ich das richtig sehe, dann waren es gestern (ganzer Tag nach Umstellung) 18 Fehler.
Vor der Umstellung wares es zwischen 11 und 56 Fehlern pro Tag. 
Timout habe ich wie du auf 8 eingestellt.

Kann man irgendwie die Anzahl der LOG-Eintrage reduzieren oder komplett abschalten?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 28 August 2017, 22:03:07
Zitat von: peter456 am 28 August 2017, 20:30:14
Timout habe ich wie du auf 8 eingestellt.
Kann man irgendwie die Anzahl der LOG-Eintrage reduzieren oder komplett abschalten?
Hi peter
Yes, it would be very easy to ignore the error in log; but we are trying to remove all errors.
for me it would be interesting to know if the remaining 11 errors are caused by an even slower  heatpump or by the heatpump just ignoring the command.

I would appreciate if you increase the simpleReadTimeout to 10.
It would help to know the difference between no nonblocking, nonblocking &  simpleReadTimeout 8  and nonblocking &  simpleReadTimeout 10
immi
it would be grat if you make some statistics for several days each.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 30 August 2017, 18:18:56
Hallo.
Habe heute wieder nach der Anzahl der Fehlermeldungen in den letzten 2 Tagen nachgeschaut.
Es waren 16 und 18 Fehler pro Tag.
Den Timout habe ich jetzt von 8 auf 10 verändert und ich werde in einigen Tagen neue Ergebnisse dazu liefern.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 03 September 2017, 13:03:29
Hallo.
Habe heute wieder nach der Anzahl der Fehlermeldungen in den letzten 3 Tagen mit Timeout 10 nachgeschaut.
Es waren 21, 16 und 13 Fehler pro Tag.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 04 September 2017, 21:57:59
Peter
thanks for sharing.
It looks like hte new feature is not help you :(
maybe Andre has another idea.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 06 September 2017, 12:41:47
Hallo Andre,

wie sehen deine Ergebnisse bezüglich Timeout und Nonblocking?
Hat es bei deiner Anlage was gebracht?

Gruß Peter
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 07 September 2017, 15:37:21
Bei mir hat die Erhöhung des Timeouts auf 8 sec. eine Reduzierung der täglichen Fehler von ca. 60 auf weniger als 20 gebracht. Die restlichen Fehler scheinen aber anderer Natur zu sein. Hier geht  vermutlich die Anfrage "verloren". Das könnte man durch eine Wiederholungsschleife in der Funktion THZ_GetCommunication reparieren. Damit verhindert man zwar nicht den Fehler, aber er wird abgefangen und es geht kein Reading verloren.

Der Code könnte so aussehen


sub THZ_Get_Comunication($$) {
  my ($hash, $cmdHex) = @_;
  my ($err, $msg) =("", " ");
  Log3 $hash->{NAME}, 5, "THZ_Get_Comunication: Check if port is open. State = '($hash->{STATE})'";
  if (!(($hash->{STATE}) eq "opened"))  { return("closed connection", "");}
 
  my $cnt = 0;
  my $cntmax = 5;
  my $success = 0;
  while (!$success and ($cnt ++ < $cntmax)) {
  Log3 $hash->{NAME}, 4, "THZ_Get_Comunication: loop $cnt";
  #select(undef, undef, undef, 0.001);
  THZ_Write($hash,  "02"); # step0 --> STX start of text
  ($err, $msg) = THZ_ReadAnswer($hash);

#Expectedanswer1    is  "10"  DLE data link escape

  if ($msg ne "10")    {$err .= " THZ_Get_Com: error found at step0 $msg"; $err .=" NAK!!" if ($msg eq "15"); select(undef, undef, undef, 0.1); return($err, $msg) ;}
  else  {
THZ_Write($hash,  $cmdHex); # step1 --> send request   SOH start of heading -- Null -- ?? -- DLE data link escape -- EOT End of Text
($err, $msg) = THZ_ReadAnswer($hash);
  }
 
  if ((defined($err)))  { $err .=  " THZ_Get_Com: error found at step1 "; next ;}

# Expectedanswer2     is "1002", DLE data link escape -- STX start of text   

  if ($msg eq "10") { ($err, $msg) = THZ_ReadAnswer($hash);}
  elsif ($msg eq "15") { $err .=  " THZ_Get_Com: error found at step1  NAK!! "; select(undef, undef, undef, 0.1); return($err, $msg) ;}
  if ($msg eq "1002" || $msg eq "02") {
THZ_Write($hash,  "10");     # step2 --> DLE data link escape  // ack datatranfer
($err, $msg) = THZ_ReadAnswer($hash); # Expectedanswer3 // read from the heatpump
THZ_Write($hash,  "10"); 
  }
  if (defined($err))  { $err .= " THZ_Get_Com: error found at step2"; next;}
  else {$success = 1;}
  }
  ($err, $msg) = THZ_decode($msg) if (!defined($err)); #clean up and remove footer and header
  return($err, $msg) ;
}



hi immi,

if you have time, would you give it a try?

VG
Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 07 September 2017, 17:13:23
Hi Andre
Most of the people do not need it; I almost never get an error, but just in case I lose a reading, I get it 60 seconds later.
If you have lots of errors, it means the heatpump is busy; it makes no sense to push the heatpump even more.
If your childrens are crying, let them calm down and repeat the order later  :D

I would prefer a different strategy:
only in case of nonblocking we provide a repeat functionality, 5 seconds later.
In function THZ_GetNBDone we already check  ($msg ne "[ERROR]").
In case of an error we execute the followings 4 lines.

$timedelay=5;
my %par = (  hash => $hash, command => $cmdhash );
RemoveInternalTimer(\%par);
InternalTimer(gettimeofday() + ($timedelay) , "THZ_GetRefresh", \%par, 0);   

The code in red should delete existing timers for the given register; it has to be careully checked.

What do you think?

p.s.
I am on a trip; I will be back next monday.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 08 September 2017, 11:48:54
Hi immi,

ZitatMost of the people do not need it;
Are you shure? A retry handling in case of communication errors could help everyone. Not only in my case.
ZitatI almost never get an error, but just in case I lose a reading, I get it 60 seconds later.
But could also be the next day (interval is allowed to set up to 86400 sec)
ZitatIf you have lots of errors, it means the heatpump is busy; it makes no sense to push the heatpump even more.
That is not completely right. A "timeout rrror" in ReadAnwer only means that no response was received from the THZ. This can also have other causes (packet lost, no sync). In these cases, a repetition of the communication is useful after a certain waiting period has elapsed. My tests showed that after 10 sec a retry was always successful.
ZitatIf your childrens are crying, let them calm down and repeat the order later  :D
agree :)
ZitatI would prefer a different strategy:
only in case of nonblocking we provide a repeat functionality, 5 seconds later.
In function THZ_GetNBDone we already check  ($msg ne "[ERROR]").
In case of an error we execute the followings 4 lines.

$timedelay=5;
my %par = (  hash => $hash, command => $cmdhash );
RemoveInternalTimer(\%par);
InternalTimer(gettimeofday() + ($timedelay) , "THZ_GetRefresh", \%par, 0);   

The code in red should delete existing timers for the given register; it has to be careully checked.

What do you think?
Good idea for the nonblocking part.
I would prefer a more generaly approach for the ErrorHandling, so that also errors, which are recognized by THZ_decode (CRC error, unknown error,...) are handled with a retry of communication.

Besides, I'm no longer convinced that Blocking.pm is the best solution. I have no idea how to prevent the continuous open / close of the IO device. I had already after some days in nonblocking mode a memory problem (maybe memory leak). I could not fork any subprocesses.

In my opinion, it would certainly be the better approach to organize reading operations through the FHEM main loop. This also corresponds more to the normal FHEM design (many other FHEM modules work in this way). The waiting times would then no longer be in the THZ module but would be returned cooperatively to the FHEM main program. You could then wait 10 seconds for a response from THZ without blocking FHEM. This would be very positive for the overall performance of FHEM.

I know this would be a major change, but maybe you can think about it.

Andre

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 08 September 2017, 18:36:06
Zitat von: andre.k am 08 September 2017, 11:48:54
Besides, I'm no longer convinced that Blocking.pm is the best solution. I have no idea how to prevent the continuous open / close of the IO device. I had already after some days in nonblocking mode a memory problem (maybe memory leak). I could not fork any subprocesses.
Hi Andre
Also not sure Blocking.pm is the best solution;  It was nevertheless fun trying.
Many of the issues you named can be fixed; but I really have  no time now;

Apart from blocking.pm, there is also a very elegant solution from boris: SubProcess.pm
You move all comunication tasks to a parallel process always running and hopefully never dying (look at SubProcess.pm from boris)


Zitat
In my opinion, it would certainly be the better approach to organize reading operations through the FHEM main loop.
This approach was my starting point with thz some years ago; but never got it running.. OK It was my fisrt perl script, I am sure I can do better now :)
The main problem with this approach is that you never know when you get the fhem-loop back to THZ_Read  (10 other modules could block fhem loop for too long)
e.g.
I send a 10
THZ_Read waits that the global-fhem-loop gives me a 02 for an undefined time; if your heatpump is fast, this is a problem.

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 13 September 2017, 17:19:36
Hi immi,

I've already looked at the SubProcess.pm. This requires some changes in the THZ module. All DeviceIO operations must be relocated to the child process. The return of THZ's answers to the parent process is then controlled by the global select loop. Synchronous requests to the THZ would then also have to run over the child process etc.
This is quite complex.
Since I do not have so much time, I do not want to put time into a solution that you do not like ;)
Therefore, the question is which way you would go:
1) Blocking.pm
2) SubProcess.pm
3) Global select loop (without child process)

For me runs currently 1) with known drawbacks and 3) without any problems.

Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 September 2017, 12:43:47
Zitat von: andre.k am 13 September 2017, 17:19:36
For me runs currently 1) with known drawbacks and 3) without any problems.
Hi Andre
Have you already implemented and tested 3) ?
If not we can try, but I do not know when I will find time with a clear mind.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 17 September 2017, 17:28:11
Hi Andre
I uploaded v0.170
I started implementing a rudimental version of the loop approach.
Let us see if it is better then nonblocking
if you want to test, uncomment THZ_Testloopapproach in line724

For the user not interested in programming: you will not see any change.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 21 September 2017, 20:38:28
Zitat von: immi am 15 September 2017, 12:43:47
Have you already implemented and tested 3) ?
Hi immi,

sorry for my late answer. Yes I can provide you my code for option 3)
At the moment I use this only for background updates THZ_GetRefresh. For testing only change this line.
      #THZ_Get($hash, $hash->{NAME}, $command) if ($hash->{STATE} ne "disconnected");
      THZ_AddWriteQueue($hash, $command) if ($hash->{STATE} ne "disconnected");

short explanation:
I did not touch the get/set funtionality for sychronous communication.
I only changed one function (THZ_Read).
All other funtions are additionaly.
Basicly I impelmented a state machine to handle different communication steps in $hash->{helper}{COMSTAT}
(start/command/confirm/response).
and a write queue $hash->{helper}{QUEUE} for THZ commands (currently only get commands)

ToDos:
Here is the complete code:
########################################################################################
# sub THZ_Read($)
# called from the global loop, when the select for hash reports data
########################################################################################
sub THZ_Read($) {
  my ($hash) = @_;

  my $buf = DevIo_SimpleRead($hash);
  return "" if(!defined($buf));

  my $name = $hash->{NAME};
  my $state = $hash->{helper}{COMSTAT};
  my $data = $hash->{PARTIAL} . uc(unpack('H*', $buf));
  Log3 $name, 5, "[$name] read ($state): $data";
 
  if ($state eq "start") {
    # start of communication "02" sent; wait for acknowledge "10"
    if ($data eq "10") {
      $hash->{helper}{COMSTAT} = "command";
      THZ_HandleWriteQueue($hash);
    }
    elsif ($data eq "15") {
      # THZ is busy
      Log3 $hash, 3, "[$name] NAK received at state: $state";
      # wait still for "02"
      $hash->{helper}{COMSTAT} = "confirm";
    }
  }
  elsif ($state eq "command") {
    # THZ_command sent; wait for ACK
    if ($data eq "10") {
      $hash->{helper}{COMSTAT} = "confirm";
    }
    elsif ($data eq "1002") {
      $hash->{helper}{COMSTAT} = "confirm";
      THZ_HandleWriteQueue($hash);
    }
    elsif ($data eq "15") {
      # THZ is busy; never seen at this state
      Log3 $hash, 3, "[$name] NAK received at state: $state";
    }
  }
  elsif ($state eq "confirm") {
    # wait for STX
    if ($data eq "02") {
      THZ_HandleWriteQueue($hash);
    }
  }
  elsif ($state eq "response") {
    # wait for response
    if ($data =~ m/1003$/) {
      # valid response packet received, write acknowledge
      THZ_HandleWriteQueue($hash);
      RemoveInternalTimer($hash, "THZ_TimeoutCommunication");
      # parse response, update readings, shift queue and start next command
      THZ_HandleResponse($hash, $data);
    }
    else {
      # save the partial data
      $hash->{PARTIAL} = $data;
    }
  }
}


########################################################################################
# sub THZ_HandleResponse($$)
# decode and parse response message and update reading
# error handling
########################################################################################
sub  THZ_HandleResponse($$) {
  my ($hash, $msg) = @_;
  my $name = $hash->{NAME};
  my ($err, $dmsg) = THZ_decode($msg);
  if (defined($err)) {
    Log3 $hash, 3, "[$name] THZ_HandleResponse: $err";
    THZ_RetryCommunication($hash);
  }
  else{
    my $rval = THZ_Parse1($hash, $dmsg);
    my $rname = $hash->{helper}{QUEUE}[0];
    Log3 $hash, 5, "[$name] THZ_HandleResponse: $rname - $rval";
    readingsSingleUpdate($hash, $rname, $rval, 1);
    THZ_ResetCommunication($hash);
  }
}


########################################################################################
# sub THZ_HandleWriteQueue($)
# handle the write queue depending from communication status
# the queue is an array of THZ commands (get or set)
########################################################################################
sub THZ_HandleWriteQueue($) {
  my ($hash) = @_;
  my $arr = $hash->{helper}{QUEUE};
  my $name = $hash->{NAME};
  my $state = $hash->{helper}{COMSTAT};
 
  return if ($hash->{STATE} ne "opened");

  if(defined($arr) && @{$arr} > 0) {
    my $cmd = $arr->[0];
    my $cmdhash = $gets{$cmd};
    # TODO: handling of double commands cmd2/cmd3
    while  (!defined ($cmdhash->{cmd2}) or defined ($cmdhash->{cmd3})) {
      # skip commands with parent but without cmd2
      if (THZ_ShiftWriteQueue($hash) == 0) {
        delete($hash->{helper}{COMSTAT});
        return;
      }
      $cmd = $arr->[0];
      $cmdhash = $gets{$cmd};
    }
    Log3 $hash, 5, "[$name] write queue ($state) for command: $cmd";
    if ($state eq "start") {
      # start communication
      DevIo_SimpleWrite($hash, "02", 1);
      # start timer
      my $to = (AttrVal($name, "simpleReadTimeout", "10"));
      InternalTimer(gettimeofday() + $to, "THZ_TimeoutCommunication", $hash);
    }
    elsif ($state eq "command") {
      # write command
      # TODO: set commands
      DevIo_SimpleWrite($hash, THZ_encodecommand($cmdhash->{cmd2},"get"), 1);
    }
    elsif ($state eq "confirm") {
      DevIo_SimpleWrite($hash, "10", 1);
      $hash->{helper}{COMSTAT} = "response";
    }
    elsif ($state eq "response") {
      DevIo_SimpleWrite($hash, "10", 1);
      $hash->{helper}{COMSTAT} = "start";
    }
  }
}


########################################################################################
# sub THZ_AddWriteQueue($$)
# add a THZ command to the queue
########################################################################################
sub THZ_AddWriteQueue($$) {
  my ($hash, $cmd) = @_;
  my $name = $hash->{NAME};
  my $arr = $hash->{helper}{QUEUE};

  Log3 $hash, 5, "[$name] add command to write queue: $cmd";
  if(!$arr || 0 == scalar(@{$arr})) {
    # create queue
    $hash->{helper}{QUEUE} = [ $cmd ];
  }
  else {
    # append command to queue
    push(@{$arr}, $cmd);
  }
  if (!defined($hash->{helper}{COMSTAT})) {
    #start communication
    $hash->{helper}{COMSTAT} = "start";
    $hash->{helper}{RETRY} = 1;
    THZ_HandleWriteQueue($hash);
  }
}


########################################################################################
# sub THZ_ShiftWriteQueue($)
# shift write queue
# returns the queue length
########################################################################################
sub THZ_ShiftWriteQueue($) {
  my ($hash) = @_;
  my $name = $hash->{NAME};
  my $arr = $hash->{helper}{QUEUE};

  if(defined($arr) && @{$arr} > 0) {
    # shift queue
    shift(@{$arr});
    my $cmd = defined($arr->[0]) ? $arr->[0] : "(empty)";
    Log3 $hash, 5, "[$name] shift write queue next command: $cmd";
    # delete empty queue
    delete($hash->{helper}{QUEUE}) if(@{$arr} == 0);
    return @{$arr};
  }
  return 0;
}


########################################################################################
# sub THZ_TimeoutCommunication($)
# handle communication timeout
########################################################################################
sub THZ_TimeoutCommunication($) {
  my ($hash) = @_;
  my $name = $hash->{NAME};

  Log3 $hash, 4, "[$name] communication timeout ($hash->{helper}{COMSTAT})";
  THZ_RetryCommunication($hash);
}


########################################################################################
# sub THZ_RetryCommunication($)
# error handling and retry THZ communication
########################################################################################
sub THZ_RetryCommunication($) {
  my ($hash) = @_;
  my $name = $hash->{NAME};
  my $arr = $hash->{helper}{QUEUE};
  my $retry = $hash->{helper}{RETRY};

  if ($retry < 5) {
    Log3 $hash, 4, "[$name] communication retry $retry command: $arr->[0] ($hash->{helper}{COMSTAT})";
    $hash->{helper}{COMSTAT} = "start";
    $hash->{PARTIAL} = "";
    $hash->{helper}{RETRY} += 1;
    THZ_HandleWriteQueue($hash);
  }
  else {
    Log3 $hash, 3, "[$name] communication retry exceeded command: $arr->[0] ($hash->{helper}{COMSTAT})";
    THZ_ResetCommunication($hash);
  }
}


########################################################################################
# sub THZ_ResetCommunication($)
# start next THZ command
########################################################################################
sub THZ_ResetCommunication($) {
  my ($hash) = @_;
  my $name = $hash->{NAME};

  Log3 $hash, 5, "[$name] restart communication";
  # reset communication state
  $hash->{PARTIAL} = "";
  $hash->{helper}{RETRY} = 1;
  delete($hash->{helper}{COMSTAT});
  # shift write queue
  if (THZ_ShiftWriteQueue($hash) > 0) {
    # start next command
    $hash->{helper}{COMSTAT} = "start";
    THZ_HandleWriteQueue($hash) ;
  }
}


Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 25 September 2017, 15:36:43
Hi Andre
thanks for sharing
I will have a look untill the weeek-end
immmi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 06 Oktober 2017, 11:12:09
Hi immi,

could you have a look at the following patch. I' like to add some changes for 2.14 (I'm not sure for 2.xx) firmware:
- parse error messages
- set command to reset errors (this is a setonly register (not readable) , so that some changes in THZ_Set needs to be done (could be useful for all firmaware versions too)
- THZ_Attr needs to be changed to fill the %gets and %sets slightly different

And I would suggest to remove all nonblocking code. It was an nice try, but I think the better way is the loop approach or subprocess.pm. If you want, I can send you a patch for removing the nonblocking code.

Andre

--- 00_THZ.pm 2017-10-05 13:09:56.282148137 +0200
+++ 00_THZ.170.pm 2017-10-06 10:13:55.942628726 +0200
@@ -137,7 +137,7 @@
      [" p03RoomTempStandby: ", 12, 4,  "hex", 10], [" p04DHWsetTempDay: ", 16, 4,  "hex", 10],
      [" p05DHWsetTempNight: ", 20, 4,  "hex", 10], [" p06DHWsetTempStandby: ", 24, 4,  "hex", 10],
      [" p07FanStageDay: ", 28, 2,  "hex", 1], [" p08FanStageNight: ", 30, 2,  "hex", 1],
-       [" p09FanStageStandby: ", 32, 2,  "hex", 1], [" p10RoomTempManual: ", 34, 4,  "hex", 10],
+       [" p09FanStageStandby: ", 32, 2,  "hex", 1], [" p10HCTempManual: ", 34, 4,  "hex", 10],
      [" p11DHWsetTempManual: ", 38, 4,  "hex", 10],  [" p12FanStageManual: ", 42, 2,  "hex", 1],
      ],
   "D1last" => [["number_of_faults: ", 4, 2, "hex", 1],
@@ -193,7 +193,8 @@
      [" heatTemp: ", 20, 4, "hex2int", 10], [" stellgroesse: ", 24, 4, "hex2int", 10],
      [" seasonMode: ", 30, 2, "somwinmode",1], [" opMode: ", 36, 2, "opmodehc", 1]
     ],
-  "F6sys206" => [["LüfterstufeManuell: ", 30, 2, "hex", 1], [" RestlaufzeitLüfter: ", 36, 4, "hex", 1]
+  "F6sys206" => [["UserSetFanStage: ", 30, 2, "hex", 1], [" UserSetFanRemainingTime: ", 36, 4, "hex", 1],
+        [" LastErrors: ", 4, 8, "hex2error", 1],
     ],
   "FBglob" => [["outsideTemp: ", 8, 4, "hex2int", 10], [" flowTemp: ", 12, 4, "hex2int", 10],
      [" returnTemp: ", 16, 4, "hex2int", 10], [" hotGasTemp: ", 20, 4, "hex2int", 10],
@@ -528,7 +529,7 @@
   "p07FanStageDay" => {parent=>"p01-p12", argMin =>   "0", argMax =>    "3", unit =>""},
   "p08FanStageNight" => {parent=>"p01-p12", argMin =>   "0", argMax =>    "3", unit =>""},
   "p09FanStageStandby" => {parent=>"p01-p12", argMin =>   "0", argMax =>    "3", unit =>""},
-  "p10RoomTempManual" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "65", unit =>" °C"},
+  "p10HCTempManual" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "65", unit =>" °C"},
   "p11DHWsetTempManual" => {parent=>"p01-p12", argMin =>  "10", argMax =>   "65", unit =>" °C"},
   "p12FanStageManual"  => {parent=>"p01-p12", argMin =>   "0", argMax =>   "3",        unit =>""},
   "p80EnableSolar"  => {parent=>"pSolar", argMin =>   "0", argMax =>   "1",        unit =>""},
@@ -539,7 +540,9 @@
   "pClockMinutes"      => {parent=>"sTimedate", argMin =>  "0", argMax =>  "59", unit =>""}
  );

-
+my %setsonly214 = (
+  "ResetErrors" => {cmd2=>"F8",     argMin =>   "0", argMax =>  "0", type =>"0clean",  unit =>""}
+);

########################################################################################
#
@@ -636,6 +639,7 @@
my %OpModeHC = ("1" =>"normal", "2" => "setback", "3" =>"standby", "4" =>"restart", "5" =>"restart");
my %SomWinMode = ( "01" =>"winter", "02" => "summer");
my %weekday = ( "0" =>"Monday", "1" => "Tuesday", "2" =>"Wednesday", "3" => "Thursday", "4" => "Friday", "5" =>"Saturday", "6" => "Sunday" );
+my %weekdaymap = ( "1" =>"Mon", "2" => "Tue", "3" =>"Wed", "4" => "Thu", "5" => "Fri", "6" =>"Sat", "7" => "Sun" );
my %faultmap = ( "0" =>"n.a.", "1" => "F01_AnodeFault", "2" => "F02_SafetyTempDelimiterEngaged", "3" => "F03_HighPreasureGuardFault", "4" => "F04_LowPreasureGuardFault", "5" => "F05_OutletFanFault", "6" => "F06_InletFanFault", "7" => "F07_MainOutputFanFault", "11" => "F11_LowPreasureSensorFault", "12"=> "F12_HighPreasureSensorFault", "15" => "F15_DHW_TemperatureFault",  "17" => "F17_DefrostingDurationExceeded", "20" => "F20_SolarSensorFault", "21" => "F21_OutsideTemperatureSensorFault", "22" => "F22_HotGasTemperatureFault", "23" => "F23_CondenserTemperatureSensorFault", "24" => "F24_EvaporatorTemperatureSensorFault", "26" => "F26_ReturnTemperatureSensorFault", "28" => "F28_FlowTemperatureSensorFault", "29" => "F29_DHW_TemperatureSensorFault", "30" => "F30_SoftwareVersionFault", "31" => "F31_RAMfault", "32" => "F32_EEPromFault", "33" => "F33_ExtractAirHumiditySensor", "34" => "F34_FlowSensor", "35" => "F35_minFlowCooling", "36" => "F36_MinFlowRate", "37" => "F37_MinWaterPressure", "40" => "F40_FloatSwitch", "50" => "F50_SensorHeatPumpReturn", "51" => "F51_SensorHeatPumpFlow",  "52" => "F52_SensorCondenserOutlet" );
my $firstLoadAll = 0;
my $noanswerreceived = 0;
@@ -1041,7 +1223,12 @@
   if (defined($err))  {  Log3 $hash->{NAME}, 3, "THZ_Set: Error msg:  $err -- $cmdHex2 -> $msg"; return($cmdHex2 . "-". $msg ."--" . $err);}
   else {
select(undef, undef, undef, 0.25);
- $msg=THZ_Get($hash, $name, $cmd);
+ if defined($gets{$cmd}) {
+    $msg=THZ_Get($hash, $name, $cmd);
+  }
+  else {
+    $msg=$cmd.": OK";
+  }
#take care of program of the week
if ($a[1] =~ /Mo-So/){
    select(undef, undef, undef, 0.05);
@@ -1419,6 +1614,24 @@
   return ($num);
}

+####################################
+#
+# bitmap2string - convert from bitmap to concatenated string
+#
+# parameter: bitmap representing yes/no, hashref to stringmapping
+# returns: concatenated string
+#
+########################################################################################
+sub bitmap2string($$) {
+  my($bitmap, $href) = @_;
+  my $idx = 1;
+  my $res = "";
+  foreach my $bit (split //, $bitmap) {
+    $res .= $href->{$idx} if ($bit);
+    $idx++;
+  }
+  return $res;
+}

####################################
#
@@ -1611,7 +1841,8 @@
       elsif ($Type eq "opmodehc") {$value= $OpModeHC{hex($value)};}
       elsif ($Type eq "esp_mant") {$value= sprintf("%.3f", unpack('f', pack( 'L',  reverse(hex($value)))));}
       elsif ($Type eq "somwinmode") {$value= $SomWinMode{($value)};}
-      elsif ($Type eq "hex2wday") {$value= unpack('b7', pack('H*',$value));}
+      elsif ($Type eq "hex2wday") {$value= bitmap2string(unpack('b7', pack('H*',$value)), \%weekdaymap);}
+      elsif ($Type eq "hex2error") {$value= bitmap2string(unpack('b32', pack('H*',$value)), \%faultmap);}
       elsif ($Type eq "weekday") {$value= $weekday{($value)};}
       elsif ($Type eq "faultmap") {$value= $faultmap{(hex($value))};}
       elsif ($Type eq "quater") {$value= quaters2time($value);}
@@ -1716,8 +1943,8 @@
       }
       elsif ($attrVal eq "2.14") {
         THZ_RemoveInternalTimer("THZ_GetRefresh");
-        %sets = %sets206;
-        %gets = (%getsonly2xx, %getsonly214, %sets);
+        %sets = (%sets206, %setsonly214);
+        %gets = (%getsonly2xx, %getsonly214, %sets206);
         THZ_Refresh_all_gets($hash);
       }
       elsif ($attrVal eq "5.39") {

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 07 Oktober 2017, 11:31:00
Hi Andre
I know I am not making my homeworks, and I quite slow, sorry :)

1)For hex2wday why do you need an additional function?
I do not have the raw data, but something like this should work
elsif ($Type eq "hex2wday") {$value= $weekday{((hex($value) &  0b0007) / 0b0007)};}
or like this
elsif ($Type eq "hex2wday") {$value= unpack('b7', pack('H*',$value));  $value= $weekday{($value)};}



2) writing to F8, a register which you cannot read, looks scary
how did you come to the idea to write to F8 and exactly what value?
if you read F8 what do you get as answer? do you get a 0103 or something else?
0100F9F81003-->0103FCF81003

3) >>And I would suggest to remove all nonblocking code.
still not sure where fhem is going to; I have not decided jet to kill nonblocking in THZ
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 08 Oktober 2017, 21:00:15
Hi immi,

No problem, I always appreciate your effort.

Zitat1)For hex2wday why do you need an additional function?

Because my hex value represents a bit vector, one bit stands for one weekday.
0000011 -> SatSun
1111111 -> MonTueWedThuFriSatSun

I would like to translate the bit vector to a concatenated string of weekdays.

Zitathow did you come to the idea to write to F8 and exactly what value?

I checked this with my service program from Stiebel Eltron. There is a dialog to reset the head pump errors,
which sends  01 80 79 F8 00 10 03.

If I try to read the F8 register/command then I got 0103.

Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 09 Oktober 2017, 21:04:45
Hi Andre
thanks for the explanation
v 0.171 uploaded
I only changed in your code the following
if defined($gets{$cmd}) {
to
if (defined($gets{$cmd})) {
otherwise you get some errors in some per versions
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 11 Oktober 2017, 17:16:36
Hi immi,

many thanks for the new version.

Andre
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Blixman am 24 Oktober 2017, 08:38:39
Hi,

i'm using the THZ module to control my THZ 504. This works very well for nearly a year. Thanks to everyone for development.
Today i tried to display the integralHeat value from sHC1 but its always zero. Maybe the value is stored in another register?
Is there anything i can do to help implementing this?

Thanks!

Blixman
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 24 Oktober 2017, 20:14:18
Zitat von: Blixman am 24 Oktober 2017, 08:38:39
Today i tried to display the integralHeat value from sHC1 but its always zero. Maybe the value is stored in another register?  Is there anything i can do to help implementing this?
Hi Blixman
happy you like fhem and thz
to your question: first I would look to the raw data of your hc1
if you want to better understand the protocol, just start fhem with verbose 5 and get hc1
e.g.

2017.10.24 20:06:21 5: THZ_Get: Try to get 'sHC1'
2017.10.24 20:06:21 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2017.10.24 20:06:21 5: Mythz sending 02
2017.10.24 20:06:21 5: SW: 02
2017.10.24 20:06:21 5: Mythz start Function THZ_ReadAnswer
2017.10.24 20:06:21 5: THZ_ReadAnswer: uc unpack: '10'
2017.10.24 20:06:21 5: Mythz sending 0100F5F41003
2017.10.24 20:06:21 5: SW: 0100F5F41003
2017.10.24 20:06:21 5: Mythz start Function THZ_ReadAnswer
2017.10.24 20:06:21 5: THZ_ReadAnswer: uc unpack: '1002'
2017.10.24 20:06:21 5: Mythz sending 10
2017.10.24 20:06:21 5: SW: 10
2017.10.24 20:06:21 5: Mythz start Function THZ_ReadAnswer
2017.10.24 20:06:21 5: THZ_ReadAnswer: uc unpack: '010064F40088FF6700FA000500FA00FE00F900010001000000650100000000E10000160000E500013616001003'
2017.10.24 20:06:21 5: Mythz sending 10
2017.10.24 20:06:21 5: SW: 10
2017.10.24 20:06:21 5: Parse message: 64F40088FF6700FA000500FA00FE00F900010001000000650100000000E10000160000E50001361600
2017.10.24 20:06:21 5: Message length: 82

the interpretation of HC1 register F4 is implemented in lines 164-176 of 00_THZ.pm
maybe you have a different encoding
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 24 Oktober 2017, 20:21:56
interesting; looking in the statistics I find a nice variety
2.06_02.06
2.06_02.15
4.39t04.39HW74SW2.08
5.39_05.19HW113SW3.16
5.39_05.39HW113SW3.16
n.a._04.09HW72SW2.08
n.a._04.19HW73SW2.08
n.a._04.39HW74SW2.06
n.a._04.39HW74SW2.08
n.a._04.39HW74SW2.11
n.a._05.09HW113SW3.16
n.a._05.19HW113SW3.12
n.a._07.19HW242SW7.01

and I see for the first time a 7.xx
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Blixman am 25 Oktober 2017, 06:58:08
Hello again,

many thanks for your support. Since yesterday, there must be another version in the statistics: n.a._07.59HW98SW4.02. This is my THZ 540.
I just did what you mentioned, but i think that the value of integralHeat is not in the parsed message. Here is an excerpt of my logfile at verbose  5 an get sHC1:

2017.10.25 06:32:03 5: THZ_Get: Try to get 'sHC1'
2017.10.25 06:32:03 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2017.10.25 06:32:03 5: THZ504 sending 02
2017.10.25 06:32:03 5: SW: 02
2017.10.25 06:32:03 5: THZ504 start Function THZ_ReadAnswer
2017.10.25 06:32:03 5: THZ_ReadAnswer: uc unpack: '10'
2017.10.25 06:32:03 5: THZ504 sending 0100F5F41003
2017.10.25 06:32:03 5: SW: 0100F5F41003
2017.10.25 06:32:03 5: THZ504 start Function THZ_ReadAnswer
2017.10.25 06:32:03 5: THZ_ReadAnswer: uc unpack: '10'
2017.10.25 06:32:03 5: THZ504 start Function THZ_ReadAnswer
2017.10.25 06:32:03 5: THZ_ReadAnswer: uc unpack: '02'
2017.10.25 06:32:03 5: THZ504 sending 10
2017.10.25 06:32:03 5: SW: 10
2017.10.25 06:32:03 5: THZ504 start Function THZ_ReadAnswer
2017.10.25 06:32:03 5: THZ_ReadAnswer: uc unpack: '0100ACF400A20000012A000001440064013100000002101008006402000000009600FB000000E70000000000171003'
2017.10.25 06:32:03 5: THZ504 sending 10
2017.10.25 06:32:03 5: SW: 10
2017.10.25 06:32:03 5: Parse message: ACF400A20000012A0000014400640131000000021008006402000000009600FB000000E7000000000017
2017.10.25 06:32:03 5: Message length: 84


Here you can see the values shown in fhem:
outsideTemp: 16.2 x08: 0 returnTemp: 29.8 integralHeat: 0 flowTemp: 32.4 heatSetTemp: 10 heatTemp: 30.5 seasonMode: summer integralSwitch: 100 opMode: setback roomSetTemp: 15 x60: 25.1 x64: 0 insideTempRC: 23.1 x72: 0 x76: 0 onHysteresisNo: 0 offHysteresisNo: 0 HCBoosterStage: 0

So i tried to interpret the received message:

ACF4
outsideTemp:         00A2
x08: 0000
returnTemp: 012A
integralHeat:         0000
flowTemp: 0144
heatSetTemp:         0064
heatTemp: 0131
onHysteresisNo:         00
offHysteresisNo:        00
HCBoosterstage:         00
seasonMode: 02
x40: 1008
integralSwitch:         0064
opMode: 02
x50:         00
x52: 0000
roomSetTemp:         0096
x60: 00FB
x64: 0000
insideTempRC:         00E7
x72: 0000
x76: 0000
x80: 0017


The first thing that is different is the message length, mine is 84, yours is 82.  The value for integralHeat is always '0000'. Maybe x80: 0017 (23) is the value i'm looking for?

Any suggestions for finding the integralHeat value?

Thanks in advance.

Blixman
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 25 Oktober 2017, 07:41:00
Zitat von: Blixman am 25 Oktober 2017, 06:58:08
Any suggestions for finding the integralHeat value?
If it's there in HC1, it should be rather easy to find:
In winter mode the value decreases whenever heatpump is off and circuitpump is on.
It's freezed when heatpump and circuitpump are off.
It's set to 0 when heatpump is switched on.
It increases when heatpump and circuitpump are on.
It's set to 0 when heatpump is switched off.

So you only have to dump the value several times (for example when heatpump is on, do it every 5min) and check which value increases.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: philipp_b am 25 Oktober 2017, 07:56:03
Ich logge seit gestern meine LWZ 504 und das integralHeat zeigt bei mir auch immer 0 an.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 25 Oktober 2017, 20:04:25
Zitat von: Blixman am 25 Oktober 2017, 06:58:08
The first thing that is different is the message length, mine is 84, yours is 82.  The value for integralHeat is always '0000'. Maybe x80: 0017 (23) is the value i'm looking for?
Hi Blixman
it looks you understood perfectly how the decoding works.
I already saw different lenghts between older and newer tecalors.
The first versions of 00_THZ.pm crashed for some users, because I was sometimes looking outside a buffer :)

in order to validate your assumption you have to:

1) look at the display of the heatpump and compare it to the reading.
if you are lucky it is in this register, if not you, have to look in the other registers (as you maybe know, there are hundreds).

2) ask tecalor for a documentation

3) if you have a copy of the new service software, you play "man in the middle"

options 1 and 3 got us where we are.
up to now, there wasn't any help from tecalor :(

if you find out a special encoding for 07.59 ,  I can implement it with a dedicated attribute 
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Blixman am 26 Oktober 2017, 08:42:22
Hello and thanks to everyone,

i tried to get the service software but the support only said that i have to buy the ISG Module.
But i will not give up.
Right now i am generating an overview of all registers and parameters for
the THZ504 to hopefully implement it in 00_THZ.pm in the future. This is a lot of work.
I also think, that the integralHeat value must be in another register than sHC1.

@immi: I'd like to read register F7, is there a command to read a register which is not yet implemented in 00_THZ.pm? Otherwise i can read it with a terminal program or temporarily change F4 to F7 when getting sHC1.

When there are news, i will post it here.

Blixman

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 26 Oktober 2017, 15:56:59
Zitat von: Blixman am 26 Oktober 2017, 08:42:22
@immi: I'd like to read register F7, is there a command to read a register which is not yet implemented in 00_THZ.pm? Otherwise i can read it with a terminal program or temporarily change F4 to F7 when getting sHC1.
look at  code in sub THZ_debugread($)
e.g. edit line 1679
type "get Mythz debug_read_raw_register_slow"
and a file called data.txt is created containing a report of all register you want to look at
this is a usefull function to investigate several hundreds of registers in a batch
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 25 November 2017, 18:23:49
Hi immi,

I'am actually playing with FTUI and I would like to set some more parameters via the GUI. I added these new set commands for 2.xx firmware. If you have time could you please have a look at the following patch.
--- 00_THZ.pm 2017-11-13 22:46:22.958567457 +0100
+++ 00_THZ.171.pm 2017-11-25 17:33:35.547658427 +0100
@@ -1,8 +1,8 @@
-##############################################
+##############################################
# 00_THZ
# $Id: 00_THZ.pm 15219 2017-10-09 19:01:39Z immi $
# by immi 10/2017
-my $thzversion = "0.171";
+my $thzversion = "0.171a";
# this code is based on the hard work of Robert; I just tried to port it
# http://robert.penz.name/heat-pump-lwz/
########################################################################################
@@ -75,7 +75,7 @@
      [" p46UnschedVent0: ", 28, 4, "hex", 1], [" p75PassiveCooling: ", 32, 2, "hex", 1]
      ],
   "03pxx206" => [["UpTempLimitDefrostEvaporatorEnd: ", 4, 4, "hex", 10],  [" MaxTimeDefrostEvaporator: ", 8, 4, "hex", 1], [" LimitTempCondenserElectBoost: ", 12, 4, "hex", 10],
-       [" LimitTempCondenserDefrostTerm: ", 16, 4, "hex", 10],   [" CompressorRestartDelay: ", 20, 2, "hex", 1], [" MainFanSpeed: ", 22, 2, "hex", 1]
+       [" LimitTempCondenserDefrostTerm: ", 16, 4, "hex", 10],   [" p47CompressorRestartDelay: ", 20, 2, "hex", 1], [" p48MainFanSpeed: ", 22, 2, "hex", 1]
      ],
   "04pxx206" => [["MaxDefrostDurationAAExchenger: ", 4, 2, "hex", 1], [" DefrostStartThreshold: ", 6, 4, "hex", 10], [" VolumeFlowFilterReplacement: ", 10, 4, "hex", 1]
      ],
@@ -88,11 +88,11 @@
      [" p24Hyst4: ", 10, 2, "hex", 10], [" p25Hyst5: ", 12, 2, "hex", 10],   [" p26Hyst6: ", 14, 2, "hex", 10],
      [" p27Hyst7: ", 16, 2, "hex", 10], [" p28Hyst8: ", 18, 2, "hex", 10],   [" p29HystAsymmetry: ", 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, "hex2int", 10], [" p79ReHeatingDelay: ", 48, 2, "hex", 1]
+       [" p49SummerModeTemp: ", 32, 4, "hex", 10], [" p50SummerModeHysteresis: ", 36, 4, "hex", 10], [" p77OutTempFilterTime: ", 40, 4, "hex", 1],
+       [" p78DualModePoint: ", 44, 4, "hex2int", 10], [" p79BoosterTimeoutHC: ", 48, 2, "hex", 1]
      ],
   "07pxx206" => [["p32HystDHW: ", 4, 2, "hex", 10], [" p33BoosterTimeoutDHW: ", 6, 2, "hex", 1], [" p34TempLimitBoostDHW: ", 8, 4, "hex2int", 10],    [" p35PasteurisationInterval: ", 12, 2, "hex", 1],
-       [" p36MaxDurationDHWLoad: ", 14, 2, "hex", 1], [" PasteurisationTemp: ", 16, 4, "hex", 10], [" MaxBoostStagesDHW: ", 20, 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],
@@ -109,16 +109,33 @@
   "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]
      ],
-  "0Bpxx206" => [["pHTG1StartTime: ", 4, 4, "hex2time", 1], [" pHTG1EndTime: ", 8, 4, "hex2time", 1], [" pHTG1Weekdays: ", 12, 2, "hex2wday", 1],
-       [" pHTG1Enable: ", 14, 2, "hex", 1], [" pHTG2StartTime: ", 16, 4, "hex2time", 1], [" pHTG2EndTime: ", 20, 4, "hex2time", 1],
-       [" pHTG2Weekdays: ", 24, 2, "hex2wday", 1], [" pHTG2Enable: ", 26, 2, "hex", 1]
+  "0Bpxx206" => [["progHC1StartTime: ", 4, 4, "hex2time", 1], [" progHC1EndTime: ", 8, 4, "hex2time", 1],
+       [" progHC1Monday: ", 13, 1, "bit0", 1], [" progHC1Tuesday: ", 13, 1, "bit1", 1],
+   [" progHC1Wednesday: ", 13, 1, "bit2", 1], [" progHC1Thursday: ", 13, 1, "bit3", 1],
+   [" progHC1Friday: ", 12, 1, "bit0", 1], [" progHC1Saturday: ", 12, 1, "bit1", 1],
+   [" progHC1Sunday: ", 12, 1, "bit2", 1], [" progHC1Enable: ", 14, 2, "hex", 1],
+       [" progHC2StartTime: ", 16, 4, "hex2time", 1], [" progHC2EndTime: ", 20, 4, "hex2time", 1],
+       [" progHC2Monday: ", 25, 1, "bit0", 1], [" progHC2Tuesday: ", 25, 1, "bit1", 1],
+   [" progHC2Wednesday: ", 25, 1, "bit2", 1], [" progHC2Thursday: ", 25, 1, "bit3", 1],
+   [" progHC2Friday: ", 24, 1, "bit0", 1], [" progHC2Saturday: ", 24, 1, "bit1", 1],
+   [" progHC2Sunday: ", 24, 1, "bit2", 1], [" progHC2Enable: ", 26, 2, "hex", 1]
+       ],
+  "0Cpxx206" => [["progDHWStartTime: ", 4, 4, "hex2time", 1], [" progDHWEndTime: ", 8, 4, "hex2time", 1],
+       [" progDHWMonday: ", 13, 1, "bit0", 1], [" progDHWTuesday: ", 13, 1, "bit1", 1],
+   [" progDHWWednesday: ", 13, 1, "bit2", 1], [" progDHWThursday: ", 13, 1, "bit3", 1],
+   [" progDHWFriday: ", 12, 1, "bit0", 1], [" progDHWSaturday: ", 12, 1, "bit1", 1],
+   [" progDHWSunday: ", 12, 1, "bit2", 1], [" progDHWEnable: ", 14, 2, "hex", 1],
      ],
-  "0Cpxx206" => [["pDHWStartTime: ", 4, 4, "hex2time", 1], [" pDHWEndTime: ", 8, 4, "hex2time", 1], [" pDHWWeekdays: ", 12, 2, "hex2wday", 1],
-       [" pDHWEnable: ", 14, 2, "hex", 1],
-       ],
-  "0Dpxx206" => [["pFAN1StartTime: ", 4, 4, "hex2time", 1], [" pFAN1EndTime: ", 8, 4, "hex2time", 1], [" pFAN1Weekdays: ", 12, 2, "hex2wday", 1],
-       [" pFAN1Enable: ", 14, 2, "hex", 1], [" pFAN2StartTime: ", 16, 4, "hex2time", 1], [" pFAN2EndTime: ", 20, 4, "hex2time", 1],
-       [" pFAN2Weekdays: ", 24, 2, "hex2wday", 1], [" pFAN2Enable: ", 26, 2, "hex", 1]
+  "0Dpxx206" => [["progFAN1StartTime: ", 4, 4, "hex2time", 1], [" progFAN1EndTime: ", 8, 4, "hex2time", 1],
+       [" progFAN1Monday: ", 13, 1, "bit0", 1], [" progFAN1Tuesday: ", 13, 1, "bit1", 1],
+   [" progFAN1Wednesday: ", 13, 1, "bit2", 1], [" progFAN1Thursday: ", 13, 1, "bit3", 1],
+   [" progFAN1Friday: ", 12, 1, "bit0", 1], [" progFAN1Saturday: ", 12, 1, "bit1", 1],
+   [" progFAN1Sunday: ", 12, 1, "bit2", 1], [" progFAN1Enable: ", 14, 2, "hex", 1],
+       [" progFAN2StartTime: ", 16, 4, "hex2time", 1], [" progFAN2EndTime: ", 20, 4, "hex2time", 1],
+       [" progFAN2Monday: ", 25, 1, "bit0", 1], [" progFAN2Tuesday: ", 25, 1, "bit1", 1],
+   [" progFAN2Wednesday: ", 25, 1, "bit2", 1], [" progFAN2Thursday: ", 25, 1, "bit3", 1],
+   [" progFAN2Friday: ", 24, 1, "bit0", 1], [" progFAN2Saturday: ", 24, 1, "bit1", 1],
+   [" progFAN2Sunday: ", 24, 1, "bit2", 1], [" progFAN2Enable: ", 26, 2, "hex", 1]
      ],
   "0Epxx206" => [["p59RestartBeforeSetbackEnd: ", 4, 4, "hex", 1]
      ],
@@ -127,10 +144,9 @@
   "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]
      ],
-  "16sol" => [["collector_temp: ", 4, 4, "hex2int", 10], [" dhw_temp: ", 8, 4, "hex2int", 10],
-       [" flow_temp: ", 12, 4, "hex2int", 10], [" ed_sol_pump_temp: ", 16, 4, "hex2int", 10],
-       [" x20: ", 20, 4, "hex2int", 1], [" x24: ", 24, 4, "hex2int", 1],
-       [" x28: ", 28, 4, "hex2int", 1], [" x32: ", 32, 2, "hex2int", 1]
+  "16sol" => [["collectorTemp: ", 4, 4, "hex2int", 10], [" dhwTemp: ", 8, 4, "hex2int", 10],
+       [" flowTemp: ", 12, 4, "hex2int", 10], [" edSolPump: ", 16, 2, "hex2int", 1],
+       [" out: ", 26, 4, "raw", 1], [" status: ", 30, 2, "raw", 1]
      ],
   "17pxx206" => [["p01RoomTempDay: ", 4, 4,  "hex",  10], [" p02RoomTempNight: ", 8,  4, "hex", 10],
      [" p03RoomTempStandby: ", 12, 4,  "hex", 10], [" p04DHWsetTempDay: ", 16, 4,  "hex", 10],
@@ -151,49 +167,48 @@
      [" fault2CODE: ", 32, 4, "faultmap", 1], [" fault2TIME: ", 36, 4, "hex2time", 1],  [" fault2DATE: ", 40, 4, "hexdate", 1],
      [" fault3CODE: ", 44, 4, "faultmap", 1], [" fault3TIME: ", 48, 4, "hex2time", 1],  [" fault3DATE: ", 52, 4, "hexdate", 1]
      ],
-  "EEprg206" => [["OpMode: ", 4, 2, "hex", 1], [" ProgStateHC: ", 10, 2, "opmodehc", 1], [" ProgStateDHW: ", 12, 2, "opmodehc", 1],
+  "EEprg206" => [["opMode: ", 4, 2, "opmode2", 1], [" ProgStateHC: ", 10, 2, "opmodehc", 1], [" ProgStateDHW: ", 12, 2, "opmodehc", 1],
      [" ProgStateFAN: ", 14, 2, "opmodehc", 1], [" BaseTimeAP0: ", 16, 8, "hex", 1], [" StatusAP0: ", 24, 2, "hex", 1],
      [" StartTimeAP0: ", 26, 8, "hex", 1], [" EndTimeAP0: ", 34, 8, "hex", 1]
      ],
-  "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],
-       [" BoosterStage: ", 28, 2, "hex", 1], [" x30: ", 30, 4, "hex", 1],
-       [" opMode: ", 34, 2, "opmodehc", 1], [" x36: ", 36, 4, "hex", 1]
+  "F3dhw"  => [["dhwTemp: ", 4, 4, "hex2int", 10], [" outsideTemp: ", 8, 4, "hex2int", 10],
+       [" dhwSetTemp: ", 12, 4, "hex2int", 10],  [" compBlockTime: ", 16, 4, "hex2int", 1],
+       [" out: ", 20, 4, "raw", 1], [" heatBlockTime: ", 24, 4, "hex2int", 1],
+       [" dhwBoosterStage: ", 28, 2, "hex", 1], [" pasteurisationMode: ", 32, 2, "hex", 1],
+       [" dhwOpMode: ", 34, 2, "opmodehc", 1], [" x36: ", 36, 4, "raw", 1]
        ],
   "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],
+       [" 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]
+       [" hcBoosterStage: ", 36, 2, "hex", 1]
     ],
-  "F4hc1214"  => [["outsideTemp: ", 4, 4, "hex2int", 10], [" x08: ", 8, 4, "hex2int", 10],
+  "F4hc1214"  => [["outsideTemp: ", 4, 4, "hex2int", 10], [" x08: ", 8, 4, "raw", 1],
      [" 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],
+       [" seasonMode: ", 38, 2, "somwinmode", 1],
+       [" integralSwitch: ", 44, 4, "hex2int", 1], [" hcOpMode: ", 48, 2, "opmodehc", 1],
      [" roomSetTemp: ", 62, 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],
+       [" x64: ", 64, 4, "raw", 1],      [" insideTempRC: ",     68, 4, "hex2int", 10],
+       [" x72: ", 72, 4, "raw", 1],      [" x76: ", 76, 4, "raw", 1],
      [" onHysteresisNo: ", 32, 2, "hex", 1], [" offHysteresisNo: ", 34, 2, "hex", 1],
-       [" HCBoosterStage: ", 36, 2, "hex", 1]
+       [" hcBoosterStage: ", 36, 2, "hex", 1]
     ],
   "F5hc2"  => [["outsideTemp: ", 4, 4, "hex2int", 10], [" returnTemp: ", 8, 4, "hex2int", 10],
      [" vorlaufTemp: ", 12, 4, "hex2int", 10],  [" heatSetTemp: ", 16, 4, "hex2int", 10],
      [" heatTemp: ", 20, 4, "hex2int", 10], [" stellgroesse: ", 24, 4, "hex2int", 10],
-       [" seasonMode: ", 30, 2, "somwinmode",1], [" opMode: ", 36, 2, "opmodehc", 1]
+       [" seasonMode: ", 30, 2, "somwinmode",1], [" hcOpMode: ", 36, 2, "opmodehc", 1]
     ],
-  "F6sys206" => [["UserSetFanStage: ", 30, 2, "hex", 1], [" UserSetFanRemainingTime: ", 36, 4, "hex", 1],
-       [" LastErrors: ", 4, 8, "hex2error", 1],
+  "F6sys206" => [["userSetFanStage: ", 30, 2, "hex", 1], [" userSetFanRemainingTime: ", 36, 4, "hex", 1],
+       [" lastErrors: ", 4, 8, "hex2error", 1],
       ],
   "FBglob" => [["outsideTemp: ", 8, 4, "hex2int", 10], [" flowTemp: ", 12, 4, "hex2int", 10],
      [" returnTemp: ", 16, 4, "hex2int", 10], [" hotGasTemp: ", 20, 4, "hex2int", 10],
@@ -214,7 +229,7 @@
      [" dewPoint: ", 82, 4, "hex2int", 10],
      [" P_Nd: ", 86, 4, "hex2int", 100], [" P_Hd: ", 90, 4, "hex2int", 100],
      [" actualPower_Qc: ", 94, 8, "esp_mant", 1], [" actualPower_Pel: ", 102, 8, "esp_mant", 1],
-       [" collectorTemp: ", 4,  4, "hex2int", 10], [" insideTemp: ", 32, 4, "hex2int", 10] #, [" x84: ", 84, 4, "donottouch", 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],
@@ -225,17 +240,17 @@
      [" 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],
-       [" boosterStage1: ", 44, 1, "bit1", 1],      [" highPressureSensor: ", 49, 1, "n.a.", 1],
-       [" lowPressureSensor: ", 49, 1, "n.a.", 1],      [" evaporatorIceMonitor: ", 49, 1, "n.a.", 1],
-       [" signalAnode: ", 49, 1, "n.a.", 1],      [" evuRelease: ", 48, 1, "n.a.", 1],
-       [" ovenFireplace: ", 48, 1, "n.a.", 1],      [" STB: ", 48, 1, "n.a.", 1],
-       [" outputVentilatorPower: ",48, 2, "hex", 1],  [" inputVentilatorPower: ", 50, 2, "hex", 1], [" mainVentilatorPower: ", 52, 2, "hex", 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],
-       [" outside_tempFiltered: ",64, 4, "hex2int", 10], [" relHumidity: ", 70, 4, "n.a.", 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] #, [" x84: ", 84, 4, "donottouch", 1]
+       [" collectorTemp: ", 4,  4, "hex2int", 10],     [" insideTemp: ", 32, 4, "hex2int", 10]
      ],
   "FCtime" => [["Weekday: ", 5, 1,  "weekday", 1],     [" Hour: ", 6, 2, "hex", 1],
      [" Min: ", 8, 2,  "hex", 1],             [" Sec: ", 10, 2, "hex", 1],
@@ -519,25 +534,118 @@
   

my %sets206 = (
-  "p01RoomTempDay"     => {parent=>"p01-p12",      argMin =>  "10", argMax =>  "30", unit =>" °C"},
-  "p02RoomTempNight" => {parent=>"p01-p12",      argMin =>  "10", argMax =>  "30", unit =>" °C"},
-  "p03RoomTempStandby" => {parent=>"p01-p12",      argMin =>  "10", argMax =>  "30", unit =>" °C"},
-  "p04DHWsetTempDay" => {parent=>"p01-p12",      argMin =>  "10", argMax =>  "55", unit =>" °C"},
-  "p05DHWsetTempNight" => {parent=>"p01-p12",      argMin =>  "10", argMax =>  "55", unit =>" °C"},
-  "p06DHWsetTempStandby"=> {parent=>"p01-p12",      argMin =>  "10", argMax =>  "55", unit =>" °C"},
-  "p07FanStageDay"     => {parent=>"p01-p12",      argMin =>   "0", argMax =>   "3", unit =>""},
-  "p08FanStageNight" => {parent=>"p01-p12",      argMin =>   "0", argMax =>   "3", unit =>""},
-  "p09FanStageStandby" => {parent=>"p01-p12",      argMin =>   "0", argMax =>   "3", unit =>""},
-  "p10HCTempManual"     => {parent=>"p01-p12",      argMin =>  "10", argMax =>  "65", unit =>" °C"},
-  "p11DHWsetTempManual" => {parent=>"p01-p12",      argMin =>  "10", argMax =>  "65", unit =>" °C"},
-  "p12FanStageManual"   => {parent=>"p01-p12",      argMin =>   "0", argMax =>   "3", unit =>""},
-  "p80EnableSolar"      => {parent=>"pSolar",       argMin =>   "0", argMax =>   "1", unit =>""},
-  "pClockDay"           => {parent=>"sTimedate",    argMin =>   "1", argMax =>  "31", unit =>""},
-  "pClockMonth"         => {parent=>"sTimedate",    argMin =>   "1", argMax =>  "12", unit =>""},
-  "pClockYear"          => {parent=>"sTimedate",    argMin =>  "12", argMax =>  "20", unit =>""},
-  "pClockHour"          => {parent=>"sTimedate",    argMin =>   "0", argMax =>  "23", unit =>""},
-  "pClockMinutes"       => {parent=>"sTimedate",    argMin =>   "0", argMax =>  "59", unit =>""}
- );
+  "p01RoomTempDay"         => {parent=>"p01-p12",      argMin => "10", argMax =>  "30", unit =>" °C"},
+  "p02RoomTempNight"         => {parent=>"p01-p12",      argMin => "10", argMax =>  "30", unit =>" °C"},
+  "p03RoomTempStandby"         => {parent=>"p01-p12",      argMin => "10", argMax =>  "30", unit =>" °C"},
+  "p04DHWsetTempDay"         => {parent=>"p01-p12",      argMin => "10", argMax =>  "55", unit =>" °C"},
+  "p05DHWsetTempNight"         => {parent=>"p01-p12",      argMin => "10", argMax =>  "55", unit =>" °C"},
+  "p06DHWsetTempStandby"        => {parent=>"p01-p12",      argMin => "10", argMax =>  "55", unit =>" °C"},
+  "p07FanStageDay"         => {parent=>"p01-p12",      argMin => "0", argMax =>   "3", unit =>""},
+  "p08FanStageNight"         => {parent=>"p01-p12",      argMin => "0", argMax =>   "3", unit =>""},
+  "p09FanStageStandby"         => {parent=>"p01-p12",      argMin => "0", argMax =>   "3", unit =>""},
+  "p10HCTempManual"         => {parent=>"p01-p12",      argMin => "10", argMax =>  "65", unit =>" °C"},
+  "p11DHWsetTempManual"         => {parent=>"p01-p12",      argMin => "10", argMax =>  "65", unit =>" °C"},
+  "p12FanStageManual"           => {parent=>"p01-p12",      argMin => "0", argMax =>   "3", unit =>""},
+  "p13GradientHC1"     => {parent=>"pHeat1", argMin => "0", argMax =>   "5", unit =>""},
+  "p14LowEndHC1"     => {parent=>"pHeat1", argMin => "0", argMax =>  "20", unit =>" K"},
+  "p15RoomInfluenceHC1" => {parent=>"pHeat1", argMin => "0", argMax =>  "10", unit =>""},
+  "p16GradientHC2"     => {parent=>"pHeat1", argMin => "0", argMax =>   "5", unit =>""},
+  "p17LowEndHC2"     => {parent=>"pHeat1", argMin => "0", argMax =>  "10", unit =>" K"},
+  "p18RoomInfluenceHC2" => {parent=>"pHeat1", argMin => "0", argMax =>  "10", unit =>""},
+  "p19FlowProportionHC1" => {parent=>"pHeat1", argMin => "0", argMax => "100", unit =>" %"},
+  "p20FlowProportionHC2" => {parent=>"pHeat1", argMin => "0", argMax => "100", unit =>" %"},
+  "p21Hyst1"     => {parent=>"pHeat2", argMin => "0", argMax =>   "10", unit =>" K"},
+  "p22Hyst2"     => {parent=>"pHeat2", argMin => "0", argMax =>   "10", unit =>" K"},
+  "p23Hyst3"     => {parent=>"pHeat2", argMin => "0", argMax =>    "5", unit =>" K"},
+  "p24Hyst4"     => {parent=>"pHeat2", argMin => "0", argMax =>    "5", unit =>" K"},
+  "p25Hyst5"     => {parent=>"pHeat2", argMin => "0", argMax =>    "5", unit =>" K"},
+  "p29HystAsymmetry" => {parent=>"pHeat2", argMin => "1", argMax =>    "5", unit =>""},
+  "p30integralComponent" => {parent=>"pHeat2", argMin => "10", argMax =>  "999", unit =>" Kmin"},
+  "p32HystDHW"     => {parent=>"pDHW", argMin => "2", argMax =>   "10", unit =>" K"},
+  "p33BoosterTimeoutDHW" => {parent=>"pDHW", argMin => "0", argMax =>  "240", unit =>" min"},
+  "p34TempLimitBoostDHW"    => {parent=>"pDHW", argMin => "-10", argMax =>   "10", unit =>" °C"},
+  "p35PasteurisationInterval"  => {parent=>"pDHW", argMin => "3", argMax =>   "30", unit =>" Tage"},
+  "p36MaxDurationDHWLoad"    => {parent=>"pDHW", argMin => "6", argMax =>   "12", unit =>" h"},
+  "p37Fanstage1AirflowInlet" => {parent=>"pFan", argMin => "60", argMax =>  "250", unit =>" m3/h"},
+  "p38Fanstage2AirflowInlet" => {parent=>"pFan", argMin => "60", argMax =>  "250", unit =>" m3/h"},
+  "p39Fanstage3AirflowInlet" => {parent=>"pFan", argMin => "60", argMax =>  "250", unit =>" m3/h"},
+  "p40Fanstage1AirflowOutlet" => {parent=>"pFan", argMin => "60", argMax =>  "250", unit =>" m3/h"},
+  "p41Fanstage2AirflowOutlet" => {parent=>"pFan", argMin => "60", argMax =>  "250", unit =>" m3/h"},
+  "p42Fanstage3AirflowOutlet" => {parent=>"pFan", argMin => "60", argMax =>  "250", unit =>" m3/h"},
+  "p43UnschedVent3" => {parent=>"pFan", argMin => "0", argMax =>  "1000", unit =>" min"},
+  "p44UnschedVent2" => {parent=>"pFan", argMin => "0", argMax =>  "1000", unit =>" min"},
+  "p45UnschedVent1" => {parent=>"pFan", argMin => "0", argMax =>  "1000", unit =>" min"},
+  "p46UnschedVent0"         => {parent=>"pFan", argMin => "0", argMax =>  "1000", unit =>" min"},
+  "p47CompressorRestartDelay" => {parent=>"pDefrostEva", argMin => "0", argMax =>  "20", unit =>" min"},
+  "p48MainFanSpeed"         => {parent=>"pDefrostEva", argMin => "0", argMax =>  "100", unit =>" %"},
+  "p49SummerModeTemp" => {parent=>"pHeat2", argMin => "10", argMax =>   "24", unit =>" °C"},
+  "p50SummerModeHysteresis" => {parent=>"pHeat2", argMin => "1", argMax =>    "5", unit =>" K"},
+  "p54MinPumpCycles" => {parent=>"pCircPump", argMin => "1",  argMax =>   "24", unit =>" /Tag"},
+  "p55MaxPumpCycles" => {parent=>"pCircPump", argMin => "25", argMax =>  "288", unit =>" /Tag"},
+  "p56OutTempMaxPumpCycles" => {parent=>"pCircPump", argMin => "0",  argMax =>   "20", unit =>" °C"},
+  "p57OutTempMinPumpCycles" => {parent=>"pCircPump", argMin => "0",  argMax =>   "25", unit =>" °C"},
+  "p58SuppressTempCaptPumpStart"=> {parent=>"pCircPump", argMin => "0",  argMax =>   "120", unit =>" s"},
+  "p75PassiveCooling" => {parent=>"pFan", argMin => "0", argMax =>    "1", unit =>""},
+  "p77OutTempFilterTime" => {parent=>"pHeat2", argMin => "0",  argMax =>   "24", unit =>" h"},
+  "p78DualModePoint" => {parent=>"pHeat2", argMin => "-10", argMax =>   "20", unit =>" °C"},
+  "p79BoosterTimeoutHC" => {parent=>"pHeat2", argMin => "0", argMax =>   "60", unit =>" min"},
+  "p80EnableSolar"              => {parent=>"pSolar",       argMin => "0", argMax =>   "1", unit =>""},
+  "pClockDay"                   => {parent=>"sTimedate",    argMin => "1", argMax =>  "31", unit =>""},
+  "pClockMonth"                 => {parent=>"sTimedate",    argMin => "1", argMax =>  "12", unit =>""},
+  "pClockYear"                  => {parent=>"sTimedate",    argMin => "12", argMax =>  "20", unit =>""},
+  "pClockHour"                  => {parent=>"sTimedate",    argMin => "0", argMax =>  "23", unit =>""},
+  "pClockMinutes"               => {parent=>"sTimedate",    argMin => "0", argMax =>  "59", unit =>""},
+  "progDHWStartTime"            => {parent=>"pDHWProg",     argMin => "00:00",  argMax =>  "23:59", unit =>""}, 
+  "progDHWEndTime"              => {parent=>"pDHWProg",     argMin => "00:00", argMax =>  "23:59", unit =>""},
+  "progDHWEnable"               => {parent=>"pDHWProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progDHWMonday"               => {parent=>"pDHWProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progDHWTuesday"              => {parent=>"pDHWProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progDHWWednesday"            => {parent=>"pDHWProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progDHWThursday"             => {parent=>"pDHWProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progDHWFriday"               => {parent=>"pDHWProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progDHWSaturday"             => {parent=>"pDHWProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progDHWSunday"               => {parent=>"pDHWProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progHC1StartTime"            => {parent=>"pHeatProg",    argMin => "00:00", argMax =>  "23:59", unit =>""}, 
+  "progHC1EndTime"              => {parent=>"pHeatProg",    argMin => "00:00", argMax =>  "23:59", unit =>""},
+  "progHC1Enable"               => {parent=>"pHeatProg",    argMin => "0", argMax =>  "1", unit =>""},
+  "progHC1Monday"               => {parent=>"pHeatProg",    argMin => "0", argMax =>  "1", unit =>""},
+  "progHC1Tuesday"              => {parent=>"pHeatProg",    argMin => "0", argMax =>  "1", unit =>""},
+  "progHC1Wednesday"            => {parent=>"pHeatProg",    argMin => "0", argMax =>  "1", unit =>""},
+  "progHC1Thursday"             => {parent=>"pHeatProg",    argMin => "0", argMax =>  "1", unit =>""},
+  "progHC1Friday"               => {parent=>"pHeatProg",    argMin => "0", argMax =>  "1", unit =>""},
+  "progHC1Saturday"             => {parent=>"pHeatProg",    argMin => "0", argMax =>  "1", unit =>""},
+  "progHC1Sunday"               => {parent=>"pHeatProg",    argMin => "0", argMax =>  "1", unit =>""},
+  "progHC2StartTime"            => {parent=>"pHeatProg",    argMin => "00:00", argMax =>  "23:59", unit =>""}, 
+  "progHC2EndTime"              => {parent=>"pHeatProg",    argMin => "00:00", argMax =>  "23:59", unit =>""},
+  "progHC2Enable"               => {parent=>"pHeatProg",    argMin => "0", argMax =>  "1", unit =>""},
+  "progHC2Monday"               => {parent=>"pHeatProg",    argMin => "0", argMax =>  "1", unit =>""},
+  "progHC2Tuesday"              => {parent=>"pHeatProg",    argMin => "0", argMax =>  "1", unit =>""},
+  "progHC2Wednesday"            => {parent=>"pHeatProg",    argMin => "0", argMax =>  "1", unit =>""},
+  "progHC2Thursday"             => {parent=>"pHeatProg",    argMin => "0", argMax =>  "1", unit =>""},
+  "progHC2Friday"               => {parent=>"pHeatProg",    argMin => "0", argMax =>  "1", unit =>""},
+  "progHC2Saturday"             => {parent=>"pHeatProg",    argMin => "0", argMax =>  "1", unit =>""},
+  "progHC2Sunday"               => {parent=>"pHeatProg",    argMin => "0", argMax =>  "1", unit =>""},
+  "progFAN1StartTime"           => {parent=>"pFanProg",     argMin => "00:00", argMax =>  "23:59", unit =>""}, 
+  "progFAN1EndTime"             => {parent=>"pFanProg",     argMin => "00:00", argMax =>  "23:59", unit =>""},
+  "progFAN1Enable"              => {parent=>"pFanProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progFAN1Monday"              => {parent=>"pFanProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progFAN1Tuesday"             => {parent=>"pFanProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progFAN1Wednesday"           => {parent=>"pFanProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progFAN1Thursday"            => {parent=>"pFanProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progFAN1Friday"              => {parent=>"pFanProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progFAN1Saturday"            => {parent=>"pFanProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progFAN1Sunday"              => {parent=>"pFanProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progFAN2StartTime"           => {parent=>"pFanProg",     argMin => "00:00", argMax =>  "23:59", unit =>""}, 
+  "progFAN2EndTime"             => {parent=>"pFanProg",     argMin => "00:00", argMax =>  "23:59", unit =>""},
+  "progFAN2Enable"              => {parent=>"pFanProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progFAN2Monday"              => {parent=>"pFanProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progFAN2Tuesday"             => {parent=>"pFanProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progFAN2Wednesday"           => {parent=>"pFanProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progFAN2Thursday"            => {parent=>"pFanProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progFAN2Friday"              => {parent=>"pFanProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progFAN2Saturday"            => {parent=>"pFanProg",     argMin => "0", argMax =>  "1", unit =>""},
+  "progFAN2Sunday"              => {parent=>"pFanProg",     argMin => "0", argMax =>  "1", unit =>""}
+);

my %setsonly214 = (
   "ResetErrors" => {cmd2=>"F8",     argMin =>   "0", argMax =>  "0", type =>"0clean",  unit =>""}
@@ -594,7 +702,6 @@
%getsonly539=(%getsonly539, %getsonly439);

my %getsonly2xx = (
-  "pExpert"     => {cmd2=>"02", type =>"02pxx206", unit =>""},
   "pDefrostEva" => {cmd2=>"03", type =>"03pxx206", unit =>""},
   "pDefrostAA" => {cmd2=>"04", type =>"04pxx206", unit =>""},
   "pHeat1"     => {cmd2=>"05", type =>"05pxx206", unit =>""},
@@ -615,9 +722,15 @@
   "sHC2"     => {cmd2=>"F5", type =>"F5hc2",    unit =>""},
   "sSystem"     => {cmd2=>"F6", type =>"F6sys206", unit =>""},
   "sHistory" => {cmd2=>"09", type =>"09his206", unit =>""},
- # "sLast10errors" => {cmd2=>"D1", type =>"D1last206", unit =>""},   removed  after andres hint; 33211.msg658108
-  "sGlobal"       => {cmd2=>"FB", type =>"FBglob206", unit =>""},  #allFB
+  "sGlobal"       => {cmd2=>"FB", type =>"FBglob206", unit =>""},
   "sTimedate" => {cmd2=>"FC", type =>"FCtime206", unit =>""},
+  "inputVentilatorSpeed"=> {parent=>"sGlobal", unit =>" %"},
+  "outputVentilatorSpeed"=> {parent=>"sGlobal", unit =>" %"},
+  "mainVentilatorSpeed" => {parent=>"sGlobal", unit =>" %"},
+  "inputVentilatorPower"=> {parent=>"sGlobal", unit =>" %"},
+  "outputVentilatorPower"=> {parent=>"sGlobal", unit =>" %"},
+  "mainVentilatorPower" => {parent=>"sGlobal", unit =>" %"},

  );
my %getsonly206 = (
   "sHC1"     => {cmd2=>"F4", type =>"F4hc1",    unit =>""},
@@ -628,18 +741,25 @@
  );
my %getsonly214 = (
   "pFan"          => {cmd2=>"01", type =>"01pxx214", unit =>""},
+  "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 =>""},
  );


my %sets=(%sets439539common, %sets439only);
my %gets=(%getsonly439, %sets);
my %OpMode = ("1" =>"standby", "11" => "automatic", "3" =>"DAYmode", "4" =>"setback", "5" =>"DHWmode", "14" =>"manual", "0" =>"emergency");   
+my %opMode2 = ("0" =>"manual", "1" => "automatic");
my %Rev_OpMode = reverse %OpMode;
my %OpModeHC = ("1" =>"normal", "2" => "setback", "3" =>"standby", "4" =>"restart", "5" =>"restart");
my %SomWinMode = ( "01" =>"winter", "02" => "summer");
my %weekday = ( "0" =>"Monday", "1" => "Tuesday", "2" =>"Wednesday", "3" => "Thursday", "4" => "Friday", "5" =>"Saturday", "6" => "Sunday" );
-my %weekdaymap = ( "1" =>"Mon", "2" => "Tue", "3" =>"Wed", "4" => "Thu", "5" => "Fri", "6" =>"Sat", "7" => "Sun" );
+#my %weekdaymap = ( "1" =>"Mon", "2" => "Tue", "3" =>"Wed", "4" => "Thu", "5" => "Fri", "6" =>"Sat", "7" => "Sun" );
my %faultmap = ( "0" =>"n.a.", "1" => "F01_AnodeFault", "2" => "F02_SafetyTempDelimiterEngaged", "3" => "F03_HighPreasureGuardFault", "4" => "F04_LowPreasureGuardFault", "5" => "F05_OutletFanFault", "6" => "F06_InletFanFault", "7" => "F07_MainOutputFanFault", "11" => "F11_LowPreasureSensorFault", "12"=> "F12_HighPreasureSensorFault", "15" => "F15_DHW_TemperatureFault",  "17" => "F17_DefrostingDurationExceeded", "20" => "F20_SolarSensorFault", "21" => "F21_OutsideTemperatureSensorFault", "22" => "F22_HotGasTemperatureFault", "23" => "F23_CondenserTemperatureSensorFault", "24" => "F24_EvaporatorTemperatureSensorFault", "26" => "F26_ReturnTemperatureSensorFault", "28" => "F28_FlowTemperatureSensorFault", "29" => "F29_DHW_TemperatureSensorFault", "30" => "F30_SoftwareVersionFault", "31" => "F31_RAMfault", "32" => "F32_EEPromFault", "33" => "F33_ExtractAirHumiditySensor", "34" => "F34_FlowSensor", "35" => "F35_minFlowCooling", "36" => "F36_MinFlowRate", "37" => "F37_MinWaterPressure", "40" => "F40_FloatSwitch", "50" => "F50_SensorHeatPumpReturn", "51" => "F51_SensorHeatPumpFlow",  "52" => "F52_SensorCondenserOutlet" );
my $firstLoadAll = 0;
my $noanswerreceived = 0;
@@ -1029,7 +1372,18 @@
   
   $arg *= $dec if ($dec != 1);
   $arg  = time2quaters($arg) if ($parsingtype eq "quater");
-  $arg  = substr((sprintf(("%0".$len."X"), $arg)), (-1*$len)); #04X converts to hex and fills up 0s; for negative, it must be trunckated.
+  if ($parsingtype eq "hex2time"){ # only in firmware 2.x
+ my ($hour, $min) = split(':', $arg);
+ $arg = $hour * 100 + $min;
+  }
+  if ($parsingtype =~ /bit(\d)/) { # only in firmware 2.x
+ my $bits = unpack('b4', pack('h1', substr($msg, $pos, 1))); #convert nibble to bit string for example '1111'
+ substr($bits, $1, 1, $arg); #set or unset bit
+ $arg = uc(unpack('h1', pack('b4', $bits))); #convert to nibble
+  }
+  else {
+    $arg  = substr((sprintf(("%0".$len."X"), $arg)), (-1*$len)); #04X converts to hex and fills up 0s; for negative, it must be trunckated.
+  }
   substr($msg, $pos, $len, $arg);
 
   if (defined($arg1))  { #only in case of "8party" or "7prog"
@@ -1381,7 +1741,7 @@
   return (sprintf("%02X", ($checksum %256)));
}

-#####################################
+############### ######################
#
# hex2int - convert from hex to int with sign 16bit
#
@@ -1643,10 +2003,12 @@
       elsif ($Type eq "swver") {$value= sprintf("%01u.%02u", hex(substr($value, 0,2)), hex(substr($value, 2,2)));}
       elsif ($Type eq "hex2ascii") {$value= uc(pack('H*', $value));}
       elsif ($Type eq "opmode") {$value= $OpMode{hex($value)};}
+      elsif ($Type eq "opmode2") {$value= $opMode2{hex($value)};}
       elsif ($Type eq "opmodehc") {$value= $OpModeHC{hex($value)};}
       elsif ($Type eq "esp_mant") {$value= sprintf("%.3f", unpack('f', pack( 'L',  reverse(hex($value)))));}
       elsif ($Type eq "somwinmode") {$value= $SomWinMode{($value)};}
-      elsif ($Type eq "hex2wday") {$value= bitmap2string(unpack('b7', pack('H*',$value)), \%weekdaymap);}
+#      elsif ($Type eq "hex2wday") {$value= bitmap2string(unpack('b7', pack('H*',$value)), \%weekdaymap);}
+      elsif ($Type eq "raw") {;}
       elsif ($Type eq "hex2error") {$value= bitmap2string(unpack('b32', pack('H*',$value)), \%faultmap);}
       elsif ($Type eq "weekday") {$value= $weekday{($value)};}
       elsif ($Type eq "faultmap") {$value= $faultmap{(hex($value))};}


I modified TZH_Set a little bit and I don't want to use parsingtype "hex2wday" anymore.
Furthermore I renamed some strings in sSol and sDHW to camelCase standard.
Do you know perltidy? What do you think about code beautifying?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 26 November 2017, 15:55:28
Hi Andre
>> Do you know perltidy?
I will have a look....thanks

Concerning your patch
would you be so nice to give me one example for "bit" and for "hex2time"?
just run set with verbose 5
I would like to  documents what they are for.
immi

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 26 November 2017, 20:26:59
Hi immi,

the bit0..4 parsingtype is to set/reset single bits, which is used to program the weekdays in FAN/DHW/HC programs, for example:

set myWP progHC2Monday 1

2017.11.26 16:49:09 5: searching for parent; parenthash= HASH(0x1a16b20), parent = pHeatProg, cmdHex2 = 0B 
2017.11.26 16:49:09 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2017.11.26 16:49:09 5: myWP sending 02
2017.11.26 16:49:09 5: SW: 02
2017.11.26 16:49:09 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:49:09 5: THZ_ReadAnswer: uc unpack: '10'
2017.11.26 16:49:09 5: myWP sending 01000C0B1003
2017.11.26 16:49:09 5: SW: 01000C0B1003
2017.11.26 16:49:09 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:49:09 5: THZ_ReadAnswer: uc unpack: '10'
2017.11.26 16:49:09 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:49:09 5: THZ_ReadAnswer: uc unpack: '02'
2017.11.26 16:49:09 5: myWP sending 10
2017.11.26 16:49:09 5: SW: 10
2017.11.26 16:49:09 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:49:09 5: double read 1 activated 0100A30B07D00258
2017.11.26 16:49:09 5: double read 1 result with buf1  0100A30B07D002587F010393044C00001003
2017.11.26 16:49:09 5: THZ_ReadAnswer: uc unpack: '0100A30B07D002587F010393044C00001003'
2017.11.26 16:49:09 5: myWP sending 10
2017.11.26 16:49:09 5: SW: 10
2017.11.26 16:49:09 5: read before write from THZ: 0B07D002587F010393044C0000
2017.11.26 16:49:10 5: write command (parsed element/pos/len/dec/parsingtype): 12 / 23 / 1 / 1 / bit0
2017.11.26 16:49:10 5: THZ_Set: 'progHC2Monday 1 0B07D002587F010393044C0100' ... Check if port is open. State = '(opened)'
2017.11.26 16:49:10 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2017.11.26 16:49:10 4: THZ_Get_Comunication: loop 1
2017.11.26 16:49:10 5: myWP sending 02
2017.11.26 16:49:10 5: SW: 02
2017.11.26 16:49:10 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:49:10 5: THZ_ReadAnswer: uc unpack: '10'
2017.11.26 16:49:10 5: myWP sending 0180240B07D002587F010393044C01001003
2017.11.26 16:49:10 5: SW: 0180240B07D002587F010393044C01001003
2017.11.26 16:49:10 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:49:10 5: THZ_ReadAnswer: uc unpack: '10'
2017.11.26 16:49:10 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:49:10 5: THZ_ReadAnswer: uc unpack: '02'
2017.11.26 16:49:10 5: myWP sending 10
2017.11.26 16:49:10 5: SW: 10
2017.11.26 16:49:10 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:49:10 5: THZ_ReadAnswer: uc unpack: '01808C0B1003'
2017.11.26 16:49:10 5: myWP sending 10
2017.11.26 16:49:10 5: SW: 10
2017.11.26 16:49:10 5: THZ_Get: Try to get 'progHC2Monday'
2017.11.26 16:49:10 5: THZ_Get: Try to get 'pHeatProg'
2017.11.26 16:49:10 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2017.11.26 16:49:10 5: myWP sending 02
2017.11.26 16:49:10 5: SW: 02
2017.11.26 16:49:10 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:49:10 5: THZ_ReadAnswer: uc unpack: '10'
2017.11.26 16:49:10 5: myWP sending 01000C0B1003
2017.11.26 16:49:10 5: SW: 01000C0B1003
2017.11.26 16:49:10 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:49:10 5: THZ_ReadAnswer: uc unpack: '10'
2017.11.26 16:49:10 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:49:10 5: THZ_ReadAnswer: uc unpack: '02'
2017.11.26 16:49:10 5: myWP sending 10
2017.11.26 16:49:10 5: SW: 10
2017.11.26 16:49:10 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:49:10 5: double read 1 activated 0100A40B07D00258
2017.11.26 16:49:10 5: double read 1 result with buf1  0100A40B07D002587F010393044C01001003
2017.11.26 16:49:10 5: THZ_ReadAnswer: uc unpack: '0100A40B07D002587F010393044C01001003'
2017.11.26 16:49:10 5: myWP sending 10
2017.11.26 16:49:10 5: SW: 10
2017.11.26 16:49:10 5: Parse message: A40B07D002587F010393044C0100
2017.11.26 16:49:10 5: Message length: 28
2017.11.26 16:49:10 5: THZ_split: 1 --- progHC1StartTime: 20:00 progHC1EndTime: 06:00 progHC1Monday: 1 progHC1Tuesday: 1 progHC1Wednesday: 1 progHC1Thursday: 1 progHC1Friday: 1 progHC1Saturday: 1 progHC1Sunday: 1 progHC1Enable: 1 progHC2StartTime: 09:15 progHC2EndTime: 11:00 progHC2Monday: 1 progHC2Tuesday: 0 progHC2Wednesday: 0 progHC2Thursday: 0 progHC2Friday: 0 progHC2Saturday: 0 progHC2Sunday: 0 progHC2Enable: 0


The hex2time is used for the start and end time in the programs:
2017.11.26 16:46:39 5: searching for parent; parenthash= HASH(0x1a16b20), parent = pHeatProg, cmdHex2 = 0B 
2017.11.26 16:46:39 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2017.11.26 16:46:39 4: THZ_Get_Comunication: loop 1
2017.11.26 16:46:39 5: myWP sending 02
2017.11.26 16:46:39 5: SW: 02
2017.11.26 16:46:39 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:46:39 5: THZ_ReadAnswer: uc unpack: '10'
2017.11.26 16:46:39 5: myWP sending 01000C0B1003
2017.11.26 16:46:39 5: SW: 01000C0B1003
2017.11.26 16:46:39 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:46:39 5: THZ_ReadAnswer: uc unpack: '10'
2017.11.26 16:46:39 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:46:39 5: THZ_ReadAnswer: uc unpack: '02'
2017.11.26 16:46:39 5: myWP sending 10
2017.11.26 16:46:39 5: SW: 10
2017.11.26 16:46:39 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:46:39 5: double read 1 activated 0100F80B07D00258
2017.11.26 16:46:39 5: double read 1 result with buf1  0100F80B07D002587F0103E8044C00001003
2017.11.26 16:46:39 5: THZ_ReadAnswer: uc unpack: '0100F80B07D002587F0103E8044C00001003'
2017.11.26 16:46:39 5: myWP sending 10
2017.11.26 16:46:39 5: SW: 10
2017.11.26 16:46:39 5: read before write from THZ: 0B07D002587F0103E8044C0000
2017.11.26 16:46:39 5: write command (parsed element/pos/len/dec/parsingtype): 10 / 14 / 4 / 1 / hex2time
2017.11.26 16:46:39 5: THZ_Set: 'progHC2StartTime 0393 0B07D002587F010393044C0000' ... Check if port is open. State = '(opened)'
2017.11.26 16:46:39 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2017.11.26 16:46:39 4: THZ_Get_Comunication: loop 1
2017.11.26 16:46:39 5: myWP sending 02
2017.11.26 16:46:39 5: SW: 02
2017.11.26 16:46:39 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:46:39 5: THZ_ReadAnswer: uc unpack: '10'
2017.11.26 16:46:39 5: myWP sending 0180230B07D002587F010393044C00001003
2017.11.26 16:46:39 5: SW: 0180230B07D002587F010393044C00001003
2017.11.26 16:46:39 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:46:39 5: THZ_ReadAnswer: uc unpack: '10'
2017.11.26 16:46:39 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:46:40 5: THZ_ReadAnswer: uc unpack: '02'
2017.11.26 16:46:40 5: myWP sending 10
2017.11.26 16:46:40 5: SW: 10
2017.11.26 16:46:40 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:46:40 5: THZ_ReadAnswer: uc unpack: '01808C0B1003'
2017.11.26 16:46:40 5: myWP sending 10
2017.11.26 16:46:40 5: SW: 10
2017.11.26 16:46:40 5: THZ_Get: Try to get 'progHC2StartTime'
2017.11.26 16:46:40 5: THZ_Get: Try to get 'pHeatProg'
2017.11.26 16:46:40 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2017.11.26 16:46:40 4: THZ_Get_Comunication: loop 1
2017.11.26 16:46:40 5: myWP sending 02
2017.11.26 16:46:40 5: SW: 02
2017.11.26 16:46:40 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:46:40 5: THZ_ReadAnswer: uc unpack: '10'
2017.11.26 16:46:40 5: myWP sending 01000C0B1003
2017.11.26 16:46:40 5: SW: 01000C0B1003
2017.11.26 16:46:40 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:46:40 5: THZ_ReadAnswer: uc unpack: '10'
2017.11.26 16:46:40 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:46:40 5: THZ_ReadAnswer: uc unpack: '02'
2017.11.26 16:46:40 5: myWP sending 10
2017.11.26 16:46:40 5: SW: 10
2017.11.26 16:46:40 5: myWP start Function THZ_ReadAnswer
2017.11.26 16:46:40 5: double read 1 activated 0100A30B07D002587F
2017.11.26 16:46:40 5: double read 1 result with buf1  0100A30B07D002587F010393044C00001003
2017.11.26 16:46:40 5: THZ_ReadAnswer: uc unpack: '0100A30B07D002587F010393044C00001003'
2017.11.26 16:46:40 5: myWP sending 10
2017.11.26 16:46:40 5: SW: 10
2017.11.26 16:46:40 5: Parse message: A30B07D002587F010393044C0000
2017.11.26 16:46:40 5: Message length: 28
2017.11.26 16:46:40 5: THZ_split: 09:15 --- progHC1StartTime: 20:00 progHC1EndTime: 06:00 progHC1Monday: 1 progHC1Tuesday: 1 progHC1Wednesday: 1 progHC1Thursday: 1 progHC1Friday: 1 progHC1Saturday: 1 progHC1Sunday: 1 progHC1Enable: 1 progHC2StartTime: 09:15 progHC2EndTime: 11:00 progHC2Monday: 0 progHC2Tuesday: 0 progHC2Wednesday: 0 progHC2Thursday: 0 progHC2Friday: 0 progHC2Saturday: 0 progHC2Sunday: 0 progHC2Enable: 0

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 29 November 2017, 20:56:46
hi andre
thanks
I will take care of it in the week-end
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 03 Dezember 2017, 23:36:25
Hi Andre
I implemented the 2 functions in a different way
would you be so nice to xcheck before I committ the file enclosed?
thanks
immi

code hier

  $arg  = time2quaters($arg)                                    if ($parsingtype eq "quater");
  $arg= join('', (split(':', $arg)))                            if ($parsingtype eq "hex2time"); # only in firmware 2.x
  #$arg= eval(join('*100+', (split(':', $arg)))) if ($parsingtype eq "hex2time"); #just in case the above does not work
  $arg=(hex(substr($msg, $pos, 1)) & (15-2**$1)) | (2**$1*$arg) if ($parsingtype =~ /bit(\d)/);
  $arg  = substr((sprintf(("%0".$len."X"), $arg)), (-1*$len)); #04X converts to hex and fills up 0s; for negative, it must be trunckated.
  substr($msg, $pos, $len, $arg);



Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 05 Dezember 2017, 18:47:03
Hi immi,

ZitatI implemented the 2 functions in a different way

I see, you like as much as possible in one single line ;)

The first implementaion of "hex2time" is a little bit dangerous. What if minutes<10? But we need min/max parameter checking for hex2time anyway. I would move this part in the parameter checking block.
my $cmdcode = $cmdhash->{cmd2};
my $cmdtype = $cmdhash->{type};
my $msgtype = $cmdhash->{type};
my $argMax = $cmdhash->{argMax};
my $argMin = $cmdhash->{argMin};
my $parent = $cmdhash->{parent};
my $i = 0;
my $parsingrule = $parsinghash{$msgtype} if(defined($msgtype));
if (defined($parent)) {
Log3 $hash->{NAME}, 5, "[$name] THZ_Set searching for parent: $parent";
my $parenthash = $gets{$parent};
$parsingrule = $parsinghash{$parenthash->{type}};
# get the element index in parsingsrule for 2.xx firmware
for (@$parsingrule) {
last if ((@$parsingrule[$i]->[0]) =~ m/$cmd/);
$i++;
}
#overwrite with the parent values
$cmdcode = $parsinghash{$parenthash->{cmd2}};
$cmdtype = @$parsingrule[$i]->[3];
}
#-- check the parameter range
if (defined($parent) and ($cmdtype eq "hex2time")) {
# special validations for 2.xx firmware
my ($hour, $min) = split(':', $arg);
return "Argument does not contain a valid hour from 00 to 23 " if(($hour > 23) or ($hour < 0));
return "Argument does not contain a valid minute from 00 to 59 " if(($min > 59) or ($min < 0));
$arg = $hour * 100 + $min;
}
elsif ($cmdtype =~ /7prog|8party/) {         
($arg, $arg1) = split('--', $arg);
return "Argument does not match the allowed inerval Min $argMin ...... Max $argMax " if (($arg ne "n.a.") and ($arg1 ne "n.a.") and (($arg1 gt $argMax) or ($arg1 lt $argMin) or ($arg gt $argMax) or ($arg lt $argMin)) ) ;
}
elsif ($cmdtype eq "2opmode") {
$arg = $Rev_OpMode{$arg};
return "Unknown argument $arg1: $cmd supports  " . join(" ", sort values %OpMode) if(!defined($arg));
}
else {
#in all other cases assume numeric type
return "Argument does not match the allowed inerval Min $argMin ...... Max $argMax " if(($arg > $argMax) or ($arg < $argMin));
}


Your implementation of "bitx" is a good idea. Its working. But if you want even more hard core....

if ($parsingtype eq "quater") {
$arg = time2quaters($arg);
}
elsif ($parsingtype =~ /bit(\d)/) { # only in firmware 2.x
$arg = (hex(substr($msg, $pos, 1)) & ~(1<<$1)) | ((1<<$1)*$arg);
}

I would suggest to use if/elsif/else. It's more structured and faster.

Andre

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 06 Dezember 2017, 17:46:29
Hi Andre
thanks for testing
$arg ="10:09";
$arg= join('', (split(':', $arg)));
print $arg;
prints "1009"

it is a string in which you remove a ":" ... no problem
The with eval is safer...  OK
nevertheless if you want a syntax check, you get a syntax check; no problem

My target is to improve readability (performance in "set" is useless) ... and the subroutine "set" is getting too long
in perl  "switch/case" statements are terrible.
bestpractice (if you do not care about performance) is

command  if x>y;
command2 if ...;
command2 if ...;


I committed a version without full syntax check; now you have the same check as for 7prog|8party
sooner or later i will clean up the set function and improve the min-max check
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 08 Dezember 2017, 10:27:41
Hi immi,

Thank you for uploading the new version.
Zitatit is a string in which you remove a ":" ... no problem
OK, but if the user enters a string "20:8" on the command line, we set a wrong time.

I aggree performance is not realy a problem, but readability and logical structure is important.
Zitatcommand  if x>y;
command2 if ...;
command2 if ...;
This is definitly not best practice. Why should we check 3 conditions if the first condition matches and only one condition can be true? Here is the if/elsif/else the better way (if you don't like the switch statement).
The so called postfix if conditions should only be used in perl together with flow statements like return, next, last,...
But anyway if this is your way to make the code more readable and maintainable, I will respect this.

ZitatI committed a version without full syntax check; now you have the same check as for 7prog|8party
Not really, because the sets with "parent" don't have a "type". That's why I suggested to get the argument type from the parenthash before the validation of arguments starts. Or we give all sets with parents an additional "type" just for parameter checking.

Andre 
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 08 Dezember 2017, 14:29:23
Hi Andre
You are right in your example: "20:8" the "eval" variant is better, which is more robust

in 7prog|8party and in hex2time you can have easily the same check
all register "without type" can be checked to be between MAX and MIN
e.g. argMin => "00:00", argMax => "23:59"
the string should be in the interval 00:00 and 23:59.
you will not catch 13:65

nevertheless, I cite myself  "if you want a syntax check, you get a syntax check; no problem"
you just have to wait for the winter holidays.

p.s. I like a lot the "switch/case" statement!! (I used it in other languages extensively)
I had to change it with "given/when"
and at the end I  had to replace in THZ_Parse1 with  if/elsif/else.
You can google of the caos related to given/when and switch/case in perl.

When you read from tecalor, performance is an issue (my average 1 read per minute)
When you write to tecalor, performance is not  an issue (my average 1 write per day)
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 11 Dezember 2017, 07:16:11
Hallo andre.k, Hallo immi,

was hat sich eigentlich geändert bei dem letzten Update?
Ich habe so wie andre.k eine ältere LWZ303i mit Firmware 2.06.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 11 Dezember 2017, 20:45:42
Hallo Peter,

du kannst seit 0.172 (fast) alle Parameter auch mit der Firmware v2.xx setzen. In der vorherigen Version konnte man die meisten Parameter nur lesen und nur die Parameter P01...12 sowie die Uhrzeit setzten. Ich persönlich benutze das sehr selten, aber es erspart die recht mühsame Eingabe über das Display der THZ.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 11 Dezember 2017, 21:26:10
Danke Andre, das werde ich bestimmt auch mal nutzen.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: toggle am 16 Dezember 2017, 17:01:04
Hallo zusammen,

habt ihr beobachtet, welche WP-Schnittstelle Techniker für Einstellungen benutzen? Ist es die RS232 oder die USB?

Gruß
toggle
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: philipp_b am 16 Dezember 2017, 17:29:56
Bei meiner lwz504 die USB Schnittstelle
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 16 Dezember 2017, 20:32:38
Bei meiner 303 die RS232, aber sicher deshalb, weil USB unzugänglich verbaut ist.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: toggle am 17 Dezember 2017, 16:30:33
Ich habe mir gedacht, man könnte ja die Kommunikation der Installationssoftware belauschen, ohne diese zu besitzen. Eine RS232-Schnittstelle abzuzweigen ist kein so großer Aufwand. Bei der USB-Schnittstelle wird es schon etwas komplizierter. Man muss zwar nicht direkt die USB-Schnittstelle anzapfen - dahinter ist ja ein CP2102 (USB-RS232) verbaut - aber man kommt ohne Löten nicht aus. Und natürlich muss ein Techniker-Besuch anstehen.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 17 Dezember 2017, 22:40:35
Klingt jetzt aber schon so ein bisschen nach illegaler Kommunikationsüberwachung, auch wenn es kein Telefon ist  ...  :-\
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 Dezember 2017, 01:08:55
maybe Toggle should stick a disclaimer to the heatpump
like in US "Do not put pets in the microwave to dry them"

"warning technician: the customer will look at everything you do to their heatpump; please remember, he owns the heatpump and pays for the manteinance"

sorry: We are drifting off-topic... but I want the copyright for the disclaimer :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 24 Dezember 2017, 01:23:20
v0.173 uploaded
THZ_RemoveInternalTimer has been removed for Ansgar

--- reminder for me ---
Rudolf improved the RemoveInternalTimer function  in fhem.pl
https://svn.fhem.de/trac/changeset/15667/.
This allows removing all Timers with just the Function.
RemoveInternalTimer(undef, "THZ_GetRefresh") is now equivalent to THZ_RemoveInternalTimer("THZ_GetRefresh") which is now redundant
%intAt  should be avoided
----------


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: ph0x am 02 Januar 2018, 14:17:36
Hello immi (and rest)!

First of all, let me express my gratitude for all the work and effort that you put into the development of this fhem module, I really appreciate it a lot!

I would like to suggest a slight code improvement. Somewhere around LOC #1850 you define the value $roomSetTemp in order to create the heat curve diagram on the mythz site.
Since I have a rather old LWZ303i with firmware v2.03 the internal value of sHC1:roomSetTemp is 0. This might be also related to some other settings I have but I wasn't able to figure this out completely.

The fact remains, that when you calculate
my $b = -14 * $p13GradientHC1 / $roomSetTemp;
my fhem crashes because of the division by zero. Unfortunately your check for definition of $roomSetTemp a few lines earlier doesn't help, because $roomSetTemp is defined, but is zero...

As a work around I redefined $roomSetTemp as p01RoomTempDay but I know that this is a bit short sighted and might not be applicable to others. It works for me since I don't have a heating program defined and since there doesn't seem to be a value like p01RoomTempDayHC1SummerMode with my old firmware.

I can't come up with a smart solution to this problem but maybe you can consider another check for $roomSetTemp before performing the actual division.


Fine regards,
Marco
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 02 Januar 2018, 22:48:34
Hi Marco
can you try changing the following (is is 2 lines above)?

if (!defined($roomSetTemp)) {

with
if (!$roomSetTemp) {


if it works, I will update the code... it should cover both undef and 0 at the same time
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 02 Januar 2018, 22:56:14
Hi Marco,

what value have you set for "firmware" in the attribute section 2.06 or 2.14? The diffenence between these versions in terms of sHC1 is  the position of the value roomSetTemp in the Register. If you set to the wrong version this could be the reason why roomSetTemp=0.

Andre

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: ph0x am 02 Januar 2018, 23:00:30
immi: it works, although now I'm of course presented with the DEMO: no data graph...

Andre: I set it to 2.06. Do you think, 2.14 would work better?

EDIT:
I just tried setting the firmware version to 2.14 and did not encounter any difficulties so far. Nice!
Unfortunately there are now several additional readings that do not apply to my machine, but who cares...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 03 Januar 2018, 09:57:48
Yes, 2.14 is closer to your 2.03 than 2.06. The version 2.14 is the first version for THZ 303 SOL and has a similar release date like your 2.03.
I found the following information in the Tecalor "Ersatzteilkatalog"
THZ 303 INTEGRAL
2.03 (2002/01-2004/04)
2.05 (2004/04-2006/11)
2.06 (2006/12-2008/08)
THZ 303 SOL
2.14 (2002/10-2004/08)
2.15 (2004/09-2006/08)
2.16 (2006/09-2008/08)

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 10 Januar 2018, 22:10:01
added [" Service: ", 10, 1, "bit2", 1] from  toggle
v 0.175 uploaded

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 20 Januar 2018, 00:07:05
Ich habe mal etwas intensiver an zwei Registern geforscht, eins liefert diverse Statuswerte, die zum Teil auch schon in sGlobal enthalten sind das andere liefert Werte aus der Lüftungssteuerung. Ich weiss nicht inwiefern die Register auch in den neueren Anlagen bzw. Firmware<>2.14 vorhanden sind. Vieleicht könnte das mal jemand testen. Die zugehörigen Get-Kommandos sind wie folgt definiert:
  "sControl"  => {cmd2=>"F2", type =>"F2ctrl", unit =>""},
  "sFan"  => {cmd2=>"E8", type =>"E8fan", unit =>""},


Die Definitionen für das Parsing sehen dann so aus:
"E8fan" => [["statusAFC: ", 4, 4, "hex", 1], # 0=init air flow calibration (16:00) 4=normal fan operation
[" supplyFanSpeedCAL: ", 8, 4, "hex", 60], # calibration speed
[" exhaustFanSpeedCAL: ", 12, 4, "hex", 60],
[" supplyFanAirflowCAL: ", 16, 4, "hex", 100], # calibration air flow volume
[" exhaustFanAirflowCAL: ", 20, 4, "hex", 100],
[" supplyFanSpeed: ", 24, 4, "hex", 1], # actual fan speed in 1/s
[" exhaustFanSpeed: ", 28, 4, "hex", 1],
[" supplyFanAirflowSet: ", 32, 4, "hex", 1],         # actual air flow volume setting in m3/h
[" exhaustFanAirflowSet: ", 36, 4, "hex", 1],
[" supplyFanSpeedTarget: ", 40, 4, "hex", 1], # target fan speed in %
[" exhaustFanSpeedTarget: ", 44, 4, "hex", 1],
[" supplyFanSpeed0: ", 48, 4, "hex", 10],
[" exhaustFanSpeed0: ", 52, 4, "hex", 10],
[" supplyFanSpeed200: ", 56, 4, "hex", 10],
[" exhaustFanSpeed200: ", 60, 4, "hex", 10],
[" airflowTolerance: ", 64, 2, "hex", 1],
[" airflowCalibrationInterval: ", 66, 2, "hex", 1],         # calibration interval
[" timeToCalibration: ", 68, 2, "hex", 1] # days to next calibration
],


"F2ctrl"  => [["heatRequest: ", 4, 2, "hex", 1],         # 0=DHW 2=heat 5=off 6=defrostEva
[" heatRequest2: ", 6, 2, "hex", 1],         # same as heatRequest
[" hcStage: ", 8, 2, "hex", 1],  # 0=off 1=solar 2=heatPump 3=boost1 4=boost2 5=boost3
[" dhwStage: ", 10, 2, "hex", 1], # 0=off, 1=solar, 2=heatPump 3=boostMax
[" heatStageControlModul: ", 12, 2, "hex", 1], # either hcStage or dhwStage depending from heatRequest
[" compBlockTime: ", 14, 4, "hex2int", 1],         # remaining compressor block time
[" pasteurisationMode: ", 18, 2, "hex", 1], # 0=off 1=on
[" defrostEvaporator: ", 20, 2, "raw", 1],         # 10=off 30=defrostEva
[" boosterStage2: ", 22, 1, "bit3", 1], # booster 2
[" solarPump: ", 22, 1, "bit2", 1], # solar pump
[" boosterStage1: ", 22, 1, "bit1", 1], # booster 1
[" compressor: ", 22, 1, "bit0", 1], # compressor
[" heatPipeValve: ", 23, 1, "bit3", 1], # heat pipe valve
[" diverterValve: ", 23, 1, "bit2", 1], # diverter valve
[" dhwPump: ", 23, 1, "bit1", 1], # dhw pump
[" heatingCircuitPump: ", 23, 1, "bit0", 1], # hc pump
[" mixerOpen: ", 25, 1, "bit1", 1], # mixer open
[" mixerClosed: ", 25, 1, "bit0", 1], # mixer closed
[" sensorBits1: ", 26, 2, "raw", 1], # sensor condenser temperature ??
[" sensorBits2: ", 28, 2, "raw", 1], # sensor low pressure ??
[" boostBlockTimeAfterPumpStart: ", 30, 4, "hex2int", 1], # after each  pump start (dhw or heat circuit)
[" boostBlockTimeAfterHD: ", 34, 4, "hex2int", 1] # ??
],


Es ist, wie gesagt, einiges redundant, da die Werte bereits in anderen Registern enthalten. Mir ist auch nicht bei allen Werten die Bedeutung klar. Der eine oder andere Wert ist sicher hilfreich, z.B.
heatRequest - zeigt an wofür gerade Wärme angefordert wurde, also ob die Anlage im Heiz- oder Warmwassermodus ist.
supplyFanAirFlowSet und exhaustFanAirFlowSet enthalten den aktuellen Volumenstrom der Lüftung entsprechend der gerade laufenden Lüfterstufe. Dabei werden die in p37 bis p42 eingestellten Werten geliefert, so dass man daraus allgemeingültig die aktuelle Lüfterstufe ermitteln kann. Zum Beispiel mit einem UserReading
FanStage:sFan.* {if (ReadingsVal("myWP","supplyFanAirflowSet",0) eq ReadingsVal("myWP","p37Fanstage1AirflowInlet",0)) {return 1}\
elsif (ReadingsVal("myWP","supplyFanAirflowSet",0) eq ReadingsVal("myWP","p38Fanstage2AirflowInlet",0)) {return 2}\
elsif (ReadingsVal("myWP","supplyFanAirflowSet",0) eq ReadingsVal("myWP","p39Fanstage3AirflowInlet",0)) {return 3} else {return 0}

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 20 Januar 2018, 23:58:36
Ich fürchte, ich komme da grade nicht dazu. Aus irgendeinem Grund hat meine THZ in 2017 ca. 15% mehr Strom verbraucht als 2016. Dem muss ich erst auf den Grund gehen.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 21 Januar 2018, 10:22:54
Hi Andre
again thanks for you hard work.
your improvement does not give any error for newer firmwares, therefore i uploaded it for everyone.
For newer firmwares the interpretation of the register has to be checked. As first impression it is not 1-1 compatible..
Let us see if someone finds time to interprete F2 and E8 for the newer firmwares.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 22 Januar 2018, 22:20:21
Zitat von: willybauss am 20 Januar 2018, 23:58:36
Ich fürchte, ich komme da grade nicht dazu. Aus irgendeinem Grund hat meine THZ in 2017 ca. 15% mehr Strom verbraucht als 2016. Dem muss ich erst auf den Grund gehen.
Rätsel gelöst: Der Januar 2017 hatte viele sehr kalte Nächte mit bis zu -15°C. Da sprang öfter der Heizstab an, und der Verdichter lief pausenlos. Das macht locker 400 kWh aus.

Was müsste ich denn tun, um Andre's Register zu verifizieren? Muss ich da den Code des THZ-Moduls patchen und dann Werte abfragen? Hab ich noch nie gemacht. Da brauche ich Hilfe, sonst wird das nichts.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 23 Januar 2018, 19:34:42
Hi Willi
just  update and get   "sControl"  and "sFan"
the decoding proposed from Andre below should be improved for  newer firmwares
immi     
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 23 Januar 2018, 22:25:00
I updated yesterday to 0.175

Result:
Unknown argument sControl, choose one of  p01RoomTempDayHC1:noArg p01R ...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 24 Januar 2018, 13:17:01
@immi:
You still owe us an answer to this topic:
https://forum.fhem.de/index.php/topic,33452.msg739789.html#msg739789 (https://forum.fhem.de/index.php/topic,33452.msg739789.html#msg739789)

Last weekend I updated to 0.175, and now the log file increases dramatically, e.g.:

2018-01-24_13:03:48 Mythz return_temp: 22.5                                                                                                 
2018-01-24_13:03:48 Mythz outside_temp: 10.1                                                                                               
2018-01-24_13:03:48 Mythz dhw_temp: 46.8                                                                                                   
2018-01-24_13:03:56 Mythz sGlobal: outsideTemp: 10.1 flowTemp: 25.1 returnTemp: 22.5 hotGasTemp: 27.4 dhwTemp: 46.8 flowTempHC2: -60 evapor$
2018-01-24_13:03:56 Mythz Rel_humidity: 37.4                                                                                               
2018-01-24_13:03:56 Mythz flow_temp: 25.1                                                                                                   
2018-01-24_13:03:56 Mythz return_temp: 22.5                                                                                                 
2018-01-24_13:03:56 Mythz outside_temp: 10.1                                                                                               
2018-01-24_13:03:56 Mythz dhw_temp: 46.8                                                                                                   
2018-01-24_13:04:10 Mythz sGlobal: outsideTemp: 10.2 flowTemp: 25.1 returnTemp: 22.5 hotGasTemp: 27.6 dhwTemp: 46.9 flowTempHC2: -60 evapor$
2018-01-24_13:04:10 Mythz Rel_humidity: 37.4                                                                                               
2018-01-24_13:04:10 Mythz flow_temp: 25.1                                                                                                   
2018-01-24_13:04:10 Mythz return_temp: 22.5
2018-01-24_13:04:10 Mythz outside_temp: 10.2                                                                                               
2018-01-24_13:04:10 Mythz dhw_temp: 46.9                                                                                                   
2018-01-24_13:04:11 Mythz sHC1: outsideTemp: 10.1 x08: -13.6 returnTemp: 22.5 integralHeat: -19 flowTemp: 25.1 heatSetTemp: 24.7 heatTemp: $
2018-01-24_13:04:11 Mythz inside_temp: 23.4                                                                                                 
2018-01-24_13:04:32 Mythz sHC1: outsideTemp: 10.2 x08: -13.6 returnTemp: 22.5 integralHeat: -19 flowTemp: 25.1 heatSetTemp: 24.7 heatTemp: $
2018-01-24_13:04:32 Mythz inside_temp: 23.4                                                                                                 
2018-01-24_13:04:41 Mythz sGlobal: outsideTemp: 10.1 flowTemp: 25 returnTemp: 22.5 hotGasTemp: 27.6 dhwTemp: 46.9 flowTempHC2: -60 evaporat$
2018-01-24_13:04:41 Mythz Rel_humidity: 37.4                                                                                               
2018-01-24_13:04:41 Mythz flow_temp: 25                                                                                                     
2018-01-24_13:04:41 Mythz return_temp: 22.5
2018-01-24_13:04:41 Mythz outside_temp: 10.1                                                                                               
2018-01-24_13:04:41 Mythz dhw_temp: 46.9                                                                                                   
2018-01-24_13:04:41 Mythz sHC1: outsideTemp: 10.1 x08: -13.6 returnTemp: 22.5 integralHeat: -19 flowTemp: 25 heatSetTemp: 24.7 heatTemp: 23$
2018-01-24_13:04:41 Mythz inside_temp: 23.4                                                                                                 
2018-01-24_13:04:44 Mythz sHC1: outsideTemp: 10.1 x08: -13.6 returnTemp: 22.4 integralHeat: -19 flowTemp: 25 heatSetTemp: 24.7 heatTemp: 23$
2018-01-24_13:04:44 Mythz inside_temp: 23.4                                                                                                 
2018-01-24_13:05:03 Mythz sLast10errors: number_of_f...


Please have a look on the time stamps ...

interval_sGlobal is set to 300.

Now I went back to my previous version, which is 0.166.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 24 Januar 2018, 21:07:33
Zitat von: willybauss am 24 Januar 2018, 13:17:01
@immi:
You still owe us an answer to this topic:
https://forum.fhem.de/index.php/topic,33452.msg739789.html#msg739789 (https://forum.fhem.de/index.php/topic,33452.msg739789.html#msg739789)
Last weekend I updated to 0.175, and now the log file increases dramatically, e.g.:
Have you made a full fhem update as I asked you?
you have to use last fhem.pl version and last 00_thz at the same time
then shutdown restart
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 24 Januar 2018, 22:58:58
ok, so I have to try again.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 24 Januar 2018, 23:34:34
works now, thanks!
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: ioT4db am 25 Januar 2018, 09:38:41
Zitat von: andre.k am 20 Januar 2018, 00:07:05
Ich habe mal etwas intensiver an zwei Registern geforscht, eins liefert diverse Statuswerte, die zum Teil auch schon in sGlobal enthalten sind das andere liefert Werte aus der Lüftungssteuerung. Ich weiss nicht inwiefern die Register auch in den neueren Anlagen bzw. Firmware<>2.14 vorhanden sind. Vieleicht könnte das mal jemand testen. Die zugehörigen Get-Kommandos sind wie folgt definiert:---

Scheint bei mir ohne Probleme zu laufen: THZ304SOL, FW 5.19 (in FHEM verwende ich attr firmware=5.39)

Ergebnis:

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

sFan
statusAFC: 512 supplyFanSpeedCAL: 5.16666666666667 exhaustFanSpeedCAL: 302.933333333333 supplyFanAirflowCAL: 2.9 exhaustFanAirflowCAL: 504.32 supplyFanSpeed: 316 exhaustFanSpeed: 26624 supplyFanAirflowSet: 344 exhaustFanAirflowSet: 34560 supplyFanSpeedTarget: 0 exhaustFanSpeedTarget: 0 supplyFanSpeed0: 0 exhaustFanSpeed0: 1.4 supplyFanSpeed200: 411.9 exhaustFanSpeed200: 614.4 airflowTolerance: 160 airflowCalibrationInterval: 0 timeToCalibration: 160

VG...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: ioT4db am 25 Januar 2018, 09:54:15
Zitat von: friesenjung am 25 Januar 2018, 09:38:41
Scheint bei mir ohne Probleme zu laufen: THZ304SOL, FW 5.19 (in FHEM verwende ich attr firmware=5.39)

Ergebnis:

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

sFan
statusAFC: 512 supplyFanSpeedCAL: 5.16666666666667 exhaustFanSpeedCAL: 302.933333333333 supplyFanAirflowCAL: 2.9 exhaustFanAirflowCAL: 504.32 supplyFanSpeed: 316 exhaustFanSpeed: 26624 supplyFanAirflowSet: 344 exhaustFanAirflowSet: 34560 supplyFanSpeedTarget: 0 exhaustFanSpeedTarget: 0 supplyFanSpeed0: 0 exhaustFanSpeed0: 1.4 supplyFanSpeed200: 411.9 exhaustFanSpeed200: 614.4 airflowTolerance: 160 airflowCalibrationInterval: 0 timeToCalibration: 160

VG...

Aber die Werte an sich scheinen nicht zu passen. Bei supplyFanAirflowSet bspw. steht 344, mein p37 steht aber auf 140!?

VG...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 25 Januar 2018, 16:10:50
Zitat von: friesenjung am 25 Januar 2018, 09:54:15
Aber die Werte an sich scheinen nicht zu passen. Bei supplyFanAirflowSet bspw. steht 344, mein p37 steht aber auf 140!?
VG...
This is what I highlighted as open point last week.
Andre took care about the interpretation of the registers (F2 and E8) for very old firmwares.
Now it has to be done for newer firmwares.
I remember you that if you want to see the registers before interpretation you have to set the verbose to 5
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: börni am 27 Januar 2018, 20:32:19
Hallo zusammen,

nun endlich bin ich auch soweit - ich verfolge das alles hier schon eine ganze Weile.
Seit heute bin ich endlich soweit, dass die LWZ 303i über Serial und USB mit dem Loxberry/FHEM kommuniziert.
Leider habe ich noch null Erfahrung mit FHEM und mit den ganzen Dingen - ich hoffe ihr könnt mir etwas auf die Sprünge helfen.

Ich schätze bei mir werden einige Werte noch nicht richtig geparst.
Details zu meiner WP:

VERSION 0.176
model 2.06_02.06

Die Software ist 2.06 (b - meine ich)
BJ 2007

Ich habe mich an dieses HowTo gehalten:
https://wiki.fhem.de/wiki/Tecalor_THZ_Wärmepumpe

trotzdem bekomme ich so richtig keine Graphen/Plots und Werte im Dashbord angezeigt - da steckt irgendwo der ein oder andere Wurm drin :(

Im Log taucht immer mal wieder sowas hier auf:


2018.01.27 15:04:21 3: Mythz/RAW: 00000000001003
2018.01.27 15:05:38 3: THZ_Parsing: offset(86) + length(4) is longer then message : '0FFB0000005D01210116014D01CC00000000006A0121011C272700CC2B1A0000005A000000000000000000'
2018.01.27 15:05:38 3: THZ_Parsing: offset(90) + length(4) is longer then message : '0FFB0000005D01210116014D01CC00000000006A0121011C272700CC2B1A0000005A0000000000000000000000'
2018.01.27 15:05:38 3: THZ_Parsing: offset(94) + length(8) is longer then message : '0FFB0000005D01210116014D01CC00000000006A0121011C272700CC2B1A0000005A00000000000000000000000000'
2018.01.27 15:05:38 3: THZ_Parsing: offset(102) + length(8) is longer then message : '0FFB0000005D01210116014D01CC00000000006A0121011C272700CC2B1A0000005A0000000000000000000000000000000000'
2018.01.27 15:06:22 3: THZ_Get: Error msg2:  THZ_ReadAnswer: Interface max repeat limited to 60  THZ_Get_Com: error found at step2 -- D1 -> 010009D101010017072D05E500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2018.01.27 15:06:22 3: Mythz/RAW: 00000000001003
2018.01.27 15:08:22 3: THZ_Get: Error msg2:  THZ_ReadAnswer: Interface max repeat limited to 60  THZ_Get_Com: error found at step2 -- D1 -> 010009D101010017072D05E500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2018.01.27 15:08:22 3: Mythz/RAW: 00000000001003
2018.01.27 15:10:22 3: THZ_Get: Error msg2:  THZ_ReadAnswer: Interface max repeat limited to 60  THZ_Get_Com: error found at step2 -- D1 -> 010009D101010017072D05E500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000


und hier mal meine kompletten Readings:


Readings
inputVentilatorPower

39 %

2018-01-27 18:45:22
inputVentilatorSpeed

28 %

2018-01-27 18:45:11
mainVentilatorPower

69.8039215686275 %

2018-01-27 18:45:42
mainVentilatorSpeed

20 %

2018-01-27 18:44:07
outputVentilatorPower

39 %

2018-01-27 18:45:38
outputVentilatorSpeed

32 %

2018-01-27 18:45:21
p01-p12

p01RoomTempDay: 22.5 p02RoomTempNight: 21 p03RoomTempStandby: 10 p04DHWsetTempDay: 45 p05DHWsetTempNight: 45 p06DHWsetTempStandby: 10 p07FanStageDay: 1 p08FanStageNight: 1 p09FanStageStandby: 0 p10HCTempManual: 35 p11DHWsetTempManual: 45 p12FanStageManual: 2

2018-01-27 18:47:21
p01RoomTempDay

22.5 °C

2018-01-27 18:44:17
p01RoomTempDayHC1

390B089802587F0003E806A41F00 °C

2018-01-27 18:15:12
p01RoomTempDayHC1SummerMode

390B089802587F0003E806A41F00 °C

2018-01-27 18:17:20
p01RoomTempDayHC2

210C089801F47F00 °C

2018-01-27 18:15:56
p01RoomTempDayHC2SummerMode

210C089801F47F00 °C

2018-01-27 18:16:18
p02RoomTempNight

21 °C

2018-01-27 18:44:58
p02RoomTempNightHC1

390B089802587F0003E806A41F00 °C

2018-01-27 17:51:42
p02RoomTempNightHC1SummerMode

390B089802587F0003E806A41F00 °C

2018-01-27 17:50:01
p02RoomTempNightHC2

210C089801F47F00 °C

2018-01-27 18:16:48
p02RoomTempNightHC2SummerMode

210C089801F47F00 °C

2018-01-27 18:16:02
p03RoomTempStandby

10 °C

2018-01-27 18:46:20
p03RoomTempStandbyHC1

390B089802587F0003E806A41F00 °C

2018-01-27 17:51:45
p03RoomTempStandbyHC1SummerMode

390B089802587F0003E806A41F00 °C

2018-01-27 18:15:00
p03RoomTempStandbyHC2

210C089801F47F00 °C

2018-01-27 18:17:00
p03RoomTempStandbyHC2SummerMode

210C089801F47F00 °C

2018-01-27 18:16:07
p04DHWsetDayTemp

EF0A01012000BE00C8003C °C

2018-01-27 18:14:16
p04DHWsetTempDay

45 °C

2018-01-27 18:45:03
p05DHWsetNightTemp

EF0A01012000BE00C8003C °C

2018-01-27 18:17:01
p05DHWsetTempNight

45 °C

2018-01-27 18:46:57
p06DHWsetStandbyTemp

EF0A01012000BE00C8003C °C

2018-01-27 18:16:37
p06DHWsetTempStandby

10 °C

2018-01-27 18:44:42
p07FanStageDay

1

2018-01-27 18:47:29
p08FanStageNight

1

2018-01-27 18:44:46
p09FanStageStandby

0

2018-01-27 18:47:21
p10HCTempManual

35 °C

2018-01-27 18:46:52
p11DHWsetManualTemp

EF0A01012000BE00C8003C °C

2018-01-27 17:50:26
p11DHWsetTempManual

45 °C

2018-01-27 18:45:54
p12FanStageManual

2

2018-01-27 18:43:53
p13GradientHC1

0.5

2018-01-27 18:46:12
p14LowEndHC1

0 K

2018-01-27 18:45:27
p15RoomInfluenceHC1

in

2018-01-27 18:45:24
p16GradientHC2

0.6

2018-01-27 18:47:30
p17LowEndHC2

0 K

2018-01-27 18:46:58
p18RoomInfluenceHC2

0

2018-01-27 18:43:48
p19FlowProportionHC1

30 %

2018-01-27 18:46:22
p20FlowProportionHC2

100 %

2018-01-27 18:43:43
p21Hyst1

4 K

2018-01-27 18:44:18
p22Hyst2

3 K

2018-01-27 18:44:44
p23Hyst3

2 K

2018-01-27 18:47:26
p24Hyst4

2 K

2018-01-27 18:47:18
p25Hyst5

1 K

2018-01-27 18:46:42
p29HystAsymmetry

1

2018-01-27 18:46:17
p30integralComponent

100 Kmin

2018-01-27 18:46:15
p32HystDHW

2 K

2018-01-27 18:47:22
p33BoosterTimeoutDHW

90 min

2018-01-27 18:46:36
p34BoosterDHWTempAct

EF0A01012000BE00C8003C °C

2018-01-27 17:50:01
p34TempLimitBoostDHW

-10 °C

2018-01-27 18:43:58
p35PasteurisationInterval

30 Tage

2018-01-27 18:44:28
p35PasteurisationTemp

EF0A01012000BE00C8003C °C

2018-01-27 18:16:36
p36DHWMaxTime

EF0A01012000BE00C8003C

2018-01-27 18:16:39
p36MaxDurationDHWLoad

12 h

2018-01-27 18:43:56
p37Fanstage1AirflowInlet

115 m3/h

2018-01-27 18:47:15
p38Fanstage2AirflowInlet

173 m3/h

2018-01-27 18:45:50
p39Fanstage3AirflowInlet

230 m3/h

2018-01-27 18:46:47
p40Fanstage1AirflowOutlet

115 m3/h

2018-01-27 18:47:05
p41Fanstage2AirflowOutlet

173 m3/h

2018-01-27 18:44:52
p42Fanstage3AirflowOutlet

230 m3/h

2018-01-27 18:45:40
p43UnschedVent3

60 min

2018-01-27 18:43:45
p44UnschedVent2

60 min

2018-01-27 18:45:32
p45UnschedVent1

60 min

2018-01-27 18:45:48
p46UnschedVent0

60 min

2018-01-27 18:46:23
p47CompressorRestartDelay

20 min

2018-01-27 18:45:58
p48MainFanSpeed

70 %

2018-01-27 18:46:54
p49SummerModeTemp

18 °C

2018-01-27 18:44:06
p50SummerModeHysteresis

1 K

2018-01-27 18:46:09
p54MinPumpCycles

1 /Tag

2018-01-27 18:43:54
p55MaxPumpCycles

288 /Tag

2018-01-27 18:46:25
p56OutTempMaxPumpCycles

19 °C

2018-01-27 18:45:13
p57OutTempMinPumpCycles

error °C

2018-01-27 18:43:43
p58SuppressTempCaptPumpStart

60 s

2018-01-27 18:44:20
p75PassiveCooling

256

2018-01-27 18:46:30
p75passiveCooling

EF0A01012000BE00C8003C

2018-01-27 18:13:54
p76RoomThermCorrection

EF0A01012000BE00C8003C K

2018-01-27 18:16:08
p77OutTempFilterTime

1 h

2018-01-27 18:44:39
p77OutThermFilterTime

EF0A01012000BE00C8003C h

2018-01-27 18:17:19
p78DualModePoint

-3 °C

2018-01-27 18:45:14
p79BoosterTimeoutHC

60 min

2018-01-27 18:45:19
p80EnableSolar

8

2018-01-27 18:44:57
p83DHWsetSolarTemp

EF0A01012000BE00C8003C °C

2018-01-27 17:51:17
p89DHWeco

EF0A01012000BE00C8003C

2018-01-27 18:16:04
p99DHWmaxFlowTemp

EF0A01012000BE00C8003C °C

2018-01-27 17:51:38
p99FanStageParty

EF0A01012000BE00C8003C

2018-01-27 17:50:02
p99FrostProtectionBoost

EF0A01012000BE00C8003C °C

2018-01-27 17:50:11
p99FrostProtectionCancel

EF0A01012000BE00C8003C °C

2018-01-27 18:15:57
p99HC1maxFlowTemp

EF0A01012000BE00C8003C °C

2018-01-27 18:16:05
p99startUnschedVent

EF0A01012000BE00C8003C

2018-01-27 18:13:41
pAbsence

pA0DurationUntilAbsenceStart: 0 pA0AbsenceDuration: 0 pA0EnableAbsenceProg: 0

2018-01-27 18:47:08
pCircPump

p54MinPumpCycles: 1 p55MaxPumpCycles: 288 p56OutTempMaxPumpCycles: 19 p57OutTempMinPumpCycles: 20 p58SuppressTempCaptPumpStart: 60

2018-01-27 18:46:25
pClockDay

3

2018-01-27 18:47:16
pClockHour

19

2018-01-27 18:45:35
pClockMinutes

56

2018-01-27 18:46:02
pClockMonth

1

2018-01-27 18:45:53
pClockYear

18

2018-01-27 18:46:07
pDHW

p32HystDHW: 2 p33BoosterTimeoutDHW: 90 p34TempLimitBoostDHW: -10 p35PasteurisationInterval: 30 p36MaxDurationDHWLoad: 12 pasteurisationTemp: 10 maxBoostStagesDHW: 3 p84EnableDHWBuffer: 2

2018-01-27 18:47:22
pDHWProg

progDHWStartTime: 22:00 progDHWEndTime: 05:00 progDHWMonday: 1 progDHWTuesday: 1 progDHWWednesday: 1 progDHWThursday: 1 progDHWFriday: 1 progDHWSaturday: 1 progDHWSunday: 1 progDHWEnable: 0

2018-01-27 18:47:13
pDefrostAA

MaxDefrostDurationAAExchenger: 60 DefrostStartThreshold: 10 VolumeFlowFilterReplacement: 20

2018-01-27 18:44:02
pDefrostEva

UpTempLimitDefrostEvaporatorEnd: 15 MaxTimeDefrostEvaporator: 10 LimitTempCondenserElectBoost: 15 LimitTempCondenserDefrostTerm: 10 p47CompressorRestartDelay: 20 p48MainFanSpeed: 70

2018-01-27 18:46:54
pDryHeat

p70StartDryHeat: 0 p71BaseTemp: 30 p72PeakTemp: 45 p73TempDuration: 5 p74TempIncrease: 3

2018-01-27 18:44:31
pFan

p37Fanstage1AirflowInlet: 115 p38Fanstage2AirflowInlet: 173 p39Fanstage3AirflowInlet: 230 p40Fanstage1AirflowOutlet: 115 p41Fanstage2AirflowOutlet: 173 p42Fanstage3AirflowOutlet: 230 p43UnschedVent3: 60 p44UnschedVent2: 60 p45UnschedVent1: 60 p46UnschedVent0: 60 p75PassiveCooling: 256

2018-01-27 18:47:15
pFanProg

progFAN1StartTime: 22:00 progFAN1EndTime: 06:00 progFAN1Monday: 1 progFAN1Tuesday: 1 progFAN1Wednesday: 1 progFAN1Thursday: 1 progFAN1Friday: 1 progFAN1Saturday: 1 progFAN1Sunday: 1 progFAN1Enable: 0 progFAN2StartTime: 10:00 progFAN2EndTime: 17:00 progFAN2Monday: 1 progFAN2Tuesday: 1 progFAN2Wednesday: 1 progFAN2Thursday: 1 progFAN2Friday: 1 progFAN2Saturday: 0 progFAN2Sunday: 0 progFAN2Enable: 0

2018-01-27 18:47:19
pHeat1

p13GradientHC1: 0.5 p14LowEndHC1: 0 p15RoomInfluenceHC1: 0 p16GradientHC2: 0.6 p17LowEndHC2: 0 p18RoomInfluenceHC2: 0 p19FlowProportionHC1: 30 p20FlowProportionHC2: 100 MaxSetHeatFlowTempHC1: 45 MinSetHeatFlowTempHC1: 5 MaxSetHeatFlowTempHC2: 35 MinSetHeatFlowTempHC2: 5

2018-01-27 18:47:30
pHeat2

p21Hyst1: 4 p22Hyst2: 3 p23Hyst3: 2 p24Hyst4: 2 p25Hyst5: 1 p26Hyst6: 0 p27Hyst7: 0 p28Hyst8: 0 p29HystAsymmetry: 1 p30integralComponent: 100 p31MaxBoostStages: 3 MaxHeatFlowTemp: 75 p49SummerModeTemp: 18 p50SummerModeHysteresis: 1 p77OutTempFilterTime: 1 p78DualModePoint: -3 p79BoosterTimeoutHC: 60

2018-01-27 18:47:18
pHeatProg

progHC1StartTime: 22:00 progHC1EndTime: 06:00 progHC1Monday: 1 progHC1Tuesday: 1 progHC1Wednesday: 1 progHC1Thursday: 1 progHC1Friday: 1 progHC1Saturday: 1 progHC1Sunday: 1 progHC1Enable: 0 progHC2StartTime: 10:00 progHC2EndTime: 17:00 progHC2Monday: 1 progHC2Tuesday: 1 progHC2Wednesday: 1 progHC2Thursday: 1 progHC2Friday: 1 progHC2Saturday: 0 progHC2Sunday: 0 progHC2Enable: 0

2018-01-27 18:47:03
pHolidayBeginDay

EF0A01012000BE00C8003C

2018-01-27 17:14:27
pHolidayBeginMonth

EF0A01012000BE00C8003C

2018-01-27 18:15:11
pHolidayBeginTime

EF0A01012000BE00C8003C

2018-01-27 17:50:56
pHolidayBeginYear

EF0A01012000BE00C8003C

2018-01-27 18:14:50
pHolidayEndDay

EF0A01012000BE00C8003C

2018-01-27 18:15:25
pHolidayEndMonth

EF0A01012000BE00C8003C

2018-01-27 17:12:32
pHolidayEndTime

EF0A01012000BE00C8003C

2018-01-27 17:50:58
pHolidayEndYear

EF0A01012000BE00C8003C

2018-01-27 18:13:49
pOpMode

EF0A01012000BE00C8003C

2018-01-27 17:51:36
pRestart

p59RestartBeforeSetbackEnd: 120

2018-01-27 18:46:31
pSolar

p80EnableSolar: 8 p81DiffTempSolarLoading: 3891.4 p82DelayCompStartSolar: 88 p84DHWTempSolarMode: 3251.2 HystDiffTempSolar: 100 CollectLimitTempSolar: 170

2018-01-27 18:44:57
party-time

EF0A01012000BE00C8003C

2018-01-27 17:50:07
progDHWEnable

0

2018-01-27 18:47:13
progDHWEndTime

05:00

2018-01-27 18:45:10
progDHWFriday

1

2018-01-27 18:44:47
progDHWMonday

1

2018-01-27 18:46:39
progDHWSaturday

1

2018-01-27 18:44:15
progDHWStartTime

22:00

2018-01-27 18:46:06
progDHWSunday

1

2018-01-27 18:44:01
progDHWThursday

1

2018-01-27 18:43:59
progDHWTuesday

1

2018-01-27 18:43:40
progDHWWednesday

1

2018-01-27 18:44:34
progFAN1Enable

0

2018-01-27 18:47:10
progFAN1EndTime

06:00

2018-01-27 18:45:00
progFAN1Friday

1

2018-01-27 18:47:19
progFAN1Monday

1

2018-01-27 18:46:34
progFAN1Saturday

1

2018-01-27 18:43:38
progFAN1StartTime

22:00

2018-01-27 18:45:16
progFAN1Sunday

1

2018-01-27 18:46:38
progFAN1Thursday

1

2018-01-27 18:45:43
progFAN1Tuesday

1

2018-01-27 18:44:26
progFAN1Wednesday

1

2018-01-27 18:45:51
progFAN2Enable

0

2018-01-27 18:45:06
progFAN2EndTime

17:00

2018-01-27 18:47:11
progFAN2Friday


2018-01-27 18:44:51
progFAN2Monday

1

2018-01-27 18:46:46
progFAN2Saturday

0

2018-01-27 18:44:38
progFAN2StartTime

10:00

2018-01-27 18:44:23
progFAN2Sunday

0

2018-01-27 18:46:49
progFAN2Thursday

1

2018-01-27 18:45:08
progFAN2Tuesday

1

2018-01-27 18:45:56
progFAN2Wednesday

1

2018-01-27 18:46:55
progHC1Enable

0

2018-01-27 18:44:30
progHC1EndTime

06:00

2018-01-27 18:44:55
progHC1Friday

1

2018-01-27 18:47:06
progHC1Monday

1

2018-01-27 18:44:14
progHC1Saturday

1

2018-01-27 18:46:28
progHC1StartTime

22:00

2018-01-27 18:44:54
progHC1Sunday

1

2018-01-27 18:45:37
progHC1Thursday

1

2018-01-27 18:45:02
progHC1Tuesday

1

2018-01-27 18:44:22
progHC1Wednesday

1

2018-01-27 18:44:12
progHC2Enable

0

2018-01-27 18:46:10
progHC2EndTime

17:00

2018-01-27 18:47:00
progHC2Friday

1

2018-01-27 18:44:10
progHC2Monday

1

2018-01-27 18:46:01
progHC2Saturday

0

2018-01-27 18:45:18
progHC2StartTime

10:00

2018-01-27 18:46:44
progHC2Sunday

0

2018-01-27 18:44:49
progHC2Thursday

1

2018-01-27 18:44:04
progHC2Tuesday

1

2018-01-27 18:46:18
progHC2Wednesday

1

2018-01-27 18:46:41
programDHW_Fr_0

EF0A01012000BE00C8003C

2018-01-27 18:15:08
programDHW_Fr_1

EF0A01012000BE00C8003C

2018-01-27 17:50:39
programDHW_Fr_2

EF0A01012000BE00C8003C

2018-01-27 18:14:04
programDHW_Mo-Fr_0

EF0A01012000BE00C8003C

2018-01-27 17:51:27
programDHW_Mo-Fr_1

EF0A01012000BE00C8003C

2018-01-27 17:51:22
programDHW_Mo-Fr_2

EF0A01012000BE00C8003C

2018-01-27 18:13:30
programDHW_Mo-So_0

EF0A01012000BE00C8003C

2018-01-27 18:14:52
programDHW_Mo-So_1

EF0A01012000BE00C8003C

2018-01-27 18:16:13
programDHW_Mo-So_2

EF0A01012000BE00C8003C

2018-01-27 18:16:50
programDHW_Mo_0

EF0A01012000BE00C8003C

2018-01-27 17:51:52
programDHW_Mo_1

EF0A01012000BE00C8003C

2018-01-27 18:14:55
programDHW_Mo_2

EF0A01012000BE00C8003C

2018-01-27 18:17:09
programDHW_Sa-So_0

EF0A01012000BE00C8003C

2018-01-27 18:16:42
programDHW_Sa-So_1

EF0A01012000BE00C8003C

2018-01-27 18:14:00
programDHW_Sa-So_2

EF0A01012000BE00C8003C

2018-01-27 18:16:45
programDHW_Sa_0

EF0A01012000BE00C8003C

2018-01-27 17:52:01
programDHW_Sa_1

EF0A01012000BE00C8003C

2018-01-27 17:50:15
programDHW_Sa_2

EF0A01012000BE00C8003C

2018-01-27 18:13:48
programDHW_So_0

EF0A01012000BE00C8003C

2018-01-27 17:51:18
programDHW_So_1

EF0A01012000BE00C8003C

2018-01-27 18:16:23
programDHW_So_2

EF0A01012000BE00C8003C

2018-01-27 18:16:44
programDHW_Th_0

EF0A01012000BE00C8003C

2018-01-27 18:14:21
programDHW_Th_1

EF0A01012000BE00C8003C

2018-01-27 18:14:44
programDHW_Th_2

EF0A01012000BE00C8003C

2018-01-27 18:14:53
programDHW_Tu_0

EF0A01012000BE00C8003C

2018-01-27 18:17:06
programDHW_Tu_1

EF0A01012000BE00C8003C

2018-01-27 17:50:22
programDHW_Tu_2

EF0A01012000BE00C8003C

2018-01-27 18:13:46
programDHW_We_0

EF0A01012000BE00C8003C

2018-01-27 18:14:05
programDHW_We_1

EF0A01012000BE00C8003C

2018-01-27 18:13:22
programDHW_We_2

EF0A01012000BE00C8003C

2018-01-27 17:51:09
programFan_Fr_0

EF0A01012000BE00C8003C

2018-01-27 18:13:24
programFan_Fr_1

EF0A01012000BE00C8003C

2018-01-27 17:50:57
programFan_Fr_2

EF0A01012000BE00C8003C

2018-01-27 18:17:12
programFan_Mo-Fr_0

EF0A01012000BE00C8003C

2018-01-27 18:15:04
programFan_Mo-Fr_1

EF0A01012000BE00C8003C

2018-01-27 18:16:32
programFan_Mo-Fr_2

EF0A01012000BE00C8003C

2018-01-27 17:49:56
programFan_Mo-So_0

EF0A01012000BE00C8003C

2018-01-27 18:15:59
programFan_Mo-So_1

EF0A01012000BE00C8003C

2018-01-27 17:51:29
programFan_Mo-So_2

EF0A01012000BE00C8003C

2018-01-27 18:15:03
programFan_Mo_0

EF0A01012000BE00C8003C

2018-01-27 18:14:28
programFan_Mo_1

EF0A01012000BE00C8003C

2018-01-27 18:14:24
programFan_Mo_2

EF0A01012000BE00C8003C

2018-01-27 18:16:20
programFan_Sa-So_0

EF0A01012000BE00C8003C

2018-01-27 17:49:54
programFan_Sa-So_1

EF0A01012000BE00C8003C

2018-01-27 18:16:00
programFan_Sa-So_2

EF0A01012000BE00C8003C

2018-01-27 18:17:03
programFan_Sa_0

EF0A01012000BE00C8003C

2018-01-27 18:14:29
programFan_Sa_1

EF0A01012000BE00C8003C

2018-01-27 17:52:02
programFan_Sa_2

EF0A01012000BE00C8003C

2018-01-27 18:15:17
programFan_So_0

EF0A01012000BE00C8003C

2018-01-27 18:15:43
programFan_So_1

EF0A01012000BE00C8003C

2018-01-27 18:14:47
programFan_So_2

EF0A01012000BE00C8003C

2018-01-27 17:52:05
programFan_Th_0

EF0A01012000BE00C8003C

2018-01-27 18:14:08
programFan_Th_1

EF0A01012000BE00C8003C

2018-01-27 17:12:57
programFan_Th_2

EF0A01012000BE00C8003C

2018-01-27 18:17:17
programFan_Tu_0

EF0A01012000BE00C8003C

2018-01-27 18:15:27
programFan_Tu_1

EF0A01012000BE00C8003C

2018-01-27 17:51:12
programFan_Tu_2

EF0A01012000BE00C8003C

2018-01-27 18:14:10
programFan_We_0

EF0A01012000BE00C8003C

2018-01-27 17:50:35
programFan_We_1

EF0A01012000BE00C8003C

2018-01-27 17:51:14
programFan_We_2

EF0A01012000BE00C8003C

2018-01-27 17:51:26
programHC1_Fr_0

390B089802587F0003E806A41F00

2018-01-27 18:13:59
programHC1_Fr_1

390B089802587F0003E806A41F00

2018-01-27 17:51:10
programHC1_Fr_2

390B089802587F0003E806A41F00

2018-01-27 17:13:07
programHC1_Mo-Fr_0

390B089802587F0003E806A41F00

2018-01-27 17:51:06
programHC1_Mo-Fr_1

390B089802587F0003E806A41F00

2018-01-27 18:15:44
programHC1_Mo-Fr_2

390B089802587F0003E806A41F00

2018-01-27 17:13:20
programHC1_Mo-So_0

390B089802587F0003E806A41F00

2018-01-27 18:13:36
programHC1_Mo-So_1

390B089802587F0003E806A41F00

2018-01-27 17:50:48
programHC1_Mo-So_2

390B089802587F0003E806A41F00

2018-01-27 18:14:42
programHC1_Mo_0

390B089802587F0003E806A41F00

2018-01-27 18:15:22
programHC1_Mo_1

390B089802587F0003E806A41F00

2018-01-27 18:15:40
programHC1_Mo_2

390B089802587F0003E806A41F00

2018-01-27 18:14:23
programHC1_Sa-So_0

390B089802587F0003E806A41F00

2018-01-27 18:15:36
programHC1_Sa-So_1

390B089802587F0003E806A41F00

2018-01-27 17:50:38
programHC1_Sa-So_2

390B089802587F0003E806A41F00

2018-01-27 18:17:24
programHC1_Sa_0

390B089802587F0003E806A41F00

2018-01-27 18:14:48
programHC1_Sa_1

390B089802587F0003E806A41F00

2018-01-27 18:13:44
programHC1_Sa_2

390B089802587F0003E806A41F00

2018-01-27 18:14:31
programHC1_So_0

390B089802587F0003E806A41F00

2018-01-27 18:14:07
programHC1_So_1

390B089802587F0003E806A41F00

2018-01-27 18:16:29
programHC1_So_2

390B089802587F0003E806A41F00

2018-01-27 17:51:22
programHC1_Th_0

390B089802587F0003E806A41F00

2018-01-27 17:50:52
programHC1_Th_1

390B089802587F0003E806A41F00

2018-01-27 18:15:06
programHC1_Th_2

390B089802587F0003E806A41F00

2018-01-27 18:14:20
programHC1_Tu_0

390B089802587F0003E806A41F00

2018-01-27 18:16:47
programHC1_Tu_1

390B089802587F0003E806A41F00

2018-01-27 18:16:15
programHC1_Tu_2

390B089802587F0003E806A41F00

2018-01-27 18:16:31
programHC1_We_0

390B089802587F0003E806A41F00

2018-01-27 18:15:48
programHC1_We_1

390B089802587F0003E806A41F00

2018-01-27 18:14:37
programHC1_We_2

390B089802587F0003E806A41F00

2018-01-27 18:15:01
programHC2_Fr_0

210C089801F47F00

2018-01-27 17:50:48
programHC2_Fr_1

210C089801F47F00

2018-01-27 18:14:32
programHC2_Fr_2

210C089801F47F00

2018-01-27 18:17:22
programHC2_Mo-Fr_0

210C089801F47F00

2018-01-27 18:13:56
programHC2_Mo-Fr_1

210C089801F47F00

2018-01-27 17:51:45
programHC2_Mo-Fr_2

210C089801F47F00

2018-01-27 18:15:35
programHC2_Mo-So_0

210C089801F47F00

2018-01-27 17:51:24
programHC2_Mo-So_1

210C089801F47F00

2018-01-27 17:50:19
programHC2_Mo-So_2

210C089801F47F00

2018-01-27 18:16:53
programHC2_Mo_0

210C089801F47F00

2018-01-27 18:16:10
programHC2_Mo_1

210C089801F47F00

2018-01-27 18:16:58
programHC2_Mo_2

210C089801F47F00

2018-01-27 18:15:41
programHC2_Sa-So_0

210C089801F47F00

2018-01-27 18:14:40
programHC2_Sa-So_1

210C089801F47F00

2018-01-27 18:13:40
programHC2_Sa-So_2

210C089801F47F00

2018-01-27 18:13:35
programHC2_Sa_0

210C089801F47F00

2018-01-27 17:51:23
programHC2_Sa_1

210C089801F47F00

2018-01-27 18:13:52
programHC2_Sa_2

210C089801F47F00

2018-01-27 17:14:08
programHC2_So_0

210C089801F47F00

2018-01-27 17:51:12
programHC2_So_1

210C089801F47F00

2018-01-27 18:17:14
programHC2_So_2

210C089801F47F00

2018-01-27 18:13:43
programHC2_Th_0

210C089801F47F00

2018-01-27 18:13:32
programHC2_Th_1

210C089801F47F00

2018-01-27 17:51:56
programHC2_Th_2

210C089801F47F00

2018-01-27 17:51:00
programHC2_Tu_0

210C089801F47F00

2018-01-27 18:13:25
programHC2_Tu_1

210C089801F47F00

2018-01-27 18:15:52
programHC2_Tu_2

210C089801F47F00

2018-01-27 17:50:37
programHC2_We_0

210C089801F47F00

2018-01-27 17:50:32
programHC2_We_1

210C089801F47F00

2018-01-27 18:16:40
programHC2_We_2

210C089801F47F00

2018-01-27 18:16:16
sBoostDHWTotal

0 kWh

2018-01-27 18:13:20
sBoostHCTotal

0 kWh

2018-01-27 18:14:56
sControl

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

2018-01-27 18:42:37
sDHW

dhwTemp: 33.8 outsideTemp: 6.5 dhwSetTemp: 45 compBlockTime: 0 out: 1218 heatBlockTime: 2129 dhwBoosterStage: 1 pasteurisationMode: 0 dhwOpMode: normal x36: DAE1

2018-01-27 18:42:02
sDisplay

EF0A01012000BE00C8003C

2018-01-27 18:14:36
sElectrDHWDay

0 Wh

2018-01-27 18:15:14
sElectrDHWTotal

0 kWh

2018-01-27 18:15:30
sElectrHCDay

0 Wh

2018-01-27 18:14:34
sElectrHCTotal

0 kWh

2018-01-27 18:14:45
sFan

statusAFC: 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.7 exhaustFanSpeed200: 768 airflowTolerance: 115 airflowCalibrationInterval: 0 timeToCalibration: 115

2018-01-27 18:44:09
sFirmware

version: 02.06

2018-01-27 18:45:29
sGlobal

outsideTemp: 6.4 flowTemp: 28.9 returnTemp: 28.1 hotGasTemp: 44.7 dhwTemp: 48 flowTempHC2: 0 evaporatorTemp: 5.8 condenserTemp: 29.2 mixerOpen: 0 mixerClosed: 0 heatPipeValve: 0 diverterValve: 0 dhwPump: 0 heatingCircuitPump: 1 solarPump: 0 compressor: 0 boosterStage3: 0 boosterStage2: n.a. boosterStage1: 0 highPressureSensor: 1 lowPressureSensor: 1 evaporatorIceMonitor: 1 signalAnode: 0 evuRelease: n.a. ovenFireplace: 0 STB: n.a. outputVentilatorPower: 39 inputVentilatorPower: 39 mainVentilatorPower: 0 outputVentilatorSpeed: 42 inputVentilatorSpeed: 26 mainVentilatorSpeed: 0 outsideTempFiltered: 6.5 relHumidity: n.a. dewPoint: n.a. P_Nd: n.a. P_Hd: n.a. actualPower_Qc: n.a. actualPower_Pel: n.a. collectorTemp: 0 insideTemp: 0

2018-01-27 20:30:37
sHC1

outsideTemp: 7 x08: 35.7 returnTemp: 38.4 integralHeat: -3 flowTemp: 42 heatSetTemp: 30.3 heatTemp: 39.4 seasonMode: winter integralSwitch: 100 hcOpMode: normal roomSetTemp: 22.5 x60: 0 x64: 0 insideTempRC: 0 x72: 51.2 x76: 0 onHysteresisNo: 1 offHysteresisNo: 0 hcBoosterStage: 1

2018-01-27 18:45:05
sHC2

outsideTemp: 6.7 returnTemp: 37.8 vorlaufTemp: 0 heatSetTemp: 31.9 heatTemp: 37.8 stellgroesse: -100 seasonMode: winter hcOpMode: normal

2018-01-27 18:43:50
sHeatDHWDay

0 Wh

2018-01-27 17:14:21
sHeatDHWTotal

0 kWh

2018-01-27 18:16:26
sHeatHCDay

0 Wh

2018-01-27 18:14:58
sHeatHCTotal

0 kWh

2018-01-27 18:14:02
sHeatRecoveredDay

0 Wh

2018-01-27 17:51:15
sHeatRecoveredTotal

0 kWh

2018-01-27 18:14:12
sHistory

operatingHours1: 214 operatingHours2: 213 heatingHours: 12012 DHWhours: 4518 coolingHours: 0

2018-01-27 18:44:36
sProgram

opMode: automatic ProgStateHC: normal ProgStateDHW: normal ProgStateFAN: normal BaseTimeAP0: 12838 StatusAP0: 0 StartTimeAP0: 0 EndTimeAP0: 0

2018-01-27 18:47:27
sSystem

userSetFanStage: 0 userSetFanRemainingTime: 0 lastErrors:

2018-01-27 18:41:35
sTimedate

Weekday: Saturday pClockHour: 19 pClockMinutes: 57 Sec: 36 pClockYear: 18 pClockMonth: 1 pClockDay: 3

2018-01-27 18:47:24
state

opened

2018-01-27 18:38:59


Mein Ziel ist es mit FHEM entsprechende Werte an den MS von Loxone zu geben und darüber in Verbindung meiner PV-Anlage den Rundsteuerempfänger der LWZ zu steuern - bzw. zu sperren oder entsperren. Das denke ich wird aber im Großen und Ganzen eine langwierige Geschichte werden.
Daher fange ich mal mit FHEM an :)

Vielen Dank & viele Grüße
Fabian

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 27 Januar 2018, 21:30:44
Herzlich willkommen Fabian,

du hast wahrscheinlich noch nicht die richtige Firmwareversion in der Gerätedefinition eingestellt. Deshalb sind Deine Readings zum Teil nicht richtig. Du musst dazu das Attribute "firmware" auf 2.06 setzen, entweder im Web-GUI oder über telnet mit "attr Mythz firmware 2.06.
VG
André
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: börni am 28 Januar 2018, 10:39:30
Hallo Andre,

doch das habe ich bereits gemacht, den Hinweis hatte ich schon in den unzähligen Beiträgen gefunden :)
Seit dem steht auch unter Mythz bei model "2.06_02.06" davor stand da nur ich glaube NA _ 2.06

Vielen Dank & viele Grüße
Fabian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 28 Januar 2018, 11:52:47
Zitat von: börni am 28 Januar 2018, 10:39:30
Hallo Andre,

doch das habe ich bereits gemacht, den Hinweis hatte ich schon in den unzähligen Beiträgen gefunden :)
Seit dem steht auch unter Mythz bei model "2.06_02.06" davor stand da nur ich glaube NA _ 2.06

Vielen Dank & viele Grüße
Fabian

Dear Fabian
have you now solved your issues?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: börni am 28 Januar 2018, 18:24:44
Dear Immi,

No unfortunately not solved ....
Outputs in some values are in binary code or something :(

Thanks and best Regards
Fabian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: ioT4db am 29 Januar 2018, 15:22:39
Zitat von: immi am 25 Januar 2018, 16:10:50
This is what I highlighted as open point last week.
Andre took care about the interpretation of the registers (F2 and E8) for very old firmwares.
Now it has to be done for newer firmwares.
I remember you that if you want to see the registers before interpretation you have to set the verbose to 5
immi

hi immi,

thanks for the hint.

What can I do now with this message or otherwise can someone give me an idea haow to decrypt this parse message?

2018.01.25 23:14:32 5: THZ_Get: Try to get 'sGlobal'
2018.01.25 23:14:32 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2018.01.25 23:14:32 5: Mythz sending 02
2018.01.25 23:14:32 5: SW: 02
2018.01.25 23:14:32 5: Mythz start Function THZ_ReadAnswer
2018.01.25 23:14:32 5: THZ_ReadAnswer: uc unpack: '10'
2018.01.25 23:14:32 5: Mythz sending 0100FCFB1003
2018.01.25 23:14:32 5: SW: 0100FCFB1003
2018.01.25 23:14:32 5: Mythz start Function THZ_ReadAnswer
2018.01.25 23:14:32 5: THZ_ReadAnswer: uc unpack: '10'
2018.01.25 23:14:32 5: Mythz start Function THZ_ReadAnswer
2018.01.25 23:14:32 5: THZ_ReadAnswer: uc unpack: '02'
2018.01.25 23:14:32 5: Mythz sending 10
2018.01.25 23:14:32 5: SW: 10
2018.01.25 23:14:32 5: Mythz start Function THZ_ReadAnswer
2018.01.25 23:14:32 5: double read 1 activated 01008BFBFDA80056010C
2018.01.25 23:14:32 5: double read 1 result with buf1  01008BFBFDA80056010C0100012A0203FDA8FDA8010A01020000
2018.01.25 23:14:32 5: double read 2 activated 01008BFBFDA80056010C0100012A0203FDA8FDA8010A01020000
2018.01.25 23:14:32 5: double read 2 result with buf1  01008BFBFDA80056010C0100012A0203FDA8FDA8010A0102000001015E015E0000001600150000005800
2018.01.25 23:14:32 5: double read 3 activated 01008BFBFDA80056010C0100012A0203FDA8FDA8010A0102000001015E015E0000001600150000005800
2018.01.25 23:14:32 5: double read 3 result with buf1  01008BFBFDA80056010C0100012A0203FDA8FDA8010A0102000001015E015E000000160015000000580000000002B7047200000000000000000000
2018.01.25 23:14:32 5: double read 4 activated 01008BFBFDA80056010C0100012A0203FDA8FDA8010A0102000001015E015E000000160015000000580000000002B7047200000000000000000000
2018.01.25 23:14:32 5: double read 4 result with buf1  01008BFBFDA80056010C0100012A0203FDA8FDA8010A0102000001015E015E000000160015000000580000000002B704720000000000000000000000710000000001050101010D00E800EF
2018.01.25 23:14:32 5: double read 5 activated 01008BFBFDA80056010C0100012A0203FDA8FDA8010A0102000001015E015E000000160015000000580000000002B704720000000000000000000000710000000001050101010D00E800EF
2018.01.25 23:14:32 5: double read 5 result with buf1  01008BFBFDA80056010C0100012A0203FDA8FDA8010A0102000001015E015E000000160015000000580000000002B704720000000000000000000000710000000001050101010D00E800EF0000000010101F1003
2018.01.25 23:14:32 5: THZ_ReadAnswer: uc unpack: '01008BFBFDA80056010C0100012A0203FDA8FDA8010A0102000001015E015E000000160015000000580000000002B704720000000000000000000000710000000001050101010D00E800EF0000000010101F1003'
2018.01.25 23:14:32 5: Mythz sending 10
2018.01.25 23:14:32 5: SW: 10
2018.01.25 23:14:32 5: Parse message: 8BFBFDA80056010C0100012A0203FDA8FDA8010A0102000001015E015E000000160015000000580000000002B704720000000000000000000000710000000001050101010D00E800EF00000000101F
2018.01.25 23:14:32 5: Message length: 158
2018.01.25 23:14:34 5: THZ_Get: Try to get 'sFan'
2018.01.25 23:14:34 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2018.01.25 23:14:34 5: Mythz sending 02
2018.01.25 23:14:34 5: SW: 02
2018.01.25 23:14:34 5: Mythz start Function THZ_ReadAnswer
2018.01.25 23:14:34 5: THZ_ReadAnswer: uc unpack: '10'
2018.01.25 23:14:34 5: Mythz sending 0100E9E81003
2018.01.25 23:14:34 5: SW: 0100E9E81003
2018.01.25 23:14:34 5: Mythz start Function THZ_ReadAnswer
2018.01.25 23:14:34 5: THZ_ReadAnswer: uc unpack: '10'
2018.01.25 23:14:34 5: Mythz start Function THZ_ReadAnswer
2018.01.25 23:14:34 5: THZ_ReadAnswer: uc unpack: '02'
2018.01.25 23:14:34 5: Mythz sending 10
2018.01.25 23:14:34 5: SW: 10
2018.01.25 23:14:34 5: Mythz start Function THZ_ReadAnswer
2018.01.25 23:14:34 5: double read 1 activated 0100D7E80200013647000122C50001
2018.01.25 23:14:34 5: double read 1 result with buf1  0100D7E80200013647000122C500013C68000152E800000000000000000E10
2018.01.25 23:14:34 5: double read 2 activated 0100D7E80200013647000122C500013C68000152E800000000000000000E10
2018.01.25 23:14:34 5: double read 2 result with buf1  0100D7E80200013647000122C500013C68000152E800000000000000000E10101416008C008C2323001003
2018.01.25 23:14:34 5: THZ_ReadAnswer: uc unpack: '0100D7E80200013647000122C500013C68000152E800000000000000000E10101416008C008C2323001003'
2018.01.25 23:14:34 5: Mythz sending 10
2018.01.25 23:14:34 5: SW: 10
2018.01.25 23:14:34 5: Parse message: D7E80200013647000122C500013C68000152E800000000000000000E101416008C008C232300
2018.01.25 23:14:34 5: Message length: 76


cheers...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 29 Januar 2018, 18:34:11
Hi Fabian
I will have a look in the week-end

HI  friesenjung
taking your message of register E8

2018.01.25 23:14:34 5: Parse message: D7E80200013647000122C500013C68000152E800000000000000000E101416008C008C232300


you try to make sense of it like Andre did here
https://forum.fhem.de/index.php/topic,33211.msg752272.html#msg752272
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: börni am 29 Januar 2018, 19:45:17
Hi Immi,

Can I do something in between?
The software of the LWZ303i is 2.06. - that is correct. This is also mentioned in the readings.

Thanks for your Support and best Regards
Fabian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: börni am 29 Januar 2018, 19:59:39
Why I'm having some/a lot of these parameters double?
Like this:


p05DHWsetNightTemp

EF0A01012000BE00C8003C °C

2018-01-27 18:17:01
p05DHWsetTempNight

45 °C

2018-01-28 10:38:30
p06DHWsetStandbyTemp

EF0A01012000BE00C8003C °C

2018-01-27 18:16:37
p06DHWsetTempStandby

10 °C


Thanks
Fabian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 29 Januar 2018, 20:30:12
Hi Fabian
this look like you have some old stuff.

Delete all readings starting with "p" with this command

deletereading Mythz p.*

update and restart
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: börni am 29 Januar 2018, 21:37:36
Yes - I've deleted everything - just starting from the scratch :)
I guess due to some testings there where some mismatch - but now I'm seeing kind of this stuff:


2018.01.29 20:55:32 0: Server started with 9 defined entities (fhem.pl:16017/2018-01-27 perl:5.020002 os:linux user:loxberry pid:2072)
2018.01.29 20:57:38 3: Opening Mythz device /dev/ttyUSB0
2018.01.29 20:57:38 3: Setting Mythz serial parameters to 9600,8,N,1
2018.01.29 20:57:38 3: Mythz device opened
2018.01.29 20:58:17 1: PERL WARNING: Argument "EF0A01012000BE00C8003C" isn't numeric in multiplication (*) at ./FHEM/00_THZ.pm line 1449.
2018.01.29 20:58:17 1: PERL WARNING: Argument "EF0A01012000BE00C8003C" isn't numeric in addition (+) at ./FHEM/00_THZ.pm line 1449.
2018.01.29 20:58:21 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0A1772 ->
2018.01.29 20:59:05 3: THZ_Get: Error msg2:  decode: CRC error in request -- 0A0576 -> 01020F0C1003
2018.01.29 20:59:30 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/00_THZ.pm line 1118.
2018.01.29 20:59:30 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/00_THZ.pm line 1125.
2018.01.29 20:59:46 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0B ->
2018.01.29 20:59:46 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1426.
2018.01.29 20:59:50 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step2 -- FB ->
2018.01.29 20:59:53 3: THZ_Get: Error msg2:   THZ_Get_Com: error found at step0 15 NAK!! -- 17 -> 15
2018.01.29 20:59:53 1: PERL WARNING: Use of uninitialized value $err in concatenation (.) or string at ./FHEM/00_THZ.pm line 1016.
2018.01.29 20:59:53 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/00_THZ.pm line 1016.
2018.01.29 20:59:53 3: Mythz/RAW: 02 -  -
2018.01.29 21:00:45 3: THZ_Get: Error msg2:  THZ_ReadAnswer: Interface max repeat limited to 60  THZ_Get_Com: error found at step2 -- D1 -> 010009D101010017072D05E50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2018.01.29 21:00:45 3: Mythz/RAW: 02000000001003 -  -
2018.01.29 21:00:53 3: THZ_Get: Error msg2:  decode: command not known -- FE -> 010302FE1003
2018.01.29 21:01:46 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0C ->
2018.01.29 21:01:49 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0F ->
2018.01.29 21:02:46 3: THZ_Get: Error msg2:  THZ_ReadAnswer: Interface max repeat limited to 60  THZ_Get_Com: error found at step2 -- D1 -> 010009D101010017072D05E500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2018.01.29 21:02:46 3: Mythz/RAW: 0200000000100300000000001003 -  -
2018.01.29 21:02:52 3: THZ_Get: Error msg2:  decode: command not known -- 16 -> 01031A161003
2018.01.29 21:03:07 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 17 ->
2018.01.29 21:03:09 3: THZ_Parsing: offset(20) + length(4) is longer then message : '58080000160D1412000105'
2018.01.29 21:03:30 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 10 ->
2018.01.29 21:04:46 3: THZ_Get: Error msg2:  THZ_ReadAnswer: Interface max repeat limited to 60  THZ_Get_Com: error found at step2 -- D1 -> 010009D101010017072D05E500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2018.01.29 21:04:46 3: Mythz/RAW: 020000000010030000000000100300000000001003 -  -


Thanks
Fabian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: The Spirit am 31 Januar 2018, 09:56:12
seit gestern habe ich auch probleme mit dem Modul.
bei mir kommt auch andauern im log:
THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0
gibt es hier schon einen hinweis was das problem sein könnte?
habe in letzter zeit nichts an der anlage verändert.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 31 Januar 2018, 20:17:33
Hallo Fabian,

die beiden Logeinträge

2018.01.29 21:00:53 3: THZ_Get: Error msg2:  decode: command not known -- FE -> 010302FE1003
...
2018.01.29 21:02:52 3: THZ_Get: Error msg2:  decode: command not known -- 16 -> 01031A161003

sagen, dass die beiden Register FE und 16 offensichtlich bei deiner Anlage nicht implementiert sind.
Register 16 ist sSol, welches bestimmt nur bei Anlagen mit Solar existiert. Das würde auch zu Deiner FW 2.06 passen, diese ist m.E. nicht für Solar vorgesehen. Die Lösung wäre im sSol im Perl-Code von %getsonly2xx nach %getsonly214 zu verschieben. Oder du ignorierst den Fehler einfach. Du brauchst das Register ja nicht regelmäßig abfragen.
Das Register EF (sFirmware-Id) ist wahrscheinlich erst ab höheren FW-Versionen >2.x implementiert. Bei meiner FW 2.14 existiert auch kein Register EF. Mich wundert nur, dass das bisher noch niemendem außer Dir aufgefallen ist. Es gibt ja noch andere User mit FW 2.06. Vielleicht kann das mal jemand mit FW 2.06 überprüfen. Wenn sich mein Verdacht bestätigt, könnte  immi sFirmware-Id aus der %getsonly206 entfernen.

Andre

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: peter456 am 01 Februar 2018, 09:21:53
Zitat von: andre.k am 31 Januar 2018, 20:17:33
Hallo Fabian,

die beiden Logeinträge

2018.01.29 21:00:53 3: THZ_Get: Error msg2:  decode: command not known -- FE -> 010302FE1003
...
2018.01.29 21:02:52 3: THZ_Get: Error msg2:  decode: command not known -- 16 -> 01031A161003

sagen, dass die beiden Register FE und 16 offensichtlich bei deiner Anlage nicht implementiert sind.
Register 16 ist sSol, welches bestimmt nur bei Anlagen mit Solar existiert. Das würde auch zu Deiner FW 2.06 passen, diese ist m.E. nicht für Solar vorgesehen. Die Lösung wäre im sSol im Perl-Code von %getsonly2xx nach %getsonly214 zu verschieben. Oder du ignorierst den Fehler einfach. Du brauchst das Register ja nicht regelmäßig abfragen.
Das Register EF (sFirmware-Id) ist wahrscheinlich erst ab höheren FW-Versionen >2.x implementiert. Bei meiner FW 2.14 existiert auch kein Register EF. Mich wundert nur, dass das bisher noch niemendem außer Dir aufgefallen ist. Es gibt ja noch andere User mit FW 2.06. Vielleicht kann das mal jemand mit FW 2.06 überprüfen. Wenn sich mein Verdacht bestätigt, könnte  immi sFirmware-Id aus der %getsonly206 entfernen.

Andre

Hallo,
bei meiner LWZ303i Firmware 2.06 können diese beiden Register auch nicht dekodiert werden.
Error msg2:  decode: command not known -- FE -> 010302FE1003
Error msg2:  decode: command not known -- 16 -> 01031A161003
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 01 Februar 2018, 17:59:30
Hallo Peter,

danke fürs Testen. Dann bestätigt sich meine Theorie, dass Register sFirmwareID (EF) erst nach 2.06 realisiert wurde. Und sSol (16) gibt es offensichtlich nur bei den Solarversionen 2.1x und nicht bei 2.0x.

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: börni am 03 Februar 2018, 18:57:19
I'm seeing in the log file after start the following Information:


2018.02.03 18:53:47 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/00_THZ.pm line 1118.
2018.02.03 18:53:47 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/00_THZ.pm line 1125.


failure or Feature  :o ;D

Thanks
Fabian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 03 Februar 2018, 20:14:32
It's a minor bug ;)
line 1118 should be
if (defined($value->{type}) and ($value->{type} eq "0clean" or $value->{type} eq "1clean")) {
and line 1125
elsif (defined($value->{type}) and ($value->{type} eq "2opmode")){

Hi Immi please could you change this.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 03 Februar 2018, 20:43:48
Hi Andre
this means that you have a problem also in line 1164 when you when you e.g. set p01RoomTempDay?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 03 Februar 2018, 21:09:19
Hi immi,

yes.

2018.02.03 21:06:58 1: PERL WARNING: Use of uninitialized value in pattern match (m//) at ./FHEM/00_THZ.pm line 1164.
2018.02.03 21:06:58 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/00_THZ.pm line 1168.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: börni am 03 Februar 2018, 21:45:39
sollte ich das bei mir nun schon mal händisch abändern oder auf nen Update warten?

Vielen Dank & viele Grüße
Fabian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 03 Februar 2018, 22:07:13
Du kannst ruhig warten bis immi das korrigiert und ins SVN hochlädt. Es handelt sich ja nur um Warnings, die sind eigentlich unschädlich.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 04 Februar 2018, 16:52:46
Hi Andre
i implemented and committed the following
- all %soll have a type
- validation of time inputs in set

please xcheck

Hi Fabian
please wait for Andre confirmation before upgrading
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 08 Februar 2018, 08:13:27
the missing answer for andre's new registers:

get sControl:
1st try: 
0101F4F21003 msg2 decode: timing issue

2nd try: 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

get sFan:
statusAFC: 512 supplyFanSpeedCAL: 9.18333333333333 exhaustFanSpeedCAL: 524.8 supplyFanAirflowCAL: 5.79 exhaustFanAirflowCAL: 89.6 supplyFanSpeed: 544 exhaustFanSpeed: 56320 supplyFanAirflowSet: 572 exhaustFanAirflowSet: 34304 supplyFanSpeedTarget: 0 exhaustFanSpeedTarget: 0 supplyFanSpeed0: 0 exhaustFanSpeed0: 1.4 supplyFanSpeed200: 412.1 exhaustFanSpeed200: 640 airflowTolerance: 50 airflowCalibrationInterval: 0 timeToCalibration: 63

I didn't try to understand what the answers may tell me, don't have enough time currently, sorry.


btw:
to try out "nonblockng" - is it enough to set the attribute to 1?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 08 Februar 2018, 08:44:38
Zitat von: willybauss am 08 Februar 2018, 08:13:27
I didn't try to understand what the answers may tell me, don't have enough time currently, sorry.

No problem Willy.. you are investing so much time in supporting newcomers in the forum, which is more important.

p.s. do not strart looking at nonblockng unless you have tons of time. Parallelizing is a complex beast.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 08 Februar 2018, 09:44:52
Since a few days I'm using the new "freezemon" https://forum.fhem.de/index.php/topic,83909.0.html (https://forum.fhem.de/index.php/topic,83909.0.html)  module and saw lots of entries like

s:23:37:27 e:23:37:28 f:1.23 d:CUL_HM_procQs(CUL_HM_procQs) THZ_GetRefresh(N/A) SYSMON_Update(sysmon)


After having changed Mythz to nonblocking the result looks like

1 - s:08:05:59 e:08:06:01 f:2.579 d:CUL_HM_procQs(CUL_HM_procQs)
1 - s:08:17:07 e:08:17:08 f:1.005 d:CUL_HM_procQs(CUL_HM_procQs)
1 - s:08:18:07 e:08:18:08 f:1.114 d:CUL_HM_procQs(CUL_HM_procQs)
1 - s:08:28:10 e:08:28:11 f:1.219 d:CUL_HM_procQs(CUL_HM_procQs)
1 - s:08:42:14 e:08:42:15 f:1.022 d:CUL_HM_procQs(CUL_HM_procQs)
1 - s:08:48:16 e:08:48:17 f:1.021 d:CUL_HM_procQs(CUL_HM_procQs)
1 - s:08:52:17 e:08:52:18 f:1.136 d:CUL_HM_procQs(CUL_HM_procQs)
1 - s:09:11:23 e:09:11:24 f:1.017 d:CUL_HM_procQs(CUL_HM_procQs)
1 - s:09:15:24 e:09:15:25 f:1.182 d:CUL_HM_procQs(CUL_HM_procQs)
1 - s:09:32:29 e:09:32:30 f:1.061 d:CUL_HM_procQs(CUL_HM_procQs)
1 - s:09:36:30 e:09:36:31 f:1.033 d:CUL_HM_procQs(CUL_HM_procQs)
1 - s:09:40:50 e:09:40:51 f:1.376 d:CUL_HM_procQs(CUL_HM_procQs)


but the same time the log file is filled with tons of

2018.02.08 09:32:27 3 : [Mythz] THZ_GetRefresh(sDisplay) BlockingCall started
2018.02.08 09:32:29 3 : Setting Mythz serial parameters to 115200,8,N,1
2018.02.08 09:32:29 1 : /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0 reappeared (Mythz)
2018.02.08 09:32:30 1 : FreezeMon: myFreezemon possible freeze starting at 09:32:29, delay is 1.061 possibly caused by CUL_HM_procQs(CUL_HM_procQs)
2018.02.08 09:33:27 3 : opened||||||
2018.02.08 09:33:27 3 : [Mythz] THZ_GetRefresh(sDisplay) BlockingCall started
2018.02.08 09:33:30 3 : Setting Mythz serial parameters to 115200,8,N,1
2018.02.08 09:33:30 1 : /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0 reappeared (Mythz)
2018.02.08 09:33:45 3 : opened||||||
2018.02.08 09:33:45 3 : [Mythz] THZ_GetRefresh(sHC1) BlockingCall started
2018.02.08 09:33:46 3 : Setting Mythz serial parameters to 115200,8,N,1
2018.02.08 09:33:46 1 : /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0 reappeared (Mythz)
2018.02.08 09:34:27 3 : opened||||||
2018.02.08 09:34:28 3 : [Mythz] THZ_GetRefresh(sDisplay) BlockingCall started
2018.02.08 09:34:30 3 : Setting Mythz serial parameters to 115200,8,N,1
2018.02.08 09:34:30 1 : /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0 reappeared (Mythz)
2018.02.08 09:35:28 3 : opened||||||
2018.02.08 09:35:28 3 : [Mythz] THZ_GetRefresh(sDisplay) BlockingCall started
2018.02.08 09:35:30 3 : Setting Mythz serial parameters to 115200,8,N,1
2018.02.08 09:35:30 1 : /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0 reappeared (Mythz)
2018.02.08 09:36:28 3 : opened||||||


Therefore I switched of nonblocking now. Is there a better solution, e.g. suppress these log entries? Would it be dangerous to suppress them?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: ioT4db am 08 Februar 2018, 10:43:28
Zitat von: andre.k am 20 Januar 2018, 00:07:05
...
Ich weiss nicht inwiefern die Register auch in den neueren Anlagen bzw. Firmware<>2.14 vorhanden sind. Vieleicht könnte das mal jemand testen. Die zugehörigen Get-Kommandos sind wie folgt
...

Also die Werte der Lüfterstufen (bei get sFan) stehen bei mir (sFirmware version: 05.19 / sFirmware-Id HW: 113 SW: 3.16 Date: DEC 10 2014) schonmal weiter hinten!

Die Position in der Parse message habe ich fett markiert...

Beispiel:

2018.01.29 22:55:36 5: Parse message: F6E80200013AA30001714F00013C69000174A800000000000000000E101518 008C 008C 23 23 00
(hier Lüfter Stufe 1: 140 m3/h in und out und outputVentilatorPower: 35 inputVentilatorPower: 35)

2018.01.30 08:39:47 5: Parse message: 29E80200013AA30001714F00013C69000174A800000000000000000E101A14 00A0 00A0 28 28 00
(hier Lüfter Stufe 2: 160 m3/h in und out und outputVentilatorPower: 40 inputVentilatorPower: 40)

VG
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 08 Februar 2018, 12:15:15
Hi Willy
I do not know what freezemon does in detail.
But it is not a big surprise that thz blocks fhem during the serial comunication for some milliseconds.
For newer tecalor with higher serial-baud it is negligible.
For older thz 2.x it is not negible; therefore andre and me implemented the 2 approaches (non-blocking and Global select loop) in July2017 (https://forum.fhem.de/index.php/topic,33211.msg675835.html#msg675835)
I am still not 100% happy with the solutions (both have sideeffects)

To Your question:  >>suppress these log entries
The log entries are not the problem; The problem is that we are opening and closing the serial adapter each time you make a non-blocking call.
immi

Hi friesenjung
good job
I will xcheck this evening
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 08 Februar 2018, 14:09:59
Zitat von: immi am 08 Februar 2018, 12:15:15
For newer tecalor with higher serial-baud it is negligible.
My THZ works with 115.2kbit/s. But frequently opening/closing the adapter might have different drawbacks, I guess. So I let it as it is currently.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 08 Februar 2018, 21:13:46
Zitat von: immi am 04 Februar 2018, 16:52:46
Hi Andre
i implemented and committed the following
- all %soll have a type
- validation of time inputs in set

please xcheck

Hi Fabian
please wait for Andre confirmation before upgrading
immi

Hi immi,

I checked the new version. It's ok, no warnings from THZ_Set anymore.

André
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 08 Februar 2018, 22:16:12
Hi Andre
thanks
one other question: what is "calibration speed" in your  E8fan?


Hi friesenjung
i committed the followings

[" x48: ",                  48, 4, "hex", 1],
[" x52: ",                  52, 4, "hex", 1],
[" x56: ",                  56, 4, "hex", 1],
[" inputFanSpeed: ",        58, 2, "hex", 1],         #like in sGlobal?  actual measured speed
[" outputFanSpeed: ",       60, 2, "hex", 1],         #like in sGlobal? actual measured speed
[" pFanstageXAirflowInlet: ",  62, 4, "hex", 1],    #m3/h  like p37Fanstage1AirflowInlet or p38Fanstage2AirflowInlet
[" pFanstageXAirflowOutlet: ", 66, 4, "hex", 1],  #m3/h like p40Fanstage1AirflowOutlet or p41Fanstage2AirflowOutlet
[" inputFanPower: ",           70, 2, "hex", 1],      # like in sGlobal
[" outputFanPower: ",          72, 2, "hex", 1],      # like in sGlobal

everything before charachter 58 has still to be deciphered
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: ioT4db am 08 Februar 2018, 23:34:18
Zitat von: immi am 08 Februar 2018, 22:16:12

Hi friesenjung
i committed the followings

[" x48: ",                  48, 4, "hex", 1],
[" x52: ",                  52, 4, "hex", 1],
[" x56: ",                  56, 4, "hex", 1],
[" inputFanSpeed: ",        58, 2, "hex", 1],         #like in sGlobal?  actual measured speed
[" outputFanSpeed: ",       60, 2, "hex", 1],         #like in sGlobal? actual measured speed
[" pFanstageXAirflowInlet: ",  62, 4, "hex", 1],    #m3/h  like p37Fanstage1AirflowInlet or p38Fanstage2AirflowInlet
[" pFanstageXAirflowOutlet: ", 66, 4, "hex", 1],  #m3/h like p40Fanstage1AirflowOutlet or p41Fanstage2AirflowOutlet
[" inputFanPower: ",           70, 2, "hex", 1],      # like in sGlobal
[" outputFanPower: ",          72, 2, "hex", 1],      # like in sGlobal

everything before charachter 58 has still to be deciphered

hi immi,

its not so easy but I will give my best ;)

Another question: Is there a reason that p58 ist not schown with firmware 5.39?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 09 Februar 2018, 10:32:00
Zitat von: friesenjung am 08 Februar 2018, 23:34:18
Another question: Is there a reason that p58 ist not schown with firmware 5.39?

not sure I understand you question: I explain you again

[" xxyyzz: ",                  56, 4, "hex", 10],

xxyyzz: --> text describing the value
56         --> start position of the value
4           --> lenght of the value
"hex"     ---> type of he value
10           --> correction factor (e.g. multiplicate by 10 the value)
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: ioT4db am 09 Februar 2018, 10:39:53
hi immi,

no, not the new registers. I ment in the normal THZ-Readings (see attachement) running with the attribute firmware=5.39
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 09 Februar 2018, 13:39:17
you ca
Zitat von: friesenjung am 09 Februar 2018, 10:39:53
hi immi,
no, not the new registers. I ment in the normal THZ-Readings (see attachement) running with the attribute firmware=5.39
all register which have been found and interpreted, have been implemented
You can ask tecalor in which register is stored  p58.....  :)
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: ioT4db am 09 Februar 2018, 15:48:29
now i got it. i thought it was already implemented in verion 4.39. sorry   ::)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 10 Februar 2018, 23:30:41
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.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag 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.
Titel: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: börni am 11 Februar 2018, 21:05:30
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
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 11 Februar 2018, 22:03:56
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"


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 11 Februar 2018, 22:33:11
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?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 12 Februar 2018, 06:58:12
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.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 16 Februar 2018, 21:43:17
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
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 Februar 2018, 10:40:15
hiTrumpeter and andre.
thanks for the contribution, which I implemented and committed
you can update to 0.178
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: börni am 18 Februar 2018, 22:00:34
May I update too?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 Februar 2018, 23:20:10
Zitat von: börni am 18 Februar 2018, 22:00:34
May I update too?
yes
Titel: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement. -LWZ304eco
Beitrag 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 ?
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
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement. -LWZ304eco
Beitrag von: immi am 19 Februar 2018, 13:23:16
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
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: LeJoke am 19 Februar 2018, 15:01:28
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

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 19 Februar 2018, 21:19:37
ups, solche Sachen habe ich mal geschrieben  ::). Daran konnte ich mich schon gar nicht mehr erinnern. Danke für den Link.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: börni am 22 Februar 2018, 20:20:38
Hello immi,

Zitat von: immi am 18 Februar 2018, 23:20:10
yes

I updated fhem - now I'm getting following Messages in the log:

Zitat
2018.02.22 20:08:06 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1459.
2018.02.22 20:08:13 1: PERL WARNING: Use of uninitialized value $err in concatenation (.) or string at ./FHEM/00_THZ.pm line 1045.
2018.02.22 20:08:13 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/00_THZ.pm line 1045.

HTH & BR
Fabian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 25 Februar 2018, 07:32:08
Hi fabian
thanks for the feedback
have you restarted after the update?
how often do you see the warnings? do you see other sideeffect beside the warnings?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 20 März 2018, 19:39:48
Hi immi,

I've been using you code for years now, and the only thing I've noticed is I'm getting older  :)

Beautiful work.

I do not know THZ protocol well enough, so I thought I would ask here: is there an option at all to switch fireplace dependency remotely, ie. via code, not via control panel? In certain conditions I would like compressor to automatically work regardless of fireplace already engaged - because then I can "ask" THZ to focus on DWH, and fireplace on floor heating.

Sorry if asking about obvious.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 März 2018, 22:03:13
Zitat von: mlb am 20 März 2018, 19:39:48
I do not know THZ protocol well enough, so I thought I would ask here: is there an option at all to switch fireplace dependency remotely, ie. via code, not via control panel? In certain conditions I would like compressor to automatically work regardless of fireplace already engaged - because then I can "ask" THZ to focus on DWH, and fireplace on floor heating.
thanks for the compliments
I have no experince with fireplaces  and thz
as far as I remember nobody reverseenginnered the code behind
if you have a 4.xx firmware you can use the attribute
attr Mythz firmware 4.39technician
here you can start/stop the 2 pumps manually
zPumpDHW
zPumpHC
pay attention to possible sideeffects that could happen to you tecalor
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 20 März 2018, 22:39:12
My pump reports version 4.38,  so I will try. Thanks!
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 20 März 2018, 22:41:24
But take care. You MUST NOT switch off both pumps the same time while compressor and/or booster is active. Otherwise the THZ could be damaged by overtemperature.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: The Spirit am 25 April 2018, 15:39:35
i own a tecalor 304 eco with firmware 5.09
if i want to set p75 (passive cooling) i am only able to set 0,1 or 2.
if i read p75 via the get method i get "4" which is linked to "sommerkassette".
could this thing be fixed in a next release?
Thanks
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 26 April 2018, 07:02:03
Zitat von: The Spirit am 25 April 2018, 15:39:35
if i read p75 via the get method i get "4" which is linked to "sommerkassette".
Do you have installed a "Sommerkassette"?
If you have not bought it yet but think of buying one, you should first read my posting about effects of "passive cooling" here: https://forum.fhem.de/index.php/topic,33452.msg644327.html#msg644327
Spend your money on something else but not a "Sommerkassette".
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 27 April 2018, 07:54:18
Zitat von: The Spirit am 25 April 2018, 15:39:35
i own a tecalor 304 eco with firmware 5.09
if i want to set p75 (passive cooling) i am only able to set 0,1 or 2.
if i read p75 via the get method i get "4" which is linked to "sommerkassette".
could this thing be fixed in a next release?
Thanks
Hi Spirit
have you tried the attribute firmware 5.39?
if you do not set any attribute you fall back to default, firmware 4.39
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: The Spirit am 27 April 2018, 08:03:05
i was not aware of this attribute.
will give it a try today.
thx
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 07 Juni 2018, 10:55:33
Has anyone ever tried setting "pClockHour" with FHEM?
I tried it, but it's always returning the actual hour and does not change the time.
"pClockMinutes" seems to work properly.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 07 Juni 2018, 21:18:07
I never tried it, just the minutes. For me that's sufficient, since I just want to synchronize times. Daylight saving time is done automatically by THZ display setting.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 07 Juni 2018, 21:31:11
Zitat von: willybauss am 07 Juni 2018, 21:18:07
I never tried it, just the minutes. For me that's sufficient, since I just want to synchronize times. Daylight saving time is done automatically by THZ display setting.
I know; I also use your "at" for time-synchronization.

Nevertheless I wanted to try to skip the automatic "reset" at 10:00am today.
When I had a look on the plots a few minutes after 10 I first thought it works. When I checked the log-file I found a syntax-error in my "at", so I checked sTimedate and saw that only the minutes were changed.
Then I tried to change the hour directly in THZ, but it did not work.

Anybody else who tried it?
Maybe willy you give it a try and check it?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 07 Juni 2018, 21:47:24
tried changing clock hours in display => works
tried changing clock hours in fhem => does not work, just reports act. hour
tried changing clock hours in display again => still works
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 08 Juni 2018, 07:21:52
Okay, so then it affects both x03 and x04 and is also not related to firmware-attribute 5.39.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 08 Juni 2018, 08:54:18
Zitat von: TheTrumpeter am 07 Juni 2018, 10:55:33
Has anyone ever tried setting "pClockHour" with FHEM?
I tried it, but it's always returning the actual hour and does not change the time.
"pClockMinutes" seems to work properly.
I just googled
https://forum.fhem.de/index.php/topic,33211.msg260851.html#msg260851
toggle found out the registers.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 08 Juni 2018, 11:01:36
So then maybe toggle can cross-check if changing the hour (still) works.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 30 Juni 2018, 22:31:02
Hi Andre
would you mind xchecking line 820?
"sControl"           => {cmd2=>"F2", type =>"F2type", unit =>""},
why it is defined F2type?
actually line 820 can be deleted, because sControl already in %getsonly2xx.
thanks immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: LeJoke am 28 August 2018, 14:30:34
Hi,

looks like I found the "humidityAirOut" (Abluftfeuchte)in sGlobal (and on the way to there a couple other parameters as well. The other values appear to relate mostly to the P and B sensors from the electrical circuit layout from the installation manual. FowRate in sGlobal is returned as value when the parameter is not shown as a favorite ...).

On my device (304 integral SW 5.09) teh "Abluftfeuchte" is always displayed as "0" on the iPod display, so I could only do an indirect sanity check (increasing / decreasing humidityMin in humidity protection in order to trigger / untrigger the ventilation output decrease) - may be some one with a device where "humidityAirOut" is displayed can verfiy ...

"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],
        [" evaporatorTemp: ",     36, 4, "hex2int", 10],
[" condenserTemp: ",     40, 4, "hex2int", 10],
        [" dhwPump: ",     44, 1, "bit0", 1],
[" heatingCircuitPump: ", 44, 1, "bit1", 1],
        [" solarPump: ",     44, 1, "bit3", 1],
        [" mixerOpen: ",     45, 1, "bit0", 1],
[" mixerClosed: ",     45, 1, "bit1", 1],
        [" heatPipeValve: ",     45, 1, "bit2", 1],
[" diverterValve: ",     45, 1, "bit3", 1],
        [" boosterStage3: ",     46, 1, "bit0", 1],
[" boosterStage2: ", 46, 1, "bit1", 1],
        [" boosterStage1: ",     46, 1, "bit2", 1],
[" compressor: ",     47, 1, "bit3", 1],
[" evuRelease: ",     48, 1, "bit0", 1], #X15-5
        [" ovenFireplace: ",     48, 1, "bit1", 1], #X15-6
[" STB: ",      48, 1, "bit2", 1], #X15-7
[" highPressureSensor: ", 49, 1, "nbit0", 1], # Wächter X15-1 is on per default - should be bit instead of nbit to match display
        [" lowPressureSensor: ", 49, 1, "nbit1", 1], # Wächter X15-2 not in 304 integral
[" evaporatorIceMonitor: ", 49, 1, "bit2", 1], #X15-3
        [" signalAnode: ",     49, 1, "bit3", 1], #X15-4
        [" outputVentilatorPower: ",50, 4, "hex", 10],
[" inputVentilatorPower: ", 54, 4, "hex", 10],
[" mainVentilatorPower: ", 58, 4, "hex", 10],
        [" outputVentilatorSpeed: ",62, 4, "hex", 1],
[" inputVentilatorSpeed: ", 66, 4, "hex", 1],
[" mainVentilatorSpeed: ", 70, 4, "hex", 1],
        [" outside_tempFiltered: ",74, 4, "hex2int", 10],
[" relHumidity: ",     78, 4, "hex2int", 10],
      [" dewPoint: ",     82, 4, "hex2int", 10],
      [" P_Nd: ",         86, 4, "hex2int", 100],
[" P_Hd: ",         90, 4, "hex2int", 100],
      [" actualPower_Qc: ",     94, 8, "esp_mant", 1],
[" actualPower_Pel: ", 102, 8, "esp_mant", 1],
      [" collectorTemp: ",     4,  4, "hex2int", 10], ##### parameters added later ...
  [" insideTemp: ",     32, 4, "hex2int", 10],
[" x44b2: ",     44, 1, "bit2", 1], ## LeJoke trial additons +++++++++++++++++++
  [" x46b3: ",     46, 1, "bit3", 1],
  [" x47b0: ",     47, 1, "bit0", 1],
  [" x47b1: ",     47, 1, "bit1", 1],
  [" windowOpen: ",     47, 1, "bit2", 1], # board X18-1 clamp X4-FA (FensterAuf): window open - signal out 230V
  [" quickAirVent: ", 48, 1, "bit3", 1], # board X15-8 clamp X4-SL (SchnellLüftung): quickAirVent - signal in 230V
  [" flowRate: ",    110, 4, "hex", 10], # board X51 sensor P5 (on newer models B1 flow temp as well)
  [" p_HCw: ",    114, 4, "hex", 100],# board X4-1..3 sensor P4 HC water pressure
  [" x118: ",    118, 4, "hex2int", 10], # ??? Ventilöffnung / Druck ??
  [" x122: ",    122, 4, "raw", 1],
  [" x126: ",    126, 4, "hex2int", 10], # vvvvvv Bxx temp sensors vvvvvvvvv
  [" x130: ",    130, 4, "hex2int", 10], # ?? WP flow ?
  [" x134: ",    134, 4, "hex2int", 10], # ??
  [" x138: ",    138, 4, "hex2int", 10], # ??
  [" x142: ",    142, 4, "hex2int", 10], # ??
  [" x146: ",    146, 4, "raw", 1],
  [" x150: ",    150, 4, "raw", 1],
  [" humidityAirOut: ", 154, 4, "hex", 100] # board X4-4..6 sensor B15
      ],
 


SOme screenshots of the paraemters attached
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: LeJoke am 28 August 2018, 14:42:17
... and some more commands (so far only read via "debug_read_...") - LLWT = LuftLuftWärmeTauscher - CrossSectionAirFlowHeatExchanger

0A057C   Ofen / Kamin (0=Aus ... 4= Öffner - Überwachung)
0A057D   LLWT_MaxTimeDefrost (min)
0A057E   LLWT_Abtaubeginnschwelle (%) - StartDefrostTreshold
0A057F   LLWT_DrehzahlFilter (%) - increase in VentSpeed to indicate dirt / replacement needed
F7      diverse temp B sensors / P sensors also found in sGlobal
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 29 August 2018, 16:27:35
hi    LeJoke
thanks for sharing, I will test this night or tomorrow: I am the whole week on the seaside.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 02 September 2018, 20:14:37
Zitat von: LeJoke am 28 August 2018, 14:30:34
On my device (304 integral SW 5.09) teh "Abluftfeuchte" is always displayed as "0" on the iPod display, so I could only do an indirect sanity check (increasing / decreasing humidityMin in humidity protection in order to trigger / untrigger the ventilation output decrease) - may be some one with a device where "humidityAirOut" is displayed can verfiy ...
Also my display always shows it as "0", but I have an external sensor just before the LWZ. Attached you'll find the comparison of external sensor and your reading. It's definitely the "Abluftfeuchte". Well done!


One more point:
Did you change the order of the readings in "sGlobal"?
I've just overtaken your code, today's DHW-cycle shows useage of "booster-stage 1" although it definitely was not activated.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 03 September 2018, 11:25:25
Hi LeJoke
I implemented your suggestions and committed
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 03 September 2018, 12:56:39
Zitat von: immi am 03 September 2018, 11:25:25
Hi LeJoke
I implemented your suggestions and committed
immi
Are you sure you uploaded your changes?
I just did an update, but sGlobal is unchanged.

EDIT: Just crosschecked https://github.com/mhop/fhem-mirror/blob/master/fhem/FHEM/00_THZ.pm, it's unchanged there.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 03 September 2018, 16:09:49
Zitat von: TheTrumpeter am 03 September 2018, 12:56:39
Are you sure you uploaded your changes?
I just did an update, but sGlobal is unchanged.
EDIT: Just crosschecked https://github.com/mhop/fhem-mirror/blob/master/fhem/FHEM/00_THZ.pm, it's unchanged there.
it takes up to 12h for git and the fhem update function to sinc from fhem original repository
https://svn.fhem.de/trac/browser/trunk/fhem/FHEM
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: LeJoke am 04 September 2018, 10:34:57
Zitat von: TheTrumpeter am 02 September 2018, 20:14:37

One more point:
Did you change the order of the readings in "sGlobal"?
I've just overtaken your code, today's DHW-cycle shows useage of "booster-stage 1" although it definitely was not activated.

... sorry, not on purpose, but you are right - I had accidentally posted a sGlobal where the previously known parameters were mostly reordered according to their position in the response string ...
to be on the save side, only the additions starting at   [" x44b2: ",     44, 1, "bit2", 1], ## LeJoke trial additons +++++++++++++++++++
  [" x46b3: ",     46, 1, "bit3", 1],
  [" x47b0: ",     47, 1, "bit0", 1],
  [" x47b1: ",     47, 1, "bit1", 1],
  [" windowOpen: ",     47, 1, "bit2", 1], # board X18-1 clamp X4-FA (FensterAuf): window open - signal out 230V
  [" quickAirVent: ", 48, 1, "bit3", 1], # board X15-8 clamp X4-SL (SchnellLüftung): quickAirVent - signal in 230V
  [" flowRate: ",    110, 4, "hex", 10], # board X51 sensor P5 (on newer models B1 flow temp as well)
  [" p_HCw: ",    114, 4, "hex", 100],# board X4-1..3 sensor P4 HC water pressure
  [" x118: ",    118, 4, "hex2int", 10], # ??? Ventilöffnung / Druck ??
  [" x122: ",    122, 4, "raw", 1],
  [" x126: ",    126, 4, "hex2int", 10], # vvvvvv Bxx temp sensors vvvvvvvvv
  [" x130: ",    130, 4, "hex2int", 10], # ?? WP flow ?
  [" x134: ",    134, 4, "hex2int", 10], # ??
  [" x138: ",    138, 4, "hex2int", 10], # ??
  [" x142: ",    142, 4, "hex2int", 10], # ??
  [" x146: ",    146, 4, "raw", 1],
  [" x150: ",    150, 4, "raw", 1],
  [" humidityAirOut: ", 154, 4, "hex", 100] # board X4-4..6 sensor B15


should be added ...

Best Regards
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 04 September 2018, 14:26:41
Today in the morning I tried another FHEM-update, now immi's new version is there. He already took care about the order of the signals.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 07 September 2018, 20:19:09
Zitat von: immi am 30 Juni 2018, 22:31:02
Hi Andre
would you mind xchecking line 820?
"sControl"           => {cmd2=>"F2", type =>"F2type", unit =>""},
why it is defined F2type?
actually line 820 can be deleted, because sControl already in %getsonly2xx.
thanks immi
hi immi,
sorry for my late answer.

And yes the line with F2type can be deleted. I'm not 100% sure, if the register F2 is implemented in all 2xx versions.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 12 Dezember 2018, 14:43:50
Hi immi,

Just found out that the following two parameters are limited to 28°C in FHEM, but THZ/LWZ-limit is 30°C as per manual:
p01RoomTempDayHC1
p02RoomTempNightHC1

Would you mind changing that during your next revision?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 12 Dezember 2018, 20:22:02
done
committed
as usuall it should be availabe tomorrow
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: toggle am 24 Dezember 2018, 20:13:43
Zitat von: TheTrumpeter am 08 Juni 2018, 11:01:36
So then maybe toggle can cross-check if changing the hour (still) works.
Die Anfrage ist zwar etwas älter, aber ich habe es jetzt erst gelesen. Das Ergebnis ist - die Minuten scheinen übernommen zuwerden, aber nicht die Stunden.
Ich habe die neuen Werte von LeJoke mit folgenden Ergebnissen überprüft:
Mein 0xFB sieht bei aktivem Verdichter wie folgt aus:
Zitat01 00 d8 fb fd a8 00 1f 01 57 01 18 02 e1 01 f1 fd a8 fd a8 00 10 01 26 60 08 11 01 2c 01 2c 02 bc 00 0e 00 17 00 14 00 26 00 00 00 00 01 59 05 73 46 04 4a f8 3f dd c2 90 07 c5 00 99 01 4b 00 00 01 19 01 56 00 02 ff ea 01 32 00 00 00 00 0e 47
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 25 Dezember 2018, 10:27:49
Hast Du es auch mal mit l/h oder mit m³/h versucht?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: toggle am 25 Dezember 2018, 16:49:41
In 00_THZ.pm, Zeile 284 ist die Skalierung auf 10 (0.1) gestellt. Der bei mir gelesene Wert ergibt aber erst mit der Skalierung 100 (0.01) Sinn. Aus dem Beispiel oben:
07 c5 => 1989 => "19.9 l/min" im Display
Und natürlich ist ein Wert ungleich 0 nur dann zu sehen, wenn die Pumpe läuft.
Eine Abhängigkeit zwischen Favoriten im Display und der Präsenz im FB-Register konnte ich bisher nicht beobachten.

Es ist interessant, dass auch bei diesem Wert verschiedene Kodierungen im System (0xFB vs. 0x0A033B) herumgeistern.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 25 Dezember 2018, 21:46:45
would you be so nice to summarize what has to be changed?
I am not following you compleately
the best would be a diff.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 26 Dezember 2018, 11:03:51
for me "flowrate" within "sGlobal" works perfectly as it's currently implemented:
Zitat2018-12-26_10:20:05 Mythz sGlobal: outsideTemp: 3.7 flowTemp: 36.6 returnTemp: 26.9 hotGasTemp: 65.9 dhwTemp: 38.1 flowTempHC2: -60 evaporatorTemp: 11.2 condenserTemp: 24.8 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: 1 evaporatorIceMonitor: 0 signalAnode: 0 evuRelease: 1 ovenFireplace: 0 STB: 0 outputVentilatorPower: 30 inputVentilatorPower: 30 mainVentilatorPower: 70 outputVentilatorSpeed: 16 inputVentilatorSpeed: 27 mainVentilatorSpeed: 20 outside_tempFiltered: 3.3 relHumidity: 48.6 dewPoint: 0 P_Nd: 4.26 P_Hd: 15.41 actualPower_Qc: 2236.207 actualPower_Pel: 2.049 collectorTemp: -60 insideTemp: -60 windowOpen: 0 quickAirVent: 0 flowRate: 188.5 p_HCw: 1.82 humidityAirOut: 49.76
These are cl/min, I divide it by 10 to get l/min.

Also p_HCw works perfectly, it's in bar as displayed also on the LWZ.

Even humidityAirOut works, although the sensor-value is not very accurate. (Either the sensor heatens up a lot as it's directly on the mainboard or it's just not very accurate. It should be approx. 10% more...)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 26 Dezember 2018, 11:29:11
Zitat von: TheTrumpeter am 26 Dezember 2018, 11:03:51
for me "flowrate" within "sGlobal" works perfectly as it's currently implemented:These are cl/min, I divide it by 10 to get l/min.
thanks for the positive feedback....
not sure what you mean with
10* cl/min  is not equal to  l/min
If you wish that I change the scale, just tell me.
I am sure someone will ask again in one year.
p.s. still hoping someone finds time to update the fhemwiki for the module (e.g. delete the history and explain the registers, units....)
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 29 Dezember 2018, 19:36:20
Zitat von: immi am 26 Dezember 2018, 11:29:11
thanks for the positive feedback....
not sure what you mean with
10* cl/min  is not equal to  l/min
If you wish that I change the scale, just tell me.
I am sure someone will ask again in one year.
p.s. still hoping someone finds time to update the fhemwiki for the module (e.g. delete the history and explain the registers, units....)
immi
You're right, of course 100cl/min equals 1l/min, but nevertheless the reading is then l/min if I divide it by 10.
So to have the same unit as on the LWZ itself you should divide the raw-value by 100 instead of 10.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: timtom2000 am 05 Januar 2019, 19:23:56
Hi Immi,

I hope you can help me...I tried to set up THZ.pm with my LWZ 304, but I only get some error messages, see below.

The physical connection is somewhat strange (FritzBox - USB2SER - NullModem Cable - SER2USB - THZ), but the connection is green and open  :)

Connecting the FB directly via USB (without 2x USB2SER) is not possible, since the FB has no built-in USB-driver for the LWZ, the connection remains closed/red. And the often used serial pins behind the door have been replaced by a USB port...

I already changed the code as follows, but it didn't work (it was a hint by you in the forum of Willy):
line 1521
select(undef, undef, undef, 0.25);
lines 1573/1574
my $buf = DevIo_SimpleReadWithTimeout($hash, 0.5);

I'm using THZ.pm version 0.181; FW of my LWZ is 7.09; FW-Attribute is set to 5.39.

Do you have some hints what I can try next?


2019.01.05 17:43:23 1: Including fhem.cfg
2019.01.05 17:43:29 3: WEB: port 8083 opened
2019.01.05 17:43:29 3: WEBphone: port 8084 opened
2019.01.05 17:43:29 3: WEBtablet: port 8085 opened
2019.01.05 17:43:30 2: eventTypes: loaded 0 events from ./log/eventTypes.txt
2019.01.05 17:43:32 3: Opening Mythz device /dev/ttyUSB0
2019.01.05 17:43:33 3: Setting Mythz serial parameters to 115200,8,N,1
2019.01.05 17:43:33 3: Mythz device opened
2019.01.05 17:43:50 1: Including ./log/fhem.save
2019.01.05 17:43:51 1: usb create starting
2019.01.05 17:43:53 1: usb create end
2019.01.05 17:43:53 0: Featurelevel: 5.9
2019.01.05 17:43:53 0: Server started with 58 defined entities (fhem.pl:18029/2018-12-22 perl:5.014002 os:linux user:root pid:25987)
2019.01.05 17:44:50 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1771 ->
2019.01.05 17:44:52 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A05D1 ->
2019.01.05 17:44:53 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A091E ->
2019.01.05 17:44:55 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A05A2 ->
2019.01.05 17:44:57 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 16 ->
2019.01.05 17:44:58 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A05C1 ->
2019.01.05 17:45:00 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A0013 ->
2019.01.05 17:45:01 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- F5 ->
2019.01.05 17:45:03 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1790 ->
2019.01.05 17:45:05 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1750 ->
2019.01.05 17:45:06 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1712 ->
2019.01.05 17:45:08 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0C1532 ->
2019.01.05 17:45:09 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0C1510 ->
2019.01.05 17:45:11 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0B1472 ->
2019.01.05 17:45:13 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0B1461 ->
2019.01.05 17:45:14 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A05BA ->
2019.01.05 17:45:16 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A010C ->
2019.01.05 17:45:17 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A05C4 ->
2019.01.05 17:45:19 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1DA1 ->
2019.01.05 17:45:21 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1D41 ->
2019.01.05 17:45:22 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0C1561 ->
2019.01.05 17:45:24 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A057A ->
2019.01.05 17:45:25 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A064F ->
2019.01.05 17:45:27 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A0162 ->
2019.01.05 17:45:29 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1D60 ->
2019.01.05 17:45:30 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1D51 ->
2019.01.05 17:45:32 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1720 ->
2019.01.05 17:45:33 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A02CC ->
2019.01.05 17:45:35 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A0109 ->
2019.01.05 17:45:37 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.01.05 17:45:38 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0C0008 ->
...and so on...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: timtom2000 am 05 Januar 2019, 21:23:49
To avoid unnecessary work...it seems, that the THZ-Status doesn't indicate, that there is a communication established, but only, that the ttyUSB0 has been found. As far as I plug in the USB2SER-Device in my FritzBox the THZ-Status switches to open, despite the cable to the heatpump isn't connected physically!

I think my communication problem is, that the heatpump is not compatible with the USB2SER at the heatpump side. So, I have to look for a different one with the correct chipset (Silicon Labs cp2102).
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 06 Januar 2019, 01:46:24
hi timtom
to my opinion you do not have any comunication,
I have just froven 700km therefore I could write something stupind :)

(FritzBox - USB2SER - NullModem Cable - SER2USB - TecalorUSB)
Never heard of SER2USB on a typeB connector:  how are you powering the SER2USB?; the TecalorUSB offers a slave portB which does not deliver any power

(FritzBox - USB2SER - TecalorSerial)
why is not an option for you? It works stable for me since years (moreover I did all reverse enginnering of the propocoll with this topology)

(FritzBox -  TecalorUSB)
maybe you do not have the driver in a standard FritzBox; but you can esily compile it with freetz.
I do not rememebr the driver needed for the TecalorUSB-chipset; but you can ask  the TecalorUSB-chipset name to the people in forum connecting the tecalorUSB directly to a raspi
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: timtom2000 am 06 Januar 2019, 13:47:03
Hi, thanks for the quick response!

(FritzBox - USB2SER - NullModem Cable - SER2USB - TecalorUSB)
Hm, powering the adapter by the THZ, good question...the SER2USB has a type A connector, therefore I used a Type-B/A adapter, but it has no power source as well, of course...

(FritzBox - USB2SER - TecalorSerial)
TecalorSerial was my first choice, but my LWZ doesn't have a serial port any more. At least I couldn't find it. The serial-port behind the door has been replaced by a USB type B, which is connected directly to the USB at the mainboard. If you know a hidden serial port you are very welcome!

(FritzBox -  TecalorUSB)
The driver is the Silicon Labs cp2102. I never tried Freetz so far, to be honest, but perhaps I should do.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 07 Januar 2019, 20:09:23
(FritzBox - USB2SER - NullModem Cable - SER2USB - TecalorUSB)
from what you describe, It cannot work

(FritzBox -  TecalorUSB)
in my feetz I compiled also  cp2101.ko (despite I use ftdi_sio) in
/lib/modules/2.6.28.10/kernel/drivers/usb/serial/
if you have a different kernel-subversion you can try to force insmod or modprobe
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: timtom2000 am 07 Januar 2019, 23:33:30
Hi Immi,
thanks a lot for the module file. Unfortunately it doesn't work, even with force option (error "invalid module format"; I have kernel 2.6.32.60). The same with several other cp2101-files I tried in the last days. Now I will try it by my own with a freeze compilation. But this will take some time.
Best regards.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 08 Januar 2019, 17:28:44
i updated  my freetz last month
from git download to install in my fb took circa 1h with one hand (the other hand was helping my younger child to get asleep)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: timtom2000 am 13 Januar 2019, 20:06:48
Hi Immi, short Info...it works :)!

It took some time to compile and I had trouble with a USBhub, but now I'm using USB-USB with Freetz. But I still have to look for a signal amplifier, since the final cable is about 15-20m (at the moment the FB is near the THZ and connected via 1,5m cable; but that's only a workaround).

I collected a lot of UserReadings out of the forum, but is there a "reference UserReading" or similar?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 13 Januar 2019, 22:07:50
Zitat von: timtom2000 am 13 Januar 2019, 20:06:48
Hi Immi, short Info...it works :)!
happy you made it
>>reference UserReading
try with the config from willy
https://forum.fhem.de/index.php/topic,33452.0.html
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 14 Januar 2019, 09:44:24
Hi immi,

in the "other" thread there's currently a discussion related to fan speed, power etc. readings inside sGlobal. Can you remember the reason why you used the wording "power" (outputVentilatorPower / inputVentilatorPower)? This wording caused the assumption these would be electrical power values, but me and a few other members don't believe so.

BR Willy
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 22 Januar 2019, 09:36:38
Hi immi,

as far as I remember you also own a 303 model, right? I have a problem with my 303-SOL in sDisplay readings. The defrost value doesn't get updated correctly. It always stays at 0. Even in defrost cycles it does not jump to 1.

Do you observe same? Or am I doing wrong in any way?

I'm using

THZ module VERSION  0.176
model n.a._04.19HW73SW2.08

Thanks and best regards
Willy
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Januar 2019, 21:38:41
Hi Willi
Sorry different model 403
sFirmware version: 04.39
sFirmware-Id HW: 74 SW: 2.08 Date: MAR 9 2011
VERSIONm0.181
modelm4.39t04.39HW74SW2.08

I normally never log sDisplay therefore I cannot tell you if defrost is read properly.
I do not remember who reverse-enginnered sDisplay, maybe you find old post in the forum.

I also do not know what is defrostEvaporator: in sControl (which I also do not log)
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 22 Januar 2019, 22:18:39
Hi immi,

403-SOL and 303-SOL are identical models, just the compressor is a bit bigger in your 404. Could you do me a favour and get sDisplay during next defrost cycle? I normally would expect the defrost flag to jump from 0 to 1 during defrosting - what it doesn't do in my case.

Thanks for the hint with defrostEvaporator: in sControl. I'll double check if this one delivers the needed defrost information.

What I want to do:
I want to track length of defrost cycles, since in some cases it looks like efficiency decreases after a defrost cycle. So my assumption is that the allowed defrost time (set to 20 minutes by default) might be too short. Since the manual explicitly says "do not change" I try to be careful and get a maximum of data before changing it anyway.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 27 Januar 2019, 22:31:20
Hi willy
logging sDisplay since 1 week and no defrost in logfile.
This doesn' t mean I had for sure no defrost.
Can I trigger a defrost manually directly on the heatpump? are there sideeffects?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 27 Januar 2019, 22:36:56
Hi immi,

Thanks a lot for testing! I'm pretty sure you can't force a defrost cycle manually. But your result confirms my observation. As far as I know you're living pretty close to me (around Boeblingen/Tuebingen). So you had definitely some defrost cycles a few days ago, before it warmed up a bit.

Looks like the defrost flag isn't interpreted correctly.

Thanks again
Willy
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 27 Januar 2019, 22:39:29
Of course you can see the defrost cycles in the plots, when flow temp jumps down to extremely negative values for a few minutes.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: timtom2000 am 28 Januar 2019, 19:47:39
Hello,
2-3 days ago I could see the defrost cycles several times a day in sDisplay[17] (and in the neg. peaks of flow temp of course). Actually sDisplay is logged every 60s, because my defrost cycles usually take not more than a few minutes (LWZ 304).

Another question:
I get a lot of read errors during a day. My physical connection to the heatpump is somewhat complicated (20m with a CAT6 LAN extension cable; such as LogiLink UA0021D; it should work up to 50-60m).

Therefore I already set these code lines:
line 1521: select(undef, undef, undef, 0.25);
line 1573: my $buf = DevIo_SimpleReadWithTimeout($hash, 0.5);
line 1574: $buf = DevIo_SimpleReadWithTimeout($hash, 0.5) if(!defined($buf)) ;

Is there a way to make the communication even more robust? Increasing 0.25/0.5? What are the drawbacks?

2019.01.28 07:38:26 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A0928 ->
2019.01.28 07:38:28 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1781 ->
2019.01.28 07:38:29 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0C1531 ->
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: toggle am 28 Januar 2019, 19:53:13
Zitat von: willybauss am 22 Januar 2019, 09:36:38
I have a problem with my 303-SOL in sDisplay readings. The defrost value doesn't get updated correctly. It always stays at 0. Even in defrost cycles it does not jump to 1.
There is another indicator available - evaporatorIceMonitor in sGlobal.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 28 Januar 2019, 21:10:25
Zitat von: timtom2000 am 28 Januar 2019, 19:47:39
sDisplay[17]
17?

My sDisplay looks like
Zitat2019-01-21_20:58:36 Mythz sDisplay:  switchingProg: 1 compressor: 1 heatingHC: 1 heatingDHW: 0 boosterHC: 0 filterBoth: 0 ventStage: 0 pumpHC: 1 defrost: 0 filterUp: 0 filterDown: 0 cooling: 0 service: 0
So it should be sDisplay[21].
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 28 Januar 2019, 21:15:08
Zitat von: toggle am 28 Januar 2019, 19:53:13
There is another indicator available - evaporatorIceMonitor in sGlobal.
Thanks for the hint. This works. Unfortunately I log sGlobal just every 5 minutes. This is not enough for checking length of defrost cycles. My logfiles would explode by changing interval to e.g. 1 minute. Additionally the time needed to build plots would increase a lot.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 28 Januar 2019, 21:21:37
Hi timtom2000
line 1521: select(undef, undef, undef, 0.25);
useless, you just slow down fhem; you just wait before starting talking to the thz; if you think your tecalor is overloaded, reduce the frequency at which you poll data (increase interval)
line 1573: my $buf = DevIo_SimpleReadWithTimeout($hash, 0.5);
line 1574: $buf = DevIo_SimpleReadWithTimeout($hash, 0.5) if(!defined($buf)) ;

useless; you just slow down fhem;
The longer cable will not influence the response speed of the tecalor (maybe less than 1ms; you increase 0.5s).
Longer cables could make the signal noisy and maybe reset the comunication (UA0021D does not make the signal better)

To my opinion your tecalor is busy: the comunication is resetted too often or your intervals are too small

If you have a nice ethernet cable laying around, why don't you use it for real ethernet?
tecalor - usb - raspi(ser2net) - ethernet cable - fhem_server
tecalor - usb - Freetz(ser2net) - ethernet cable - fhem_server

this config is pretty stable for me
in addition to the ethernet cable, I also used 600km of internet connection and vpn in the past
tecalor - usb - Freetz(ser2net) - internet - fhem_server
:)

p.s. I really like that you are able to ready my spaghetti-code :)
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: timtom2000 am 28 Januar 2019, 21:39:31
Not to disappoint you...I don't understand the details of the code, I just tried a hint you gave in another forum  ;)

I will check reducing the overload, this probably is a good hint as well, thanks.

@Willi: Display [17] in terms of defining the UserReading in fhem.cfg, Display[21] in terms of defining the gplot-config (there is a offset in counting). So we are talking about the same, I think. But if I reduce the overload of my thz by increasing the intervals I will not see the defrost anymore, probably...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Stonemuc am 11 März 2019, 17:20:18
I got a new software update last week. Therefore the service technican installed a extra new sensor...looks like a NTC. Does someone knows something about it?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 12 März 2019, 07:41:33
Zitat von: Stonemuc am 11 März 2019, 17:20:18
I got a new software update last week. Therefore the service technican installed a extra new sensor...looks like a NTC. Does someone knows something about it?
no, but you can share your experience.
what has changed in the fhem readings?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Stonemuc am 12 März 2019, 19:47:51
I will have a look tomorrow morning.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Stonemuc am 13 März 2019, 09:14:29
I can't find changes in the readings. sGlobal and sHC1 are the same as usual in the logs. No changes in the classical readings as I can see. The guy will come back to change a fan so I will have a look into the THZ and will examine the new sensor. But he told me that this new hardware sensor is necessary for the new software update.


sFirmware
version: 07.09
2019-03-12 07:58:43
sFirmware-Id
HW: 242 SW: 7.03 Date: JUL 5 2018
2019-03-12 07:54:41
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: joker4791 am 18 März 2019, 17:55:38
Hi,

Zitat von: willybauss am 17 Juni 2017, 23:33:43
After having changed the code lines as you suggested the logs show:

2017.06.17 18:54:03 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2017.06.17 18:54:03 3: THZ_Get: Error msg2:  InterfaceNotRespondig error found at step1 ---- 0100320A091E1003
2017.06.17 18:54:04 3: THZ_Get: Error msg2:  CRC error in request ---- 0100D10A05C11003
2017.06.17 18:54:25 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2017.06.17 18:54:26 3: THZ_Get: Error msg2:  InterfaceNotRespondig error found at step1 ---- 0100A00B14801003
2017.06.17 18:54:42 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2017.06.17 18:54:42 3: THZ_Get: Error msg3:  InterfaceNotRespondig error found at step1 ---- 0100410A092D1003
2017.06.17 18:54:42 3: THZ_Get: Error msg2:  new unknown answer  ---- 0100980A05881003
2017.06.17 18:54:59 3: THZ_Get: Error msg2:  CRC error in request ---- 0100910A05811003
2017.06.17 18:55:15 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2017.06.17 18:55:15 3: THZ_Get: Error msg2:  InterfaceNotRespondig error found at step1 ---- 0100430A17211003
2017.06.17 18:55:23 3: Mythz THZ_ReadAnswer got no answer from DevIo_SimpleRead. Maybe too slow?
2017.06.17 18:55:23 3: THZ_Get: Error msg2:  InterfaceNotRespondig error found at step1 ---- 01007A0B05691003
2017.06.17 18:55:23 3: THZ_Get: Error msg2:  new unknown answer  ---- 0100830A17611003
2017.06.17 18:55:30 3: THZ_Get: Error msg2:  CRC error in request ---- 0100630C15411003
2017.06.17 18:55:32 3: Mythz NAK!!

Gestern habe ich meine Verbindung zur Tecalor hergestellt und auch ca. 2 Stunden lang Daten erhalten (über serielle Schnittstelle mit 115200 Baud). Dann seit ca. 18:45 Uhr nur noch Fehlermeldungen wie oben.
2019.03.17 18:49:02 3: THZ_Get: Error msg2:  4Adecode: crc_error in answer -- FB -> 01001FFBFDA80036011B0112011E01C7FDA8FDA800D4010B00001101900190000000
...
2019.03.17 18:49:49 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
...
2019.03.17 18:51:50 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
...
2019.03.17 18:53:51 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.03.17 18:54:03 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- FB ->
...
2019.03.18 17:01:15 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0C1550 ->
2019.03.18 17:01:16 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0B1441 ->
2019.03.18 17:01:18 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A0123 ->
...
2019.03.18 17:01:20 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1732 ->
2019.03.18 17:01:21 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1711 ->
2019.03.18 17:01:23 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A17A2 ->
2019.03.18 17:01:25 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1D21 ->
2019.03.18 17:01:26 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1730 ->
2019.03.18 17:01:28 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0B1471 ->
2019.03.18 17:01:29 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0C1552 ->
2019.03.18 17:01:31 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- FB ->
2019.03.18 17:01:32 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A05B4 ->
2019.03.18 17:01:34 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0B1462 ->
2019.03.18 17:01:36 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A0579 ->
2019.03.18 17:01:37 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A0580 ->
2019.03.18 17:01:39 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A0586 ->
2019.03.18 17:01:40 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0C1522 ->
2019.03.18 17:01:42 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0C1521 ->
2019.03.18 17:01:44 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1D72 ->
2019.03.18 17:01:45 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A05D3 ->
2019.03.18 17:01:47 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A0928 ->
2019.03.18 17:01:48 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1742 ->
2019.03.18 17:01:50 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1760 ->
2019.03.18 17:01:52 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A091E ->
2019.03.18 17:01:53 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1D92 ->
2019.03.18 17:01:55 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A056F ->
2019.03.18 17:01:56 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0C1540 ->
2019.03.18 17:01:58 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1D62 ->
2019.03.18 17:02:00 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A0575 ->
2019.03.18 17:02:01 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A0572 ->
2019.03.18 17:02:03 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A091A ->
2019.03.18 17:02:04 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A0578 ->
2019.03.18 17:02:06 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A011D ->
2019.03.18 17:02:08 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1D11 ->
2019.03.18 17:02:09 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1D32 ->
2019.03.18 17:02:11 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A057B ->
2019.03.18 17:02:12 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0B1491 ->
2019.03.18 17:02:14 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1D91 ->
2019.03.18 17:02:16 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A092C ->
2019.03.18 17:02:17 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0B1432 ->
...
2019.03.18 17:02:19 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A092A ->

Habe jetzt die Verbindungsgeschwindigkeit auf 9600,8,N,1 herabgesetzt und FHEM sowie die Heizungsanlage mehrfach neu gestartetet, aber es gibt keine neuen Werte.
Wo könnte ich jetzt mit der Fehlersuche beginnen?

Grüße,
j.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: joker4791 am 18 März 2019, 19:22:38
Hi,

habe noch ein wenig weiter probiert mit einem USB-RS232-Wandler (Prolific PL2303), das Ergebnis ist das gleiche.
Die Anzeige ist immernoch grün, obwohl inzwischen alle Verbindungen hardwaremäßig abgebaut sind. Da müsste noch eine Prüfroutine her, die auf aktuelle Werte prüft.

Vielleicht geht die Verbindung über die USB-Schnittstelle auf der Steuerplatine. Da muss aber erstmal an der Heizungsanlage geschraubt werden...

Grüße,
j.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 März 2019, 20:27:58
Zitat von: joker4791 am 18 März 2019, 17:55:38
Habe jetzt die Verbindungsgeschwindigkeit auf 9600,8,N,1 herabgesetzt und FHEM sowie die Heizungsanlage mehrfach neu gestartetet, aber es gibt keine neuen Werte.
to my knoledge it is not possible to change the serial speed of your tecalor.
if it worked once with 115200, do not change it

check your cables, check your connectors, check that the hardware you are using is not busy doing something else, check the current supply of your hardware.

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: joker4791 am 18 März 2019, 20:41:26
Dear Immi,

Thank you for your reply!

Cables and connectors are fine, I'm using Oelflex 110 3G1.0 w/ 1.5m length, connectors are soldered (SUB-D9 & MNL 3SG). I'll try to set the speed back to 115200 baud and check...

Best regards,
j.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 18 März 2019, 20:54:32
Wie sieht die Hardware auf der fhem-Seite aus? Ein SEHR gutes NEtzteil ist beim Raspberry Pi wichtig, ggf. USB-Hub mit eigener guter Stromversorgung.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: joker4791 am 18 März 2019, 21:01:28
Hi,

FHEM läuft bei mir auf einem Fujitsu FUTRO S720 ThinClient, der sollte für alles genug Power haben. BS ist ein aktuelles Debian.

@Immi:
I put all settings back in place, restartet the devices and now it is talking in fact back. That looks very strange.
One idea I have is that the cable is not shielded. For such short length I did not consider shielding as important, but that might be wrong.

Best regards,
j.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: joker4791 am 19 März 2019, 17:19:03
Hi,

die Syntax bei FHEM ist mir noch fremd, jedenfalls wäre die Anzeige der Grundwerte gemäß Wiki (https://wiki.fhem.de/wiki/Tecalor_THZ_W%C3%A4rmepumpe) sehr wünschenswert. Leider liefert die Funktion/das Attribut bei mir leider nur leere Werte zurück, bzw. es werden gar keine Werte angezeigt.
attr Mythz userReadings AussenTemp:sGlobal {(split ' ',ReadingsVal("Mythz","sGlobal",0))[1]}, VorlaufTemp:sGlobal {(split ' ',ReadingsVal("Mythz","sGlobal",0))[3]}, RuecklaufTemp:sGlobal {(split ' ',ReadingsVal("Mythz","sGlobal",0))[5]}, WWTemp:sGlobal {(split ' ',ReadingsVal("Mythz","sGlobal",0))[9]}, KollektorTemp:sGlobal {(split ' ',ReadingsVal("Mythz","sGlobal",0))[79]}
define rg_thz readingsGroup Mythz:<%temp_outside>,<Aussen>,AussenTemp Mythz:<%sani_supply_temp@red>,<Vorlauf>,VorlaufTemp Mythz:<%sani_return_temp@blue>,<Rücklauf>,RuecklaufTemp Mythz:<%sani_boiler_temp@BD7800>,<Wasser>,WWTemp Mythz:<%sani_solar_temp>,<Kollektor>,KollektorTemp
Wo könnte der Fehler liegen?

Die ganzen Zeilen gebe ich über das Web-Frontend ein.

Grüße,
j.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: joker4791 am 19 März 2019, 18:02:06
Habe die Zeile wie folgt abgeändert und jetzt geht's:
attr Mythz userReadings AussenTemp {(split ' ',ReadingsVal("Mythz","sGlobal",0))[1]}, VorlaufTemp {(split ' ',ReadingsVal("Mythz","sGlobal",0))[3]}, RuecklaufTemp {(split ' ',ReadingsVal("Mythz","sGlobal",0))[5]}, WWTemp {(split ' ',ReadingsVal("Mythz","sGlobal",0))[9]}, KollektorTemp {(split ' ',ReadingsVal("Mythz","sGlobal",0))[79]}

try&error ist aber eigentlich nicht Sinn der Sache  :(
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 19 März 2019, 19:18:16
So haben wir Alle angefangen. Da muss man durch. Möglicherweise hast Du den Link zum richtigen Forum übersehen:

http://forum.fhem.de/index.php/topic,33452.0.html.html (http://forum.fhem.de/index.php/topic,33452.0.html.html)

Dort gibt es auch Codebeispiele für Readings usw.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: joker4791 am 20 März 2019, 17:39:06
Danke für den Link, den hatte ich bis jetzt in der Tat nicht entdeckt!

Grüße,
j.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Stonemuc am 05 April 2019, 11:47:07
Hello immi,

today I got an update to V7.04 - 08 of March 2019
After a first quick look, I can't see changes in the readings after this short time...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 05 April 2019, 20:21:02
 ;D :D ;D
it is amazing that THZ module covers heatpumps from 2003 to 2019.
so different but so similar
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 16 April 2019, 22:33:53
Yes, this module is the best part of FHEM  :)

By the way - has anyone tried to integrate it with other systems via MQTT? I'm trying to connect FHEM and the Home Assistant https://www.home-assistant.io/ (https://www.home-assistant.io/) (where you can build very nice user interfaces and integrate a lot of home automation devices).

I was able to send all readings, just I cannot get MQTT messages to control eg. THZ/LWZ settings...

Here is  my code (that works except of last line):

define fhemMQTT MQTT2_CLIENT mqtt_ip_address:1883
attr fhemMQTT username my_mqtt_username
attr fhemMQTT subscriptions /Mythz/+/set

defmod mqttGeneric MQTT_GENERIC_BRIDGE fhem room=LWZHeating
attr mqttGeneric IODev
attr mqttGeneric globalPublish *:topic={"/$device/$reading"}
#this is not working:
attr mqttGeneric mqttSubscribe *:topic={"/Mythz/$reading/set"}


It would be cool to be able for example to start  fans, or change temperature, or force the start of heating or solar pump, etc.

Sorry if that goes a bit out of topic  ::)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 17 April 2019, 05:01:38
Zitat von: mlb am 16 April 2019, 22:33:53
I was able to send all readings,
mlb thanks for the nice words,
I do not understand how you can send the readings, it should not work: 
IODev is missing the parameter.
attr mqttGeneric IODev fhemMQTT

Nevertheless I do not use MQTT; I suggest you  to post in MQTT dedicated sub-forum
https://forum.fhem.de/index.php/board,94.0.html
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mlb am 19 April 2019, 17:53:50
Thanks, immi - I'm constantly impressed with your work.

I do not know why, but it works like that  :)
After a few days of tests I gave up to use MQTT to update FHEM, and now I'm sending values to FHEM via shell commands - it seems to work fine.

Here is an example (in HA configuration.yaml - just in case useful for someone):
shell_command:
   set_unscheduled_vent: 'curl -s http://my_fhem_ip_address:8086/fhem?cmd=set%20Mythz%20p99startUnschedVent%20{{level}} >/dev/null'


For the above to work, the FHEM API needs to be activated in fhem.cfg:define WEBapi FHEMWEB 8086 global
attr WEBapi csrfToken none
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andy1986 am 09 Juni 2019, 14:08:33
Hallo Zusammen,

ich bekomme nur noch folgende Meldungen im Log:
019.06.09 13:46:52 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- FB ->
2019.06.09 13:47:47 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 13:49:48 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 13:51:50 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 13:51:53 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- FB ->
2019.06.09 13:53:51 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 13:55:52 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 13:56:54 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- FB ->
2019.06.09 13:57:53 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 13:59:54 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 14:01:55 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 14:01:56 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- FB ->
2019.06.09 14:03:56 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->
2019.06.09 14:05:57 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- D1 ->


Was kann ich machen damit es wieder funktioniert?

VG
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 09 Juni 2019, 15:32:24
Zitat von: andy1986 am 09 Juni 2019, 14:08:33
Hallo Zusammen,
ich bekomme nur noch folgende Meldungen im Log:
019.06.09 13:46:52 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow
Was kann ich machen damit es wieder funktioniert?
VG
Hi Andy
would you be so nice  to provide some backhround information?
has it ever worked for you? how do you connect? config file? tecalor model/year? fhem version and module version?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andy1986 am 09 Juni 2019, 20:00:07
Hi,

sorry sure:

I worked fine for me then the USB cable broke. So i ordered a new one and then it worked for a second. After that no longer.
Connected via USB cable. Tecalor 403 (n.a._04.39HW74SW2.08Date) from 2012/2013.
Modul Version: 0.180
FHEM Version:  17371 2018-09-19 09:28:18Z rudolfkoenig

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 09 Juni 2019, 22:04:24
Zitat von: andy1986 am 09 Juni 2019, 20:00:07
I worked fine for me then the USB cable broke. So i ordered a new one and then it worked for a second. After that no longer.
an update of the whole system is suggested  but will not solve your problem, which does not seam to be software related.
type "update"
wait 4 min
type "shutdown restart"

It is not clear for me how you have broken the usb-cable. Even harder to understand how you realized that the cable was broken. Even stranger that you brke a second cable after 1 second.
Have you considered that maybe your powersupply of fhem-computer could have a problem? If you read in the forum some people reported noise linked to earth connection (or missing earth).
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andy1986 am 10 Juni 2019, 09:25:20
Hi,

i did a update now, but as you said: same Problem.

I'm sorry I think we misunderstood. The cable ran for about 1 year and then I noticed that the status went red. With another USB cable it worked. The current cable shows a green status but just the errors in the log. so the new cable is not broken, I think
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 10 Juni 2019, 10:35:31
What is the cable length? Might be the new one is of bad quality.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andy1986 am 10 Juni 2019, 10:54:58
It is 10m (with an repeater) but it is the same as before
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 10 Juni 2019, 11:31:48
Hi Andy
10m usb ... :(
why don't you remove the repeater and go with a raspi or a old fritzbox in between (next to the heatpump)?
after that you reach your main fhem-server with ethernet or wlan.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 10 Juni 2019, 12:07:04
10m - it is just based on good luck if it works. The repeater causes a delay, and the THZ communication is very sensitive in case of wrong timing/late answers.
You must try with a much shorter cable before anything else.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andy1986 am 10 Juni 2019, 16:55:38
Zitat von: immi am 10 Juni 2019, 11:31:48
Hi Andy
10m usb ... :(
why don't you remove the repeater and go with a raspi or a old fritzbox in between (next to the heatpump)?
after that you reach your main fhem-server with ethernet or wlan.
immi

How does it work with an raspi or an fritzbox in between?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 10 Juni 2019, 21:38:37
Zitat von: andy1986 am 10 Juni 2019, 16:55:38
How does it work with an raspi or an fritzbox in between?

you can chose to install fhem on the raspi (or on the old fritzbox) and connect the 2 fhem via module fhem2fhem

or you can chose to install ser2net on the raspi (or on the old fritzbox) and
define Mythz THZ old_fritz:2003
where 2003 is the ser2net port and old_fritz is where you have running ser2net

I use the second option since years without any problem.
for an old fritzbox you probably need https://freetz.github.io/
for raspi there is enough support in forum
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Stonemuc am 17 Juni 2019, 07:27:23
I use a 10m USB Cable without repeater. No problem here. It's a cheap one from china I think. I ordered it on amazon.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andy1986 am 14 Juli 2019, 17:31:59
Sorry for my late answer. I tried it now with an old fritz box and ser2net.
Now i get this messages:

2019.07.14 17:31:14 1: 192.168.178.242:2003 disconnected, waiting to reappear (Mythz)
2019.07.14 17:31:15 1: 192.168.178.242:2003 reappeared (Mythz)
2019.07.14 17:31:15 1: 192.168.178.242:2003 disconnected, waiting to reappear (Mythz)
2019.07.14 17:31:15 1: 192.168.178.242:2003 reappeared (Mythz)
2019.07.14 17:31:15 1: 192.168.178.242:2003 disconnected, waiting to reappear (Mythz)
2019.07.14 17:31:15 1: 192.168.178.242:2003 reappeared (Mythz)
2019.07.14 17:31:15 1: 192.168.178.242:2003 disconnected, waiting to reappear (Mythz)
2019.07.14 17:31:15 1: 192.168.178.242:2003 reappeared (Mythz)
2019.07.14 17:31:15 1: 192.168.178.242:2003 disconnected, waiting to reappear (Mythz)

Any Ideas?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 14 Juli 2019, 19:55:38
I have 3 questions

1) does your fritz regognize the usbserial?
you can test it like this

root@fritz:/var/mod/root# dmesg |grep tty
[   29.264000] usb 2-2: FTDI USB Serial Device converter now attached to ttyUSB0


2) is it working with fhem and sometime you get errors?
3) how often do you get the errors?

i configured my ser2net like this

2003:raw:500:/dev/ttyUSB0:115200 NONE 1STOPBIT 8DATABITS
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andy1986 am 14 Juli 2019, 20:15:18
Hi Immi,

thanks for your answer:

1.) root@fritz:/var/mod/root# dmesg |grep tty
console [ttyS0] enabled, bootconsole disabled
ttyS0 at MMIO 0x8610e00 (irq = 15) is a PORT_16550A
kdsld: ttychannel: ldisc 8 registered

-> I need to install USB Driver on the freetz or? How could i do that?

2.) No, not working
3.) The errors came up every second...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 14 Juli 2019, 21:08:07
well ... it seams you understood the problem in you fretz yourself
Zitat von: andy1986 am 14 Juli 2019, 20:15:18
-> I need to install USB Driver on the freetz or? How could i do that?
you need to know which chipset you have in the usbserial and compile it in freetz
in my case ftdi
I also compiled other chipsets just in case

root@fritz:/var/mod/root# ls /lib/modules/2.6.28.10/kernel/drivers/usb/serial/*
/lib/modules/2.6.28.10/kernel/drivers/usb/serial/ch341.ko
/lib/modules/2.6.28.10/kernel/drivers/usb/serial/cp2101.ko
/lib/modules/2.6.28.10/kernel/drivers/usb/serial/ftdi_sio.ko
/lib/modules/2.6.28.10/kernel/drivers/usb/serial/option.ko
/lib/modules/2.6.28.10/kernel/drivers/usb/serial/pl2303.ko
/lib/modules/2.6.28.10/kernel/drivers/usb/serial/usbserial.ko

once you have loaded the driver you should see it like this

root@fritz:/var/mod/root# lsmod |grep ftdi
ftdi_sio               32816  1
usbserial              27952  3 ftdi_sio
usbcore               120352  5 ohci_hcd,ehci_hcd,ftdi_sio,usbserial


immi

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andy1986 am 15 Juli 2019, 18:02:20
Crazy, i complied now every driver:

root@fritz:/var/mod/root# ls /lib/modules/2.6.32.41/kernel/drivers/usb/serial/*
/lib/modules/2.6.32.41/kernel/drivers/usb/serial/cp210x.ko
/lib/modules/2.6.32.41/kernel/drivers/usb/serial/ftdi_sio.ko
/lib/modules/2.6.32.41/kernel/drivers/usb/serial/ipaq.ko
/lib/modules/2.6.32.41/kernel/drivers/usb/serial/option.ko
/lib/modules/2.6.32.41/kernel/drivers/usb/serial/pl2303.ko
/lib/modules/2.6.32.41/kernel/drivers/usb/serial/usbserial.ko

but it doesnt work.
Any more USB drivers there?

EDIT: Just to clarify, i connect the usb port from the FB to the usb port from the Tecalor 403.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andy1986 am 15 Juli 2019, 20:23:59
Solved it. I needed to do that:

modprobe cp210x

Now its stable green.
For what is it?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 Juli 2019, 20:38:47
your module does not load automatically
there is another command to force loading

insmod /lib/modules/2.6.32.41/kernel/drivers/usb/serial/cp210x.ko

it is equivalent to modprobe; use what youprefer
Zitat von: andy1986 am 15 Juli 2019, 20:23:59
Now its stable green.
happy that it is working now

Zitat von: andy1986 am 15 Juli 2019, 20:23:59
For what is it?

do not understand your question


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: joker4791 am 17 Juli 2019, 14:30:49
Zitat von: immi am 15 Juli 2019, 20:38:47
your module does not load automatically
there is another command to force loading

insmod /lib/modules/2.6.32.41/kernel/drivers/usb/serial/cp210x.ko

it is equivalent to modprobe; use what youpreferhappy that it is working now

do not understand your question
This is the serial chip on your THZ...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 01 September 2019, 21:30:21
Hi,

This is my first trip into fhem, so please bear with me. I run fhem on Raspbian Buster (RPI2) with USB2-RS232 adapter (Prolific) and ser2net, connected with a Tecalor THZ 303 SOL heatpump from year 2008. The firmware is v2.16. Fhem doesn not offer this version, so I selected 2.14, which seems to be closest. However, I wonder if I would profit from an exactly matching firmware version in the THZ module. What would be needed to add 2.16 support to THZ? Maybe I can help. Right now, I get the readings that seem to be correct; however, I am not sure if I miss something because of the FW differences. Thanks for your hints!
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 02 September 2019, 17:56:25
hi sunrise
happy you got it working;
I have a newer tecalor, therefore I never digged deep in the 2.x firmwares.
I implemented something for 214 and 206... because I received feedbacks from people with this heatpumps.
Read the whole topic and you will find out who has older tecalor.
By reading you will understand the reverseengineering process.
If you tell me which register differ in your firmware (e.g. how to change line 67 to 169), I will make a version for you.

see the contribution from andre.k
https://forum.fhem.de/index.php/topic,33211.msg695420.html#msg695420
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 02 September 2019, 18:14:07
Hi immi,

Thanks for your advice and the corresponding code block from andre.k. I will look into this. Some years ago, I spent some time with Robert's heatpump monitor and got at least a basic understanding of what is sent to the heatpump and what is expected back (and it worked, too). So hopefully, I can dig my way through this and offer some adjustments for the 2.16 FW. It may take a while, though. ;)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 03 September 2019, 12:34:05
Aus dem geschlossenen Thread "THZ / LWZ Tecalor Stiebel Eltron Heizung (https://forum.fhem.de/index.php/topic,13132.0.html)":
(sorry, die Zeiten der unten zitierten Beiträge stimmen nicht, weil man aus einem geschlossenen Thread nicht so einfach woanders zitieren kann)


Zitat von: belu am 01 Januar 1970, 01:00:00
... habe der Anlage gesagt sie ist ne THZ 404
... Man kann auch aus der THZ eine LWZ machen...

Zitat von: belu am 01 Januar 1970, 01:00:01
ich hab im Punkt Inbetriebnahme Modell drin. Das kann man verändern.

@belu

Kannst Du das bitte einmal genauer erläutern?
Ich habe eine THZ 303 SOL (Software 2.16) aus dem Jahre 2008, ohne iPod-Steuerung, d.h. nur dieses alte einfache LED-Display mit einigen Knöpfen.
Danke!

Can you please explain this in more detail?
I have a THZ 303 SOL (software 2.16) from 2008, without the iPod wheel, i.e. just that old plain LED display with several buttons.
Thanks!
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Jackie am 29 September 2019, 17:29:39
Hallo,

kann mir jemand erklären, warum die "heatSetTemp" aus dem Reading SHC1 immer um ca. 10 Grad nach oben geht, sobald die Außentemperatur einen gewissen Wert überschreitet? In meinem Screenshot sieht man das recht schön, heatSetTemp ist die graue Kurve, die Außentemperatur rot. Das passiert immer dann, wenn die Außentemperatur sich der eingestellten "Solltemperatur" der Heizung nähert, ich verstehe nur nicht, warum, und ob das ein Fehler der Heizung oder im FHEM Modul ist, bzw. warum es überhaupt zu dem Effekt kommt.

Könnt ihr mir weiterhelfen? Danke!
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 29 September 2019, 17:38:22
Vielleicht springst Du da zwischen Sommer- und Winterberrieb herum?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Jackie am 29 September 2019, 20:08:46
Danke, es scheint tatsächlich so zu sein dass sich das Reading seasonmode auf Sommer setzt, aber ich verstehe es trotzdem nicht, ich habe ja für Sommer / Winter keine verschiedenen Heizkurven gesetzt, sondern ich kann in der LWZ ja nur eine Heizkurve vorgeben. Oder übersehe ich etwas?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 29 September 2019, 23:29:47
Aber es gibt unterschiedliche Solltemperaturen für Sommer/Winter. Lies das Thema mal gründlich im Installationsmanual nach und schau Dir die entsprechenden PArameter an.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 30 September 2019, 07:46:13
Zitat von: Jackie am 29 September 2019, 20:08:46
Oder übersehe ich etwas?
Viel mehr würde mich interessieren, warum in dem Plot die WW-Bereitung am Morgen kurz unterbrochen wird?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Jackie am 30 September 2019, 18:34:06
Wo genau siehst du die Unterbrechung?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 30 September 2019, 19:26:40
Zitat von: Jackie am 30 September 2019, 18:34:06
Wo genau siehst du die Unterbrechung?
Trumpeter schreibt doch "...die WW-Bereitung am Morgen...". Da gibts eigentlich keine Frage mehr, wenn Du Dir deinen Plot anschaust. Die blaue Kurve solltest Du natürlich auch im Blick haben.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Jackie am 30 September 2019, 19:50:01
Das ist eine gute Frage, eventuell Messfehler? Ich habe solche EInbrüche immer wieder, oder könnte da tatsächlich an der Heizung was defekt sein? Ich habe mir da ehrlich gesagt noch nie Gedanken drum gemacht, oder ist hier eine mögliche Ursache denkbar, die auf einen Defekt schließen lässt? Hier der Bereich nochmal vergrößert, es gibt jedenfalls keine Unterbrechung in den Messwerten. Außerdem noch das, was ich sonst noch visualisiere, auch die Drehzahl der Ventilatoren ändert sich da kurzzeitig, ich habe aber ehrlich gesagt keine Erklärung dafür, was denkt ihr?

Unten noch ein weiterer Tag, an dem das mehrfach passiert...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 30 September 2019, 20:11:44
Klingt für mich eher, als ob ein Parameter, der damit im Zusammenhang steht, etwas unglücklich (zu niedrig) eingestellt ist. Dann läuft die Vorlauftemperatur an den Poller, obwohl die Brauchwassertemperatur noch nicht erreicht ist. Die Anlage legt eine Pause ein, der Vorlauf kühlt ab und die Brauchwasserbereitung geht weiter. Evtl. war die blaue Kurve beim Abbruch schon höher als hier dargestellt, weil fhem ja nur alle paar Minuten misst (je nachdem, wie Du das konfiguriert hast). Was dazwischen passiert sieht zwar die Anlage, aber fhem nicht.

Solche Dinge passieren immer wieder, weil die Monteure die Anlage zwar bei der Erstinstallation einstellen, dann aber nie wieder sehen. D.h. die bekommen keine Erfahrungswerte, was sich bewährt hat und was nicht.

Das ist der klassische Grund, weshalb man so ein fhem-Monitoring installiert. Du hast jetzt höchstwahrscheinlich einen Fehler in den eingestellten Parametern entdeckt. Nun gilt es, die Ursache im Detail zu finden. Dazu wird Dir nichts anderes übrig bleiben, als Dich mit der Funktionsweise der Anlage vertraut zu machen. Lies das Installationsmanual (oder zumindest den dafür relevanten Teil) so lange immer wieder durch, bis Du die Funktionsweise verstanden hast und weisst, wie die Parameter Einfluss nehmen. Einer davon dürfte falsch sein.

Auf die Schnelle fallen mir ein:

p36DHWMaxTime
p89DHWeco (?)
p99DHWmaxFlowTemp

Ich habe eine ziemlich alte Anlage. Mag sein, dass es bei den neueren andere oder mehr infrage kommende Parameter gibt.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 01 Oktober 2019, 07:59:39
Zitat von: willybauss am 30 September 2019, 20:11:44
Auf die Schnelle fallen mir ein:

p36DHWMaxTime
p89DHWeco (?)
p99DHWmaxFlowTemp

Ich habe eine ziemlich alte Anlage. Mag sein, dass es bei den neueren andere oder mehr infrage kommende Parameter gibt.
p36DHWMaxTime kannst Du ausschließen, der kleinstmögliche Wert ist 6h...
p89DHWeco (?) kannst Du auch ausschließen. Das macht ja nix anderes als die Solltemperatur auf die erreichbare Ist-Temperatur zu setzen.

Ich hätte zuerst (bei dem ursprünglich gezeigten kleinen Ausschnitt) auf unterschiedliche Solltemperaturen zwischen Tag und Nacht getippt, aber da es auch tagsüber auftritt, wird wohl wirklich irgendein Parameter "im Wald" stehen.
Ich würd' auch auf p99DHWmaxFlowTemp tippen, einfach mal den möglichen Max-Wert draufschreiben.
Möglicherweise hilft auch die Durchflussrate für die WW-Bereitung zu erhöhen, denn offenbar kriegt die Anlage die Wärme nicht übertragen...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 01 Oktober 2019, 09:51:00
Zitat von: TheTrumpeter am 01 Oktober 2019, 07:59:39
Möglicherweise hilft auch die Durchflussrate für die WW-Bereitung zu erhöhen, denn offenbar kriegt die Anlage die Wärme nicht übertragen...
Du meinst die Pumpenleistung? Wäre auch eine Idee.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Jackie am 01 Oktober 2019, 17:51:14
Hallo,

danke für die wertvollen Tipps, da ich sehr viele Parameter logge, seht ihr was in den Logfiles der betreffenden Tage, die ich angehängt habe?

Vielen Dank!
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 01 Oktober 2019, 18:16:32
Siehst DU denn was?

Eigentlich wäre für solche Fragen dieses Forum richtig:
https://forum.fhem.de/index.php?topic=33452 (https://forum.fhem.de/index.php?topic=33452)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Jackie am 01 Oktober 2019, 22:25:35
Naja, ich sehe dass der Wert p99DHWmaxFlowTemp bei 75 Grad liegt, eigentlich hoch genug, oder sollte ich ihn höher einstellen? Der Thread kann natürlich gern verschoben werden, ich wollte jetzt keinen zweiten aufmachen. Ich dachte vielleicht sieht noch jemand einen anderen Wert, der nicht plausibel erscheint.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 02 Oktober 2019, 06:59:44
75 sollte ok sein. Mir fällt grade nichts dazu ein. Mit dem Thema hast Du Dich ja ausgiebig beschäftigt  8), um eventuelle Einflüsse anderer Parameter zu checken, die ich in meiner Anlage nicht habe und deshalb nicht kenne ...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: MSP am 23 Oktober 2019, 08:24:36
Hallo,

bin noch recht neu im Forum. Habe meine LWZ 403 SOL erfolgreich mit FHEM verbunden und kann die Anlage über FHEM steuern und Messwerte auslesen. Ich möchte die solare Heizungsunterstützung optimieren und bei genügend Sonneneinstrahlung die Heizungsunterstützung automatisch in der THZ aktivieren/deaktivieren (Pumpenzyklen maximieren und Temperaturen anpassen, Betriebsmodus umschalten) ohne dass sich der Verdichter einschaltet. Über KNX kann ich dann dieHeizkreisventile öffnen und über einen Kontakt das Einschalten des Verdichters unterdrücken.
Dabei ist mir aufgefallen, dass im THZ Modul die maximale Anzahl der Pumpenzyklen "p55MaxPumpCycles" nur auf den Wert 200 gestellt werden kann, der maximal mögliche Wert in der WP ist aber 288, damit läuft aber die Pumpe nicht dauerhaft (288 x 5 min = 24h).
Bei Eingabe über die Modulsteuerung/Programmierzeile erscheint die Meldung "Argument does not match..." (siehe Anhang). Kann jemand helfen, liegt der Fehler im Modul?

Danke
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 23 Oktober 2019, 08:31:21
Steht in "sFirmware" die richtige Version drin?

Wenn nein: bitte korrigieren und nochmal testen.
Wenn ja: immi wird sich sicher schnell melden und einen Fix im Modul bauen.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: MSP am 23 Oktober 2019, 08:54:12
Im reading von "sFirmware" steht version 04.39 drin, in der FHEM.cfg habe ich die FW wie folgt definiert "attr Mythz firmware 4.39technician".

Danke für die schnelle Reaktion

Gruß
Markus
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 23 Oktober 2019, 21:14:26
Die Frage ist, ob deine Anlage tatsächlich die 4.39 drin hat.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: MSP am 24 Oktober 2019, 00:04:42
Ich dachte der Eintrag in sFirmware kommt aus der Anlage, wie kann ich das sonst ermitteln?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: MSP am 24 Oktober 2019, 00:11:15
Wenn der Parameter p55 in der Anlage auf 288 eingestellt wird, wird er auch im FHEM so angezeigt
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 24 Oktober 2019, 08:50:26
Zitat von: MSP am 24 Oktober 2019, 00:04:42
Ich dachte der Eintrag in sFirmware kommt aus der Anlage, wie kann ich das sonst ermitteln?
Reset der Anlage. Während des bootens das Display beobachten.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 24 Oktober 2019, 22:15:33
Zitat von: MSP am 23 Oktober 2019, 08:24:36
Über KNX kann ich dann dieHeizkreisventile öffnen und über einen Kontakt das Einschalten des Verdichters unterdrücken.
Dabei ist mir aufgefallen, dass im THZ Modul die maximale Anzahl der Pumpenzyklen "p55MaxPumpCycles" nur auf den Wert 200 gestellt werden kann, der maximal mögliche Wert in der WP ist aber 288, damit läuft aber die Pumpe nicht dauerhaft (288 x 5 min = 24h).
Bei Eingabe über die Modulsteuerung/Programmierzeile erscheint die Meldung "Argument does not match..." (siehe Anhang). Kann jemand helfen, liegt der Fehler im Modul?
Failure or feature ? :)

try to change line  444  of 00_THZ.pm from

  "p55MaxPumpCycles" => {cmd2=>"0A05B7", argMin =>  "25", argMax =>  "200", type =>"1clean",  unit =>""},

to

  "p55MaxPumpCycles" => {cmd2=>"0A05B7", argMin =>  "25", argMax =>  "288", type =>"1clean",  unit =>""},


restart fhem and tell me if the problem is fixed.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: MSP am 28 Oktober 2019, 19:48:02
Hi Willy and immi,

installed Firmware in my LWZ is 4.39, it is noticed in one of the submenus, see attached pic.

I followed immi's recommendation above and now I'm able to set parameter p55 to 288 via FHEM, see attached pic.

Thanks for support.

Regards
Markus
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 28 Oktober 2019, 20:51:13
code change committed to repository; you can update tomorrow
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: kriforum am 16 Dezember 2019, 22:22:08
Hi all,

I used this module for many years on my Raspi 1B running Wheezy. Recently I finally updated to Buster on a model 3B+. So far so good.
What I did not manage is to get DebianMail running again, that's one of the reasons why I decided to change all heatpump error messaging of the module to Telegram.
Now I got stuck already when I tried to change the Mythz.alarm_failure notify.
I simply tried to replace the DebianMail part with the Telegram part (first without attachment and error number), and tried this:

#define Mythz.alarm_failure notify Mythz { if (((split ' ',ReadingsVal("Mythz","sLast10errors",0))[1]) > ReadingsVal("Mythz","number_of_faults_old",0)) {(set myTelegramBot message Tecalor Mythz Alarm - Fehlermeldung);; fhem("setreading Mythz number_of_faults_old ". ((split ' ',ReadingsVal("Mythz","sLast10errors",0))[1]));; }}

instead of

#define Mythz.alarm_failure notify Mythz { if (((split ' ',ReadingsVal("Mythz","sLast10errors",0))[1]) > ReadingsVal("Mythz","number_of_faults_old",0)) { DebianMail('xxx@xxx.de','Tecalor Mythz Alarm - ERROR','Fehlermeldung: '. $EVENT,'/opt/fhem/Tecalor-Fehlermeldungen.txt');; fhem("setreading Mythz number_of_faults_old ". ((split ' ',ReadingsVal("Mythz","sLast10errors",0))[1]));; } } 

My log file tells me:
2019.12.16 21:52:25 1: ERROR evaluating my $EVENT='HCStrom: 15197';my $EVTPART1='15197';my $EVTPART0='HCStrom:';my $SELF='Mythz.alarm_failure';my $TYPE='THZ';my $NAME='Mythz';{ if (((split ' ',ReadingsVal("Mythz","sLast10errors",0))[1]) > ReadingsVal("Mythz","number_of_faults_old",0)) {(set myTelegramBot message Tecalor Mythz Alarm - Fehlermeldung); fhem("setreading Mythz number_of_faults_old ". ((split ' ',ReadingsVal("Mythz","sLast10errors",0))[1])); }}: Can't locate object method "Mythz" via package "Alarm" (perhaps you forgot to load "Alarm"?) at (eval 3662) line 1.

2019.12.16 21:52:25 3: Mythz.alarm_failure return value: Can't locate object method "Mythz" via package "Alarm" (perhaps you forgot to load "Alarm"?) at (eval 3662) line 1.


Anybody there who can tell me how to exchange the methods, and which syntax changes are required?
Ideally also how to include the error number again?

Thanks
Christian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 16 Dezember 2019, 22:44:25
I can't help you with porting to Telegram. But maybe I know about your trouble with DebianMail. If your installation is based on my example code, you should have in mind that my code relies on a piece of code for DebianMail, which must be placed in 99_myUtils.pm. This special version allows email attachments, which isn't possible in standard DebianMail.

The code looks like
######## DebianMail  Mail auf dem RPi versenden - incl. Attachment ############
sub
DebianMail
{
my $rcpt = shift;
my $subject = shift;
my $text = shift;
my $attach = shift;
my $ret = "";
my $sender = "[YourEmailAddress]\@[YourProvider]";
my $konto = "accountname\@account.de";
my $passwrd = "[YourPassword]";
my $provider = "securesmtp.t-online.de";
Log 1, "sendEmail Empfaenger: $rcpt";
Log 1, "sendEmail Subject: $subject";
Log 1, "sendEmail Text: $text";
Log 1, "sendEmail Attachment: $attach";
################ FOR DEBUGGING PURPOSES ONLY ########################
################ Log 1, "sendEmail Sender: $sender";
################ Log 1, "sendEmail Konto: $konto";
################ Log 1, "sendEmail Passwort: $passwrd";
################ Log 1, "sendEmail Provider: $provider";
$ret .= qx(sendEmail -f '$sender' -t '$rcpt' -u '$subject' -m '$text' -a '$attach' -s '$provider' -xu '$konto' -xp '$passwrd' -o tls=auto);
$ret =~ s,[\r\n]*,,g;    # remove CR from return-string
Log 1, "sendEmail returned: $ret";
}
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Sinclair am 28 Dezember 2019, 17:11:05
Hallo,

ich habe ein paar Fragen zur Holiday/Urlaubs-Modus-Einstellung:

Leider scheint die Heizung meine aktuelle Urlaubseinstellung nicht übernommen zu haben. Gibt es einen Parameter oder Flag an dem man erkennen kann ob die Anlage im Urlaubs-Modus ist?
Muss man beim Setzen des Urlaubs Start- und End-Termin über FHEM eine bestimmte Reihenfolge beachten bzw muss der Start-Termin grundsätzlich in der Zukunft liegen oder prüft die Anlage nur ob man momentan zwischen den 2 Terminen liegt?

Hat jemand schon eine komfortablere Einstellmöglichkeit (über FHEM oder Smartvisu) geschaffen, wo man nicht Tag, Monat, Stunde usw einzeln eingeben muss sondern das ganze Datum inkl. Uhrzeit einfach wählen oder eingeben kann? (Code-Snipsel willkommen  ;D)

Vielen Dank
Sinclair


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 28 Dezember 2019, 17:38:22
Probier mal aus, ob es einen Unterschied macht, ob Du die Urlaubsdatum per fhem oder übers Display der Anlage eingibst.

Steht denn im Manual der Anlage irgendwas drin, ob man außer dem Setzen von Start und Ende noch was machen muss?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 28 Dezember 2019, 21:33:17
Zitat von: Sinclair am 28 Dezember 2019, 17:11:05
Leider scheint die Heizung meine aktuelle Urlaubseinstellung nicht übernommen zu haben. Gibt es einen Parameter oder Flag an dem man erkennen kann ob die Anlage im Urlaubs-Modus ist?
Muss man beim Setzen des Urlaubs Start- und End-Termin über FHEM eine bestimmte Reihenfolge beachten bzw muss der Start-Termin grundsätzlich in der Zukunft liegen oder prüft die Anlage nur ob man momentan zwischen den 2 Terminen liegt?

Hat jemand schon eine komfortablere Einstellmöglichkeit (über FHEM oder Smartvisu) geschaffen, wo man nicht Tag, Monat, Stunde usw einzeln eingeben muss sondern das ganze Datum inkl. Uhrzeit einfach wählen oder eingeben kann? (Code-Snipsel willkommen  ;D)
Setting holiday-start and -end worked for me, without any extra procedure.
Nevertheless I never really used the holiday function, since FHEM is working.

I find it more confortable to connect to my home-vpn the last day of my holyday and change from standby to automatic (but with very low warm-water); 1h before I arrive home, I also set ww to the normal temperature.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Sinclair am 29 Dezember 2019, 14:10:36
jetzt scheint es zu funktionieren!

Ich habe gestern nochmal über FHEM nur die Uhrzeiten gesetzt und ab dann war auch das Schaltprogramm aus.
Muss mir auch mal eine Lösung über FHEM überlegen, so dass die Urlaubseinstellung nicht immer zum Glückspiel wird.

Danke an immi und willybauss
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: kriforum am 31 Dezember 2019, 11:51:31
Zitat von: willybauss am 16 Dezember 2019, 22:44:25
I can't help you with porting to Telegram. But maybe I know about your trouble with DebianMail. If your installation is based on my example code, you should have in mind that my code relies on a piece of code for DebianMail, which must be placed in 99_myUtils.pm. This special version allows email attachments, which isn't possible in standard DebianMail.

The code looks like
######## DebianMail  Mail auf dem RPi versenden - incl. Attachment ############
sub
DebianMail
{
my $rcpt = shift;
my $subject = shift;
my $text = shift;
my $attach = shift;
my $ret = "";
my $sender = "[YourEmailAddress]\@[YourProvider]";
my $konto = "accountname\@account.de";
my $passwrd = "[YourPassword]";
my $provider = "securesmtp.t-online.de";
Log 1, "sendEmail Empfaenger: $rcpt";
Log 1, "sendEmail Subject: $subject";
Log 1, "sendEmail Text: $text";
Log 1, "sendEmail Attachment: $attach";
################ FOR DEBUGGING PURPOSES ONLY ########################
################ Log 1, "sendEmail Sender: $sender";
################ Log 1, "sendEmail Konto: $konto";
################ Log 1, "sendEmail Passwort: $passwrd";
################ Log 1, "sendEmail Provider: $provider";
$ret .= qx(sendEmail -f '$sender' -t '$rcpt' -u '$subject' -m '$text' -a '$attach' -s '$provider' -xu '$konto' -xp '$passwrd' -o tls=auto);
$ret =~ s,[\r\n]*,,g;    # remove CR from return-string
Log 1, "sendEmail returned: $ret";
}

Thanks Willy,

I had used your modified code in the utils. The DebianMail trouble is somehow related to openssh, I remember I had to search a lot when setting it up for the old version, and I thought thisshould have been fixed now in Buster.

Anyway, now I found out how to do it with Telegram when I had a thorough look to the code again. As the telegram command is a fhem command, whereas DebianMail is a perl one, I simply had to to place "fhem" in front, now it looks like this and works fine:

define Mythz.alarm_failure notify Mythz { if (((split ' ',ReadingsVal("Mythz","sLast10errors",0))[1]) > ReadingsVal("Mythz","number_of_faults_old",0)) { fhem ("set myTelegramBot message Tecalor Mythz Alarm - Fehlermeldung") ;; fhem("setreading Mythz number_of_faults_old ". ((split ' ',ReadingsVal("Mythz","sLast10errors",0))[1]));; } }


Gesendet von meinem SM-G950F mit Tapatalk

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: frankef am 08 Januar 2020, 21:28:17
Hallo zusammen,

ich habe das geniale Modul von immi installiert und versuche gerade meine LHZ303i besser zu verstehen.
(Pumpe aktuell alle Daten in eine Datenbank und visualisiere sie mit Grafana.

Da wir bei ähnlichen Rahmenbedingungen ca. 30% mehr Strom als unsere Nachbarn (mit der gleichen Anlage) verbrauchen, vermute ich einiges an Optimierungspotenzial.

Ich würde gerne im ersten Schritt die einzelnen Werte in sGlobal besser verstehen.

Wie sind diese Werte zu betrachten, sind sie für eine Optimierung/Fehlersuche relevant?

- hotGasTemp (schwankt zwischen 30 und 110 Grad)
- evaporatorTemp (schwankt zwischen -4 und 25 Grad)
- condenserTemp (schwankt zwischen 20 und 60 Grad)
- heatPipeValve (steht unregelmäßig auf "1", in einer Nacht plötzlich 11 mal in 2h)
- STB (unregelmäßig auf "1")
- actualPower_Pel
- actualPower_Qc
- P_Hd
- P_Nd

Sorry für meine Fragen. Mir fehlt vielleicht auch noch ein bissl Grundverständnis, wie die Anlage funktioniert.
Ich verstehe auch die Funktion vom Heizkreis 2 nicht. Ich dachte die Anlage heizt mit Heizkreis 1 sowohl den WW-Speicher, als auch die Fußbodenheizung.

Daher ist mir auch nicht klar, wie ich die Vorlauftemperatur flowTempHC2 interpretieren sollte.

Könnt ihr mir da bitte helfen?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 08 Januar 2020, 21:43:28
Die angefragten Parameter sind zur Beantwortung der Frage nach den +30% Heizkosten im ersten Ansatz relativ uninteressant. Einige der anderen Fragen beantwortet das Manual.

Außerdem wäre die Frage hier
https://forum.fhem.de/index.php/topic,33452.0.html.html (https://forum.fhem.de/index.php/topic,33452.0.html.html)
besser aufgehoben. Zeige uns die Plots, so wie ich sie im ersten Beitrag des Links anbiete. Erfahrene Benutzer können daraus meist in Sekunden ersehen, wo das Problem liegt.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 11 Februar 2020, 08:20:47
@ immi:
Do we have a mapping table, saying which firmware attribute value should be set in case of THZ firmware rev. xyz? In the 'other' thread we're discussing a question related to that topic:

https://forum.fhem.de/index.php/topic,33452.msg1022908.html#msg1022908 (https://forum.fhem.de/index.php/topic,33452.msg1022908.html#msg1022908)

I tried to find the answer in the code. Lines ~1980 ... 2005 look like you're trying to do a best guess mapping already, but I'm not sure if that's right. Could you give us a hint, please?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 11 Februar 2020, 17:57:00
Zitat von: willybauss am 11 Februar 2020, 08:20:47
@ immi:
Do we have a mapping table, saying which firmware attribute value should be set in case of THZ firmware rev. xyz?
Hi Willy
I do not have a mapping, therefore I leave the FHEMuser the reponsability to define the firmware parameter.
I check the firmware parameter in Lines ~1980 ... 2005 and if it is not defined, I set 4.39 (the one for early adopters)
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 08 Mai 2020, 13:52:47
update to 0.184
THZ: z_Last_fhem_err implemented, aesthetics and DevIo (Forum #110125)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 07 Juni 2020, 22:40:25
Hello,

My THZ 303 SOL has firmware 2.16, but the module does not seem to include this version - only 2.06 and newer ones. Can you please give me a hint how I should handle this?

I would like to add the status (over time) of the pump that transports the water through the heating in the floor (German "Umwälzpumpe") to my graph/plot of various temperatures. Any hints are very welcome! :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 08 Juni 2020, 20:33:26
Zitat von: sunrise am 07 Juni 2020, 22:40:25
Hello,
My THZ 303 SOL has firmware 2.16, but the module does not seem to include this version - only 2.06 and newer ones. Can you please give me a hint how I should handle this?
Hi sunrise,
2.06 or 2.14
no idea which one is better for you :(
just try
I have not tested both, my tecalor is newer.
Fell free to reverse engineer your firmware and I will add your parameters to the module.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 09 Juni 2020, 15:53:13
SwitchingProg seems to belong to sDisplay, right? However, I cannot find sDisplay on my heating (which is from 2008 and has the very old LCD, i.e. not even that "ipod"-like display that followed, if I remember correctly)

I would like to rebuild willibauss' code from there (https://forum.fhem.de/index.php/topic,33452.msg563529.html#msg563529) to fit my heating, but currently, I do not really know how to start.

Thanks for more hints in this regard!  :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 09 Juni 2020, 16:11:22
A separate post for a separate problem:

My heating's firmware is 2.16.

When I set the firmware to 2.04, I get the following for sControl (which seems plausible):
ZitatheatRequest: 5 heatRequest2: 5 hcStage: 0 dhwStage: 0 heatStageControlModul: 0 compBlockTime: 0 pasteurisationMode: 0 defrostEvaporator: 10 boosterStage2: 0 solarPump: 0 boosterStage1: 0 compressor: 0 heatPipeValve: 0 diverterValve: 0 dhwPump: 0 heatingCircuitPump: 0 mixerOpen: 0 mixerClosed: 0 sensorBits1: 01 sensorBits2: 01 boostBlockTimeAfterPumpStart: 0 boostBlockTimeAfterHD: 0

However, when I set the firmware to 2.14 (which should be "closer" to my 2.16), I get the following for sControl:
Zitat13F20505000000000000100004010100000000
A little bit later this:
Zitat2BF2050500000000000010001C010100000000

The other "s" parameters (e.g. sGlobal) look right with the firmware set to 2.14, but not sControl.

When I set the firmware back to 2.06, sControl again looks right:
ZitatheatRequest: 5 heatRequest2: 5 hcStage: 0 dhwStage: 0 heatStageControlModul: 0 compBlockTime: 0 pasteurisationMode: 0 defrostEvaporator: 10 boosterStage2: 0 solarPump: 0 boosterStage1: 0 compressor: 0 heatPipeValve: 0 diverterValve: 0 dhwPump: 0 heatingCircuitPump: 0 mixerOpen: 0 mixerClosed: 0 sensorBits1: 01 sensorBits2: 01 boostBlockTimeAfterPumpStart: 0 boostBlockTimeAfterHD: 0

Under Internals, the model appears as "2.06_02.16". Is this as it should be? Is my heating's firmware 2.06 or 2.16? The read firmware parameter tells me it is 2.16 (as well as on the plate stuck on the heating).
ZitatDEF    /dev/ttyUSB0@9600
DeviceName    /dev/ttyUSB0@9600
FD    7
FUUID    xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx (I anonymised this)
NAME    Mythz
NR    14
PARTIAL
STATE    opened
TYPE    THZ
VERSION    0.184
model    2.06_02.16

PS:
About 40 minutes after my above posting, I set the firmware of the THZ module again to 2.14 and read sControl. Interestingly, I again get only these 2 values (after several readings), nothing else, i.e. the same as 40 minutes ago (see 2 quotes above):
Zitat13F20505000000000000100004010100000000
2BF2050500000000000010001C010100000000

When setting the firmware value back to 2.06, sControl is again ok.

How can I help to "disassemble" (or shall I name it "reverse engineer") this? The hex values above mean nothing to me, and I have no clue which values I could look up from the display or from the correct ones via FHEM in order to "guess" how the firmware could be amended. Thanks, immi, for your help!
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 09 Juni 2020, 20:07:16
Zitat von: sunrise am 09 Juni 2020, 16:11:22
However, when I set the firmware to 2.14 (which should be "closer" to my 2.16), I get the following for
2.14 ist not closer to 2.16 based on information from Tecalor "Ersatzteilkatalog":

THZ 303 INTEGRAL
2.03 (2002/01-2004/04)
2.05 (2004/04-2006/11)
2.06 (2006/12-2008/08)
THZ 303 SOL
2.14 (2002/10-2004/08)
2.15 (2004/09-2006/08)
2.16 (2006/09-2008/08)

I would suggest to start with firmware 2.06 in your case.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 09 Juni 2020, 21:59:02
Zitat von: sunrise am 07 Juni 2020, 22:40:25
Hello,

My THZ 303 SOL ...

So, why do you suggest 2.06 for a SOL model?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 10 Juni 2020, 11:51:27
Zitat von: andre.k am 09 Juni 2020, 20:07:16
2.14 ist not closer to 2.16 based on information from Tecalor "Ersatzteilkatalog":

THZ 303 INTEGRAL
2.03 (2002/01-2004/04)
2.05 (2004/04-2006/11)
2.06 (2006/12-2008/08)
THZ 303 SOL
2.14 (2002/10-2004/08)
2.15 (2004/09-2006/08)
2.16 (2006/09-2008/08)

I would suggest to start with firmware 2.06 in your case.
As willybauss noted, I have the THZ SOL, i.e. firmware 2.06 is actually not applicable for me. Why it works better for me (regarding the sControl reading) than with 2.16, I do not know. Well, the firmware 2.16 is officially not supported by THZ module. Immi kindly offered to support it, but of course he would need more input from me or other users with the 2.16 firmware for debugging/reverse engneering.

Now I wonder whether I should use the 2.06 (which is for the INTEGRAL) or the 2.14 (for my SOL) for further testing etc. :-\
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 10 Juni 2020, 18:39:40
I know, that's a little bit confusing. Currently the SOL related code in the THZ module is generic for firmware 2.xx. But in firmware 2.06 are two  special get commands sLast10errors and sFirmware and modifications in sHC1 and sGobal.


 
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 10 Juni 2020, 20:28:36
As I do not know these details, would you suggest that I try 2.06 or 2.14? How can I contribute to "disassemble" something? I am really willing to do so but do not know how and where to start. The THZ is connected to a Raspi with FHEM. Via ser2net, I can also read and write from other devices.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 11 Juni 2020, 10:50:31
Zitat von: sunrise am 10 Juni 2020, 20:28:36
How can I contribute to "disassemble" something? I am really willing to do so but do not know how and where to start. The THZ is connected to a Raspi with FHEM. Via ser2net, I can also read and write from other devices.
excellent attitude
let us start by forgetting  the name from tecalor 2.xx let us call a new one 2.16 for now.
look at the code https://github.com/mhop/fhem-mirror/blob/master/fhem/FHEM/00_THZ.pm

line 900
chage it to ."firmware:4.39,2.06,2.14,2.16,5.39,4.39technician "

line 1897
i tell fhem which %sets and %gets to use for 2.14
just add a simical case for 2.16


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 ....)


line 73
here is defined how to decode the answer from the heatpump for 01pxx214

so far easy :)

now, find out your registers with their encoding.
if you can follow me so far, I can explain you how

immi


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 11 Juni 2020, 11:23:05
Great, thank you! I am new to GitHub (have an account there as '7wells'). Am I allowed to edit the code there? Or is this going to work via pull requests or something?

And yes, I will definitely be able to get the values for all parameters etc.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 11 Juni 2020, 12:27:56
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
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 13 Juni 2020, 11:34:46
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.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 13 Juni 2020, 11:52:36
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
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag 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. :) 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?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 13 Juni 2020, 18:46:26
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
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 13 Juni 2020, 20:11:38
I feel ashamed to ask: How can I overwrite 00_THZ.pm? :blush:
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 13 Juni 2020, 21:42:28
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.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 14 Juni 2020, 12:12:36
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.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 14 Juni 2020, 12:37:51
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.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 14 Juni 2020, 14:11:21
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
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 14 Juni 2020, 17:04:47
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
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 14 Juni 2020, 20:45:07
 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.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: andre.k am 14 Juni 2020, 21:04:55
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]
         ],
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 14 Juni 2020, 21:15:18
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.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 19 Juni 2020, 12:58:42
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;
}
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 19 Juni 2020, 13:35:17
I have another/different question (hence, as a new comment):

On my RPI/ssh, I try to sniff the traffic over the serial port:

tail -f /dev/ttyUSB0

But both as user as well as root, nothing happens, i.e. no messages appear - even during reading values via the FHEM GUI.
The cable with the THZ is connected to my RPI via USB-RS232 adapter (hence, /dev/ttyUSB0, as defined in FHEM and else working nicely).

Do you have some hints if I am "sniffing" not properly, or what else could cause the lack of messages.

I intend to see the raw bytes being transferred via the serial port when doing readings via the FHEM GUI or via the THZ's control panel/LCD.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 19 Juni 2020, 17:10:26
Hmm, I kind of "stumbled" over this in the FHEM/THZ commandref (https://fhem.de/commandref.html#THZ):
Zitat
Example: direct connection

    define Mytecalor THZ /dev/ttyUSB0@115200

or network connection (like via ser2net)

    define Myremotetecalor THZ 192.168.0.244:2323
    define Mythz THZ /dev/ttyUSB0@115200

FHEM and ser2net are running on my RPI and the USB/RS232 connector is on the RPI as well. Content of /etc/ser2net on my RPI:


BANNER:banner:\r\nser2net port \p device \d [\s] (Debian GNU/Linux)\r\n\r\n
2000:telnet:600:/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT banner


So far, so good, or not?

In FHEM, I have this under Internals:


DEF    /dev/ttyUSB0@9600
DeviceName    /dev/ttyUSB0@9600


The device should be ok, as "dmesg | grep USB" shows "pl2303 converter now attached to ttyUSB0".
The baudrate (9600) is the same as set in ser2net (shown above).
Do you agree that until here, everything is set up correctly?

I wonder, because the quote from the commandref mentions for network connection (via ser2net) 2 different "define" lines, the first with the IP:port number of the device (actually, which one: where FHEM runs or where the cable is connected?), the second with /dev/ttyUSB0@<baudrate>. And this puzzles me, as I do not know what these 2 different scenarios mean and if my described setting is correct in light of this.

I hope that I wrote this in an understandable way - if not, please bear with me and give me a sign.  :blush:
Thanks a lot and a great weekend to all of you for all your efforts and help!  :)


PS:

My bad! Of course, I only use the ser2net in order to be able to do something from my remote Windows 10 machine (running a virtual port). Since FHEM and USB/RS232 run on the RPI, I have nothing to do with ser2net when logged into the RPI via ssh, so please ignore my last question about ser2net - unless you still see something that I shall look into.

What remains is still my question, how I could properly sniff the Rx/Tx directly on the RPI (tail -f /dev/ttyUSB0 does not seem to work).
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 19 Juni 2020, 17:55:32
Hi sunrise
trust me, stay away from nonblocking in fhem and thz, for now; if you find it usefull we can discuss on it after you have implemented all your registers.

back to sniffing. there are several packet monitoring and ser2net can also log the traffic.
I did something different and trivial: I redirected the traffic via a proxy in perl, which you can find attached

Windows maschine virtual port  --> linux computer with proxy.pl --> ser2net on another linux computer

the proxy and the ser2net can be also the same computer, but you should pay attention to use different ports

immi


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 19 Juni 2020, 22:10:21
Hi immi,

There were hundreds of "too slow" messages in the log, but I am happy to follow your recommendations. "First things first" ;) So I set nonblocking to 0. Do I have to change also simpleReadTimeout (currently set to 8) or just leave it for the time being?

"Windows maschine virtual port":
Do you mean something like this?
https://www.hw-group.com/software/hw-vsp3-virtual-serial-port

I use this on my Windows 10 machine to read/write data via ser2net and a virtual COM port. Is that what you also mean?

I would put the Perl script on my RPI that also runs the FHEM service and ser2net. Thanks also for the reminder regarding the different ports.

According to this...
https://catonmat.net/perl-tcp-proxy

... the Perl script is run like this (different use case):

sudo ./tcp-proxy2.pl 443 friends_server.com:22

Translated to our case, would it be like this?


sudo ./proxy.pl <port to sniff> localhost:<port of ser2net, in my case 2000>


Sorry, but I am really unsure how this should be done.
A big THANK YOU!  :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 Juni 2020, 22:00:42
while you use the windows service software, you have to stop fhem-thz

raspi e.g. 10.0.1.10
ser2net runnimg on 2000
sudo ./proxy.pl 3000 localhost:2000

windows e.g. 10.0.1.11
virtual-serial-port mapping  10.0.1.11:3000 to com4
service software on com4

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 20 Juni 2020, 22:50:23
Great, thanks! When I got this working and have first sniffing results, I will add something in the Wiki for other users who might benefit from this, too (for new firmwares or newer Tecalor/SE devices).
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 21 Juni 2020, 11:34:43
Hi immi,

Please excuse my additional question: Comparing your script vs. the one from that website (#post_), I see that you added a few lines (I left the commented out lines away) and wonder what your additions mean:


my $data =  uc(unpack('H*', $buffer));
if (length($data) > 20 ) { $data="0100E5F4FFF2004901BAFFDE01D2011401C00001000110100800650200000000DB0000160000ED00000016001003" }
open (MYFILE, '>>data.txt');
print MYFILE ($data );
close (MYFILE);
$buffer=  pack('H*', $data);


You commented out several if clauses with different $data. What is this variable about and why have you tried (and commented out) different values? I am willing to learn, hence my questions.  ;)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 21 Juni 2020, 20:24:27
Hi Sunrise
my $data =  uc(unpack('H*', $buffer));
convert binary in hex text

if (length($data) > 20 )  ...
I used it to test some hyphothesis on the protocol. I modified the command in the middle
you should comment out all "if (length($data) > 20 ) ....   "

open (MYFILE, '>>data.txt');
print MYFILE ($data );
close (MYFILE);

I log to file data.txt

$buffer=  pack('H*', $data);
I convert again to binary

immi



Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: HenryFinnigan am 09 Juli 2020, 15:25:07
Zitat von: sunrise am 19 Juni 2020, 22:10:21
Hi immi,

There were hundreds of "too slow" messages in the log, but I am happy to follow your recommendations. "First things first" ;) So I set nonblocking to 0. Do I have to change also simpleReadTimeout (currently set to 8) or just leave it for the time being?

"Windows maschine virtual port":
Do you mean something like this?
https://www.hw-group.com/software/hw-vsp3-virtual-serial-port

I use this on my Windows 10 machine to read/write data via ser2net and a virtual COM port (https://www.virtual-serial-port.org/). Is that what you also mean?

I would put the Perl script on my RPI that also runs the FHEM service and ser2net. Thanks also for the reminder regarding the different ports.

According to this...
https://catonmat.net/perl-tcp-proxy

... the Perl script is run like this (different use case):

sudo ./tcp-proxy2.pl 443 friends_server.com:22

Translated to our case, would it be like this?


sudo ./proxy.pl <port to sniff> localhost:<port of ser2net, in my case 2000>


Sorry, but I am really unsure how this should be done.
A big THANK YOU!  :)

Hi sunrise,
please advise me in virtual ports. You have assigned com4, did you appoint it yourself or automatically?
And after restarting the system, do you still have the assigned comport or is it interrupted?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 21 Juli 2020, 20:23:15
Seems that everybody is either on vacation or tired of optimizing/tweaking the THZ/LWZ.

I'm not so I want to place a rather big feature request now.  8)

I am still annoyed of getting so much redundant data into the logs and creating a lot of unnecessary events by reading out the s*-readings of the THZ although the really interesting data might not even change. Therefore I reduced the interval for some of the readings to rather high numbers, e.g. 300s for sGlobal.
Unfortunately this had some negative side effects recently as it did not catch the preparation of passive-cooling one day and therefore did not notify me in advance to open the windows before going to bed. (Of course passiveCooling was deactivated automatically as the closed windows were detected, but I am still thinking on how to improve it.)

So I was first thinking of creating a lot of user-readings and only log the user-readings and creating events only from them in future, but I feel a lot of people would be interested in a proper solution out of the THZ-module itself, so I want to describe how this could be improved in my opinion.

Prerequisite:
Let's find a naming convention on how we call the elements here to not get confused too much.

Possible implementation:

Advantages:


Thanks for reading, what do you think?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 04 August 2020, 10:35:30
Dear TheTrumpeter
I try to summ up: you are not happy with the functions and flexibility of userreadings and logfiles in order to address/save any message of each reading individually.
Moreover you expect standardize naming so that users can share scripts.

I implemented the module 00_THZ as transparent representation of tecalor register logic (oxymoron :) ....) and compatible with the standard fhem interfaces.

Going back to your solution "attribute messages_sGlobal, by setting it to 5dec which is 0101b": if a newbe cannot manage userreading, will for sure have problems with 0101b....

I see different ways

The most elegant and consistent solution would be 5.
But we have to talk to Andre/justme1968 (manteiner of readingproxy)

what you think?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 04 August 2020, 11:56:04
Zitat von: immi am 04 August 2020, 10:35:30
I implemented the module 00_THZ as transparent representation of tecalor register logic (oxymoron :) ....) and compatible with the standard fhem interfaces.
I really appreciate your work. It's really awsome how it works and how fast additionally found registers are implemented by you.

Zitat von: immi am 04 August 2020, 10:35:30
Going back to your solution "attribute messages_sGlobal, by setting it to 5dec which is 0101b": if a newbe cannot manage userreading, will for sure have problems with 0101b....
You're absolutely right, that's what I also feel, but I'm happy with any other suggestion that's easier. Nevertheless these attributes need not to be set. You just don't have a benefit from it.

Zitat von: immi am 04 August 2020, 10:35:30
I see different ways

  • creating lots of user-readings and only log the user-readings you want with regex
  • with a mix of lots of dummy, some notify, readingsProxy....
  • building an abstraction layer on top of 00_THZ (additional module like heatpump_interface inspiring from readingproxy...)
  • userreadings and logfiles should be extended with a mapping file; in the file you can map the readings with the messages in a readable format; a standard mapping file for some tecalors could be distibuted automatically with fhem
  • same as  4 but extending readingsProxy; a small api (to manage the mapping) can be impemented as second step.

The most elegant and consistent solution would be 5.
But we have to talk to Andre/justme1968 (manteiner of readingproxy)
1. is what my next approach would have been, but this cannot manage signals that are updated by more than one readings (e.g. outsideTemp)
2. sounds too complicated although it would be able to manage signals that are updated by more than one readings.
3. sounds interesting, although a quick solution could be usage of a few notifys and therefore be similar to 2.
4. I'm not sure if I get you point. Your idea is to define some "standard user readings" that would then be available for every user of THZ-module. Of course that's not that complicated and configurable as my initial suggestion is, but would at least solve the problem with sharing of code-snippets.
5. Of course I did not check all available modules if one would already be helpful for solving the problem. As far as I understand readingsProxy it would not be helpful "as it is" right now.


If I would not have another project already in preparation I think I would go for 3 on my own although I'm still not very familiar with Perl.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 05 August 2020, 10:08:35
Zitat von: TheTrumpeter am 04 August 2020, 11:56:04
1. is what my next approach would have been, but this cannot manage signals that are updated by more than one readings (e.g. outsideTemp)
well you just have to decide which one you trust and log and which one you ignore.


3, 4 and 5 differ mainly by the module to be changed (00_THZ vs userreadings vs. readingproxy)
I want to define a mapping of part of readings to messages in a readable format, which the user can change.
I am not sure if an external mapping config file is a good idea.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 07 August 2020, 13:33:09
I have now spent an hour to implement something like an abstraction layer.

Seems to work, what's missing now is the definition of the msg-Names, right now I've just done it for sGlobal and sHC1. Even there I've not spent too much effort but almost just copied the names from the existing readings.

After that the rest of my code has to be reworked so it fits the new features.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 09 August 2020, 07:43:21
interesting discussion here
https://forum.fhem.de/index.php/topic,113361.0.html (https://forum.fhem.de/index.php/topic,113361.0.html)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 09 August 2020, 09:24:51
Zitat von: immi am 09 August 2020, 07:43:21
interesting discussion here
https://forum.fhem.de/index.php/topic,113361.0.html (https://forum.fhem.de/index.php/topic,113361.0.html)
Seems that my initial request would be the best solution for some of the guys there...
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 09 August 2020, 09:39:47
Zitat von: TheTrumpeter am 09 August 2020, 09:24:51
Seems that my initial request would be the best solution for some of the guys there...
therefore there is a discussion, and as long as it is polite, I always appreciate others opinions.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 09 August 2020, 14:26:12
Well, seems that it has come to an end there.

If you decide to go somehow in the direction I've initially pointed to just give me a hint. Maybe my already available code could be reused although an experienced Perl-developer might think it is not efficient enough.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 09 August 2020, 17:29:25
new version 0.186 committed.
implemented new helper function THZ_Val("register", position or "subregistername", "defaultval")
the following 3 commands are nearly equivalent
{THZ_Val("sGlobal",5)}
{THZ_Val("sGlobal","returnTemp")}
{(split ' ',ReadingsVal("Mythz","sGlobal"))[5]}


possible application in userreadings
e.g.
Old: still supported

attr Mythz userReadings insideSetTemp:sHC1.* {(split ' ',ReadingsVal("Mythz","sHC1",0))[21]}, insideTemp:sHC1.* {(split ' ',ReadingsVal("Mythz","sHC1",0))[27]}, OutsideTemp:sGlobal.* {(split ' ',ReadingsVal("Mythz","sGlobal",0))[1]}


New: shorter and easier to read

attr Mythz userReadings insideSetTemp:sHC1.* {THZ_Val("sHC1",21)}, insideTemp:sHC1.* {THZ_Val("sHC1",27)}, OutsideTemp:sGlobal.* {THZ_Val("sGlobal",1)}



@Willy: if you like the feature, would you update your config template, please?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 10 August 2020, 12:20:09
Zitat von: immi am 09 August 2020, 17:29:25
new version 0.186 committed.
implemented new helper function THZ_Val("register", position or "subregistername", "defaultval")
the following 3 commands are nearly equivalent
{THZ_Val("sGlobal",5)}
{THZ_Val("sGlobal","returnTemp")}
{(split ' ',ReadingsVal("Mythz","sGlobal"))[5]}

Thank you.
This makes it much easier to extract a value from a reading as you can just specify the message-name ("returnTemp") instead of counting the words.

Unfortunately it does not help with regard to sharing of code snippets. So I will continue with my "abstraction layer"; I've already started to define the message-names.
Does anybody know a good dictionary for technical abbreviations? Then I would define the message-names based on that; otherwise I will reuse something that was not intended to be used for heatpumps.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 10 August 2020, 14:37:06
Zitat von: TheTrumpeter am 10 August 2020, 12:20:09
Thank you.
you are welcome, but please test it carefully.
Zitat
Unfortunately it does not help with regard to sharing of code snippets.
Maybe a little: the code snippets will be much easier to read.
Zitat
So I will continue with my "abstraction layer"; I've already started to define the message-names.
Does anybody know a good dictionary for technical abbreviations? Then I would define the message-names based on that; otherwise I will reuse something that was not intended to be used for heatpumps.
This is not the final solution: 0.186 is still beta  :)
Happy that you are considering working on an "abstraction layer".
Untill now I used the wording from the tecalor manual (good or bad, they needed less documentation).
The hard work is to make a good documented mapping; some automatismus in the module will follow.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 12 August 2020, 09:21:20
Hello,

given the current temperatures I have a question regarding passive cooling.

It pre-activates if outside temp is more than 3K above target inside Temp.
Then as soon as Temp is going down to target inside Temp minus 3K the vent goes on, predomenantly taking the warm air out, so that via open windows cooler fresh air can go in.

so far so good.

I have now 35 Degrees outside in overnight Temp goes down to  about 22.
Inside I have in the evening 27, Target would be 20.

Now passive cooling will not work as the night is not cool enough, even it would help to cool down a little.
Can I somehow change this 3K below target inhouse Temp to get it more efficently being working, or do I need to chnage the config of my Heating system in terms of target inside Temp?

How best to do it if needed?

some rule like: whenever outside temp is 10K above inside Target (night temp likly beyond target inside Temp)
and if inside Temp is more than 5K above Target inside temp
set  target inside Temp +5K at 18:00 ( hotest time of day) for the next 11 hours (because at 10:00 passive colling stops anyhow)

Thanks for letting me know

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 12 August 2020, 09:50:03
Hello! My "quick & dirty" solution some years ago was to set the inside target temperature (P1) to e.g. 29°C. I have not used passive cooling since, though, and am not sure if it worked as desired and efficiently enough. Maybe you have to play around with the P1 setting. Furthermore, be sure to have the parameters correctly set that keep the heating off. Someone recently posted here about his own "passive cooling" setting by directly addressing the in and out fans. Maybe that would be the better and certainly more flexible solution. Since my firmware is very old, I have stopped playing around with it and therefore cannot help further, sorry.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 12 August 2020, 10:27:06
Zitat von: Heiner am 12 August 2020, 09:21:20
I have now 35 Degrees outside in overnight Temp goes down to  about 22.
Inside I have in the evening 27, Target would be 20.
If you read the manual you would come to the impression that it should already work as long as you have a remote-control. Unfortunately it does not, at least not for my FW-version. Istead of taking the real inside-temperature it takes the desired WINTER temperature!

So theoretically you could set the winter temperatures to "real inside temperature - 5K" every day at 09:59:59.
But you would then have the situation that passive cooling will not be released if it is not warm enough outside that day. So you also have to consider the weather forecast if you do so.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 12 August 2020, 16:23:59
Thanks for the responses.

@Trumpeter: ...thats why I intended to say I only put a rule in pace once it is really hot (let says from 30 Degree onward.
if it is only a little hotter than the about 20 degree target over the day, likely it becomes cold enough ( 20-3 degree) over night to do the cooling.
but if super hot, the coldest hours are likely not cold enough to start cooling, but nevertheless would bring my home a bit close to the target temp.

@sunrise: yeah, the alternative to manipulating the inside temp target temporarily, would be to manipulate the fan setting temporarily.
effectively its roughly the same: if super hot, at a specific time for some hours, define input fan to 0 and output fan to some high value
it likely saver as putting the target inside temp up and in a surprising super cool night the heating kicks in...

but it seems the passive cooling function as such in the system, can not be adjusted to work on hot nights as well.

ok so how do i code the rule now?

define X notify Heizung:AussenTemp.* {if (time.now()) eq "17:00:00") && (ReadingsVal("Heizung", "AussenTemp", "")) >= 30)) {fhem("at 08:00" set Heizung:p99startUnschedVent. 3")}

clearly the above is just my thinking but given I am not a perl coder, this unlikly is going to work. Can this all somehow work in a single notification, or do i need a combination of NOTIFY and AT ?

Thanks again for your support.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 13 August 2020, 17:39:01
Zitat von: TheTrumpeter am 12 August 2020, 10:27:06
If you read the manual you would come to the impression that it should already work as long as you have a remote-control. Unfortunately it does not, at least not for my FW-version. Istead of taking the real inside-temperature it takes the desired WINTER temperature!
I have never noticed the bug for my firmware. Nevertheless since years, I keep the same "set temp" for winter and sommer because, it happen often that you go in wintermode also during nice clear summernights.
my p49SummerModeTemp is 16°C+-2.5
e.g. see attached
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 13 August 2020, 17:55:35
Zitat von: immi am 13 August 2020, 17:39:01
I have never noticed the bug for my firmware.
Do you use passive cooling? Otherwise you wouldn't notice.

Zitat von: immi am 13 August 2020, 17:39:01
Nevertheless since years, I keep the same "set temp" for winter and sommer because, it happen often that you go in wintermode also during nice clear summernights.
my p49SummerModeTemp is 16°C+-2.5
e.g. see attached
I think besides that parameter you also use a very short filter time. Otherwise that won't happen the same day passive-cooling is released.

You could switch to DHW-mode during summer to avoid any unwanted heating, but as far as I remember you do not want to change a single parameter via FHEM to avoid getting a cold house or cold water by not detecting a FHEM-malfunction, correct?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 13 August 2020, 19:04:36
Zitat von: TheTrumpeter am 13 August 2020, 17:55:35
Do you use passive cooling? Otherwise you wouldn't notice.
I used that between 2012 and 2014; but I cannot notice it anyhow now, because I keep the same "set temp" for winter and sommer
Zitat
I think besides that parameter you also use a very short filter time. Otherwise that won't happen the same day passive-cooling is released.
true
Zitat
You could switch to DHW-mode during summer to avoid any unwanted heating,
exactly what I am doing since years, directly from fhem; I also have a doif allerting me if it changes to automatic (e.g. after a blackout).
Zitat
you do not want to change a single parameter via FHEM to avoid getting a cold house or cold water by not detecting a FHEM-malfunction, correct?
Not true; I trust my code.
I change all the parameters via FHEM: I have not used the tecalor touch-control since years.
Nevertheless, I try to avoid too many writes (max 10 per week), hoping the rw-memory of my tecalor lives longer 
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 16 August 2020, 13:38:09
Hi,

I usualy use never fan stage 3, hence I modified it to have minimal input and max output.
Then It set p43UnschedVent3 to 180min

and finaly I put in a rule to sitch this on:
Zitatdefine cooling at *05:00 {if (ReadingsVal("Heizung", "AusenTemp", "") >= 17) {fhem("set Heizung p99startUnschedVent 3")}}

now effectivly only if passive cooling is not working (in hot nights) my cooling function dies the job in between of 5 and 8 A.M.
Idealy I replace the 17 with the target room Tempreature -3

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 16 August 2020, 21:41:12
Hi Heiner
your code is fine, but maybe doif is more flexible
- check for the the time between 4am and 5am
- triggers 2 times (my tecalor sometimes ignores the p99)
- if you have a [Heizung:InsideTemp] replace it like [Heizung:AusenTemp] > [Heizung:InsideTemp] - 3
you may need some brakets; not tested
- doif accepts average values  and much more


define cooling  DOIF ([4:00-05:00] and [Heizung:AusenTemp] > 17 ) (set Mythz p99startUnschedVent 3) (set Mythz p99startUnschedVent 3)
attr cooling cmdpause 7200
attr cooling devStateIcon cmd_1:vent_ventilation_level_manual_m cmd_2:vent_ventilation_control
attr cooling do always
attr cooling wait 3,30
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 18 August 2020, 07:34:21
Hi Immi,

danke fuer Dein Feedback. Beide Codeschnipsel  (at und DOIF) gehen leider noch nicht.
Der DOIF meldet aber warum:

PERL WARNING: Argument "" isn't numeric in numeric gt (>) at (eval 144079) line 1.
2020.08.18 04:10:00 3: eval: cooling2: warning in condition c01

Die erste Meldung sagt das die Aussentemperatur keine Numerische Zahl ist - ist Sie aber und auch ohne Einheit. z.B. "16.5". Erwartet fhem eventuell ein Dezimal komma statt Punkt? wie bekomme ich das geloesst?

Die zweite Meldung ist vermutlich weil in der dfefinition 2 mal der Befehl (set Mythz p99startUnschedVent 3) steht, oder?



Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 August 2020, 07:52:16
Zitat von: Heiner am 18 August 2020, 07:34:21
Erwartet fhem eventuell ein Dezimal komma statt Punkt? wie bekomme ich das geloesst?
Die zweite Meldung ist vermutlich weil in der dfefinition 2 mal der Befehl (set Mythz p99startUnschedVent 3) steht, oder?
Hi Heiner
no and no-maybe.
I do not get it now; would you mind posting your thz-cfg and a list of register "get Mythz zBackupParameters"?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 18 August 2020, 11:40:15
sure here the THZ config:
define Heizung THZ /dev/serial/by-id/usb-ftdi_usb_serial_converter_ftBNKGX5-if00-port0@115200
setuuid Heizung 5c7be3ba-f33f-b5c0-c910-ec9836b0a3b4fb7e
attr Heizung event-on-change-reading .*
attr Heizung interval_sDHW 300
attr Heizung interval_sDisplay 300
attr Heizung interval_sElectrDHWDay 86400
attr Heizung interval_sElectrHCDay 86400
attr Heizung interval_sGlobal 300
attr Heizung interval_sHC1 300
attr Heizung interval_sHeatDHWDay 86400
attr Heizung interval_sHeatHCDay 86400
attr Heizung interval_sHeatRecoveredDay 86400
attr Heizung interval_sHistory 86400
attr Heizung room Heizung
attr Heizung userReadings AussenTemp {(split ' ',ReadingsVal("Heizung","sGlobal",0))[1]},VorlaufTemp {(split ' ',ReadingsVal("Heizung","sGlobal",0))[3]}, RuecklaufTemp {(split ' ',ReadingsVal("Heizung","sGlobal",0))[5]}, WWTemp {(split ' ',ReadingsVal("Heizung","sGlobal",0))[9]}, COP {sprintf("%.2f", (ReadingsNum("Heizung","sHeatHCDay",1) + ReadingsNum("Heizung","sHeatDHWDay",1)) / (ReadingsNum("Heizung","sElectrHCDay",1) + ReadingsNum("Heizung","sElectrDHWDay",1)))}, sD_outsideTemp {(split ' ',ReadingsVal("Heizung","sHC1",0))[1]}, sD_flowTemp {(split ' ',ReadingsVal("Heizung","sHC1",0))[9]}, sD_returnTemp {(split ' ',ReadingsVal("Heizung","sHC1",0))[5]}, sD_insideTempRC {(split ' ',ReadingsVal("Heizung","sHC1",0))[27]}, sD_sFlowRate {(split ' ',ReadingsVal("Heizung","sFlowRate",0))[0]}, sD_dhw_temp {(split ' ',ReadingsVal("Heizung","sDHW",0))[1]}, sD_switchingProg {(split ' ',ReadingsVal("Heizung","sDisplay",0))[1]}, sD_compressor {(split ' ',ReadingsVal("Heizung","sDisplay",0))[3]}, sD_heatingHC {(split ' ',ReadingsVal("Heizung","sDisplay",0))[5]}, sD_heatingDHW {(split ' ',ReadingsVal("Heizung","sDisplay",0))[7]}, sD_boosterHC {(split ' ',ReadingsVal("Heizung","sDisplay",0))[9]}, sD_filterBoth {(split ' ',ReadingsVal("Heizung","sDisplay",0))[11]}, sD_ventStage {(split ' ',ReadingsVal("Heizung","sDisplay",0))[13]}, sD_pumpHC {(split ' ',ReadingsVal("Heizung","sDisplay",0))[15]}, sD_defrost {(split ' ',ReadingsVal("Heizung","sDisplay",0))[17]}, sD_filterUp {(split ' ',ReadingsVal("Heizung","sDisplay",0))[19]}, sD_filterDown {(split ' ',ReadingsVal("Heizung","sDisplay",0))[21]}, roomSetTemp {(split ' ',ReadingsVal("Heizung","sHC1",0))[21]},dhw_set_temp {(split ' ',ReadingsVal("Heizung","sDHW",0))[5]}


the list of register outcome I added, it only includes programming parameter, correct?

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 August 2020, 14:52:38
Hi Heiner
typo: you should keep the same name AusenTemp or AussenTemp 
and maybe write the hour as 04:00 not 4:00

the following script works for me

define cooling DOIF ([04:00-05:00] and [Heizung:AussenTemp] > 17 ) (set Mythz p99startUnschedVent 3) (set Mythz p99startUnschedVent 3)
attr cooling cmdpause 7200
attr cooling devStateIcon cmd_1:vent_ventilation_level_manual_m cmd_2:vent_ventilation_control
attr cooling do always
attr cooling room Heizung
attr cooling wait 3,30

you can also log everything with high verbose.

attr cooling verbose 5
define coolingLog FileLog ./log/cooling-%Y.log cooling
attr coolingLog logtype text
attr coolingLog room Heizung
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 18 August 2020, 16:01:36
oh shit, how stupid can I be....

Thanks for letting me know this typo, I will try over night and let you know tomorrow
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 19 August 2020, 06:59:46
Zitat von: Heiner am 12 August 2020, 16:23:59
but it seems the passive cooling function as such in the system, can not be adjusted to work on hot nights as well.
I have now checked if it works, it does: https://forum.fhem.de/index.php/topic,33452.msg1079209.html#msg1079209
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 19 August 2020, 20:24:54
Hi, code from Immi works,

The Trumpeter suggestion to reduce PI target temp in the moment where colling should start, and changing it back once cooling is finished would work likly as well, but you do 2 changes and if something fails, your heating might be wrongly configured and your house do not heat if needed, in that moment to remeber the rout cause is tricky.

In my way if something goes wrong, there os no cooling in hot nights, the rest is normal, that points you directly into the right direction.
I think i prefer this route and keep it as is.

Many Thanks anyhow for your support and thoughts and suggestions
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 19 August 2020, 21:32:51
Hi heiner
2 further suggestions

1) consider updating fhem and changing your userreadings; it should have better performance than your.
attr Heizung userReadings AussenTemp:sHC1.* {THZ_Val("sHC1",21)}, .....................


2) consider making an average over the day before triggering the cooling
[03:00-04:50] and [Heizung:AussenTemp] < 19  and [Heizung:AussenTemp:avg201] > 23 and [Heizung:sD_insideTempRC] > 22.5

it checks if the air outside is fresh
and
it takes the last 201 readings; makes the average and see if it was a hot day
and
it checks if tooo hot inside

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 23 August 2020, 19:08:03
Hi Immi,

thanks for the suggestion, I did update but have now the problem that the log shows:

Zitat2020.08.23 18:58:21 1: /dev/serial/by-id/usb-ftdi_usb_serial_converter_ftBNKGX5-if00-port0 disconnected, waiting to reappear (Heizung)
2020.08.23 18:58:21 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FE ->
2020.08.23 18:58:22 3: Setting Heizung serial parameters to 115200,8,N,1
2020.08.23 18:58:22 1: /dev/serial/by-id/usb-ftdi_usb_serial_converter_ftBNKGX5-if00-port0 reappeared (Heizung)
2020.08.23 19:00:01 1: /dev/serial/by-id/usb-ftdi_usb_serial_converter_ftBNKGX5-if00-port0 disconnected, waiting to reappear (Heizung)
2020.08.23 19:00:01 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1D82 ->
2020.08.23 19:00:03 3: Setting Heizung serial parameters to 115200,8,N,1
2020.08.23 19:00:03 1: /dev/serial/by-id/usb-ftdi_usb_serial_converter_ftBNKGX5-if00-port0 reappeared (Heizung)

shutdow restart  does not help, neither power off/on

I have Version 0.187 now.

Any Idea what I could do?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 23 August 2020, 23:15:02
Hi Heiner,
it should be fixed with 0.188.
you can update in 2-3 hours
as always do not forget to restart fhem after update
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 24 August 2020, 09:46:43
Hi Immi,

I installed 0.188 and reboot already twice but no effect, still no syncing....

Any idea what this could be,
could I somehow from somewhere load 0.186 again?

kind regards

Heiner
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 24 August 2020, 13:32:37
Zitat von: Heiner am 24 August 2020, 09:46:43
I installed 0.188 and reboot already twice but no effect, still no syncing....
what do you mean by no syncing?

if you still get error "Maybe too slow THZ_Get_Com: error found at step"  please try

attr Mythz simpleReadTimeout 1

in your case Mythz is Heizung
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 24 August 2020, 14:48:50
Hi Immi,
yes I mean those messages which effectively shows me not to get updated values  - hence heating is running but not "in sync" with fhem.

I add the attribute but no effect. I shutdown restart but no effect.

The latest in the log:
Zitat2020.08.24 14:44:41 1: /dev/serial/by-id/usb-ftdi_usb_serial_converter_ftBNKGX5-if00-port0 disconnected, waiting to reappear (Heizung)
2020.08.24 14:44:41 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0B1441 ->
2020.08.24 14:44:41 3: Setting Heizung serial parameters to 115200,8,N,1
2020.08.24 14:44:41 1: /dev/serial/by-id/usb-ftdi_usb_serial_converter_ftBNKGX5-if00-port0 reappeared (Heizung)

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 24 August 2020, 15:54:06
Zitat von: Heiner am 24 August 2020, 14:48:50
Hi Immi,
yes I mean those messages which effectively shows me not to get updated values  - hence heating is running but not "in sync" with fhem.
I add the attribute but no effect. I shutdown restart but no effect.
Hi Heiner
you can update to  0.189 in 2 hours.

check it over 1 day and tell me:
1) how often you get the problem for step0, step1 and step2
2) which is the register in which you have the problem ofter e.g.  0B1441
3)  please upload the log file with all errors

if you do not see an improvement (less error in 1 day), please set the attribute

attr Mythz simpleReadTimeout 2


immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 24 August 2020, 19:22:07
will try, still only V0.188.

I recognised if I do a manul Get request over various register, sometimes data are arrieving.

most of my current problems are step 0 in an about 2min cycle.

But I will wait for 0.189 and be more detailed tomorrow
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 25 August 2020, 07:58:36
Hi Immi,

after almost 12 hours I have a Feedback for you.

running 0.188 after update, no further update available
Attached the logfile which shows

342 problems @ step0 and 32 @step 2
The register impacted are ( and after the # the number of cases:
Zitat0B1460 -> #73
0A0925 -> #66
0A0611 -> #56
0B010E -> #46
D1     -> #34
0A05B8 -> #16
F3     -> #15
0A057E -> #13
0A05C4 -> #10
0A1DA1 -> #8
0A056C -> #7
0A05A2 -> #4
0A057D -> #4
0A05C2 -> #3
0B1462 -> #2
0B1461 -> #3
0A1780 -> #2
0A0924 -> #1
0A058C -> #1
0C1560 -> #1
0A0588 -> #2
0C0005 -> #1
0A1790 -> #1
FB -> #1

at 04:10 you see one special case resulting from the colling function
Zitat2020.08.25 04:10:00 3: THZ_Set: Error msg:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0180700A05DD00031003 ->
2020.08.25 04:10:00 2: cooling: set Heizung p99startUnschedVent 3: 0180700A05DD00031003---THZ_Set: Error msg:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0180700A05DD00031003 ->
2020.08.25 04:10:00 3: Setting Heizung serial parameters to 115200,8,N,1
2020.08.25 04:10:00 1: /dev/serial/by-id/usb-ftdi_usb_serial_converter_ftBNKGX5-if00-port0 reappeared (Heizung)
2020.08.25 04:10:30 2: cooling: set Heizung p99startUnschedVent 3: 3
2020.08.25 04:11:42 1: /dev/serial/by-id/usb-ftdi_usb_serial_converter_ftBNKGX5-if00-port0 disconnected, waiting to reappear (Heizung)

I will change now to:
attr Mythz simpleReadTimeout 2


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 25 August 2020, 08:31:25
hi heiner
thanks for the feedback
0.189 is available for update, nevertheless I also put it here
the simpleReadTimeout 2  needs 0.189


p.s. pay attention to attr Mythz or attr Heizung
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 25 August 2020, 10:55:20
0.189 is found now by "update all" and installed, I keep you posted....
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 25 August 2020, 13:18:15
no good. Same problem again.

Logfile of the last 2,5 hours attached. I count 66 step 0 problems and 14 step 2 problems

with 0.189 and shutdown restart afterwards
and with attr Heizung simpleReadTimeout 2



Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 25 August 2020, 15:07:02
Hi Heiner
i focused in the timing of the comunication,
last idea: change line 1507 to
select(undef, undef, undef, 0.1);
you can change it from 0.002 to 0.5


maybe it is too hot or I am losing the big picture :)
The main problem is probably that your usbserial disconnects:
0) are you usung windows?
1) how well are soldered the cables?
check cable/cable connections /adapters/
2) When was the last time you made an update?
fhem makes a restore directory before an update.
you can see all vesioning https://github.com/fhem/fhem-mirror/tree/master/fhem/FHEM
here is the history of changes for https://github.com/fhem/fhem-mirror/commits/master/fhem/FHEM/00_THZ.pm
--> you can download older versions
DEVIO changed in the last 4 monthes a lot; I do not know if it has sideeffects to your system
https://github.com/fhem/fhem-mirror/commits/master/fhem/FHEM/DevIo.pm



Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 25 August 2020, 16:35:24
Hi Immi,

I changed it from 0.02 to 0.5 (no clue why it is not on 0.1 as you indicated)
then shutdown restart and.... the problem is a little different now not it is @ step1 !!!

0) fhem is running on a BananaPi with Armbian and Debian 10, and I built it relative new may be 1 month back
2) last update must have been only some weeks back. I think it was with THZ Version 0.184   
    I found a backup from 12th August and there that Version shows in the relevant row the value 0.025

thanks for the hint on where to find older Versions, I found the restore folder from fhem, it has 3 updates only 23-24-25 of August. 23 with no THZ.pm, 24 the THZ file is corrupt and full of NULL and 25th is already with Version 0.188 which caused some trouble for me.

I can try to get 0.184 again to work, but prefer that the actual Version works as well. I hope this move to step 1 rings any bell for you?

I will check soldering....
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 26 August 2020, 11:21:39
Zitat von: Heiner am 25 August 2020, 16:35:24
then shutdown restart and.... the problem is a little different now not it is @ step1 !!!
this is a very good hint; I think I got it now; sorry it took so long
i uploaded 0.190
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Heiner am 26 August 2020, 14:45:47
Hi Immi,

perfect. Installed reboot, all values read by fhem no log entry. If it stays like it perfect.

shall I now remove the attr SimpleReadTimeout which is set to 2 still?

Really great that you made it.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 26 August 2020, 15:25:08
Zitat von: Heiner am 26 August 2020, 14:45:47
shall I now remove the attr SimpleReadTimeout which is set to 2 still?
yes remove it.
if you still see something strange in the next days, put it to 1; Two seconds  delay should never happen in your tecalor.
please give me a feedback about that in some days
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: börni am 26 August 2020, 19:23:30
Hello @ll,

I've problems with fhem since my last update fhem and perl - I'm using loxberry.


2020.08.26 12:55:56 1: PERL WARNING: Use of uninitialized value $err in concatenation (.) or string at ./FHEM/00_THZ.pm line 1064.
2020.08.26 12:55:56 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/00_THZ.pm line 1064.


If I change some of the parameters - e.g. p04DHWsetTempDay -> I'm getting this error message:

msg THZ_Set: error reading register: 'THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0'


I'm not sure where the problem comes from - is that the right forum here for my problem?

Thanks
Fabian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 26 August 2020, 22:41:14
hi fabian
can you please check if you have the last version 0.190?
the file is shared below;
it is automatically updated always 12h-24h  after my upload
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: börni am 26 August 2020, 23:10:59
Hello Immi,

currently it's 0.189 - is that a issue which is solved in 0.190?

Thanks
Fabian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 26 August 2020, 23:29:58
try 0.190
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: börni am 27 August 2020, 08:28:32
This morning came the update to 0.190 - the problem changed and isn't solved unfortunately:


0180A517006400640064012C012C0064010000015E01C2001003---THZ_Set: Error msg:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step2 -- 0180A517006400640064012C012C0064010000015E01C2001003 ->


I'm wondering about the message because it looks like that the Interface isn't working properly - but it has worked before the updates ?! :(
Do you have an idea?

The readings are working - I see all the values. It seems if I'd change something by the parameters that this will not go through the line :(
My Version is 2.06

If I try to "set" the value two or three times after and after the failure message changes:

msg THZ_Set: error reading register: 'THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0 '


and after the fourth or fifth try the value is transmitted. - I can find out if I use the get function.

Thanks
Fabian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 27 August 2020, 08:47:19
Hi florian,
happy you see an improvement.
if you have the old 2.06, it makes sense

use
attr Mythz simpleReadTimeout 1


and if still happens

attr Mythz simpleReadTimeout 2


immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: börni am 27 August 2020, 08:53:57
Hello immi,

still the same situation ...
Any idea?

Thanks
Fabian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 27 August 2020, 09:15:31
please use with 0.190 and attr Mythz simpleReadTimeout 2
would you mind posting your complete log  error file (like heiner)

9-10 hours of logs and  I can have a look this night
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: börni am 27 August 2020, 12:18:32
Hello immi,

It looks that there are some improvements  :D

But still some messages/warnings in the log file:


2020.08.27 11:28:10 1: PERL WARNING: Use of uninitialized value $parts[1] in hash element at ./FHEM/95_Dashboard.pm line 754.
2020.08.27 11:28:10 1: PERL WARNING: Use of uninitialized value $groupname in hash element at ./FHEM/95_Dashboard.pm line 775.
2020.08.27 11:29:44 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1427.
2020.08.27 11:29:44 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1455.
2020.08.27 11:29:46 1: PERL WARNING: Use of uninitialized value $err in concatenation (.) or string at ./FHEM/00_THZ.pm line 1064.
2020.08.27 11:29:46 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/00_THZ.pm line 1064.


Currently I don't see a need for sending you a complete log-file. If you would like to have I will sent it anyway.

Thanks and best Regards
Fabian
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 27 August 2020, 14:18:26
Zitat von: börni am 27 August 2020, 12:18:32
Hello immi,
It looks that there are some improvements  :D
But still some messages/warnings in the log file:
Currently I don't see a need for sending you a complete log-file. If you would like to have I will sent it anyway.
Thanks and best Regards
Fabian
Hi Fabian
happy version 0.190 works without errors also for your old 2.06.
did the errors stop with simpleReadTimeout 1 or simpleReadTimeout 2 or withot the attribute?

p.s. concerning the warnings of 95_Dashboard.pm you have to ask DS_Starter   in  Frontends
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Stonemuc am 06 September 2020, 20:31:02
sHC1 x72 is the dhwTemp
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 08 September 2020, 21:30:40
Zitat von: Stonemuc am 06 September 2020, 20:31:02
sHC1 x72 is the dhwTemp
Not for me:
sDHW: dhwTemp: 32 outsideTemp: 14 dhwSetTemp: 39 compBlockTime: 0 out: 0000 heatBlockTime: 0 dhwBoosterStage: 0 pasteurisationMode: 0 dhwOpMode: setback x36: 496C
sHC1: outsideTemp: 13.9 x08: 31.5 returnTemp: 23.9 integralHeat: 170 flowTemp: 26.4 heatSetTemp: 8 heatTemp: 24.6 seasonMode: summer integralSwitch: 220 hcOpMode: setback roomSetTemp: 22.3 x60: 0 x64: 691.2 insideTempRC: 24.2 x72: 51.2 x76: 2.7 onHysteresisNo: 0 offHysteresisNo: 1 hcBoosterStage: 0
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Stonemuc am 08 September 2020, 22:00:09
Zitat von: TheTrumpeter am 08 September 2020, 21:30:40
Not for me:
sDHW: dhwTemp: 32 outsideTemp: 14 dhwSetTemp: 39 compBlockTime: 0 out: 0000 heatBlockTime: 0 dhwBoosterStage: 0 pasteurisationMode: 0 dhwOpMode: setback x36: 496C
sHC1: outsideTemp: 13.9 x08: 31.5 returnTemp: 23.9 integralHeat: 170 flowTemp: 26.4 heatSetTemp: 8 heatTemp: 24.6 seasonMode: summer integralSwitch: 220 hcOpMode: setback roomSetTemp: 22.3 x60: 0 x64: 691.2 insideTempRC: 24.2 x72: 51.2 x76: 2.7 onHysteresisNo: 0 offHysteresisNo: 1 hcBoosterStage: 0

Du scheinst doch Recht zu haben. Das war wohl zwei Tage lang nur Zufall...jetzt passt es bei mir auch nicht mehr..
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 08 September 2020, 22:03:36
Zitat von: TheTrumpeter am 10 August 2020, 12:20:09
So I will continue with my "abstraction layer"; I've already started to define the message-names.
Does anybody know a good dictionary for technical abbreviations? Then I would define the message-names based on that; otherwise I will reuse something that was not intended to be used for heatpumps.
As I have not yet proceeded in defining the unified message-names, I'll just post the rest of the code.
It seems to work, if you find bugs just post it.

Call it via THZ_SplitReadings(a, b, c, d)
a is the name of your THZ-device in FHEM, e.g. Mythz
b is the suffix for your dummy-device where the messages will be posted in, e.g. when b is given as "Dummy" you need a dummy-device "MythzDummy" defined where the messages will be posted into. If you just give "", it should post the messages directly into the THZ-device, but I have not tested that.
c is the reading
d could be set to 0, then it will not generate "unified message names" but just take the definition out of the reading itself, e.g. "outsideTemp", "returnTemp" and so on. If you set it to 1, then it would take the "unified message names" that are not fully defined yet. It's almost done for sGlobal, sHC1 has dummy-definitions for testing purpose. All the others are still pending. If you set it to 1 it will only generate the messages for these two readings, but they might change in future versions.

In your dummy-device (e.g. MythzDummy or your THZ-device itself if you leave parameter b as "") you have to define readings for each of the THZ-readings you want to split with prefix "xMsgConfig_", e.g. "xMsgConfig_sGlobal". You have to give a 1 for each message you want to generate and a 0 for each message you're not interested in. E.g. "setreading MythzDummy xMsgConfig_sHC1 1011101111100100000" would config "outsideTemp", "returnTemp", "integralHeat", "flowTemp", ... but would not generate "x08". Just look at your readings from the left and give a 1 for the ones you want to generate and a 0 for the ones you want to skip.

Working example:
define MythzDummy as dummy
attr MythzDummy event-on-change-reading .*
attr MythzDummy event-on-update-reading $

setreading MythzDummy xMsgConfig_sGlobal 1110000000001101111000000011111111011110010111
setreading MythzDummy xMsgConfig_sHC1 1011101111100100000


Call it from a notify:
If you want the "unified message names" (not fully defined, see above):
define MythzDummy_notify notify Mythz:s.*:.* {THZ_SplitReadings($NAME,"Dummy",$EVENT,1)}
Or without the "unified message names":
define MythzDummy_notify notify Mythz:s.*:.* {THZ_SplitReadings($NAME,"Dummy",$EVENT,0)}


And here's the subroutine, just put it in any of your 99_*.pm modules or create a new one.
sub THZ_SplitReadings ($$$$)
{
use feature "switch";

my ($Device, $Suffix, $Event, $UnifiedMsgNames) = @_;


my $Device_dmy = $Device.$Suffix;
my @Reading = split(' ', $Event);
chop($Reading[0]); #cut ":" after the name of the event
my $ConfigAttributeName = "xMsgConfig_".$Reading[0];
my $ConfigAttribute = ReadingsNum ("$Device_dmy", "$ConfigAttributeName", "");

if (substr($Reading[0], 0, 1) eq "s")
{
fhem ("setreading $Device_dmy $Reading[0] $Event");
}

if ($UnifiedMsgNames)
{
my @sGlobalMsgNames = ( "AmbAir_t", #OutsideTemp
"HtPmpWtrDsHC1_t", #FlowTempHC1
"HtPmpWtrUsHC1_t", #ReturnTempHC
"HtPmpHotGas_t", #HotgasTemp
"HtPmpDHW_t", #DHWTemp
"HtPmpWtrDsHC2_t", #FlowTempHC2
"HtPmpEvapr_t", #EvaporatorTemp
"HtPmpCndsr_t", #CondensorTemp
"HtPmpMxrOpen_st", #MixerOpen
"HtPmpMxrClsd_st", #MixerClosed
"HtPmpHtPipeVlv_st", #HeatPipeValve
"HtPmpDvtrVlv_st", #DiverterValve
"HtPmpDHWPmp_st", #DHWPump
"HtPmpHC1Pmp_st", #HC1Pump
"HtPmpSlrPmp_st", #SolarPump
"HtPmpCmpr_st", #Compressor
"HtPmpBstr3_st", #BoosterStage3
"HtPmpBstr2_st", #BoosterStage2
"HtPmpBstr1_st", #BoosterStage1
"HtPmpHiPSnsr_st", #HighPressureSensor
"HtPmpLoPSnsr_st", #LowPressureSensor
"HtPmpEvapIce_st", #EvaporatorIceMonitor
"HtPmpSgnlAnode_st", #SignalAnode
"HtPmpEVURels_st", #EVURelease
"HtPmpOvenFrplce_st", #OvenFireplace
"HtPmpSTB_st", #STB
"VentOutFanPwr_perc", #OutputFanPower
"VentInFanPwr_perc", #InputFanPower
"HtPmpMainFanPwr_perc", #MainFanPower
"VentOutFanSpd_n", #OutputFanSpeed
"VentInFanSpd_n", #InputFanSpeed
"HtPmpMainFanSpd_n", #MainFanSpeed
"AmbAirFild_t", #OutsideTempFlt
"InsdAirHum_perc", #RelHumidity
"InsdDew_t", #DewPoint
"msgPressure_LP", #
"msgPressure_HP", #
"HtPmpPwrActTherm_pwr", #PowerAct_Qc
"HtPmpPwrActElt_pwr", #PowerAct_Qel
"HtPmpCll_t", #CollectorTemp
"InsdAir_t", #InsideTemp
"VentWinOpn_st", #WindowOpen
"VentQuickVent_st", #QuickAirVent
"HtPmpFlowRate", #FlowRate
"HtPmpWtr_p", #PressureHC1
"VentOutAirHum_perc"); #HumidityAirOut

my @sHC1MsgNames = ( "AmbAir_t", #OutsideTemp
"HC1X08",
"HtPmpWtrUsHC1_t", #ReturnTempHC
"msgIntegralHeatHC1", #IntegralHeatHC1
"msgFlowTempHC1", #FlowTempHC1
"msgHeatSetTempHC1", #HeatSetTempHC1
"msgHeatTempHC1", #HeatTempHC1
"msgSeasonModeHC1", #SeasonModeHC1
"msgIntegralSwitchHC1", #IntegralSwitchHC1
"msgOpModeHC1", #OpModeHC1
"msgRoomSetTempHC1", #RoomSetTempHC1
"HC1X60",
"HC1X64",
"msgInsideTempRC", #InsideTempRC
"HC1X72",
"HC1X76",
"msgOnHysteresisNoHC1", #OnHysteresisNoHC1
"msgOffHysteresisNoHC1", #OffHysteresisNoHC1
"msgHCBoosterStageHC1"); #HCBoosterStageHC1

my @ReadingNames = ();
given($Reading[0])
{
when ("sGlobal") {@ReadingNames = @sGlobalMsgNames;}
when ("sHC1") {@ReadingNames = @sHC1MsgNames;}
default {}
}

for (my $i = 0; $i <= @ReadingNames; $i++)
{
if (substr($ConfigAttribute, $i, 1))
{
fhem ("setreading $Device_dmy $ReadingNames[$i] $Reading[$i*2+2]");
}
}
}
else
{
for (my $i = 0; $i <= @Reading/2 - 1; $i++)
{
if (substr($ConfigAttribute, $i, 1))
{
chop($Reading[$i*2+1]);
fhem ("setreading $Device_dmy $Reading[$i*2+1] $Reading[$i*2+2]");
}
}
}
}
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 08 September 2020, 22:05:43
Zitat von: Stonemuc am 08 September 2020, 22:00:09
Schau mal in's Timestamp deiner readings...ich glaube deine sDHW Werte stammen vermutlich von der Zeit vor der Erhitzung. Bei mir ist der sDHW Wert aktuell auch von heute morgen und der sHC1 von gerade eben...
Wenn ich beide aktualisiere mit get...sind beide Werte gleich.
Nein, die vorhin geposteten Readings waren/sind aktuell. Abgesehen davon, 51,2°C erreicht mein Speicher nie, die Parameter sind so gesetzt, dass bei 46,5°C Schluss ist.
Ich habe vorhin auch gegrept, x72 war den ganzen September über "31.5", obwohl sHC1 alle 5min ausgelesen wird.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 10 September 2020, 22:57:50
Zitat von: TheTrumpeter am 08 September 2020, 22:03:36
As I have not yet proceeded in defining the unified message-names, I'll just post the rest of the code.
nice solution: it will give more choice to the users;
see other possibilities
inside the module

attr Mythz userReadings userReadings msgFlowTempHC1:sHC1.* {THZ_Val("sHC1","flowTemp")}, AmbAir_t:sGlobal.* {THZ_Val("sGlobal","outsideTemp")}


or if you prefer an external doif


define DummyTHZ DOIF
attr DummyTHZ event_Readings                                   \
HC1msgFlowTemp:[Mythz:sHC1:[flowTemp. (-?\d+(\.\d+)?)]],       \
HC1returnTemp:[Mythz:sHC1:[returnTemp. (-?\d+(\.\d+)?)]],      \
HC1insideTempRC:[Mythz:sHC1:[insideTempRC. (-?\d+(\.\d+)?)]],  \
HC1outsideTemp:[Mythz:sHC1:[outsideTemp. (-?\d+(\.\d+)?)]],    \
GLOoutsideTemp:[Mythz:sGlobal:[outsideTemp. (-?\d+(\.\d+)?)]], \
GLOdhwTemp:[Mythz:sGlobal:[dhwTemp. (-?\d+(\.\d+)?)]]


or another external doif


define DummyTHZ DOIF ([Mythz:sHC1]) (                                               \
  setreading DummyTHZ     HC1msgFlowTemp     {(THZ_Val("sHC1","flowTemp"))},        \
  setreading DummyTHZ     HC1returnTemp      {(THZ_Val("sHC1","returnTemp"))},      \
  setreading DummyTHZ     HC1insideTempRC    {(THZ_Val("sHC1","insideTempRC"))},    \
  setreading DummyTHZ     HC1outsideTemp     {(THZ_Val("sHC1","outsideTemp"))}      \
)                                                                                   \
DOELSEIF ([Mythz:sGlobal]) (                                                        \
  setreading DummyTHZ     GLOoutsideTemp     {(THZ_Val("sGlobal","outsideTemp"))},  \
  setreading DummyTHZ     GLOdhwTemp         {(THZ_Val("sGlobal","dhwTemp"))}       \
)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: derhobbit am 01 November 2020, 19:05:00
Hallo miteinander,
folgendes Thema habe ich viele Seiten vorher mal in diesem Thread entdeckt:

Die Heizpumpe häufig läuft durch wenn Freigabe Solar (p80) auf EIN steht.
Bei meiner LWZ303 Sol passiert das ebenfalls. Firmware: 4.19

Hat jemand vielleicht mal die Ursache des Problems entdeckt?
Mir scheint, dass die Anlage versucht in Stufe 1 zu heizen, das bedeutet dann aber "Solar heizen". Wenn's im Kollektor dann nicht warm ist, läuft halt nur die Heizpumpe bis (dank Integral) die Heizstufe 2 erreicht ist.
Die Steuerung sollte (meiner Meinung nach) erkennen dass Stufe 1 übersprungen werden müsste  >:(

Falls das nicht über sonstige Einstellungen zu ändern ist, würde ich gerne den Parameter "Freigabe Solar" nach der Kollektor-Temperatur steuern. Die Implementierung ermöglicht das leider nur für ältere Versionen.
Mein Versuch das auf V4.19 zu portieren ist kläglich gescheitert, da ich den Befehl bzw. die Adresse nicht kenne ??? ::).

Hoffe hier kann mir jemand aushelfen und die Adresse nennen :) ?

Danke schon mal
derHobbit
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 03 November 2020, 08:21:00
Hi derHobbit
if you find out P80 register address for newer firmware, I will implement it.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: derhobbit am 03 November 2020, 11:44:33
Hi immi,
I like to find the register address, but don't know how.
Any hints for me?
Is there some command to read all registers and maybe find which one changes after manual changing?
derHobbit
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 03 November 2020, 18:37:12
Zitat von: derhobbit am 03 November 2020, 11:44:33
Is there some command to read all registers and maybe find which one changes after manual changing?
yes
https://forum.fhem.de/index.php/topic,33211.msg1063241/topicseen.html#msg1063241
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: LeJoke am 13 November 2020, 10:21:04
values in sHC1

I have just seen, that there was some discussion lately on the (x72) value(s) in sHC1.
Perhaps the following observations is helpful for someone to make more meaning out of it

*) I believe x72 actually contains two different values. With a Remote Control attached to HC1 value is mostly 51,2 (hex/raw 0200) and without remote control mostly 0,0 (hex/raw 0000).
The two right digits will contain values after a HC heating via compressor starts, that decrease over the time of approx 30-45 min to 51,2 or 0 again
-> see screenshot attached

*) x80: this has for me mostly a constant value 49. When the thz defrosts I can see a small peak (not all peaks visible likely due to the fact that I have 5 min logging only). Due to some maintainance I booster was active yesterday and x80 jumped to 113

Regards
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: LeJoke am 13 November 2020, 11:09:48
sGlobal additonal / alternate values

I think further readings in sGlobal relate to the values listed below (LWZ 304  Integral SW 5.09). Not sure if this has any practical use ... no need to change code from my side:




[" dewPoint: ",          82, 4, "hex2int", 10], # RelHumidity HK2 (when Bedienteil associated with HC2)

## LeJoke trial additons +++++++++++++++++++
        [" x44b2: ",          44, 1, "bit2", 1], # 0 / 1 - 1 when Pumpe HC is on (heat or no heat; 0 when DHW heating)
        [" x46b3: ",          46, 1, "bit3", 1], # would follow booster 3 - 2 - 1 -> solar active ? # have no Sol Model ...
        [" x47b0: ",          47, 1, "bit0", 1], # ?? Kondensatpumpe X18-3 oder ??? defrost end ?? 2020-05-18_18:12:58 on for approx 1 hour during maintainance
        [" x47b1: ",          47, 1, "bit1", 1], # ?? Lüftung Nacht X18-2 ??? # Signal out ? -> Starts w/ "Windows open" signal when additonally "Passivkühlung Fortluft" is set (mainventilator is on w/o compressor)
        [" x118: ",         118, 4, "hex2int", 10], # Öffnung ExV - Analyse - values 0 when no compressor approx. 20% - 40% // 100% when defrost ?
        [" x122: ",         122, 4, "raw", 1], # sometimes 300000000  ...
        [" x126: ",         126, 4, "hex2int", 10], # board xx sensor B12 - WP return
        [" x130: ",         130, 4, "hex2int", 10], # board xx sensor B11 WP flow ?
        [" x134: ",         134, 4, "hex2int", 10], # ? board xx sensor Bxx - !Prozesswerte - Kühlungstemperatur
        [" x138: ",         138, 4, "hex2int", 10], # board xx sensor B08 Wärmepumpe - Verdampferausgang ?
        [" x142: ",         142, 4, "hex2int", 10], # ?? board xx sensor B14 - Condensor out ?
        [" x146: ",         146, 4, "raw", 1], # always 0 for me
        [" x150: ",         150, 4, "raw", 1], #board X4-10 sensor S4 Float switch, bottom panel- Schwimmer Bodenblech = 1


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: LeJoke am 13 November 2020, 11:19:35
additional commands. Perhaps usable for someone





command          Description                                                                                example response
0A   05   7C   Ofen / Kamin (0=Aus ... 4= Öffner - Überwachung)   
0A   05   7D   LLWT_MaxTimeDefrost (min)                                         
0A   05   7E   LLWT_Abtaubeginnschwelle                                              
0A   05   7F   LLWT_DrehzahlFilter (%)                                                   
F6                   unkown & Man Vent stage (3)  & RemainTime of manvent (8 min)   00001000030008


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: derhobbit am 15 November 2020, 20:33:00
Register P80 "Freigabe Solar" - I think I found the register.

Pretty sure, it is register 0A03C1

It took me a while to figure out how to read large numbers of registers ... but finally I understood some pearl  :)
Would be cool if you could implement it eventually, immi
Regards

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 16 November 2020, 01:19:11
thanks LeJoke and DerHobbit for your hints.

I coded the following and committed v 0.191 (as always available tomorrow)

+  "p80EnableSolar"              => {cmd2=>"0A03C1", argMin =>  "0",  argMax =>   "1",    type =>"1clean",  unit =>""},

let me know if you see further improvements
@LeJOke 0A057C- 0A057F were already implemented
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 29 November 2020, 23:28:10
Hi immi,

bug or feature?:

set attr interval_sFan
isn't available in pull down menu, so I can't set it to frequent update.

sFirmware  version: 04.19
THZ module VERSION 0.190
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: derhobbit am 30 November 2020, 18:31:09
Hi immi,
P80 works perfectly for me!
1000 thanks!

derHobbit
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 30 November 2020, 23:58:15
Zitat von: willybauss am 29 November 2020, 23:28:10
set attr interval_sFan
isn't available in pull down menu, so I can't set it to frequent update.
hi willy
implemented an uploaded in 0.192

I also implemented a small delay at startup untill fhem init is finished
if I did it correctly you should not notice :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 01 Dezember 2020, 07:57:28
Thanks a lot! I'll update and test.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: LeJoke am 01 Dezember 2020, 15:07:07
hi,

I recently upgraded my hardware from AVM7170 to Raspberry PI 4 (and at the same time upgraded 00_THZ.pm from v 0.180 to v0.190/192)
I just now noticed, that since the upgrade I am "loosing" approx. 20% of the sGlobal FB responses.

firmware is set to 5.39. I saw in the code something like adding an additional delay for 4.39, so I set simpleReadTimeout to 2, but no visible improvement ...

Any idea or suggestion what else I could change (non-blocking ... ?)

fhem log shows:

2020.12.01 12:04:53 3: Opening Mythz device /dev/ttyUSB1
2020.12.01 12:04:53 3: Setting Mythz serial parameters to 115200,8,N,1
2020.12.01 12:04:53 3: Mythz device opened
..-
2020.12.01 12:04:54 0: Featurelevel: 6
2020.12.01 12:04:54 0: Server started with 27 defined entities (fhem.pl:23205/2020-11-21 perl:5.028001 os:linux user:fhem pid:8434)
...
2020.12.01 13:40:04 3: THZ_Get: Error msg2:  THZ_ReadAnswer: Interface max repeat limited to 60  THZ_Get_Com: error found at step2 -- FB -> 0100F3FBFDA80058014E011C02C101C9FDA80102000E01396008310190019002580011001A001100560000018E01A8055F45CA630E3FFAD0E606250083011A000001180154006C005301
2020.12.01 13:40:04 1: PERL WARNING: Use of uninitialized value $err in concatenation (.) or string at ./FHEM/00_THZ.pm line 1090.
2020.12.01 13:40:04 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/00_THZ.pm line 1090.
2020.12.01 13:40:04 3: Mythz/RAW: 2F000000000D2C1003 -  -
2020.12.01 13:55:04 3: THZ_Get: Error msg2:  THZ_ReadAnswer: Interface max repeat limited to 60  THZ_Get_Com: error found at step2 -- FB -> 010087FBFDA800590158012702B801CBFDA80102001301436008310190019002580012001A001100560000018A01B4058845C672444001062506590083011D00000124015C00430029013C0000
2020.12.01 13:55:04 3: Mythz/RAW: 2F000000000D2C100300000CAE1003 -  -
2020.12.01 14:15:05 3: THZ_Get: Error msg2:  THZ_ReadAnswer: Interface max repeat limited to 60  THZ_Get_Com: error found at step2 -- FB -> 010005FBFDA8005B015D012C02B801CBFDA80102001501486008310190019002580011001A001100580000018901B6059945D074274001F3B7068D0083011D0000012801610047002B1801
2020.12.01 14:15:05 3: Mythz/RAW: 2F000000000D2C100300000CAE100341000000000C501003 -  -

Apprx. 80% of readings are successfull and look like this
(i added -already in 7170- for trial some parsing definitions):

sGlobal
outsideTemp: 9.1 flowTemp: 34.9 returnTemp: 30.2 hotGasTemp: 69.8 dhwTemp: 45.9 flowTempHC2: -60 evaporatorTemp: 2.1 condenserTemp: 32.9 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: 1 evaporatorIceMonitor: 0 signalAnode: 0 evuRelease: 1 ovenFireplace: 1 STB: 0 outputVentilatorPower: 40 inputVentilatorPower: 40 mainVentilatorPower: 60 outputVentilatorSpeed: 18 inputVentilatorSpeed: 26 mainVentilatorSpeed: 17 outside_tempFiltered: 8.8 relHumidity: 0 dewPoint: 39.2 P_Nd: 4.4 P_Hd: 14.36 actualPower_Qc: 6553.492 actualPower_Pel: 2.038 collectorTemp: -60 insideTemp: 25.8 x44b2: 1 x46b3: 0 x47b0: 0 x47b1: 0 windowOpen: 0 quickAirVentTrig: 0 flowRate: 16.77 p_HCw: 1.31 x118: 28.4 x122: 0000 x126: 29.8 x130: 35.4 x134: 7.1 x138: 4.3 x142: 32.2 x146: 0000 x150: 0000 humidityAirOut: 31.21


thanks ...
   
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 01 Dezember 2020, 15:42:17
Zitat von: LeJoke am 01 Dezember 2020, 15:07:07
firmware is set to 5.39. I saw in the code something like adding an additional delay for 4.39, so I set simpleReadTimeout to 2, but no visible improvement ...
Hi LeJoke
exactly the opposite:  raspi4 is faster than expected
can you change line 1546 of 00_THZ.pm? (remember to restart after the change)
from
$count =1; $countmax = 60;
to
$count =1; $countmax = 120;

please tell me, if this fixed your issue
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 01 Dezember 2020, 21:25:17
Zitat von: immi am 30 November 2020, 23:58:15
hi willy
implemented an uploaded in 0.192

I also implemented a small delay at startup untill fhem init is finished
if I did it correctly you should not notice :)
Works as expected, thanks!
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: LeJoke am 02 Dezember 2020, 13:52:58
Zitat von: immi am 01 Dezember 2020, 15:42:17
Hi LeJoke
exactly the opposite:  raspi4 is faster than expected
can you change line 1546 of 00_THZ.pm? (remember to restart after the change)
from
$count =1; $countmax = 60;
to
$count =1; $countmax = 120;

please tell me, if this fixed your issue
immi

hi,
fixed.
code change implemented as suggested (and attrib "simpleReadTimeout" removed)
=> raspi 4 is now running smooth for 20+h without the error "Interface max repeat limited ..." showing up again.

Thanks,
Claus
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 03 Dezember 2020, 00:00:43
ok Claus
I uploaded your fix in version 0.193
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: masl am 03 Februar 2021, 23:40:27
Hallo.

Ich hoffe es kann irgendjemand weiterhelfen.
Die LWZ 303 habe ich versucht nach der Anleitung aus dem Wiki über den 3-poligen-Stecker anzubinden.
Ich habe mich an diese Anleitung https://robert.penz.name/heat-pump-lwz/ (https://robert.penz.name/heat-pump-lwz/) bezüglich dem Stecker gehalten.
So wie ich das dort verstehe wurde der RX und TX getauscht. Schlussendlich dann so: oben: GND / mitte: TX / unten: RX.
Der Stecker hängt an einem USB RS232 Converter (wurde aber auch schon gegen einen anderen getauscht, um ein Hardwarefehler auszuschließen).
Per Ser2Net geht es an den FHEM-Raspberry unter folgenden Einstellungen:

2003:raw:500:/dev/ttyUSB0:115200 NONE 1STOPBIT 8DATABITS


Im FHEM Raspi wurde dann folgendes definiert:
define Mythz THZ 192.168.0.111:2003
    attr Mythz interval_sGlobal 300
    attr Mythz interval_sHistory 28800
    attr Mythz interval_sLast10errors 120


Das Modul geht auch auf "opened". Allerdings kommt es dann zur Fehlermeldung:
z_Last_fhem_err THZ_Get: Error msg2: THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0 -- 0A1D52 ->
Auch das Log schreibt nicht viel...
2021.02.03 23:21:08 3: Opening Mythz device 192.168.0.111:2003
2021.02.03 23:21:08 3: Mythz device opened
2021.02.03 23:21:08 5: thzversion = 0.193
2021.02.03 23:22:13 5: THZ_Get: Try to get 'programFan_Fr_2'
2021.02.03 23:22:13 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2021.02.03 23:22:13 5: Mythz sending 02
2021.02.03 23:22:13 5: SW: 02
2021.02.03 23:22:13 5: Mythz start Function THZ_ReadAnswer
2021.02.03 23:22:15 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A1$
2


Es wurde schon versucht mit der Bautrade auf 9600 zu gehen, aber ohne Erfolg.
Auch ein attr Mythz simpleReadTimeout 2 bzw attr Mythz simpleReadTimeout 1 half nicht.

Woran könnten das Problem liegen. Der Fehler kommt bei 2 verschiedenen Converter und bei einem usr tcp232-302.
Muss die Wärmepumpe irgendwie freigeschaltet werden?
oder ist es auch möglich die WP mit dem USB irgendwie an den Raspi zu bekommen (5 Meter Kabel Länge)...


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: LeJoke am 04 Februar 2021, 00:17:21
Bei mir sitzt die Buchse kopfüber ... d.h. schwarzes Kabel oben ( bei Roberts Bild ist gelb oben )
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 04 Februar 2021, 08:38:23
Erst mal an die dort genannten Pinnummern halten.
ZitatSub-D9 Pin 2 with Mate-N-Lok Pin 1
Sub-D9 Pin 3 with Mate-N-Lok Pin 2
Sub-D9 Pin 5 with Mate-N-Lok Pin 3
Was dann nach oben oder unten kommt sollte egal sein.

Ansonsten würde ich zur Einkreisung des Fehlers erst mal so einfach wie möglich beginnen, d.h. den Raspi direkt an die THZ hängen. Erst wenn das klappt mit Ser2Net das funktionierende System erweitern.
Auch erst mal die Kabellänge so weit wie irgendwie möglich reduzieren und die eingestellte Firmware (Attribut "firmware") prüfen. Bei mir (ebenfalls 303) ist das Attribut nicht gesetzt, also Defalut.

ZitatInterfaceNotRespondig. Maybe too slow ...
klingt nach zu langsamer Antwort, also der ganze Datenpfad hin und zurück insgesamt zu lang. Deshalb die o.g. Tipps.

Wie alt ist denn die 303? Ich glaube da gab es verschiedene Baudraten. Die mit dem IPod-Display hat auf jeden Fall 115k. Ist es eine Stiebel Eltron oder Tecalor? Technisch sind sie identisch, aber nur die SE hatte das genannte IPod.Display mit dem "Wählrad". Die Tec-Variante hatte 4 Tasten. Bei einem ganz frühen Modell musst Du evtl. eine kleinere firmware im Attribut einstellen (2.?? oder sowas).

Wenn man das Blech abschraubt, wo der Stecker eingebaut ist, dann ist dahinter die Steuerungsplatine. Darauf soll angeblich ein USB-Stecker sein, den Manche schon erfolgreich verwendet haben.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: airfish am 05 Februar 2021, 17:47:34
Den internen USB Stecker benutze ich jetzt auch, bzw die interne Seitenwand f. Raspi,4 SSD + Netzteil und zusätzliches CAN-BUS Interface + Überwachung der Steuerungsraumtemperatur mit THT22 Sensor.
Alles mehr oder weniger aufgräumt dort. (Siehe Bild)
Mit CAN-BUS komm ich aber gerade nicht zum rumspielen.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: MSP am 11 Februar 2021, 14:36:56
Dear all,

is there any way to start solar pump of my LWZ403 manually via FHEM, similar to existing function for DHW and HC pump (zPumpDHW/zPumpHC) ?
As these pumps stops automatically after few seconds, I assume for safety reasons, it would be good to have a chance to retrigger them automatically for several intervals.

And as 2nd question, is there  a way to restart the THZ controls via FHEM, similar like to push the button inside the HP manually ?

Any ideas, let me know.

Thanks&Regards
Markus
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 11 Februar 2021, 18:33:05
Zitat von: MSP am 11 Februar 2021, 14:36:56
Dear all,
is there any way to start solar pump of my LWZ403 manually via FHEM, similar to existing function for DHW and HC pump (zPumpDHW/zPumpHC) ?
very likely, you just have to find the right register
Zitat
As these pumps stops automatically after few seconds, I assume for safety reasons, it would be good to have a chance to retrigger them automatically for several intervals.
Probably it is for safety;
if you know what you are doing, you can repeat it 4 times waiting 60s
define a60seconds at +*{4}00:00:59 set Mythz PumpHC 1

Zitat
And as 2nd question, is there  a way to restart the THZ controls via FHEM, similar like to push the button inside the HP manually ?
very likely, you just have to find the right register

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: masl am 15 Februar 2021, 10:57:28
Es war tatsächlich so, dass die Abbildung nicht gestimmt hat. Der Stecker war falsch rum.
Nun geht es...
Allerdings komme ich mit dem sGlobal nicht weiter. Habe nach dem Wiki versucht dieses auszulesen, aber es zeigt keine Werte an.

userReadings

AussenTemp:sGlobal {(split ' ',ReadingsVal("Mythz","sGlobal",0))[1]}, VorlaufTemp:sGlobal {(split ' ',ReadingsVal("Mythz","sGlobal",0))[3]}, RuecklaufTemp:sGlobal {(split ' ',ReadingsVal("Mythz","sGlobal",0))[5]}, WWTemp:sGlobal {(split ' ',ReadingsVal("Mythz","sGlobal",0))[9]}
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 15 Februar 2021, 11:14:15
Schau Dir das reading mal im Logfile an. Da kommen noch Datum und Uhrzeit am Zeilenanfang. Steht übrigens auch so im Wiki.

Zeig mal den Code, den Du versucht hast.

Hier https://forum.fhem.de/index.php/topic,33452.0.html.html (https://forum.fhem.de/index.php/topic,33452.0.html.html) gibt es im Anhang eine fhem.cfg als Beispiel. die beinhaltet funktionierende userReadings. Das wäre übrigens auch der richtige Thread für solche Fragen.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: derhobbit am 24 März 2021, 15:00:05
Hi immi,

may I ask you to add another register, please?

Firmware: 4.19
I try to cheat around with "Korrektur Außentemperatur", P86.
I found it in register 0A05A3

What I want to do:
In case of excess energy from solar, I want to correct the outside temperature by some minus degrees. Thus, heating temperature is higher and the energy is put into the underfloor heating instead of being lost.
As I have some rooms in the cellar that are heated, I can use it the whole year.

Thanks
derHobbit
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 24 März 2021, 20:47:36
Hi derhobbit
thanks for sharing your findings;
implemented between -5 and 5 delta K.


commited 0.195
as usual download available tomorrow
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: derhobbit am 25 März 2021, 09:22:16
Hi immi,
wow, you are fast!!
1000 thanks for all your efforts!
Works perfect.

I didn't think about the limits for that parameter before.
According to the manual, a range of -20 to 30 K is allowed.
Maybe you could adjust that eventually.

Have a great day
derHobbit
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 25 März 2021, 16:01:28
Hi derHobbit
>> According to the manual, a range of -20 to 30 K is allowed.
I also looked yesterday in the manual but I saw something different -20 to 30 C;
normally deltaT are espressed in K;
Something must be wrong in the manual...
therefore I  took the interval of roomCorrection

If you need a bigger interval (e.g. -10 to 10 K), please test it before,
then I commit it.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: derhobbit am 07 April 2021, 09:45:56
Hi immi,
sorry for late reply. I just verified on the heating itself.
Actual configurable range via display is -20 to +40 °C  --> sure, it should be K not °C.

As the manual says -20 to +30 °C  (K) , I would suggest to allow that range also via FHEM.

BR
derHobbit
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 07 April 2021, 21:24:35
committed as suggested
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 20 April 2021, 11:24:08
Hi immi,

Seems that I damaged my serial interface yesterday.
As I first did not expect a HW-issue but SW-issue (THZ_Get: Error msg2: THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow), I read about this issue here in the thread and saw that there is still the "nonblocking"-option. Played around with it a little bit, but of course it did not repair my HW.

Seems that the discussion about blocking/nonblocking ended somewhen without a clear result.

From your perspective, as you're the only one who knows the code and are also familar with FHEM, should this option be activated or is it better to keep it deactivated?
(After switching to another serial interface today in the morning everything works again, also with "blocking", so there is no urgent need for me to change anything, but I was just wondering what would be the better option.)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 April 2021, 20:34:24
Hi TheTrumpeter
stay away from the "nonblocking"-option.
It was requested for very very old tecalors with very slow reaction time.
Also in this case it was not a big benefit, it needs much more memory ....
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 20 April 2021, 20:50:07
Thanks for your reply immi.

Zitat von: immi am 20 April 2021, 20:34:24
Also in this case it was not a big benefit, it needs much more memory ....
Didn't want to bring that topic, but as you started with it...  8)

I'm searching for a "memory hole" within FHEM for some time now, but could not find the reason yet. I've read through the separate thread here in the forum and tried a lot of the suggestions there. Unfortunately I run a system where the perl-version seems to be affected by an issue that might cause the problem. I could not get perlbrew running properly so I got a backup and added an automatic FHEM-restart in case the RAM-consumption is over a limit.
(Upgrading to newer Raspian is not an option at the moment as there are some other tasks to be done before.)

Yesterday, when I did not get any reading out of the THZ it seemed that the RAM-consumption did not increase. It was only a few hours from afternoon to today morning, so not the best sample, but I just noticed it.
Do you have any doubt that there might be some memory-issue also with the "blocking"-implementation?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 21 April 2021, 18:24:52
Zitat von: TheTrumpeter am 20 April 2021, 20:50:07
Yesterday, when I did not get any reading out of the THZ it seemed that the RAM-consumption did not increase. It was only a few hours from afternoon to today morning, so not the best sample, but I just noticed it.
Do you have any doubt that there might be some memory-issue also with the "blocking"-implementation?
well I cannot tell, if your perl leaks memory; you can monitor it via fhem for some time or you can restart your system each time it grows too much.

with "more memory with non-blocking" I meant something else.
non-blocking in thz:

The benefit of non-blocking for 5-20ms per reading, is not worth the 2x82956 in memory (even for short time) and  the additional cpu load to create each time the second process.

I wrote it because it could make sense for very old tecalors with 25-50ms reading time

   immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 15 Oktober 2021, 10:43:36
Hi, sorry to answer/ask this old thread.

I start to connect my THZ with ver. 4.39 to FHEM using for test my WinPC because it is only availabel.

I think I understood the discussion about timeout problem of 00_THZ.pm with Windows (10).
--> receive only 0x10 from THZ after sending 0x02.

In result of this thread I should adjust a communication timeout.
So actually we have  $thzversion = "0.196".

Please help me to find the item where to do.[/b]
Best would be also concrete numerical value I should set. I use USB with 115200.

Hope anybody will take notice about my request ...



Matthias
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 Oktober 2021, 11:51:47
Hi Matthias
I try to sum up
- THZ with ver. 4.39
- fhem is updated and running on windows
Is it correct?
Do you have sporadic or always a comunication issue?
Your heatpump is set for 115200 or 57600?
Have you chosen the right serial port?
Can you share your fhem config file?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 15 Oktober 2021, 13:18:21
Hi Immi,

sorry for disturbing with such old stuff.
For explanation - the THZ is about 10 years old and my own but I had no time before to connect with any system.
Now I'm trying and have a big problem with com conection using win10.
- eventually the onboard USB - seriell controller driver does not run correctly. The driver installation was possible and finished correct but very old stuff.
  With hterm the communication is running but only for 0x02 --> 0x10 because of timing I think. A sign that USB on THZ seems to work correctly.
- The strawberry perl instalation is suspect because of opposit statements about Win32::SerialPort is or is not included.
- I got different error messages from FHEM. Sometime "can not file open" around com port opening procedure.

Att. a logfile with an error message which could really independent from installation.
Also a screenshot taken from using RS232. Even same error message independent from baudrate.


Hope You can help.

Matthias



Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 16 Oktober 2021, 21:52:47
Hi Matthias
i fixed the code for windows. Despite the improvement, windows is still deprecated.

please check following requirements:
wait for 0.197 -- it should be availabe tomorrow for fhem update (after the update restart fhem)
use only perl with 32bits --- the 64b version has some issues with windows & serial
decide comm port and speed correctly  --- e.g. "define Mythz THZ COM4@115200"

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 17 Oktober 2021, 08:17:52
Hi Immi, thank You, will wait.

May be it is a point of interest for You.
If I use the THZ USB com port it will not be opened from the FHEM THZ module.
The chip on Board Tecalor is a type CP210x.
Driver on my win10 is newest.
Using Hterm the USB connection is working correctly and reliabel.

If I try tu use the RS232 with adapter cable using a Profilic chip (230x belive) the port open procedure from FHEM  THZ module is ok.
But here seems to be HW problems because of voltage output of the txd signal in direction Tecalor.
This should above 5V and it seems not.
My cabel does also not work with Hterm. Port opening is also ok but no data will transmitted.

Matthias
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 18 Oktober 2021, 10:41:07
Hi Immi,

update to 197 was done.

Result:
- disconnected
- in FHEM.log  --> access denied
- it is not possible in this state to open com3 with Hterm in parallel. Means com3 seems blocked by FHEM module.

Message "access denied" is without any comment so I do not know what it is related for.
Perl is allowed at the win firewall.

Do You know the reason for "disconnected"?

... tested in the afternoon again --> same game as with ver. 196 before.
No connection with FHEM.
Perfect play outside FHEM using Hterm. sent 0x02 - answer 0x10

What should I do???

Matthias
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 Oktober 2021, 17:24:45
Dear Matthias
FYI: THZ 0.196 was broken on windows. I fixed it and I tested positiverly THZ 0.197 on a windows computer saturday.

>>it is not possible in this state to open com3 with Hterm in parallel. Means com3 seems blocked by FHEM module.
I am no windows expert, but it  makes no sense to access a serial port from 2 softwares in parallel.

you have not answered to my other questions
Do you use  perl with 32bits?
Your heatpump is set for 115200 or 57600?
Have you chosen the right serial port?

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 18 Oktober 2021, 17:43:06
Yes it is clear cannot open two tools for com 3 at same time.
Concerning win32 I'm not 100% sure but think it is 32bit.
The FHEM Host is a old small netbook with an Atom controller.
Win10 is running perfectly (wondering about...)
So far I understand there is only 32bit possible. I will check! --> perl 5 ver. 32

Do you use  perl with 32bits?     yes, 5.32.1
Your heatpump is set for 115200 or 57600?    115200 (USB on THZ board)
Have you chosen the right serial port?             yes  --> com3@115200 (works with Hterm)

I tested also again with new USB serial cable on RS232.
In this configuration FHEM shows "connected".
The USB-seriell controller is again a Profilic.
There are LED's implemented in the jack. I see that FHEM is driving the TxD.
But no response from THZ side.
In this configuration also no communication with Hterm possible.
That's why I belive a hardware problem.

Next day's I get one mor cable with FTDI chip. May be this will run.

Matthias
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 18 Oktober 2021, 18:22:22
Immi, do You know which USB - seriall controller is on Your THZ originally installed?
On my it is Silicon Labs CP210x USB to UART Bridge.
The THZ appliance was installed 2010 in our house.

Matthias
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 Oktober 2021, 18:44:01
ZitatYour heatpump is set for 115200 or 57600?    115200 (USB on THZ board)
Have you chosen the right serial port?             yes  --> com3@115200 (works with Hterm)
When you write that Hterm works, I understand that you can achieve such HEX comunication?

send -> 02
expected answer -> 10


Immi, do You know which USB - seriall controller is on Your THZ originally installed?
I never connected it directly; nevertheless if you search in the forum many use the direct usb port on the heatpump

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 18 Oktober 2021, 19:29:47
Yes, the HEX communication over Hterm works fine - but only 0x02 --> 0x10.

I saw some discussion in the forum but never a clear step from problem to solution with description how


Matthias
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: hellijo am 18 Oktober 2021, 19:49:56
Hello,

I don´t know if this ist the right thread.

Has anybody here routed the THZ values and parameters to the Homebridge-Fhem or can help me?
I´m new with FHEM an I habe some problems to realize the routing of the signals.

Best Regards,
Joerg
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 Oktober 2021, 20:22:06
Zitat von: Matthias-56 am 18 Oktober 2021, 19:29:47
Yes, the HEX communication over Hterm works fine - but only 0x02 --> 0x10.
Hi Matthias
this is enough, it means your com port and speed is correct.
now everything should work... but windows is tricky
I asked you about the perl 32bit version because of this post https://forum.fhem.de/index.php?topic=98442.0
I got it running on saturday with the full 32bit straberry perl (not the portable one) on a 64bit laptop win10 (Win32::SerialPort  was included).
https://strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-32bit.msi
immi

Hi hellijo
never used Homebridge.
immi

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 19 Oktober 2021, 11:05:21
Hi Immi,
I'm so sorry!

Probably reason for problems are the current win10 update in common with CP210x drivers from Silicon Labs.
I'm sure in the past other systems are running - till a driver update take place.

My entry date last week lead to the current updates and with this to a male function of USB interface to my THZ 403.
There is a hint https://community.silabs.com/s/article/downloading-cp210x-drivers-from-windows-update?language=en_US (https://community.silabs.com/s/article/downloading-cp210x-drivers-from-windows-update?language=en_US) .
Especially with HW-ID: CP2101-4/CP2102N   0x10C4  0xEA63
In my driver configuration is 0xEA60 setted.
Is this wrong or not - I don't know.
I was not able to change the configuration because I found no possibility to change the HW-ID.


As the tool Hterm deals without any problem with this configuration a difference must be inside THZ modules in FHEM.


There is the THZ state "connected/disconnected"
There must be defined criteria to set the state.
This code in the THZ module code seems not fit for CP210x driver.


At least one other USB-serial driver (PL230x, Profilic) works from FHEM side. The THZ state goes to "connected". TxD data are sended. But my THZ does not respond.
This is of course the RS232 connection. At my THZ most lightly the Pin numbering from top is 3, 2, 1. That means gnd is above.
I assume output voltage of the TxD from Profilic adapter is not above 5V.


Reason to use the USB port at THZ 403: excluding any HW problems like High- or Low pegel, much more EMC distance because the system was tested from manufacturer side (Tecalor, Stiebel).


Of course I understand if You don't want to spend Your time for this special driver problem - but I would very thankful.


Matthias






Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 19 Oktober 2021, 20:42:36
concerning your direct connection to the usb of the heatpump.
You got hterm work, now you can test if your perl is working.
The script enclosed is selfexplaining

C:\Strawberry\fhem>perl testserialthz.pl
10
----
1002
----
0100b6fd01b71003



concerning your rs232 cable: pay attention that TX at rest should be below -4.5V
https://upload.wikimedia.org/wikipedia/commons/e/e1/RS232-UART_Oscilloscope_Screenshot.png
check again the cable: I remember that the bottom pin  of the rs232 of the heatpump is gnd
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 20 Oktober 2021, 08:17:07
Hi Immi,
great support!

I was also working ...

Yesterday I got new cable.
I investigated wiring inside THZ.

- RS232 Connector at THZ from top to bottom --> 1, 2, 3 (as You are writing)
- Baudrate 115200

--> RS232 connection stabil established.

So I can use FHEM for my THZ.

Thank You for the script. I will try to understand.
Did not use it till now because nearly same time RS232 worked.
My perl configuration seems ok.
Using Strawberry Perl Portable on Win10.

Direct connection FHEM THZ via USB does not work. THZ state = disconnected.
Same connection via e.g. Hterm ok.

According my experience the different USB - serial controller and/or win10 driver could be root cause.
Profilic --> state connected (external cable)
FTDI    --> state connected (external cable)
CP210x--> state disconnected (THZ onboard USB - serial controller)

Matthias
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 Oktober 2021, 10:29:44
Zitat von: Matthias-56 am 20 Oktober 2021, 08:17:07
--> RS232 connection stabil established.
So I can use FHEM for my THZ.
excellent

Zitat
My perl configuration seems ok.
Using Strawberry Perl Portable on Win10.
The perl script will help you debugging without the complex construct of fhem.
It is very very easy to check the serial handshake, or other serial peculiarities linked to your special driver.
It would be great if you could share the results in the forum.

Motivation: Maybe some other users will benefit.
Making the rs232 cable and using linux is my preferred way, but it can be intimidating for many users.
Therefore I like to support also direct-usb connection and windows.... Are you familiar with the concept of gateway drug :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 20 Oktober 2021, 11:44:15
It would be great if you could share the results in the forum.
... Give me short time.
Where to place such result?
I found a disadvantage using forum as there a lot of information but not organizeabel for fast finding.

Are you familiar with the concept of gateway drug

  Is this a drug which lead people try one week or more to place a serial connection? ;)


Matthias







Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 Oktober 2021, 14:20:18
hi Matthias
take your time and enjoy the nice weather today :)

ZitatWhere to place such result?
The forum is for problemsolving discussion and for preliminary results.

The final solution, even better an howto should go in the wiki
https://wiki.fhem.de/wiki/Tecalor_THZ_W%C3%A4rmepumpe
you can edit it yourself or send the  change to Micromat ; I have never done it


A very short hint can also go in the commandref; I should do it, because hardlinked in fhem-source-code.
immi


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 20 Oktober 2021, 17:32:19
Hi Immi,

Test Com4 = USB - Serial cable, Profilic chip

C:\MyFHEM>perl\bin\perl testserialthz.pl
10
----
1002
----
0100b6fd01b71003

Test Com3 = THZ USB direct CP210x chip

C:\MyFHEM>perl\bin\perl testserialthz.pl
invalid COMMPROP block length= 66 at testserialthz.pl line 10.
Can't open COM3:

line 10:
$PortObj = new Win32::SerialPort ($PortName)  || die "Can't open $PortName: $^E\n";   

Bug in Win32::SerialPort or in CP210x driver?

Matthias

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 Oktober 2021, 18:24:04
Zitat von: Matthias-56 am 20 Oktober 2021, 17:32:19
Bug in Win32::SerialPort or in CP210x driver?
now it is clear
"COMMPROP block length= 66"  looks like a pretty old problem
https://rt.cpan.org/Public/Bug/Display.html?id=33559
unfixed bug in perl for windows or an unproper api of the driver CP210x
for sure not a fhem issue.
immi


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 20 Oktober 2021, 18:46:58
ok. In the linked article Wim de Vries changed a value in commport.pm to 66 in line639.
I did the same but no success.  :(
Is there a workaround?

Matthias
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 Oktober 2021, 19:51:09
no... if it is not fixed since 10years, there is no easy fix
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 21 Oktober 2021, 10:02:09
Hi Immi,

I remembered that I saw the error ... block length 66 ... already before.
If FHEM try to open com port the modul devio.pm is used.
This seems to replace the original io.pm.
It is signed by Rudolf Koenig.
Is'nt it the lucky situation that this problem could be solved by the FHEM developer?

Matthias

2021.10.21 09:54:28 3: Opening myTHZ_403 device COM3
2021.10.21 09:54:29 1: PERL WARNING: invalid COMMPROP block length= 66 at C:\MyFHEM/FHEM/DevIo.pm line 593.
2021.10.21 09:54:29 1: myTHZ_403: Can't open COM3: No such file or directory
Zugriff verweigert

2021.10.21 09:54:29 1: PERL WARNING: can't open device: \\.\COM3
at C:\MyFHEM/FHEM/DevIo.pm line 593.
Zugriff verweigert
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 21 Oktober 2021, 10:21:49
Hallo Jörg/hellijo
just plot  seasonMode and see if it is the reading of which you are interesten in.

as I already wrote before, I never used homebridge.
I expect that you cannot address seasonMode with the sintax you used.
I expect that you can solve your issue with userreadings --> see example heatingState in https://wiki.fhem.de/wiki/Homebridge_User_Configs

if you post here (heatpump code improvement), nobody can support you properly
the right place would be --> module owner  Andre (justme1968) in forum Frontends/Sprachsteuerung

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 22 Oktober 2021, 10:03:47
Hi Immi,
may be You had not seen my post from 2021-10-21 10 am?
Concerning to share my results here main points I missed.


1. Cable RS232 to connect THZ with PC

THZ MNL connector            PC Sub-D male
(PIN 1 at the top)

TxD  1   -----------------------------------   2  (Rxd)
RxD   2   -----------------------------------   3  (TxD)
gnd   3   -----------------------------------   5  gnd

2. Win10 define com port
   define name THZ comx@115200 (or other value 9600 ... 115200; individuell)

3. USB direct connection - known problem
   problems with Win10 driver in common with THZ onboard USB - Serial chip CP210x


Matthias
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Oktober 2021, 11:56:51
Zitat von: Matthias-56 am 21 Oktober 2021, 10:02:09
I remembered that I saw the error ... block length 66 ... already before.
If FHEM try to open com port the modul devio.pm is used.
This seems to replace the original io.pm.
It is signed by Rudolf Koenig.
Is'nt it the lucky situation that this problem could be solved by the FHEM developer?
Hi Matthias
devio.pm in fhem calls Win32::SerialPort, like I do in the script.... just in a more fancy way.
If Win32::SerialPort does not work for you in the script, it will also not work in fhem
Win32::SerialPort does not belong to FHEM...
https://metacpan.org/pod/Win32::SerialPort
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 22 Oktober 2021, 12:37:47
what a pitty!

So You don't go boring see below.

2021.10.22 12:23:30 3: Opening myTHZ_403 device COM3
2021.10.22 12:23:30 3: Setting myTHZ_403 serial parameters to 115200,8,N,1
2021.10.22 12:23:30 3: myTHZ_403 device opened
2021.10.22 12:24:01 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0B0005 ->

Background:
I'm using the FritzBox Remote USB now.
Communication Hterm and THZ is ok in this configuration (0x02 --> 0x10).
Port opening on THZ module also ok. USB - Serial adapter accepted by FHEM.

Why I got error msg2 ?
I tried already SimpleReadTimeout up to 1s but I don't know if it makes sense.

Matthias

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 22 Oktober 2021, 12:47:32
test result from testserialthz.

PS H:\myFHEM> perl\bin\perl testserialthz.pl

----


Second Write attempted before First is done at testserialthz.pl line 34.
Use of uninitialized value $written in numeric ne (!=) at H:/MyFHEM/perl/vendor/lib/Win32/SerialPort.pm line 1580.
Second Read attempted before First is done at testserialthz.pl line 35.
Use of uninitialized value $got in numeric ne (!=) at H:/MyFHEM/perl/vendor/lib/Win32/SerialPort.pm line 1216.

----
Second Write attempted before First is done at testserialthz.pl line 41.
Use of uninitialized value $written in numeric ne (!=) at H:/MyFHEM/perl/vendor/lib/Win32/SerialPort.pm line 1580.
Second Read attempted before First is done at testserialthz.pl line 42.
Use of uninitialized value $got in numeric ne (!=) at H:/MyFHEM/perl/vendor/lib/Win32/SerialPort.pm line 1216.
PS H:\myFHEM>
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Oktober 2021, 13:06:13
>>I'm using the FritzBox Remote USB now.
bad idea; please consider better architectures.
you have so many very robust possibilities for remote serial ports

you install fhem directly in the fritzbox (1)
or use ser2net on the  fritzbox   (2)
or use  fhem on a raspberry  (3)
or use  ser2net on a raspberry (4)
or use  fhem on a nas (5)

are you familiar with ser2net or with fhem2fhem?
immi

p.s. I use solution 2 since 8 years, sometimes with vpn and 700km in between :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Matthias-56 am 22 Oktober 2021, 14:18:43
you install fhem directly in the fritzbox (1)    --> don't like to modify the FritzBox
or use ser2net on the  fritzbox   (2)              --> found no description of this config and the need of a RS232 HW still remain
or use  fhem on a raspberry  (3)                  --> did You try to buy a raspi today?
or use  ser2net on a raspberry (4)                -->
or use  fhem on a nas (5)                            --> not availabel and not planned

In my understanding ser2net needs in any case an additional host for com port. I'm wrong?
Fritz USB remote do not need an additional host.

I use vnc to connect to the FHEM host = netbook.
Because power consumption of this netbook I would like to remove it.
One year ago I bought a rasberry 4 kit as a gift for a person.
Today same part nearly double price and not deliverabel.

Matthias
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Oktober 2021, 14:52:25
Zitat von: Matthias-56 am 22 Oktober 2021, 14:18:43
In my understanding ser2net needs in any case an additional host for com port. I'm wrong?
Fritz USB remote do not need an additional host.
you can use the fritzbox with ser2net; https://github.com/Freetz-NG/freetz-ng and compile the additional ser2net
you need the additional host in the same way as for FritzUSB
the difference relies in a easier, leaner transport protocoll with works without windows drivers out of the box.
It is a very robust solution, which could be intimidating..... you need a new firmware for the fritzbox ... but it is much easier than debugging an api like  FritzUSB in windows.


just my two cents
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 12 November 2021, 10:25:07
Hi immi,

It seems that you changed some parameter names in one of the last releases:
p99CoolingHC1HysterFlowTemp (former p99CoolingHC1HystersisFlowTemp)
p99CoolingHC1HysterRoomTemp (forme p99CoolingHC1HystersisRoomTemp)

Luckily I noticed that change as I started writing a documentation which parameters have to be changed if the LWZ shall be operated without FHEM.
As I use these parameters in a module which optimizes cooling-performance the module will not work without changing the parameter-names.

Are there further changes like this?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 12 November 2021, 16:45:40
Zitat von: TheTrumpeter am 12 November 2021, 10:25:07
It seems that you changed some parameter names in one of the last releases:
p99CoolingHC1HysterFlowTemp (former p99CoolingHC1HystersisFlowTemp)
p99CoolingHC1HysterRoomTemp (forme p99CoolingHC1HystersisRoomTemp)
Luckily I noticed that change as I started writing a documentation which parameters have to be changed if the LWZ shall be operated without FHEM.
Hi TheTrumpeter,
the change you are referring to, is probably 7-10 month old

Zitat
Are there further changes like this?
very unlikely but you can check yourself the history in github
https://github.com/mhop/fhem-mirror/commits/master/fhem/FHEM/00_THZ.pm
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: celle am 12 November 2021, 20:15:23
Hello,

I have a THZ 5.5 Flex with inverter technology. With a simple CAN Bus can bus analyzer I get some extra parameters, which show the status of the inverter. Because there is no integral value like on the on of values this is needed for monitoring of the pump.

Here is my patch. Its working for about a year. Can you implement this in upstream?

--- 00_THZ.pm   2019-10-28 20:50:15.000000000 +0100
+++ 00_THZ.pm   2021-11-12 18:13:18.680032336 +0100
@@ -359,6 +359,8 @@
               ],
   "4temp"     => [["", 8, 4, "hex2int",2560]
              ],
+  "1int"     => [["", 8, 4, "hex2int",1]
+             ],
   "5temp"     => [["", 8, 4, "hex2int",10]
              ],
   "6gradient" => [["", 8, 4, "hex", 100]
@@ -779,6 +781,9 @@
   "sFlowRate"          => {cmd2=>"0A033B", type =>"1clean", unit =>" cl/min"},
   "sHumMaskingTime"    => {cmd2=>"0A064F", type =>"1clean", unit =>" min"},
   "sHumThreshold"      => {cmd2=>"0A0650", type =>"1clean", unit =>" %"},
+  "sHeizleistungRelativ"       => {cmd2=>"0A069A", type =>"1int", unit =>" %"},
+  "sVerdichterNSollUnbegrenzt" => {cmd2=>"0A069C", type =>"1clean", unit =>" Hz"},
+  "sVerdichterNSollBegrenzt"   => {cmd2=>"0A069D", type =>"1clean", unit =>" Hz"},
   "sOutputReduction"   => {cmd2=>"0A06A4", type =>"1clean", unit =>" %"},
   "sOutputIncrease"    => {cmd2=>"0A06A5", type =>"1clean", unit =>" %"},
   "sHumProtection"     => {cmd2=>"0A09D1", type =>"1clean", unit =>""},
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 12 November 2021, 22:47:34
Hi Celle
strange with the "lint" and 0A069A
normally "%" were implemented with 0clean or 1clean.
Maybe you can post 3 raw messages and your decoding? they are logged with verbose5
Would you mind suggesting a short engl. name for the added readings? if possible the same one of the tecalor manual.
thanks immi

Hi belu and godmorgon,
do you see any sideeffects with celle's patch?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: celle am 14 November 2021, 22:27:58
Here is the debug


2021.11.14 22:02:32.826 5: THZ_Get: Try to get 'sHeizleistungRelativ'
2021.11.14 22:02:32.826 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2021.11.14 22:02:32.827 5: Mythz sending 02
2021.11.14 22:02:32.827 5: DevIo_SimpleWrite Mythz: 02
2021.11.14 22:02:32.828 5: Mythz start Function THZ_ReadAnswer
2021.11.14 22:02:32.828 5: THZ_ReadAnswer: uc unpack: '10'
2021.11.14 22:02:32.828 5: Mythz sending 0100AB0A069A1003
2021.11.14 22:02:32.828 5: DevIo_SimpleWrite Mythz: 0100AB0A069A1003
2021.11.14 22:02:32.830 5: Mythz start Function THZ_ReadAnswer
2021.11.14 22:02:32.830 5: THZ_ReadAnswer: uc unpack: '10'
2021.11.14 22:02:32.830 5: Mythz start Function THZ_ReadAnswer
2021.11.14 22:02:32.835 5: THZ_ReadAnswer: uc unpack: '02'
2021.11.14 22:02:32.835 5: Mythz sending 10
2021.11.14 22:02:32.835 5: DevIo_SimpleWrite Mythz: 10
2021.11.14 22:02:32.836 5: Mythz start Function THZ_ReadAnswer
2021.11.14 22:02:32.837 5: THZ_ReadAnswer: uc unpack: '0100CD0A069A00221003'
2021.11.14 22:02:32.837 5: Mythz sending 10
2021.11.14 22:02:32.837 5: DevIo_SimpleWrite Mythz: 10
2021.11.14 22:02:32.838 5: Parse message: CD0A069A0022
2021.11.14 22:02:32.839 5: Message length: 12


The 22 is hex. It should be 34%

For the names. The English manual says:
HTG OUTPUT RELATIVE %
COMP N SET VAL UNLTD Hz
COMPR. N SET VAL LTD Hz

I also tried to get COMPRSSR SET OUTPUT, but there I do not get a persistent value.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 15 November 2021, 10:52:56
Zitat von: immi am 12 November 2021, 16:45:40
Hi TheTrumpeter,
the change you are referring to, is probably 7-10 month old

Haven't updated for some time it seems.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 November 2021, 18:55:53
Zitat von: celle am 14 November 2021, 22:27:58
Here is the debug
2021.11.14 22:02:32.838 5: Parse message: CD0A069A0022
The 22 is hex. It should be 34%
Hi,
1clean decodes your example perfectly, no need to add a new type; unless you find a different example

thanks for checking the engl manual, but they are really terrible names.
Why I  am boring about the names? I do not like to change them afterwards, and someone will have sideeffects like  TheTrumpeter.
The names of the readings should be self-explaining and not too long.

  "sHeatingRelPower"    => {cmd2=>"0A069A", type =>"1clean", unit =>" %"},
  "sComprUnlimit" => {cmd2=>"0A069C", type =>"1clean", unit =>" Hz"},
  "sComprLimit"    => {cmd2=>"0A069D", type =>"1clean", unit =>" Hz"},

I am also not really happy of my proposal. What is 0A069C-D? rotations of a compressor in Hz? or a frequency of an inverter?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: celle am 15 November 2021, 21:48:23
Hello,

It looks like the number of rotations of the compressor, because it is something between 20 and at most I think something about 120hz at max in my logs, where I forced it to max power and where it was cold.

I will try 1clean for the reading. For negative values for relative power I get 65535+relative power. With my 1int not. I get negative values on dhw mode, or if the internal integral goes down, if in spring or autumn I have a night reduction because I want to use my PV power on day.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 16 November 2021, 20:52:49
Zitat von: celle am 15 November 2021, 21:48:23
I will try 1clean for the reading. For negative values for relative power I get 65535+relative power. With my 1int not. I get negative values on dhw mode...
I do not want to discuss if it makes sense a negative % of power. I just trust you :)
Please, give me 1 or 2 examples (raw data like CD0A069A0022) with the expected decoding an I will try to extend 1clean

Zitat von: celle am 15 November 2021, 21:48:23
It looks like the number of rotations of the compressor, because it is something between 20 and at most I think something about 120hz at max in....
Assuming they are rotation, what do you prefer?
  "sHeatingRelPower"  or "sHeatRelOutput"   or "sHeatingPowerRel"
  "sComprRotUnlimit"    or "sComprUnlimit"
  "sComprRotLimit"   or "sComprLimit"   
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Noobie47 am 19 November 2021, 22:19:14
Hi,
i am using a very first edition of  a Stiebel Eltron LWZ 303i. Maybe  the first one ever produced ;) There is no USB connectivity inside. I tried to establish a connection according to Robert Penz suggestion to build a cable and use also a RS232 to USB converter to my Raspberry. I got help from someone else in relation of configuration and editing plots.
It seems to run properly in fhem, but without real readings. Error message in THZ says:
state opened 2021-11-19 12:23:35
z_Last_fhem_err
THZ_Get: Error msg2: THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0 -- F4 ->
2021-11-19 22:13:07

Anyone a suggestion what went wrong? How can i alter the baudrates? I think i read somewhere, that it might help to change the rates from 115200 to somethng else.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 November 2021, 06:52:07
Zitat von: Noobie47 am 19 November 2021, 22:19:14
Hi,
i am using a very first edition of  a Stiebel Eltron LWZ 303i. Maybe  the first one ever produced ;) There is no USB connectivity inside. I tried to establish a connection according to Robert Penz suggestion to build a cable and use also a RS232 to USB converter to my Raspberry. I got help from someone else in relation of configuration and editing plots.
Have you had a working connection, in which you can read something from the tecalor, via serial terminal or via the software from RobertPenz?
if not please check the cable, see https://forum.fhem.de/index.php/topic,33211.msg1181408.html#msg1181408

concerning fhem: are you using window or linux or macos?
please post your fhem config
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Noobie47 am 20 November 2021, 09:20:48
Hi all,
hi immi,

this is my config:

attr global userattr cmdIcon devStateIcon:textField-long devStateStyle icon sortby webCmd webCmdLabel:textField-long widgetOverride
attr global autoload_undefined_devices 1
attr global logfile ./log/fhem-%Y-%m.log
attr global modpath .
attr global statefile ./log/fhem.save
attr global verbose 3

define WEB FHEMWEB 8083 global
setuuid WEB 6193a144-f33f-2ef9-fdd3-9e765898612e3d3c

# Fake FileLog entry, to access the fhem log from FHEMWEB
define Logfile FileLog ./log/fhem-%Y-%m.log fakelog
setuuid Logfile 6193a145-f33f-2ef9-4b21-9c9fd0474588ac1d

define autocreate autocreate
setuuid autocreate 6193a145-f33f-2ef9-ce91-a85c9768fc27a28a
attr autocreate filelog ./log/%NAME-%Y.log

define eventTypes eventTypes ./log/eventTypes.txt
setuuid eventTypes 6193a145-f33f-2ef9-0f17-107cbca966b29c5d

# Disable this to avoid looking for new USB devices on startup
define initialUsbCheck notify global:INITIALIZED usb create
setuuid initialUsbCheck 6193a145-f33f-2ef9-94dc-3ec7a34eff875254
define rg_thz readingsGroup Mythz:<%temp_outside>,<Aussen>,AussenTemp Mythz:<%sani_supply_temp@red>,<Vorlauf>,VorlaufTemp Mythz:<%sani_return_temp@blue>,<Rücklauf>,RuecklaufTemp Mythz:<%sani_boiler_temp@BD7800>,<Wasser>,WWTemp Mythz:<%sani_solar_temp>,<Kollektor>,KollektorTemp
setuuid rg_thz 61977490-f33f-2ef9-6114-4ee4bc1bc2e15b8a
attr rg_thz alias Heizung Temperaturen
attr rg_thz group THZ
attr rg_thz room Sysintern
attr rg_thz valueFormat { AussenTemp => '%1.f °C', VorlaufTemp => '%1.f °C', AussenTemp=> '%1.f °C', RuecklaufTemp=> '%1.f °C', WWTemp=> '%1.f °C', KollektorTemp=> '%1.f °C' }
define MyDashboard Dashboard
setuuid MyDashboard 619774cf-f33f-2ef9-5f74-4ae21ada606689da
attr MyDashboard userattr dashboard_homeTab:1 dashboard_tab2backgroundimage dashboard_tab2colcount dashboard_tab2devices dashboard_tab2groups dashboard_tab2icon dashboard_tab2name dashboard_tab2rowcentercolwidth dashboard_tab2sorting dashboard_webRefresh:multiple-strict,WEB
attr MyDashboard dashboard_tab1groups Set your FHEM groups here and arrange them on tab 1
define Plot_Temp SVG FileLog_Mythz:thz:CURRENT attr Plot_Temp room Heizung
setuuid Plot_Temp 61977509-f33f-2ef9-8ddb-6fc04cf81e42fbbe
define Mythz THZ /dev/ttyUSB0@115200
setuuid Mythz 619787a5-f33f-2ef9-1e07-4b9e3e96d8f435cd
attr Mythz devStateIcon opened:10px-kreis-gruen disconnected:10px-kreis-rot
attr Mythz event-on-change-reading .*
attr Mythz event-on-update-reading p\d.*
attr Mythz icon sani_heating
attr Mythz interval_sGlobal 300
attr Mythz interval_sHC1 300
attr Mythz interval_sHistory 28800
attr Mythz room THZ
attr Mythz simpleReadTimeout 2
attr Mythz userReadings InnenTemp:sGlobal {((split ' ',ReadingsVal("Mythz","sGlobal",0))[81])-2.8}, AussenTemp:sGlobal {(split ' ',ReadingsVal("Mythz","sGlobal",0))[1]}, VorlaufTemp:sGlobal {(split ' ',ReadingsVal("Mythz","sGlobal",0))[3]}, RuecklaufTemp:sGlobal {(split ' ',ReadingsVal("Mythz","sGlobal",0))[5]}, WWTemp:sGlobal {(split ' ',ReadingsVal("Mythz","sGlobal",0))[9]}, VerdampferTemp:sGlobal {(split ' ',ReadingsVal("Mythz","sGlobal",0))[15]}, SeasonMode:sHC2 {(split ' ',ReadingsVal("Mythz","sHC2",0))[13]}, Verdampferlaufzeit_Heizen:sHistory {(split ' ',ReadingsVal("Mythz","sHistory",0))[1]}, Verdampferlaufzeit_WW:sHistory {(split ' ',ReadingsVal("Mythz","sHistory",0))[5]}, HeatSetTemp:sHC1 {(split ' ',ReadingsVal("Mythz","sHC1",0))[11]},HeatTemp:sHC1 {(split ' ',ReadingsVal("Mythz","sHC1",0))[13]},
define FileLog_Mythz FileLog ./log/Mythz-%Y-%m.log Mythz
setuuid FileLog_Mythz 619787a6-f33f-2ef9-f5ca-647032f63014f201
define wal_0 SVG FileLog_Mythz:thz:CURRENT
setuuid wal_0 619787a6-f33f-2ef9-69a5-cb5f424c308c5354
attr wal_0 room Heizung
define wal_1 SVG FileLog_Mythz:thz1:CURRENT
setuuid wal_1 619787a6-f33f-2ef9-4f7a-1a881a6f9406faac
attr wal_1 room Heizung
define wal_2 SVG FileLog_Mythz:thz2:CURRENT
setuuid wal_2 619787a6-f33f-2ef9-a18b-1ce6cbcc76ff6943
attr wal_2 room Heizung
define wal_3 SVG FileLog_Mythz:thz3:CURRENT
setuuid wal_3 619787a6-f33f-2ef9-d91d-74b0f74499960c77
attr wal_3 room Heizung
define wal_4 SVG FileLog_Mythz:thz4:CURRENT
setuuid wal_4 619787a6-f33f-2ef9-c073-2d535f973cefecb6
attr wal_4 room Heizung
define wal_5 SVG FileLog_Mythz:thz5:CURRENT
setuuid wal_5 619787a6-f33f-2ef9-3ec2-f19d89dc3de6c087
attr wal_5 room Heizung
define wal_6 SVG FileLog_Mythz:thz6:CURRENT
setuuid wal_6 619787a6-f33f-2ef9-6de9-b9fa558824696119
attr wal_6 room Heizung
define wal_7 SVG FileLog_Mythz:thz7:CURRENT
setuuid wal_7 619787a6-f33f-2ef9-9e28-a1a387c05ed0bb4e
attr wal_7 room Heizung
define wl_hr2 weblink htmlCode <div class="SVGplot"><embed src="/fhem/THZ_PrintcurveSVG/" type="image/svg+xml" name="wl_hr2"/></div> <a href="/fhem?detail=wl_hr2">wl_hr2</a><br>
setuuid wl_hr2 619787a6-f33f-2ef9-8779-24fb9ea7aafe42f7
attr wl_hr2 room Heizung

I never had a working connection to the heating. I will check the link you posted and i think the error is somewhere related to the cable, because atm its not connected and the same error message apears in fhem like yesterday when the cable was plugged into the heating:
state opened 2021-11-20 00:07:25
z_Last_fhem_err THZ_Get: Error msg2: THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0 -- FB -> 2021-11-20 09:17:21

I am using Windows 10 home and Putty to talk to the Raspi. I reach Fhem also through Windows 10, using the typical ip adress.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 November 2021, 10:32:42
Hi Noobie47
I understand you have installed fhem on linux on a raspi --> good starting point.
let us forget all other mythz  attributes; they can be confusing for now; delete them

focus on

define Mythz THZ /dev/ttyUSB0@9600

find out your serial port name and  speed, which can vary 9600, 14400, 19200, 28800, 31250, 38400, 57600

for the speed, you have to try....
for the serial name, use linux command line "dmesg"
for my device, dmesg

[   28.348000] hub 2-0:1.0: USB hub found
[   28.352000] hub 2-0:1.0: 2 ports detected
....
[   29.624000] ftdi_sio 2-2:1.0: FTDI USB Serial Device converter detected
[   29.632000] usb 2-2: Detected FT232RL
[   29.636000] usb 2-2: FTDI USB Serial Device converter now attached to ttyUSB0


and do not forget the firmware attr. for older tecalor
attr Mythz firmware 2.06
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Noobie47 am 20 November 2021, 10:37:55
Ok. I will try. Many thx for now
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: celle am 20 November 2021, 11:33:32
Hello immi,

I tested the value for negative ones:


2021.11.17 19:28:27.252 5: THZ_Get: Try to get 'sHeizleistungRelativ'
2021.11.17 19:28:27.253 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2021.11.17 19:28:27.253 5: Mythz sending 02
2021.11.17 19:28:27.253 5: DevIo_SimpleWrite Mythz: 02
2021.11.17 19:28:27.254 5: Mythz start Function THZ_ReadAnswer
2021.11.17 19:28:27.255 5: THZ_ReadAnswer: uc unpack: '10'
2021.11.17 19:28:27.255 5: Mythz sending 0100AB0A069A1003
2021.11.17 19:28:27.255 5: DevIo_SimpleWrite Mythz: 0100AB0A069A1003
2021.11.17 19:28:27.256 5: Mythz start Function THZ_ReadAnswer
2021.11.17 19:28:27.257 5: THZ_ReadAnswer: uc unpack: '10'
2021.11.17 19:28:27.257 5: Mythz start Function THZ_ReadAnswer
2021.11.17 19:28:27.260 5: THZ_ReadAnswer: uc unpack: '02'
2021.11.17 19:28:27.260 5: Mythz sending 10
2021.11.17 19:28:27.260 5: DevIo_SimpleWrite Mythz: 10
2021.11.17 19:28:27.262 5: Mythz start Function THZ_ReadAnswer
2021.11.17 19:28:27.262 5: THZ_ReadAnswer: uc unpack: '0100940A069AFFEA1003'
2021.11.17 19:28:27.262 5: Mythz sending 10
2021.11.17 19:28:27.262 5: DevIo_SimpleWrite Mythz: 10
2021.11.17 19:28:27.264 5: Parse message: 940A069AFFEA
2021.11.17 19:28:27.264 5: Message length: 12


The result should be

2021-11-17_19:28:27 Mythz sHeizleistungRelativ: -22 %



2021.11.17 18:54:41.595 5: THZ_Get: Try to get 'sHeizleistungRelativ'
2021.11.17 18:54:41.595 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2021.11.17 18:54:41.596 5: Mythz sending 02
2021.11.17 18:54:41.596 5: DevIo_SimpleWrite Mythz: 02
2021.11.17 18:54:41.597 5: Mythz start Function THZ_ReadAnswer
2021.11.17 18:54:41.597 5: THZ_ReadAnswer: uc unpack: '10'
2021.11.17 18:54:41.597 5: Mythz sending 0100AB0A069A1003
2021.11.17 18:54:41.597 5: DevIo_SimpleWrite Mythz: 0100AB0A069A1003
2021.11.17 18:54:41.599 5: Mythz start Function THZ_ReadAnswer
2021.11.17 18:54:41.599 5: THZ_ReadAnswer: uc unpack: '10'
2021.11.17 18:54:41.599 5: Mythz start Function THZ_ReadAnswer
2021.11.17 18:54:41.610 5: THZ_ReadAnswer: uc unpack: '02'
2021.11.17 18:54:41.611 5: Mythz sending 10
2021.11.17 18:54:41.611 5: DevIo_SimpleWrite Mythz: 10
2021.11.17 18:54:41.612 5: Mythz start Function THZ_ReadAnswer
2021.11.17 18:54:41.613 5: THZ_ReadAnswer: uc unpack: '01009E0A069AFFF41003'
2021.11.17 18:54:41.613 5: Mythz sending 10
2021.11.17 18:54:41.613 5: DevIo_SimpleWrite Mythz: 10
2021.11.17 18:54:41.614 5: Parse message: 9E0A069AFFF4
2021.11.17 18:54:41.615 5: Message length: 12


The result should be

2021-11-17_18:54:41 Mythz sHeizleistungRelativ: -12 %


For positive values it is working.

Also I tried decoding of 0A069B, which works now. It shows the power in percent the compressor should work (is 0 if not on). it is the same as 0A069A if the compressor is running and in heating mode. In dhw mode it shows the configured dhw mode power .

So i recommend the following:

fix 1clean for negative values and then:


+  "sHeatingRelPower"       => {cmd2=>"0A069A", type =>"1clean", unit =>" %"},
+  "sComprRelPower"       => {cmd2=>"0A069B", type =>"1clean", unit =>" %"},
+  "sComprRotUnlimit" => {cmd2=>"0A069C", type =>"1clean", unit =>" Hz"},
+  "sComprRotLimit"   => {cmd2=>"0A069D", type =>"1clean", unit =>" Hz"},


celle

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 November 2021, 13:40:06
Hi celle
v0.198 implemented, uploaded, you can make an update tomorrow
Thanks for your contribution.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Noobie47 am 23 November 2021, 11:40:52
Hi,
i deleted everything and made a brand new fhem.config according to Otto (I used his script):
wget https://svn.fhem.de/fhem/trunk/fhem/fhem.cfg
sudo systemctl stop fhem
# Kopie anlegen
sudo cp -R /opt/fhem/ ~/Sicherung/
# Ab hier wird zurück gesetzt
sudo cp fhem.cfg /opt/fhem/
sudo chown fhem:dialout /opt/fhem/fhem.cfg
sudo rm -R /opt/fhem/log/*
sudo rm -R /opt/fhem/backup/*
sudo rm -R /opt/fhem/restoreDir/*
sudo rm /opt/fhem/FHEM/controls_fhem.txt
sudo rm /opt/fhem/FHEM/99_myUtils.pm
# FHEM neu starten
sudo systemctl start fhem




I also used the dmesg command in linux to get the USB device name:

[ 4181.414687] usb 1-1.2: Product: USB2.0-Ser!
[ 4181.520431] usbcore: registered new interface driver usbserial_generic
[ 4181.520507] usbserial: USB Serial support registered for generic
[ 4181.524227] usbcore: registered new interface driver ch341
[ 4181.524307] usbserial: USB Serial support registered for ch341-uart
[ 4181.524421] ch341 1-1.2:1.0: ch341-uart converter detected
[ 4181.526644] ch341-uart ttyUSB0: break control not supported, using simulated break
[ 4181.527058] usb 1-1.2: ch341-uart converter now attached to ttyUSB0


The fhem.config looks like this now:

attr global userattr cmdIcon devStateIcon:textField-long devStateStyle icon sortby webCmd webCmdLabel:textField-long widgetOverride
attr global autoload_undefined_devices 1
attr global logfile ./log/fhem-%Y-%m.log
attr global modpath .
attr global statefile ./log/fhem.save
attr global verbose 3

define WEB FHEMWEB 8083 global
setuuid WEB 619cbf99-f33f-2ef9-de56-90925d7d32069bb2

# Fake FileLog entry, to access the fhem log from FHEMWEB
define Logfile FileLog ./log/fhem-%Y-%m.log Logfile
setuuid Logfile 619cbf99-f33f-2ef9-dcc6-e3ffecfa99833bcc

define autocreate autocreate
setuuid autocreate 619cbf99-f33f-2ef9-31c4-424c103e969a234e
attr autocreate filelog ./log/%NAME-%Y.log

define eventTypes eventTypes ./log/eventTypes.txt
setuuid eventTypes 619cbf99-f33f-2ef9-11f9-0e2d5aad2406d445

# Disable this to avoid looking for new USB devices on startup
define initialUsbCheck notify global:INITIALIZED usb create
setuuid initialUsbCheck 619cbf99-f33f-2ef9-30b0-78cf0993d6533f54
define Mythz THZ /dev/ttyUSB0@14400
setuuid Mythz 619cbffa-f33f-2ef9-c3bb-3839b2c0bed0468a
attr Mythz devStateIcon opened:10px-kreis-gruen disconnected:10px-kreis-rot
attr Mythz firmware 2.06


immi,
your advice was very helpful. Now i need to bring back those codeparts i deleted to have plottings right?

Summarize for others:
Setup: A very old Stiebel Eltron 303i, maybe the very first edition, no USB connectivity, Cable homemade according to Robert Penz (use google), USB to Serial cable from AmaXXX, used under linux dmesg to get the port name; used immi´s code (see above) and tried all baud rates; 28800 was the right one! I have the feeling that it works now:
UPDATE : it was just a feeling  :-\: see last screenshot, the connection was not stable established, after approx 3 Minutes error messages was shown.


Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 23 November 2021, 21:12:36
Hi Noobie,
"mythz device opened" does not tell you that it is the right freq, it just tells you it can open the serial port.
how did you understand that 28000 is the right freq for your tecalor?
have you read one register?

FYI1 the module starts reading the registers  some minutes after fhem starts
FYI2 I would disable the autocreate and the initialUsbCheck
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Noobie47 am 24 November 2021, 21:13:40
Hi,
I was too optimitistic for a few minutes, because there was no error. 28800 did also not work. Registers were not read. All other frequencies did not work  as well. Measures: 1. I wiill double check the Cable, especially the part i built on my own.  2. I will delete the autocreate and the Initial usb check.
Under Windows the USB to serial cable Wants to automatically install some driverrs. Is this also for the raspberry needed?
Best, noobie
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 25 November 2021, 03:47:48
Zitat von: Noobie47 am 24 November 2021, 21:13:40
I was too optimitistic for a few minutes, because there was no error. 28800 did also not work. Registers were not read. All other frequencies did not work  as well. Measures: 1. I wiill double check the Cable, especially the part i built on my own.  2. I will delete the autocreate and the Initial usb check.
Under Windows the USB to serial cable Wants to automatically install some driverrs. Is this also for the raspberry needed?
check the cable and stay away from windows.... your dmesg log shows your serial drivers on the raspi are ok
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Noobie47 am 25 November 2021, 08:20:19
Ok, good to know that the raspi recognizes the cable automatically. After checking the cable today in respect of soldering failures, i will come back to the issue
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: celle am 25 November 2021, 20:42:21
@immi

The code works.

Thanks

Celle
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Noobie47 am 25 November 2021, 21:12:39
I resoldered the cables to improve the connectivity. But still error Message from Fhem. Maybe someone can have a Look at he cable picture to check if i did something wrong during soldering it (mixed up the cablecolor e.g.). I think i did it according to the instructions on Robert's Page.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 26 November 2021, 07:12:16
Zitat von: Noobie47 am 25 November 2021, 21:12:39
I resoldered the cables to improve the connectivity. But still error Message from Fhem. Maybe some cam habe a Look athe cable picture to check if i did something wrong during soldering it (mixed up the cablecolor e.g.). I think i did it according to the instructions on Robert's Page.
I also cannot solder well, pay attention not to have shorts between --> check with a multimeter

at first glance, you switched black and red  on the serial-d9 connector side


THZ(GND at the bottom) **************       Sub-D9

yellow Tx  1   --------------------------------   2  Rx     yellow
red_   Rx  2   --------------------------------   3  Tx     red
black gnd  3  -------------------------------    5  gnd   black
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Noobie47 am 29 November 2021, 14:21:49
Now a connection to the heating is established. I get now values and infos, see screenshot as an example. In general all values from p1 to p 80 are now shown, also the programming of downtime, fan speed et cetera.
But also a error message:
z_Last_fhem_err   THZ_Get: Error msg2: THZ_Get_Com: error found at step1 15 NAK!! -- F2 -> 15   2021-11-29 14:13:54
Can i ignore this message? btw i used rate 14400
thanks for your help so far, immi.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 29 November 2021, 20:58:15
hi Noobie47
Happy you made it work;
Yes you can ignore the error, if you do not see it too often.

p.s. do not forget to help others with similar heatpumps in the forum.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Noobie47 am 29 November 2021, 21:41:33
Yes, anyone with need for help, also in german language, is welcome, but i am afraid i am only a very shallow user who can only convert hints from others. But maybe this enough to help others.  8)
Now i get those values, please see attachment. Why does the plotting stop at 04:30 hrs?   
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Noobie47 am 02 Dezember 2021, 23:28:27
Hi, at the end i made fhem work and it runs, but the heating temperature range is too low for plotting. How can i adjust the plotting to show temperature above 32 Celsius?
Update: i found the editor and changed the range from 32 celsius to 44 celsius and used the button write gplot. now i see  the plotting.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Noobie47 am 05 Dezember 2021, 22:27:54
Hi, has  anyone an idea what is the reason for this error message? It appears almost exactly every 2 minutes.
msg2:  decode: command not known -- D1 -> 0103D5D11003
My Config looks like this with the kind help from immi:
attr global userattr cmdIcon devStateIcon:textField-long devStateStyle icon sortby webCmd webCmdLabel:textField-long widgetOverride
attr global autoload_undefined_devices 1
attr global logfile ./log/fhem-%Y-%m.log
attr global modpath .
attr global statefile ./log/fhem.save
attr global verbose 3

define WEB FHEMWEB 8083 global
setuuid WEB 61a541b6-f33f-ac07-9fdd-9793db672a2144fd
attr WEB editConfig 1

# Fake FileLog entry, to access the fhem log from FHEMWEB
define Logfile FileLog ./log/fhem-%Y-%m.log Logfile
setuuid Logfile 61a541b6-f33f-ac07-2380-fa0515e246a0ff30

define autocreate autocreate
setuuid autocreate 61a541b6-f33f-ac07-91ee-8e364cb8e92c13b2
attr autocreate filelog ./log/%NAME-%Y.log

define eventTypes eventTypes ./log/eventTypes.txt
setuuid eventTypes 61a541b6-f33f-ac07-44fe-7e7823105fa853ea

# Disable this to avoid looking for new USB devices on startup
define initialUsbCheck notify global:INITIALIZED usb create
setuuid initialUsbCheck 61a541b6-f33f-ac07-1fce-231a8f24487c4ef4
attr initialUsbCheck disable 1
define Mythz THZ /dev/ttyUSB0@14400
setuuid Mythz 61a947be-f33f-ac07-0a98-b53c7c54ad616cf8
attr Mythz devStateIcon opened:10px-kreis-gruen disconnected:10px-kreis-rot
attr Mythz firmware 2.06
attr Mythz interval_sGlobal 300 # Internes Polling Intervall 5min
attr Mythz interval_sHistory 28800 # Internes Polling Intervall 8h
attr Mythz interval_sLast10errors 120 # Internes Polling Fehlerspeicher
define FileLog_Mythz FileLog ./log/Mythz-%Y.log Mythz
setuuid FileLog_Mythz 61a947be-f33f-ac07-a3d0-4e712db12e7dba43
define Plot_Temp SVG FileLog_Mythz:thz:CURRENT
setuuid Plot_Temp 61a947be-f33f-ac07-e211-f843f16e200a9413
attr Plot_Temp room Heizung

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 05 Dezember 2021, 22:57:12
Zitat von: Noobie47 am 05 Dezember 2021, 22:27:54
Hi, has  anyone an idea what is the reason for this error message? It appears almost exactly every 2 minutes.
msg2:  decode: command not known -- D1 -> 0103D5D11003
Well
you request register D1 every 120s  with the attribute interval_sLast10errors.
Just remove it, if your tecalor does not have it.

one more thing; you should consider using
attr Mythz firmware 2.14
instead of the 2.06

immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Noobie47 am 09 Dezember 2021, 12:16:44
@immi: regarding error message msg2:  decode: command not known -- D1 -> 0103D5D11003; removing it, was sucessful.

I also tried fw 2.14 instead of 2.06. It created a lot of error messages !!! I tried it for a couple of time, but at the end I switched back to 2.06. There are still some error messages but in general the plotting works.
I  asked within another thread in this forum for help analyzing my parameters and plottings. Maybe you also want to have a look ? here: https://forum.fhem.de/index.php/topic,33452.3750.html#lastPost

best,
noobie
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: kjmEjfu am 27 Dezember 2021, 10:35:02
Ich musste meinen Pi Zero neu aufsetzen und jetzt bekomme ich FHEM nur noch

msg2 THZ_Get: Error msg2:  closed connection -- E8 ->

Wobei die E8 variabel ist.
Woran kann das denn liegen?

ser2net habe ich installiert und /etc/ser2net.conf auch angepasst.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 27 Dezember 2021, 11:22:19
Kann es sein, dass fhem den richtigen USB-Port nicht findet? Das ist immer wieder ein Thema.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: kjmEjfu am 27 Dezember 2021, 11:24:56
Nee, daran liegt es nicht.
Ich bin auch einen Schritt weiter.
Unter Bullseye muss man das anders anlegen.

sudo nano /etc/ser2net.yaml

dort habe ich jetzt eingetragen:

connection: &thz_fhem
    accepter: tcp,2003
    enable: on
    options:
      kickolduser: true
    connector: serialdev,/dev/ttyUSB,115200n81,local


und natürlich anschließend ein:

sudo /etc/init.d/ser2net restart

Damit kommt zumindest wieder die Verbindung zustande.

Allerdings scheint noch irgendwas nicht ganz zu stimmen.

Denn ich bekomme Fehler wie

msg2 THZ_Get: Error msg2:   THZ_Get_Com: error found at step0 446576696365206F70656E206661696C7572653A2056616C7565206F722066696C65206E6F7420666F756E640D0A -- F5 -> 446576696365206F70656E206661696C7572653A2056616C7565206F722066696C65206E6F7420666F756E640D0A
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: kjmEjfu am 27 Dezember 2021, 11:47:24
Mit dem Eintrag funktioniert es bei mir:

connection: &fhem_thz
    accepter: tcp,2003
    timeout: 500
    connector: serialdev,
               /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0,
               115200n81,local


den Pfad muss man natürlich auf sein System anpassen
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 27 Dezember 2021, 12:04:32
hi kjmEjfu
happy it works now...
I also use and like ser2net.
I am curious, why you prefer ser2net instead of running 2 fhem connected by fhem2fhem?
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: kjmEjfu am 27 Dezember 2021, 12:29:01
Zitat von: immi am 27 Dezember 2021, 12:04:32
I am curious, why you prefer ser2net instead of running 2 fhem connected by fhem2fhem?

Because I just connected a Pi Zero to my THZ. And I don't see any reason to install FHEM on this small device. More or less the Zero is only acting as a THZ-"bridge" and a lepresenced-device.

btw: maybe someone can update the Wiki-article?
ser2net >= V4.0 -> /etc/ser2net.yaml
ser2net < V4.0 -> /etc/ser2net.conf
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: martincfd am 21 Januar 2022, 13:26:05
I am experimenting with some settings and have used gradientHC1 = 0.0. The THZ504 always returns roomSetTemp + lowEndHC1, but the thz module computes 0.7+roomSetTemp + lowEndHC1, thus the 0.7 cannot be correct. Is this a 504 specific problem, or were those parameters in the curve computation routine obtained via curve fitting? For "standard" gradient values, the plotted heatSetTemp curve seems to be a good match so far.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 21 Januar 2022, 16:27:19
Zitat von: martincfd am 21 Januar 2022, 13:26:05
I am experimenting with some settings and have used gradientHC1 = 0.0. The THZ504 always returns roomSetTemp + lowEndHC1, but the thz module computes 0.7+roomSetTemp + lowEndHC1, thus the 0.7 cannot be correct. Is this a 504 specific problem, or were those parameters in the curve computation routine obtained via curve fitting?
Hi Martin
I expect you refer to the curve shown by fhem.
I do not want to discuss the relevance of a gradient of 0
The curve from tecalor is not documeted both for your heatpump and older models.
Here you can look how we fitted the curve from user data, just read the old topics
https://forum.fhem.de/index.php/topic,13132.msg166268.html#msg166268
here  you can find the current implementation at about line 2099
https://github.com/mhop/fhem-mirror/blob/master/fhem/FHEM/00_THZ.pm

happy to implement any improvements.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: martincfd am 21 Januar 2022, 21:52:21
Hi Immi,

Zitat von: immi am 21 Januar 2022, 16:27:19
Hi Martin
I expect you refer to the curve shown by fhem.
Yes, sorry for not being clear.

Zitat von: immi am 21 Januar 2022, 16:27:19
I do not want to discuss the relevance of a gradient of 0
Sakko has had an interesting idea, which works great for his thz (turn off integral part of PID). I still need further tests and some math for my own machine, but it definitely involves gradients close to zero (if possible even slightly negative). An exact heat curve function would be helpful, but the current one I already took from the THZ module is already pretty helpful.

Zitat von: immi am 21 Januar 2022, 16:27:19
happy to implement any improvements.
immi
If I have some time I will try to collect some data, e.g. using AT correction to get some data at different outside temperatures.
I will also try to look at pecularities of the 504er with 7.59 firmware. So far 5.39 works great but not for all values. E.g. compressor starts are missing, and the value of sComprRelPower just does not make sense.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 22 Januar 2022, 10:00:32
Zitat von: martincfd am 21 Januar 2022, 21:52:21
If I have some time I will try to collect some data, e.g. using AT correction to get some data at different outside temperatures.
The variables connected to the curves should all have enough variation, in order to fit a function
outside_tempFiltered roomSetTemp p13GradientHC1 LowEndHC1 p15RoomInfluenceHC1  insideTemp
the function should remain as simple as possible.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: martincfd am 24 Januar 2022, 09:44:07
Zitat von: immi am 22 Januar 2022, 10:00:32
The variables connected to the curves should all have enough variation, in order to fit a function
outside_tempFiltered roomSetTemp p13GradientHC1 LowEndHC1 p15RoomInfluenceHC1  insideTemp
the function should remain as simple as possible.
immi
As this is really only a very minor issue I will give it a try if I have some time and see if I can improve anything at all. It is clear that dependence on parameters should at most be linear and dependence on outside temp at most be cubic (or maybe a single power term). Dependence on insideTemp and roomInfluence is documented with a formula luckily.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 12 Juni 2022, 09:30:49
Zitat von: hellijo am 11 Juni 2022, 22:20:23
Hi immi,

the Protokoll looks like this:
  "F4hc1214" => [["outsideTemp: ", 4, 4, "hex2int", 10],
                 [" x08: ",  8, 4, "raw", 1],
                 [" 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],
                 [" onHysteresisNo: ", 32, 2, "hex", 1],
                 [" offHysteresisNo: ", 34, 2, "hex", 1],
                 [" hcBoosterStage: ", 36, 2, "hex", 1],
                 [" seasonMode: ", 38, 2, "somwinmode", 1],
                 [" x40: ", 40, 4, "raw", 1],
                 [" integralSwitch: ", 44, 4, "hex2int", 1],
                 [" hcOpMode: ", 48, 2, "opmodehc", 1],
                 [" x50: ", 50, 4, "raw", 1],
                 [" x54: ", 54, 4, "raw", 1],
                 [" x60: ", 58, 4, "raw", 1],
                 [" roomSetTemp: ", 62, 4, "hex2int", 10],
                 [" x66: ", 66, 4, "raw", 1],
                 [" x70: ",  70, 4, "raw", 1],
                 [" insideTempRC: ", 74, 4, "hex2int", 10],
                 [" x78: ", 78, 4, "raw", 1],
                 [" x82: ", 82, 4, "raw", 1],
                 [" ???Temp: ", 86, 4, "hex2int", 10]
         ],


PS.: hat die Reihenfolge Einfluss auf die Heizkurve?
BR Jörg
Hi 
the order in this list has no effect on the heating curve
nevertheless it has an effect on the order in the register
changing the order might be very annoying for other users, which relay on the the actual order.

I understand you changed insideTempRC: from starting at 68 to 72; what else?

p.s. please avoid ???Temp
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: hellijo am 12 Juni 2022, 14:05:55
Hi immi,

die Korrektur für sHC1 für die FW 2.14:


"F4hc1214" => [["outsideTemp: ", 4, 4, "hex2int", 10],
                 [" x08: ",  8, 4, "raw", 1],
                 [" 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],
                 [" onHysteresisNo: ", 32, 2, "hex", 1],
                 [" offHysteresisNo: ", 34, 2, "hex", 1],
                 [" hcBoosterStage: ", 36, 2, "hex", 1],
                 [" seasonMode: ", 38, 2, "somwinmode", 1],
                 [" x40: ", 40, 4, "raw", 1],
                 [" integralSwitch: ", 44, 4, "hex2int", 1],
                 [" hcOpMode: ", 48, 2, "opmodehc", 1],
                 [" x50: ", 50, 4, "raw", 1],
                 [" x54: ", 54, 4, "raw", 1],
                 [" x58: ", 58, 4, "raw", 1],
                 [" roomSetTemp: ", 62, 4, "hex2int", 10],
                 [" x66: ", 66, 4, "raw", 1],
                 [" x70: ",  70, 4, "raw", 1],
                 [" insideTempRC: ", 74, 4, "hex2int", 10],
                 [" x78: ", 78, 4, "raw", 1],
                 [" x82: ", 82, 4, "raw", 1],
                 [" Temp: ", 86, 4, "hex2int", 10]
         ],

Den letzen Wert und die Raw konnte ich noch nicht übersetzen.

Im Anhang sind die Basics der Übersetzung.
Der log Auszug, der Screenshot der Servicesoftware und die Aufsplittung des Signals.
Ich hoffe ich habe keine Fehler gemacht.

Der Test sah von sHC1 sah gut aus. Ich sehe in der Reihenfolge der Werte die Heizkurve nicht mehr.
Muss ich die Werte noch in der alten Reihenfolge sortieren?

Gruß Jörg
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: hellijo am 12 Juni 2022, 14:53:34
Zitat von: immi am 12 Juni 2022, 09:30:49
Hi 
the order in this list has no effect on the heating curve
nevertheless it has an effect on the order in the register
changing the order might be very annoying for other users, which relay on the the actual order.

I understand you changed insideTempRC: from starting at 68 to 72; what else?

p.s. please avoid ???Temp
immi

Yes the beginning of the Message for starting is changed.
And I added the Value für Temp which ist starting at 86 - but I don't know wich Temperatur it is - but ist look like a Temperatur.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 12 Juni 2022, 17:39:37
Zitat von: hellijo am 12 Juni 2022, 14:05:55
Der Test sah von sHC1 sah gut aus. Ich sehe in der Reihenfolge der Werte die Heizkurve nicht mehr.
Muss ich die Werte noch in der alten Reihenfolge sortieren?
sorry I gave you the wrong info:
The order matters; E.g. look at line 2055
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: hellijo am 15 Juni 2022, 21:34:13
Hi immi,

ich habe die unbekannten Strings wieder auf "raw" umgestellt.
Es sind zwar Stati in den Strings drin, aber nichts neues. HC Pumpe ein/aus oder Kompressor ein/aus.
Das sind aber alles Signale die im sGlobal schon vorhanden sind.
Ich konnte zumindest keine Signale mit einem Mehrwert zu den aktuellen Signalen erkennen.

Daher hier der Code mit den raw Strings.


"F4hc1214" => [["outsideTemp: ", 4, 4, "hex2int", 10],  [" x08: ", 8, 4, "raw", 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],
      [" integralSwitch: ", 44, 4, "hex2int", 1],  [" hcOpMode: ", 48, 2, "opmodehc", 1],
          [" roomSetTemp: ", 62, 4, "hex2int", 10],  [" x50: ", 50, 4, "raw", 10],
      [" x54: ",     54, 4, "raw", 10],  [" insideTempRC: ", 74, 4, "hex2int", 10],
      [" x66: ",     66, 4, "raw", 10],  [" x70: ", 70, 4, "raw", 10],
      [" onHysteresisNo: ", 32, 2, "hex", 1],  [" offHysteresisNo: ", 34, 2, "hex", 1],
      [" hcBoosterStage: ", 36, 2, "hex", 1],  [" x40: ", 40, 4, "raw", 1],
          [" x58: ",            58, 4, "raw", 10],  [" x78: ", 78, 4, "raw", 10],
          [" x82: ",            82, 4, "raw", 10],  [" x86: ", 86, 4, "raw", 10]
         ],


Gruß Jörg
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: hellijo am 23 Juni 2022, 09:41:44
Hallo immi, hallo Andre,

ich habe Andres Anpassung bei mir getestet:

    "F4hc1214" => [["outsideTemp: ", 4, 4, "hex2int", 10], [" x08: ", 8, 4, "raw", 1],
      [" 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],
      [" integralSwitch: ", 44, 4, "hex2int", 1], [" hcOpMode: ", 48, 2, "opmodehc", 1],      
          [" roomSetTemp: ", 62, 4, "hex2int", 10], [" x50: ", 50, 4, "hex2int", 10],
      [" x66: ", 66, 4, "raw", 1], [" insideTempRC: ", 74, 4, "hex2int", 10],
      [" x70: ", 70, 4, "raw", 1], [" x76: ", 78, 4, "raw", 1],
      [" onHysteresisNo: ", 32, 2, "hex", 1], [" offHysteresisNo: ", 34, 2, "hex", 1],
      [" hcStage: ", 36, 2, "hex", 1],# 0=Aus; 1=Solar; 2=V1
          [" boosterStage2: ", 40, 1, "bit3", 1],
          [" x58: ", 58, 4, "raw", 1], [" x54: ", 54, 4, "raw", 1],
          [" blockTimeAfterCompStart: ", 82, 4, "hex2int", 1], [" insideTemp: ", 86, 4, "hex2int", 10],
          [" solarPump: ", 40, 1, "bit2", 1],
  [" boosterStage1: ", 40, 1, "bit1", 1],
  [" compressor: ", 40, 1, "bit0", 1],
  [" heatPipeValve: ", 41, 1, "bit3", 1],
  [" diverterValve: ", 41, 1, "bit2", 1],
  [" dhwPump: ", 41, 1, "bit1", 1],
  [" heatingCircuitPump: ", 41, 1, "bit0", 1],
  [" mixerOpen: ", 43, 1, "bit1", 1],
  [" mixerClosed: ", 43, 1, "bit0", 1],
         ],

Nur der Wert bei Werteposition 86 sollte vielleicht "heatSetTempRC", "InsideTemp" passt nicht. Siehe Plot im Anhang.
In Braun ist die Innentemperatur.
Rot ist die Kurve "heatSetTemp" und Blau "x86".
Der erste Einbruch der Temepratur ist die programmtechnische Raumtemperaturabsenkung.
Der zweite Einbruch, hier hatte ich den Raumtemperatureinfluss auf 10 gestellt.
Der Anstieg danach, hier hatte ich den Raumtemperatureinfluss auf 0 gestellt.

Ich glaube man könnte den Code oben fix in das nächste THZ update einbinden.

VG Jörg
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 26 Juni 2022, 11:21:11
Zitat von: hellijo am 23 Juni 2022, 09:41:44
Nur der Wert bei Werteposition 86 sollte vielleicht "heatSetTempRC", "InsideTemp" passt nicht. Siehe Plot im Anhang.
In Braun ist die Innentemperatur.
Rot ist die Kurve "heatSetTemp" und Blau "x86".
Hi Jörg
if you change the order and position, you will beak all scripts, which are based on the order and position.
In your case probably you are defining  Innentemperatur with userseadings, and by inserting x50 you are shifting all the rest.
Suggestion: Put the newly discovered stuff at the end.


Changing the order might be very annoying for other users, which relay on the the actual order.
I have uploaded your code as firmware 2.14j, including  F4hc1214j.
in this way you can play arround without affecting other users.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Shenja am 23 Oktober 2022, 17:02:36
Guten Tag,

Ich betreibe die LWZ 403sol (sw 4.39) und würde gerne den Volumen Strom der Heizkreispumpe gerne erfassen.
Leider habe ich bisher keinen Parameter dafür gefunden in fhem.
An der LWZ wird dieser Wert doch bestimmt irgendwo erfasst. Manuel kann ich diesen Wert an der LWZ messen lassen, dauert aber immer ziemlich lange.
Könnte mir da jemand helfen?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 23 Oktober 2022, 18:58:35
Falscher Thread für solche Fragen. Schau mal auf der 1. Seite im 1. Beitrag. Dort ist der Link.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: LeJoke am 24 Oktober 2022, 09:09:40
Zitat von: Shenja am 23 Oktober 2022, 17:02:36
Guten Tag,

Ich betreibe die LWZ 403sol (sw 4.39) und würde gerne den Volumen Strom der Heizkreispumpe gerne erfassen.
Leider habe ich bisher keinen Parameter dafür gefunden in fhem.
An der LWZ wird dieser Wert doch bestimmt irgendwo erfasst. Manuel kann ich diesen Wert an der LWZ messen lassen, dauert aber immer ziemlich lange.
Könnte mir da jemand helfen?
FBglob-flowRate Pos. 110 sollte ist seit ein paar Jahren im Code (zumindest für sw 5.39 und funktioniert auf unserer 304). Ggf, aber auf der x03 nicht verfügbar oder an anderer Stelle ... evtl. mal per debug die komplette sGlob auslesen und die oberen Positionen durchsuchen
claus
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 15 November 2022, 19:28:57
Hi immi, I hope you are doing well!

I have not dealt with my Tecalor THZ 303SOL for a while, as it runs without problems (at least as far as I can tell) but now started to play with Home Assistant etc., which stirred again my interest about your very cool THZ module for FHEM. According to our conversation in June 2020 (https://forum.fhem.de/index.php/topic,33211.msg1061911.html#msg1061911) etc., there was no support for the 2.16 firmware, which I have on my heatpump, so I provided some further information I could get hold on. Referring to the available information about the different SE/Tecalor firmware...
THZ 303 INTEGRAL
2.03 (2002/01-2004/04)
2.05 (2004/04-2006/11)
2.06 (2006/12-2008/08)
THZ 303 SOL
2.14 (2002/10-2004/08)
2.15 (2004/09-2006/08)
2.16 (2006/09-2008/08)

... at that time, the FHEM THZ 2.06 FW was the one that worked best for me (with a few errors I reported back then). Is this FW version still the one that I should use? Thanks for your time and great work! :-)

PS: Where can I find some "ready-to-use/test" configs that draw some nice plots and maybe even have some buttons to control my 2.16 FW THZ 303SOL? Or should I ask this question over there? https://forum.fhem.de/index.php/topic,33452.0.html.html
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 15 November 2022, 20:37:18
Zitat von: sunrise am 15 November 2022, 19:28:57
... at that time, the FHEM THZ 2.06 FW was the one that worked best for me (with a few errors I reported back then). Is this FW version still the one that I should use? Thanks for your time and great work! :-)
Hi sunrise
the firmwares are still not documented from tecalor
no real big improvement in the last years; you can chose among 2.06, 2.14 or 2.14j (which I added for hellijo in Jun22)
Zitat
Or should I ask this question over there? https://forum.fhem.de/index.php/topic,33452.0.html.html
it makes sense
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 16 November 2022, 16:30:21
Zitat von: immi am 15 November 2022, 20:37:18Hi sunrise
the firmwares are still not documented from tecalor
no real big improvement in the last years; you can chose among 2.06, 2.14 or 2.14j (which I added for hellijo in Jun22)
I use the 2.06, and my FHEM instance is running on an old RPi 2 (fresh installation with latest Raspberry Pi OS lite 32bit and LXDE on top, with all packages up to date). I use ser2net and have the baud rate set to 9600.

Am I right that the "Mythz/RAW: THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow" messages are because if the poor performance of the RPi2. Or maybe due to the USB-serial adapter cable between the THZ and the RPi that is about 6 m long. Maybe too long? Apart from using a better host for FHEM or trying to place the host device (RPi etc.) closer to the heating with a shorter cable, is there anything else I should look at?

Besides, I see several error messages (see below). Would you mind having a look and let me know if there is something critical I need to deal with? Thank you so much!

2022.11.14 21:30:49 1: Including fhem.cfg
2022.11.14 21:30:51 3: WEB: port 8083 opened
2022.11.14 21:30:51 2: eventTypes: loaded 0 lines from ./log/eventTypes.txt
2022.11.14 21:30:51 1: Messages collected while initializing FHEM:SecurityCheck:
  WEB is not password protected

Protect this FHEM installation by defining an allowed device with define allowed allowed
You can disable this message with attr global motd none

2022.11.14 21:30:51 1: usb create starting
2022.11.14 21:30:51 3: Probing ZWDongle device /dev/serial0
2022.11.14 21:30:52 3: Probing CUL device /dev/ttyAMA0
2022.11.14 21:30:52 3: Probing TCM_ESP3 device /dev/ttyAMA0
2022.11.14 21:30:52 3: Probing ZWDongle device /dev/ttyAMA0
2022.11.14 21:30:52 3: Probing SIGNALDuino device /dev/ttyAMA0
2022.11.14 21:30:52 3: Probing MYSENSORS device /dev/ttyAMA0
2022.11.14 21:30:53 3: Probing ArduCounter device /dev/ttyAMA0
2022.11.14 21:30:53 3: Probing ElsnerWS device /dev/ttyAMA0
2022.11.14 21:30:54 3: Probing FRM device /dev/ttyAMA0
2022.11.14 21:30:59 1: usb create end
2022.11.14 21:30:59 0: Featurelevel: 6.1
2022.11.14 21:30:59 0: Server started with 6 defined entities (fhem.pl:26635/2022-11-01 perl:5.032001 os:linux user:fhem pid:1040)
2022.11.14 21:52:28 3: FHEMWEB WEB CSRF error:  ne csrf_656581069972857 for client WEB_192.168.178.81_57934 / command xmllist. For details see the csrfToken FHEMWEB attribute.
2022.11.15 18:07:03 0: Server shutdown
2022.11.15 18:07:14 1: Including fhem.cfg
2022.11.15 18:07:15 3: WEB: port 8083 opened
2022.11.15 18:07:15 2: eventTypes: loaded 1 lines from ./log/eventTypes.txt
2022.11.15 18:07:15 1: Including ./log/fhem.save
2022.11.15 18:07:15 1: Messages collected while initializing FHEM:SecurityCheck:
  WEB is not password protected

Protect this FHEM installation by defining an allowed device with define allowed allowed
You can disable this message with attr global motd none

2022.11.15 18:07:15 1: usb create starting
2022.11.15 18:07:15 3: Probing ZWDongle device /dev/serial0
2022.11.15 18:07:16 3: Probing CUL device /dev/ttyAMA0
2022.11.15 18:07:16 3: Probing TCM_ESP3 device /dev/ttyAMA0
2022.11.15 18:07:16 3: Probing ZWDongle device /dev/ttyAMA0
2022.11.15 18:07:16 3: Probing SIGNALDuino device /dev/ttyAMA0
2022.11.15 18:07:16 3: Probing MYSENSORS device /dev/ttyAMA0
2022.11.15 18:07:16 3: Probing ArduCounter device /dev/ttyAMA0
2022.11.15 18:07:17 3: Probing ElsnerWS device /dev/ttyAMA0
2022.11.15 18:07:18 3: Probing FRM device /dev/ttyAMA0
2022.11.15 18:07:23 1: usb create end
2022.11.15 18:07:23 0: Featurelevel: 6.1
2022.11.15 18:07:23 0: Server started with 6 defined entities (fhem.pl:26635/2022-11-01 perl:5.032001 os:linux user:fhem pid:416)
2022.11.15 18:31:49 3: Opening Mythz device pi.fritz.box:2000
2022.11.15 18:31:49 3: Mythz device opened
2022.11.15 18:31:50 3: Mythz/RAW: THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow
2022.11.15 18:33:02 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0A0574 ->
2022.11.15 18:33:05 3: Mythz/RAW: C70A010120009600C8003C
2022.11.15 18:35:26 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0A1732 ->
2022.11.15 18:37:47 3: THZ_Get: Error msg2:  decode: command not known -- FE -> 010302FE1003
2022.11.15 18:37:47 1: PERL WARNING: Use of uninitialized value $sFirmware in sprintf at ./FHEM/00_THZ.pm line 1084.
2022.11.15 18:39:59 1: PERL WARNING: Argument "C70A010120009600C8003C" isn't numeric in multiplication (*) at ./FHEM/00_THZ.pm line 1484.
2022.11.15 18:39:59 1: PERL WARNING: Argument "C70A010120009600C8003C" isn't numeric in addition (+) at ./FHEM/00_THZ.pm line 1484.
2022.11.15 18:40:09 1: PERL WARNING: Argument "120 # Internes Polling Fehlerspeicher" isn't numeric in numeric lt (<) at ./FHEM/00_THZ.pm line 1077.
2022.11.15 18:40:17 3: THZ_Get: Error msg3:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0A092B ->
2022.11.15 18:42:26 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0A0928 ->
2022.11.15 18:43:22 3: Opening Mythz device pi.fritz.box:2000
2022.11.15 18:43:22 3: Mythz device opened
2022.11.15 18:43:24 3: Mythz/RAW: THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow
2022.11.15 18:45:04 3: Opening Mythz device pi.fritz.box:2000
2022.11.15 18:45:04 3: Mythz device opened
2022.11.15 18:45:05 3: Mythz/RAW: THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow
2022.11.15 18:45:59 3: Opening Mythz device pi.fritz.box:2000
2022.11.15 18:45:59 3: Mythz device opened
2022.11.15 18:46:00 3: Mythz/RAW: THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow
2022.11.15 18:46:40 3: Opening Mythz device pi.fritz.box:2000
2022.11.15 18:46:40 3: Mythz device opened
2022.11.15 18:46:41 3: Mythz/RAW: THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow
2022.11.15 18:48:56 3: Opening Mythz device pi.fritz.box:2000
2022.11.15 18:48:56 3: Mythz device opened
2022.11.15 18:48:57 3: Mythz/RAW: THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow
2022.11.15 18:52:08 1: PERL WARNING: Argument "28800 # Internes Polling Intervall 8 Stunden" isn't numeric in numeric lt (<) at ./FHEM/00_THZ.pm line 1077.
2022.11.15 18:53:27 1: PERL WARNING: Argument "120 # Internes Polling Fehlerspeicher - auch schon mit 8..." isn't numeric in numeric lt (<) at ./FHEM/00_THZ.pm line 1077.
2022.11.15 18:54:03 1: PERL WARNING: Argument "300 # Internes Polling Intervall 5 Min." isn't numeric in numeric lt (<) at ./FHEM/00_THZ.pm line 1077.
2022.11.15 18:54:25 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0D ->
2022.11.15 18:54:25 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1460.
2022.11.15 18:54:25 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1488.
2022.11.15 18:57:31 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
2022.11.15 20:32:28 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
2022.11.15 20:37:38 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
2022.11.15 20:41:01 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.15 21:04:22 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
2022.11.15 21:30:28 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.15 21:34:31 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.15 22:22:39 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.15 23:26:28 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F3 ->
2022.11.15 23:44:28 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
2022.11.15 23:46:31 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F3 ->
2022.11.15 23:59:30 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.15 23:59:30 3: Mythz/RAW: 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
2022.11.16 00:19:32 3: THZ_Get: Error msg2:  decode: CRC error in request -- D1 -> 0102FEFB1003
2022.11.16 01:09:19 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
2022.11.16 01:33:01 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.16 01:33:03 3: Mythz/RAW: 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
2022.11.16 02:07:44 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
2022.11.16 02:20:25 3: THZ_Get: Error msg2:  decode: new unknown answer  -- D1 -> 018254D11003
2022.11.16 02:46:31 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.16 03:04:37 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.16 03:09:28 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
2022.11.16 03:14:00 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.16 07:06:41 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F3 ->
2022.11.16 07:21:45 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.16 07:49:51 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.16 09:13:26 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F3 ->
2022.11.16 10:38:06 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
2022.11.16 11:13:31 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F3 ->
2022.11.16 11:24:50 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
2022.11.16 11:37:34 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.16 12:13:35 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F3 ->
2022.11.16 12:36:28 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
2022.11.16 12:41:31 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
2022.11.16 13:05:44 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.16 13:24:55 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- FB ->
2022.11.16 14:29:15 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.16 15:45:25 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.16 15:49:28 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.16 16:03:32 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
2022.11.16 16:03:33 3: Mythz/RAW: 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
2022.11.16 16:15:36 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- D1 ->
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 16 November 2022, 21:57:37
My experience is that a shorter and better quality canle reduces the mentioned issues "InterfaceNotRespondig. Maybe too slow".
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 16 November 2022, 22:58:35
Hi Sunrise
you should pay attention to your config file: there is something very wrong here

2022.11.15 18:52:08 1: PERL WARNING: Argument "28800 # Internes Polling Intervall 8 Stunden" isn't numeric in numeric lt (<) at ./FHEM/00_THZ.pm line 1077.
2022.11.15 18:53:27 1: PERL WARNING: Argument "120 # Internes Polling Fehlerspeicher - auch schon mit 8..." isn't numeric in numeric lt (<) at ./FHEM/00_THZ.pm line 1077.
2022.11.15 18:54:03 1: PERL WARNING: Argument "300 # Internes Polling Intervall 5 Min." i


you should consider the hint from Willy on the cable
you can try all 3 2.06, 2.14 or 2.14j what is best for you
immi

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 17 November 2022, 13:47:10
Zitat von: willybauss am 16 November 2022, 21:57:37
My experience is that a shorter and better quality canle reduces the mentioned issues "InterfaceNotRespondig. Maybe too slow".

Ok, I will place my RPi with a shorter & hopefully better cable nearer to the heating.


Zitat von: immi am 16 November 2022, 22:58:35
Hi Sunrise
you should pay attention to your config file: there is something very wrong here

2022.11.15 18:52:08 1: PERL WARNING: Argument "28800 # Internes Polling Intervall 8 Stunden" isn't numeric in numeric lt (<) at ./FHEM/00_THZ.pm line 1077.
2022.11.15 18:53:27 1: PERL WARNING: Argument "120 # Internes Polling Fehlerspeicher - auch schon mit 8..." isn't numeric in numeric lt (<) at ./FHEM/00_THZ.pm line 1077.
2022.11.15 18:54:03 1: PERL WARNING: Argument "300 # Internes Polling Intervall 5 Min." i


you should consider the hint from Willy on the cable
you can try all 3 2.06, 2.14 or 2.14j what is best for you
immi

I assume that's because I had added comments to my commands when I executed them:

define Mythz THZ pi.fritz.box:2000
define FileLog_Mythz FileLog ./log/Mythz-%Y.log Mythz
attr Mythz interval_sGlobal 300 # Internes Polling Intervall 5 Min.
attr Mythz interval_sHistory 28800 # Internes Polling Intervall 8 Stunden
attr Mythz interval_sLast10errors 120 # Internes Polling Fehlerspeicher - auch schon mit 86400 gesehen
attr Mythz interval_sDHW 400
attr Mythz interval_sElectrDHWDay 2400
attr Mythz interval_sElectrDHWTotal 43200
attr Mythz interval_sHC1 400
attr Mythz interval_sHeatDHWDay 2400
attr Mythz interval_sHeatDHWTotal 43200
attr Mythz interval_sHeatRecoveredDay 2400
attr Mythz interval_sHeatRecoveredTotal 43200
attr Mythz event-min-interval s.*:4800
attr Mythz event-on-change-reading .*
attr Mythz userReadings insideSetTemp:sHC1.* {THZ_Val("sHC1",21)}, insideTemp:sHC1.* {THZ_Val("sHC1",27)}, AussenTemp:sGlobal.* {THZ_Val("sGlobal",1)}
attr Mythz firmware 2.06
attr Mythz room Keller
attr FileLog_Mythz room Keller


Apart from the comments (which I have to omit), do these values make sense?

attr Mythz interval_sGlobal 300
attr Mythz interval_sHistory 28800
attr Mythz interval_sLast10errors 120
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 17 November 2022, 15:23:12
Zitat von: sunrise am 17 November 2022, 13:47:10
Apart from the comments (which I have to omit), do these values make sense?
attr Mythz interval_sGlobal 300
attr Mythz interval_sHistory 28800
attr Mythz interval_sLast10errors 120

Hi sunrise
first: check in your firmware, if you can get the above register.
e.g. in some older tecalor there was not sLast10errors  or sHistory.
second: increase the intervall as  much as you can, in order to decrease the workload of your heatpump
e.g. why you need  sLast10errors every 2 minutes? I pull it every 8h
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 17 November 2022, 18:11:32
Zitat von: immi am 17 November 2022, 15:23:12
Hi sunrise
first: check in your firmware, if you can get the above register.
e.g. in some older tecalor there was not sLast10errors  or sHistory.
second: increase the intervall as  much as you can, in order to decrease the workload of your heatpump
e.g. why you need  sLast10errors every 2 minutes? I pull it every 8h
immi
Yes, it's there, as well as sHistory - see screenshots. And I have another observation, i.e. I restarted FHEM, and realised that the MyTHZ was completely gone. No big deal (though I wonder why it is gone - does it not "stick" after restart?), as I started the definition from scratch with more conservative timings:

define Mythz THZ pi.fritz.box:2000
define FileLog_Mythz FileLog ./log/Mythz-%Y.log Mythz
attr Mythz interval_sGlobal 300
attr Mythz interval_sHistory 28800
attr Mythz interval_sLast10errors 28800
attr Mythz interval_sDHW 300
attr Mythz interval_sElectrDHWDay 3600
attr Mythz interval_sElectrDHWTotal 43200
attr Mythz interval_sHC1 300
attr Mythz interval_sHeatDHWDay 3600
attr Mythz interval_sHeatDHWTotal 43200
attr Mythz interval_sHeatRecoveredDay 3600
attr Mythz interval_sHeatRecoveredTotal 43200
attr Mythz event-min-interval s.*:4800
attr Mythz event-on-change-reading .*
attr Mythz userReadings insideSetTemp:sHC1.* {THZ_Val("sHC1",21)}, insideTemp:sHC1.* {THZ_Val("sHC1",27)}, AussenTemp:sGlobal.* {THZ_Val("sGlobal",1)}
attr Mythz firmware 2.06
attr Mythz room Keller
attr FileLog_Mythz room Keller


The Log from the time point of the execution of these commands reads this:
2022.11.17 18:07:14 3: Opening Mythz device pi.fritz.box:2000
2022.11.17 18:07:14 3: Mythz device opened
2022.11.17 18:07:15 3: Mythz/RAW: THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow
So I am back to square one and to Willi's recommendation to check the cable.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 18 November 2022, 11:49:16
@immi

Sorry, I shall not use screenshots anymore, so here it is:

define Mythz THZ pi.fritz.box:2000
attr Mythz devStateIcon opened:10px-kreis-gruen disconnected:10px-kreis-rot
attr Mythz event-min-interval s.*:4800
attr Mythz event-on-change-reading .*
attr Mythz firmware 2.06
attr Mythz interval_sDHW 300
attr Mythz interval_sElectrDHWDay 3600
attr Mythz interval_sElectrDHWTotal 43200
attr Mythz interval_sGlobal 300
attr Mythz interval_sHC1 300
attr Mythz interval_sHeatDHWDay 3600
attr Mythz interval_sHeatDHWTotal 43200
attr Mythz interval_sHeatRecoveredDay 3600
attr Mythz interval_sHeatRecoveredTotal 43200
attr Mythz interval_sHistory 28800
attr Mythz interval_sLast10errors 28800
attr Mythz room Heating
attr Mythz userReadings insideSetTemp:sHC1.* {THZ_Val("sHC1",21)}, insideTemp:sHC1.* {THZ_Val("sHC1",27)}, AussenTemp:sGlobal.* {THZ_Val("sGlobal",1)}
#   CFGFN     
#   DEF        pi.fritz.box:2000
#   DeviceName pi.fritz.box:2000
#   FD         8
#   FUUID      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#   NAME       Mythz
#   NR         25
#   NTFY_ORDER 50-Mythz
#   PARTIAL   
#   STATE      opened
#   TYPE       THZ
#   VERSION    0.205
#   eventCount 36
#   READINGS:
#     2022-11-17 19:08:56   AussenTemp      8.9
#     2022-11-17 19:08:56   inputVentilatorPower 45 %
#     2022-11-17 19:06:29   mainVentilatorPower 0 %
#     2022-11-17 19:08:35   p01-p12         p01RoomTempDay: 20.5 p02RoomTempNight: 20.5 p03RoomTempStandby: 10 p04DHWsetTempDay: 48 p05DHWsetTempNight: 48 p06DHWsetTempStandby: 10 p07FanStageDay: 2 p08FanStageNight: 2 p09FanStageStandby: 2 p10HCTempManual: 35 p11DHWsetTempManual: 48 p12FanStageManual: 1
#     2022-11-17 19:08:59   p04DHWsetTempDay 48 °C
#     2022-11-17 19:08:35   p11DHWsetTempManual 48 °C
#     2022-11-17 19:08:43   p13GradientHC1  0.4
#     2022-11-17 19:06:21   p20FlowProportionHC2 100 %
#     2022-11-17 19:06:23   p21Hyst1        4 K
#     2022-11-17 19:09:05   p23Hyst3        3 K
#     2022-11-17 19:08:52   p44UnschedVent2 60 min
#     2022-11-17 19:09:02   p57OutTempMinPumpCycles 20 °C
#     2022-11-17 19:09:02   pCircPump       p54MinPumpCycles: 1 p55MaxPumpCycles: 288 p56OutTempMaxPumpCycles: 15 p57OutTempMinPumpCycles: 20 p58SuppressTempCaptPumpStart: 60
#     2022-11-17 19:08:37   pClockMonth     11
#     2022-11-17 19:08:41   pDHWProg        progDHWStartTime: 23:00 progDHWEndTime: 07:00 progDHWMonday: 1 progDHWTuesday: 1 progDHWWednesday: 1 progDHWThursday: 1 progDHWFriday: 1 progDHWSaturday: 1 progDHWSunday: 1 progDHWEnable: 0
#     2022-11-17 19:08:51   pFan            p37Fanstage1AirflowInlet: 100 p38Fanstage2AirflowInlet: 135 p39Fanstage3AirflowInlet: 170 p40Fanstage1AirflowOutlet: 100 p41Fanstage2AirflowOutlet: 135 p42Fanstage3AirflowOutlet: 170 p43UnschedVent3: 60 p44UnschedVent2: 60 p45UnschedVent1: 60 p46UnschedVent0: 60 p75PassiveCooling: 0
#     2022-11-17 19:08:47   pFanProg        progFAN1StartTime: 20:00 progFAN1EndTime: 09:00 progFAN1Monday: 1 progFAN1Tuesday: 1 progFAN1Wednesday: 1 progFAN1Thursday: 1 progFAN1Friday: 1 progFAN1Saturday: 1 progFAN1Sunday: 1 progFAN1Enable: 0 progFAN2StartTime: 13:30 progFAN2EndTime: 14:30 progFAN2Monday: 1 progFAN2Tuesday: 1 progFAN2Wednesday: 1 progFAN2Thursday: 1 progFAN2Friday: 1 progFAN2Saturday: 1 progFAN2Sunday: 1 progFAN2Enable: 0
#     2022-11-17 19:08:43   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
#     2022-11-17 19:09:05   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: 0 p79BoosterTimeoutHC: 20
#     2022-11-17 19:08:39   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
#     2022-11-17 19:06:19   progDHWMonday   1
#     2022-11-17 19:09:07   progDHWStartTime 23:00
#     2022-11-17 19:08:41   progDHWThursday 1
#     2022-11-17 19:09:09   progFAN1Monday  1
#     2022-11-17 19:08:57   progFAN2Enable  0
#     2022-11-17 19:08:47   progFAN2EndTime 14:30
#     2022-11-17 19:09:03   progFAN2Sunday  1
#     2022-11-17 19:08:45   progHC1Thursday 1
#     2022-11-17 19:08:53   progHC1Tuesday  1
#     2022-11-17 19:06:27   progHC2EndTime  08:00
#     2022-11-17 19:08:49   progHC2Sunday   1
#     2022-11-17 19:08:39   progHC2Wednesday 0
#     2022-11-17 19:08:56   sGlobal         outsideTemp: 8.9 flowTemp: 31.1 returnTemp: 29.9 hotGasTemp: 36.8 dhwTemp: 34.8 flowTempHC2: 0 evaporatorTemp: 15.9 condenserTemp: 30.4 mixerOpen: 0 mixerClosed: 0 heatPipeValve: 0 diverterValve: 0 dhwPump: 1 heatingCircuitPump: 0 solarPump: 0 compressor: 0 boosterStage3: 0 boosterStage2: 0 boosterStage1: 0 highPressureSensor: 1 lowPressureSensor: 1 evaporatorIceMonitor: 1 signalAnode: 0 evuRelease: n.a. ovenFireplace: 0 STB: n.a. outputVentilatorPower: 45 inputVentilatorPower: 45 mainVentilatorPower: 0 outputVentilatorSpeed: 24 inputVentilatorSpeed: 21 mainVentilatorSpeed: 0 outsideTempFiltered: 10 relHumidity: n.a. dewPoint: n.a. P_Nd: n.a. P_Hd: n.a. actualPower_Qc: n.a. actualPower_Pel: n.a. collectorTemp: 81 insideTemp: 0
#     2022-11-17 19:08:37   sTimedate       Weekday: Thursday pClockHour: 19 pClockMinutes: 9 Sec: 12 pClockYear: 22 pClockMonth: 11 pClockDay: 17
#     2022-11-17 19:05:12   state           opened
#     2022-11-17 19:09:14   z_Last_fhem_err THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 10 ->
#   helper:
#
setstate Mythz opened
setstate Mythz 2022-11-17 19:08:56 AussenTemp 8.9
setstate Mythz 2022-11-17 19:08:56 inputVentilatorPower 45 %
setstate Mythz 2022-11-17 19:06:29 mainVentilatorPower 0 %
setstate Mythz 2022-11-17 19:08:35 p01-p12 p01RoomTempDay: 20.5 p02RoomTempNight: 20.5 p03RoomTempStandby: 10 p04DHWsetTempDay: 48 p05DHWsetTempNight: 48 p06DHWsetTempStandby: 10 p07FanStageDay: 2 p08FanStageNight: 2 p09FanStageStandby: 2 p10HCTempManual: 35 p11DHWsetTempManual: 48 p12FanStageManual: 1
setstate Mythz 2022-11-17 19:08:59 p04DHWsetTempDay 48 °C
setstate Mythz 2022-11-17 19:08:35 p11DHWsetTempManual 48 °C
setstate Mythz 2022-11-17 19:08:43 p13GradientHC1 0.4
setstate Mythz 2022-11-17 19:06:21 p20FlowProportionHC2 100 %
setstate Mythz 2022-11-17 19:06:23 p21Hyst1 4 K
setstate Mythz 2022-11-17 19:09:05 p23Hyst3 3 K
setstate Mythz 2022-11-17 19:08:52 p44UnschedVent2 60 min
setstate Mythz 2022-11-17 19:09:02 p57OutTempMinPumpCycles 20 °C
setstate Mythz 2022-11-17 19:09:02 pCircPump p54MinPumpCycles: 1 p55MaxPumpCycles: 288 p56OutTempMaxPumpCycles: 15 p57OutTempMinPumpCycles: 20 p58SuppressTempCaptPumpStart: 60
setstate Mythz 2022-11-17 19:08:37 pClockMonth 11
setstate Mythz 2022-11-17 19:08:41 pDHWProg progDHWStartTime: 23:00 progDHWEndTime: 07:00 progDHWMonday: 1 progDHWTuesday: 1 progDHWWednesday: 1 progDHWThursday: 1 progDHWFriday: 1 progDHWSaturday: 1 progDHWSunday: 1 progDHWEnable: 0
setstate Mythz 2022-11-17 19:08:51 pFan p37Fanstage1AirflowInlet: 100 p38Fanstage2AirflowInlet: 135 p39Fanstage3AirflowInlet: 170 p40Fanstage1AirflowOutlet: 100 p41Fanstage2AirflowOutlet: 135 p42Fanstage3AirflowOutlet: 170 p43UnschedVent3: 60 p44UnschedVent2: 60 p45UnschedVent1: 60 p46UnschedVent0: 60 p75PassiveCooling: 0
setstate Mythz 2022-11-17 19:08:47 pFanProg progFAN1StartTime: 20:00 progFAN1EndTime: 09:00 progFAN1Monday: 1 progFAN1Tuesday: 1 progFAN1Wednesday: 1 progFAN1Thursday: 1 progFAN1Friday: 1 progFAN1Saturday: 1 progFAN1Sunday: 1 progFAN1Enable: 0 progFAN2StartTime: 13:30 progFAN2EndTime: 14:30 progFAN2Monday: 1 progFAN2Tuesday: 1 progFAN2Wednesday: 1 progFAN2Thursday: 1 progFAN2Friday: 1 progFAN2Saturday: 1 progFAN2Sunday: 1 progFAN2Enable: 0
setstate Mythz 2022-11-17 19:08:43 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
setstate Mythz 2022-11-17 19:09:05 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: 0 p79BoosterTimeoutHC: 20
setstate Mythz 2022-11-17 19:08:39 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
setstate Mythz 2022-11-17 19:06:19 progDHWMonday 1
setstate Mythz 2022-11-17 19:09:07 progDHWStartTime 23:00
setstate Mythz 2022-11-17 19:08:41 progDHWThursday 1
setstate Mythz 2022-11-17 19:09:09 progFAN1Monday 1
setstate Mythz 2022-11-17 19:08:57 progFAN2Enable 0
setstate Mythz 2022-11-17 19:08:47 progFAN2EndTime 14:30
setstate Mythz 2022-11-17 19:09:03 progFAN2Sunday 1
setstate Mythz 2022-11-17 19:08:45 progHC1Thursday 1
setstate Mythz 2022-11-17 19:08:53 progHC1Tuesday 1
setstate Mythz 2022-11-17 19:06:27 progHC2EndTime 08:00
setstate Mythz 2022-11-17 19:08:49 progHC2Sunday 1
setstate Mythz 2022-11-17 19:08:39 progHC2Wednesday 0
setstate Mythz 2022-11-17 19:08:56 sGlobal outsideTemp: 8.9 flowTemp: 31.1 returnTemp: 29.9 hotGasTemp: 36.8 dhwTemp: 34.8 flowTempHC2: 0 evaporatorTemp: 15.9 condenserTemp: 30.4 mixerOpen: 0 mixerClosed: 0 heatPipeValve: 0 diverterValve: 0 dhwPump: 1 heatingCircuitPump: 0 solarPump: 0 compressor: 0 boosterStage3: 0 boosterStage2: 0 boosterStage1: 0 highPressureSensor: 1 lowPressureSensor: 1 evaporatorIceMonitor: 1 signalAnode: 0 evuRelease: n.a. ovenFireplace: 0 STB: n.a. outputVentilatorPower: 45 inputVentilatorPower: 45 mainVentilatorPower: 0 outputVentilatorSpeed: 24 inputVentilatorSpeed: 21 mainVentilatorSpeed: 0 outsideTempFiltered: 10 relHumidity: n.a. dewPoint: n.a. P_Nd: n.a. P_Hd: n.a. actualPower_Qc: n.a. actualPower_Pel: n.a. collectorTemp: 81 insideTemp: 0
setstate Mythz 2022-11-17 19:08:37 sTimedate Weekday: Thursday pClockHour: 19 pClockMinutes: 9 Sec: 12 pClockYear: 22 pClockMonth: 11 pClockDay: 17
setstate Mythz 2022-11-17 19:05:12 state opened
setstate Mythz 2022-11-17 19:09:14 z_Last_fhem_err THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 10 ->


With the exception of the "too slow" and "interface not responding" message, this seems to be ok. Do you agree?

I looked into the commandref about the THZ but could not find an explanation for the meaning of these attributes:

interval_sDHW
interval_sElectrDHWDay
interval_sElectrDHWTotal
interval_sGlobal
interval_sHC1
interval_sHeatDHWDay
interval_sHeatDHWTotal
interval_sHeatRecoveredDay
interval_sHeatRecoveredTotal
interval_sHistory
interval_sLast10errors


Some of them I think I know about (e.g., DHW=domestic heating water?) but others I have no idea about. If I looked in the wrong place, where can I find more background information about them?

Is there a GitHub repo (e.g. https://github.com/mhop/fhem-mirror/blob/master/fhem/FHEM/00_THZ.pm), where I could find more information and maybe ask questions or report issues about the THZ module?

Or rather there? https://svn.fhem.de/trac/browser/trunk/fhem/FHEM/00_THZ.pm
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 19 November 2022, 17:14:48
Zitat von: willybauss am 16 November 2022, 21:57:37
My experience is that a shorter and better quality canle reduces the mentioned issues "InterfaceNotRespondig. Maybe too slow".
@immi
Now I have attached a new cable (3 wires à 2.5 mm² each, 10 cm long) between the serial plug at the THZ and the USB-serial adapter (Prolific). I still have these "too slow" messages:

2022.11.19 16:58:16 1: pi.fritz.box:2000 reappeared (Mythz)
2022.11.19 16:58:19 3: Mythz/RAW: THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow
2022.11.19 16:59:38 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0B ->
2022.11.19 16:59:38 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1460.
2022.11.19 16:59:38 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1488.
2022.11.19 17:06:31 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0D ->
2022.11.19 17:10:12 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0D ->


What are the other warnings and errors about?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 21 November 2022, 18:38:55
@immi @willi
Despite the very short cable and another USB-serial adapter I still see these messages. What else can I do about them? Thanks for your help! :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 21 November 2022, 18:43:22
Is there really no change - number of such messages per day is still same as before?
Then I don't have an idea.
In my case the number of such issues decreased by >80% by using a better cable connection.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 21 November 2022, 19:53:31
There are even more messages, so I fear that I messed with the cable soldering. Which kind of cable and plug do you use? Do you have a USB-serial adapter or have you connected the 3 serial wires (Tx, Rx, GND) directly to your e.g. Raspberry Pi GPIOs?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 21 November 2022, 19:59:16
USB-serial adapter. But am using a shielded cable; shield to be connected to ground as always for shieldings. 2.5mm² isn't a sign of quality for a data cable at all. Such cable is for high current usage, not for data transmission. But with 10cm a shielding may also not make sense.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 21 November 2022, 20:21:24
Yes, I agree with you. I didn't mean that the 2.5 mm² was good for this, but just wanted to let you know. And indeed there increase of numbers of these messages seems to correlate with the new but unshielded cable. What the exact reason is. I don't know yet, but I will switch back to the original cable (3 wires. rather thin, but shielded). About the shield (thin foil): Where should I connect it to? The old cable (with less problems) is shown in the screenshots.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 21 November 2022, 21:23:16
Shield goes always to Ground connection; for Sub-D 9 this is pin 5:
https://jo-fri.github.io/Eisenbahn/ProLok/download/RS232Pinbelegung.pdf (https://jo-fri.github.io/Eisenbahn/ProLok/download/RS232Pinbelegung.pdf)

Connect just the Sub-D side to ground, but let the opposite side unconnected.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: hellijo am 22 November 2022, 10:06:37
Zitat von: willybauss am 21 November 2022, 21:23:16
Shield goes always to Ground connection; for Sub-D 9 this is pin 5:
https://jo-fri.github.io/Eisenbahn/ProLok/download/RS232Pinbelegung.pdf (https://jo-fri.github.io/Eisenbahn/ProLok/download/RS232Pinbelegung.pdf)

Connect just the Sub-D side to ground, but let the opposite side unconnected.

I have the wiring as described. Sometimes the error message appears that the heat pump is responding too slowly.
You also get the error message if you query data too quickly in a row.

I had discussed this with andre.k and he also suspects that it is due to the connection being established. No handshake to know that there is a correct connection.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 22 November 2022, 16:56:33
What do you mean about the handshake? It's there none? Should there be one? I have now ordered a female Sub-D9 screw port and hope to get improved connectivity. BTW, the baud rate (ser2net.yaml) is set to 9600, i.e. according to what I understand should be used for older THZs (without the "iPod" dial but with the plain LCD display with rubber buttons). Do I have to set the baud rate elsewhere, too?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 26 November 2022, 17:25:30
@immi @willybauss
I have now a new cable connection (shielded) with only very few "too slow" messages. Maybe it's because of the slow RPi2 and/or the slow serial connection (9600 baud rate) of this old heating.

However, I'm not sure what these mean:

2022.11.26 16:52:04 3: Mythz/RAW: THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow
2022.11.26 17:03:04 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 17 ->
2022.11.26 17:03:04 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1460.
2022.11.26 17:03:04 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1488.
2022.11.26 17:18:33 3: THZ_Set: Error msg:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0180051700CF00CD006401E001E00064020202015E01E0011003 ->
2022.11.26 18:12:25 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
2022.11.26 18:22:28 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 28 November 2022, 15:45:31
By the way, does it matter on which side of the cable the shield is grounded?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 28 November 2022, 18:07:43
raspi side
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 29 November 2022, 10:54:59
@willybauss @immi
Vielen Dank! I have corrected the shield to be grounded on the Raspi's side of the cable.

The "Can't connect" below seems to appear at a time when the USB serial connection (ser2net) has not yet been established but does not seem to matter, as I can later read and change the values under "Mythz". BTW, 2000 is the port defined in ser2net.yaml.
2022.11.29 10:11:47 3: Opening Mythz device pi.fritz.box:2000
2022.11.29 10:11:47 1: Mythz: Can't connect to pi.fritz.box:2000: Invalid argument


Unfortunately, I still see "too slow" messages in the log:
2022.11.29 10:11:35 0: Server shutdown
2022.11.29 10:11:46 1: Including fhem.cfg
2022.11.29 10:11:47 3: WEB: port 8083 opened
2022.11.29 10:11:47 2: eventTypes: loaded 211 lines from ./log/eventTypes.txt
2022.11.29 10:11:47 3: Opening Mythz device pi.fritz.box:2000
2022.11.29 10:11:47 1: Mythz: Can't connect to pi.fritz.box:2000: Invalid argument
2022.11.29 10:11:47 1: Including ./log/fhem.save
2022.11.29 10:11:47 1: Messages collected while initializing FHEM:SecurityCheck:
  WEB is not password protected

Protect this FHEM installation by defining an allowed device with define allowed allowed
You can disable this message with attr global motd none

2022.11.29 10:11:47 1: usb create starting
2022.11.29 10:11:48 3: Probing ZWDongle device /dev/serial0
2022.11.29 10:11:48 3: Probing CUL device /dev/ttyAMA0
2022.11.29 10:11:48 3: Probing TCM_ESP3 device /dev/ttyAMA0
2022.11.29 10:11:48 3: Probing ZWDongle device /dev/ttyAMA0
2022.11.29 10:11:48 3: Probing SIGNALDuino device /dev/ttyAMA0
2022.11.29 10:11:49 3: Probing MYSENSORS device /dev/ttyAMA0
2022.11.29 10:11:49 3: Probing ArduCounter device /dev/ttyAMA0
2022.11.29 10:11:49 3: Probing ElsnerWS device /dev/ttyAMA0
2022.11.29 10:11:50 3: Probing FRM device /dev/ttyAMA0
2022.11.29 10:11:55 3: Probing TCM_ESP3 device /dev/ttyUSB0
2022.11.29 10:11:56 3: Probing TCM_ESP2 device /dev/ttyUSB0
2022.11.29 10:11:56 3: Probing FHZ device /dev/ttyUSB0
2022.11.29 10:11:56 3: Probing TRX device /dev/ttyUSB0
2022.11.29 10:11:57 3: Probing ZWDongle device /dev/ttyUSB0
2022.11.29 10:11:58 3: Probing SIGNALDuino device /dev/ttyUSB0
2022.11.29 10:11:58 3: Probing MYSENSORS device /dev/ttyUSB0
2022.11.29 10:11:59 3: Probing ArduCounter device /dev/ttyUSB0
2022.11.29 10:11:59 3: Probing ElsnerWS device /dev/ttyUSB0
2022.11.29 10:12:00 3: Probing FRM device /dev/ttyUSB0
2022.11.29 10:12:06 1: usb create end
2022.11.29 10:12:06 0: Featurelevel: 6.1
2022.11.29 10:12:06 0: Server started with 9 defined entities (fhem.pl:26635/2022-11-01 perl:5.032001 os:linux user:fhem pid:421)
2022.11.29 10:12:06 1: pi4.fritz.box:1883 reappeared (MyMQTT)
2022.11.29 10:12:52 1: pi.fritz.box:2000 reappeared (Mythz)
2022.11.29 10:12:54 3: Mythz/RAW: THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow
2022.11.29 10:21:49 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 06 ->
2022.11.29 10:24:30 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 07 ->
2022.11.29 10:26:43 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0D ->
2022.11.29 10:26:43 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1460.
2022.11.29 10:26:43 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1488.
2022.11.29 10:30:13 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 07 ->
2022.11.29 10:34:28 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- 0A ->
2022.11.29 10:34:29 3: Mythz/RAW: 01021A171003decode: CRC error in request

It seems that the RPi2 is not apt for fhem. At least in my case, I don't know what else I could do (except changing the RPi hardware).

Do you know if the PERL WARNINGs are related to the "too slow" problem?
2022.11.29 10:26:43 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1460.
2022.11.29 10:26:43 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1488.


It's about these code lines ($msg2 variable in second last row):
    if(defined($parent) ) {
        my ($seconds, $microseconds) = gettimeofday();
        $seconds= abs($seconds - time_str2num(ReadingsTimestamp($name, $parent, "1970-01-01 01:00:00")));
        my $risultato=ReadingsVal($name, $parent, 0);
        $risultato=THZ_Get($hash, $name, $parent) if ($seconds > 29 ); #update of the parent: if under 29sec use the current value
        #$risultato=THZ_Parse1($hash,"B81700C800BE00A001C20190006402010000E601D602");
        my $parenthash=$gets{$parent}; my $parsingrule = $parsinghash{$parenthash->{type}};
        my $i=0;
        for  (@$parsingrule) {
            last if ((@$parsingrule[$i]->[0]) =~ m/$cmd/);
            $i++;
            }
        $msg2=(split ' ', $risultato)[$i*2+1];
        Log3 $hash->{NAME}, 5, "THZ_split: $msg2 --- $risultato";
    }


And the context of the second warning (line 1488) is this:
    my $unit = $cmdhash->{unit};
    $msg2 = $msg2 .  $unit  if(defined($unit)) ;
    my $activatetrigger =1;
    readingsSingleUpdate($hash, $cmd, $msg2, $activatetrigger);
    return ($msg2);  
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: zimb0 am 29 November 2022, 14:18:50
Hi all,

sFirmware version: 07.59
sFirmware-Id HW: 239 SW: 4.04 Date: JUN 18 2018

Which attr Firmware should I choose?`
Running without attribute in the past, just changed to 5.39 (which is wrong I think).
However after setting 5.39 I can read and write  p99PumpRateDHW and p99PumpRateHC
Can I Stick to 5.39?

Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 29 November 2022, 15:43:17
Seeing the frequency of these "too slow" messages, would the experts here see this as a problem that I definitely should address, or is this something I can and should live with? I ask in order to better understand if the current status could become a "show stopper" for me?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 29 November 2022, 16:59:11
I have replaced the RPi2 by a VM on a Symphony Diskstation DS918+ with 2GB RAM for the Debian 64bit guest OS and chem installed and Mythz defined. I still get "too slow" messages. Ser2net.yaml contains this:

define: &banner \r\nser2net port \p device \d [\B] (Debian GNU/Linux)\r\n\r\n

connection: &con0096
   accepter: tcp,2000
    enable: on
    options:
      banner: *banner
      kickolduser: true
      telnet-brk-on-sync: true
    connector: serialdev,
              /dev/ttyUSB0,
              9600n81,local

The baud rate set to 9600 should be correct for my old THZ 303 SOL, right?
I'm really lost as to what causes these messages. Maybe it's because my firmware is not officially supported?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 29 November 2022, 21:47:02
if there's nothing else but some messages, please try to ignore.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 29 November 2022, 21:48:14
Zitat von: zimb0 am 29 November 2022, 14:18:50
Hi all,

sFirmware version: 07.59
sFirmware-Id HW: 239 SW: 4.04 Date: JUN 18 2018

Which attr Firmware should I choose?`
Running without attribute in the past, just changed to 5.39 (which is wrong I think).
However after setting 5.39 I can read and write  p99PumpRateDHW and p99PumpRateHC
Can I Stick to 5.39?
must be answered by immi; don'tknow
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 09 Dezember 2022, 17:51:06
Zitat von: sunrise am 29 November 2022, 16:59:11
I'm really lost as to what causes these messages. Maybe it's because my firmware is not officially supported?
Hi Sunrise
no firmware is officially supported,  it is a hobby from my side.
Moreover we are using a debugging interface to implement an IOT feature. Considering no documentation from tecalor, I am always surprised that it works.
With my firmware, I get circa 1 errors every 10 weeks.

Zitat
Do you know if the PERL WARNINGs line 1460&1488 are related to the "too slow" problem?
yes
ignore the remaing errors.

Zitat von: sunrise am 26 November 2022, 17:25:30
@immi @willybauss
I have now a new cable connection (shielded) with only very few "too slow" messages. Maybe it's because of the slow RPi2 and/or the slow serial connection (9600 baud rate) of this old heating.

No, the problem is in your heapump.
Several users in forum confirmed that older firmware seams to get stuck every now and than.
My last hint: increase the intervalls as  much as you can live with, in order to decrease the workload of your heatpump microcontroller.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 09 Dezember 2022, 21:12:30
Zitat von: zimb0 am 29 November 2022, 14:18:50
sFirmware version: 07.59 sFirmware-Id HW: 239 SW: 4.04 Date: JUN 18 2018
Which attr Firmware should I choose?`
Can I Stick to 5.39?
for sure you can; 5.39 is the latest.
Just chose the one, which works better with your firmware.
Only after someone finds something new in the 7.59, i can try to implement it
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: zimb0 am 10 Dezember 2022, 20:14:59
Zitat von: immi am 09 Dezember 2022, 21:12:30
for sure you can; 5.39 is the latest.
Just chose the one, which works better with your firmware.
Only after someone finds something new in the 7.59, i can try to implement it

Ty, so I will stick at 5.39
my problem is that I cant see all compressor related values.
So sHumMaskingTime etc is there,
sHeatingRelPower
sComprRelPower
sComprRotUnlimit are missing.

my %getsonly539 = (  #info from belu and godmorgon
  "sFlowRate" => {cmd2=>"0A033B", type =>"1clean", unit =>" cl/min"},
  "sHumMaskingTime" => {cmd2=>"0A064F", type =>"1clean", unit =>" min"},
  "sHumThreshold" => {cmd2=>"0A0650", type =>"1clean", unit =>" %"},
  "sHeatingRelPower" => {cmd2=>"0A069A", type =>"1clean", unit =>" %"},
  "sComprRelPower" => {cmd2=>"0A069B", type =>"1clean", unit =>" %"},
  "sComprRotUnlimit" => {cmd2=>"0A069C", type =>"1clean", unit =>" Hz"},
  "sComprRotLimit" => {cmd2=>"0A069D", type =>"1clean", unit =>" Hz"},
  "sOutputReduction" => {cmd2=>"0A06A4", type =>"1clean", unit =>" %"},
  "sOutputIncrease" => {cmd2=>"0A06A5", type =>"1clean", unit =>" %"},
  "sHumProtection" => {cmd2=>"0A09D1", type =>"1clean", unit =>""},
  "sSetHumidityMin" => {cmd2=>"0A09D2", type =>"1clean", unit =>" %"},
  "sSetHumidityMax" => {cmd2=>"0A09D3", type =>"1clean", unit =>" %"},
  "sCoolHCTotal" => {cmd2=>"0A0648", cmd3 =>"0A0649", type =>"1clean", unit =>" kWh"},
  "sDewPointHC1" => {cmd2=>"0B0264", type =>"5temp",  unit =>" °C"}
);


Is my fw to old to display this values?
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 10 Dezember 2022, 21:44:21
Zitat von: zimb0 am 10 Dezember 2022, 20:14:59
Is my fw to old to display this values?
no idea
maybe your tecalor do not present such values
maybe it just uses diffrent address for these registers

in the second case you have to reverse eng your heatpump and find the right cmd2=>"0A0XXX" by trial and error
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 12 Dezember 2022, 11:35:54
Zitat von: immi am 09 Dezember 2022, 17:51:06
[...]
No, the problem is in your heapump.
Several users in forum confirmed that older firmware seams to get stuck every now and than.
My last hint: increase the intervalls as  much as you can live with, in order to decrease the workload of your heatpump microcontroller.

Can there be intervals set too short? The shortest is 300 seconds = 5 minutes. I can hardly believe that my THZ firmware/board is too slow to cope with 5 minutes intervals, but maybe I'm wrong? Ah, maybe the "event-on-change-reading .*"? How should I change it? Anything else? I know that you do all this as a hobby and I am both impressed by the time you invest and the help you offer - thank you so much for it! :)

attr Mythz event-min-interval s.*:3600
attr Mythz event-on-change-reading .*
attr Mythz firmware 2.06
attr Mythz interval_sDHW 300
attr Mythz interval_sElectrDHWDay 3600
attr Mythz interval_sElectrDHWTotal 28800
attr Mythz interval_sGlobal 600
attr Mythz interval_sHC1 300
attr Mythz interval_sHeatDHWDay 3600
attr Mythz interval_sHeatDHWTotal 28800
attr Mythz interval_sHeatRecoveredDay 3600
attr Mythz interval_sHeatRecoveredTotal 28800
attr Mythz interval_sHistory 28800
attr Mythz interval_sLast10errors 28800
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 12 Dezember 2022, 12:04:33
Zitat von: sunrise am 12 Dezember 2022, 11:35:54
Can there be intervals set too short? The shortest is 300 seconds = 5 minutes. I can hardly believe that my THZ firmware/board is too slow to cope with 5 minutes intervals, but maybe I'm wrong?
my cheap understanding:
your tecalor processes lots of task; older tecalor do not like some requests from serial interface, when they are busy with them self.
If you disturb your tecalor every 5 min, it is more likely that you surprise your tecalor.
I would set it to 10 min for older hetpumps.

Zitat
Ah, maybe the "event-on-change-reading .*"? How should I change it? Anything else? I know that you do all this as a hobby and I am both impressed by the time you invest and the help you offer - thank you so much for it! :)
no problem, it is fhem only; the tecalor does not see it
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: joker4791 am 13 Dezember 2022, 12:32:20
Hi,

when trying to change setting 'pClockHour' the new value it is not accepted. The other values (pClockMinutes, pClockDay, pClockMonth, pClockYear) can be changed as expected. Am I the only one who is experiencing this problem?

Best regards,
j.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 14 Dezember 2022, 06:34:32
Zitat von: joker4791 am 13 Dezember 2022, 12:32:20
Hi,
when trying to change setting 'pClockHour' the new value it is not accepted. The other values (pClockMinutes, pClockDay, pClockMonth, pClockYear) can be changed as expected. Am I the only one who is experiencing this problem?
Best regards,
j.
please set the verbose to 5 in the module and post the relevant log;
thanks
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: joker4791 am 14 Dezember 2022, 12:34:29
OK, here it is:
2022.12.14 11:28:59 5: write command (parsed element/pos/len/dec/parsingtype): 0 / 6 / 2 / 1 / hex
2022.12.14 11:28:59 5: THZ_Set: 'pClockHour 0A 0A01250A00' ... Check if port is open. State = '(opened)'
2022.12.14 11:28:59 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2022.12.14 11:28:59 5: Mythz sending 02
2022.12.14 11:28:59 5: SW: 02
2022.12.14 11:28:59 5: Mythz start Function THZ_ReadAnswer
2022.12.14 11:28:59 5: THZ_ReadAnswer: uc unpack: '10'
2022.12.14 11:28:59 5: Mythz sending 0180BB0A01250A001003
2022.12.14 11:28:59 5: SW: 0180BB0A01250A001003
2022.12.14 11:28:59 5: Mythz start Function THZ_ReadAnswer
2022.12.14 11:28:59 5: THZ_ReadAnswer: uc unpack: '10'
2022.12.14 11:28:59 5: Mythz start Function THZ_ReadAnswer
2022.12.14 11:28:59 5: THZ_ReadAnswer: uc unpack: '02'
2022.12.14 11:28:59 5: Mythz sending 10
2022.12.14 11:28:59 5: SW: 10
2022.12.14 11:28:59 5: Mythz start Function THZ_ReadAnswer
2022.12.14 11:28:59 5: THZ_ReadAnswer: uc unpack: '01808B0A1003'
2022.12.14 11:28:59 5: Mythz sending 10
2022.12.14 11:28:59 5: SW: 10
2022.12.14 11:28:59 5: THZ_Get: Try to get 'pClockHour'
2022.12.14 11:28:59 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2022.12.14 11:28:59 5: Mythz sending 02
2022.12.14 11:28:59 5: SW: 02
2022.12.14 11:28:59 5: Mythz start Function THZ_ReadAnswer
2022.12.14 11:28:59 5: THZ_ReadAnswer: uc unpack: '10'
2022.12.14 11:28:59 5: Mythz sending 0100310A01251003
2022.12.14 11:28:59 5: SW: 0100310A01251003
2022.12.14 11:28:59 5: Mythz start Function THZ_ReadAnswer
2022.12.14 11:28:59 5: THZ_ReadAnswer: uc unpack: '10'
2022.12.14 11:28:59 5: Mythz start Function THZ_ReadAnswer
2022.12.14 11:28:59 5: THZ_ReadAnswer: uc unpack: '02'
2022.12.14 11:28:59 5: Mythz sending 10
2022.12.14 11:28:59 5: SW: 10
2022.12.14 11:28:59 5: Mythz start Function THZ_ReadAnswer
2022.12.14 11:28:59 5: THZ_ReadAnswer: uc unpack: '01003C0A01250B001003'
2022.12.14 11:28:59 5: Mythz sending 10
2022.12.14 11:28:59 5: SW: 10
2022.12.14 11:28:59 5: Parse message: 3C0A01250B00
2022.12.14 11:28:59 5: Message length: 12


at 11:28 I sent 'pClockHour' = '10', but as answer in the receiving dialog it says '11'. Also when reading that parameter the value still is '11'.

Best regards,
j.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Stonemuc am 18 Dezember 2022, 08:53:17
 x08 is outside temp. filtered
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: Yepp84 am 18 Dezember 2022, 15:25:52
Hi zusammen,
ich habe heute bemerkt das mir die Variable, sLast10errors nur die letzten 4 Fehler anzeigt. Der Zahler number of faults: 7 , am Anfang im String läuft hoch aber es werden diese Informationen nicht ausgelesen. Da hilft nur den Fehlspeicher am Gerät selber zu löschen, gibt es noch eine andere Methode für diesen BUG ?
Vielen Dank
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 20 Dezember 2022, 16:33:39
@immi
I have now installed FHEM on a VM (on a Synology DS920+) and it seems to function correctly with the THZ (very few "too slow" messages). The THZ is still connected via shielded cable (3 wires) and USB-serial adapter. On the VM client, ser2net runs on port 2000 (with 9600 baud). Can you please let me know what the below warnings and errors mean and if I have to do something about them? Thank you very much!

2022.12.19 17:59:46 1: usb create starting
2022.12.19 17:59:46 3: Probing CUL device /dev/ttyS0
2022.12.19 17:59:47 3: Probing CUL device /dev/ttyS1
2022.12.19 17:59:47 1: PERL WARNING: can't getattr: Input/output error at FHEM/DevIo.pm line 612.
2022.12.19 17:59:47 1: CUL: Can't open /dev/ttyS1: Input/output error
2022.12.19 17:59:47 3: Probing CUL device /dev/ttyS2
2022.12.19 17:59:47 1: CUL: Can't open /dev/ttyS2: Input/output error
2022.12.19 17:59:47 3: Probing CUL device /dev/ttyS3
2022.12.19 17:59:47 1: CUL: Can't open /dev/ttyS3: Input/output error
2022.12.19 17:59:47 1: usb create end


Below is my setup etc. (the MQTT does not yet work, but that is a different topic):

define WEB FHEMWEB 8083 global
attr WEB menuEntries Update,cmd=update,UpdateCheck,cmd=update+check,Restart,cmd=shutdown+restart
#   BYTES_READ 102890
#   BYTES_WRITTEN 1441879
#   CONNECTS   66
#   CSRFTOKEN  csrf_xxxxxxxxxxxxxxxxx
#   DEF        8083 global
#   FD         5
#   FUUID      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#   NAME       WEB
#   NR         31
#   NTFY_ORDER 50-WEB
#   PORT       8083
#   STATE      Initialized
#   TYPE       FHEMWEB
#   READINGS:
#     2022-12-19 18:07:30   state           Initialized
#
setstate WEB 2022-12-19 18:07:30 state Initialized


define initialUsbCheck notify global:INITIALIZED usb create
#   DEF        global:INITIALIZED usb create
#   FUUID      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#   NAME       initialUsbCheck
#   NOTIFYDEV  global
#   NR         41
#   NTFY_ORDER 50-initialUsbCheck
#   REGEXP     global:INITIALIZED
#   STATE      2022-12-19 18:07:30
#   TRIGGERTIME xxxxxxxxxxx.xxxxx
#   TYPE       notify
#   READINGS:
#     2022-12-19 18:07:30   state           active
#     2022-12-19 18:07:30   triggeredByDev  global
#     2022-12-19 18:07:30   triggeredByEvent INITIALIZED
#
setstate initialUsbCheck 2022-12-19 18:07:30
setstate initialUsbCheck 2022-12-19 18:07:30 state active
setstate initialUsbCheck 2022-12-19 18:07:30 triggeredByDev global
setstate initialUsbCheck 2022-12-19 18:07:30 triggeredByEvent INITIALIZED


attr global userattr cmdIcon devStateIcon:textField-long devStateStyle icon sortby webCmd webCmdLabel:textField-long widgetOverride
attr global autoload_undefined_devices 1
attr global logfile ./log/fhem-%Y-%m.log
attr global modpath .
attr global statefile ./log/fhem.save
attr global verbose 3
#   DEF        no definition
#   FD         3
#   NAME       global
#   NR         1
#   STATE      no definition
#   TYPE       Global
#   currentlogfile ./log/fhem-2022-12.log
#   eventCount 24
#   init_errors Messages collected while initializing FHEM:SecurityCheck:
#  WEB is not password protected
#
#Protect this FHEM installation by defining an allowed device with define allowed allowed
#You can disable this message with attr global motd none
#
#   logfile    ./log/fhem-%Y-%m.log
#
setstate global no definition


define Mythz THZ dns1.fritz.box:2000
attr Mythz devStateIcon opened:10px-kreis-gruen disconnected:10px-kreis-rot
attr Mythz event-min-interval s.*:3600
attr Mythz event-on-change-reading .*
attr Mythz firmware 2.06
attr Mythz interval_sDHW 600
attr Mythz interval_sElectrDHWDay 3600
attr Mythz interval_sElectrDHWTotal 28800
attr Mythz interval_sGlobal 600
attr Mythz interval_sHC1 600
attr Mythz interval_sHeatDHWDay 3600
attr Mythz interval_sHeatDHWTotal 28800
attr Mythz interval_sHeatRecoveredDay 3600
attr Mythz interval_sHeatRecoveredTotal 28800
attr Mythz interval_sHistory 28800
attr Mythz interval_sLast10errors 28800
attr Mythz room Heating
attr Mythz userReadings insideSetTemp:sHC1.* {THZ_Val("sHC1",21)}, insideTemp:sHC1.* {THZ_Val("sHC1",27)}, AussenTemp:sGlobal.* {THZ_Val("sGlobal",1)}
#   CFGFN     
#   DEF        dns1.fritz.box:2000
#   DeviceName dns1.fritz.box:2000
#   FD         8
#   FUUID      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#   NAME       Mythz
#   NR         59
#   NTFY_ORDER 50-Mythz
#   PARTIAL   
#   STATE      opened
#   TYPE       THZ
#   VERSION    0.205
#   eventCount 551
#   model      2.06_02.16
#   READINGS:
#     2022-12-20 16:18:01   AussenTemp      6.2
#     2022-12-19 18:21:59   inputVentilatorPower 45 %
#     2022-12-19 18:12:38   inputVentilatorSpeed 19 %
#     2022-12-20 16:15:55   insideSetTemp   20.5
#     2022-12-20 16:15:55   insideTemp      0
#     2022-12-19 18:26:41   mainVentilatorPower 60 %
#     2022-12-19 18:22:42   mainVentilatorSpeed 17 %
#     2022-12-19 18:18:21   outputVentilatorPower  %
#     2022-12-19 18:23:10   outputVentilatorSpeed 17 %
#     2022-12-20 06:57:54   p01-p12         p01RoomTempDay: 20.5 p02RoomTempNight: 20.5 p03RoomTempStandby: 10 p04DHWsetTempDay: 48 p05DHWsetTempNight: 48 p06DHWsetTempStandby: 10 p07FanStageDay: 2 p08FanStageNight: 2 p09FanStageStandby: 2 p10HCTempManual: 35 p11DHWsetTempManual: 48 p12FanStageManual: 1
#     2022-12-19 18:22:28   p01RoomTempDay  20.5 °C
#     2022-12-19 18:12:12   p02RoomTempNight 20.5 °C
#     2022-12-19 18:17:42   p03RoomTempStandby 10 °C
#     2022-12-19 18:26:56   p04DHWsetTempDay 48 °C
#     2022-12-19 18:17:20   p05DHWsetTempNight 48 °C
#     2022-12-19 18:18:12   p06DHWsetTempStandby 10 °C
#     2022-12-19 18:12:36   p07FanStageDay  2
#     2022-12-19 18:12:28   p08FanStageNight 2
#     2022-12-19 18:17:34   p09FanStageStandby 2
#     2022-12-19 18:18:14   p10HCTempManual 35 °C
#     2022-12-19 18:15:14   p11DHWsetTempManual 48 °C
#     2022-12-19 18:26:44   p12FanStageManual 1
#     2022-12-19 18:12:14   p13GradientHC1  0.4
#     2022-12-19 18:12:18   p14LowEndHC1    3 K
#     2022-12-19 18:26:41   p15RoomInfluenceHC1 0
#     2022-12-19 18:26:44   p16GradientHC2  0.6
#     2022-12-19 18:13:00   p17LowEndHC2    0 K
#     2022-12-19 18:27:00   p18RoomInfluenceHC2 0
#     2022-12-19 18:12:52   p19FlowProportionHC1 30 %
#     2022-12-19 18:23:04   p20FlowProportionHC2 100 %
#     2022-12-19 18:22:30   p21Hyst1        4 K
#     2022-12-19 18:23:16   p22Hyst2        3 K
#     2022-12-19 18:20:34   p23Hyst3        3 K
#     2022-12-19 18:17:52   p24Hyst4        2 K
#     2022-12-19 18:12:46   p25Hyst5        1 K
#     2022-12-19 18:26:50   p29HystAsymmetry 2
#     2022-12-19 18:18:04   p30integralComponent 100 Kmin
#     2022-12-19 18:12:58   p32HystDHW      2 K
#     2022-12-19 18:12:42   p33BoosterTimeoutDHW 90 min
#     2022-12-19 18:18:10   p34TempLimitBoostDHW -5 °C
#     2022-12-19 18:13:14   p35PasteurisationInterval error Days
#     2022-12-19 18:22:18   p36MaxDurationDHWLoad 12 h
#     2022-12-19 18:12:40   p37Fanstage1AirflowInlet 100 m3/h
#     2022-12-19 18:17:44   p38Fanstage2AirflowInlet 135 m3/h
#     2022-12-19 18:22:48   p39Fanstage3AirflowInlet 170 m3/h
#     2022-12-19 18:23:21   p40Fanstage1AirflowOutlet too m3/h
#     2022-12-19 18:17:58   p41Fanstage2AirflowOutlet 135 m3/h
#     2022-12-19 18:22:38   p42Fanstage3AirflowOutlet 170 m3/h
#     2022-12-19 18:12:50   p43UnschedVent3 60 min
#     2022-12-19 18:17:28   p44UnschedVent2 60 min
#     2022-12-19 18:26:48   p45UnschedVent1 60 min
#     2022-12-19 18:21:52   p46UnschedVent0 60 min
#     2022-12-19 18:12:44   p47CompressorRestartDelay 20 min
#     2022-12-19 18:22:16   p48MainFanSpeed 60 %
#     2022-12-19 18:17:22   p49SummerModeTemp 17 °C
#     2022-12-19 18:26:52   p50SummerModeHysteresis 2 K
#     2022-12-19 18:23:08   p54MinPumpCycles 1 /Day
#     2022-12-19 18:21:48   p55MaxPumpCycles 288 /Day
#     2022-12-19 18:17:48   p56OutTempMaxPumpCycles 15 °C
#     2022-12-19 18:22:22   p57OutTempMinPumpCycles 20 °C
#     2022-12-19 18:26:46   p58SuppressTempCaptPumpStart 60 s
#     2022-12-19 18:22:08   p75PassiveCooling 0
#     2022-12-19 18:26:52   p77OutTempFilterTime 1 h
#     2022-12-19 18:13:02   p78DualModePoint 0 °C
#     2022-12-19 18:13:04   p79BoosterTimeoutHC 20 min
#     2022-12-19 18:22:58   p80EnableSolar  0
#     2022-12-19 18:12:48   pAbsence        pA0DurationUntilAbsenceStart: 0 pA0AbsenceDuration: 0 pA0EnableAbsenceProg: 0
#     2022-12-19 18:27:46   pCircPump       p54MinPumpCycles: 1 p55MaxPumpCycles: 288 p56OutTempMaxPumpCycles: 15 p57OutTempMinPumpCycles: 20 p58SuppressTempCaptPumpStart: 60
#     2022-12-19 18:22:00   pClockDay       19
#     2022-12-19 18:12:30   pClockHour      18
#     2022-12-19 18:12:54   pClockMinutes   13
#     2022-12-19 18:23:06   pClockMonth     12
#     2022-12-19 18:20:22   pClockYear      22
#     2022-12-19 18:26:48   pDHW            p32HystDHW: 2 p33BoosterTimeoutDHW: 90 p34TempLimitBoostDHW: -5 p35PasteurisationInterval: 30 p36MaxDurationDHWLoad: 12 pasteurisationTemp: 10 maxBoostStagesDHW: 3 p84EnableDHWBuffer: 0
#     2022-12-19 18:28:02   pDHWProg        progDHWStartTime: 23:00 progDHWEndTime: 07:00 progDHWMonday: 1 progDHWTuesday: 1 progDHWWednesday: 1 progDHWThursday: 1 progDHWFriday: 1 progDHWSaturday: 1 progDHWSunday: 1 progDHWEnable: 0
#     2022-12-19 18:23:14   pDefrostAA      MaxDefrostDurationAAExchenger: 60 DefrostStartThreshold: 4 VolumeFlowFilterReplacement: 90
#     2022-12-19 18:22:16   pDefrostEva     UpTempLimitDefrostEvaporatorEnd: 15.1 MaxTimeDefrostEvaporator: 10 LimitTempCondenserElectBoost: 15 LimitTempCondenserDefrostTerm: 8.3 p47CompressorRestartDelay: 20 p48MainFanSpeed: 60
#     2022-12-20 06:59:19   pDryHeat        p70StartDryHeat: 0 p71BaseTemp: 25 p72PeakTemp: 40 p73TempDuration: 2 p74TempIncrease: 1
#     2022-12-19 18:26:48   pFan            p37Fanstage1AirflowInlet: 100 p38Fanstage2AirflowInlet: 135 p39Fanstage3AirflowInlet: 170 p40Fanstage1AirflowOutlet: 100 p41Fanstage2AirflowOutlet: 135 p42Fanstage3AirflowOutlet: 170 p43UnschedVent3: 60 p44UnschedVent2: 60 p45UnschedVent1: 60 p46UnschedVent0: 60 p75PassiveCooling: 0
#     2022-12-19 18:26:41   pFanProg        progFAN1StartTime: 20:00 progFAN1EndTime: 09:00 progFAN1Monday: 1 progFAN1Tuesday: 1 progFAN1Wednesday: 1 progFAN1Thursday: 1 progFAN1Friday: 1 progFAN1Saturday: 1 progFAN1Sunday: 1 progFAN1Enable: 0 progFAN2StartTime: 13:30 progFAN2EndTime: 14:30 progFAN2Monday: 1 progFAN2Tuesday: 1 progFAN2Wednesday: 1 progFAN2Thursday: 1 progFAN2Friday: 1 progFAN2Saturday: 1 progFAN2Sunday: 1 progFAN2Enable: 0
#     2022-12-19 18:26:41   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
#     2022-12-19 18:26:50   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: 0 p79BoosterTimeoutHC: 20
#     2022-12-19 18:23:08   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
#     2022-12-19 18:26:58   pRestart        p59RestartBeforeSetbackEnd: 0
#     2022-12-19 18:22:58   pSolar          p80EnableSolar: 0 p81DiffTempSolarLoading: 5 p82DelayCompStartSolar: 60 p84DHWTempSolarMode: 60 HystDiffTempSolar: 1 CollectLimitTempSolar: 60
#     2022-12-19 18:22:14   progDHWEnable   0
#     2022-12-19 18:22:34   progDHWEndTime  07:00
#     2022-12-19 18:12:08   progDHWFriday   1
#     2022-12-19 18:17:26   progDHWMonday   1
#     2022-12-19 18:22:02   progDHWSaturday 1
#     2022-12-19 18:18:00   progDHWStartTime 23:00
#     2022-12-19 18:22:50   progDHWSunday   1
#     2022-12-19 18:20:26   progDHWThursday 1
#     2022-12-19 18:12:56   progDHWTuesday  1
#     2022-12-19 18:22:20   progDHWWednesday 1
#     2022-12-19 18:22:06   progFAN1Enable  0
#     2022-12-19 18:23:00   progFAN1EndTime 09:00
#     2022-12-19 18:12:34   progFAN1Friday  1
#     2022-12-19 18:21:46   progFAN1Monday  1
#     2022-12-19 18:21:42   progFAN1Saturday 1
#     2022-12-19 18:12:06   progFAN1StartTime 20:00
#     2022-12-19 18:23:16   progFAN1Sunday  1
#     2022-12-19 18:18:06   progFAN1Thursday 1
#     2022-12-19 18:22:12   progFAN1Tuesday 1
#     2022-12-19 18:12:04   progFAN1Wednesday 1
#     2022-12-19 18:26:42   progFAN2Enable  0
#     2022-12-19 18:21:44   progFAN2EndTime 14:30
#     2022-12-19 18:26:54   progFAN2Friday  1
#     2022-12-19 18:22:54   progFAN2Monday  1
#     2022-12-19 18:22:56   progFAN2Saturday 1
#     2022-12-19 18:26:42   progFAN2StartTime 13:30
#     2022-12-19 18:12:16   progFAN2Sunday  1
#     2022-12-19 18:22:44   progFAN2Thursday 1
#     2022-12-19 18:26:41   progFAN2Tuesday 1
#     2022-12-19 18:26:46   progFAN2Wednesday 1
#     2022-12-19 18:12:22   progHC1Enable   0
#     2022-12-19 18:20:24   progHC1EndTime  07:00
#     2022-12-19 18:21:50   progHC1Friday   1
#     2022-12-19 18:22:24   progHC1Monday   1
#     2022-12-19 18:12:10   progHC1Saturday 0
#     2022-12-19 18:13:06   progHC1StartTime 23:00
#     2022-12-19 18:20:38   progHC1Sunday   0
#     2022-12-19 18:22:40   progHC1Thursday 1
#     2022-12-19 18:17:50   progHC1Tuesday  1
#     2022-12-19 18:17:24   progHC1Wednesday 1
#     2022-12-19 18:15:19   progHC2Enable   
#     2022-12-19 18:22:52   progHC2EndTime  08:00
#     2022-12-19 18:12:26   progHC2Friday   0
#     2022-12-19 18:17:46   progHC2Monday   0
#     2022-12-19 18:22:10   progHC2Saturday 1
#     2022-12-19 18:17:54   progHC2StartTime 00:00
#     2022-12-19 18:22:36   progHC2Sunday   1
#     2022-12-19 18:20:32   progHC2Thursday 0
#     2022-12-19 18:13:12   progHC2Tuesday  0
#     2022-12-19 18:22:32   progHC2Wednesday 0
#     2022-12-20 07:03:21   sControl        heatRequest: 2 heatRequest2: 2 hcStage: 2 dhwStage: 0 heatStageControlModul: 2 compBlockTime: 0 pasteurisationMode: 0 defrostEvaporator: 10 boosterStage2: 0 solarPump: 0 boosterStage1: 0 compressor: 1 heatPipeValve: 0 diverterValve: 0 dhwPump: 0 heatingCircuitPump: 1 mixerOpen: 0 mixerClosed: 0 sensorBits1: 01 sensorBits2: 01 boostBlockTimeAfterPumpStart: 0 boostBlockTimeAfterHD: 0
#     2022-12-20 16:21:52   sDHW            dhwTemp: 49.7 outsideTemp: 6.3 dhwSetTemp: 48 compBlockTime: 0 out: 011C heatBlockTime: 0 dhwBoosterStage: 0 pasteurisationMode: 0 dhwOpMode: normal x36: 78FF
#     2022-12-20 07:02:30   sFan            statusAFC: 512 supplyFanSpeedCAL: 4.5 exhaustFanSpeedCAL: 157.866666666667 supplyFanAirflowCAL: 3.07 exhaustFanAirflowCAL: 220.16 supplyFanSpeed: 274 exhaustFanSpeed: 14336 supplyFanAirflowSet: 342 exhaustFanAirflowSet: 38144 supplyFanSpeedTarget: 0 exhaustFanSpeedTarget: 0 supplyFanSpeed0: 0 exhaustFanSpeed0: 1.4 supplyFanSpeed200: 411.8 exhaustFanSpeed200: 435.2 airflowTolerance: 135 airflowCalibrationInterval: 0 timeToCalibration: 135
#     2022-12-20 07:02:20   sFirmware       version: 02.16
#     2022-12-20 16:18:01   sGlobal         outsideTemp: 6.2 flowTemp: 27.6 returnTemp: 26.3 hotGasTemp: 36.6 dhwTemp: 49.8 flowTempHC2: 0 evaporatorTemp: 10.5 condenserTemp: 26.8 mixerOpen: 0 mixerClosed: 0 heatPipeValve: 0 diverterValve: 0 dhwPump: 0 heatingCircuitPump: 1 solarPump: 0 compressor: 0 boosterStage3: 0 boosterStage2: 0 boosterStage1: 0 highPressureSensor: 1 lowPressureSensor: 1 evaporatorIceMonitor: 1 signalAnode: 0 evuRelease: n.a. ovenFireplace: 0 STB: n.a. outputVentilatorPower: 45 inputVentilatorPower: 45 mainVentilatorPower: 0 outputVentilatorSpeed: 25 inputVentilatorSpeed: 20 mainVentilatorSpeed: 0 outsideTempFiltered: 6.6 relHumidity: n.a. dewPoint: n.a. P_Nd: n.a. P_Hd: n.a. actualPower_Qc: n.a. actualPower_Pel: n.a. collectorTemp: 81 insideTemp: 0
#     2022-12-20 16:15:55   sHC1            outsideTemp: 6.3 x08: -47.8 returnTemp: 26.3 integralHeat: -33 flowTemp: 27.6 heatSetTemp: 29.4 heatTemp: 26.6 seasonMode: winter integralSwitch: 100 hcOpMode: normal roomSetTemp: 20.5 x60: 0 x64: 0 insideTempRC: 0 x72: 51.2 x76: 0 onHysteresisNo: 0 offHysteresisNo: 1 hcBoosterStage: 0
#     2022-12-19 18:17:32   sHC2            outsideTemp: 2.4 returnTemp: 29 vorlaufTemp: 0 heatSetTemp: 31.4 heatTemp: 29 stellgroesse: -100 seasonMode: winter hcOpMode: normal
#     2022-12-20 10:12:23   sHistory        operatingHours1: 881 operatingHours2: 882 heatingHours: 27286 DHWhours: 12777 coolingHours: 0
#     2022-12-20 10:26:51   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
#     2022-12-20 07:01:24   sProgram        opMode: automatic ProgStateHC: normal ProgStateDHW: normal ProgStateFAN: normal BaseTimeAP0: 52770 StatusAP0: 0 StartTimeAP0: 0 EndTimeAP0: 0
#     2022-12-19 18:17:38   sSol            collectorTemp: 81 dhwTemp: 51.1 flowTemp: 33.2 edSolPump: 0 out: 111C status: CE
#     2022-12-20 07:01:34   sSystem         userSetFanStage: 0 userSetFanRemainingTime: 0 lastErrors:
#     2022-12-20 07:01:45   sTimedate       Weekday: Tuesday pClockHour: 7 pClockMinutes: 2 Sec: 30 pClockYear: 22 pClockMonth: 12 pClockDay: 20
#     2022-12-19 18:10:58   state           opened
#     2022-12-20 09:55:50   z_Last_fhem_err THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
#   helper:
#
setstate Mythz opened
setstate Mythz 2022-12-20 16:18:01 AussenTemp 6.2
setstate Mythz 2022-12-19 18:21:59 inputVentilatorPower 45 %
setstate Mythz 2022-12-19 18:12:38 inputVentilatorSpeed 19 %
setstate Mythz 2022-12-20 16:15:55 insideSetTemp 20.5
setstate Mythz 2022-12-20 16:15:55 insideTemp 0
setstate Mythz 2022-12-19 18:26:41 mainVentilatorPower 60 %
setstate Mythz 2022-12-19 18:22:42 mainVentilatorSpeed 17 %
setstate Mythz 2022-12-19 18:18:21 outputVentilatorPower  %
setstate Mythz 2022-12-19 18:23:10 outputVentilatorSpeed 17 %
setstate Mythz 2022-12-20 06:57:54 p01-p12 p01RoomTempDay: 20.5 p02RoomTempNight: 20.5 p03RoomTempStandby: 10 p04DHWsetTempDay: 48 p05DHWsetTempNight: 48 p06DHWsetTempStandby: 10 p07FanStageDay: 2 p08FanStageNight: 2 p09FanStageStandby: 2 p10HCTempManual: 35 p11DHWsetTempManual: 48 p12FanStageManual: 1
setstate Mythz 2022-12-19 18:22:28 p01RoomTempDay 20.5 °C
setstate Mythz 2022-12-19 18:12:12 p02RoomTempNight 20.5 °C
setstate Mythz 2022-12-19 18:17:42 p03RoomTempStandby 10 °C
setstate Mythz 2022-12-19 18:26:56 p04DHWsetTempDay 48 °C
setstate Mythz 2022-12-19 18:17:20 p05DHWsetTempNight 48 °C
setstate Mythz 2022-12-19 18:18:12 p06DHWsetTempStandby 10 °C
setstate Mythz 2022-12-19 18:12:36 p07FanStageDay 2
setstate Mythz 2022-12-19 18:12:28 p08FanStageNight 2
setstate Mythz 2022-12-19 18:17:34 p09FanStageStandby 2
setstate Mythz 2022-12-19 18:18:14 p10HCTempManual 35 °C
setstate Mythz 2022-12-19 18:15:14 p11DHWsetTempManual 48 °C
setstate Mythz 2022-12-19 18:26:44 p12FanStageManual 1
setstate Mythz 2022-12-19 18:12:14 p13GradientHC1 0.4
setstate Mythz 2022-12-19 18:12:18 p14LowEndHC1 3 K
setstate Mythz 2022-12-19 18:26:41 p15RoomInfluenceHC1 0
setstate Mythz 2022-12-19 18:26:44 p16GradientHC2 0.6
setstate Mythz 2022-12-19 18:13:00 p17LowEndHC2 0 K
setstate Mythz 2022-12-19 18:27:00 p18RoomInfluenceHC2 0
setstate Mythz 2022-12-19 18:12:52 p19FlowProportionHC1 30 %
setstate Mythz 2022-12-19 18:23:04 p20FlowProportionHC2 100 %
setstate Mythz 2022-12-19 18:22:30 p21Hyst1 4 K
setstate Mythz 2022-12-19 18:23:16 p22Hyst2 3 K
setstate Mythz 2022-12-19 18:20:34 p23Hyst3 3 K
setstate Mythz 2022-12-19 18:17:52 p24Hyst4 2 K
setstate Mythz 2022-12-19 18:12:46 p25Hyst5 1 K
setstate Mythz 2022-12-19 18:26:50 p29HystAsymmetry 2
setstate Mythz 2022-12-19 18:18:04 p30integralComponent 100 Kmin
setstate Mythz 2022-12-19 18:12:58 p32HystDHW 2 K
setstate Mythz 2022-12-19 18:12:42 p33BoosterTimeoutDHW 90 min
setstate Mythz 2022-12-19 18:18:10 p34TempLimitBoostDHW -5 °C
setstate Mythz 2022-12-19 18:13:14 p35PasteurisationInterval error Days
setstate Mythz 2022-12-19 18:22:18 p36MaxDurationDHWLoad 12 h
setstate Mythz 2022-12-19 18:12:40 p37Fanstage1AirflowInlet 100 m3/h
setstate Mythz 2022-12-19 18:17:44 p38Fanstage2AirflowInlet 135 m3/h
setstate Mythz 2022-12-19 18:22:48 p39Fanstage3AirflowInlet 170 m3/h
setstate Mythz 2022-12-19 18:23:21 p40Fanstage1AirflowOutlet too m3/h
setstate Mythz 2022-12-19 18:17:58 p41Fanstage2AirflowOutlet 135 m3/h
setstate Mythz 2022-12-19 18:22:38 p42Fanstage3AirflowOutlet 170 m3/h
setstate Mythz 2022-12-19 18:12:50 p43UnschedVent3 60 min
setstate Mythz 2022-12-19 18:17:28 p44UnschedVent2 60 min
setstate Mythz 2022-12-19 18:26:48 p45UnschedVent1 60 min
setstate Mythz 2022-12-19 18:21:52 p46UnschedVent0 60 min
setstate Mythz 2022-12-19 18:12:44 p47CompressorRestartDelay 20 min
setstate Mythz 2022-12-19 18:22:16 p48MainFanSpeed 60 %
setstate Mythz 2022-12-19 18:17:22 p49SummerModeTemp 17 °C
setstate Mythz 2022-12-19 18:26:52 p50SummerModeHysteresis 2 K
setstate Mythz 2022-12-19 18:23:08 p54MinPumpCycles 1 /Day
setstate Mythz 2022-12-19 18:21:48 p55MaxPumpCycles 288 /Day
setstate Mythz 2022-12-19 18:17:48 p56OutTempMaxPumpCycles 15 °C
setstate Mythz 2022-12-19 18:22:22 p57OutTempMinPumpCycles 20 °C
setstate Mythz 2022-12-19 18:26:46 p58SuppressTempCaptPumpStart 60 s
setstate Mythz 2022-12-19 18:22:08 p75PassiveCooling 0
setstate Mythz 2022-12-19 18:26:52 p77OutTempFilterTime 1 h
setstate Mythz 2022-12-19 18:13:02 p78DualModePoint 0 °C
setstate Mythz 2022-12-19 18:13:04 p79BoosterTimeoutHC 20 min
setstate Mythz 2022-12-19 18:22:58 p80EnableSolar 0
setstate Mythz 2022-12-19 18:12:48 pAbsence pA0DurationUntilAbsenceStart: 0 pA0AbsenceDuration: 0 pA0EnableAbsenceProg: 0
setstate Mythz 2022-12-19 18:27:46 pCircPump p54MinPumpCycles: 1 p55MaxPumpCycles: 288 p56OutTempMaxPumpCycles: 15 p57OutTempMinPumpCycles: 20 p58SuppressTempCaptPumpStart: 60
setstate Mythz 2022-12-19 18:22:00 pClockDay 19
setstate Mythz 2022-12-19 18:12:30 pClockHour 18
setstate Mythz 2022-12-19 18:12:54 pClockMinutes 13
setstate Mythz 2022-12-19 18:23:06 pClockMonth 12
setstate Mythz 2022-12-19 18:20:22 pClockYear 22
setstate Mythz 2022-12-19 18:26:48 pDHW p32HystDHW: 2 p33BoosterTimeoutDHW: 90 p34TempLimitBoostDHW: -5 p35PasteurisationInterval: 30 p36MaxDurationDHWLoad: 12 pasteurisationTemp: 10 maxBoostStagesDHW: 3 p84EnableDHWBuffer: 0
setstate Mythz 2022-12-19 18:28:02 pDHWProg progDHWStartTime: 23:00 progDHWEndTime: 07:00 progDHWMonday: 1 progDHWTuesday: 1 progDHWWednesday: 1 progDHWThursday: 1 progDHWFriday: 1 progDHWSaturday: 1 progDHWSunday: 1 progDHWEnable: 0
setstate Mythz 2022-12-19 18:23:14 pDefrostAA MaxDefrostDurationAAExchenger: 60 DefrostStartThreshold: 4 VolumeFlowFilterReplacement: 90
setstate Mythz 2022-12-19 18:22:16 pDefrostEva UpTempLimitDefrostEvaporatorEnd: 15.1 MaxTimeDefrostEvaporator: 10 LimitTempCondenserElectBoost: 15 LimitTempCondenserDefrostTerm: 8.3 p47CompressorRestartDelay: 20 p48MainFanSpeed: 60
setstate Mythz 2022-12-20 06:59:19 pDryHeat p70StartDryHeat: 0 p71BaseTemp: 25 p72PeakTemp: 40 p73TempDuration: 2 p74TempIncrease: 1
setstate Mythz 2022-12-19 18:26:48 pFan p37Fanstage1AirflowInlet: 100 p38Fanstage2AirflowInlet: 135 p39Fanstage3AirflowInlet: 170 p40Fanstage1AirflowOutlet: 100 p41Fanstage2AirflowOutlet: 135 p42Fanstage3AirflowOutlet: 170 p43UnschedVent3: 60 p44UnschedVent2: 60 p45UnschedVent1: 60 p46UnschedVent0: 60 p75PassiveCooling: 0
setstate Mythz 2022-12-19 18:26:41 pFanProg progFAN1StartTime: 20:00 progFAN1EndTime: 09:00 progFAN1Monday: 1 progFAN1Tuesday: 1 progFAN1Wednesday: 1 progFAN1Thursday: 1 progFAN1Friday: 1 progFAN1Saturday: 1 progFAN1Sunday: 1 progFAN1Enable: 0 progFAN2StartTime: 13:30 progFAN2EndTime: 14:30 progFAN2Monday: 1 progFAN2Tuesday: 1 progFAN2Wednesday: 1 progFAN2Thursday: 1 progFAN2Friday: 1 progFAN2Saturday: 1 progFAN2Sunday: 1 progFAN2Enable: 0
setstate Mythz 2022-12-19 18:26:41 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
setstate Mythz 2022-12-19 18:26:50 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: 0 p79BoosterTimeoutHC: 20
setstate Mythz 2022-12-19 18:23:08 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
setstate Mythz 2022-12-19 18:26:58 pRestart p59RestartBeforeSetbackEnd: 0
setstate Mythz 2022-12-19 18:22:58 pSolar p80EnableSolar: 0 p81DiffTempSolarLoading: 5 p82DelayCompStartSolar: 60 p84DHWTempSolarMode: 60 HystDiffTempSolar: 1 CollectLimitTempSolar: 60
setstate Mythz 2022-12-19 18:22:14 progDHWEnable 0
setstate Mythz 2022-12-19 18:22:34 progDHWEndTime 07:00
setstate Mythz 2022-12-19 18:12:08 progDHWFriday 1
setstate Mythz 2022-12-19 18:17:26 progDHWMonday 1
setstate Mythz 2022-12-19 18:22:02 progDHWSaturday 1
setstate Mythz 2022-12-19 18:18:00 progDHWStartTime 23:00
setstate Mythz 2022-12-19 18:22:50 progDHWSunday 1
setstate Mythz 2022-12-19 18:20:26 progDHWThursday 1
setstate Mythz 2022-12-19 18:12:56 progDHWTuesday 1
setstate Mythz 2022-12-19 18:22:20 progDHWWednesday 1
setstate Mythz 2022-12-19 18:22:06 progFAN1Enable 0
setstate Mythz 2022-12-19 18:23:00 progFAN1EndTime 09:00
setstate Mythz 2022-12-19 18:12:34 progFAN1Friday 1
setstate Mythz 2022-12-19 18:21:46 progFAN1Monday 1
setstate Mythz 2022-12-19 18:21:42 progFAN1Saturday 1
setstate Mythz 2022-12-19 18:12:06 progFAN1StartTime 20:00
setstate Mythz 2022-12-19 18:23:16 progFAN1Sunday 1
setstate Mythz 2022-12-19 18:18:06 progFAN1Thursday 1
setstate Mythz 2022-12-19 18:22:12 progFAN1Tuesday 1
setstate Mythz 2022-12-19 18:12:04 progFAN1Wednesday 1
setstate Mythz 2022-12-19 18:26:42 progFAN2Enable 0
setstate Mythz 2022-12-19 18:21:44 progFAN2EndTime 14:30
setstate Mythz 2022-12-19 18:26:54 progFAN2Friday 1
setstate Mythz 2022-12-19 18:22:54 progFAN2Monday 1
setstate Mythz 2022-12-19 18:22:56 progFAN2Saturday 1
setstate Mythz 2022-12-19 18:26:42 progFAN2StartTime 13:30
setstate Mythz 2022-12-19 18:12:16 progFAN2Sunday 1
setstate Mythz 2022-12-19 18:22:44 progFAN2Thursday 1
setstate Mythz 2022-12-19 18:26:41 progFAN2Tuesday 1
setstate Mythz 2022-12-19 18:26:46 progFAN2Wednesday 1
setstate Mythz 2022-12-19 18:12:22 progHC1Enable 0
setstate Mythz 2022-12-19 18:20:24 progHC1EndTime 07:00
setstate Mythz 2022-12-19 18:21:50 progHC1Friday 1
setstate Mythz 2022-12-19 18:22:24 progHC1Monday 1
setstate Mythz 2022-12-19 18:12:10 progHC1Saturday 0
setstate Mythz 2022-12-19 18:13:06 progHC1StartTime 23:00
setstate Mythz 2022-12-19 18:20:38 progHC1Sunday 0
setstate Mythz 2022-12-19 18:22:40 progHC1Thursday 1
setstate Mythz 2022-12-19 18:17:50 progHC1Tuesday 1
setstate Mythz 2022-12-19 18:17:24 progHC1Wednesday 1
setstate Mythz 2022-12-19 18:15:19 progHC2Enable
setstate Mythz 2022-12-19 18:22:52 progHC2EndTime 08:00
setstate Mythz 2022-12-19 18:12:26 progHC2Friday 0
setstate Mythz 2022-12-19 18:17:46 progHC2Monday 0
setstate Mythz 2022-12-19 18:22:10 progHC2Saturday 1
setstate Mythz 2022-12-19 18:17:54 progHC2StartTime 00:00
setstate Mythz 2022-12-19 18:22:36 progHC2Sunday 1
setstate Mythz 2022-12-19 18:20:32 progHC2Thursday 0
setstate Mythz 2022-12-19 18:13:12 progHC2Tuesday 0
setstate Mythz 2022-12-19 18:22:32 progHC2Wednesday 0
setstate Mythz 2022-12-20 07:03:21 sControl heatRequest: 2 heatRequest2: 2 hcStage: 2 dhwStage: 0 heatStageControlModul: 2 compBlockTime: 0 pasteurisationMode: 0 defrostEvaporator: 10 boosterStage2: 0 solarPump: 0 boosterStage1: 0 compressor: 1 heatPipeValve: 0 diverterValve: 0 dhwPump: 0 heatingCircuitPump: 1 mixerOpen: 0 mixerClosed: 0 sensorBits1: 01 sensorBits2: 01 boostBlockTimeAfterPumpStart: 0 boostBlockTimeAfterHD: 0
setstate Mythz 2022-12-20 16:21:52 sDHW dhwTemp: 49.7 outsideTemp: 6.3 dhwSetTemp: 48 compBlockTime: 0 out: 011C heatBlockTime: 0 dhwBoosterStage: 0 pasteurisationMode: 0 dhwOpMode: normal x36: 78FF
setstate Mythz 2022-12-20 07:02:30 sFan statusAFC: 512 supplyFanSpeedCAL: 4.5 exhaustFanSpeedCAL: 157.866666666667 supplyFanAirflowCAL: 3.07 exhaustFanAirflowCAL: 220.16 supplyFanSpeed: 274 exhaustFanSpeed: 14336 supplyFanAirflowSet: 342 exhaustFanAirflowSet: 38144 supplyFanSpeedTarget: 0 exhaustFanSpeedTarget: 0 supplyFanSpeed0: 0 exhaustFanSpeed0: 1.4 supplyFanSpeed200: 411.8 exhaustFanSpeed200: 435.2 airflowTolerance: 135 airflowCalibrationInterval: 0 timeToCalibration: 135
setstate Mythz 2022-12-20 07:02:20 sFirmware version: 02.16
setstate Mythz 2022-12-20 16:18:01 sGlobal outsideTemp: 6.2 flowTemp: 27.6 returnTemp: 26.3 hotGasTemp: 36.6 dhwTemp: 49.8 flowTempHC2: 0 evaporatorTemp: 10.5 condenserTemp: 26.8 mixerOpen: 0 mixerClosed: 0 heatPipeValve: 0 diverterValve: 0 dhwPump: 0 heatingCircuitPump: 1 solarPump: 0 compressor: 0 boosterStage3: 0 boosterStage2: 0 boosterStage1: 0 highPressureSensor: 1 lowPressureSensor: 1 evaporatorIceMonitor: 1 signalAnode: 0 evuRelease: n.a. ovenFireplace: 0 STB: n.a. outputVentilatorPower: 45 inputVentilatorPower: 45 mainVentilatorPower: 0 outputVentilatorSpeed: 25 inputVentilatorSpeed: 20 mainVentilatorSpeed: 0 outsideTempFiltered: 6.6 relHumidity: n.a. dewPoint: n.a. P_Nd: n.a. P_Hd: n.a. actualPower_Qc: n.a. actualPower_Pel: n.a. collectorTemp: 81 insideTemp: 0
setstate Mythz 2022-12-20 16:15:55 sHC1 outsideTemp: 6.3 x08: -47.8 returnTemp: 26.3 integralHeat: -33 flowTemp: 27.6 heatSetTemp: 29.4 heatTemp: 26.6 seasonMode: winter integralSwitch: 100 hcOpMode: normal roomSetTemp: 20.5 x60: 0 x64: 0 insideTempRC: 0 x72: 51.2 x76: 0 onHysteresisNo: 0 offHysteresisNo: 1 hcBoosterStage: 0
setstate Mythz 2022-12-19 18:17:32 sHC2 outsideTemp: 2.4 returnTemp: 29 vorlaufTemp: 0 heatSetTemp: 31.4 heatTemp: 29 stellgroesse: -100 seasonMode: winter hcOpMode: normal
setstate Mythz 2022-12-20 10:12:23 sHistory operatingHours1: 881 operatingHours2: 882 heatingHours: 27286 DHWhours: 12777 coolingHours: 0
setstate Mythz 2022-12-20 10:26:51 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
setstate Mythz 2022-12-20 07:01:24 sProgram opMode: automatic ProgStateHC: normal ProgStateDHW: normal ProgStateFAN: normal BaseTimeAP0: 52770 StatusAP0: 0 StartTimeAP0: 0 EndTimeAP0: 0
setstate Mythz 2022-12-19 18:17:38 sSol collectorTemp: 81 dhwTemp: 51.1 flowTemp: 33.2 edSolPump: 0 out: 111C status: CE
setstate Mythz 2022-12-20 07:01:34 sSystem userSetFanStage: 0 userSetFanRemainingTime: 0 lastErrors:
setstate Mythz 2022-12-20 07:01:45 sTimedate Weekday: Tuesday pClockHour: 7 pClockMinutes: 2 Sec: 30 pClockYear: 22 pClockMonth: 12 pClockDay: 20
setstate Mythz 2022-12-19 18:10:58 state opened
setstate Mythz 2022-12-20 09:55:50 z_Last_fhem_err THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step1  -- F4 ->
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 21 Dezember 2022, 17:46:53
Zitat von: joker4791 am 14 Dezember 2022, 12:34:29
at 11:28 I sent 'pClockHour' = '10', but as answer in the receiving dialog it says '11'. Also hen reading that parameter the value still is '11'.
Dear Joker
thanks for sharing the issue;
the tecalor acknoledges the change on pClockHour, and ignores it afterwords :(
no idea why.
I reproduced the issue on my tecalor.
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 21 Dezember 2022, 17:57:04
Zitat von: sunrise am 20 Dezember 2022, 16:33:39
@immi
I have now installed FHEM on a VM (on a Synology DS920+) and it seems to function correctly with the THZ (very few "too slow" messages). The THZ is still connected via shielded cable (3 wires) and USB-serial adapter. On the VM client, ser2net runs on port 2000 (with 9600 baud). Can you please let me know what the below warnings and errors mean and if I have to do something about them? Thank you very much!
2022.12.19 17:59:46 1: usb create starting
2022.12.19 17:59:46 3: Probing CUL device /dev/ttyS0
2022.12.19 17:59:47 3: Probing CUL device /dev/ttyS1
fhem searches for a "CUL interface" connected via USB automatically
It is probably linked to autocreate or to
attr global autoload_undefined_devices 1
It has nothing to do with thz module
immi
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 21 Dezember 2022, 20:22:03
Zitat von: immi am 21 Dezember 2022, 17:46:53
Dear Joker
thanks for sharing the issue;
the tecalor acknoledges the change on pClockHour, and ignores it afterwords :(
no idea why.
I reproduced the issue on my tecalor.
immi
That makes me wonder. I switch to daylight saving time in spring and back to normal time in autumn automatically without any issue. Works since years.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 21 Dezember 2022, 22:04:54
Zitat von: willybauss am 21 Dezember 2022, 20:22:03
That makes me wonder. I switch to daylight saving time in spring and back to normal time in autumn automatically without any issue. Works since years.
interesting difference.
(in my case)
I can change pClockMinutes  --- pClockDay, pClockHour, pClockMonth cannot be modified by fhem

it is like when you tell your children bed-time, they answer yes and ignore completely your order :) :)
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 21 Dezember 2022, 23:00:08
Maybe I'm wrong. Does the THZ 303 SOL have a built-in option for setting daylight saving time? Maybe I do it using that feature. Can't remember currently.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 22 Dezember 2022, 11:34:39
Zitat von: willybauss am 21 Dezember 2022, 23:00:08
Maybe I'm wrong. Does the THZ 303 SOL have a built-in option for setting daylight saving time? Maybe I do it using that feature. Can't remember currently.
My THZ 303 SOL does not automatically switch between CET and CEST, i.e. I have to adjust the clock via the (old) LCD panel. Maybe it depends on the firmware? I have 2.16.
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 22 Dezember 2022, 11:36:37
Zitat von: immi am 21 Dezember 2022, 22:04:54
interesting difference.
(in my case)
I can change pClockMinutes  --- pClockDay, pClockHour, pClockMonth cannot be modified by fhem

it is like when you tell your children bed-time, they answer yes and ignore completely your order :) :)
Same here - also with the kids. ;D
Titel: Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 22 Dezember 2022, 16:12:13
Now I checked the display. My THZ supports automatic DST switching.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: robert82h am 30 März 2023, 19:31:48
Hello,

I've been logging the heat and electricity amounts from my LWZ 303 SOL heat pump and built a few dashboards in Grafana. There is one more value that I'd like to add, and that is the amount of heat that the solar thermic panel contributes.

As you can see on the picture, the solar pump has been running a couple of times, and if I understand the system correctly, the solar heat would be reported as part of the generated heat (Wärmemenge). In order to understand how much it contributes, I'd need the reading from the heat pump.

I'm using the serial port to read the values. The ISG Modbus manual (https://www.stiebel-eltron.de/content/dam/ste/cdbassets/historic/bedienungs-_u_installationsanleitungen/ISG_Modbus__b89c1c53-6d34-4243-a630-b42cf0633361.pdf) lists as Modbus address 3014 through 3019 the values "WM-SOLAR-HZ-TAG", "WM-SOLAR-HZ-SUMME", etc - so exactly the values I'm interested in. So I believe these values are tracked by the heat pump.

Does anybody have an idea how I could find the right addresses for these registers, so that I can extend 00_THZ.pm to read them?

I might also be able to guess the register addresses, but I would need a way to verify the values I read. So far I couldn't find these values in the control panel on the LWZ 303 (it's on firmware version 4.39). Are there any 303 SOL users out there who can see them?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 31 März 2023, 22:46:16
Zitat von: robert82h am 30 März 2023, 19:31:48Does anybody have an idea how I could find the right addresses for these registers, so that I can extend 00_THZ.pm to read them?
I might also be able to guess the register addresses, but I would need a way to verify the values I read.
I see no correlation between ISGmodbus and serial reading.
If you want to guess/dump the register yourself, look at  code in sub THZ_debugread($)
this is a usefull function to investigate several hundreds of registers in a batch
e.g. edit line 1919
type "get Mythz debug_read_raw_register_slow"
and a file called data.txt is created containing a report of all register you want to look at
immi
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: The Spirit am 14 April 2023, 07:35:57
today i tried to set the time windows for the hc1.
while trying to set a timeframe until 24:00 i get this error.
how can this be?
thanks

Bildschirmfoto 2023-04-14 um 07.22.29.png
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 14 April 2023, 12:13:26
would you be so kind to give me the exact command you used?
something like
set Mythz programHC1_Fr_0 00:15--00:45
p.s. at fist glance the syntax check  in line 1212 is: 
($arg !~ /^(?:\d|[01]\d|2[0-3]):[0-5]\d$/ )ad is should not accept higher than 23:59
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: The Spirit am 14 April 2023, 12:21:47
my command is:
set Mythz programHC1_Tu_2 21:00--24:00see the error here
Bildschirmfoto 2023-04-14 um 12.18.25.png

if i set the time within my tecalor with the scroll-wheel, i can set a end time of 24:00 (this is also shown in fhem if i read the value).
if i try to set the end time via fhem, i can only choose an end time of 23:59 which results in an end time of 23:45.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 14 April 2023, 21:27:30
fix committed
return "Argument does not match the allowed inerval Min $argMin ...... Max $argMax " if (($arg ne "n.a.") and ($arg1 ne "n.a.") and (($arg !~ /^(?:\d|[01]\d|2[0-3]):[0-5]\d$/ )  or ($arg1 !~ /^24:00|(?:\d|[01]\d|2[0-3]):[0-5]\d$/ )) ) ;update fhem tomorrow and it should work
immi
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 24 Juni 2023, 13:28:50
Hi immi,

For me setting of pClockHour does not work. I can read the actual value with "get" command, but when trying to "set" it does not change the value, the return-value is always the old value.
When I change the value on the heatpump itself I get the new one with a "get".

Any idea?

firmware-attribute: 5.39
sFirmware: version: 05.39
sFirmware-Id: HW: 113 SW: 3.16 Date: DEC 10 2014
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 24 Juni 2023, 16:23:44
I roughly remember that we already discussed about that topic. Setting minutes works, but setting hours doesn't for any reason. Since THZ can deal with daylight saving time itself, this doesn't seem to be an issue. For clock synchronisation, setting minutes should be sufficient.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 24 Juni 2023, 19:01:45
Zitat von: willybauss am 24 Juni 2023, 16:23:44For clock synchronisation, setting minutes should be sufficient.
That's right.

Today I again tried to bypass the reset at 10:00 which surprisingly worked properly.
At 9:50 I manually set the clock to 7:50 and 2 hours later again another hour back to 8:50.
When it was 12:40 in reality the LWZ had 9:40, then I corrected it to 12:40 again.
Although it was really cold today, the release of cooling and passive cooling which was given yesterday still remained.

Of course I could use the minutes only to avoid crossing 10:00, but it's not possible to correct the time after 12:00 was passed. (Maybe it's not even required to wait until 12:00, I have to try that some other day.)
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 24 Juni 2023, 20:43:22
Zitat von: TheTrumpeter am 24 Juni 2023, 13:28:50For me setting of pClockHour does not work. I can read the actual value with "get" command, but when trying to "set" it does not change the value, the return-value is always the old value.
When I change the value on the heatpump itself I get the new one with a "get".
same for me
https://forum.fhem.de/index.php?msg=1252834
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 25 Juni 2023, 09:50:29
Zitat von: TheTrumpeter am 24 Juni 2023, 19:01:45(Maybe it's not even required to wait until 12:00, I have to try that some other day.)
I tried that today, it did not work:
At 9:40 I switched to 10:40. Cooling remained active for maybe 1 minute, but then it stopped.
So it seems that they not only reset the release-states at 10:00 but also block it between 10:00 and 12:00. (At least that seems the case with cooling. Passive cooling was already stopped due to high outside temperature, so I don't know if it's also valid for that, but I guess.)

So to completely bypass the reset it seems to be necessary to avoid that LWZ ,,sees" any time between 10:00 and 12:00.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: rett_de am 18 August 2023, 07:14:10
Hi all!

Can somebody enhance the THZ Module with the following values? HC2 for cooling is not supported, actually. I think, using HC2 is needed for most installations.

0C0287 : p99CoolingHC2Switch, "on" sets it 0x0001 and "off" sets 0x0000
0C0582 : p99CoolingHC2SetTemp
0C0583 : p99CoolingHC2HystersisFlowTemp
0C0584 : p99CoolingHC2HystersisRoomTemp
0C0264 : sDewPointHC2

Thank you so much for the support
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 19 August 2023, 22:47:36
Zitat von: rett_de am 18 August 2023, 07:14:10Hi all!
Can somebody enhance the THZ Module with the following values? HC2 for cooling is not supported, actually. I think, using HC2 is needed for most installations.
0C0287 : p99CoolingHC2Switch, "on" sets it 0x0001 and "off" sets 0x0000
0C0582 : p99CoolingHC2SetTemp
0C0583 : p99CoolingHC2HystersisFlowTemp
0C0584 : p99CoolingHC2HystersisRoomTemp
0C0264 : sDewPointHC2
Hi
I expect you have 539 or higher.
am I right?
immi
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: rett_de am 21 August 2023, 08:55:46
Zitat von: immi am 19 August 2023, 22:47:36
Zitat von: rett_de am 18 August 2023, 07:14:10Hi all!
Can somebody enhance the THZ Module with the following values? HC2 for cooling is not supported, actually. I think, using HC2 is needed for most installations.
0C0287 : p99CoolingHC2Switch, "on" sets it 0x0001 and "off" sets 0x0000
0C0582 : p99CoolingHC2SetTemp
0C0583 : p99CoolingHC2HystersisFlowTemp
0C0584 : p99CoolingHC2HystersisRoomTemp
0C0264 : sDewPointHC2
Hi
I expect you have 539 or higher.
am I right?
immi
Dear immi - exact. 5.39 is the firmware rev. Thanks for your support!
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 21 August 2023, 10:28:44
new code committed
try this evening or tomorrow an update
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: rett_de am 22 August 2023, 09:56:29
Zitat von: immi am 21 August 2023, 10:28:44new code committed
try this evening or tomorrow an update
Hi Immi - I tested it via direct downloading from svn. It works as expected with all the parameters. Thank you so much!

Best Regards Markus
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 05 September 2023, 15:36:48
Hi immi,

I remember a "set" command to clear the fault-memory which was available in earlier versions of THZ-module.
Was that removed some time back or is the memory in my brain corrupted?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 05 September 2023, 18:07:04
Zitat von: TheTrumpeter am 05 September 2023, 15:36:48I remember a "set" command to clear the fault-memory which was available in earlier versions of THZ-module.
Was that removed some time back or is the memory in my brain corrupted?
hi
I remember setting zResetLast10errors to 0
probably you need to change firmware attr to 4.39technician
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 06 September 2023, 06:36:53
Zitat von: immi am 05 September 2023, 18:07:04
Zitat von: TheTrumpeter am 05 September 2023, 15:36:48I remember a "set" command to clear the fault-memory which was available in earlier versions of THZ-module.
Was that removed some time back or is the memory in my brain corrupted?
hi
I remember setting zResetLast10errors to 0
probably you need to change firmware attr to 4.39technician
Thanks immi, I was not aware of separate "technican" option in firmware-attribute. I now changed from 4.39 to 4.39technican and "zResetLast10errors" is there now.
As I've already resettet the error-memory manually yesterday in the afternoon I cannot try whether it works. I'll remember it and if the error occurs again I'll try that option.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: roliko am 16 Oktober 2023, 12:20:27
Ín general I´m new in FHEM and I user FHEM to connect my LWZ303sol to my homeautomation using HomeAssistant. To connect both systems I us MQTT.
in the first stage, I only send the information from FHEM to HomeAssistant. In the second stage I try to control the heatpump.

My System:
SE LWZ303sol (solar is disabled)
FW: 2.16 -> attr firmware configuration version 2.14
Connection: serial interface, speed 14400 (with 14400 it runs more stable as with 9600)

Connection is successful. Reading of most interested data is possible (some values seems to be not decoded correcttly). Setting of the values is also possible.

At the moment I prepare the data to sent them over MQTT. With the Variable sGlobal I have have a strange behavior:

command: get Mythz sGlobal
response:
outsideTemp: 11.1 flowTemp: 26.8 returnTemp: 26.6 hotGasTemp: 33.6 dhwTemp: 47.1 flowTempHC2: 0 evaporatorTemp: 22.4 condenserTemp: 27.3 mixerOpen: 0 mixerClosed: 0 heatPipeValve: 0 diverterValve: 0 dhwPump: 0 heatingCircuitPump: 1 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: 24 inputVentilatorPower: 24 mainVentilatorPower: 0 outputVentilatorSpeed: 18 inputVentilatorSpeed: 23 mainVentilatorSpeed: 0 outsideTempFiltered: 9.3 relHumidity: n.a. dewPoint: n.a. P_Nd: n.a. P_Hd: n.a. actualPower_Qc: n.a. actualPower_Pel: n.a. collectorTemp: 28.1 insideTemp: 0

With userReadings with following command: heatPipeValve {(split ' ',ReadingsVal("Mythz","sGlobal",0))[21]} I get the result "heatPipeValve
0".

But when using a notification to sent data to the MQTTBridge with Internals - DEF
Mythz:sGlobal.* set mqtt_io publish -r fhem/LWZ303sol/Readings/{((split(":","$EVTPART0"))[0])} {"{((split(":","$EVTPART0"))[0])}":{"{((split(":","$EVTPART1"))[0])}":$EVTPART2,"{((split(":","$EVTPART3"))[0])}":$EVTPART4,"{((split(":","$EVTPART5"))[0])}":$EVTPART6,"{((split(":","$EVTPART7"))[0])}":$EVTPART8,"{((split(":","$EVTPART9"))[0])}":$EVTPART10,"{((split(":","$EVTPART11"))[0])}":$EVTPART12","{((split(":","$EVTPART13"))[0])}":$EVTPART14","{((split(":","$EVTPART15"))[0])}":$EVTPART16,"{((split(":","$EVTPART17"))[0])}":$EVTPART18","{((split(":","$EVTPART19"))[0])}":$EVTPART20","{((split(":","$EVTPART21"))[0])}":$EVTPART22","{((split(":","$EVTPART23"))[0])}":$EVTPART24"}}

the data sent to MQTT server is following

{"sGlobal":{"outsideTemp":11.1,"flowTemp":26.8,"returnTemp":26.6,"hotGasTemp":33.6,"dhwTemp":47.1,"flowTempHC2":0","evaporatorTemp":22.4","condenserTemp":27.3,"mixerOpen":0","mixerClosed":0","11.11":11.12","11.13":11.14"}}

The data with "11.11":11.12" should be "heatPipeValve": "0".
Also the next elements are showing the same or similar behavior.

I also tried so send the whole sGlobals over MQTT, but with the same result. Names and data are shown as "values" which are also changed.

Does anybody known how to solve this?
Thanks and best regards,
Roland
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 17 Oktober 2023, 21:03:50
I Roland
disclaimer: I do not use mqtt

neverstheless... I would divide the long registers like sGlobal with userreadings
and then send them automatically with MQTT_GENERIC_BRIDGE, which should not need notify.
If you need more help, search in the mqtt forum part
b.r.
immi
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: abu18 am 18 Oktober 2023, 10:08:34
Hi,

at first: great work :-) I am using this module to completely control my LWZ 304 trend since a few years...

Now, I am looking for a solution to activate "Stellventil WW" (control wave?) in the "Fachmann" level with fhem. I have a 304 Trend and am using the firmware "5.39". In the firmware "4.39technician" there is a parameter "zPumpDHW". I think this is not what I am looking for, but I think this is also a function in the "Fachmann" level? So, do you think it is possible to implement "Stellventil WW"/control wave(?) WW for the firmware "5.39"?

Background: Since two months or so, I have the problem that the heating circuit (and the house :-)) gets warm during making WW. As quick solution, I just closed the heating circuit and it was OK then. But the cold period is coming and so this solution won't work any more. I also did some tests with switching from WW to heating circuit and back multiple times as suggested in the manual, but this didn't help. But: Whenever I set "Stellventil WW", it worked (flowrate sinks from ~24.5 to ~22.5 and the heating circuit gets cold). Now, my idea is to set the "Stellventil WW" when starting WW heating.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 18 Oktober 2023, 20:41:16
Zitat von: abu18 am 18 Oktober 2023, 10:08:34So, do you think it is possible to implement "Stellventil WW"/control wave(?) WW for the firmware "5.39"?
For sure it is possible. You just have to give me the hex address of this register.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: abu18 am 19 Oktober 2023, 11:45:40
Zitat von: immi am 18 Oktober 2023, 20:41:16For sure it is possible. You just have to give me the hex address of this register.

And can you give me a hint how I can determine the hex address?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 22 Oktober 2023, 18:47:55
Zitat von: TheTrumpeter am 06 September 2023, 06:36:53Thanks immi, I was not aware of separate "technican" option in firmware-attribute. I now changed from 4.39 to 4.39technican and "zResetLast10errors" is there now.
As I've already resettet the error-memory manually yesterday in the afternoon I cannot try whether it works. I'll remember it and if the error occurs again I'll try that option.
Hi immi,

Resetting of the fault memory works now. Unfortunately I realised that I used 5.39 earlier that holds some additional parameters for cooling that I discovered some years back. Would you mind merging the set-command for resetting the fault memory into 5.39 or create a 5.39technican?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 24 Oktober 2023, 19:22:58
@roliko
Hi Roland, have you made progress with MQTT and Home Assistant ? I also use HA (though on a separate Raspberry Pi than the one where FHEM runs - and I cannot change this) but was unable to get the connection working.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 28 Oktober 2023, 06:43:43
Hi immi,

Can you please give me a hint what is wrong here?
[pre]3.10.25 16:55:29 1: Including fhem.cfg
2023.10.25 16:55:30 3: WEB: port 8083 opened
2023.10.25 16:55:30 3: WEBphone: port 8084 opened
2023.10.25 16:55:30 3: WEBtablet: port 8085 opened
2023.10.25 16:55:30 2: eventTypes: loaded 117 lines from ./log/eventTypes.txt
2023.10.25 16:55:30 3: Opening Mythz device /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0
2023.10.25 16:55:30 3: Setting Mythz serial parameters to 14400,8,N,1
2023.10.25 16:55:30 3: Mythz device opened
2023.10.25 16:55:30 1: Including /opt/fhem/log/fhem.save
2023.10.25 16:55:34 1: PERL WARNING: Use of uninitialized value $data{"currval2"} in concatenation (.) or string at (eval 8285) line 1.
2023.10.25 16:55:34 3: eval: { "Zu-Soll $data{currval1}%, Zu-Ist $data{currval2}Hz, Ab-Soll $data{currval3}%, Ab-Ist $data{currval4}Hz, Fort-Ist $data{currval5}Hz" }
2023.10.25 16:55:34 1: PERL WARNING: Use of uninitialized value $data{"currval3"} in concatenation (.) or string at (eval 8285) line 1.
2023.10.25 16:55:34 3: eval: { "Zu-Soll $data{currval1}%, Zu-Ist $data{currval2}Hz, Ab-Soll $data{currval3}%, Ab-Ist $data{currval4}Hz, Fort-Ist $data{currval5}Hz" }
2023.10.25 16:55:34 1: PERL WARNING: Use of uninitialized value $data{"currval4"} in concatenation (.) or string at (eval 8285) line 1.
2023.10.25 16:55:34 3: eval: { "Zu-Soll $data{currval1}%, Zu-Ist $data{currval2}Hz, Ab-Soll $data{currval3}%, Ab-Ist $data{currval4}Hz, Fort-Ist $data{currval5}Hz" }
2023.10.25 16:55:34 1: PERL WARNING: Use of uninitialized value $data{"currval5"} in concatenation (.) or string at (eval 8285) line 1.
2023.10.25 16:55:34 3: eval: { "Zu-Soll $data{currval1}%, Zu-Ist $data{currval2}Hz, Ab-Soll $data{currval3}%, Ab-Ist $data{currval4}Hz, Fort-Ist $data{currval5}Hz" }
2023.10.25 16:57:30 1: PERL WARNING: Use of uninitialized value $data{"currval2"} in concatenation (.) or string at (eval 8327) line 1.
2023.10.25 16:57:30 3: eval: { "Zu-Soll $data{currval1}%, Zu-Ist $data{currval2}Hz, Ab-Soll $data{currval3}%, Ab-Ist $data{currval4}Hz, Fort-Ist $data{currval5}Hz" }
2023.10.25 16:57:30 1: PERL WARNING: Use of uninitialized value $data{"currval3"} in concatenation (.) or string at (eval 8327) line 1.
2023.10.25 16:57:30 3: eval: { "Zu-Soll $data{currval1}%, Zu-Ist $data{currval2}Hz, Ab-Soll $data{currval3}%, Ab-Ist $data{currval4}Hz, Fort-Ist $data{currval5}Hz" }
2023.10.25 16:57:30 1: PERL WARNING: Use of uninitialized value $data{"currval4"} in concatenation (.) or string at (eval 8327) line 1.
2023.10.25 16:57:30 3: eval: { "Zu-Soll $data{currval1}%, Zu-Ist $data{currval2}Hz, Ab-Soll $data{currval3}%, Ab-Ist $data{currval4}Hz, Fort-Ist $data{currval5}Hz" }
2023.10.25 16:57:30 1: PERL WARNING: Use of uninitialized value $data{"currval5"} in concatenation (.) or string at (eval 8327) line 1.
2023.10.25 16:57:30 3: eval: { "Zu-Soll $data{currval1}%, Zu-Ist $data{currval2}Hz, Ab-Soll $data{currval3}%, Ab-Ist $data{currval4}Hz, Fort-Ist $data{currval5}Hz" }
2023.10.25 17:08:15 3: THZ_Get: Error msg2:  decode: new unknown answer  -- FD -> 01829A171003[/pre]
Are these warnings due to me not having correctly defined something, or I have wrong calcs?

### Plot 4

define Mythz_Plot4_Fans SVG FileLog_Mythz:thz4:CURRENT
setuuid Mythz_Plot4_Fans xxxxx
attr Mythz_Plot4_Fans label "Zu-Soll $data{currval1}%, Zu-Ist $data{currval2}Hz, Ab-Soll $data{currval3}%, Ab-Ist $data{currval4}Hz, Fort-Ist $data{currval5}Hz"
attr Mythz_Plot4_Fans plotsize 840,210
attr Mythz_Plot4_Fans room Heizung_Plot

The Plot looks ok (to me), though. Or what might I be overseeing?

thz4plot_2023-10-25.png

Thanks a lot for your help! 👍
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 29 Oktober 2023, 08:30:50
By the way, is this known already? Add this to fhem.cfg:

attr WEB JavaScripts codemirror/fhem_codemirror.js
When editing e.g. fhem.cfg99_myUtils.pm, etc., the editor looks like this, which makes editing easier (IMO).
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 30 Oktober 2023, 09:06:11
Zitat von: abu18 am 19 Oktober 2023, 11:45:40And can you give me a hint how I can determine the hex address?
Hi abu
Good connections to a tecalor firmware developer or reverse eng your heatpump and find the right cmd2=>"0A0XXX" by trial and error
If you want to try, there is a hidden function "debug_read_raw_register_slow"  in the 00_thz.pm
Some hints if you search in the forum
https://forum.fhem.de/index.php/topic,33452.msg526493.html#msg526493
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 30 Oktober 2023, 09:15:10
Zitat von: sunrise am 28 Oktober 2023, 06:43:43Hi immi,

Can you please give me a hint what is wrong here?

The Plot looks ok (to me), though. Or what might I be overseeing?

thz4plot_2023-10-25.png

Thanks a lot for your help! 👍

I would start by understanding why you get the error
THZ_Get: Error msg2:  decode: new unknown answer  -- FD -> 01829A171003
It looks like you have set the wrong firmware model in fhem 214 vs 206

Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 30 Oktober 2023, 09:34:15
Oh my bad - thank you! The type sticker on my THZ has "2.16" written by hand (maybe by the guys who installed it back in 2008). How could I confirm that it's really 2.16? Is it also written on the board (behind the electrics cover)?

Indeed under Readings I have:
sFirmwareversion: 02.16

But under Attributes I have:
firmware2.06

PS - please also note my sig - well, here it is:
ZitatTecalor 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

I used both of your versions (2.06 and 2.14) 2-3 years back but then abandoned the whole topic of FHEM (temporarily), and now started all over again. Is my memory correct that your code for firmware version 2.06 is closer than your version 2.14 to my firmware version 2.16?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 30 Oktober 2023, 10:12:10
Zitat von: TheTrumpeter am 22 Oktober 2023, 18:47:555.39technican
implemented
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 03 November 2023, 12:35:49
Hi immi!

What's the best way to find out about the (subtle?) differences between my FW 2.16 and the FW versions 2.06 and 2.14 that you consider in your code?

I have a serial sniffer that shows (besides ASCII) also HEX code. E.g., when triggering the "Betriebszustand", the following is shown (not sure which format makes sense here, sorry, if it doesn't):

021001000A0910031002100100E309009D009D6F633994000000000010031002100100FDFC100310021001006DFC00040C211A17000B03100310

PS: Are LogFile messages like this a result of firmware version mismatch?
Zitat2023.11.01 23:55:04 3: GetsHeatRecoveredDay: Unknown argument sHeatRecoveredDay, choose one of  inputVentilatorPower:noArg inputVentilatorSpeed:noArg mainVentilatorPower:noArg mainVentilatorSpeed:noArg outputVentilatorPower:noArg outputVentilatorSpeed:noArg p01-p12:noArg p01RoomTempDay:noArg p02RoomTempNight:noArg p03RoomTempStandby:noArg p04DHWsetTempDay:noArg p05DHWsetTempNight:noArg p06DHWsetTempStandby:noArg p07FanStageDay:noArg p08FanStageNight:noArg p09FanStageStandby:noArg p10HCTempManual:noArg p11DHWsetTempManual:noArg p12FanStageManual:noArg p13GradientHC1:noArg p14LowEndHC1:noArg p15RoomInfluenceHC1:noArg p16GradientHC2:noArg p17LowEndHC2:noArg p18RoomInfluenceHC2:noArg p19FlowProportionHC1:noArg p20FlowProportionHC2:noArg p21Hyst1:noArg p22Hyst2:noArg p23Hyst3:noArg p24Hyst4:noArg p25Hyst5:noArg p29HystAsymmetry:noArg p30integralComponent:noArg p32HystDHW:noArg p33BoosterTimeoutDHW:noArg p34TempLimitBoostDHW:noArg p35PasteurisationInterval:noArg p36MaxDurationDHWLoad:noArg p37Fanstage1AirflowInlet:noArg p38Fanstage2AirflowInlet:noArg p39Fanstage3AirflowInlet:noArg p40Fanstage1AirflowOutlet:noArg p41Fanstage2AirflowOutlet:noArg p42Fanstage3AirflowOutlet:noArg p43UnschedVent3:noArg p44UnschedVent2:noArg p45UnschedVent1:noArg p46UnschedVent0:noArg p47CompressorRestartDelay:noArg p48MainFanSpeed:noArg p49SummerModeTemp:noArg p50SummerModeHysteresis:noArg p54MinPumpCycles:noArg p55MaxPumpCycles:noArg p56OutTempMaxPumpCycles:noArg p57OutTempMinPumpCycles:noArg p58SuppressTempCaptPumpStart:noArg p75PassiveCooling:noArg p77OutTempFilterTime:noArg p78DualModePoint:noArg p79BoosterTimeoutHC:noArg p80EnableSolar:noArg pAbsence:noArg pCircPump:noArg pClockDay:noArg pClockHour:noArg pClockMinutes:noArg pClockMonth:noArg pClockYear:noArg pDHW:noArg pDHWProg:noArg pDefrostAA:noArg pDefrostEva:noArg pDryHeat:noArg pFan:noArg pFanProg:noArg pHeat1:noArg pHeat2:noArg pHeatProg:noArg pRestart:noArg pSolar:noArg progDHWEnable:noArg progDHWEndTime:noArg progDHWFriday:noArg progDHWMonday:noArg progDHWSaturday:noArg progDHWStartTime:noArg progDHWSunday:noArg progDHWThursday:noArg progDHWTuesday:noArg progDHWWednesday:noArg progFAN1Enable:noArg progFAN1EndTime:noArg progFAN1Friday:noArg progFAN1Monday:noArg progFAN1Saturday:noArg progFAN1StartTime:noArg progFAN1Sunday:noArg progFAN1Thursday:noArg progFAN1Tuesday:noArg progFAN1Wednesday:noArg progFAN2Enable:noArg progFAN2EndTime:noArg progFAN2Friday:noArg progFAN2Monday:noArg progFAN2Saturday:noArg progFAN2StartTime:noArg progFAN2Sunday:noArg progFAN2Thursday:noArg progFAN2Tuesday:noArg progFAN2Wednesday:noArg progHC1Enable:noArg progHC1EndTime:noArg progHC1Friday:noArg progHC1Monday:noArg progHC1Saturday:noArg progHC1StartTime:noArg progHC1Sunday:noArg progHC1Thursday:noArg progHC1Tuesday:noArg progHC1Wednesday:noArg progHC2Enable:noArg progHC2EndTime:noArg progHC2Friday:noArg progHC2Monday:noArg progHC2Saturday:noArg progHC2StartTime:noArg progHC2Sunday:noArg progHC2Thursday:noArg progHC2Tuesday:noArg progHC2Wednesday:noArg sControl:noArg sDHW:noArg sFan:noArg sFirmware:noArg sGlobal:noArg sHC1:noArg sHC2:noArg sHistory:noArg sLast10errors:noArg sProgram:noArg sSol:noArg sSystem:noArg sTimedate:noArg zBackupParameters:noArg
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 04 November 2023, 10:03:19
Zitat von: sunrise am 03 November 2023, 12:35:49What's the best way to find out about the (subtle?) differences between my FW 2.16 and the FW versions 2.06 and 2.14 that you consider in your code?
021001000A0910031002100100E309009D009D6F633994000000000010031002100100FDFC100310021001006DFC00040C211A17000B03100310
the best way is to ask tecalor for a documentation of their registers :)
otherwise:

1) understand the hex comunication protocol --> green is fhem; blue is the heatpump
Zitat02 hi heatpump, I want to talk
10 OK
0100 0A09 1003 I would like to read register 09, my checksum is 0A
10 OK
02 sending answer
10 OK
0100 E309 009D009D6F6339940000000000 1003 I send you register 09 with checksum E3
10 OK
2) interprete 009D009D6F6339940000000000
3) improve the mapping at line 113 of andre.k in https://github.com/mhop/fhem-mirror/blob/master/fhem/FHEM/00_THZ.pm

start the same process for each register
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 04 November 2023, 14:53:39
Fine, but where in your code do I find the codes that you already have?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 06 November 2023, 10:31:05
Zitat von: sunrise am 04 November 2023, 14:53:39Fine, but where in your code do I find the codes that you already have?
Zitat von: immi am 04 November 2023, 10:03:19line 113 from andre.k in https://github.com/mhop/fhem-mirror/blob/master/fhem/FHEM/00_THZ.pm
you can contact andre.k
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 09 November 2023, 07:01:17
Zitat von: immi am 30 Oktober 2023, 10:12:10
Zitat von: TheTrumpeter am 22 Oktober 2023, 18:47:555.39technican
implemented
Thanks a lot!
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: abu18 am 12 November 2023, 17:40:34
Hi,

good news about my problem:

Zitat von: abu18 am 18 Oktober 2023, 10:08:34Now, I am looking for a solution to activate "Stellventil WW" (control wave?) in the "Fachmann" level with fhem.

Finally, I found out how to activate this by adding the following code to %setsX39technician:

  "zControlValve_DHW"    => {cmd2=>"0A0653", argMin =>   "0",    argMax =>  "1",    type =>"1clean",  unit =>""}, 

It will be set to 0 automatically apx. 1 minute after activating it...

@immi: Do you want to add this to the "official" version? It works on a LWZ 304 trend (5.39_05.09HW113SW3.17Date)

Zitat von: abu18 am 18 Oktober 2023, 10:08:34Now, my idea is to set the "Stellventil WW" when starting WW heating.

That will be the next step: Whenever the WW heating is active and the flowrate is > 23.5l/min, I want to activate zControlValve_DHW. I added zFlowRate to %getsonly539...

Zitat"zFlowRate"        => {cmd2=>"0A01DA", type =>"5temp",  unit =>"l/min"}

... and want to read it every 10 seconds for 2 minutes or so after I started DHW heating, but I have to read some fhem docu to learn how to do that...
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: zdravec am 18 November 2023, 08:43:22
Hi, I have a problem with my THZ module.
I was using one year an old raspberry 3a+, but it was slow and often the ui was unresponsive.
Some weeks ago I changed to raspberry 4b and the ui is fast, but since 3 days I have different problem.
Some days ago there was no data for them heating pump. I restarted the raspberry and it worked again. Today it happened again.
Both time there was following error in the log

2023.11.18 00:11:00 3: THZ_Get: Error msg2:  THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0  -- 0A0176 ->
I changed to nonblocking to 1 and the simpleReadTimeout to 8, but it didn't  help.
What else can solve the problem?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 18 November 2023, 08:47:40
Hi immi,

Can you please give me a hint about the exact meaning of these parameters?

Reading from last week:
operatingHours1: 283 operatingHours2: 283 heatingHours: 28532 DHWhours: 14751 coolingHours: 0

Today:
operatingHours1: 502 operatingHours2: 501 heatingHours: 28593 DHWhours: 14765 coolingHours: 0
I understand that the last one will always remain zero, as my THZ 303 SOL does not cool. However, I don't understand the meaning of "operatingHours" (operation of what exactly?) and why there are 1+2 (and how they differ from each other). Furthermore, does "heatingHours" mean that the HC pump worked for 28593 hours till now? And the pump for DHW for 14765 hours? Or are these hours of operation of boosters (which would be very high, so I hope rather not).

For comparison, sHistory reported by TheTrumpeter (and others with higher firmware versions than me [using 2.06 in THZ module, which seems to be the closest/best working with my 2.16 firmware in my THZ 303 SOL]) looks like this:

compressorHeating: 7175 compressorCooling: 1204 compressorDHW: 1887 boosterDHW: 5 boosterHeating: 31
How do these "translate" to my parameters/values?


And why does sControl contain boosterStage2+1 but no boosterStage3?

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


(btw, sGlobal does have boosterStage3, boosterStage2, and boosterStage1)


Thanks for helping me better understanding this! :)
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 18 November 2023, 09:38:18
BTW, here's the result of get Mythz debug_read_raw_register_slow in data.txt:
010002011003-01-68010064008700AA0064008700AA0000003C000000000000
01000A091003-09-010901F701F66FB239AE0000000000
010017161003-16-151602FA01CF020900000A003C1200CF00
0100D2D11003-D1-6DD1030300170138064A000F07EE090600170454096A000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0100D3D21003-D2-0100D3D21003-UpTempLimitDefrostEvaporatorEnd: 5499.4 MaxTimeDefrostEvaporator: 4099-decode: command not known
0100E9E81003-E8-0100E9E81003-018255D21003-decode: new unknown answer
0100EAE91003-E9-D2E90000000000000000000003E80000000000121CCE0000000000000000000100
0100F3F21003-F2-1BF20000000202000000101200010100000000
0100F4F31003-F3-A6F301CF003B01A40000121C0F08020100011E9B
0100F5F41003-F4-A1F4003BFF1101DCFFFE0209012201E900010001120000960100000000D200000000000002000000F0
0100F6F51003-F5-68F5003B01DC0000013601DCFC180001121C0100000200000000
0100F7F61003-F6-07F600000000FF1000FFFF0100000000000200000000
0100F9F81003-F8-0100F9F81003-UpTempLimitDefrostEvaporatorEnd: 6476 MaxTimeDefrostEvaporator: 4099-decode: command not known
0100FCFB1003-FB-FBFB02FA003B020901DC03A801CF00000000FFE901F1121C393999CD241B11000031000000000000000202
0100FDFC1003-FC-8EFC000509222D17000B12
0100FEFD1003-FD-D6FD00D8
0100FFFE1003-FE-0100FFFE1003-UpTempLimitDefrostEvaporatorEnd: 76.6 MaxTimeDefrostEvaporator: 4099-decode: command not known
010000FF1003-FF-010000FF1003-UpTempLimitDefrostEvaporatorEnd: 102.3 MaxTimeDefrostEvaporator: 4099-decode: command not known
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 18 November 2023, 09:43:59
@zdravec  (https://forum.fhem.de/index.php?action=profile;u=52464)
These "too slow messages" happen sometimes and were discussed in this thread.

Recommendations were e.g. checking the cable and adapter (serial/USB). Besides, I vaguely remember that there was something "special" about the RS232 interface on Raspberry Pi 3s, but if you use a serial/USB adapter that should not matter (I guess).

Changing "nonblocking" might not help, at least I remember immi telling me that I should leave it. :)

After I shortened and resoldered my cable (still ~5m long), I still see these "too slow" messages in the log but not so frequently anymore as before. And the plots do not show gaps or something.

Good luck!
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 18 November 2023, 09:50:05
Zitat von: zdravec am 18 November 2023, 08:43:22I was using one year an old raspberry 3a+, but it was slow and often the ui was unresponsive.
Some weeks ago I changed to raspberry 4b and the ui is fast, but since 3 days I have different problem.
Did you just take the SD-card from 3A+ out and put it into 4B or did you start with a complete new installation with maybe a newer version of OS?
If you started with a new installation, through which device do you connect your LWZ?

I did a complete new installation some weeks back (changed from a very old version of the OS to Buster) and face a similar issue with some other devices. Only ones with CH341-chip are affected in my installation (nanoCUL-clone and a RS485-adapter in my case). The issue is also visible in syslog. For nanoCUL as a workaround it works to regularly "redefine" the device in FHEM and for RS485 which I do not directly access through FHEM I simply restart the service which accesses it.

Further you could also check if your power-supply is sufficient as the 4B needs more power than the 3A+ did. As a first indication just check if you see throttling.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: zdravec am 18 November 2023, 10:37:04
I started completely new installation. I had home assistant running on the pi4, but I had to change the SD card after some years, so I decided to move it to a mini pc.
The raspberry 4 was there unused, I orderd a new SD card and istalled everything, than I created fhem backup from the pi3 and restored it on the new installation.

The pi4 is using different power supply taht the pi3, I checkt the logs, there is no throttling.

But I checked the system log and found following
Nov 17 21:47:57 fhem kernel: cp210x ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -3. I have to search, what exactly the reason for this can be. I changed now to an usb3 port, let see, if it is more stable.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 18 November 2023, 12:22:34
I have the same messages but for the CH341 devices.
Also no throttling for me.

Which OS version do you use?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 18 November 2023, 12:49:35
Old but maybe helpful:
https://github.com/raspberrypi/linux/issues/2406#issuecomment-1685151794

If you use a USB port between, please consider trying without it (directly).

Furthermore:
Zitatthat the Pi's USB ports can supply a maximum of 6 watts (5V at up to 1.2A, which is shared by all USB ports in use). If the total of all of your USB devices is more than 1.2A they won't work reliably (if at all)
(https://forums.raspberrypi.com/viewtopic.php?p=2038055&#p2038055)
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 18 November 2023, 15:04:24
"unpowered hub"...  :o  :-X  :-\
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 18 November 2023, 15:21:39
Ja, wenn's unpowered ist, ist's Mist.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: zdravec am 19 November 2023, 06:22:46
I don't use an usb hub, the usb cable is directly connected to the raspberry and the heating pump.
If I cannot solve the problem, I will search for a longer cable and install fhem on the mini pc, but that I need 5 meter cable, maybe that is too long.

I use the latest raspberry I is, 64 bit version. I read, that maybe 32 bit version doesn't have the problem, I will try it next week.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 19 November 2023, 15:05:23
@immi @andre.k
P31 (number of available booster stages for heating) does not seem to be available for set and get but only as part of pHeat2. Is there a specific reason for this? Would you mind adjusting your THZ module, so P31 is available on its own? (and maybe as separate Reading, or can I add it myself?)

The same is true (in my case) for P59 ("Wiedereinschaltzeit vor Beendigung des Absenkbetriebs [min]"). I have a Reading pRestart:
p59RestartBeforeSetbackEnd: 0So P59 is not available for set and get but only as part of pRestart. Same question here: Would you mind adding it separately? Or how could I change its setting via FHEM/THZ module?


Furthermore, I wonder about the meaning of P26-P28 (all set to 1 in my case). According to my THZ 303 SOL manual, there are only on/off hysteresis parameters for heating P21-P25:

ZitatDie Schalthysteresen H1 bis H5 sind symmetrisch um den Heizkreistemperatur-Sollwert angelegt. Sinkt die Heizkreistemperatur, wird bei Heizkreissolltemperatur - Hysterese H1 eine Leistungsstufe zugeschaltet. Bei Heizkreisolltemperatur - H1 - H2 wird eine weitere Stufe zugeschaltet. Steigt die Heizkreistemperatur, so wird bei Heizkreissolltemperatur + H1 eine Leistungsstufe weggeschaltet. Übersteigt die Heizkreistemperatur die Heizkreissolltemperatur + H1 + H2, wird eine weitere Stufe weggeschaltet. Im Normalfall wird die Heizung im eingeschwungenen Zustand zwischen zwei Stufen hin- und herschalten. Unter Umständen können große Abweichungen vom Sollwert auftreten, wenn die Heizkreistemperatur z.B. nach einer Sperrzeit des Elektrizitätsversorgers weit unterhalb des Sollwertes liegt oder wenn sich der Sollwert z.B. nach einer Absenkzeit sprunghaft ändert. Bevor die Abweichung vom Sollwert zu groß wird, werden durch den Integralanteil (s. P30) die Heizstufen zeitabhängig zu- oder weggeschaltet.

What could P26-P28 (H6-H8?) be for, and why do we have 5 parameters H1 to H5 (P21-P25), whereas the aforementioned manual reads about 2 parameters, i.e. H1 und H2? Sorry, I don't get it. 🤔
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 19 November 2023, 15:50:59
I'm sorry that I have this further question:

Why do the parameters below have no individual Readings (but are only part of sTimedate) and do not contain the corresponding numbers "P64-P68"? As a consequence, they cannot be set via FHEM, or am I overlooking or misunderstanding something?

"pClockDay" => {parent=>"sTimedate",argMin => "1", argMax => "31", type =>"pclean", unit =>""},
"pClockMonth" => {parent=>"sTimedate",argMin => "1", argMax => "12", type =>"pclean", unit =>""},
"pClockYear" => {parent=>"sTimedate",argMin => "12", argMax => "20", type =>"pclean", unit =>""},
"pClockHour" => {parent=>"sTimedate",argMin => "0", argMax => "23", type =>"pclean", unit =>""},
"pClockMinutes" => {parent=>"sTimedate",argMin => "0", argMax => "59", type =>"pclean", unit =>""},
(lines 705 (https://svn.fhem.de/trac/browser/trunk/fhem/FHEM/00_THZ.pm#L705) ff. in trunk)
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 20 November 2023, 21:19:56
Hi
Zitat von: abu18 am 12 November 2023, 17:40:34"zControlValveDHW"    => {cmd2=>"0A0653", argMin =>  "0",    argMax =>  "1",    type =>"1clean",  unit =>""}, 
I can add zControlValveDHW, if you want

Zitat von: abu18 am 18 Oktober 2023, 10:08:34"zFlowRate"        => {cmd2=>"0A01DA", type =>"5temp",  unit =>"l/min"}
I do not like the name zFlowRate: it should start with "s" if read only and it is to similar to sFlowRate
"sFlowRate"          => {cmd2=>"0A033B", type =>"1clean", unit =>" cl/min"},

can you tell me the difference between 0A01DA and 0A033B?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 21 November 2023, 13:29:04
Were my questions (https://forum.fhem.de/index.php?msg=1293697, https://forum.fhem.de/index.php?msg=1293825 and https://forum.fhem.de/index.php?msg=1293835) too vague, or is there really nobody who could help me?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 22 November 2023, 16:48:04
Is there anybody who could help me please with my 3 posts/questions? Thank you! ❤️
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 26 November 2023, 09:49:18
Hello!

Does anybody know why there are 2 of these parameters?

The values are always close to each other, sometimes even the same.

And I am also unsure what these hours really mean - "operating hours" ("Betriebsstunden"), because on 20 Oct 2023, both were just 10 on my THZ 303 SOL (which runs since 2008), and today I see 683/686 hours.

Why were there just 10 hours after about 15 years of use and 683/686 hours after about 5 weeks later since then? That does not seem plausible, or do I misunderstand it?

Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 27 November 2023, 17:57:46
Depending on the model and firmware version, there are different sHistory values:

Newer versions (e.g. LWZ 404 SOL):
ZitatcompressorHeating: 938 compressorCooling: 0 compressorDHW: 89 boosterDHW: 0 boosterHeating: 0

Older versions (THZ 303 SOL with device firmware 2.16 and THZ module firmware set to 2.06 - closest I get):
ZitatoperatingHours1: 283 operatingHours2: 283 heatingHours: 28532 DHWhours: 14751 coolingHours: 0

I still try to understand the meaning of the first 2.

Below shown operatingHours1+2 parameters are simply increased by 1 per hour, irrespective if a booster is running or not. All 3 boosterStages were zero during this period, so they cannot indicate operating hours of any booster (DHW or HC). So it remains unclear what they are.

And why are operatingHours1+2 always so close to each other? I've seen a technician's software, where these values were represented as "Verdichter A" and "Verdichter B" (compressor A and B) under "Betriebsstunden" (operating hours). The second one ("B") was greyed out but still showed a value (same as "A").  So what are they showing?

The parameters heatingHours and DHWhours each increased by 1; however, not within an hour but within a period of at least 1.5 hours (15:40-17:10). I assume that they indicate the total hours of compressor with HC pump and compressor with DHW pump, respectively, since the THZ's initial operation started years ago. And this makes sense to me - but the other 2 mentioned above?

Log shown quoted to allow colours for highlighting:
Zitat2023-11-27_15:40:05 Mythz sHistory: operatingHours1: 717 operatingHours2: 717 heatingHours: 28648 DHWhours: 14782 coolingHours: 0
2023-11-27_15:45:05 Mythz sHistory: operatingHours1: 718 operatingHours2: 717 heatingHours: 28648 DHWhours: 14782 coolingHours: 0
2023-11-27_15:50:05 Mythz sHistory: operatingHours1: 718 operatingHours2: 717 heatingHours: 28648 DHWhours: 14782 coolingHours: 0
2023-11-27_15:55:05 Mythz sHistory: operatingHours1: 718 operatingHours2: 717 heatingHours: 28648 DHWhours: 14782 coolingHours: 0
2023-11-27_16:00:06 Mythz sHistory: operatingHours1: 718 operatingHours2: 717 heatingHours: 28648 DHWhours: 14782 coolingHours: 0
2023-11-27_16:05:06 Mythz sHistory: operatingHours1: 718 operatingHours2: 718 heatingHours: 28648 DHWhours: 14782 coolingHours: 0
2023-11-27_16:10:06 Mythz sHistory: operatingHours1: 718 operatingHours2: 718 heatingHours: 28648 DHWhours: 14782 coolingHours: 0
2023-11-27_16:15:06 Mythz sHistory: operatingHours1: 718 operatingHours2: 718 heatingHours: 28648 DHWhours: 14782 coolingHours: 0
2023-11-27_16:20:06 Mythz sHistory: operatingHours1: 718 operatingHours2: 718 heatingHours: 28648 DHWhours: 14783 coolingHours: 0
2023-11-27_16:25:11 Mythz sHistory: operatingHours1: 718 operatingHours2: 718 heatingHours: 28648 DHWhours: 14783 coolingHours: 0
 2023-11-27_16:30:11 Mythz sHistory: operatingHours1: 718 operatingHours2: 718 heatingHours: 28648 DHWhours: 14783 coolingHours: 0
2023-11-27_16:35:14 Mythz sHistory: operatingHours1: 718 operatingHours2: 718 heatingHours: 28648 DHWhours: 14783 coolingHours: 0
2023-11-27_16:40:14 Mythz sHistory: operatingHours1: 718 operatingHours2: 718 heatingHours: 28648 DHWhours: 14783 coolingHours: 0
2023-11-27_16:45:14 Mythz sHistory: operatingHours1: 718 operatingHours2: 718 heatingHours: 28648 DHWhours: 14783 coolingHours: 0
2023-11-27_16:50:14 Mythz sHistory: operatingHours1: 719 operatingHours2: 718 heatingHours: 28648 DHWhours: 14783 coolingHours: 0
2023-11-27_16:55:14 Mythz sHistory: operatingHours1: 719 operatingHours2: 718 heatingHours: 28648 DHWhours: 14783 coolingHours: 0
2023-11-27_17:00:14 Mythz sHistory: operatingHours1: 719 operatingHours2: 718 heatingHours: 28648 DHWhours: 14783 coolingHours: 0
2023-11-27_17:05:14 Mythz sHistory: operatingHours1: 719 operatingHours2: 718 heatingHours: 28649 DHWhours: 14783 coolingHours: 0
2023-11-27_17:10:14 Mythz sHistory: operatingHours1: 719 operatingHours2: 719 heatingHours: 28649 DHWhours: 14783 coolingHours: 0
2023-11-27_17:15:14 Mythz sHistory: operatingHours1: 719 operatingHours2: 719 heatingHours: 28649 DHWhours: 14783 coolingHours: 0
2023-11-27_17:20:14 Mythz sHistory: operatingHours1: 719 operatingHours2: 719 heatingHours: 28649 DHWhours: 14783 coolingHours: 0
2023-11-27_17:25:14 Mythz sHistory: operatingHours1: 719 operatingHours2: 719 heatingHours: 28649 DHWhours: 14783 coolingHours: 0

Does anybody with a THZ 303 SOL and a device firmware 2.06 (with FHEM THZ firmware set to 2.06) have an idea if there is another way to count booster hours for an alarm or to create a booster alarm by other means?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 28 November 2023, 11:10:52
Does anybody know if "Schnüffelzyklen" also contribute to heatingHours?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 28 November 2023, 14:34:21
@immi
Is it possible that you change the time stamps of the THZ module (currently 2023.11.28 13:53:44) so it matches FHEM's time stamp (2023-11-28_13:53:44)? It would help quickly comparing and finding certain events in both logs. Thanks for your consideration.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 28 November 2023, 21:23:30
Zitat von: sunrise am 28 November 2023, 14:34:21Is it possible that you change the time stamps of the THZ module (currently 2023.11.28 13:53:44) so it matches FHEM's time stamp (2023-11-28_13:53:44)? It would help quickly comparing and finding certain events in both logs. Thanks for your consideration.
THZ has no timestamp.
the first is probably from main fhem logging
the second is probably from FileLog module
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 30 November 2023, 16:10:54
Thank you, immi! 😊

BTW, how complicated do you judge a port of your Perl code to MicroPython? Would the latter (if it existed) enable communication with the THZ/LWZ via e.g. an ESP32? Are you aware of projects in MicroPython that handle a serial communication with handshake etc. as is necessary for the THZ?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: abu18 am 30 November 2023, 23:45:13
Hi immi,

Zitat von: immi am 20 November 2023, 21:19:56I can add zControlValveDHW, if you want

Yes, please :-)

Zitat von: immi am 20 November 2023, 21:19:56I do not like the name zFlowRate: it should start with "s" if read only and it is to similar to sFlowRate

Sorry, you are right... I didn't see that there is already an sFlowRate => So, there's no need to add another flowrate...
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 01 Dezember 2023, 17:19:17
@immi and everybody

What are the meanings and where are the differences between these? (current values in parentheses)




In the log, I found this around noon today in sGlobal (5 minutes later all were back to zero):
boosterStage3: 1 boosterStage2: 0 boosterStage1: 1
This, too, leaves me uncertain about the meanings of these "stages", because boosterStage3 was engaged, boosterStage2 was not, and boosterStage1 was engaged. I assumed that the engagement ("on") of the stages followed a pattern like this:

But here it seems that the "middle" boosterStage2 was kept off. Why? Is this expected? Is this just "random"?


As hcBoosterStage is in sHC1 (and as the "hc" in its name of course suggests), this is always heating circulation-related. But what is its meaning/ differentiation from boosterStages1-3?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 07 Dezember 2023, 21:00:05
Zitat von: abu18 am 30 November 2023, 23:45:13Hi immi,
Yes, please :-)
zControlValveDHW committed
Zitat von: sunrise am 30 November 2023, 16:10:54Are you aware of projects in MicroPython that handle a serial communication with handshake etc. as is necessary for the THZ?
there are several implementation in c of ser2net with esp32 or esp8266 working with fhem
e.g. https://github.com/letscontrolit/ESPEasy
no c or python support here.
Please stay ontopic and write here if you have a change request on the fhem perl code
immi
 
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mwuerr am 18 Dezember 2023, 15:12:54
Hi immi,
hi belu, hi godmorgon or whoever has a THZ504 or uses getsonly539.
I am suspecting that the ids of sFlowRate and sComprRelPower are swapped.

quote from https://svn.fhem.de/trac/browser/trunk/fhem/FHEM/00_THZ.pm

my %getsonly539 = (  #info from belu and godmorgon
806      "sFlowRate"          => {cmd2=>"0A033B", type =>"1clean", unit =>" cl/min"},
...
810      "sComprRelPower"      => {cmd2=>"0A069B", type =>"1clean", unit =>" %"},



the attached diagram shows that sFlowRate follows sHeatingRelPower (in the range where sHeatingRelPower results in the Inverter running, starting at 40)
while sComprRelPower does what one would the flow of water through the heating circuit expect to do. To sniffel every once in a while and then to go to a constant value in preparation of a heating cycle and to jump to a higher value during a warm water cycle, which was around 12:00.
suspect_sFlowRateAndsComprRelPowerAreSwapped2.png

Version: 00_THZ.pm           28108 2023-10-30 09:08:21Z immi

can anyone with a THZ 504 or a different inverter base system who uses getsonly539 confirm my findings?
@belu, @godmorgon
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: abu18 am 19 Dezember 2023, 08:01:47
Zitat von: immi am 07 Dezember 2023, 21:00:05zControlValveDHW committed

Thanks :-)

@mwuerr: For me (LWZ 304 Trend/5.39technician) sFlowRate is correct...

Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 29 Dezember 2023, 11:51:56
Zitat von: mwuerr am 18 Dezember 2023, 15:12:54can anyone with a THZ 504 or a different inverter base system who uses getsonly539 confirm my findings?
Zitat von: abu18 am 19 Dezember 2023, 08:01:47@mwuerr: For me (LWZ 304 Trend/5.39technician) sFlowRate is correct...
Hi mwuerr,
I do not have a 5.39, thefore I cannot xcheck.
With abu18 contraddiction, I cannot change the code for 5.39
If you see more differences and aggregate them, I can make you a version like 5.39mwuerr
immi
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mwuerr am 06 Januar 2024, 12:32:23
Hi immi,

Zitat von: immi am 29 Dezember 2023, 11:51:56With abu18 contraddiction, I cannot change the code for 5.39

Thats why I was asking. To see if my findings are true also for other devices/versions.


You seem to have been doing quite well with just differentiating by firmware versions, I would like to know if anyone has found that the device type is also relevant or if Stiebel/Tecalor realy uses the same software in all their devices. In addition the the configured firmware version that the 00_THZ should assume it would also be great to know the firmware version you realy have.
Thanks @abu18 for mentioning that yours is a LWZ 304 Trend. Can you please provide your firmware version.

Because of that: Are there any other THZ504 / LWZ8CS users our there who cold confirm or reject my finding please.

Mine:
mwuerr
Device Type: THZ504

sFirmware "version: 07.59"
sFirmware-Id "HW: 239 SW: 4.16 Date: NOV 7 2022"
running with 00_THZ.pm "28108 2023-10-30 09:08:21Z immi" configured attributes: firmware="5.39"


Zitat von: immi am 29 Dezember 2023, 11:51:56If you see more differences and aggregate them, I can make you a version like 5.39mwuerr
I will monitor it, gather and contact you. Thanks.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mwuerr am 06 Januar 2024, 23:43:46
After talking privately to immi I have agreed with him that we will improve the wiki article.

* https://wiki.fhem.de/wiki/Tecalor_THZ_W%C3%A4rmepumpe
* https://wiki.fhem.de/wiki/Tecalor_THZ_Heatpump

We meaning I will do the job, but I need some support, some questions answered. Mainly from previous editors, but probably also from immi and some of you.

Lets start with
@Krikan: von 2016-05-04 you have modified the english version: https://wiki.fhem.de/w/index.php?title=Tecalor_THZ_Heatpump&type=revision&diff=15290&oldid=10433
"‎Beispielkonfiguration: -> Anpassung an geändertes trigger-Verhalten userReadings"
Together with several other module documentations.

I have ported this over to the german version now.
https://wiki.fhem.de/w/index.php?title=Tecalor_THZ_W%C3%A4rmepumpe&type=revision&diff=38846&oldid=24988
Please confirm that what I copied to the german version is correct.

As far as my comparison worked this is the only content difference between the english and the german version. I have compared the version history, and ignored edits that only contained formating or spelling corrections. I have not compared the actual content of the two articles.

I will from now on extend the german version with new content and add markers in the english version that those sections are missing there, linking to the sections in the german version. I might - I would like to, but can't promise anything - update the english version later on.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 11 Januar 2024, 13:05:42
Hi immi,

I've seen that the upper limit for p01 is set to 32 °C in THZ-module whereas my heatpump only accepts values up to 30 °C. I guess that's the same for all versions and firmwares. Would you mind changing it some time?
(I guess that also applies for p02 and p03 and the corresponding values for HC2.)
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mwuerr am 11 Januar 2024, 20:44:21
Zitat von: TheTrumpeter am 11 Januar 2024, 13:05:42up to 30 °C. I guess that's the same for all versions and firmwares.

I can confirm all your findings and guesses for THZ504 and LWZ8CS, based upon their documentation:

"RT-Tag (P01) °C " = "ROOM TEMPERATURE DAY HC1" accepts from 10 to 30.
P2 (RT-Nacht HK1 / ROOM TEMP. NIGHT HC1) and P3 (RT-Bereit schaft HK1 / ROOM TEMP. STANDBY HC1) have the same input range.

HC2's parameters are defined identical.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mwuerr am 12 Januar 2024, 23:40:28
Zitat von: mwuerr am 06 Januar 2024, 23:43:46After talking privately to immi I have agreed with him that we will improve the wiki article.
...
There are some first "results".
1. english and german article are in sync now.
2. based upon my own testing of THZ504 I have added it as a supported device.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mwuerr am 12 Januar 2024, 23:45:37
Please:

I am working on a draft for a better description of the readings of the device. These are named in English, but many of us only have German manuals for their heaters. The manufacturer's translations are not always clear for laypeople. Additionally, Stiebel Eltron/Tecalor has changed parameter names over the years and uses synonyms in the parameter set without explaining them.

I would appreciate it if someone could review the following subchapters from https://wiki.fhem.de/wiki/Benutzer:Mwuerr/Parameter_THZ:

* https://wiki.fhem.de/wiki/Benutzer:Mwuerr/Parameter_THZ#sDisplay
* https://wiki.fhem.de/wiki/Benutzer:Mwuerr/Parameter_THZ#sHistory


Feel free to take a look at the rest, feedback on the rest is also welcome, but please only with rose-colored glasses. The rest is a very early draft.
As you probably do not have accounts on the wiki, please post your feedback here.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mwuerr am 13 Januar 2024, 00:04:12
Zitat von: mwuerr am 12 Januar 2024, 23:45:37I would appreciate it if someone could review...
* https://wiki.fhem.de/wiki/Benutzer:Mwuerr/Parameter_THZ#sDisplay
Related to that:

My THZ504 has 2 additional "Picture symbols on the display":
* Aufheizen / Heat-up: This symbol shows when the dry heating (screed drying)
program runs.
* EVU-Sperre / Power-OFF: This symbol lights up if the appliance has no enable signal
from the power supply utility.

Do other devices also support those two symbols (just open your manual, chapter ~4.1.1 Display should answer that)?
And does anyone know what bits they are encoded in?
I am not very motivated to switch to "Heat-up" mode in order to figure out the value. I might toy around with the Power-off.
But I would need a raw value of 0A0176Dis / 0A0176 in order to see the change. How can I get 00_THZ.pm to print me the raw value into annother reading? (probably by extending 0A0176Dis with a new entry, but what do I write there? Is there anywhere an explanation about what the numbers e.g. 10,1, <decoding rule>, 1 are? and where the decoding rules that are not defined in the code itself (e.g. "hex") are documented/implemented.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mwuerr am 16 Januar 2024, 00:21:57
Zitat von: mwuerr am 13 Januar 2024, 00:04:12My THZ504 has 2 additional "Picture symbols on the display":
* Aufheizen / Heat-up: This symbol shows when the dry heating (screed drying)
program runs.
* EVU-Sperre / Power-OFF: This symbol lights up if the appliance has no enable signal
from the power supply utility.

I have stubled accross the documentation of the modbus registers for the ISG (InternetServiceGateway).
https://www.stiebel-eltron.de/content/dam/ste/cdbassets/historic/bedienungs-_u_installationsanleitungen/ISG_Modbus__b89c1c53-6d34-4243-a630-b42cf0633361.pdf


The content of address 2001 sounds identical to sDisplay.
ZitatModbus Adresse: 2001
Objekt-bezeichung: BETRIEBSSTATUS
LWZ LWA: x x
Bemerkung: bitcodiert
Min. Wert: 0
Max. Wert: 65535
Daten- typ: 6
Schreiben/ Lesen (w/r): r



Codierung Option
SCHALTPROGRAMM-AKTIV B0
VERDICHTER B1
HEIZEN B2
KUEHLEN B3
WARMWASSERBEREITUNG B4
ELEKTRISCHE-NACHERWAERMUNG B5
SERVICE B6
EVU-SPERRE B7
FILTERWECHSEL-BEIDE B8
LUEFTUNG B9
HEIZKREISPUMPE B10
ABTAUEN-VERDAMPFER B11
FILTERWECHSEL-ABLUFT B12
FILTERWECHSEL-ZULUFT B13
AUFHEIZPROGRAMM-AKTIV B14

reodering the content of sDisplay by bit# I get:
"0A0176Dis" =>
[["switchingProg: ", 11, 1, "bit0", 1], // SCHALTPROGRAMM-AKTIV B0
[" compressor: ", 11, 1, "bit1", 1], // VERDICHTER B1
[" heatingHC: ", 11, 1, "bit2", 1], // HEIZEN B2
[" cooling: ",         11, 1, "bit3", 1], // KUEHLEN B3 <<reordered
[" heatingDHW: ", 10, 1, "bit0", 1], // WARMWASSERBEREITUNG B4
[" boosterHC: ", 10, 1, "bit1", 1], // ELEKTRISCHE-NACHERWAERMUNG B5
[" service: ", 10, 1, "bit2", 1], // SERVICE B6 <<reordered
missing                                    // EVU-SPERRE B7
[" filterBoth: ", 9, 1, "bit0", 1], // FILTERWECHSEL-BEIDE B8
[" ventStage: ", 9, 1, "bit1", 1], // LUEFTUNG B9
[" pumpHC: ",          9, 1, "bit2", 1], // HEIZKREISPUMPE B10
[" defrost: ", 9, 1, "bit3", 1], // ABTAUEN-VERDAMPFER B11
[" filterUp: ",          8, 1, "bit0", 1], // FILTERWECHSEL-ABLUFT B12
[" filterDown: ", 8, 1, "bit1", 1], // FILTERWECHSEL-ZULUFT B13
missing                                    // AUFHEIZPROGRAMM-AKTIV B14


Based upon those findings i think we can be very sure that those two missing symbols are hiding at the two positions I highlighted.
the missing code should be:

From the function that is described by those bits and the position that those two values have in the bit field I would expect that any device that has sDisplay (cmd2=>"0A0176) also supports those two bits. In addition no additional data needs to be read, we just need to interpret what we have. This will not break anything on any devices. ==> i vote for adding those bit decodings without adding any further differentiation (firmwareversion = xyz).

,
[" powerOff: ", 10, 1, "bit3", 1], // EVU-SPERRE B7 / Power-OFF
[" heatUp: ", 8, 1, "bit2", 1] // AUFHEIZPROGRAMM-AKTIV B14 / Heat-up

@immi could you please cross check this syntax wise and would you give me a version I can test.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mwuerr am 16 Januar 2024, 00:44:33
reading further in the ISG manual I have stubled accross something else that sounds very interesting and that could help us here in the long run.

5002 REGLERKENNUNG LWZ 303/403 Integral/
SOL 103
LWA 403 103
LWZ 304/404 Trend 103
LWZ 304/404 FLEX 103
LWZ Smart 103
LWZ 604 Air 103
LWZ 5 S Plus 103
LWZ 5 S Trend 103
LWZ 5 S Smart 103
LWZ 304/404 SOL 104
LWZ 504 104
LWZ 5/8 CS Premium 104
WPM 3 390
WPM 3i 391
WPMsystem 449

it could be a parameter that the ISG creates on its own based upon some magic, but it could also be something it reads from the device.
If we could find out how to get that value we would be able to make better differentiations for product functions than "firmware version".
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: abu18 am 18 Januar 2024, 16:18:32
Zitat von: mwuerr am 06 Januar 2024, 12:32:23Thanks @abu18 for mentioning that yours is a LWZ 304 Trend. Can you please provide your firmware version.

sFirmware "version: 05.09"
sFirmware-Id "HW: 113 SW: 3.17 Date: FEB 15 2016"
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 25 Januar 2024, 14:39:00
Zitat von: mwuerr am 13 Januar 2024, 00:04:12I would need a raw value of 0A0176Dis / 0A0176 in order to see the change. How can I get 00_THZ.pm to print me the raw value into annother reading?
easy way: set the mythz attribute verbose to 5, read/write the register and look at the fhem logfile
e.g.
2024.01.25 13:36:49.362 5: THZ_Get: Try to get 'sDisplay'
.......
2024.01.25 13:36:49.400 5: Parse message: 830A01760001
in this case 83 is the checksum; 0A0176 is the register; 0001 is the raw answer

complex way: only usefull if you want to read 100s ofregisters in one time
look at THZ_debugread(), which you can call  by "get Mythz debug_read_raw_register_slow"


You also asked for the parsing syntax
"FBglob" => [["outsideTemp: ",   8, 4, "hex2int", 10],   [" flowTemp: ",   12, 4, "hex2int", 10],
e.g.
76FBFDA8007D00F600E2012101....
007D--> 125 -->12,5 outsideTemp
00F6--> 246 -->24,6 flowTemp


One more hint: Please consider that modbus and serialCom tecalor implementation could be very different.
When you have a tested proposal, I can consider merging the code with or without firmware differentiation
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mwuerr am 29 Januar 2024, 00:50:04
continuing along the line of trying to find a better way than firmware versions to distinguish device types:

see
Zitat von: mwuerr am 16 Januar 2024, 00:44:33reading further in the ISG manual I have stubled accross something else that sounds very interesting and that could help us here in the long run.

5002 REGLERKENNUNG LWZ 303/403 Integral/
...
LWZ 5/8 CS Premium 104
LWZ 8 CS Premium = THZ504.

Related to that I have stumbled accross multiple manuals of Stiebel Eltron (e.g. https://assets.heizung-billiger.de/documents/sima_5.pdf for LWZ604 air) mentioning a parameter Gerätetyp in Menu/Einstellungen/Inbetriebnahme/Regler/Gerätetyp. english: "APPLIANCE TYPE"

My THZ504 reports a "7" in this parameter. Now I do not yet see a relationship with the 104 mentioned in the ISG documentation, however it is interesting to know that such a parameter exists. The THZ304/404 documentation also mentiones the parameter.

Could some of you please check their Display and Manual and report what values they have there. (Device type, value for APPLIANCE TYPE, firmware version, ...)?

Mine: mwuerr THZ 504, sFirmware: version: 07.59, sFirmware-Id: HW: 239 SW: 4.16 Date: NOV  7 2022, Menu/Einstellungen/Inbetriebnahme/Regler/Gerätetyp. / appliance type: "504Inv"
which is might be numerical 7 according to device documentation (mentioned as default value in the german "Bedienung" which would be Operation document of the THZ504).
Checking some other manuals I have lying around it seems that only the operation / Bedienung manual mentions the default value, any maybe on the german one (e.g. my english manual for the LWZ 8CS ... does not mention a default value). Unfortunately I have none of them yet except the one for my own THZ504.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mwuerr am 29 Januar 2024, 00:59:50
continuing along the line of trying to find a better way than firmware versions to distinguish device types:

Zitat von: mwuerr am 29 Januar 2024, 00:50:04parameter Gerätetyp in Menu/Einstellungen/Inbetriebnahme/Regler/Gerätetyp. english: "APPLIANCE TYPE"

Further digging into this I think this I have found confirmation that 7 is the likely value for the parameter in the THZ504 and what other devices should report in this parameter:
https://www.stiebel-eltron.ch/content/dam/ste/ch/de/service/downloads-service-partner/%C3%9Cbersicht%20Softwarest%C3%A4nde%20LWZ-THZ.pdf

lists:
LWZ / THZ 504 (Gerätetyp 7)
LWZ 5/8 CS Premium (Gerätetyp 16/17)
LWZ 5 S /THZ 5.5 eco (Gerätetyp 15)
LWZ 5 S Trend / THZ 5.5 Flex (Gerätetyp 10
LWZ 5 S Trend / THZ 8.5 Flex (Gerätetyp 20)
LWZ 5 S Smart (Gerätetyp 13)

and:
LWZ/THZ 304 SOL (Gerätetyp 1)
LWZ/THZ 404 SOL (Gerätetyp 2)
LWZ 304 Trend/Integral (Gerätetyp 4/6)
LWZ 404 Trend (Gerätetyp 5)
LWZ 404 smart (Gerätetyp 12)
TTL 404 eco (Gerätetyp 12)
LWZ 304 Flex (Gerätetyp 8 )
LWZ 404 Flex (Gerätetyp 9)

and:
LWZ 304 Trend / Integral (Gerätetyp 4/6)
LWZ 404 Trend (Gerätetyp 5)
LWZ 304 SOL (Gerätetyp 1)
LWZ 404 SOL (Gerätetyp 2)

and:
LWZ 604 Air (CO2) (Gerätetyp 14)
TCO 2.5 (CO2) (Gerätetyp 14)

Still confirmation from anyone would be nice.
(Beware: DON't write this parameter. The risks is minimal as it should be protected from accidential write by a special service code).


The same document also lists "Software-ID 9946" and some others, which might be also be helpfull.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 29 Januar 2024, 07:14:02
Zitat von: mwuerr am 29 Januar 2024, 00:59:50Still confirmation from anyone would be nice.
(Beware: DON't write this parameter. The risks is minimal as it should be protected from accidential write by a special service code).
I can confirm that my display on the LWZ has the ability to change the parameter "Gerätetyp". For my LWZ404SOL it's configured as "LWZ 404". In the manual the default-value is described as "1" (possible options are "LWZ 304" and "LWZ 404"), which points to the direction that "LWZ 304" might have the raw-value 0x01 as described above by you.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mwuerr am 29 Januar 2024, 21:01:53
Zitat von: TheTrumpeter am 29 Januar 2024, 07:14:02For my LWZ404SOL it's configured as "LWZ 404". In the manual the default-value is described as "1" (possible options are "LWZ 304" and "LWZ 404"), which points to the direction that "LWZ 304" might have the raw-value 0x01 as described above by you.
The manual you are refering to is covering LWZ304 SOL and LWZ404 SOL?

LWZ404 vs LWZ404SOL? Ah now i see, this is annother case of Stiebel rebranding stuff it has already sold. 2010 desigend and sold als LWZ404, then ~2015 LWZ404 got renamed to LWZ404SOL probably when LWZ404Trend was designed.

Do you have a digital version(pdf)? If so can you send it to me? The versionS I checked on the homepag  all don't list any default value. I checked the most recent german and english operation manual of LWZ 304 SOL/404SOL and some older german documents, Maybe the information was removed from newer manuals. What document date does yours have?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 30 Januar 2024, 08:47:03
Zitat von: mwuerr am 29 Januar 2024, 00:50:04Menu/Einstellungen/Inbetriebnahme/Regler/Gerätetyp
Checked this with my old THZ 303 SOL - menu doesn't exist here. The only visible identifier in "Inbetriebnahme" menu is "Softwarestand" which is set to 4.1.9.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 30 Januar 2024, 16:43:13
Zitat von: mwuerr am 29 Januar 2024, 21:01:53LWZ404 vs LWZ404SOL? Ah now i see, this is annother case of Stiebel rebranding stuff it has already sold. 2010 desigend and sold als LWZ404, then ~2015 LWZ404 got renamed to LWZ404SOL probably when LWZ404Trend was designed.
No that's not correct, I bought it in 2011 and got it 2021 as "LWZ 404 SOL".


Zitat von: mwuerr am 29 Januar 2024, 21:01:53What document date does yours have?
Creation-date as per PDF-metadata is March 11th 2011.
On last page there's a text next to the brand-logo "291865-36114-8635". Not sure if that's some kind of document-information/versioning for their internal purpose.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: mwuerr am 05 Februar 2024, 22:51:45
Zitat von: TheTrumpeter am 30 Januar 2024, 16:43:13On last page there's a text next to the brand-logo "291865-36114-8635".

I found a document with that ID on the stiebel homepage
https://www.stiebel-eltron.de/static/ste/docportal/manual/DM0000022322-fjw.pdf
document id on last page: A 291865-36114-8635

But it is an "Installation" document, not a "Bedienung". Do I have the correct one? Ah yes, now I found it on page 58. Ok good to know that in older devices the list of parameters with a bit more infos (e.g. defaults) was contained in the Installation manual instead of the Bedienungs manual. The Bedienungs manual does show the menu structure, but omits Gerätetyp.

Thank you.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: awex102 am 20 Februar 2024, 18:23:54
Hallo zusammen,

seit dem 11.02. habe ich Stillstand in der Kommunikation mit meiner THZ 403 SOL.

Fehlermeldungen z.B.    

THZ_Get: Error msg2: THZ_Get_Com: error found at step0 00 -- 0A091A -> 00
THZ_Get: Error msg2: THZ_Get_Com: error found at step0 00 -- 0C010E -> 00

Diverse andere Register werden auch genannt. Fehler alle 180 Sekunden entsprechend

interval_sGlobal 180

Die Verbindung steht (über einen seriellen USB Adapter zum 3 Poligen Anschluss an der Anlage), grünes Licht im Status und auch in der Console wird mir eine aktive Verbindung zumindest mit dem seriellen Adapter angezeigt.

Den Stecker habe ich durchgemessen, scheint in Ordnung.

Anlage mehrfach neu gestartet.

Gibt es eine Idee, wie ich systematisch testen kann, woran das liegt?

Danke und Gruß

PS: Falschen Thread erwischt, hier geht es weiter: https://forum.fhem.de/index.php?topic=33452.msg1304168#msg1304168
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 20 Februar 2024, 18:46:58
Hast Du am 11.02. etwas an der Hardware geändert? Gab es ein Software-Update (Raspberry Pi OS o.a., FHEM)? Check Dein FHEM-Log, ob es dort auffällige Einträge gibt, vor allem zum Zeitpunkt, seit dem es nicht mehr richtig funktioniert.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 20 Februar 2024, 19:01:27
I guess you're asking in the wrong forum section. Try this one, please:
http://forum.fhem.de/index.php/topic,33452.0.html.html
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: sunrise am 25 Februar 2024, 09:36:21
Hi immi,

After going through the 2 main threads about the THZ and searching for filter and sGlobal:inputVentilatorSpeed, I am not quite sure whether there is an alarm function or not.

I do not have sDisplay and therefore no way to do this:
FilterBoth:sDisplay.* {(split ' ',ReadingsVal("Mythz","sDisplay",0))[11]},
And this does not work either for me:
Zitat von: andre.k am 08 Februar 2018, 19:55:31Das Register sDisplay existiert höchstwahrscheinlich gar nicht in der alten Firmware. Bei mir in v2.14 wird der Filterwechsel als Fehler angezeigt und kann über das Register sSystem ausgelesen werden. Ich weiss nicht, ob es das Register auch in 2.06 gibt. Auf jeden Fall können in 2.06 laut Programmcode die Fehler darüberhinaus über sLast10errors gelesen werden. Das wäre doch ein Lösungsansatz für Deine Aufgabe.

Because the following line remains unchanged all the time in my monthly log files, i.e. there is no error presented in case of a filter event:

2024-02-25_09:02:42 Mythz sSystem: userSetFanStage: 0 userSetFanRemainingTime: 0 lastErrors:
I ask because I just got the "FILT" symbol on my LCD but cannot (yet) see where sGlobal:inputVentilatorSpeed has changed in a relevant way. Is that the corret value to look at? I do not know when the symbol came up for the first time on my LCD since the last filter change.

Furthermore, I see repeated messages as follows, and the data never change:
pDefrostAA: MaxDefrostDurationAAExchenger: 60 DefrostStartThreshold: 4 VolumeFlowFilterReplacement: 90
What is the meaning of VolumeFlowFilterReplacement: 90?

How can I find out when that FILT message was triggered and then in a next step find out if/how I can define an alarm programatically?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 28 Februar 2024, 14:30:50
Zitat von: sunrise am 25 Februar 2024, 09:36:21How can I find out when that FILT message was triggered and then in a next step find out if/how I can define an alarm programatically?
Dear Sunrise
Please consider that I do not have your old firmware, I have no idea in which register your heatpump stores this information.
If you find it out, it is very easy to implement this task.
b.r.
immi
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: daywood am 03 März 2024, 05:56:45
Hallo zusammen,

ich nutze das Modul erfolgreich zur Überwachung und Steuerung der Heizung über ioBroker.

Ich bin aktuell auf ein Problem gestoßen, welches sicher kein großes Problem ist, ich aber nicht gelöst bekomme.

Ich möchte bei PV Überschuss warmes Wasser mit Hilfe des Heizstabes erzeugen. Das funktioniert auch schon alles einwandfrei. Allerdings ist der maximale Wert, den ich für "p04DHWsetTempDay" bei 55 Grad. In der Heizung selbst kann ich bis auf 65 Grad gehen.

Ich vermute, das kommt hier her: https://github.com/mhop/fhem-mirror/blob/291e6753cf56a9ea12ae18312e2231ff6be8e2b3/fhem/FHEM/00_THZ.pm#L434C3-L434C109

Ich habe aber keine Idee, ob, wie und wo ich dieses argMax anpassen kann.

Kann mir hier jemand helfen?

Vielen Dank und ein schönes Wochenende.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 03 März 2024, 16:57:41
Verstehe ich da richtig:
- FHEM lässt max. 55°C zu
- die Wärmepumpe erlaubt Einstellungen bis zu 65°C
?

Wenn Du uns noch verrätst, welche Wärmepumpe und welche Firmwareversion Du verwendest, dann kann immi sicher schnell eine korrigierte Version des THZ-Moduls bauen.

Oder hast Du evtl. eine falsche Firmwareversion eingestellt, die nicht zu Deiner Anlage passt? Dafür gibts das Attribut "firmware".
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: zimb0 am 04 März 2024, 14:15:45
Zitat von: daywood am 03 März 2024, 05:56:45Hallo zusammen,

ich nutze das Modul erfolgreich zur Überwachung und Steuerung der Heizung über ioBroker.

Ich bin aktuell auf ein Problem gestoßen, welches sicher kein großes Problem ist, ich aber nicht gelöst bekomme.

Ich möchte bei PV Überschuss warmes Wasser mit Hilfe des Heizstabes erzeugen. Das funktioniert auch schon alles einwandfrei. Allerdings ist der maximale Wert, den ich für "p04DHWsetTempDay" bei 55 Grad. In der Heizung selbst kann ich bis auf 65 Grad gehen.

Ich vermute, das kommt hier her: https://github.com/mhop/fhem-mirror/blob/291e6753cf56a9ea12ae18312e2231ff6be8e2b3/fhem/FHEM/00_THZ.pm#L434C3-L434C109

Ich habe aber keine Idee, ob, wie und wo ich dieses argMax anpassen kann.

Kann mir hier jemand helfen?

Vielen Dank und ein schönes Wochenende.


Kannst du kurz erklären, wie du diesen Vorgang erzwingst?
Wenn du programmatisch die DWHtemp erhöhst würde ja der Verdichter anspringen, nicht der Heizstab.

/Edit: Aaah, du gehst vllt per popmode auf notbetrieb?
"Bei aktiviertem Notbetrieb wird die Heizstufe ,,Verdichter" übersprungen. Es wird mit der Solaranlage (falls angeschlossen) oder der elektrischen Not-/Zusatzheizung geheizt."
Macht das wirtschaftlich Sinn (bekomme 7ct Einspeisevergütung). Wieviel zieht der Heizstab maximal?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 04 März 2024, 15:36:26
Hi, we're in the code improvement forum here. It looks like the discussion tends into application direction. Maybe it makes sense to switch there.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: daywood am 05 März 2024, 05:24:23
Zitat von: willybauss am 03 März 2024, 16:57:41[...]

Wenn Du uns noch verrätst, welche Wärmepumpe und welche Firmwareversion Du verwendest, dann kann immi sicher schnell eine korrigierte Version des THZ-Moduls bauen.

Oder hast Du evtl. eine falsche Firmwareversion eingestellt, die nicht zu Deiner Anlage passt? Dafür gibts das Attribut "firmware".

Ich habe eine Stiebel Eltron LWZ 5S Plus mit Softwareversion 5.5.
Das habe ich so auch eingestellt.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: immi am 10 März 2024, 09:27:00
Zitat von: daywood am 05 März 2024, 05:24:23Ich habe eine Stiebel Eltron LWZ 5S Plus mit Softwareversion 5.5.
Das habe ich so auch eingestellt.
in my heatpump (firmware in fhem 4.39) "p04DHWsetTempDay" setting higher than 55° give me an error. Therefore the limitation to 55.

if more people with newer 5.39 confirm no error with 65°, I will enable it
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: daywood am 10 März 2024, 16:05:07
Hallo zusammen,

ich finde die Variable für folgenden Wert nicht:

Einstellungen -> Warmwasser -> Grundeinstellungen -> NE STUFE WW

Kann mir hier jemand helfen, wo ich die finde?

Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: willybauss am 10 März 2024, 17:19:32
Mag sein, dass so ein selten benutzter Wert (eigentlich stellt man den nur einmal im Leben ein und fasst ihn dann nie mehr an) nicht implementiert ist.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 11 März 2024, 06:58:37
Zitat von: immi am 10 März 2024, 09:27:00
Zitat von: daywood am 05 März 2024, 05:24:23Ich habe eine Stiebel Eltron LWZ 5S Plus mit Softwareversion 5.5.
Das habe ich so auch eingestellt.
in my heatpump (firmware in fhem 4.39) "p04DHWsetTempDay" setting higher than 55° give me an error. Therefore the limitation to 55.

if more people with newer 5.39 confirm no error with 65°, I will enable it
As per installation manual it's imited to 55 °C for x04 SOL. I also use FW 5.39, so it would most probably cause the same error.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: daywood am 11 März 2024, 07:06:23
Zitat von: willybauss am 10 März 2024, 17:19:32Mag sein, dass so ein selten benutzter Wert (eigentlich stellt man den nur einmal im Leben ein und fasst ihn dann nie mehr an) nicht implementiert ist.
Ich würde gerne, je nach PV Überschuss, regeln können, ob ich mit Stufe 1 oder 2 zuheize.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 11 März 2024, 07:23:48
Zitat von: daywood am 11 März 2024, 07:06:23
Zitat von: willybauss am 10 März 2024, 17:19:32Mag sein, dass so ein selten benutzter Wert (eigentlich stellt man den nur einmal im Leben ein und fasst ihn dann nie mehr an) nicht implementiert ist.
Ich würde gerne, je nach PV Überschuss, regeln können, ob ich mit Stufe 1 oder 2 zuheize.
immi baut neue Parameter immer recht rasch ein, d.h. Du musst ihm nur sagen an welcher Speicheradresse das zu finden ist. Weiter vorne in dem Thema ist auch erklärt wie man sich "auf die Suche danach" machen kann.
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: daywood am 17 März 2024, 20:49:18
Zitat von: TheTrumpeter am 11 März 2024, 07:23:48Weiter vorne in dem Thema ist auch erklärt wie man sich "auf die Suche danach" machen kann.
Ich habe die 83 Seiten jetzt mal quer gelesen, konnte dazu aber nicht wirklich was finden.

Hast du einen Tipp/Link?
Titel: Aw: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
Beitrag von: TheTrumpeter am 21 März 2024, 06:54:28
Zitat von: daywood am 17 März 2024, 20:49:18Hast du einen Tipp/Link?
Der Befehl heißt "readRAWRegisters". Die genaue Anleitung habe ich auf die Schnelle auch nicht gefunden, zumal die Suchfunktion offenbar nicht richtig funktioniert. Blätter' mal durch den Thread hier und suche danach, dann wird's Dir unterkommen. Wo/wie man es genau aufruft, kann ich mich auch nicht mehr erinnern, ich habe es schon sehr lange nicht benutzt.

EDIT: Nachdem ich kurz ins THZ-Modul geschaut habe, müsste es einfach über
get [Mythz] debug_read_raw_register_slow
zu starten sein.
[Mythz] musst Du natürlich durch Deinen Gerätenamen ersetzen.
Danach eine Zeitlang warten und das "data.txt" aus dem FHEM-Hauptverzeichnis abholen.

Wenn Du andere Register als die "Standardregister" lesen willst, musst Du die entsprechenden Code-Teile im 00_THZ.pm Deiner FHEM-Installation aktivieren, siehe Funktion "THZ_debugread".
Wenn Du nach bestimmten Speicherorten suchst, musst Du bei bei Deiner Steuerung den gesuchten Parameter erst auf Wert "A" stellen, dann den Scan ausführen, Datei wegspeichern, Parameter auf Wert "B" stellen, Scan erneut ausführen und dann die beiden data.txt vergleichen. Irgendwo in den geänderten Registern müsste sich Deine Änderung wiederfinden.