THZ / LWZ Tecalor Stiebel Eltron Heizung

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

Vorheriges Thema - Nächstes Thema

houseowner123

Immi,

I noticed an issue with the heat recovery reading. I suspect the connect/disconnect issue drops the reading of everything except for sGlobal in the log files. I notice this because the plot is empty. I restart and from this moment on the logging returns to normal and the e.g. heat recovery is logged and correctly displayed..until the next disconnect. Any idea?

Thanks,
Tom

willybauss

 
Zitat von: houseowner123 am 02 Mai 2014, 11:49:18
Yes, I read the section. What you mean, is that you regulate how strong sensor influences the heating curve (strength of room influence). That takes care that. Thanks for the hint.
That's right. Initially I set the influence of inside sensor to 30%, but by checking the fhem graphs it turned out that often it is like you described: the heatpump heats up the house, though it is still too warm, caused by other effects (in my case it's mostly the sun shining through big windows on south side). After having changed the room influence to 50% such issues are very limited meanwhile.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

immi

Zitat von: houseowner123 am 02 Mai 2014, 12:30:21
Immi,
I noticed an issue with the heat recovery reading. I suspect the connect/disconnect issue drops the reading of everything except for sGlobal in the log files. I notice this because the plot is empty. I restart and from this moment on the logging returns to normal and the e.g. heat recovery is logged and correctly displayed..until the next disconnect. Any idea?
Thanks, Tom
Hi Tom
For what you experience, there could be 100 reasons.
All problems come from my inexperience in programming  ;D

I try to explain you what happens in background.
THZ has some routine to get  (THZ_get) values from the heatpump and to set them (THZ_set)
This part, to my opinion is very robust!! 8)

The problems comes from the intervals: periodic calls to THZ_get without blocking.
There is a central FHEM function to do this (without to fork) called InternalTimer.
InternalTimer has some limitations: normally each module need only one interval. THZ has many parameters which need different intervals.
Therefore I wrote a workaround THZ_GetRefresh.

sub THZ_GetRefresh($) {
my ($par)=@_;
my $hash=$par->{hash};
my $command=$par->{command};
my $interval = AttrVal($hash->{NAME}, ("interval_".$command), 0);
my $replyc = "";
if (!($hash->{STATE} eq "disconnected")) {
  if ($interval) {
      $interval = 60 if ($interval < 60); #do not allow intervall <60 sec
      InternalTimer(gettimeofday()+ $interval, "THZ_GetRefresh", $par, 1) ;
  }
  $replyc = THZ_Get($hash, $hash->{NAME}, $command);
}
return ($replyc);
}


The error handling in  THZ_GetRefresh with InternalTimer is really poor.
To make it short: if you lose once the call to one interval, it will not be called anymore. So if you have once a problem with sGlobal, there will be no refresh of sGlobal until restart.

Basic rule: if you see something strange (or change some config or update),  restart FHEM.
I also suggest to restart FHEM periodically, to be sure (e.g at 23:59)
immi

micomat

yep, i also expierienced a crash of my fhem yesterday which was solved with a powercycle late at night ;)
there was no time for error research...
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

houseowner123

Zitat von: immi am 02 Mai 2014, 13:45:46

The error handling in  THZ_GetRefresh with InternalTimer is really poor.
To make it short: if you lose once the call to one interval, it will not be called anymore. So if you have once a problem with sGlobal, there will be no refresh of sGlobal until restart.

Basic rule: if you see something strange (or change some config or update),  restart FHEM.
I also suggest to restart FHEM periodically, to be sure (e.g at 23:59)
immi

Pushing the 60min off Button caused the issue again:
2014.05.02 11:31:00 1: /dev/ttyUSB0 disconnected, waiting to reappear
2014.05.02 11:31:00 3: define at_D_60minOff at +00:59:00 set Mythz p07FanStageDay 1;set Mythz p07FanStageDay 0; setstate FanSelectorDay 60minOff : 0180FC0A056C00001003---InterfaceNotRespondig
2014.05.02 11:31:00 3: Notify_p07FanStageDay return value: 0180FC0A056C00001003---InterfaceNotRespondig
2014.05.02 11:31:00 3: Setting Mythz baudrate to 115200
2014.05.02 11:31:00 1: /dev/ttyUSB0 reappeared (Mythz)
2014.05.02 12:30:00 1: /dev/ttyUSB0 disconnected, waiting to reappear
2014.05.02 12:30:00 3: at_D_60minOff: 0180FD0A056C00011003---InterfaceNotRespondig
2014.05.02 12:30:01 3: Setting Mythz baudrate to 115200
2014.05.02 12:30:01 1: /dev/ttyUSB0 reappeared (Mythz)


Heat recovery monitoring stopped at 12:30. So would an automatic shutdown-restart help here?

Thanks,
Tom

houseowner123

Zitat von: immi am 01 Mai 2014, 00:30:09
strange I expected more

one more thing...
I uploaded V0.093 tomorrow you can update..
changelog:

I added a plot of the quadratic curve neglecting summer/winter, FLOW-Proportion parameter and RoomInfluence parameter.
Using your settings of HC1, it computes the curve. The actual value is shown in red.
Look at the picture below.
you can test the plot like this:


define wl_hr2 weblink htmlCode <div class="SVGplot"><embed src="/fhem/THZ_PrintcurveSVG/" type="image/svg+xml"  name="wl_hr2"/></div> <a href="/fhem?detail=wl_hr2">wl_hr2</a><br>
attr wl_hr2 room heatpump


p.s. please Markus do not document in the wik this versioni; I do not know if I will leave the plot in  future version.

immi

Heating curve does not work for me. :(

(http://www.fotos-hochladen.net/uploads/screenshot2011n0jtksq9f.png)

immi

Hi Tom
the Heating curve does work for you. You are out of range, and I did not implement an autoscale.
Look at the green line, it has a vertical offset.
Try to put the fusspunkt ($p14LowEnDHC1) to 0.

Your other problem is more interesting for me.
please post more log and the full config

immi

houseowner123

Hi immi,

thanks to the THZ module, I was able to set the low end to 0 K. The SE guy who did the setup locked it at 0.7 K which always bugged me. Finally, freedom here! :) What does the actual heating point mean? on the curve: heating occurs ; below the curve: heating needed; about the curve: too hot?

The logs are not more revealing; the connect/reconnect issue appears several time/day; I do not use serial mode:
2014.05.01 00:27:17 1: /dev/ttyUSB0 disconnected, waiting to reappear
2014.05.01 00:27:17 3: at_N_60minOff: 0180FE0A056D00011003---InterfaceNotRespondig
2014.05.01 00:27:17 3: Setting Mythz baudrate to 115200
2014.05.01 00:27:17 1: /dev/ttyUSB0 reappeared (Mythz)
2014.05.01 13:33:03 0: Server started with 33 defined entities (version $Id: fhem.pl 5663 2014-04-26 09:13:54Z rudolfkoenig $, os linux, user fhem, pid 6126)
2014.05.01 13:33:04 3: [MyDashboard V2.11] Using an outdated no longer used Attribute or Value. This has been corrected. Don't forget to save config. [dashboard_lockstate]
2014.05.01 19:15:23 1: /dev/ttyUSB0 disconnected, waiting to reappear
2014.05.01 19:15:28 3: Setting Mythz baudrate to 115200
2014.05.01 19:15:28 1: /dev/ttyUSB0 reappeared (Mythz)
2014.05.02 20:00:01 3: set Mythz pOpMode manual : manual
2014.05.02 20:00:01 3: reheat_start: manual
2014.05.02 20:04:37 1: /dev/ttyUSB0 disconnected, waiting to reappear
2014.05.02 20:04:37 3: Setting Mythz baudrate to 115200
2014.05.02 20:04:37 1: /dev/ttyUSB0 reappeared (Mythz)



basic config (without reading and plots):

define Mythz THZ /dev/ttyUSB0@115200
attr Mythz interval_sGlobal 300
attr Mythz interval_sHistory 28800
attr Mythz room THZ
define FileLog_Mythz FileLog ./log/Mythz-%Y-%m.log Mythz

define reheat_start at *20:00:00 IF ([Mythz:WWTemp]<44.5) (set Mythz pOpMode manual)
define reheat_end at *21:00:00 IF ([Mythz:pOpMode] eq "manual") (set Mythz pOpMode DHWmode)

define MyDashboard Dashboard
attr MyDashboard dashboard_lockstate lock
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 Momentanwerte
attr MyDashboard dashboard_tab1sorting t0c100,THZ,true,340,258:
attr MyDashboard dashboard_tabcount 1
attr MyDashboard dashboard_webfrontendfilter WEB
define MyDashboard_weblink weblink htmlCode {DashboardAsHtml("MyDashboard")}
attr MyDashboard_weblink room DashboardRoom

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

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


What is that dashboard message all about? Never goes away.
Thanks,
Tom

immi

Dear all
I uploaded v 0.094.
-> small bug fixed in $p14LowEnDHC1
-> some delay added for Tom, who has an older firmware
-> heating curve simulation updated.

@Tom
>> What does the actual heating point mean? 
The actual heating point is the status of your heatpump; The heat curve is my simulation, which is far from perfect.
>> What is that dashboard message all about?
delete following obsolete line from config "attr MyDashboard dashboard_lockstate lock"


immi

houseowner123

#429
Zitat von: immi am 02 Mai 2014, 23:48:49
Dear all
I uploaded v 0.094.
-> small bug fixed in $p14LowEnDHC1
-> some delay added for Tom, who has an older firmware
-> heating curve simulation updated.

@Tom
>> What does the actual heating point mean? 
The actual heating point is the status of your heatpump; The heat curve is my simulation, which is far from perfect.
>> What is that dashboard message all about?
delete following obsolete line from config "attr MyDashboard dashboard_lockstate lock"

immi

Thanks immi! :)

Is this THZ_GetRefresh already included in the new version or is that code meant for the config file?
Thanks also for the hint with the obsolete line!

EDIT Readings dropped to sGlobal only yesterday at 22:22 without any hints in them or myths log files. Had to do restart to get all readings and logs back again. Will test v0.94 and report back.

Tom

immi

Hi Tom
THZ_GetRefresh  is there from 3 weeks, otherwise you would not have interval attributes.

Is it better with 0.094?

immi

houseowner123

Hi Willybaus,

I connected the PT1000 as in the manual. Can't see any changes in the reading. The reading in 00_THZ.pm would be under sGlobal--> inside temp, right? There is a blue and black cable. Is it possible that I need to switch these?

Thanks,
Tom

willybauss

Hi Tom,
sGlobal--> inside temp is correct. Maybe you need to restart the THZ. And you should try setting

INBETRIEBNAHME - RT.ERFASSUNG HK  ==> set to HK1

I don't believe that you need to change black/blue. Polarity shouldn't be an issue.

Willy
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

willybauss

Tom,
you can measure if there's really a resistance of approx. 1078 Ohm (= PT1000 @ 20°C) at the THZ side's end of the sensor cable. If not => check cable, sensor, soldering, ... Or (for debugging only) replace the cable incl. PT1000 by a resistor (or series of resistors) having approx. 1078 Ohm in total. So the reported value should be approx. 20°C.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

houseowner123

Thanks willibaus for all your input.
I do not have such a setting under Inbetriebnahme. Room temp however, is displayed in HK1 but it does not change at all, even in my hand.  I googled that the The thz needs same indoor sensor as the outside sensor: kty 81-210.  The PT1000 with its current resistance is right to read -60 degrees by the fhem module.
If I would place the sensor I boiling water it should read -20.
I found this in the newer version of the lwz manual. Or is the hot water test a bad idea? I can measure resistance too.

Thanks,
  Tom