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

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

Vorheriges Thema - Nächstes Thema

Noobie47

#1065
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.

Noobie47

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


immi

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

Noobie47

@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

kjmEjfu

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.
Migriere derzeit zu Home Assistant

willybauss

Kann es sein, dass fhem den richtigen USB-Port nicht findet? Das ist immer wieder ein Thema.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

kjmEjfu

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
Migriere derzeit zu Home Assistant

kjmEjfu

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
Migriere derzeit zu Home Assistant

immi

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

kjmEjfu

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
Migriere derzeit zu Home Assistant

martincfd

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.
FHEM auf Raspberry Zero 2W, THZ 504 mit FBH, 140qm+60qm (beheizt+unbeheizt, alles KWL), Heizlast 3.8kW bei NAT -10°C, PV 5.2kWp

immi

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

martincfd

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.
FHEM auf Raspberry Zero 2W, THZ 504 mit FBH, 140qm+60qm (beheizt+unbeheizt, alles KWL), Heizlast 3.8kW bei NAT -10°C, PV 5.2kWp

immi

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

martincfd

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.
FHEM auf Raspberry Zero 2W, THZ 504 mit FBH, 140qm+60qm (beheizt+unbeheizt, alles KWL), Heizlast 3.8kW bei NAT -10°C, PV 5.2kWp