THZ / LWZ Tecalor Stiebel Eltron Heizung

Begonnen von Heiner, 02 Juni 2013, 11:39:13

Vorheriges Thema - Nächstes Thema

Heiner

Hi ,
@ Immi,  « Antwort #442 am: 05 Mai 2014, 23:29:28 » worked perfectly, Thanks.

Heiner
--------------------------------
fhem auf Pi3+
CUL 868MHz, Signalduino 434MHz, HM-CFG-USB
HM, THZ, Kostal, Somfy, Conbee, Pytonbinding, FritzBox, FTUI, MQTT2

Jakl

Hi together,

I've searched for a solution for basement ventilation and got caught by fhem. And as I also have a Stiebel Eltron LWZ 303 integral, I've found your thread and your wiki. First of all, thank you for all your work, great job!

A year or two ago, I've tried the heatpumpmonitor with my Raspberry Pi from Robert Penz without any luck. It was never connecting with the LWZ. As I had no time for any error searching, I stopped with the heatpumpmonitor. Today I found the reason in your thread, the reason was the wrong baudrate within the USB connection. Maybe Markus can add such a information in the wiki (Connection via USB, the Baudrate can be 115200 or 57600).

After I found your thread and all the informations regarding fhem, I've started with my Raspi from scretch. Put a new image on the sd card, installed fhem, updated everything to the latest version and finally installed (set) everything in the fhem.cfg for the THZ. As mentioned above, first the baudrate was not ok, after I switched to 57600 the connection was working and the data of my LWZ were fetched.

And now comes the "But": But, the THZ module is getting data for a view minutes, at some point, FHEM crashes. So I put the verbose level to 5 and tried it several times. Always when the module tries to get some 'programFan_.....' (not always the same) it crashes.
Then I've checked the Raspberry Pi, as I found the information in the Net, there could be a problem with the power of the USB-port. So I've changed to a powered USB-Hub. -> Same problem.
As I use a USB-cabel-extender, I now just use a 3 meter USB-cabel plugged in to the 'self-powered-USB Hub'. -> Still the same problem.  :-\

I'm just using a 4GB class 6 SD-Card, maybe the card is to slow?? I've ordered a high speed 8gb class 10 card yesterday, which should be delivered today, so I also can eliminate that problem this evening. But as the Raspberry Pi is still running, I can't imagine, that this will fix my problem.

I also do not have any further senders/receivers set up in the FHEM. Just a fresh installation with just the THZ/LWZ module...

So, that's why I ask you! Had anybody a similar problem or do you have any idea, what could be the problem?

Thank you for your help!
Best regards
Jakl

Here the last entries of my THZ and FHEM log files with verbose 5.
Zitat
2014-05-14_13:40:34 Mythz programFan_Sa-So_0: 00:00--24:00
2014-05-14_13:40:34 Mythz pHolidayEndMonth: 1
2014-05-14_13:40:35 Mythz p01RoomTempDayHC2: 20.5 °C
2014-05-14_13:40:35 Mythz p37Fanstage1AirflowInlet: 80 m3/h
2014-05-14_13:40:36 Mythz programDHW_We_2: n.a.--n.a.
2014-05-14_13:40:36 Mythz programFan_Mo-Fr_1: 00:00--24:00

Zitat
2014.05.14 13:40:36 5: Triggering Mythz (1 changes)
2014.05.14 13:40:36 5: Notify loop for Mythz programFan_Mo-Fr_1: 00:00--24:00
2014.05.14 13:40:36 4: eventTypes: THZ Mythz programFan_Mo-Fr_1: 00:00--24:00 -> programFan_Mo-Fr_1: .*:.*--.*:.*
2014.05.14 13:40:36 5: Mythz sending 02
2014.05.14 13:40:36 5: SW: 02
2014.05.14 13:40:37 5: Mythz sending 0100FCFB1003
2014.05.14 13:40:37 5: SW: 0100FCFB1003
2014.05.14 13:40:37 5: Mythz sending 10
2014.05.14 13:40:37 5: SW: 10
2014.05.14 13:40:37 5: Mythz sending 10
2014.05.14 13:40:37 5: SW: 10

micomat

#527
Hi Jakl,

welcome aboard :)
I just added the information to the wiki with the 57600baud rate. Thanks.

Can you post your fhem.cfg? So maybe we can find the error somewhere there? And also interesting would be if your THZ module version is up2date. So when did you load the version or did you try an "update" of fhem?

The loop message looks very strange to me...

Markus
Synology DS218+ with fhem+iobroker in docker, 2x RasPi w. ser2net, CUL433+868, IT, EGPM2LAN, THZ/LWZ, FB_Callmonitor, HMS100TF, Homematic, 2x TX3-TH, Pushover, USB-IR-SML-Head, SONOS, GHoma, MBus, KLF200

Jakl

Hi Markus,

at the end you will find my fhem.cfg, I've just deleted the security-sections from the web, webphone and webtablet definitions.

I've updated the linux distribution of my raspberry pi to the latest releases. And I've updated FHEM after installation to the latest packages via the update command in FHEM!
The software version of my LWZ 303 is 3.19.

Thank you and best regards,
Jakl


attr global autoload_undefined_devices 1
attr global logfile ./log/fhem-%Y-%m.log
attr global modpath .
attr global motd SecurityCheck:\
\
WEB,WEBphone,WEBtablet has no basicAuth attribute.\
telnetPort has no password/globalpassword attribute.\
\
Restart fhem for a new check if the problem is fixed,\
or set the global attribute motd to none to supress this message.\

attr global statefile ./log/fhem.save
attr global updateInBackground 1
attr global userattr devStateIcon devStateStyle icon sortby webCmd
attr global verbose 5

define telnetPort telnet 7072 global
attr telnetPort password 2gr84u2

define WEB FHEMWEB 8083 global
attr WEB stylesheetPrefix ios7

define WEBphone FHEMWEB 8084 global
attr WEBphone stylesheetPrefix smallscreen

define WEBtablet FHEMWEB 8085 global
attr WEBtablet stylesheetPrefix touchpad

# Fake FileLog entry, to access the fhem log from FHEMWEB
define Logfile FileLog ./log/fhem-%Y-%m.log fakelog

define autocreate autocreate
attr autocreate filelog ./log/%NAME-%Y.log

define eventTypes eventTypes ./log/eventTypes.txt

# Disable this to avoid looking for new USB devices on startup
define initialUsbCheck notify global:INITIALIZED usb create


define Mythz THZ /dev/ttyUSB0@57600 # oder (/dev/ttyXXX)
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

houseowner123

Zitat von: willybauss am 13 Mai 2014, 22:42:33
I'm going to provide you with my config file and plot files here in the forum soon, since I've been asked for such details more than once within last days. It might be a good idea to share our plot and/or dashboard solutions in order to give the others some hints for own improvements.

Hi Willy,

that would greatly appreciated from every newbie. I have the largest problems creating the plots I want. I can only get so much from the wiki sites. It helps me to read a code, see it's effects and then I understand the language much better.

Tom

immi

Zitat von: Jakl am 14 Mai 2014, 15:06:16
The software version of my LWZ 303 is 3.19.
3.19 could be interesting :)

I do not think it has something to do with cables or speed of the rasPi.

Start deleting  autocreate and  initialUsbCheck from config-file.
Now we want to disable the automatic refresh at FHEM start. Edit the code of 00_THZ.pm like this: Comment out lines 268 to 273: add # at the beginning of the line


sub THZ_Refresh_all_gets($) {
  my ($hash) = @_;
  RemoveInternalTimer($hash);
  my $timedelay= 5; #strart after 5 seconds
  #  foreach my $cmdhash (keys %gets) {
  #  my %par = ( command => $cmdhash, hash => $hash );
  #  RemoveInternalTimer(\%par);
  #  InternalTimer(gettimeofday() + ($timedelay++) , "THZ_GetRefresh", \%par, 0);
  #   $timedelay += 0.3;
  #  }
}


then restart fhem: it should not crash anymore.
Now test one reading after the other manually
e.g. get Mythz pOpMode

one or more of them should crash the FHEM
I  have to understand which one, and disable it for you

immi

micomat

@Jakl, if you need German support for doing this, just send me a PN so i can help you ;)
as far as i know, you are the first one trying to connect with a firmware bevore 4.09

Markus
Synology DS218+ with fhem+iobroker in docker, 2x RasPi w. ser2net, CUL433+868, IT, EGPM2LAN, THZ/LWZ, FB_Callmonitor, HMS100TF, Homematic, 2x TX3-TH, Pushover, USB-IR-SML-Head, SONOS, GHoma, MBus, KLF200

willybauss

#532
As promised here are my config files and a few screen shots showing how it looks like finally.
Would be nice to see yours as well.

Plot3_Fans.jpg shows the result of a filter replacement at approx. 17:30. It might be a good idea to trigger a reminder for filter replacement using these values (e.g. THZ sends you an email as soon as a defined power level of fans is reached) instead of the icon on the THZ's display. Drawback of the THZ's own solution is that the "filter is ok" value gets a reset on every power cycle. So if you need to switch off your heatpump fequently for any reason you will never get reminded for filter change.

Restart.sh is a small shell script, which is called by a cron job  in order to stop and restart fhem once per day. This improves  system stability a lot and works even in case of a "hanging" fhem process.

Willy

PS:
I need to mention that Plot2 is a 1:1 copy of immi's plot, not originated by me.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

Jakl

@Markus: Thank you, but my english is not that bad! :-)

@immi:
As expected, the SD card was not the problem. Also after deleting autocreate and  initialUsbCheck the system still crashed.
I will do your recommended modifications in THZ_Refresh_all_gets and retrieve the readings manually. And I will try to enter some error and exception handling in the code. I'm software engineer, but I'm more familiar in the Windows C# world and this are my first steps with Pearl. Maybe I can help you a little bit to improve the code.

It will take some time to get this done.  :-\

Regards,
Jakl

immi

Hi Willy
this looks great

Hi Jakl
Excellent, I will shame for my coding :)
I am not a software guy, and I learned perl while writing this module.
I made some simulations in Fortran and C, 100 years ago.
Going to Perl, was a shock. All this freedom looked like anarchy :)

immi

willybauss

@ Jakl:
My experience prior to fhem and even prior to heatpumpMonitor (which I used for months successfully) is that the heatpump needs some delay between the send/receive communications. I checked it out by using a macro capable terminal software, which had the possibility to add delays inside the communication strings. Later on I confirmed stable communication by using a bash script to get the sGlobal values into a file. As far as I remember the delays in my case (THZ 303 SOL, ver. 4.19) have to be between 10ms and 500ms. Possibly the 10ms is not enough in your case.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

lwzler

Zitat von: micomat am 13 Mai 2014, 15:39:45
but i will just copy and paste the official descriptions from the installation manual.

Is there a manual with the items "sElectrDHWDay" etc. descriped? Untill now I didn't find them in any manual  :-[

For this values I had asked the Stiebel Eltron service technician who did the initial setup for my LWZ. He statet that those vlaues should be accurate as the LWZ should have an internal power meter.
But another technician told me the oposite...

An information on USB connection to the LWZ:
I am using (a) 10m USB Cable (5m USB Cable + 5m extension; unpowered; unamplified) to connect the LWZ with my RasPi. The connection works stable without any signs of porblems.

willybauss

As far as I know Markus uses the english version of the THZ manual and takes the namings from the P-parameter description table - slightly modified by e.g. prefix s or p of course.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

houseowner123

Zitat von: lwzler am 15 Mai 2014, 10:56:41
Is there a manual with the items "sElectrDHWDay" etc. descriped? Untill now I didn't find them in any manual  :-[

For this values I had asked the Stiebel Eltron service technician who did the initial setup for my LWZ. He statet that those vlaues should be accurate as the LWZ should have an internal power meter.
But another technician told me the oposite...


Currently all sElectr..values point to inaccuracy. But I will wait 4 more days as immi suggested to determine how bad the diviation from the real meter readings is.

@willy: Thanks so much for codes and graphs.  :) It has already helped me tremendously. One question reagarding passive cooling: In order for this to be efficient (in-house-circulation) I need to turn off the normal ventilation, right?

@lwzler: I have version 4.09 which is the second oldest tested here and it required a delay of 100-200 ms. I use a 3 m long USB cable. If nothing helps with the crashs you might, for test purposes, try a shorter USB cable.

Tom

micomat

Zitat von: willybauss am 15 Mai 2014, 12:16:16
As far as I know Markus uses the english version of the THZ manual and takes the namings from the P-parameter description table - slightly modified by e.g. prefix s or p of course.

yep, when i have some time for that project ;) but i didn't forget it

ZitatI am using (a) 10m USB Cable (5m USB Cable + 5m extension; unpowered; unamplified) to connect the LWZ with my RasPi. The connection works stable without any signs of porblems.

in my point of view that "could" cause a problem but must not. the quality of the cable is a big point in this case. when there are interferences on a long cable it can cause problems.
Synology DS218+ with fhem+iobroker in docker, 2x RasPi w. ser2net, CUL433+868, IT, EGPM2LAN, THZ/LWZ, FB_Callmonitor, HMS100TF, Homematic, 2x TX3-TH, Pushover, USB-IR-SML-Head, SONOS, GHoma, MBus, KLF200