THZ / LWZ Tecalor Stiebel Eltron Heizung

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

Vorheriges Thema - Nächstes Thema

houseowner123

First, let me say once more how deeply I appreciate the work of immi and all co-developers here in the forum. It is us, the unknowing crowd that really draws from your wisdom.
I love the idea of the "at" command, and I have a practical application from which all 303i/304i owner can benefit from. We want to reheat the warm water when it is pretty warm outside because then it the LWZ runs most efficiently. I noticed that I can reach (for my settings) that if the last heating period occurs around 8 PM if the WW temp is 45°C around that time (e.g. somebody has just showered). It the reheat does not occur between 8 and 9 PM then it most likely happens early in the morning when it is pretty cold and the LZW is inefficient. Right now I can circumvent this by setting the OpMode to manual because my set temp in manual mode is 1,5K higher than in automatic mode. But then I need to switch things back.

define reheat at 20:00:00 set OperatingMode Manual
define reheat end at 21:00:00 set OperatingMode Automatic


So, I wonder I can use an if command to check the temp at 8 PM and if the temp is lower than 44°C to initiate the reheat. This would be relevant if somebody has showered at 7 PM the reheat is not needed.

In addition I would only use this of the season mode=winter

How would I implement all this into code language?  8)

Thanks and Happy Easter everyone!
Tom

micomat

Hey
you could read the Commandref Part of the IF command. this could be what youre looking for.
sorry i didnt ever use this in my own so i cannot really help in this matter. but post what you have so we can work in it together.

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

houseowner123

OK Markus, I give it a beginners try:

define reheat_begin at 20:00:00 IF (Season Mode winter) (IF (WWTemp<=44)) (set OperatingMode Manual) ELSE (set OperatingMode Automatic)
define reheat_end at 21:00:00 IF (OperatingMode Manual)  (set OperatingMode Automatic)


Config file did not complain.  8)

micomat

tom,

looks quite good to me :) IF it works, perfect!

here is more information about if conditions in at-definitions: http://www.fhemwiki.de/wiki/If-condition
but please be patient, there is a difference between the IF-module and a perl if-function... hard to get, but true :) more about the IF-COMMAND is here http://forum.fhem.de/index.php?topic=17895.0

i'm also working on a more complexe if-at-combination for having an automatic shutdown of the ventialtion with and restart to the last condition before the shutdown. but unfortunately time is what i don't have at the moment ;)

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

houseowner123

Irgendwas scheint nicht so richtig zu sein:

Error messages while initializing FHEM:
statefile: reheat_end already defined, delete it first
reheat_start already defined, delete it first

:-[

micomat

show me the config :)
i will check and read the IF manual tomorrow. i guess there is a declaration error.
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

#321
Revision (got rid of the error message):

define reheat_begin at *20:00:00 IF (Season Mode winter) (IF (WWTemp<=44)) (set OperatingMode Manual) ELSE (set OperatingMode Automatic)
define reheat_end at *21:00:00 IF (OperatingMode Manual)  (set OperatingMode Automatic)


-but it didn't work either.  :(
I use the sample config from the wiki. I know what is missing: the reference that these commands relate to mythz
And thanks for your offered help, Markus! These parentheses drive me crazy. :-/

micomat

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



define reheat_begin at *20:00:00 IF (Season Mode winter) (IF (WWTemp<=44)) (set OperatingMode Manual) ELSE (set OperatingMode Automatic)
define reheat_end at *21:00:00 IF (OperatingMode Manual)  (set OperatingMode Automatic)


Hi Tom
do not give up, we get it done.
I am quite far away and the internet connection is bad. I cannot make any tests.
1 hints from me: start easy, without if, then only with one IF....
The syntax should be like this

define reheat_end at *21:00:00 IF ([Mythaz:OperatingMode] eq "Manual") (set Mythz OperatingMode Automatic)


have a look in the reference
http://fhem.de/commandref_DE.html#IF
p.s. Pay attention that OperatingMode is not refreshed automatically. If you change it manually downstairs, you have to read it periodically.

buona pasqua
immi

immi

Hi Markus
maybe you have time to update the wiki,
I added one line to the script taking care of the ventilator icon, including offFor60min.


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



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


immi

houseowner123

Tried the kings road...

define reheat_start at *20:20:00 IF ([Mythz:SeasonMode]="winter" (IF ([Mythz:WWTemp]<=44.5)) (set Mythz OperatingMode Manual) ELSE (set Mythz OperatingMode Automatic)
define reheat_end at *21:00:00 IF ([Mythz:OperatingMode]="Manual") (set Mythz OperatingMode Automatic)


but didn't work.  :'(  Guess I have to take one of the Ifs out. On a positive note. The association with Mythz however was recognized.

thanks for the 60 min off implementation. Our neighbor likes to burn his trash. So this elegant option will come in handy.  :)

micomat

mimi, will update this Weekend

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

#327
define reheat_start at *20:20:00 IF ([Mythz:SeasonMode]="winter" (IF ([Mythz:WWTemp]<=44.5)) (set Mythz OperatingMode Manual) ELSE (set Mythz OperatingMode Automatic)
define reheat_end at *21:00:00 IF ([Mythz:OperatingMode]="Manual") (set Mythz OperatingMode Automatic)

some hints:

  • Use "eq" if you are comparing strings, not "=";
  • your sentence is unbalanced ")" at wrong place
  • look at you log for feedback
  • are you sure that you have defined userreadings for SeasonMode and WWTemp?



immi


houseowner123

Success.  :D Figured out the eq. thing before I read immis post:

define reheat_start at *20:00:00 IF ([Mythz:WWTemp]<44.5) (set Mythz OperatingMode Manual) ELSE (set Mythz OperatingMode Automatic)
define reheat_end at *21:00:00 IF ([Mythz:OperatingMode] eq "Manual") (set Mythz OperatingMode Automatic)


Now we start implementing the season mode IF. I have defined it as user reading
attr Mythz userReadings SeasonMode:Status_HC2_F5 {(split ' ',ReadingsVal("Mythz","Status_HC2_F5",0))[13]}

immi

Hi Tom
2 questions:

why do you need in the the reheat_start ELSE (set Mythz OperatingMode Automatic) ?
From your description, you are always in auto-mode during the whole day. Less is always better.

Are your issues solved with "InterfaceNotRespondig"? have you tested select(undef, undef, undef, 0.1); ?
I need to know for the next version, if this 100ms delay is necessary or not.

best regards
immi