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

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

Vorheriges Thema - Nächstes Thema

mlb

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.
LWZ 403SOL, FHEM + HomeAssistant

immi

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

mlb

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.
LWZ 403SOL, FHEM + HomeAssistant

tom_1

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


immi

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

willybauss

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
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

tom_1

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)

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

Thank you!

Tom

immi

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

willybauss

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.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

tom_1

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

immi

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

willybauss

#296
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  :'(
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

mlb

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 :)
LWZ 403SOL, FHEM + HomeAssistant

micomat

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

immi

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