Tecalor THZ Heatpump

Aus FHEMWiki
Zur Navigation springen Zur Suche springen
THZ
Zweck / Funktion
Connect to Tecalor heatpump
Allgemein
Typ Gerätemodul
Details
Dokumentation EN / DE
Support (Forum) Sonstiges
Modulname 00_THZ.pm
Ersteller immiimmi
Wichtig: sofern vorhanden, gilt im Zweifel immer die (englische) Beschreibung in der commandref!

German version: Tecalor THZ Wärmepumpe


This article is partially outdated. If you can use the german version, e.g. using your favorite translator. We hope to bring the english version up to date somewhen in the future.




This article describes how to connect to a Stiebel Eltron / Tecalor THZ/LWZ 303/304/403/404/504/8CS heatpump and to read and write settings from and to the heating.

For better understanding: Tecalor is the end customer brand of Stiebel Eltron. In the following the system will be called "THZ"

Tested are Software Versions 2.06, 4.09, 4.19, 4.39 and 5.39. Older versions may work but there's no guarantee for. NOTE: This manual is for persons who are familiar with electronics. The author and the developer are not liable for any damage and there's no warranty.

ATTENTION!! Since v0.087 the reading names have changed. To have intuitive and consistent reading names the readings names changed to sXXX and pXXXX for status values and parameters in the heating. See readings section for more information.
If you update you sure have to reconfigure readingsGroups, dashboards, and so...

Connection to the heatpump

Local via RS232 or USB

The THZ has two interface which can be used for a connection.

  • One serial interface behind the right door which can be used with a MNL-SG3 Plug
  • One USB interface on the electronics board which can be used with a TYPE-B USB cable.

Warning!!! The USB interface is on the back side of the electronics board behind the coverage wich is behind the right door. Do not connect the USB while the system is powered on! Before removing the coverage you have to power off the complete heatpump!!

The baud rates may vary based on hard- and software release between 9600 and 115200 for RS232. For USB it's 57600 or 115200 baud. More information how to connect to the heatpump with RS232 can be found here: Robert Penz Homepage

Remote connection with Ser2Net

If the FHEM server is not near the heatpump you can connect with Ser2Net. This will provide a virtual serial interface on a TCP-Port

Installation Ser2Net on Linux

To install Serial-Port-Server Ser2Net just follow these steps:

sudo apt-get install ser2net

in /etc/ser2net.conf (/dev/ttyXXX)

2003:raw:500:/dev/ttyUSB0:115200 NONE 1STOPBIT 8DATABITS

The port can be chosen on your own as long as it's still unused.

Tested Host-Systems

This module was tested on FritzBox, nas-qnap, Raspberry Pi and MacOS.

Definition in FHEM

Direct RS232 serial or USB

define Mythz THZ /dev/ttyUSB0@115200 # or (/dev/ttyXXX)
attr Mythz interval_sGlobal 300 # Internal Polling Interval 5min
attr Mythz interval_sHistory 28800 # Internal Polling Interval 8h
attr Mythz interval_sLast10errors 120 # Internal Polling Fault Memory
define FileLog_Mythz FileLog ./log/Mythz-%Y.log Mythz

If you don't define the attributes interval_sGlobal and interval_history (or they are 0), the internal polling is disabled. Sure you can also poll with the "at" command outside the module:

define Mythz THZ /dev/ttyUSB0@115200 # or (/dev/ttyXXX)
define atMythzFB at +*00:05:00 {fhem "get Mythz sGlobal","1";;return()}
define atMythz09 at +*08:00:00 {fhem "get Mythz sHistory","1";;return()}
define FileLog_Mythz FileLog ./log/Mythz-%Y.log Mythz

Over network with Ser2Net

define Mythz THZ 192.168.0.244:2003
attr Mythz interval_sGlobal 300 # Internal Polling Interval 5min
attr Mythz interval_sHistory 28800 # Internal Polling Interval 8h
attr Mythz interval_sLast10errors 120 # Internal Polling Interval Fault Memory
define FileLog_Mythz FileLog ./log/Mythz-%Y.log Mythz

Readings

If the connection to the heatpump was successful you should see readings like sGlobal, sFirmware, sHistory and some settings like holiday and pXX parameters.einige PXX Werte angezeigt werden.

sGlobal (ex allFB)

Contains all actual values like water and gas temperatures, fan states, pressures, ...

sFirmware

Shows the firmware release.

sHistory

Contains information to operating hours, e.g. the compressors operating hours.

pHoliday-Werte

Here you can see the settings of the holiday configuration of the THZ. These are used to override the day setback for the give time. You can change the holiday settings with set.

sLast10errors

Reads the last 10 errors and shows it.

pXX-values & program-values

The pXX & program values are settings like the heating circle, fan states, dhw programs and so on. All pXX and program valueas can be changed with the set command. NEW: Now the fanstage-inlet and outlet volumes are read- and writeable.
pOpMode shows the Operating Mode of the THZ. Like Automatic, Setback, ...

party-time

This parameter sets the party time. While this time range the fan state will change to the in p99FanStageParty stage.

sDHW (ex Status_DHW_F3)

Contains information about the Domestic Hot Water system

sHC1 (ex Status_HC1_F4)

Contains information about the Heatinc Circle 1

sHC2 (ex Status_HC2_F5)

Information of HC2

sSol (ex Status_Sol_16)

Solar Heating System informations

pOpMode (ex OperatingMode)

OperatingMode of the heating. One of: Standby, Automatic, DAYmode, SetBack, DHWmode, Manual, Emergency

If the operating mode should be changed via FHEM, the set command must send the depending mode code like shown above.

sXXX

There are some more "s"tatus readings with show you values like the heat recovery

Plots - graphical views

This shows you how to create plots from the heatpump readings.

Example

Assuming we want to read and plot the outside_temp and the dhw_temp from the sGlobal reading:

Creating the plot in fhem.cfg:

define Plot_Temp SVG FileLog_Mythz:thz:CURRENT
attr Plot_Temp room Heizung

This will setup the plot without any data and maybe with an error message. Klick on the plot-name to open the plot config windows. Here you enter the details.

Most important are now the input fields

Below the input mask you find the according readings to Mythz, including sGlobal.

sGlobal will like like this:

2014-03-02_13:07:49 Mythz sGlobal: outside_temp: 3.8 flow_temp: 26.5 return_temp: 27.2 hot_gas_temp: 32.1 dhw_temp: 43.4 flow_temp_HC2: -60 evaporator_temp: 5.3 condenser_temp: 27.4 Mixer_open: 0 Mixer_closed: 0 HeatPipeValve: 0 DiverterValve: 0 DHW_Pump: 0 .................output omitted
Thzplot.jpg

To find the right input value just count the space seperated data. So the value for outside_temp is 5 and dhw_temp is 13 as these are the positions they are on. This number will be entered into the input field to create the plot with the chosen data.

More information to Creating Plots

extract single values from readings

To separate values to from the "big readings" like sGlobal or history you can use a userReading.

Example:

attr Mythz userReadings OutsideTemp {(split ' ',ReadingsVal("Mythz","sGlobal",0))[1]},

FlowTemp {(split ' ',ReadingsVal("Mythz","sGlobal",0))[3]}

More information to userReadings can be found in the commandref.

Notes

  • A full refresh (of all parameters) is done only at systemstart, very very slowly (not to decrease performance of FHEM), and takes ca 3 or 4 minutes. After that the intervall polling of sGlobal and sHistory register should start.
  • If the FB-intervall or History-Intervall attributes are lower than 3 minutes, there clould be a concurrency. But that shouldn't cause any problems.
  • in wintermode roomSetTemp (from sHC1) is given from p01RoomTempDayHC1 and p02RoomTempNightHC1
  • in summermode roomSetTemp (from sHC1) is given from p01RoomTempDayHC1SummerMode and p02RoomTempNightHC1SummerMode

known Problems

In the FHEM Log you will find messages like this when using Ser2Net:

2014.03.02 09:41:09 1: 192.168.178.50:2003 disconnected, waiting to reappear

2014.03.02 09:41:09 1: 192.168.178.50:2003 reappeared (Mythz)

This problem is not solved until now.

Release History

v0.067

Module first implemented in FHEM

v0.068

new command for party

v0.069

added German CommandRef

v0.070

BugFix in status bits

v0.071

Bugfix, undefFn improved

v0.072

  • all programHC1*, programHC2*, programFan* and programDHW* have been implemented with get and set
  • inside_temp has been added to the end of allFB
  • connect/disconnet bug related to ser2net has been extremely improved: max one retry per second

v0.074

now the parameters air inlet- outlet-volumes and passive cooling are read and writeable

v0.075

implemented interval_last10errors. Interval for polling the internal fault memory of the heatpump.

v0.076

Bugfixes and new parameter Status_HC1_F4

v0.078

new parameters Status_Sol_16 and Status_DHW_F3

v0.080

  • new Parameters p49SummerModeTemp and p50SummerModeHysteresis
  • Status_HC1_F4 and Status_HC2_F5 now showing "mode: Summer" (or Winter)

Calculation of the mode is:

if outsidetemp > p49SummerModeTemp + p50SummerModeHysteresis ---> Summermode
if outsidetemp < p49SummerModeTemp - p50SummerModeHysteresis ---> Wintermode

v0.081

BugFix for Sommer/Wintermodus-Anzeige

v0.084

  • OperatingMode now displayed (read-only)
  • p33BoosterTimeoutDHW (read/write)
  • p79BoosterTimeoutHC (read/write)

v0.085

OperatingMode is now read/write

v0.087

  • Neue Readings
  • Angepasste Readingnamen

v0.089

  • Improvements on communication
  • Bugfixes
  • New readings

v0.091

New Readings: sHeatRecoveredDay & sHeatRecoveredTotal

v0.094

Bugfixes

v0.095

New Readings: sHeatDHWDay & sHeatDHWTotal

v0.096

More new Readings: sEletrx... & sHeat...

v0.097

Bugfixes

v0.099

room-influence has been included in the simulation curve plot

v0.100

new parameters: p54MinPumpCycles, p55MaxPumpCycles, p56OutTempMaxPumpCycles, p57OutTempMinPumpCycles

v0.101

  • no new features
  • lots of clean up
  • logs in verbose 5 implemented.
  • buffer overflow (caused by sGlobal for LWZ 303 firmware 3.19). has been fixed.

v0.103

  • Major change in communications (10x faster)
  • Added version information

v0.104

Added some delay in communications but still 5x faster

v0.105

  • faster getting and setting of variables
  • update after the start two times faster
  • THZ attributes can be changed without restarting
  • BugFixes
  • P83 added (DHWSetSolarTemp)
  • added suffix temp to the names of parameters. e.g. p04DHWsetDay now p04DHWsetDayTemp

v0.107

  • p56 and p57 exchanged and fixed

v0.108

  • Party-Time set removed as it has never worked
  • set programFan_Mo-Fr_0 to 08:00--20:00 --> will now change the according day-program-sets also

v0.109

  • bug fix for long messages in combination with serial cable connection

v0.110

  • bugfix for interface (with serial cable) trunkating messages (forum 209294)

v.0111

  • P21,22,23,24,25,29 added

v0.112

  • bugfix for error caused by DevIo.pm 6980 status disconnected msg223569

v0.113

  • support for older heatpumps

v0.114

  • support for older heatpumps

v0.115

  • implemented the "Informationen aus dem Modul des HeatpumpMonitors von Robert Penz". All non identified parts will receive value "n.a."

v0.116

  • support for older heatpumps

v0.118

  • faultcode implemented.
  • Typo fix: evuRelease

v0.119

  • the firmware parameter 2.06 increases the countmax of the repetition of DevIo_SimpleReadWithTimeout from 24 to 50
  • decrease of the DevIo_SimpleReadWithTimeout from 0.06 to 0.02
  • the firmware parameter 2.06 removes registers not supported from older heatpumps

v0.120

  • delays between the programming of programXXX_YY.

v0.121

  • register interpretation from user godmorgon implemented
  • register 17 for old firmwares implemented

v0.122

  • pXX register for old firmware implemented
  • max repeat increased limited to 60, before was 50
  • actualPower_Qc: patched to avoid buffer overflow

v0.123

  • actualPower_Qc and actualPower_pEl fixed

v0.124

  • history register pathed for firmware version 2.06

v.0125

  • Adjustments to support Firmware 2.06

v.0126

  • Further Adjustments to support Firmware 2.06

v0.127

  • Bugfix:difference in the parsing rule for FCtime

v0.128

  • now most of parameters can be read from old firmwares

v0.129

  • sDisplay (Activity parameters symbolized in Display)

v0.130

  • 2 bugfixes
  • firmware-id contains new features e.g. HW: 74 SW: 2.08 Date: MAR 9 2011
  • new parameter p99RoomThermCorrection implemented
  • THZ_PrintcurveSVG is now influenced by p99RoomThermCorrection

v0.131

  • added p35PasteurisationInterval,p35PasteurisationTemp, p34BoosterDHWTempAct, p99DHWmaxFlowTemp, p89DHWeco

v0.132

  • added p99startUnschedVent
  • splitting of big register implemented; this is needed for writing in old 2.06 firmware.
  • vertical range in the heating curve changed to 15..35°C

v0.133

  • p12 FanStageManual
  • autoscale of heating curve

v0.133+

  • fixed: According the manual our p99RoomThermCorrection is actually P76

Beispielkonfiguration

Start Definition mit Ser2Net

define Mythz THZ 192.168.111.5:2003
attr Mythz room Sysintern

userReadings

Dash.jpg

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]}

interval Defintionen

attr Mythz interval_sGlobal 300
attr Mythz interval_sHistory 28800
attr Mythz interval_sLast10errors 120

Definition von file-log und den SVG-Plots einiger Daten

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

readingsGroup

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
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' }

Dashboard

define MyDashboard Dashboard
attr MyDashboard dashboard_lockstate unlock
attr MyDashboard dashboard_row top-center
attr MyDashboard dashboard_showhelper 0
attr MyDashboard dashboard_showtooglebuttons 0
attr MyDashboard dashboard_tab1groups THZ
attr MyDashboard dashboard_tab1name micofhem
attr MyDashboard dashboard_tab1sorting t0c100,THZ,true,170,253
attr MyDashboard dashboard_tabcount 1
attr MyDashboard dashboard_webfrontendfilter WEB
define MyDashboard_weblink weblink htmlCode {DashboardAsHtml("MyDashboard")}
attr MyDashboard_weblink room DashboardRoom

FanSelector für die Lüftungssteuerung

define FanSelectorDay dummy
attr FanSelectorDay group THZ
attr FanSelectorDay setList 0 1 2 3 offFor60min
attr FanSelectorDay webCmd 0:1:2:3:offFor60min
attr FanSelectorDay devStateIcon 0:vent_ventilation_level_0 1:vent_ventilation_level_1 2:vent_ventilation_level_2 3:vent_ventilation_level_3
define Notify_p07FanStageDay notify FanSelectorDay IF ([FanSelectorDay] eq "offFor60min") (define at_D_offFor60min at +00:59:00 set Mythz p07FanStageDay [Mythz:p07FanStageDay],set Mythz p07FanStageDay 0, setstate FanSelectorDay offFor60min) ELSE (set Mythz p07FanStageDay $EVENT)
define Notify_FanselectorDay notify (Mythz.p07FanStageDay.*) setstate FanSelectorDay $EVTPART1
attr FanSelectorDay room heatpump


Fanselectorv2.png

define FanSelectorNight dummy
attr FanSelectorNight group THZ
attr FanSelectorNight setList 0 1 2 3 offFor60min
attr FanSelectorNight webCmd 0:1:2:3:offFor60min
attr FanSelectorNight devStateIcon 0:vent_ventilation_level_0 1:vent_ventilation_level_1 2:vent_ventilation_level_2 3:vent_ventilation_level_3
define Notify_p08FanStageNight notify FanSelectorNight IF ([FanSelectorNight] eq "offFor60min") (define at_N_offFor60min at +00:59:00 set Mythz p08FanStageNight [Mythz:p08FanStageNight],set Mythz p08FanStageNight 0, setstate FanSelectorNight offFor60min) ELSE (set Mythz p08FanStageNight $EVENT)
define Notify_FanselectorNight notify (Mythz.p08FanStageNight.*) setstate FanSelectorNight $EVTPART1
attr FanSelectorNight room heatpump

Links

Launchpad Heatpumpmonitor

Thread in the FHEM-Forum