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

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

Vorheriges Thema - Nächstes Thema

immi

Zitat von: 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:


  • each time you have an automatic refresh (e.g. interval_sDHW 400) another fhem process is created in parallel with the same size of the main process

  • after the comunication with tecalor is done, the parallel process is immediately deleted


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

Matthias-56

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

immi

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

Matthias-56

#1008
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




immi

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

Matthias-56

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

Matthias-56

#1011
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

immi

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

Matthias-56

#1013
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

Matthias-56

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

immi

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

Matthias-56

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

hellijo

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

immi

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


Matthias-56

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